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: {
type: Boolean,
default: false
},
systemUserDisabled: {
type: Boolean,
default: true
}
},
data() {
@ -84,7 +88,7 @@ export default {
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
can: this.$hasPerm('assets.view_systemuser'),
can: this.systemUserDisabled && this.$hasPerm('assets.view_systemuser'),
getTitle({ row }) {
return row.systemuser_display
},

View File

@ -1,7 +1,13 @@
<template>
<el-row :gutter="20">
<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 :md="4" :sm="24" />
</el-row>
@ -24,7 +30,8 @@ export default {
},
data() {
return {
accountUrl: `/api/v1/applications/accounts/?systemuser=${this.object.id}`
accountUrl: `/api/v1/applications/accounts/?systemuser=${this.object.id}`,
systemUserDisabled: false
}
}
}