Explorar el Código

修改工位bug

695593266@qq.com hace 1 mes
padre
commit
c2bd35bb84
Se han modificado 2 ficheros con 11 adiciones y 8 borrados
  1. 9 6
      src/views/factoryModel/station/components/edit.vue
  2. 2 2
      vue.config.js

+ 9 - 6
src/views/factoryModel/station/components/edit.vue

@@ -470,9 +470,9 @@
     },
     data() {
       return {
-        defaultForm,
         // 表单数据
-        form: defaultForm(),
+        form: defaultForm.call(this),
+        clientEnvironmentId: this.$store.state.user.info.clientEnvironmentId,
 
         factoryList: [],
         workshopPlanList: [],
@@ -660,14 +660,17 @@
 
       async open(type, row) {
         this.type = type;
+        this.form = defaultForm.call(this);
         this.visible = true;
         if (type == 'edit' || type == 'copy') {
           for (const key of Object.keys(this.form)) {
             if (key !== 'extInfo') {
               this.form[key] = row[key];
             } else {
-              for (const el of Object.keys(this.form.extInfo)) {
-                this.form.extInfo[el] = row.extInfo[el];
+              if (row.extInfo) {
+                for (const el of Object.keys(this.form.extInfo)) {
+                  this.form.extInfo[el] = row.extInfo[el];
+                }
               }
             }
           }
@@ -786,7 +789,7 @@
         });
       },
       restForm() {
-        this.form = { ...this.defaultForm() };
+        this.form = { ...defaultForm.call(this) };
         this.$nextTick(() => {
           this.$refs.form.clearValidate();
         });
@@ -927,7 +930,7 @@
               res.tMainFactoryWorkstationOperationAddPOList
             );
           });
-          const baseForm = defaultForm();
+          const baseForm = defaultForm.call(this);
 
           this.form = {
             ...baseForm,

+ 2 - 2
vue.config.js

@@ -39,8 +39,8 @@ module.exports = {
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18186',
-        target: 'http://192.168.1.125:18086',
-        // target: 'http://192.168.1.251:18186', // 测试环境
+        // target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.251:18186', // 测试环境
         // target: 'http://192.168.1.251:18087',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.251:18086',