From 3aced25da4d2e4f8a2dd96e26feb331026694e73 Mon Sep 17 00:00:00 2001 From: Orange Date: Mon, 14 Dec 2020 18:23:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=B9=E9=87=8F=E4=BF=AE=E5=A4=8D2.6?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=B5=8B=E8=AF=95=E4=BA=A7=E7=94=9F=E7=9A=84?= =?UTF-8?q?Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ListTable/TableAction/ImportDialog.vue | 7 ++++++- src/i18n/langs/cn.json | 2 ++ src/i18n/langs/en.json | 2 ++ src/layout/components/NavHeader/index.vue | 17 ++++++++++++++--- src/router/userPage.js | 1 - .../applications/RemoteApp/RemoteAppList.vue | 2 +- .../assets/Domain/DomainDetail/GatewayList.vue | 9 ++++++++- 7 files changed, 33 insertions(+), 7 deletions(-) diff --git a/src/components/ListTable/TableAction/ImportDialog.vue b/src/components/ListTable/TableAction/ImportDialog.vue index 83386b6cf..40dc5215a 100644 --- a/src/components/ListTable/TableAction/ImportDialog.vue +++ b/src/components/ListTable/TableAction/ImportDialog.vue @@ -208,7 +208,12 @@ export default { this.showImportDialog = false }, beforeUpload(file) { - this.isCsv = _.endsWith(file.name, 'csv') || _.endsWith(file.name, 'xlsx') + this.isCsv = this.importTypeOption === 'csv' ? _.endsWith(file.name, 'csv') : _.endsWith(file.name, 'xlsx') + if (!this.isCsv) { + this.$message.error( + this.$t('common.NeedSpecifiedFile') + ) + } return this.isCsv } } diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 3152c56d9..6ed331dab 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -185,6 +185,8 @@ "RequestTickets": "申请工单", "Actions": "操作", "Activate": "激活", + "NeedSpecifiedFile": "需上传指定格式文件", + "TestPortErrorMsg":"端口错误,请重新输入", "Active": "激活中", "actionsTips":"剪切板权限控制目前仅支持 RDP/VNC 协议的连接", "Add": "添加", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 08adb6b7e..f5885c8d6 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -184,6 +184,8 @@ "Action": "Action", "RequestTickets": "Request tickets", "Actions": "Actions", + "NeedSpecifiedFile": "Required to upload the specified format file", + "TestPortErrorMsg":"Port Error, please check", "Activate": "Activate", "actionsTips":"Clipboard's copy and paste control only support RDP/VNC protocol.", "Active": "Active", diff --git a/src/layout/components/NavHeader/index.vue b/src/layout/components/NavHeader/index.vue index 2ff6b1a68..8a490108c 100644 --- a/src/layout/components/NavHeader/index.vue +++ b/src/layout/components/NavHeader/index.vue @@ -10,7 +10,14 @@
-
+
@@ -31,6 +38,7 @@ import Help from './Help' import Language from './Language' import WebTerminal from './WebTerminal' import Tickets from './Tickets' +import rolc from '@/utils/role' export default { components: { @@ -48,8 +56,11 @@ export default { }, computed: { ...mapGetters([ - 'sidebar', 'publicSettings' - ]) + 'sidebar', 'publicSettings', 'currentOrgRoles' + ]), + isOrgAuditor() { + return rolc.getRolesDisplay(this.currentOrgRoles).includes('OrgAuditor') || rolc.getRolesDisplay(this.currentOrgRoles).includes('Auditor') + } }, methods: { toggleSideBar() { diff --git a/src/router/userPage.js b/src/router/userPage.js index 6c4ecd04d..188c230f7 100644 --- a/src/router/userPage.js +++ b/src/router/userPage.js @@ -115,7 +115,6 @@ export default [ { path: `external-luna`, component: Layout, - hidden: true, meta: { permissions: [rolec.PERM_USE] }, diff --git a/src/views/applications/RemoteApp/RemoteAppList.vue b/src/views/applications/RemoteApp/RemoteAppList.vue index 47a8f4e17..24df27a58 100644 --- a/src/views/applications/RemoteApp/RemoteAppList.vue +++ b/src/views/applications/RemoteApp/RemoteAppList.vue @@ -1,5 +1,5 @@