695593266@qq.com 10 ヶ月 前
コミット
5fce7a50df

+ 1 - 1
src/views/outsourcing/index.vue

@@ -95,7 +95,7 @@
 
           <el-link
             type="primary"
-            v-if="row.status == 1 && row.status == 2"
+            v-if="row.status == 1 || row.status == 2"
             :underline="false"
             @click="handleFlow(row)"
           >

+ 28 - 35
src/views/produce/components/feeding/index.vue

@@ -502,9 +502,28 @@
           code: 'default_executor'
         }).then((res) => {
           this.isDefaultExecutor = res.value == '1' ? true : false;
+
+          if (this.isDefaultExecutor) {
+            // this.setDefaultIdList();
+          }
         });
       },
 
+      setDefaultIdList() {
+        if (this.teamList.length != 0) {
+          this.teamId = this.teamList[0].id;
+          const index = this.teamList.findIndex(
+            (item) => item.id == this.teamId
+          );
+          this.teamUserList = this.teamAllList[index];
+          const res = this.teamUserList.find(
+            (it) => it.id == this.$store.state.user.info.userId
+          );
+
+          this.executorIdList.push(res.id);
+        }
+      },
+
       checkTeamList(id) {
         this.executorIdList = [];
         const index = this.teamList.findIndex((item) => item.id == id);
@@ -515,44 +534,18 @@
         const ids = id.split(',');
         this.teamList = [];
         this.teamUserList = [];
-        await ids.forEach((item) => {
-          getTeam(item).then((res) => {
-            this.teamList.push({
-              name: res.name,
-              id: res.id
-            });
+        const list = ids.map((item) => getTeam(item));
 
-            this.teamAllList.push(res.userVOList);
+        const dataList = await Promise.all(list);
+
+        dataList.forEach((item) => {
+          this.teamList.push({
+            name: item.name,
+            id: item.id
           });
+
+          this.teamAllList.push(item.userVOList);
         });
-        // const ids = id.split(',');
-        // this.teamList = [];
-        // this.teamUserList = [];
-        // const list = ids.map((item) => getTeam(item));
-
-        // const dataList = await Promise.all(list);
-
-        // dataList.forEach((item) => {
-        //   this.teamList.push({
-        //     name: item.name,
-        //     id: item.id
-        //   });
-
-        //   this.teamAllList.push(item.userVOList);
-        // });
-
-        // if (this.isDefaultExecutor) {
-        // if (this.teamList.length != 0) {
-        // this.teamId = this.teamList[0].id;
-        // const index = this.teamList.findIndex((item) => item.id == id);
-        // this.teamUserList = this.teamAllList[index];
-        // console.log(
-        //   this.teamAllList,
-        //   this.$store.state.user.info,
-        //   '22323232323'
-        // );
-        // }
-        // }
       },
 
       outboundOrder(id, item) {

+ 2 - 2
vue.config.js

@@ -33,9 +33,9 @@ module.exports = {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.116:18086',
-        // target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.103:18086',192.168.1.116
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',