|
|
@ -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 |
|
|
|