feat(fix):关联视图限制,非直连数据库统一完成一次同步后才能关联

This commit is contained in:
junjie 2021-06-16 18:29:00 +08:00
parent 72bf2bcf5a
commit 8852fba90f

View File

@ -92,7 +92,7 @@
width="500"
trigger="click"
>
<dataset-group-selector :mode="1" @getTable="getTable" />
<dataset-group-selector :custom-type="customType" :mode="1" @getTable="getTable" />
<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>
</el-button>
@ -161,7 +161,8 @@ export default {
editUnion: false,
sourceFieldOption: [],
targetFieldOption: [],
targetTable: {}
targetTable: {},
customType: ['db', 'sql', 'excel']
}
},
watch: {
@ -191,11 +192,22 @@ export default {
},
showUnionEdit() {
this.union.sourceTableId = this.table.id
fieldList(this.table.id).then(response => {
this.sourceFieldOption = response.data
//
post('/dataset/table/checkDorisTableIsExists/' + this.table.id, {}, true).then(response => {
if (response.data) {
this.union.sourceTableId = this.table.id
fieldList(this.table.id).then(response => {
this.sourceFieldOption = response.data
})
this.editUnion = true
} else {
this.$message({
type: 'error',
message: this.$t('dataset.invalid_table_check'),
showClose: true
})
}
})
this.editUnion = true
},
saveUnion() {
// console.log(this.union)