dev_202412
yujialong 4 months ago
parent 2a1ffda11c
commit d5425d48bb
  1. 39
      src/views/system/staff.vue

@ -88,7 +88,7 @@
show-overflow-tooltip></el-table-column>
<el-table-column prop="roleName" label="授权角色" align="center" min-width="200"
show-overflow-tooltip></el-table-column>
<el-table-column prop="lastLoginTime" label="最后登录时间" align="center" width="130"></el-table-column>
<el-table-column prop="lastLoginTime" label="最后登录时间" align="center" width="150"></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button type="text" v-auth="'/system:后台账号:查看'" @click="queryStaff(scope.row, true)">查看</el-button>
@ -113,8 +113,8 @@
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item prop="account" label="账号">
<el-input v-model.trim="form.account" placeholder="请输入账号"></el-input>
<el-form-item v-if="form.accountId" label="账号">
{{ form.account }}
</el-form-item>
<el-form-item prop="roleList" label="授权角色">
<el-select class="w-100" v-model="form.roleList" multiple>
@ -170,19 +170,6 @@ import OrgTree from "@/components/org-tree/src/tree";
export default {
components: { OrgTree },
data () {
const accountPass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入账号'))
} else {
const pattern = /^[A-Za-z0-9]*$/
if (pattern.test(value)) {
this.accountChange()
callback()
} else {
callback(new Error('请输入正确账号格式'))
}
}
}
const userNamePass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入姓名'))
@ -272,9 +259,6 @@ export default {
]
},
rules: {
account: [
{ required: true, validator: accountPass, trigger: 'blur' }
],
userName: [
{ required: true, validator: userNamePass, trigger: "blur" }
],
@ -299,7 +283,6 @@ export default {
staffVisible: false,
accountReapeat: false,
originAccount: '',
workNumberReapeat: false,
originWorkNumber: '',
phoneRepeat: false,
@ -556,7 +539,6 @@ export default {
data.staffArchitectureId = archId
}
this.form = data
this.originAccount = data.account
this.originWorkNumber = data.workNumber
}).catch(res => { })
},
@ -566,21 +548,6 @@ export default {
this.roleList = res.rolePage.records
}).catch(res => { })
},
//
accountChange () {
const form = this.form
const { account } = form
if (account === this.originAccount) {
this.accountReapeat = false
} else {
const { accountId } = form
this.$post(`${this.api.checkWorkNumOrAccount}?platformId=${Setting.platformId}&type=2&account=${account}${accountId ? `&accountId=${accountId}` : ''}`).then(res => {
this.accountReapeat = false
}).catch(err => {
this.accountReapeat = true
})
}
},
//
worknumberChange () {
const form = this.form

Loading…
Cancel
Save