索引管理

This commit is contained in:
hekaiyu 2025-06-22 12:36:15 +08:00
parent 1b158f81d7
commit acfba1cc5f

View File

@ -10,11 +10,32 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="8"> <a-col :md="4" :sm="4">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search
:filter-option="filterOption" v-model="queryParam.mdl" @change="changeshipModel">
<a-select-option v-for="item in shipModel" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="4" :sm="4">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search
:filter-option="filterOption" v-model="queryParam.hn" @change="changeshipNumber">
<a-select-option v-for="item in shipNumber" :value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="4" :sm="4">
<a-form-item label="数据类型"> <a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass" @change="handleTypeChange"> <a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass"
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName"> @change="handleTypeChange">
{{ d.cnName }} <a-select-option v-for="item in dataTypeList" :value="item.cnName">
{{ item.cnName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@ -78,6 +99,8 @@ export default {
// //
queryParam: { queryParam: {
sourceType: 2, sourceType: 2,
mdl: null, //
hn: null, //
schemaMass: null, schemaMass: null,
massKey: null massKey: null
}, },
@ -127,6 +150,10 @@ export default {
// } // }
], ],
dataTypedataSources:[], dataTypedataSources:[],
dataTypeList: [],
shipModel: [],
shipNumber: [],
existingDataTypes: {}
} }
}, },
watch: { watch: {
@ -144,14 +171,44 @@ export default {
this.getselect(); this.getselect();
}, },
methods: { 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) => { getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) { if (res.success) {
this.dataTypedataSources = res.result.result.DATA_CONN_STANDARD this.existingDataTypes = res.result.result.standard
if(res.result.result.DATA_CONN_STANDARD.length > 0){ var ship = Object.keys(this.existingDataTypes)
this.queryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName ship.forEach((element, index) => {
} this.shipModel.push(element);
this.getMetaDataTypeTree(); });
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 { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
@ -221,6 +278,8 @@ export default {
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') { if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
this.tableParams.schemaMass = info.node.$parent.dataRef.title 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.getTableIndexList() this.getTableIndexList()
} }
}, },