去掉用户的禁用功能

This commit is contained in:
xuetao.li
2023-04-19 09:12:04 +08:00
parent 2f010f115c
commit 649175ae5e
+21 -21
View File
@@ -57,12 +57,12 @@
<vxe-column show-overflow show-header-overflow field="EMAIL" title="邮箱"></vxe-column> <vxe-column show-overflow show-header-overflow field="EMAIL" title="邮箱"></vxe-column>
<vxe-column show-overflow show-header-overflow field="ROLENAME" title="角色"></vxe-column> <vxe-column show-overflow show-header-overflow field="ROLENAME" title="角色"></vxe-column>
<vxe-column show-overflow show-header-overflow field="USNAME" title="姓名"></vxe-column> <vxe-column show-overflow show-header-overflow field="USNAME" title="姓名"></vxe-column>
<vxe-column show-overflow show-header-overflow title="启用/禁用" width="100" fixed="right"> <!-- <vxe-column show-overflow show-header-overflow title="启用/禁用" width="100" fixed="right">-->
<template #default="{ row }"> <!-- <template #default="{ row }">-->
<el-switch v-model="row.ISUSE" active-value="1" inactive-value="0" <!-- <el-switch v-model="row.ISUSE" active-value="1" inactive-value="0"-->
@change="(val) => sysUserIsUse(val, row)"></el-switch> <!-- @change="(val) => sysUserIsUse(val, row)"></el-switch>-->
</template> <!-- </template>-->
</vxe-column> <!-- </vxe-column>-->
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right"> <vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button type="text" @click="openRowData('view', row)">查看</el-button> <el-button type="text" @click="openRowData('view', row)">查看</el-button>
@@ -210,21 +210,21 @@ export default {
this.repassword = '' this.repassword = ''
this.dialogUser = true this.dialogUser = true
}, },
// 启用/禁用 // // 启用/禁用
sysUserIsUse (val, row) { // sysUserIsUse (val, row) {
this.$confirm(val === '0' ? '此操作将禁用所选用户, 是否继续?' : '此操作将启用所选用户, 是否继续?', '提示', { // this.$confirm(val === '0' ? '此操作将禁用所选用户, 是否继续?' : '此操作将启用所选用户, 是否继续?', '提示', {
confirmButtonText: '确定', // confirmButtonText: '确定',
cancelButtonText: '取消', // cancelButtonText: '取消',
type: 'warning' // type: 'warning'
}).then(() => { // }).then(() => {
this.$api.user.sysUserIsUse({ USID: row.USID, type: val }).then(_ => { // this.$api.user.sysUserIsUse({ USID: row.USID, type: val }).then(_ => {
this.$message.success('操作成功') // this.$message.success('操作成功')
this.sysUserList() // this.sysUserList()
}) // })
}).catch(() => { // }).catch(() => {
row.ISUSE = val === '1' ? '0' : '1' // row.ISUSE = val === '1' ? '0' : '1'
}) // })
}, // },
// 删除 // 删除
deleteRow (row) { deleteRow (row) {
this.deleteUser(row.USID) this.deleteUser(row.USID)