|
|
@ -1,9 +1,9 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="page"> |
|
|
|
<div class="page" style="margin-bottom: 20px"> |
|
|
|
<h6 class="l-title">用户列表</h6> |
|
|
|
<h6 class="l-title">筛选</h6> |
|
|
|
<div class="page-content"> |
|
|
|
<div class="page-content"> |
|
|
|
<div class="tool"> |
|
|
|
<div class="tool" style="margin-bottom: 0"> |
|
|
|
<ul class="filter"> |
|
|
|
<ul class="filter"> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>创建时间:</label> |
|
|
|
<label>创建时间:</label> |
|
|
@ -33,8 +33,11 @@ |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<div></div> |
|
|
|
<div></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="tool"> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="page"> |
|
|
|
|
|
|
|
<div class="page-content"> |
|
|
|
|
|
|
|
<div class="tool" style="margin-bottom: 20px"> |
|
|
|
<ul class="filter"> |
|
|
|
<ul class="filter"> |
|
|
|
<li style="margin-bottom: 0"> |
|
|
|
<li style="margin-bottom: 0"> |
|
|
|
<label>搜索:</label> |
|
|
|
<label>搜索:</label> |
|
|
@ -47,6 +50,7 @@ |
|
|
|
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> |
|
|
|
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange"> |
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" width="80" align="center"></el-table-column> |
|
|
|
<el-table-column type="selection" width="80" align="center"></el-table-column> |
|
|
@ -80,6 +84,7 @@ |
|
|
|
<div class="pagination"> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total"></el-pagination> |
|
|
|
<el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total"></el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :title="isDetail ? '查看账号' : (form.userId ? '编辑账号' : '新增账号')" :visible.sync="userVisible" width="576px" @close="closeUser" class="dialog" :close-on-click-modal="false"> |
|
|
|
<el-dialog :title="isDetail ? '查看账号' : (form.userId ? '编辑账号' : '新增账号')" :visible.sync="userVisible" width="576px" @close="closeUser" class="dialog" :close-on-click-modal="false"> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px" label-suffix=":" :disabled="isDetail"> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px" label-suffix=":" :disabled="isDetail"> |
|
|
@ -133,8 +138,6 @@ |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import Setting from '@/setting' |
|
|
|
import Setting from '@/setting' |
|
|
@ -250,7 +253,8 @@ export default { |
|
|
|
originalAccount: '', |
|
|
|
originalAccount: '', |
|
|
|
originalWorkNumber: '', |
|
|
|
originalWorkNumber: '', |
|
|
|
originalPhone: '', |
|
|
|
originalPhone: '', |
|
|
|
originalEmail: '' |
|
|
|
originalEmail: '', |
|
|
|
|
|
|
|
submiting: false |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -431,10 +435,12 @@ export default { |
|
|
|
confirm(){ |
|
|
|
confirm(){ |
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
|
|
|
|
if (this.submiting) return false |
|
|
|
if(this.accountRepeat) return util.errorMsg('该账号已存在!') |
|
|
|
if(this.accountRepeat) return util.errorMsg('该账号已存在!') |
|
|
|
if(this.workNumberRepeat) return util.errorMsg('该学号/工号已存在!') |
|
|
|
if(this.workNumberRepeat) return util.errorMsg('该学号/工号已存在!') |
|
|
|
if(this.phoneRepeat) return util.errorMsg('该手机号已存在!') |
|
|
|
if(this.phoneRepeat) return util.errorMsg('该手机号已存在!') |
|
|
|
if(this.emailRepeat) return util.errorMsg('该邮箱已存在!') |
|
|
|
if(this.emailRepeat) return util.errorMsg('该邮箱已存在!') |
|
|
|
|
|
|
|
this.submiting = true |
|
|
|
let data = this.form |
|
|
|
let data = this.form |
|
|
|
// 如果是新增,则取当前用户的schoolId |
|
|
|
// 如果是新增,则取当前用户的schoolId |
|
|
|
data.schoolId = data.schoolId ? data.schoolId : this.schoolId |
|
|
|
data.schoolId = data.schoolId ? data.schoolId : this.schoolId |
|
|
@ -447,13 +453,19 @@ export default { |
|
|
|
this.userVisible = false |
|
|
|
this.userVisible = false |
|
|
|
util.successMsg('编辑成功') |
|
|
|
util.successMsg('编辑成功') |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}).catch(res => {}) |
|
|
|
this.submiting = false |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
this.submiting = false |
|
|
|
|
|
|
|
}) |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.$post(this.api.saveUser,data).then(res => { |
|
|
|
this.$post(this.api.saveUser,data).then(res => { |
|
|
|
this.userVisible = false |
|
|
|
this.userVisible = false |
|
|
|
util.successMsg('添加成功') |
|
|
|
util.successMsg('添加成功') |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}).catch(res => {}) |
|
|
|
this.submiting = false |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
this.submiting = false |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
@ -584,9 +596,6 @@ export default { |
|
|
|
.l-title{ |
|
|
|
.l-title{ |
|
|
|
margin-bottom: 24px; |
|
|
|
margin-bottom: 24px; |
|
|
|
} |
|
|
|
} |
|
|
|
.page .page-content .tool{ |
|
|
|
|
|
|
|
margin-bottom: 30px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.filter{ |
|
|
|
.filter{ |
|
|
|
flex-wrap: wrap; |
|
|
|
flex-wrap: wrap; |
|
|
|
li{ |
|
|
|
li{ |
|
|
|