forked from github/dataease
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f90466bc23
@ -22,7 +22,7 @@ export default {
|
||||
},
|
||||
obj: {
|
||||
type: Object,
|
||||
default: {}
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -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 = ''
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<async-component v-if="showAsync" :url="url" :obj="obj" @execute-axios="executeAxios" @on-add-languanges="addLanguages" @plugin-call-back="pluginCallBack" />
|
||||
<async-component v-if="showAsync" :url="url" :obj="obj" @execute-axios="executeAxios"
|
||||
@on-add-languanges="addLanguages" @plugin-call-back="pluginCallBack"/>
|
||||
<div v-else>
|
||||
<h1>未知组件无法展示</h1>
|
||||
</div>
|
||||
@ -11,7 +12,8 @@
|
||||
import AsyncComponent from '@/components/AsyncComponent'
|
||||
import i18n from '@/lang'
|
||||
import bus from '@/utils/bus'
|
||||
import { execute } from '@/api/system/dynamic'
|
||||
import {execute} from '@/api/system/dynamic'
|
||||
|
||||
export default {
|
||||
name: 'PluginCom',
|
||||
components: {
|
||||
@ -24,7 +26,7 @@ export default {
|
||||
},
|
||||
obj: {
|
||||
type: Object,
|
||||
default: {}
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -65,7 +67,7 @@ export default {
|
||||
},
|
||||
|
||||
pluginCallBack(param) {
|
||||
const { eventName, eventParam } = param
|
||||
const {eventName, eventParam} = param
|
||||
bus.$emit(eventName, eventParam)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user