用户禁用修复

dev_2022-04-07
yujialong 3 years ago
parent 396b48fd04
commit 80f209bb1a
  1. 7
      src/pages/user/list/index.vue

@ -469,23 +469,26 @@ export default {
}).catch(() => {}) }).catch(() => {})
}, },
switchOff(val,row,index) { switchOff(val,row,index) {
this.$post(`${this.api.getDetail}?accountId=${row.accountId}`).then(res => {
const { data } = res
this.$post(this.api.modifyUser,{ this.$post(this.api.modifyUser,{
account: row.account, account: row.account,
accountId: row.accountId, accountId: row.accountId,
isEnable: val, isEnable: val,
roleIds: row.roleId, roleIds: data.roleId.map(e => e.roleId),
userId: row.userId, userId: row.userId,
userName: row.userName, userName: row.userName,
workNumber: row.workNumber, workNumber: row.workNumber,
platformId: Setting.platformId, platformId: Setting.platformId,
password: '', password: '',
schoolId: this.schoolId, schoolId: this.schoolId,
phone: '' phone: data.phone
}).then((res) => { }).then((res) => {
val == 1 ? util.successMsg('启用成功') : util.successMsg('禁用成功') val == 1 ? util.successMsg('启用成功') : util.successMsg('禁用成功')
}).catch((res) => { }).catch((res) => {
row.isEnable = val == 1 ? 0 : 1 row.isEnable = val == 1 ? 0 : 1
}) })
}).catch(res => {})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val

Loading…
Cancel
Save