This commit is contained in:
linfso 2024-01-12 16:59:06 +08:00
commit 8297e1a99e

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"
@ -280,12 +280,16 @@
</el-col>
<el-col :span="8">
<el-form-item label="所属线路" prop="transLineCode">
<<<<<<< HEAD
<el-select v-model="form.transLine" placeholder="所属线路" clearable filterable>
=======
<el-select v-model="form.transLineCode" placeholder="所属线路" clearable filterable>
>>>>>>> 58c4836c5dfd38d07e5fe0365c7806e4c5cb6e9c
<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 +390,7 @@ export default {
return {
// 遮罩层
loading: true,
currentId:null,
// 选中数组
ids: [],
// 非单个禁用
@ -403,6 +408,7 @@ export default {
countryTree:[],
countryIdsOptions:[],
translineIdsOptions:[],
translineInnerIdsOptions:[],
countryName:null,
// 弹出层标题
title: "",
@ -435,6 +441,13 @@ export default {
prodNameEn: null,
country:null,
},
queryParamsInner: {
country:null,
},
defaultProps: {
children: "children",
label: "label"
},
// 表单参数
form: {},
// 表单校验
@ -487,9 +500,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 +551,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 +632,7 @@ export default {
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.getTranslineList();
},
/** 重置按钮操作 */
resetQuery() {