diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 187596ef8..0f6ac9089 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -536,6 +536,7 @@ "downloadFile": "下载文件", "hostName": "主机名", "isValid": "有效", + "fromTicket": "来自工单", "isEffective": "起作用的", "nodeCount": "节点数量", "refreshFail": "刷新失败", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 975088674..eb6c486d5 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -527,6 +527,7 @@ "downloadFile": "Download file", "hostName": "Hostname", "isValid": "Validity", + "fromTicket": "From ticket", "isEffective": "Effective", "nodeCount": "Node count", "refreshFail": "Refresh fail", diff --git a/src/views/perms/ApplicationPermission/ApplicationPermissionList.vue b/src/views/perms/ApplicationPermission/ApplicationPermissionList.vue index d1285809c..9cb91dbf0 100644 --- a/src/views/perms/ApplicationPermission/ApplicationPermissionList.vue +++ b/src/views/perms/ApplicationPermission/ApplicationPermissionList.vue @@ -53,7 +53,7 @@ export default { 'name', 'type_display', 'category_display', 'users_amount', 'user_groups_amount', 'applications_amount', 'system_users_amount', - 'date_expired', 'is_valid', + 'date_expired', 'is_valid', 'from_ticket', 'created_by', 'date_created', 'comment', 'org_name', 'actions' ], columnsShow: { @@ -119,6 +119,15 @@ export default { } } }, + from_ticket: { + formatter(row) { + if (row.from_ticket) { + return vm.$t('common.Yes') + } else { + return vm.$t('common.No') + } + } + }, actions: { formatterArgs: { onUpdate: ({ row }) => { diff --git a/src/views/perms/AssetPermission/AssetPermissionList.vue b/src/views/perms/AssetPermission/AssetPermissionList.vue index 6136566e6..0434c6df6 100644 --- a/src/views/perms/AssetPermission/AssetPermissionList.vue +++ b/src/views/perms/AssetPermission/AssetPermissionList.vue @@ -11,6 +11,7 @@ export default { GenericTreeListPage }, data() { + const vm = this return { treeSetting: { showMenu: false, @@ -31,7 +32,10 @@ export default { ], columnsShow: { min: ['name', 'actions'], - default: ['name', 'users_amount', 'user_groups_amount', 'assets_amount', 'nodes_amount', 'system_users_amount', 'is_valid', 'from_ticket', 'actions'] + default: [ + 'name', 'users_amount', 'user_groups_amount', 'assets_amount', 'nodes_amount', 'system_users_amount', + 'is_valid', 'actions' + ] }, columnsMeta: { name: { @@ -52,6 +56,15 @@ export default { } } }, + from_ticket: { + formatter(row) { + if (row.from_ticket) { + return vm.$t('common.Yes') + } else { + return vm.$t('common.No') + } + } + }, user_groups_amount: { label: this.$t('perms.UserGroups'), width: '100px', @@ -129,6 +142,19 @@ export default { } ] }, + { + label: this.$t('perms.fromTicket'), value: 'from_ticket', + children: [ + { + value: '1', + label: this.$t('common.Yes') + }, + { + value: '0', + label: this.$t('common.No') + } + ] + }, { label: this.$t('perms.isEffective'), value: 'is_effective', children: [