Commit cc029ea0 by 李伟康

fix(src/views/serviceCentre/examinationManagement/add.vue): 修复品牌选择清空后的参数残留问题

添加清空品牌选择时重置表单品牌数据的逻辑,同时初始化提交参数中的品牌字段避免残留旧数据
1 parent 19d706bc
Pipeline #247 for cc029ea0 failed in 0 seconds
...@@ -380,6 +380,11 @@ export default { ...@@ -380,6 +380,11 @@ export default {
}, },
methods: { methods: {
handleChangeBrandIds(val) { handleChangeBrandIds(val) {
if (!val.length) {
this.addForm.brandNames = [];
this.addForm.brandIds = [];
return;
}
let { carBrandList } = this.baseData; let { carBrandList } = this.baseData;
let brandNames = []; let brandNames = [];
val.forEach((item) => { val.forEach((item) => {
...@@ -588,6 +593,8 @@ export default { ...@@ -588,6 +593,8 @@ export default {
? Util.dateFormate(this.addForm.effectiveTime, "YYYY-MM-DD HH:mm:ss") ? Util.dateFormate(this.addForm.effectiveTime, "YYYY-MM-DD HH:mm:ss")
: "", : "",
levelExamLevels: this.$refs.addLevel.levels, levelExamLevels: this.$refs.addLevel.levels,
brandIds: "",
brandNames: "",
}; };
if (brandIds && brandIds.length && brandNames) { if (brandIds && brandIds.length && brandNames) {
params.brandIds = brandIds.join(","); params.brandIds = brandIds.join(",");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!