diff --git a/frontend/src/components/AsyncComponent/index.vue b/frontend/src/components/AsyncComponent/index.vue index 677f1dd5e2..09dd19ef4c 100644 --- a/frontend/src/components/AsyncComponent/index.vue +++ b/frontend/src/components/AsyncComponent/index.vue @@ -22,7 +22,7 @@ export default { }, obj: { type: Object, - default: {} + default: () => {} } }, data() { diff --git a/frontend/src/views/dataset/add/AddExcel.vue b/frontend/src/views/dataset/add/AddExcel.vue index 340821ebb3..a3b7236f0d 100644 --- a/frontend/src/views/dataset/add/AddExcel.vue +++ b/frontend/src/views/dataset/add/AddExcel.vue @@ -153,6 +153,8 @@ import { post } from '@/api/dataset/dataset' import { getToken } from '@/utils/auth' import i18n from '@/lang' +import {$alert} from "@/utils/message"; +import store from "@/store"; const token = getToken() @@ -263,6 +265,20 @@ export default { uploadFail(response, file, fileList) { let myError = response.toString() myError = myError.replace('Error: ', '') + + if(myError.indexOf('AuthenticationException') >= 0){ + const message = i18n.t('login.tokenError') + $alert(message, () => { + store.dispatch('user/logout').then(() => { + location.reload() + }) + }, { + confirmButtonText: i18n.t('login.re_login'), + showClose: false + }) + return + } + const errorMessage = JSON.parse(myError).message + ', ' + this.$t('dataset.parse_error') this.path = '' diff --git a/frontend/src/views/system/plugin/PluginCom.vue b/frontend/src/views/system/plugin/PluginCom.vue index 2f6d3b3faa..7a7767b33b 100644 --- a/frontend/src/views/system/plugin/PluginCom.vue +++ b/frontend/src/views/system/plugin/PluginCom.vue @@ -1,6 +1,7 @@