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() } },