forked from github/dataease
fix: 关联字段数据集及时刷新
This commit is contained in:
parent
fbb884bcbf
commit
2772d78e78
@ -163,16 +163,17 @@ export default {
|
|||||||
this.unionDataChange()
|
this.unionDataChange()
|
||||||
},
|
},
|
||||||
'table': function() {
|
'table': function() {
|
||||||
if (this.table && this.table.sceneId) {
|
// if (this.table && this.table.sceneId) {
|
||||||
post('dataset/group/getScene/' + this.table.sceneId, {}, false).then(response => {
|
// post('dataset/group/getScene/' + this.table.sceneId, {}, false).then(response => {
|
||||||
this.currGroup = response.data
|
// this.currGroup = response.data
|
||||||
|
//
|
||||||
this.$nextTick(function() {
|
// this.$nextTick(function() {
|
||||||
this.sceneMode = true
|
// this.sceneMode = true
|
||||||
this.tableTree()
|
// this.tableTree()
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
this.treeNode(this.groupForm)
|
||||||
},
|
},
|
||||||
search(val) {
|
search(val) {
|
||||||
this.$emit('switchComponent', { name: '' })
|
this.$emit('switchComponent', { name: '' })
|
||||||
@ -236,7 +237,7 @@ export default {
|
|||||||
this.tableData = []
|
this.tableData = []
|
||||||
if (this.currGroup) {
|
if (this.currGroup) {
|
||||||
this.dsLoading = true
|
this.dsLoading = true
|
||||||
this.tables = [];
|
this.tables = []
|
||||||
post('/dataset/table/list', {
|
post('/dataset/table/list', {
|
||||||
sort: 'type asc,name asc,create_time desc',
|
sort: 'type asc,name asc,create_time desc',
|
||||||
sceneId: this.currGroup.id,
|
sceneId: this.currGroup.id,
|
||||||
@ -247,7 +248,7 @@ export default {
|
|||||||
if (response.data[i].mode === 1 && this.kettleRunning === false) {
|
if (response.data[i].mode === 1 && this.kettleRunning === false) {
|
||||||
this.$set(response.data[i], 'disabled', true)
|
this.$set(response.data[i], 'disabled', true)
|
||||||
}
|
}
|
||||||
if(hasDataPermission(this.privileges, response.data[i].privileges)){
|
if (hasDataPermission(this.privileges, response.data[i].privileges)) {
|
||||||
this.tables.push(response.data[i])
|
this.tables.push(response.data[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -352,7 +353,7 @@ export default {
|
|||||||
if (!this.isTreeSearch) {
|
if (!this.isTreeSearch) {
|
||||||
if (node.data.id) {
|
if (node.data.id) {
|
||||||
this.dsLoading = true
|
this.dsLoading = true
|
||||||
this.tables = [];
|
this.tables = []
|
||||||
post('/dataset/table/listAndGroup', {
|
post('/dataset/table/listAndGroup', {
|
||||||
sort: 'type asc,name asc,create_time desc',
|
sort: 'type asc,name asc,create_time desc',
|
||||||
sceneId: node.data.id,
|
sceneId: node.data.id,
|
||||||
@ -364,7 +365,7 @@ export default {
|
|||||||
if (response.data[i].mode === 1 && this.kettleRunning === false) {
|
if (response.data[i].mode === 1 && this.kettleRunning === false) {
|
||||||
this.$set(response.data[i], 'disabled', true)
|
this.$set(response.data[i], 'disabled', true)
|
||||||
}
|
}
|
||||||
if(hasDataPermission(this.privileges, response.data[i].privileges)){
|
if (hasDataPermission(this.privileges, response.data[i].privileges)) {
|
||||||
this.tables.push(response.data[i])
|
this.tables.push(response.data[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
width="500"
|
width="500"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<dataset-group-selector-tree :fix-height="true" show-mode="union" :custom-type="customType" :mode="table.mode" @getTable="getTable" />
|
<dataset-group-selector-tree :fix-height="true" show-mode="union" :table="table" :custom-type="customType" :mode="table.mode" @getTable="getTable" />
|
||||||
<el-button slot="reference" size="mini" style="width: 100%;">
|
<el-button slot="reference" size="mini" style="width: 100%;">
|
||||||
<p class="table-name-css" :title="targetTable.name || $t('dataset.pls_slc_union_table')">{{ targetTable.name || $t('dataset.pls_slc_union_table') }}</p>
|
<p class="table-name-css" :title="targetTable.name || $t('dataset.pls_slc_union_table')">{{ targetTable.name || $t('dataset.pls_slc_union_table') }}</p>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -206,6 +206,8 @@ export default {
|
|||||||
if (this.table.id) {
|
if (this.table.id) {
|
||||||
if (this.table.mode === 0) {
|
if (this.table.mode === 0) {
|
||||||
this.customType = ['db']
|
this.customType = ['db']
|
||||||
|
} else {
|
||||||
|
this.customType = ['db', 'sql', 'excel']
|
||||||
}
|
}
|
||||||
post('dataset/union/listByTableId/' + this.table.id, {}).then(response => {
|
post('dataset/union/listByTableId/' + this.table.id, {}).then(response => {
|
||||||
// console.log(response)
|
// console.log(response)
|
||||||
|
Loading…
Reference in New Issue
Block a user