fix: 系统用户应用账号列表设置为不可点击

This commit is contained in:
“huailei000” 2022-04-25 17:49:54 +08:00 committed by 老广
parent 1ac9ca4593
commit b95867d229
2 changed files with 14 additions and 3 deletions

View File

@ -38,6 +38,10 @@ export default {
hasClone: { hasClone: {
type: Boolean, type: Boolean,
default: false default: false
},
systemUserDisabled: {
type: Boolean,
default: true
} }
}, },
data() { data() {
@ -84,7 +88,7 @@ export default {
showOverflowTooltip: true, showOverflowTooltip: true,
formatter: DetailFormatter, formatter: DetailFormatter,
formatterArgs: { formatterArgs: {
can: this.$hasPerm('assets.view_systemuser'), can: this.systemUserDisabled && this.$hasPerm('assets.view_systemuser'),
getTitle({ row }) { getTitle({ row }) {
return row.systemuser_display return row.systemuser_display
}, },

View File

@ -1,7 +1,13 @@
<template> <template>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :md="20" :sm="24"> <el-col :md="20" :sm="24">
<AppAccountListTable ref="ListTable" :url="accountUrl" :has-import="false" :has-clone="false" /> <AppAccountListTable
ref="ListTable"
:url="accountUrl"
:has-import="false"
:has-clone="false"
:system-user-disabled="systemUserDisabled"
/>
</el-col> </el-col>
<el-col :md="4" :sm="24" /> <el-col :md="4" :sm="24" />
</el-row> </el-row>
@ -24,7 +30,8 @@ export default {
}, },
data() { data() {
return { return {
accountUrl: `/api/v1/applications/accounts/?systemuser=${this.object.id}` accountUrl: `/api/v1/applications/accounts/?systemuser=${this.object.id}`,
systemUserDisabled: false
} }
} }
} }