diff --git a/src/views/data/dataCataloguing.vue b/src/views/data/dataCataloguing.vue index 602a4ef..5992081 100644 --- a/src/views/data/dataCataloguing.vue +++ b/src/views/data/dataCataloguing.vue @@ -2,11 +2,11 @@ - + - + {{ d.tagName }} @@ -30,6 +30,7 @@ - + @@ -72,6 +73,7 @@ size="middle" :row-selection="rowSelection" bordered + :loading="loading" :rowKey="getRowKey" :pagination="false" :scroll="{ y: 800 }" @@ -122,6 +124,8 @@ import get from 'lodash.get' dataRefsSources:[], dataSource:[ ], + tagloading:false, + loading:false, columns: [ { title: '表名', @@ -215,13 +219,16 @@ import get from 'lodash.get' this.tagselectedRowKeys = selectedRowKeys this.tagselectedRowData = row }, + gattable(){ + this.getalltable(); + this.gettagTables(); + }, getdatatagSources(){ idcTableTaglist(this.tagqueryParam).then((res) => { if (res.success) { this.datatagSources = res.result.records; this.queryRefsParam.tagId = res.result.records[0].id; - this.getalltable(); - this.gettagTables(); + this.gattable(); } else { this.$message.warning(res.message); } @@ -234,6 +241,7 @@ import get from 'lodash.get' } }); }, + addtag(){ var that = this; this.selectedRowData.forEach(item => { @@ -243,8 +251,7 @@ import get from 'lodash.get' "schemaName": item.schemaName }).then((res) => { if (res.success) { - that.getalltable(); - that.gettagTables(); + that.gattable(); } else { that.$message.warning(res.message); } @@ -256,8 +263,7 @@ import get from 'lodash.get' this.tagselectedRowKeys.forEach(item => { idcTableTagRefdelete({id: item}).then((res) => { if (res.success) { - that.getalltable(); - that.gettagTables(); + that.gattable(); } else { that.$message.warning(res.message); } @@ -266,21 +272,25 @@ import get from 'lodash.get' }, getalltable(){ this.queryParam.tagId = this.queryRefsParam.tagId + this.loading = true; getAllTable(this.queryParam).then((res) => { if (res.success) { this.dataSource = res.result; } else { this.$message.warning(res.message); } + this.loading = false; }); }, gettagTables(){ + this.tagloading = true; getTableTagRefs(this.queryRefsParam).then((res) => { if (res.success) { this.dataRefsSources = res.result.records; } else { this.$message.warning(res.message); } + this.tagloading = false; }); }, }