数据编目等级联

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;">
<div class="linese"></div>
<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-col :md="20" :sm="1">
<a-form-item label="关键词">
@ -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);
}
});
},
}
}
</script>

View File

@ -3,13 +3,43 @@
<a-col :md="14">
<div class="linese"></div>
<!-- 查询区域 -->
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;">
<a-select-option v-for="d in dataTypeList" :key="d.cnName">
{{ d.cnName }}
<div class="table-page-search-wrapper" style="padding:10px;">
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="12">
<a-form-item label="型号">
<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>&nbsp;
</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>
<!-- table区域-begin -->
<div ref="tableContainer" style="height:calc(100vh - 347px);background: #e6e9f1;padding:10px;">
@ -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
},
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);
}

View File

@ -3,12 +3,43 @@
<a-col :md="14" >
<div class="linese"></div>
<!-- 查询区域 -->
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaMass" @change="getTables" style="width: 40%;">
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName">
{{ d.cnName }}
<div class="table-page-search-wrapper" style="padding:10px;">
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="12">
<a-form-item label="型号">
<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>
<!-- table区域-begin -->
<div ref="tableContainer" style="height:calc(100vh - 347px);background:rgb(230, 233, 241);padding:10px;">
@ -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 () {
// WebSocketwshttpwsshttps
var userId = store.getters.userInfo.id;
@ -202,12 +262,21 @@
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);
}