用户禁用修复

dev_2022-04-07
yujialong 3 years ago
parent 396b48fd04
commit 80f209bb1a
  1. 37
      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.modifyUser,{ this.$post(`${this.api.getDetail}?accountId=${row.accountId}`).then(res => {
account: row.account, const { data } = res
accountId: row.accountId, this.$post(this.api.modifyUser,{
isEnable: val, account: row.account,
roleIds: row.roleId, accountId: row.accountId,
userId: row.userId, isEnable: val,
userName: row.userName, roleIds: data.roleId.map(e => e.roleId),
workNumber: row.workNumber, userId: row.userId,
platformId: Setting.platformId, userName: row.userName,
password: '', workNumber: row.workNumber,
schoolId: this.schoolId, platformId: Setting.platformId,
phone: '' password: '',
}).then((res) => { schoolId: this.schoolId,
val == 1 ? util.successMsg('启用成功') : util.successMsg('禁用成功') phone: data.phone
}).catch((res) => { }).then((res) => {
row.isEnable = val == 1 ? 0 : 1 val == 1 ? util.successMsg('启用成功') : util.successMsg('禁用成功')
}) }).catch((res) => {
row.isEnable = val == 1 ? 0 : 1
})
}).catch(res => {})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val

Loading…
Cancel
Save