fix: Administration模块添加禁止勾选操作admin等账号,去除日志模块中勾选操作

This commit is contained in:
刘洪洪
2023-06-07 14:52:24 +08:00
parent 2907f4485b
commit 878cbd066c
2 changed files with 10 additions and 9 deletions

View File

@@ -14,6 +14,7 @@
:resizable="false"
align="center"
type="selection"
:selectable="checkSelectable"
width="55">
</el-table-column>
<el-table-column
@@ -54,7 +55,7 @@
v-if="scope.row.id"
v-model="scope.row.status"
active-value="1"
:disabled="(scope.row.username === loginName) || (scope.row.username==='admin' && scope.row.id==1) "
:disabled="(scope.row.username === loginName) || (scope.row.username==='admin' && scope.row.id===1) "
inactive-value="0"
@change="()=>{statusChange(scope.row)}">
</el-switch>
@@ -144,6 +145,10 @@ export default {
}
this.$emit('reload')
})
},
// 禁止勾选buildIn为1的项即禁止修改、删除admin的账号
checkSelectable (row) {
return row.buildIn !== 1
}
}
}