diff --git a/src/views/data/dataIndexing.vue b/src/views/data/dataIndexing.vue index 524b1a7..3ecfeb3 100644 --- a/src/views/data/dataIndexing.vue +++ b/src/views/data/dataIndexing.vue @@ -10,11 +10,32 @@ - + + + + + {{ item }} + + + + + + + + + {{ item }} + + + + + - - - {{ d.cnName }} + + + {{ item.cnName }} @@ -78,6 +99,8 @@ export default { // 查询条件 queryParam: { sourceType: 2, + mdl: null, // 型号 + hn: null, // 舷号 schemaMass: null, massKey: null }, @@ -127,6 +150,10 @@ export default { // } ], dataTypedataSources:[], + dataTypeList: [], + shipModel: [], + shipNumber: [], + existingDataTypes: {} } }, watch: { @@ -144,14 +171,44 @@ export default { this.getselect(); }, methods: { - getselect(){ + changeshipModel(value) { + this.queryParam.shipModel = 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() + }, + changeshipNumber(value) { + this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value] + this.queryParam.hn = value + this.queryParam.schemaMass = this.dataTypeList[0].cnName + this.getMetaDataTypeTree() + }, + getselect() { getAction("/dataType/getExistingDataTypes", {}).then((res) => { if (res.success) { - this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD - if(res.result.result.DATA_CONN_STANDARD.length > 0){ - this.queryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName - } - this.getMetaDataTypeTree(); + this.existingDataTypes = res.result.result.standard + 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]] + console.log(this.existingDataTypes) + console.log(this.dataTypeList) + 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); } @@ -221,6 +278,8 @@ 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.mdl = this.queryParam.mdl + this.tableParams.hn = this.queryParam.hn this.getTableIndexList() } },