ysy 1 an în urmă
părinte
comite
9d4140b5b2
2 a modificat fișierele cu 15 adăugiri și 13 ștergeri
  1. 13 11
      src/views/factoryModel/productionLine/components/edit.vue
  2. 2 2
      vue.config.js

+ 13 - 11
src/views/factoryModel/productionLine/components/edit.vue

@@ -362,9 +362,7 @@
         this.toTreeData(nval);
       }
     },
-    created() {
-      this.getBasicAreaList();
-    },
+
     data() {
       const defaultForm = {
         id: '',
@@ -453,6 +451,7 @@
       }
     },
     created() {
+      this.getBasicAreaList();
       this.getFactoryList();
     },
     methods: {
@@ -533,16 +532,19 @@
       },
       /* 获取区域集合 */
       async getBasicAreaList() {
-        this.areaList = await basicAreaPageAPI({
+      this.areaList = await basicAreaPageAPI(
+        {
           pageNum: 1,
           size: 9999
-        });
-        this.areaTreeList = this.$util.toTreeData({
-          data: this.areaList,
-          idField: 'id',
-          parentIdField: 'parentId'
-        });
-      },
+        }
+      )
+      this.areaTreeList = this.$util.toTreeData({
+        data: this.areaList,
+        idField: 'id',
+        parentIdField: 'parentId'
+      });
+
+    },
       getAreaInfo(nodeInfo) {
         this.form.areaName = nodeInfo[0]?.pathLabels.join('/') || '';
         this.form.areaId = this.form.areaId || '';

+ 2 - 2
vue.config.js

@@ -31,10 +31,10 @@ module.exports = {
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
-        // target: 'http://192.168.1.124:50001',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.147:18086',
         // target: 'http://192.168.1.176:18086',
-        target: 'http://192.168.1.105:18086',
+        // target: 'http://192.168.1.105:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {