From 060781443ffc8ca6ef6c9998cd3a6f45ce47652a Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Mon, 13 Sep 2021 20:10:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=88=E6=9D=83=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=9A=E8=BF=87=20from=5Fticket=20?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 1 + src/i18n/langs/en.json | 1 + .../ApplicationPermissionList.vue | 11 +++++++- .../AssetPermission/AssetPermissionList.vue | 28 ++++++++++++++++++- 4 files changed, 39 insertions(+), 2 deletions(-) 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: [