Commit 90e8b8b1 by 张杰

修复bug

1 parent 6cf28e8c
......@@ -175,7 +175,7 @@
<div v-loading="carLoading">
<el-form ref="carInfoForm" :model="carInfoForm" :rules="carInfoFormRules" label-width="140px">
<el-form-item label="请选择对应车辆:" prop="vehicleId">
<el-select class="a_select" v-model="carInfoForm.vehicleId">
<el-select class="a_select" v-model="carInfoForm.vehicleId" @change="onCarChange">
<el-option v-for="(item,index) in vehicleList" :key="index" :value="item.vehicleId" :label="item.vin"></el-option>
</el-select>
</el-form-item>
......@@ -708,6 +708,14 @@ export default {
_this.getList(1);
console.log(res);
},
// 监听车辆选择
onCarChange(e) {
console.log(e);
let list = this.vehicleList;
let n = list.find((k) => k.vehicleId == e);
this.currentVehicle = n || {};
},
},
};
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!