Merge pull request #3168 from dataease/pr@dev_dataset_source

Pr@dev dataset source
This commit is contained in:
Junjun 2022-09-23 16:37:16 +08:00 committed by GitHub
commit 0f46b2f7bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 53 deletions

View File

@ -1,10 +1,7 @@
<template>
<div id="app">
<keep-alive>
<router-view v-show="['/dataset/index', '/system/system-settings/appearance'].includes(key)"></router-view>
</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" />
<router-view/>
<plugin-com v-show="false" ref="de-theme" component-name="ThemeSetting"/>
</div>
</template>
@ -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() {
}
}
</script>

View File

@ -2,10 +2,7 @@
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<el-main class="ms-main-container">
<keep-alive>
<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>
<router-view :key="key" />
</el-main>
</transition>
</section>
@ -23,24 +20,24 @@ export default {
</script>
<style lang="scss" scoped>
.app-main {
height: 100%;
}
.app-main {
height: 100%;
}
.fixed-header + .app-main {
padding-top: 50px;
}
.fixed-header + .app-main {
padding-top: 50px;
}
.ms-main-container {
height: 100%;
padding: 0 !important;
}
.ms-main-container {
height: 100%;
padding: 0 !important;
}
</style>
<style lang="scss">
.el-popup-parent--hidden {
.fixed-header {
padding-right: 15px;
}
}
.el-popup-parent--hidden {
.fixed-header {
padding-right: 15px;
}
}
</style>

View File

@ -221,9 +221,7 @@
class="ds-icon-api"
/>
</span>
<span
v-if="['db', 'sql'].includes(data.modelInnerType)"
>
<span v-if="['db', 'sql'].includes(data.modelInnerType)">
<span v-if="data.mode === 0" style="margin-left: 6px"
><i class="el-icon-s-operation"
/></span>
@ -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 }}</span
>
@ -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) {