From 073b17307feef4f9a3a269459446e6b25324e039 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期五, 17 五月 2024 16:26:34 +0800
Subject: [PATCH] -

---
 jcdm-ui/src/views/main/kb/stationTerminal/index.vue |   70 +++++++++++++++++++++++++++--------
 1 files changed, 54 insertions(+), 16 deletions(-)

diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
index 8a79962..d76b681 100644
--- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
+++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -298,6 +298,7 @@
 import {listWorkReport} from "@/api/main/om/workReport/workReport";
 import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
 import {
+  fistSetpNumber,
   listFormulaChild,
   noPageListFormulaChild,
   releaseCheck,
@@ -512,6 +513,26 @@
       console.log(this.formulaChildParams)
       noPageListFormulaChild(this.formulaChildParams).then(response => {
         this.formulaChildList = response.rows;
+        if (this.formulaChildList.length >0){
+          let pos = 0
+          const tempArr = this.formulaChildList.filter(x=> 'OK' === x.results)
+          if (tempArr.length>0){
+            pos = tempArr.length
+            this.$nextTick(() => {
+              let temp33 = document.getElementsByClassName('el-table__row')
+              console.log('temp33',temp33)
+              console.log('len',temp33.item(pos))
+              if (temp33.length > 0){
+                console.log('1111111111111111')
+                let arr = temp33[pos-1]
+                console.log('srr',arr)
+                arr.scrollIntoView({ block: 'center' })
+              }
+            })
+          }
+
+        }
+
       });
     },
     endClear(){
@@ -526,6 +547,8 @@
       this.workpieceInformation.productModel = null;
       this.workpieceInformation.productName = null;
       this.headContent.sfcCode = '';
+      this.headContent.yzSfcCode = '';
+      this.headContent.cardCode = '';
     },
     changeMenu(tab, event) {
       console.log(tab, event);
@@ -553,9 +576,9 @@
         this.workpieceInformation.productCode = rowsData.productCode;
         this.workpieceInformation.productModel = rowsData.productModel;
         this.workpieceInformation.productName = rowsData.productName;
-        this.timer = setInterval(() => {
-          this.workpieceInformation.beat++;
-        }, 1000);
+        // this.timer = setInterval(() => {
+        //   this.workpieceInformation.beat++;
+        // }, 1000);
       });
       this.getListFormulaChild()
       this.addOverStationCollection()
@@ -574,7 +597,7 @@
         inboundTime: new Date()
       }
       addPassingStationCollection(this.passingStationForm).then(response => {});
-      addBasicParameters(this.passingStationForm).then(response => {});
+      // addBasicParameters(this.passingStationForm).then(response => {});
     },
     exit() {
       if (this.ws) {
@@ -606,11 +629,12 @@
         if(this.headContent.processesCode === 'OP240'){
           this.onLineBinDing = true
         }
-        if(this.headContent.processesCode === 'OP250-1' || this.headContent.processesCode === 'OP250-2' || this.headContent.processesCode === 'OP250-3'){
+        if(this.headContent.processesCode === 'OP260'){
           this.showInput = true
         }
 
         console.log('璁剧疆宸ヤ綅缂栫爜' + this.headContent.processesCode)
+
       });
       this.conCom()
       console.log('websocket杩炴帴宸ヤ綅涓�' + this.headContent.processesCode)
@@ -619,10 +643,16 @@
       const self = this;
       this.ws.onopen = function (event) {
         this.$message('websocket杩炴帴鎴愬姛锛�');
+
       };
       this.ws.onmessage = function (event) {
         if (event.data === "IN") {
           self.cakeLamp.InPlace = 1;
+          console.log(self.headContent.processesCode);
+          const param = {
+            processesCode: self.headContent.processesCode,
+          }
+          fistSetpNumber(param).then(response => {});
         } else if (event.data === "IN0") {
           self.cakeLamp.InPlace = 0;
         } else if (event.data === "OUT") {
@@ -679,9 +709,9 @@
         console.log("涓插彛鏀跺埌鏁版嵁-------------------"+scanValue)
 
         if(this.headContent.sfcCode !== ''){
-          if(scanValue.includes("SS")){
+          if(scanValue.includes("P9900173252")){
             this.headContent.yzSfcCode = scanValue
-          }else if(scanValue.includes("CC")){
+          }else if(scanValue.includes("RSP01TE")){
             this.headContent.cardCode = scanValue
           }else {
             this.$message('鎵弿鐗╂枡缂栫爜'+scanValue);
@@ -692,22 +722,30 @@
           if(this.headContent.processesCode === 'OP240'){
             this.headContent.sfcCode = scanValue;
             this.queryParams.productNum = scanValue;
+            this.getList()
+            this.cakeLamp.scanFinish = 1
+            this.cakeLamp.startWork = 1
           }else {
             let param = {
               trolleyYard: scanValue
             }
             findBytrolleyYardGetOne(param).then(response => {
-              this.headContent.sfcCode = response.msg;
-              this.queryParams.productNum = response.msg;
-
+              if(response.msg !== '2'){
+                this.headContent.sfcCode = response.msg;
+                this.queryParams.productNum = response.msg;
+                this.$message('鎵爜璇嗗埆浜у搧搴忓垪鍙�'+scanValue);
+                // this.headContent.sfcCode = scanValue;
+                // this.queryParams.productNum = scanValue;
+                this.getList()
+                this.cakeLamp.scanFinish = 1
+                this.cakeLamp.startWork = 1
+              }else {
+                this.$message('娌℃湁搴忓垪鍙�'+scanValue);
+                return
+              }
             });
           }
-          this.$message('鎵爜璇嗗埆浜у搧搴忓垪鍙�'+scanValue);
-          // this.headContent.sfcCode = scanValue;
-          // this.queryParams.productNum = scanValue;
-          this.getList()
-          this.cakeLamp.scanFinish = 1
-          this.cakeLamp.startWork = 1
+
         }
 
       }

--
Gitblit v1.9.3