Merge pull request #5817 from dataease/pr@dev_st_fix

Pr@dev st fix
This commit is contained in:
dataeaseShu 2023-08-01 16:14:36 +08:00 committed by GitHub
commit d44a6a61d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -109,6 +109,16 @@ service.interceptors.response.use(response => {
config.loading && tryHideLoading(store.getters.currentPath) config.loading && tryHideLoading(store.getters.currentPath)
let msg = '' let msg = ''
if (error?.response?.config?.url === 'dataset/table/exportDataset') {
checkAuth(error.response)
var reader = new FileReader()
reader.readAsText(error.response.data, 'utf-8')
reader.onload = () => {
$error((JSON.parse(reader.result) || {}).message)
}
return Promise.reject()
}
if (error.response) { if (error.response) {
checkAuth(error.response) checkAuth(error.response)
msg = error.response.data.message || error.response.data msg = error.response.data.message || error.response.data
@ -118,7 +128,7 @@ service.interceptors.response.use(response => {
if (msg.length > 600) { if (msg.length > 600) {
msg = msg.slice(0, 600) msg = msg.slice(0, 600)
} }
!config.hideMsg && (!headers['authentication-status']) && !msg?.startsWith("MultiLoginError") && $error(msg) !config.hideMsg && (!headers['authentication-status']) && !msg?.startsWith('MultiLoginError') && $error(msg)
return Promise.reject(config.url === '/dataset/table/sqlPreview' ? msg : error) return Promise.reject(config.url === '/dataset/table/sqlPreview' ? msg : error)
}) })
const checkDownError = response => { const checkDownError = response => {

View File

@ -1336,6 +1336,7 @@
> >
<el-input <el-input
v-model="itemForm.name" v-model="itemForm.name"
@keypress.stop
style="width: 200px" style="width: 200px"
size="mini" size="mini"
clearable clearable