luobang 2 tahun lalu
induk
melakukan
f86a7c5319

+ 14 - 3
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -43,6 +43,15 @@
         v-if="activeName == 'first'"
         ><i class="el-icon-download"></i>Excel</el-button
       >
+      <el-button disabled>物资总件数</el-button>
+      <el-input
+        placeholder=""
+        v-model="matSum"
+        clearable
+        style="width:100px"
+        disabled
+      >
+      </el-input>
     </div>
     <div class="table">
       <el-tabs v-model="activeName" @tab-click="handleClick">
@@ -53,6 +62,7 @@
             ref="excelDom"
             @selection-change="selectionChange"
             :pageSize="200"
+            @func="func"
           >
             <el-table-column
               fixed="right"
@@ -212,7 +222,6 @@ export default {
           1,
           2,
           3,
-          7,
           8,
           9,
           10,
@@ -225,7 +234,8 @@ export default {
           17,
           18,
           20,
-          21
+          21,
+          22
         ]
       },
       option5: {
@@ -254,7 +264,8 @@ export default {
         ]
       },
       mapList: [],
-      mapItemList: []
+      mapItemList: [],
+      matSum: null
     };
   },
   created() {

+ 45 - 16
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -30,11 +30,13 @@
             ><i class="el-icon-search"></i>查询物资</el-button
           >
         </el-form-item>
-        <el-form-item
-          ><el-button type="primary" class="btn" @click="refresh">
-            <i class="el-icon-refresh"></i>刷新
-          </el-button></el-form-item
-        >
+        <el-form-item>
+          <el-badge :value="redDotNum" class="item">
+            <el-button type="primary" class="btn" @click="refresh">
+              <i class="el-icon-refresh"></i>刷新
+            </el-button>
+          </el-badge>
+        </el-form-item>
         <el-form-item
           ><el-button type="primary" class="btn" @click="allow">
             <i class="el-icon-d-arrow-right"></i>放行
@@ -252,35 +254,62 @@ export default {
       //物资信息查询内容
       materialNameText: null,
       materialSpecificationText: null,
-      materialModelText: null
+      materialModelText: null,
+      timer: null,
+      totalQueueNum: null,
+      redDotNum: null,
+      i: 0,
+      totalQueueNumFirst: null
     };
   },
   created() {
-    this.myWebsocket();
+    // this.myWebsocket();
   },
   mounted() {
+    this.i = 0;
     this.infomation();
     this.getSpellingArray();
     this.getNoSpellingArray();
     this.wantEnfactory();
+    this.start();
+  },
+  computed: {
+    wantS() {
+      return this.totalQueueNum;
+    }
+  },
+  beforeDestroy() {
+    this.timer;
+  },
+  watch: {
+    wantS() {
+      if (this.totalQueueNum - this.totalQueueNumFirst > 0) {
+        this.redDotNum = this.totalQueueNum - this.totalQueueNumFirst;
+      }
+    }
   },
-  // computed: {
-  //   wantS() {
-  //     return this.totalNoEntryTime;
-  //   }
-  // },
   methods: {
-    // myWebsocket() {
-    //   let wss = new WebSocket("wss:wl.dasteel.cn:32322/websocket/socketServer");
-    // },
     wantEnfactory() {
       this.axios.get("/api/v1/uc/getQueueCount").then(res => {
-        console.log(res.data);
+        this.totalQueueNum = res.data.data;
+        console.log(this.totalQueueNum, "totalQueueNum");
+        if (this.i == 0) {
+          this.totalQueueNumFirst = this.totalQueueNum;
+          console.log(this.totalQueueNumFirst, "totalQueuefIRST");
+        }
+        this.i++;
       });
     },
+    start() {
+      this.timer = setInterval(this.wantEnfactory, 60000);
+    },
     refresh() {
       this.getSpellingArray();
       this.getNoSpellingArray();
+      this.redDotNum = null;
+      this.totalQueueNumFirst = this.totalQueueNum;
+      clearInterval(this.timer);
+      this.start();
     },
     getRowKey(row) {
       return row.ROW_ID;