|
|
@@ -105,6 +105,13 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
+ "form.workShop": {
|
|
|
+ handler(newVal) {
|
|
|
+ if (newVal) {
|
|
|
+ this.imgsrc = localStorage.getItem("img");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
// 监听父组件传递的数据
|
|
|
sopProps: {
|
|
|
handler(newVal, oldVal) {
|
|
|
@@ -127,7 +134,7 @@ export default {
|
|
|
});
|
|
|
// 调用 Vuex action 来存储 selectSopPoints
|
|
|
this.setSelectSopPoints(selectSopPoints);
|
|
|
-
|
|
|
+
|
|
|
this.setSopEdit(true);
|
|
|
console.log(selectSopPoints, "sop_selectePoints");
|
|
|
});
|
|
|
@@ -160,7 +167,7 @@ export default {
|
|
|
// 调用 Vuex action 来存储 selectSopPoints
|
|
|
this.setSelectSopPoints(selectSopPoints);
|
|
|
this.setPointTableData(res.data);
|
|
|
-
|
|
|
+
|
|
|
this.setSopEdit(false);
|
|
|
console.log(selectSopPoints, "sop_selectePoints");
|
|
|
});
|
|
|
@@ -187,7 +194,6 @@ export default {
|
|
|
"setSelectSopPoints",
|
|
|
"setPointTableData",
|
|
|
"setSopEdit",
|
|
|
-
|
|
|
]),
|
|
|
|
|
|
// 获取车间列表
|
|
|
@@ -223,6 +229,7 @@ export default {
|
|
|
const selectedWorkshop = this.workShopOptions.find(
|
|
|
(item) => item.value === value
|
|
|
);
|
|
|
+ localStorage.setItem("img", selectedWorkshop.attr1);
|
|
|
if (selectedWorkshop) {
|
|
|
this.imgsrc = selectedWorkshop.attr1;
|
|
|
} else {
|