diff --git a/core/frontend/src/layout/components/Topbar.vue b/core/frontend/src/layout/components/Topbar.vue
index 942d3af0ab..7093343682 100644
--- a/core/frontend/src/layout/components/Topbar.vue
+++ b/core/frontend/src/layout/components/Topbar.vue
@@ -124,7 +124,6 @@
-
import { mapGetters } from 'vuex'
-import ExportExcel from '@/views/dataset/exportExcel/index.vue'
import AppLink from './Sidebar/Link'
import variables from '@/styles/variables.scss'
import { isExternal } from '@/utils/validate'
@@ -184,7 +182,6 @@ export default {
AppLink,
Notification,
LangSelect,
- ExportExcel
},
props: {
showTips: {
@@ -290,7 +287,6 @@ export default {
bus.$on('set-top-text-info', this.setTopTextInfo)
bus.$on('set-top-text-active-info', this.setTopTextActiveInfo)
bus.$on('sys-logout', this.logout)
- bus.$on('data-export-center', this.dataExportCenter)
this.showTips && this.$nextTick(() => {
const drop = this.$refs['my-drop']
drop && drop.show && drop.show()
@@ -300,8 +296,6 @@ export default {
beforeDestroy() {
window.removeEventListener('beforeunload', (e) => this.beforeunloadHandler(e))
window.removeEventListener('unload', (e) => this.unloadHandler(e))
-
- bus.$off('data-export-center', this.dataExportCenter)
bus.$off('set-top-menu-info', this.setTopMenuInfo)
bus.$off('set-top-menu-active-info', this.setTopMenuActiveInfo)
bus.$off('set-top-text-info', this.setTopTextInfo)
@@ -324,8 +318,8 @@ export default {
localStorage.setItem('DE1.0-AI-TIPS-CHECK', 'CHECKED')
this.showOverlay = false
},
- dataExportCenter() {
- this.downloadClick()
+ downloadClick() {
+ bus.$emit('data-export-center')
},
async initAiBase() {
const aiTipsCheck = localStorage.getItem('DE1.0-AI-TIPS-CHECK')
@@ -342,9 +336,6 @@ export default {
beforeunloadHandler() {
this.beforeUnload_time = new Date().getTime()
},
- downloadClick() {
- this.$refs.ExportExcelRef.init()
- },
unloadHandler(e) {
this.gap_time = new Date().getTime() - this.beforeUnload_time
if (this.gap_time <= 5) {
diff --git a/core/frontend/src/views/dataset/exportExcel/index.vue b/core/frontend/src/views/dataset/exportExcel/index.vue
index 24c1595420..1df66255fe 100644
--- a/core/frontend/src/views/dataset/exportExcel/index.vue
+++ b/core/frontend/src/views/dataset/exportExcel/index.vue
@@ -231,6 +231,9 @@ export default {
mounted() {
bus.$on('task-export-topic-call', this.taskExportTopicCall)
},
+ beforeDestroy() {
+ bus.$off('task-export-topic-call', this.taskExportTopicCall)
+ },
methods: {
init() {
this.drawer = true
@@ -268,9 +271,6 @@ export default {
}
}, 5000)
},
- format(percentage) {
- return ''
- },
taskExportTopicCall(task) {
if (JSON.parse(task).exportStatus === 'SUCCESS') {
this.openMessageLoading(JSON.parse(task).exportFromName + ' ' + this.$t('excel.export') + this.$t('dataset.completed') + this.$t('dataset.goto'), 'success', this.callbackExport)