Merge pull request #6060 from dataease/pr@dev_refresh

Pr@dev refresh
This commit is contained in:
dataeaseShu 2023-09-07 14:32:34 +08:00 committed by GitHub
commit 56e772de6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View File

@ -109,15 +109,6 @@ service.interceptors.response.use(response => {
config.loading && tryHideLoading(store.getters.currentPath)
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) {
checkAuth(error.response)

View File

@ -235,6 +235,7 @@
</deBtn>
<deBtn
type="primary"
v-loading="exportDatasetLoading"
@click="exportDatasetRequest"
>{{ $t('dataset.confirm') }}
</deBtn>
@ -282,6 +283,7 @@ export default {
name: ''
},
fields: [],
exportDatasetLoading: false,
filedList: [],
data: [],
syncStatus: '',
@ -490,6 +492,7 @@ export default {
return
}
this.table.expressionTree = JSON.stringify({ items, logic })
this.exportDatasetLoading = true
exportDataset(this.table).then((res) => {
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
const link = document.createElement('a')
@ -499,6 +502,8 @@ export default {
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}).finally(() => {
this.exportDatasetLoading = false
})
}
} else {