mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
fix: 路由冲突
This commit is contained in:
parent
269c6334d8
commit
e0fe611948
@ -1,10 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<keep-alive>
|
<router-view/>
|
||||||
<router-view v-show="['/dataset/index', '/system/system-settings/appearance'].includes(key)"></router-view>
|
<plugin-com v-show="false" ref="de-theme" component-name="ThemeSetting"/>
|
||||||
</keep-alive>
|
|
||||||
<router-view v-show="!['/dataset/index', '/system/system-settings/appearance'].includes(key)"></router-view>
|
|
||||||
<plugin-com v-show="false" ref="de-theme" component-name="ThemeSetting" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -13,11 +10,9 @@ import PluginCom from '@/views/system/plugin/PluginCom'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
components: { PluginCom },
|
components: {PluginCom},
|
||||||
computed: {
|
beforeCreate() {
|
||||||
key() {
|
|
||||||
return this.$route.path
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
<section class="app-main">
|
<section class="app-main">
|
||||||
<transition name="fade-transform" mode="out-in">
|
<transition name="fade-transform" mode="out-in">
|
||||||
<el-main class="ms-main-container">
|
<el-main class="ms-main-container">
|
||||||
<keep-alive>
|
<router-view :key="key" />
|
||||||
<router-view v-if="['/dataset/index', '/system/system-settings/appearance'].includes(key)"></router-view>
|
|
||||||
</keep-alive>
|
|
||||||
<router-view v-if="!['/dataset/index', '/system/system-settings/appearance'].includes(key)"></router-view>
|
|
||||||
</el-main>
|
</el-main>
|
||||||
</transition>
|
</transition>
|
||||||
</section>
|
</section>
|
||||||
@ -23,24 +20,24 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-main {
|
.app-main {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-header + .app-main {
|
.fixed-header + .app-main {
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ms-main-container {
|
.ms-main-container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.el-popup-parent--hidden {
|
.el-popup-parent--hidden {
|
||||||
.fixed-header {
|
.fixed-header {
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -221,9 +221,7 @@
|
|||||||
class="ds-icon-api"
|
class="ds-icon-api"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span v-if="['db', 'sql'].includes(data.modelInnerType)">
|
||||||
v-if="['db', 'sql'].includes(data.modelInnerType)"
|
|
||||||
>
|
|
||||||
<span v-if="data.mode === 0" style="margin-left: 6px"
|
<span v-if="data.mode === 0" style="margin-left: 6px"
|
||||||
><i class="el-icon-s-operation"
|
><i class="el-icon-s-operation"
|
||||||
/></span>
|
/></span>
|
||||||
@ -238,7 +236,13 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
"
|
"
|
||||||
:class="[{ 'de-fill-block': !['db', 'sql'].includes(data.modelInnerType)}]"
|
:class="[
|
||||||
|
{
|
||||||
|
'de-fill-block': !['db', 'sql'].includes(
|
||||||
|
data.modelInnerType
|
||||||
|
)
|
||||||
|
}
|
||||||
|
]"
|
||||||
:title="data.name"
|
:title="data.name"
|
||||||
>{{ data.name }}</span
|
>{{ data.name }}</span
|
||||||
>
|
>
|
||||||
@ -496,7 +500,6 @@ export default {
|
|||||||
},
|
},
|
||||||
isTreeSearch: false,
|
isTreeSearch: false,
|
||||||
kettleRunning: false,
|
kettleRunning: false,
|
||||||
pageCreated: false,
|
|
||||||
engineMode: 'local',
|
engineMode: 'local',
|
||||||
searchPids: [], // 查询命中的pid
|
searchPids: [], // 查询命中的pid
|
||||||
filterText: '',
|
filterText: '',
|
||||||
@ -526,9 +529,13 @@ export default {
|
|||||||
this.$refs.datasetTreeRef.filter(this.filterText)
|
this.$refs.datasetTreeRef.filter(this.filterText)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
activated() {
|
created() {
|
||||||
if (!this.pageCreated) return;
|
this.kettleState()
|
||||||
const dataset = this.$refs.datasetTreeRef?.getCurrentNode()
|
engineMode().then((res) => {
|
||||||
|
this.engineMode = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
const { id, name } = this.$route.params
|
const { id, name } = this.$route.params
|
||||||
queryAuthModel({ modelType: 'dataset' }, true).then((res) => {
|
queryAuthModel({ modelType: 'dataset' }, true).then((res) => {
|
||||||
localStorage.setItem('dataset-tree', JSON.stringify(res.data))
|
localStorage.setItem('dataset-tree', JSON.stringify(res.data))
|
||||||
@ -537,28 +544,15 @@ export default {
|
|||||||
this.$refs.datasetTreeRef?.filter(this.filterText)
|
this.$refs.datasetTreeRef?.filter(this.filterText)
|
||||||
if (id && name.includes(this.filterText)) {
|
if (id && name.includes(this.filterText)) {
|
||||||
this.dfsTableData(this.tData, id)
|
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()
|
this.refresh()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dfsTableData(arr, id) {
|
dfsTableData(arr, id) {
|
||||||
arr.some(ele => {
|
arr.some((ele) => {
|
||||||
if(ele.id === id) {
|
if (ele.id === id) {
|
||||||
this.$refs.datasetTreeRef?.setCurrentNode(ele)
|
this.$refs.datasetTreeRef?.setCurrentNode(ele)
|
||||||
this.nodeClick(ele)
|
this.nodeClick(ele)
|
||||||
this.expandedArray.push(id)
|
this.expandedArray.push(id)
|
||||||
@ -567,7 +561,7 @@ export default {
|
|||||||
this.dfsTableData(ele.children, id)
|
this.dfsTableData(ele.children, id)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
nameRepeat(value) {
|
nameRepeat(value) {
|
||||||
if (!this.fileList || this.fileList.length === 0) {
|
if (!this.fileList || this.fileList.length === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user