提交参数新增

This commit is contained in:
RenCheng 2025-06-21 18:28:13 +08:00
parent ee03e5a5c5
commit c4f6ae6dd1
22 changed files with 670 additions and 168 deletions

2
public/config.js vendored
View File

@ -1,4 +1,4 @@
window.AppConfig = {
systemTitle: '末端数据接入处理系统',
apiUrl: 'http://pbl1.natapp1.cc/jeecg-boot'
apiUrl: 'http://pbl.natapp1.cc/jeecg-boot'
}

View File

@ -10,6 +10,24 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
@ -19,7 +37,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
@ -75,10 +93,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -114,7 +134,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -131,16 +154,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(value) {
this.queryParam.dataType = value
this.getQueryPage()
@ -168,11 +223,10 @@ export default {
},
handleEdit(record) {
console.log('编辑', this.queryParam.dataType)
// this.$refs.modalForm.eidt(record, this.queryParam.dataType);
// this.$refs.modalForm.title = "";
this.$refs.subPage.queryParam.tableName = record.tableName
this.$refs.subPage.queryParam.schemaName = record.schemaName
this.$refs.subPage.shipModel = this.queryParam.shipModel
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
this.$refs.subPage.datetypeF = this.queryParam.dataType
this.$refs.subPage.title = "配置";
this.$refs.subPage.pagevisible = true

View File

@ -70,8 +70,8 @@ export default {
// this.loadData();
},
methods: {
getQuerytableColumns(dataType, tableName) {
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
if (res.code == 200) {
this.treeData = []
res.result.forEach(element => {
@ -91,8 +91,8 @@ export default {
}
},
add(schemaName,tableName, dataType) {
this.getQuerytableColumns(dataType, tableName)
add(schemaName,tableName, dataType,shipModel,shipNumber) {
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
this.form = {
tableName: tableName,
transfFileds: null,
@ -102,7 +102,7 @@ export default {
this.checkedList = []
this.visible = true;
},
eidt(record, dataType1) {
eidt(record, dataType,shipModel,shipNumber) {
if (record.id) {
queryById({ id: record.id }).then(res => {
if (res.code == 200) {
@ -119,7 +119,7 @@ export default {
schemaName:record.schemaName
}
}
this.getQuerytableColumns(dataType1, record.tableName)
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
this.visible = true;
},
close() {

View File

@ -59,8 +59,11 @@ export default {
title: '',
datetypeF: '',
pagevisible: false,
shipModel:'',
shipNumber:'',
queryParam: {
tableName: null
tableName: null,
schemaName:null
},
dataSource: [],
columns: [
@ -117,11 +120,11 @@ export default {
})
},
handleAdd() {
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "新增";
},
handleEdit(record) {
this.$refs.modalForm.eidt(record, this.datetypeF);
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "编辑";
},
handleRemove(recordId) {

View File

@ -10,16 +10,34 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
<a-select-option v-for="item in dataTypeList" :value="item.enName">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
@ -75,10 +93,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -114,7 +134,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -131,16 +154,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(value) {
this.queryParam.dataType = value
this.getQueryPage()
@ -173,6 +228,8 @@ export default {
// this.$refs.modalForm.title = "";
this.$refs.subPage.queryParam.tableName = record.tableName
this.$refs.subPage.queryParam.schemaName = record.schemaName
this.$refs.subPage.shipModel = this.queryParam.shipModel
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
this.$refs.subPage.datetypeF = this.queryParam.dataType
this.$refs.subPage.title = "配置";
this.$refs.subPage.pagevisible = true

View File

@ -77,8 +77,8 @@ export default {
// this.loadData();
},
methods: {
getQuerytableColumns(dataType, tableName) {
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
if (res.code == 200) {
this.treeData = []
res.result.forEach(element => {
@ -98,8 +98,8 @@ export default {
}
},
add(schemaName,tableName, dataType) {
this.getQuerytableColumns(dataType, tableName)
add(schemaName,tableName, dataType,shipModel,shipNumber) {
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
this.form = {
tableName: tableName,
columnName: null,
@ -109,7 +109,7 @@ export default {
}
this.visible = true;
},
eidt(record, dataType1) {
eidt(record, dataType,shipModel,shipNumber) {
console.log('sfdsafa',record, dataType1)
if (record.id) {
queryById({ id: record.id }).then(res => {
@ -125,7 +125,7 @@ export default {
schemaName:record.schemaName
}
}
this.getQuerytableColumns(dataType1, record.tableName)
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
this.visible = true;
},
close() {

View File

@ -62,8 +62,11 @@ export default {
title: '',
datetypeF: '',
pagevisible: false,
shipModel:'',
shipNumber:'',
queryParam: {
tableName: null
tableName: null,
schemaName:null
},
dataSource: [],
columns: [
@ -126,11 +129,11 @@ export default {
})
},
handleAdd() {
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "新增";
},
handleEdit(record) {
this.$refs.modalForm.eidt(record, this.datetypeF);
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "编辑";
},
handleRemove(recordId) {

View File

@ -10,6 +10,24 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
@ -19,7 +37,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
@ -80,10 +98,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -136,7 +156,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -153,16 +176,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(value) {
this.queryParam.dataType = value
this.getQueryPage()
@ -189,11 +244,11 @@ export default {
})
},
handleAdd() {
this.$refs.modalForm.add(this.queryParam.dataType);
this.$refs.modalForm.add(this.queryParam);
this.$refs.modalForm.title = "新增";
},
handleEdit(record) {
this.$refs.modalForm.eidt(record, this.queryParam.dataType);
this.$refs.modalForm.eidt(record, this.queryParam);
this.$refs.modalForm.title = "配置";
},
handleRemove(recordId) {

View File

@ -83,7 +83,7 @@ export default {
},
methods: {
getQuerytableColumns(dataType, tableName) {
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
querytableColumns({ dataType: dataType.dataType, tableName: tableName,shipModel:dataType.shipModel,shipNumber:dataType.shipNumber }).then(res => {
if (res.code == 200) {
this.treeData = []
res.result.forEach(element => {

View File

@ -10,24 +10,36 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
<a-select-option v-for="item in dataTypeList" :value="item.enName">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名" v-decorator="['msgName',{
rules: [
{ required: true, message: '报文名不能为空' },
{ min: 1, max: 60, message: '长度1-60位' },
],
validateTrigger: 'change'
}]" v-model="queryParam.msgName" allow-clear></a-input>
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
@ -82,10 +94,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -160,7 +174,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -177,16 +194,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(value) {
this.queryParam.dataType = value
this.getQueryPage()

View File

@ -10,6 +10,24 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
@ -19,17 +37,17 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-col :md="4" :sm="24">
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
</a-col>
<a-col :md="6" :sm="24" style="text-align: right;">
<!-- <a-col :md="4" :sm="24" style="text-align: right;">
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
</a-col>
</a-col> -->
</a-row>
</a-form>
</div>
@ -80,10 +98,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -130,7 +150,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -147,16 +170,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(key) {
this.queryParam.dataType = key
this.getQueryPage()
@ -183,11 +238,11 @@ export default {
})
},
handleAdd() {
this.$refs.modalForm.add(this.queryParam.dataType);
this.$refs.modalForm.add(this.queryParam);
this.$refs.modalForm.title = "新增";
},
handleEdit(record) {
this.$refs.modalForm.eidt(record, this.queryParam.dataType);
this.$refs.modalForm.eidt(record, this.queryParam);
this.$refs.modalForm.title = "配置";
},
handleRemove(recordId) {

View File

@ -69,7 +69,7 @@ export default {
},
methods: {
getQuerytableColumns(dataType) {
getTables({dataType: dataType}).then(res => {
getTables({dataType: dataType.dataType,shipModel:dataType.shipModel,shipNumber:dataType.shipNumber}).then(res => {
if (res.code == 200) {
this.treeData = []
res.result.forEach(element => {

View File

@ -10,6 +10,24 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
@ -19,9 +37,9 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
@ -75,10 +93,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -114,7 +134,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -131,16 +154,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(value) {
this.queryParam.dataType = value
this.getQueryPage()
@ -173,6 +228,8 @@ export default {
// this.$refs.modalForm.title = "";
this.$refs.subPage.queryParam.tableName = record.tableName
this.$refs.subPage.queryParam.schemaName = record.schemaName
this.$refs.subPage.shipModel = this.queryParam.shipModel
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
this.$refs.subPage.datetypeF = this.queryParam.dataType
this.$refs.subPage.title = "配置";
this.$refs.subPage.pagevisible = true

View File

@ -79,8 +79,8 @@ export default {
created() {
},
methods: {
getQuerytableColumns(dataType, tableName) {
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
if (res.code == 200) {
this.treeData = []
res.result.forEach(element => {
@ -93,7 +93,7 @@ export default {
}
})
},
add(schemaName,tableName, dataType) {
add(schemaName,tableName, dataType,shipModel,shipNumber) {
this.form = {
tableName: tableName,
strategy: null,
@ -104,9 +104,9 @@ export default {
},
this.visible = true;
this.dataType = dataType
this.getQuerytableColumns(dataType, tableName)
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
},
eidt(record, dataType) {
eidt(record, dataType,shipModel,shipNumber) {
if (record.id) {
queryById({ id: record.id }).then(res => {
if (res.code == 200) {
@ -124,7 +124,7 @@ export default {
schemaName:record.schemaName
}
}
this.getQuerytableColumns(dataType, record.tableName)
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
this.visible = true;
},

View File

@ -61,8 +61,11 @@ export default {
title: '',
datetypeF: '',
pagevisible: false,
shipModel:'',
shipNumber:'',
queryParam: {
tableName: null
tableName: null,
schemaName:null
},
dataSource: [],
columns: [
@ -129,11 +132,11 @@ export default {
})
},
handleAdd() {
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "新增";
},
handleEdit(record) {
this.$refs.modalForm.eidt(record, this.datetypeF);
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "编辑";
},
handleRemove(recordId) {

View File

@ -10,6 +10,24 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
@ -19,7 +37,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
@ -75,10 +93,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -114,7 +134,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -131,16 +154,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(value) {
this.queryParam.dataType = value
this.getQueryPage()
@ -173,6 +228,8 @@ export default {
// this.$refs.modalForm.title = "";
this.$refs.subPage.queryParam.tableName = record.tableName
this.$refs.subPage.queryParam.schemaName = record.schemaName
this.$refs.subPage.shipModel = this.queryParam.shipModel
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
this.$refs.subPage.datetypeF = this.queryParam.dataType
this.$refs.subPage.title = "配置";
this.$refs.subPage.pagevisible = true

View File

@ -78,8 +78,8 @@ export default {
// this.loadData();
},
methods: {
getQuerytableColumns(dataType, tableName) {
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
if (res.code == 200) {
this.treeData = []
res.result.forEach(element => {
@ -99,8 +99,8 @@ export default {
}
},
add(schemaName,tableName, dataType) {
this.getQuerytableColumns(dataType, tableName)
add(schemaName,tableName, dataType,shipModel,shipNumber) {
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
this.form = {
tableName: tableName,
field: null,
@ -111,7 +111,7 @@ export default {
this.checkedList = []
this.visible = true;
},
eidt(record, dataType1) {
eidt(record, dataType,shipModel,shipNumber) {
if (record.id) {
queryById({ id: record.id }).then(res => {
if (res.code == 200) {
@ -128,7 +128,7 @@ export default {
schemaName:record.schemaName
}
}
this.getQuerytableColumns(dataType1, record.tableName)
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
this.visible = true;
},
close() {

View File

@ -63,8 +63,11 @@ export default {
title: '',
datetypeF: '',
pagevisible: false,
shipModel:'',
shipNumber:'',
queryParam: {
tableName: null
tableName: null,
schemaName:null
},
dataSource: [],
columns: [
@ -126,12 +129,12 @@ export default {
}
})
},
handleAdd() {
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
handleAdd() {
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "新增";
},
handleEdit(record) {
this.$refs.modalForm.eidt(record, this.datetypeF);
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "编辑";
},
handleRemove(recordId) {

View File

@ -10,6 +10,24 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
@ -19,9 +37,9 @@
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
<a-input placeholder="请输入报文名" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
@ -75,10 +93,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -114,7 +134,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -131,16 +154,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(value) {
this.queryParam.dataType = value
this.getQueryPage()
@ -173,6 +228,8 @@ export default {
// this.$refs.modalForm.title = "";
this.$refs.subPage.queryParam.tableName = record.tableName
this.$refs.subPage.queryParam.schemaName = record.schemaName
this.$refs.subPage.shipModel = this.queryParam.shipModel
this.$refs.subPage.shipNumber = this.queryParam.shipNumber
this.$refs.subPage.datetypeF = this.queryParam.dataType
this.$refs.subPage.title = "配置";
this.$refs.subPage.pagevisible = true

View File

@ -80,8 +80,8 @@ export default {
created() {
},
methods: {
getQuerytableColumns(dataType, tableName) {
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
getQuerytableColumns(dataType, tableName,shipModel,shipNumber) {
querytableColumns({ dataType: dataType, tableName: tableName,shipModel:shipModel,shipNumber:shipNumber }).then(res => {
if (res.code == 200) {
this.treeData = []
res.result.forEach(element => {
@ -97,7 +97,7 @@ export default {
handleChange(value) {
this.getQuerytableColumns(this.dataType, this.form.tableName)
},
add(schemaName,tableName, dataType) {
add(schemaName,tableName, dataType,shipModel,shipNumber) {
this.form = {
id: null,
tableName: tableName,
@ -108,9 +108,9 @@ export default {
this.dataType = dataType
this.checkedList =[]
this.visible = true;
this.getQuerytableColumns(dataType, tableName)
this.getQuerytableColumns(dataType, tableName,shipModel,shipNumber)
},
eidt(record, dataType) {
eidt(record, dataType,shipModel,shipNumber) {
this.form = {
id: null,
tableName: record.tableName,
@ -127,7 +127,7 @@ export default {
})
}
this.dataType = dataType
this.getQuerytableColumns(dataType, record.tableName)
this.getQuerytableColumns(dataType, record.tableName,shipModel,shipNumber)
this.visible = true;
},
close() {

View File

@ -117,11 +117,11 @@ export default {
})
},
handleAdd() {
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF);
this.$refs.modalForm.add(this.queryParam.schemaName,this.queryParam.tableName, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "新增";
},
handleEdit(record) {
this.$refs.modalForm.eidt(record, this.datetypeF);
this.$refs.modalForm.eidt(record, this.datetypeF,this.shipModel,this.shipNumber);
this.$refs.modalForm.title = "编辑";
},
handleRemove(recordId) {

View File

@ -10,24 +10,36 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="型号">
<a-select placeholder="选择型号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipModel" @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="8">
<a-form-item label="舷号">
<a-select placeholder="选择舷号" option-filter-prop="children" show-search :filter-option="filterOption" v-model="queryParam.shipNumber" @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="6" :sm="8">
<a-form-item label="数据类型">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
<a-select placeholder="选择数据类型" option-filter-prop="children" v-model="queryParam.dataType" @change="handleTypeChange">
<a-select-option v-for="item in dataTypeList" :value="item.enName">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-col :md="4" :sm="8">
<a-form-item label="报文名">
<a-input placeholder="请输入报文名" v-decorator="['msgName',{
rules: [
{ required: true, message: '报文名不能为空' },
{ min: 1, max: 60, message: '长度1-60位' },
],
validateTrigger: 'change'
}]" v-model="queryParam.msgName" allow-clear></a-input>
<a-input placeholder="请输入报文名称" v-model="queryParam.msgName" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
@ -82,10 +94,12 @@ export default {
loading: false,
//
queryParam: {
dataType: 'biandui',
dataType: '',
msgName: null,
pageNum: 1,
pageSize: 10
pageSize: 10,
shipModel:'',
shipNumber:''
},
pagination: {
defaultCurrent: 1, //
@ -160,7 +174,10 @@ export default {
align: "center",
scopedSlots: { customRender: 'action' },
},
]
],
shipModel:[],
shipNumber:[],
existingDataTypes:{}
}
},
@ -177,16 +194,48 @@ export default {
getDataType() {
getAction("/dataType/getExistingDataTypes", {}).then((res) => {
if (res.success) {
this.dataTypeList = res.result.result.DATA_CONN_ORIGINAL
if(res.result.result.DATA_CONN_ORIGINAL.length > 0){
this.queryParam.dataType = res.result.result.DATA_CONN_ORIGINAL[0].enName
}
this.getQueryPage()
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.shipModel = this.shipModel[0]
this.queryParam.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
} else {
this.$message.warning(res.message);
this.$message.warning(res.message);
}
});
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
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.shipNumber = this.shipNumber[0]
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
changeshipNumber(value) {
this.dataTypeList =this.existingDataTypes[this.queryParam.shipModel][value]
this.queryParam.shipNumber = value
this.queryParam.dataType = this.dataTypeList[0].enName
this.getQueryPage()
},
handleTypeChange(value) {
this.queryParam.dataType = value
this.getQueryPage()