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 @@