From 876299cb9f4128e42969a2a6a9950f293ab7981c Mon Sep 17 00:00:00 2001 From: hekaiyu <13673834656@163.com> Date: Sun, 22 Jun 2025 10:54:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=85=83=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/metadata.vue | 138 +++++++++++++++++++++++++----------- 1 file changed, 97 insertions(+), 41 deletions(-) diff --git a/src/views/data/metadata.vue b/src/views/data/metadata.vue index a6bbce4..0b6b3d8 100644 --- a/src/views/data/metadata.vue +++ b/src/views/data/metadata.vue @@ -2,30 +2,44 @@
- - - - - - - - - - - - - {{ d.cnName }} - - - - - - - - - - - + + + + + + + {{ item }} + + + + + + + + + {{ item }} + + + + + + + + + + + {{ item.cnName }} + + + + + + + + + + +
@@ -69,15 +83,18 @@ export default { return { loading: false, // 查询条件 - queryParam: { - sourceType: 1, - schemaMass: null, - massKey: null - }, tableParams: { schemaMass: null, tableName: null }, + queryParam: { + mdl:"", + hn:"", + schemaMass:"", + sourceType:1, + massKey: null + }, + dataTypeList:[], treeDate: [], dataSource: [], columns: [ @@ -114,6 +131,9 @@ export default { } ], dataTypedataSources:[], + shipModel:[], + shipNumber:[], + existingDataTypes:{} } }, watch: { @@ -131,18 +151,51 @@ export default { this.getselect() }, methods: { - getselect(){ - getAction("/dataType/getExistingDataTypes", {}).then((res) => { - if (res.success) { - this.dataTypedataSources = res.result.result.DATA_CONN_ORIGINAL - if(res.result.result.DATA_CONN_ORIGINAL.length > 0){ - this.queryParam.schemaMass = res.result.result.DATA_CONN_ORIGINAL[0].cnName - } - this.getMetaDataTypeTree(); - } else { - this.$message.warning(res.message); - } - }); + filterOption(input, option) { + return ( + option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 + ); + }, + changemdl(value) { + var number = Object.keys(this.existingDataTypes[value]) + this.shipNumber = [] + number.forEach((element, index) => { + this.shipNumber.push(element); + }); + this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]] + this.queryParam.mdl = value + this.queryParam.hn = this.shipNumber[0] + this.queryParam.schemaMass = this.dataTypeList[0].cnName + this.getMetaDataTypeTree() + }, + changehn(value) { + this.dataTypeList =this.existingDataTypes[this.queryParam.mdl][value] + this.queryParam.schemaMass = this.dataTypeList[0].cnName + this.queryParam.hn = value + this.getMetaDataTypeTree() + }, + getselect() { + getAction("/dataType/getExistingDataTypes", {}).then((res) => { + if (res.success) { + this.existingDataTypes = res.result.result.original + var ship = Object.keys(this.existingDataTypes) + ship.forEach((element, index) => { + this.shipModel.push(element); + }); + var number = Object.keys(this.existingDataTypes[this.shipModel[0]]) + number.forEach((element, index) => { + this.shipNumber.push(element); + }); + this.dataTypeList =this.existingDataTypes[this.shipModel[0]][this.shipNumber[0]] + + this.queryParam.mdl = this.shipModel[0] + this.queryParam.hn = this.shipNumber[0] + this.queryParam.schemaMass = this.dataTypeList[0].cnName + this.getMetaDataTypeTree() + } else { + this.$message.warning(res.message); + } + }); }, getMetaDataTypeTree() { metaViewDataTypeTree(this.queryParam).then(res => { @@ -177,6 +230,9 @@ export default { if (info.node.dataRef.type && info.node.dataRef.type == 'childern') { this.tableParams.schemaMass = info.node.$parent.dataRef.title this.tableParams.tableName = info.node.dataRef.key + this.tableParams.tableName = info.node.dataRef.key + this.tableParams.mdl = this.queryParam.mdl + this.tableParams.hn = this.queryParam.hn this.getMetaDatalist() } }, From 5af481c9ac8951beb98d756ac8c06c4d7e27a1c8 Mon Sep 17 00:00:00 2001 From: hekaiyu <13673834656@163.com> Date: Sun, 22 Jun 2025 11:37:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BC=96=E7=9B=AE=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/dataCataloguing.vue | 1 + src/views/dataSearch/sourceDatabase/index.vue | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/views/data/dataCataloguing.vue b/src/views/data/dataCataloguing.vue index ff932e5..5ba709e 100644 --- a/src/views/data/dataCataloguing.vue +++ b/src/views/data/dataCataloguing.vue @@ -333,6 +333,7 @@ export default { }, gettagTables() { this.tagloading = true; + this.queryParam.tagId = this.queryRefsParam.tagId getTableTagRefs(this.queryRefsParam).then((res) => { if (res.success) { this.dataRefsSources = res.result; diff --git a/src/views/dataSearch/sourceDatabase/index.vue b/src/views/dataSearch/sourceDatabase/index.vue index fd7b304..ea5539d 100644 --- a/src/views/dataSearch/sourceDatabase/index.vue +++ b/src/views/dataSearch/sourceDatabase/index.vue @@ -58,6 +58,15 @@ format="YYYY-MM-DD HH:mm:ss" @change="onChangeTime" /> + + + + + {{ d.tagName }} + + + + @@ -113,6 +122,7 @@ import moment from 'moment'; import tablelist from '../../data/modules/tablelist.vue' import exptable from '../../data/modules/exptable.vue' import editdataseach from '../../data/modules/editdataseach.vue' +import {idcTableTaglist} from "@api/tag"; export default { name: "metadata", @@ -141,6 +151,7 @@ export default { // 查询条件 queryParam: { sourceType: 1, + tagId: null, massKey: null, mdl: null, // 型号 hn: null, // 舷号 @@ -151,12 +162,18 @@ export default { pageSize: 10, pageNum: 1 }, + tagqueryParam: { + pageNum: 1, + pageSize: 20, + tagName: "" + }, treeDate: [], dataSource: [], columns: [], dataTypeList: [], shipModel: [], shipNumber: [], + datatagSources: [], existingDataTypes: {}, treeHeight: 0 } @@ -176,6 +193,7 @@ export default { created() { this.getselect() this.queryAllTask() + this.getdatatagSources() // this.initDate() }, methods: { @@ -217,6 +235,16 @@ export default { option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ); }, + getdatatagSources() { + idcTableTaglist(this.tagqueryParam).then((res) => { + if (res.success) { + this.datatagSources = res.result.records; + this.queryParam.tagId = res.result.records[0].id; + } else { + this.$message.warning(res.message); + } + }); + }, changeshipModel(value) { this.queryParam.shipModel = value var number = Object.keys(this.existingDataTypes[value])