This commit is contained in:
libing 2024-01-11 21:43:11 +08:00
parent 3cdea7131c
commit 58c4836c5d

View File

@ -92,13 +92,13 @@
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="transLine">
<el-select v-model="queryParams.trans_line" placeholder="所属线路" clearable>
<el-form-item label="" prop="transLineCode">
<el-select v-model="queryParams.transLineCode" placeholder="所属线路" clearable>
<el-option
v-for="dict in translineIdsOptions"
:key="dict.label"
:key="dict.value"
:label="dict.label"
:value="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
@ -268,7 +268,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="所属国家" prop="country">
<el-select v-model="form.country" placeholder="所属国家" clearable filterable>
<el-select v-model="form.country" placeholder="所属国家" @change="handleCountrySelectionChange" clearable filterable>
<el-option
v-for="item in countryIdsOptions"
v-bind:key="item.label"
@ -279,13 +279,13 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所属线路" prop="transLine">
<el-select v-model="form.transLine" placeholder="所属线路" clearable filterable>
<el-form-item label="所属线路" prop="transLineCode">
<el-select v-model="form.transLineCode" placeholder="所属线路" clearable filterable>
<el-option
v-for="item in translineIdsOptions"
v-bind:key="item.label"
v-for="item in translineInnerIdsOptions"
v-bind:key="item.value"
v-bind:label="item.label"
v-bind:value="item.label"
v-bind:value="item.value"
/>
</el-select>
</el-form-item>
@ -386,6 +386,7 @@ export default {
return {
// 遮罩层
loading: true,
currentId:null,
// 选中数组
ids: [],
// 非单个禁用
@ -403,6 +404,7 @@ export default {
countryTree:[],
countryIdsOptions:[],
translineIdsOptions:[],
translineInnerIdsOptions:[],
countryName:null,
// 弹出层标题
title: "",
@ -435,6 +437,13 @@ export default {
prodNameEn: null,
country:null,
},
queryParamsInner: {
country:null,
},
defaultProps: {
children: "children",
label: "label"
},
// 表单参数
form: {},
// 表单校验
@ -487,9 +496,23 @@ export default {
created() {
this.getList();
this.getCountryList();
this.getTranslineList();
//this.getTranslineList();
},
methods: {
handleCountrySelectionChange(country){
if(country==""){
this.translineInnerIdsOptions = [];
return;
}
this.queryParamsInner.country = country;
listEmisTransLine(this.queryParamsInner).then(response => {
this.translineInnerIdsOptions = [];
response.rows.forEach(item =>{
var optItem={value:item.lineCode,label:item.lineName};
this.translineInnerIdsOptions.push(optItem);
});
});
},
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.prodName + '"产品类型吗?').then(function() {
@ -524,7 +547,7 @@ export default {
listEmisTransLine(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
this.translineIdsOptions = [];
response.rows.forEach(item =>{
var optItem={value:item.id,label:item.lineName};
var optItem={value:item.lineCode,label:item.lineName};
this.translineIdsOptions.push(optItem)
});
@ -605,6 +628,7 @@ export default {
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.getTranslineList();
},
/** 重置按钮操作 */
resetQuery() {