问题修改

This commit is contained in:
hekaiyu 2025-06-22 02:49:24 +08:00
parent 714f22247b
commit 8858f4f8a5
6 changed files with 55 additions and 29 deletions

View File

@ -5,7 +5,7 @@
<!-- 查询区域 --> <!-- 查询区域 -->
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;"> <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 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"> <a-select-option v-for="d in dataTypeList" :key="d.cnName">
{{ d.cnName }} {{ d.cnName }}
</a-select-option> </a-select-option>
</a-select>&nbsp; </a-select>&nbsp;
@ -100,6 +100,8 @@ export default {
websock: {}, websock: {},
datatypequeryParam: { datatypequeryParam: {
schemaMass: "", schemaMass: "",
mdl: "",
hn: "",
sourceType: 1 sourceType: 1
}, },
dataTypeList:[], dataTypeList:[],
@ -189,11 +191,16 @@ 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
}, },
calculateScrollY() { calculateScrollY() {
// //
@ -252,6 +259,9 @@ export default {
this.cleaningData.shipModel = this.shipModel[0] this.cleaningData.shipModel = this.shipModel[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 = this.shipModel[0]
this.datatypequeryParam.hn = this.shipNumber[0]
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }

View File

@ -202,9 +202,10 @@
getselect(){ 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 console.log(res)
if(res.result.result.DATA_CONN_STANDARD.length > 0){ this.dataTypedataSources = res.result.result.standard
this.datatypequeryParam.schemaMass = res.result.result.DATA_CONN_STANDARD[0].cnName if(res.result.result.standard.length > 0){
this.datatypequeryParam.schemaMass = res.result.result.standard[0].cnName
} }
this.getTables(); this.getTables();
} else { } else {

View File

@ -79,7 +79,7 @@
{ {
title: '数据类型', title: '数据类型',
align: "center", align: "center",
dataIndex: 'tableMessName', dataIndex: 'schemaDesc',
customRender: () => { customRender: () => {
return this.datatypequeryParam.schemaDesc; return this.datatypequeryParam.schemaDesc;
} }
@ -109,10 +109,10 @@
getselect(){ getselect(){
getAction("/dataType/getExistingDataTypes", {}).then((res) => { getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) { if (res.success) {
this.dataTypedataSources = res.result.result.DATA_CONN_SPECIAL this.dataTypedataSources = res.result.result.special
if(res.result.result.DATA_CONN_SPECIAL.length > 0){ if(res.result.result.special.length > 0){
this.datatypequeryParam.schemaMass = res.result.result.DATA_CONN_SPECIAL[0].enName this.datatypequeryParam.schemaMass = res.result.result.special[0].enName
this.datatypequeryParam.schemaDesc = res.result.result.DATA_CONN_SPECIAL[0].cnName this.datatypequeryParam.schemaDesc = res.result.result.special[0].cnName
} }
this.getTables(); this.getTables();
} else { } else {

View File

@ -14,7 +14,7 @@
<a-form-item label="数据类型"> <a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass" <a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.schemaMass"
@change="handleTypeChange"> @change="handleTypeChange">
<a-select-option v-for="d in dataTypedataSources" :key="d.cnName"> <a-select-option v-for="d in dataTypedataSources" :key="d.enName">
{{ d.cnName }} {{ d.cnName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -110,8 +110,9 @@ export default {
activeTaskId: null, activeTaskId: null,
// //
queryParam: { queryParam: {
sourceType: 2, sourceType: 3,
schemaMass: null, schemaMass: null,
schemaDesc: null,
massKey: null massKey: null
}, },
pagination: { pagination: {
@ -124,6 +125,7 @@ export default {
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize) onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
}, },
tableParams: { tableParams: {
sourceType: 3,
schemaMass: null, schemaMass: null,
tableName: null, tableName: null,
startTime: null, startTime: null,
@ -194,7 +196,8 @@ export default {
if (res.success) { if (res.success) {
this.dataTypedataSources = res.result.result.special this.dataTypedataSources = res.result.result.special
if (res.result.result.special.length > 0) { if (res.result.result.special.length > 0) {
this.queryParam.schemaMass = res.result.result.special[0].cnName this.queryParam.schemaMass = res.result.result.special[0].enName
this.queryParam.schemaDesc = res.result.result.special[0].cnName
} }
this.getMetaDataTypeTree(); this.getMetaDataTypeTree();
} else { } else {
@ -234,7 +237,7 @@ export default {
this.treeDate.push({ this.treeDate.push({
key: 'type_' + index, key: 'type_' + index,
type: 'parentType', type: 'parentType',
title: element, title: this.queryParam.schemaDesc,
children: childrenList children: childrenList
}) })
}); });
@ -242,12 +245,17 @@ export default {
}) })
}, },
handleTypeChange(value) { handleTypeChange(value) {
const selectedOption = this.dataTypedataSources.find(
(d) => d.enName === this.queryParam.schemaMass
)
this.queryParam.schemaDesc = selectedOption?selectedOption.cnName:""
this.queryParam.schemaMass = value this.queryParam.schemaMass = value
this.getMetaDataTypeTree() this.getMetaDataTypeTree()
}, },
onSelect(selectedKeys, info) { onSelect(selectedKeys, info) {
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 = this.queryParam.schemaMass
this.tableParams.tableName = info.node.dataRef.key this.tableParams.tableName = info.node.dataRef.key
this.getTableDataList() this.getTableDataList()
} }
@ -275,7 +283,6 @@ export default {
this.$refs.editdataseachForm.initForm(this.tableParams.schemaMass, this.tableParams.tableName, filteredColumn, record); this.$refs.editdataseachForm.initForm(this.tableParams.schemaMass, this.tableParams.tableName, filteredColumn, record);
}, },
getTableDataList() { getTableDataList() {
console.log(this.tableParams)
if (this.tableParams.schemaMass == null || this.tableParams.tableName == null) { if (this.tableParams.schemaMass == null || this.tableParams.tableName == null) {
this.$message.warning('必须选择查询的表') this.$message.warning('必须选择查询的表')
return return

View File

@ -218,20 +218,23 @@ export default {
); );
}, },
changeshipModel(value) { changeshipModel(value) {
this.queryParam.shipModel = value this.queryParam.shipModel = value
var number = Object.keys(this.existingDataTypes[value]) var number = Object.keys(this.existingDataTypes[value])
this.shipNumber = [] this.shipNumber = []
number.forEach((element, index) => { number.forEach((element, index) => {
this.shipNumber.push(element); this.shipNumber.push(element);
}); });
this.dataTypeList = this.existingDataTypes[value][this.shipNumber[0]] this.dataTypeList = this.existingDataTypes[value][this.shipNumber[0]]
this.queryParam.mdl = this.shipNumber[0] this.queryParam.mdl = value
this.queryParam.schemaMass = this.dataTypeList[0].cnName this.queryParam.hn = this.shipNumber[0]
this.queryParam.schemaMass = this.dataTypeList[0].cnName
this.getMetaDataTypeTree()
}, },
changeshipNumber(value) { changeshipNumber(value) {
this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value] this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.mdl = value this.queryParam.hn = value
this.queryParam.schemaMass = this.dataTypeList[0].cnName this.queryParam.schemaMass = this.dataTypeList[0].cnName
this.getMetaDataTypeTree()
}, },
getselect() { getselect() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => { getAction("/dataType/getExistingDataTypes", {}).then((res) => {
@ -246,6 +249,8 @@ export default {
this.shipNumber.push(element); this.shipNumber.push(element);
}); });
this.dataTypeList = this.existingDataTypes[this.shipModel[0]][this.shipNumber[0]] 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.mdl = this.shipModel[0]
this.queryParam.hn = this.shipNumber[0] this.queryParam.hn = this.shipNumber[0]
this.queryParam.schemaMass = this.dataTypeList[0].cnName this.queryParam.schemaMass = this.dataTypeList[0].cnName

View File

@ -225,13 +225,16 @@ export default {
this.shipNumber.push(element); this.shipNumber.push(element);
}); });
this.dataTypeList = this.existingDataTypes[value][this.shipNumber[0]] this.dataTypeList = this.existingDataTypes[value][this.shipNumber[0]]
this.queryParam.mdl = this.shipNumber[0] this.queryParam.mdl = value
this.queryParam.hn = this.shipNumber[0]
this.queryParam.schemaMass = this.dataTypeList[0].cnName this.queryParam.schemaMass = this.dataTypeList[0].cnName
this.getMetaDataTypeTree()
}, },
changeshipNumber(value) { changeshipNumber(value) {
this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value] this.dataTypeList = this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.mdl = value this.queryParam.hn = value
this.queryParam.schemaMass = this.dataTypeList[0].cnName this.queryParam.schemaMass = this.dataTypeList[0].cnName
this.getMetaDataTypeTree()
}, },
getselect() { getselect() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => { getAction("/dataType/getExistingDataTypes", {}).then((res) => {