数据编目等级联

This commit is contained in:
hekaiyu 2025-06-22 10:38:15 +08:00
parent 741f5f306e
commit 343a00d27e
3 changed files with 222 additions and 29 deletions

View File

@ -43,6 +43,35 @@
<a-col :md="11" style="padding:0 20px;"> <a-col :md="11" style="padding:0 20px;">
<div class="linese"></div> <div class="linese"></div>
<a-form layout="inline" @keyup.enter.native="getalltable" style="margin-top: 10px;padding:10px; background: #e6e9f1;"> <a-form layout="inline" @keyup.enter.native="getalltable" style="margin-top: 10px;padding:10px; background: #e6e9f1;">
<a-row :gutter="24">
<a-col :md="8" >
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.mdl" @change="changemdl">
<a-select-option v-for="item in shipModel" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.hn" @change="changehn">
<a-select-option v-for="item in shipNumber" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass">
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="20" :sm="1"> <a-col :md="20" :sm="1">
<a-form-item label="关键词"> <a-form-item label="关键词">
@ -95,10 +124,14 @@ export default {
}, },
queryParam: { queryParam: {
tableName: "", tableName: "",
mdl:"",
hn:"",
schemaMass:"",
tagId: "", tagId: "",
pageNum: 1, pageNum: 1,
pageSize: 9999999, pageSize: 9999999,
}, },
dataTypeList:[],
datatagSources: [], datatagSources: [],
dataRefsSources: [], dataRefsSources: [],
dataSource: [ dataSource: [
@ -151,6 +184,9 @@ export default {
selectedRowData: [], selectedRowData: [],
tagselectedRowData: [], tagselectedRowData: [],
tableScrollY: 0, tableScrollY: 0,
shipModel:[],
shipNumber:[],
existingDataTypes:{}
} }
}, },
mounted() { mounted() {
@ -191,7 +227,6 @@ export default {
destroyed: function () { destroyed: function () {
}, },
created() { created() {
}, },
methods: { methods: {
calculateScrollY() { calculateScrollY() {
@ -200,6 +235,27 @@ export default {
const paginationHeight = 64; // const paginationHeight = 64; //
this.tableScrollY = container.clientHeight - paginationHeight; 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) { handleSelectChange(selectedRowKeys, row) {
this.selectedRowKeys = selectedRowKeys this.selectedRowKeys = selectedRowKeys
this.selectedRowData = row this.selectedRowData = row
@ -209,7 +265,7 @@ export default {
this.tagselectedRowData = row this.tagselectedRowData = row
}, },
gattable() { gattable() {
this.getalltable(); this.getselect();
this.gettagTables(); this.gettagTables();
}, },
getdatatagSources() { getdatatagSources() {
@ -286,6 +342,29 @@ export default {
this.tagloading = false; 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);
}
});
},
} }
} }
</script> </script>

View File

@ -3,13 +3,43 @@
<a-col :md="14"> <a-col :md="14">
<div class="linese"></div> <div class="linese"></div>
<!-- 查询区域 --> <!-- 查询区域 -->
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;"> <div class="table-page-search-wrapper" style="padding:10px;">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;"> <a-form layout="inline">
<a-select-option v-for="d in dataTypeList" :key="d.cnName"> <a-row :gutter="24">
{{ d.cnName }} <a-col :md="12">
</a-select-option> <a-form-item label="型号">
</a-select>&nbsp; <a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.mdl" @change="changemdl">
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button> <a-select-option v-for="item in shipModel" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="12">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.hn" @change="changehn">
<a-select-option v-for="item in shipNumber" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="12">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" v-model="datatypequeryParam.schemaMass">
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="12">
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
</a-col>
</a-row>
</a-form>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div ref="tableContainer" style="height:calc(100vh - 347px);background: #e6e9f1;padding:10px;"> <div ref="tableContainer" style="height:calc(100vh - 347px);background: #e6e9f1;padding:10px;">
@ -99,9 +129,9 @@ export default {
percent: 0, percent: 0,
websock: {}, websock: {},
datatypequeryParam: { datatypequeryParam: {
schemaMass: "",
mdl: "", mdl: "",
hn: "", hn: "",
schemaMass: "",
sourceType: 1 sourceType: 1
}, },
dataTypeList:[], dataTypeList:[],
@ -191,16 +221,29 @@ export default {
this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]] this.dataTypeList =this.existingDataTypes[value][this.shipNumber[0]]
this.cleaningData.shipNumber = this.shipNumber[0] this.cleaningData.shipNumber = this.shipNumber[0]
this.cleaningData.dataType = this.dataTypeList[0].enName this.cleaningData.dataType = this.dataTypeList[0].enName
this.datatypequeryParam.mdl = value
this.datatypequeryParam.hn = this.shipNumber[0]
}, },
changeshipNumber(value) { changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.cleaningData.shipModel][value] this.dataTypeList =this.existingDataTypes[this.cleaningData.shipModel][value]
this.cleaningData.shipNumber = value this.cleaningData.shipNumber = value
this.cleaningData.dataType = this.dataTypeList[0].enName 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() { calculateScrollY() {
// //
@ -262,6 +305,8 @@ export default {
this.datatypequeryParam.mdl = this.shipModel[0] this.datatypequeryParam.mdl = this.shipModel[0]
this.datatypequeryParam.hn = this.shipNumber[0] this.datatypequeryParam.hn = this.shipNumber[0]
this.datatypequeryParam.schemaMass = this.dataTypeList[0].cnName
this.getTables()
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }

View File

@ -3,12 +3,43 @@
<a-col :md="14" > <a-col :md="14" >
<div class="linese"></div> <div class="linese"></div>
<!-- 查询区域 --> <!-- 查询区域 -->
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;"> <div class="table-page-search-wrapper" style="padding:10px;">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;"> <a-form layout="inline">
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName"> <a-row :gutter="24">
{{ d.cnName }} <a-col :md="12">
</a-select-option> <a-form-item label="型号">
</a-select> <a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.mdl" @change="changemdl">
<a-select-option v-for="item in shipModel" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="12">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="datatypequeryParam.hn" @change="changehn">
<a-select-option v-for="item in shipNumber" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="12">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" @change="getTables" v-model="datatypequeryParam.schemaMass">
<a-select-option v-for="item in dataTypeList" :value="item.cnName">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="12">
<a-button @click="openlink('sjgl://test')" type="primary">数据管理</a-button>
</a-col>
</a-row>
</a-form>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div ref="tableContainer" style="height:calc(100vh - 347px);background:rgb(230, 233, 241);padding:10px;"> <div ref="tableContainer" style="height:calc(100vh - 347px);background:rgb(230, 233, 241);padding:10px;">
@ -97,9 +128,12 @@
percent:0, percent:0,
websock:{}, websock:{},
datatypequeryParam: { datatypequeryParam: {
mdl:"",
hn:"",
schemaMass:"", schemaMass:"",
sourceType:2 sourceType:2
}, },
dataTypeList:[],
queryParam: { queryParam: {
pageNum :1, pageNum :1,
pageSize:9999999, pageSize:9999999,
@ -134,7 +168,10 @@
dataIndex: 'tagNames' dataIndex: 'tagNames'
}, },
], ],
tableScrollY:0 tableScrollY:0,
shipModel:[],
shipNumber:[],
existingDataTypes:{}
} }
}, },
mounted() { mounted() {
@ -154,12 +191,35 @@
}, },
methods: { methods: {
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
calculateScrollY() { calculateScrollY() {
// //
const container = this.$refs.tableContainer; const container = this.$refs.tableContainer;
const paginationHeight = 64; // const paginationHeight = 64; //
this.tableScrollY = container.clientHeight - paginationHeight; 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 () { initWebSocket: function () {
// WebSocketwshttpwsshttps // WebSocketwshttpwsshttps
var userId = store.getters.userInfo.id; var userId = store.getters.userInfo.id;
@ -199,15 +259,24 @@
} }
}); });
}, },
getselect(){ getselect() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => { getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) { if (res.success) {
console.log(res) this.existingDataTypes = res.result.result.standard
this.dataTypedataSources = res.result.result.standard var ship = Object.keys(this.existingDataTypes)
if(res.result.result.standard.length > 0){ ship.forEach((element, index) => {
this.datatypequeryParam.schemaMass = res.result.result.standard[0].cnName this.shipModel.push(element);
} });
this.getTables(); 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 { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }