|
@@ -8,6 +8,7 @@
|
|
@delOne="delOne"
|
|
@delOne="delOne"
|
|
:getListApi="getListApi"
|
|
:getListApi="getListApi"
|
|
:showName="showName"
|
|
:showName="showName"
|
|
|
|
+ :curOne="curOne"
|
|
></model-list>
|
|
></model-list>
|
|
|
|
|
|
<div class="contentPanel">
|
|
<div class="contentPanel">
|
|
@@ -383,8 +384,8 @@ export default {
|
|
share: "", // 分享
|
|
share: "", // 分享
|
|
// vehicleImage: "", // 对应的图片相对地址
|
|
// vehicleImage: "", // 对应的图片相对地址
|
|
id: "",
|
|
id: "",
|
|
- vehicleFrontView:"", // 对应的图片相对地址
|
|
|
|
- vehicleTopView:"", // 对应的图片相对地址
|
|
|
|
|
|
+ vehicleFrontView: "", // 对应的图片相对地址
|
|
|
|
+ vehicleTopView: "", // 对应的图片相对地址
|
|
},
|
|
},
|
|
vehicleTypeList: [],
|
|
vehicleTypeList: [],
|
|
vehicleModelList: [],
|
|
vehicleModelList: [],
|
|
@@ -563,6 +564,11 @@ export default {
|
|
},
|
|
},
|
|
modelLabelList: [],
|
|
modelLabelList: [],
|
|
modelImgSrc: "",
|
|
modelImgSrc: "",
|
|
|
|
+ // 用于当前选中项的展示
|
|
|
|
+ curOne: {
|
|
|
|
+ share: "",
|
|
|
|
+ id: "",
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -587,13 +593,17 @@ export default {
|
|
res.info.vehicleFrontView
|
|
res.info.vehicleFrontView
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ this.curOne = {
|
|
|
|
+ share: res.info.share,
|
|
|
|
+ id: res.info.id,
|
|
|
|
+ };
|
|
} else {
|
|
} else {
|
|
this.$message.error(res.message || "获取失败");
|
|
this.$message.error(res.message || "获取失败");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
save(isAdd) {
|
|
save(isAdd) {
|
|
- // console.log(this.form);
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
this.$refs.form.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
// 判断是否新增
|
|
// 判断是否新增
|
|
@@ -611,8 +621,14 @@ export default {
|
|
if (res.code == 200 && res.info) {
|
|
if (res.code == 200 && res.info) {
|
|
this.form.id = res.info.id;
|
|
this.form.id = res.info.id;
|
|
this.form.share = res.info.share;
|
|
this.form.share = res.info.share;
|
|
|
|
+ this.form.vehicleCode = res.info.vehicleCode;
|
|
this.$message.success("保存成功");
|
|
this.$message.success("保存成功");
|
|
this.$refs.modelList.getList();
|
|
this.$refs.modelList.getList();
|
|
|
|
+
|
|
|
|
+ this.curOne = {
|
|
|
|
+ share: res.info.share,
|
|
|
|
+ id: res.info.id,
|
|
|
|
+ };
|
|
} else {
|
|
} else {
|
|
this.$message.error(res.message || "保存失败");
|
|
this.$message.error(res.message || "保存失败");
|
|
}
|
|
}
|
|
@@ -628,9 +644,13 @@ export default {
|
|
this.form.share = "";
|
|
this.form.share = "";
|
|
this.form.id = "";
|
|
this.form.id = "";
|
|
this.modelImgSrc = "";
|
|
this.modelImgSrc = "";
|
|
|
|
+
|
|
|
|
+ this.curOne = {
|
|
|
|
+ share: "",
|
|
|
|
+ id: "",
|
|
|
|
+ };
|
|
},
|
|
},
|
|
delOne(id) {
|
|
delOne(id) {
|
|
- // console.log(id,this.form.id);return
|
|
|
|
this.$axios({
|
|
this.$axios({
|
|
method: "post",
|
|
method: "post",
|
|
url: this.$api.modelLibrary.delVehicleById,
|
|
url: this.$api.modelLibrary.delVehicleById,
|
|
@@ -644,6 +664,13 @@ export default {
|
|
if (this.form.id && id === this.form.id) {
|
|
if (this.form.id && id === this.form.id) {
|
|
this.addOne();
|
|
this.addOne();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (id === this.curOne.id) {
|
|
|
|
+ this.curOne = {
|
|
|
|
+ share: "",
|
|
|
|
+ id: "",
|
|
|
|
+ };
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.$message.error(res.message || "删除失败");
|
|
this.$message.error(res.message || "删除失败");
|
|
}
|
|
}
|
|
@@ -687,7 +714,6 @@ export default {
|
|
return src;
|
|
return src;
|
|
},
|
|
},
|
|
modelLabelChange() {
|
|
modelLabelChange() {
|
|
- // console.log(this.$refs.cascader.getCheckedNodes(true)[0].data.vo);
|
|
|
|
Object.assign(
|
|
Object.assign(
|
|
this.form,
|
|
this.form,
|
|
this.$refs.cascader.getCheckedNodes(true)[0].data.vo
|
|
this.$refs.cascader.getCheckedNodes(true)[0].data.vo
|