diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 78effadf68..4c83f5c23f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,10 +1,7 @@ @@ -13,11 +10,9 @@ import PluginCom from '@/views/system/plugin/PluginCom' export default { name: 'App', - components: { PluginCom }, - computed: { - key() { - return this.$route.path - } + components: {PluginCom}, + beforeCreate() { + } } diff --git a/frontend/src/layout/components/AppMain.vue b/frontend/src/layout/components/AppMain.vue index 732bbab7c8..1fe3409c83 100644 --- a/frontend/src/layout/components/AppMain.vue +++ b/frontend/src/layout/components/AppMain.vue @@ -2,10 +2,7 @@
- - - - +
@@ -23,24 +20,24 @@ export default { diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue index bbac9249ca..2629544d46 100644 --- a/frontend/src/views/dataset/group/Group.vue +++ b/frontend/src/views/dataset/group/Group.vue @@ -221,9 +221,7 @@ class="ds-icon-api" /> - + @@ -238,7 +236,13 @@ overflow: hidden; text-overflow: ellipsis; " - :class="[{ 'de-fill-block': !['db', 'sql'].includes(data.modelInnerType)}]" + :class="[ + { + 'de-fill-block': !['db', 'sql'].includes( + data.modelInnerType + ) + } + ]" :title="data.name" >{{ data.name }} @@ -496,7 +500,6 @@ export default { }, isTreeSearch: false, kettleRunning: false, - pageCreated: false, engineMode: 'local', searchPids: [], // 查询命中的pid filterText: '', @@ -526,9 +529,13 @@ export default { this.$refs.datasetTreeRef.filter(this.filterText) } }, - activated() { - if (!this.pageCreated) return; - const dataset = this.$refs.datasetTreeRef?.getCurrentNode() + created() { + this.kettleState() + engineMode().then((res) => { + this.engineMode = res.data + }) + }, + mounted() { const { id, name } = this.$route.params queryAuthModel({ modelType: 'dataset' }, true).then((res) => { localStorage.setItem('dataset-tree', JSON.stringify(res.data)) @@ -537,28 +544,15 @@ export default { this.$refs.datasetTreeRef?.filter(this.filterText) if (id && name.includes(this.filterText)) { this.dfsTableData(this.tData, id) - } else if (dataset) { - this.$refs.datasetTreeRef?.setCurrentNode(dataset) - this.nodeClick(dataset) } }) }) - }, - created() { - this.pageCreated = true; - this.kettleState() - engineMode().then((res) => { - this.engineMode = res.data - }) - }, - mounted() { - this.treeNode(true) this.refresh() }, methods: { dfsTableData(arr, id) { - arr.some(ele => { - if(ele.id === id) { + arr.some((ele) => { + if (ele.id === id) { this.$refs.datasetTreeRef?.setCurrentNode(ele) this.nodeClick(ele) this.expandedArray.push(id) @@ -567,7 +561,7 @@ export default { this.dfsTableData(ele.children, id) } return false - }); + }) }, nameRepeat(value) { if (!this.fileList || this.fileList.length === 0) {