forked from github/dataease
refactor: 切换数据集优化
This commit is contained in:
parent
792e71254d
commit
fddc019fd3
@ -16,7 +16,7 @@
|
||||
<select id="searchOne" resultMap="BaseResultMapDTO">
|
||||
select
|
||||
id, `name`, scene_id, data_source_id, `type`, `mode`,`info`, create_by, create_time,
|
||||
get_auths(id,'dataset',#{userId}) as `privileges`
|
||||
get_auths(id,'dataset',#{userId}) as `privileges`, scene_id as pid
|
||||
from dataset_table
|
||||
<where>
|
||||
<if test="id != null">
|
||||
|
@ -1088,7 +1088,7 @@
|
||||
width="70%"
|
||||
class="dialog-css"
|
||||
>
|
||||
<table-selector @getTable="getTable" />
|
||||
<table-selector :checked-table="table" @getTable="getTable" />
|
||||
<p style="margin-top: 10px;color:#F56C6C;font-size: 12px;">{{ $t('chart.change_ds_tip') }}</p>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" @click="closeChangeChart">{{ $t('chart.cancel') }}</el-button>
|
||||
@ -2598,7 +2598,7 @@ export default {
|
||||
|
||||
.view-panel {
|
||||
display: flex;
|
||||
height: calc(100% - 80px);
|
||||
height: 100%;
|
||||
background-color: #f7f8fa;
|
||||
}
|
||||
|
||||
@ -2717,6 +2717,7 @@ span {
|
||||
}
|
||||
|
||||
.tab-header > > > .el-tabs__content {
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
|
||||
.draggable-group {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<de-container>
|
||||
<de-aside-container>
|
||||
<dataset-group-selector-tree :privileges="privileges" :mode="mode" :clear-empty-dir="clearEmptyDir" :type="type" :custom-type="customType" :show-mode="showMode" @getTable="getTable" />
|
||||
<dataset-group-selector-tree :checked-table="checkedTable" :privileges="privileges" :mode="mode" :clear-empty-dir="clearEmptyDir" :type="type" :custom-type="customType" :show-mode="showMode" @getTable="getTable" />
|
||||
</de-aside-container>
|
||||
<de-main-container>
|
||||
<dataset-table-data :table="table" />
|
||||
@ -54,6 +54,11 @@ export default {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
checkedTable: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -65,6 +70,7 @@ export default {
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.getTable(this.checkedTable)
|
||||
},
|
||||
methods: {
|
||||
getTable(table) {
|
||||
|
@ -38,6 +38,7 @@
|
||||
<div class="block" :style="treeStyle">
|
||||
<el-tree
|
||||
ref="datasetTreeRef"
|
||||
:current-node-key="checkedTable ? checkedTable.id : ''"
|
||||
:default-expanded-keys="expandedArray"
|
||||
:data="data"
|
||||
node-key="id"
|
||||
@ -133,6 +134,11 @@ export default {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
checkedTable: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -197,6 +203,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.treeNode()
|
||||
this.initExpand()
|
||||
},
|
||||
created() {
|
||||
},
|
||||
@ -218,6 +225,11 @@ export default {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
initExpand() {
|
||||
if (this.checkedTable && this.checkedTable.pid) {
|
||||
this.expandedArray.push(this.checkedTable.pid)
|
||||
}
|
||||
},
|
||||
treeNode(cache) {
|
||||
const modelInfo = localStorage.getItem('dataset-tree')
|
||||
const userCache = (modelInfo && cache)
|
||||
|
Loading…
Reference in New Issue
Block a user