diff --git a/src/views/data/dataCataloguing.vue b/src/views/data/dataCataloguing.vue index 0a13d86..ff932e5 100644 --- a/src/views/data/dataCataloguing.vue +++ b/src/views/data/dataCataloguing.vue @@ -43,6 +43,35 @@
+ + + + + + {{ item }} + + + + + + + + + {{ item }} + + + + + + + + + {{ item.cnName }} + + + + + @@ -95,10 +124,14 @@ export default { }, queryParam: { tableName: "", + mdl:"", + hn:"", + schemaMass:"", tagId: "", pageNum: 1, pageSize: 9999999, }, + dataTypeList:[], datatagSources: [], dataRefsSources: [], dataSource: [ @@ -151,6 +184,9 @@ export default { selectedRowData: [], tagselectedRowData: [], tableScrollY: 0, + shipModel:[], + shipNumber:[], + existingDataTypes:{} } }, mounted() { @@ -191,7 +227,6 @@ export default { destroyed: function () { }, created() { - }, methods: { calculateScrollY() { @@ -200,6 +235,27 @@ export default { const paginationHeight = 64; // 根据实际分页栏高度调整 this.tableScrollY = container.clientHeight - paginationHeight; }, + 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 + }, + changehn(value) { + this.dataTypeList =this.existingDataTypes[this.queryParam.mdl][value] + this.queryParam.schemaMass = this.dataTypeList[0].cnName + this.queryParam.hn = value + }, handleSelectChange(selectedRowKeys, row) { this.selectedRowKeys = selectedRowKeys this.selectedRowData = row @@ -209,7 +265,7 @@ export default { this.tagselectedRowData = row }, gattable() { - this.getalltable(); + this.getselect(); this.gettagTables(); }, getdatatagSources() { @@ -286,6 +342,29 @@ export default { this.tagloading = false; }); }, + 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.getalltable() + } else { + this.$message.warning(res.message); + } + }); + }, } } diff --git a/src/views/data/dataCleansing.vue b/src/views/data/dataCleansing.vue index 519155e..fe8a8b9 100644 --- a/src/views/data/dataCleansing.vue +++ b/src/views/data/dataCleansing.vue @@ -3,13 +3,43 @@
-
- - - {{ d.cnName }} - -   - 数据管理 +
+ + + + + + + {{ item }} + + + + + + + + + {{ item }} + + + + + + + + + + + {{ item.cnName }} + + + + + + 数据管理 + + +
@@ -99,9 +129,9 @@ export default { percent: 0, websock: {}, datatypequeryParam: { - schemaMass: "", mdl: "", hn: "", + schemaMass: "", sourceType: 1 }, dataTypeList:[], @@ -191,16 +221,29 @@ export default { this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]] this.cleaningData.shipNumber = this.shipNumber[0] this.cleaningData.dataType = this.dataTypeList[0].enName - - this.datatypequeryParam.mdl = value - this.datatypequeryParam.hn = this.shipNumber[0] }, changeshipNumber(value) { this.dataTypeList =this.existingDataTypes[this.cleaningData.shipModel][value] this.cleaningData.shipNumber = value this.cleaningData.dataType = this.dataTypeList[0].enName - - this.datatypequeryParam.hn = value + }, + 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.datatypequeryParam.mdl = value + this.datatypequeryParam.hn = this.shipNumber[0] + this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName + this.getTables() + }, + changehn(value) { + this.dataTypeList =this.existingDataTypes[this.datatypequeryParam.mdl][value] + this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName + this.datatypequeryParam.hn = value + this.getTables() }, calculateScrollY() { // 获取父容器高度(需减去表格内其他元素的高度,如分页栏) @@ -262,6 +305,8 @@ export default { this.datatypequeryParam.mdl = this.shipModel[0] this.datatypequeryParam.hn = this.shipNumber[0] + this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName + this.getTables() } else { this.$message.warning(res.message); } diff --git a/src/views/data/dataManage.vue b/src/views/data/dataManage.vue index 5727db2..c879cfc 100644 --- a/src/views/data/dataManage.vue +++ b/src/views/data/dataManage.vue @@ -3,12 +3,43 @@
-
- - - {{ d.cnName }} - - +
+ + + + + + + {{ item }} + + + + + + + + + {{ item }} + + + + + + + + + + + {{ item.cnName }} + + + + + + 数据管理 + + +
@@ -97,9 +128,12 @@ percent:0, websock:{}, datatypequeryParam: { + mdl:"", + hn:"", schemaMass:"", sourceType:2 }, + dataTypeList:[], queryParam: { pageNum :1, pageSize:9999999, @@ -134,7 +168,10 @@ dataIndex: 'tagNames' }, ], - tableScrollY:0 + tableScrollY:0, + shipModel:[], + shipNumber:[], + existingDataTypes:{} } }, mounted() { @@ -154,12 +191,35 @@ }, methods: { + filterOption(input, option) { + return ( + option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 + ); + }, calculateScrollY() { // 获取父容器高度(需减去表格内其他元素的高度,如分页栏) const container = this.$refs.tableContainer; const paginationHeight = 64; // 根据实际分页栏高度调整 this.tableScrollY = container.clientHeight - paginationHeight; }, + 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.datatypequeryParam.mdl = value + this.datatypequeryParam.hn = this.shipNumber[0] + this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName + this.getTables() + }, + changehn(value) { + this.dataTypeList =this.existingDataTypes[this.datatypequeryParam.mdl][value] + this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName + this.datatypequeryParam.hn = value + this.getTables() + }, initWebSocket: function () { // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https var userId = store.getters.userInfo.id; @@ -199,15 +259,24 @@ } }); }, - getselect(){ + getselect() { getAction("/dataType/getExistingDataTypes", {}).then((res) => { if (res.success) { - console.log(res) - this.dataTypedataSources = res.result.result.standard - if(res.result.result.standard.length > 0){ - this.datatypequeryParam.schemaMass = res.result.result.standard[0].cnName - } - this.getTables(); + 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]] + + this.datatypequeryParam.mdl = this.shipModel[0] + this.datatypequeryParam.hn = this.shipNumber[0] + this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName + this.getTables() } else { this.$message.warning(res.message); }