|
@@ -336,26 +336,28 @@ const onSwitch = (row) => {
|
|
|
title: '停用确认',
|
|
|
content: `请确认是否停用管理员账号${row.username}?`,
|
|
|
onSubmit: () => {
|
|
|
- // pluginUpdateStatus({ ids: [row.id], status: '1' })
|
|
|
- // .then(() => {
|
|
|
- // ElMessage.success('停用成功!')
|
|
|
- // })
|
|
|
- // .catch(() => {})
|
|
|
- // .finally(() => {
|
|
|
- // row.status = '1'
|
|
|
- // })
|
|
|
+ row.status = 1
|
|
|
+ tenantsEdit({ id: state.form.id, userTenants: state.form.userTenants })
|
|
|
+ .then(() => {
|
|
|
+ ElMessage.success('停用成功!')
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ .finally(() => {
|
|
|
+ row.status = '1'
|
|
|
+ })
|
|
|
},
|
|
|
onCancel: () => {},
|
|
|
})
|
|
|
} else {
|
|
|
- // pluginUpdateStatus({ ids: [row.id], status: 0 })
|
|
|
- // .then(() => {
|
|
|
- // ElMessage.success('启用成功!')
|
|
|
- // })
|
|
|
- // .catch(() => {})
|
|
|
- // .finally(() => {
|
|
|
- // row.status = '0'
|
|
|
- // })
|
|
|
+ row.status = 0
|
|
|
+ tenantsEdit({ id: state.form.id, userTenants: state.form.userTenants })
|
|
|
+ .then(() => {
|
|
|
+ ElMessage.success('启用成功!')
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ .finally(() => {
|
|
|
+ row.status = '0'
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|