From c5e9c5922da7de2bf6df6dce42e7162dbe5cdd2d Mon Sep 17 00:00:00 2001
From: 懒羊羊 <15939171744@163.com>
Date: 星期五, 12 四月 2024 13:21:26 +0800
Subject: [PATCH] -

---
 jcdm-ui/src/views/main/kb/stationTerminal/index.vue |   34 +++++++++++++++++++++++++++++-----
 1 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
index 94e4f63..c29cfdc 100644
--- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
+++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -106,7 +106,7 @@
          <el-tab-pane name="first">
            <span slot="label"> <a class="el-icon-date"></a>棣栭〉</span>
            <el-col :span="24">
-             <el-table :cell-style="rowStyle" :data="formulaChildList">
+             <el-table height="500" :cell-style="rowStyle" :data="formulaChildList">
                <el-table-column label="鎺掑簭" width="60" align="center" type="index">
                </el-table-column>
                <el-table-column label="鎿嶄綔鍐呭" :show-overflow-tooltip='true' align="center" prop="operationSteps">
@@ -294,6 +294,7 @@
 import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
 import {
   listFormulaChild,
+  noPageListFormulaChild,
   releaseCheck,
   updateResults,
   updateTighteningFormula,
@@ -360,7 +361,7 @@
       },
       content: '',
       activeName: 'first',
-      url: "ws://192.168.10.21:8080/websocket/message/",
+      url: "ws://192.168.1.100:8080/websocket/message/",
       message: "",
       text_content: "",
       ws: null,
@@ -370,7 +371,7 @@
       input: "",
       keepReading: true,
       form1: {
-        baudRate: "9600",
+        baudRate: "115200",
         dataBits: "8",
         stopBits: "1",
         parity: "none",
@@ -478,6 +479,10 @@
         collectionTime: new Date()
       }
       updateResults(formulaChildParams).then(response => {
+        console.log(response)
+        if(response.msg === "3"){
+          this.cakeLamp.release= 1 //鍏佽鏀捐
+        }
         this.getListFormulaChild()
       });
     },
@@ -494,11 +499,24 @@
       // this.formulaChildList = []
       this.formulaChildParams.productCode = this.workpieceInformation.productCode
       this.formulaChildParams.processesCode = this.headContent.processesCode
-      listFormulaChild(this.formulaChildParams).then(response => {
+      console.log(this.formulaChildParams)
+      noPageListFormulaChild(this.formulaChildParams).then(response => {
         this.formulaChildList = response.rows;
       });
     },
+    endClear(){
+      this.cakeLamp.InPlace= 0 //宸ヤ欢鍒颁綅
+      this.cakeLamp.scanFinish= 0
+      this.cakeLamp.startWork= 0
+      this.cakeLamp.release= 0 //鍏佽鏀捐
 
+      this.formulaChildList = []
+      this.headContent.sfcCode = null
+      this.workpieceInformation.productCode = null;
+      this.workpieceInformation.workOrderNo = null;
+      this.workpieceInformation.productModel = null;
+      this.workpieceInformation.productName = null;
+    },
     changeMenu(tab, event) {
       console.log(tab, event);
     },
@@ -561,6 +579,7 @@
         alert("鏈繛鎺ュ埌鏈嶅姟鍣�");
       }
     },
+
     initStation: async function () {
       await getIpv4().then(response => {
         this.StationConfQueryParams.ipAddress = response.msg
@@ -586,7 +605,6 @@
         this.$message('websocket杩炴帴鎴愬姛锛�');
       };
       this.ws.onmessage = function (event) {
-        const DELAY_TIME = 2000;
         if (event.data === "IN") {
           self.cakeLamp.InPlace = 1;
         } else if (event.data === "IN0") {
@@ -601,6 +619,8 @@
             productBarcode: self.headContent.sfcCode,
           }
           saveCampaignTimeParameters(param).then(response => {});
+          self.cakeLamp.release = 1;
+          self.endClear()
 
         } else if (event.data.includes("[")) {
           let formulaChilds = "";
@@ -633,6 +653,8 @@
       };
     },
 
+
+
     //鎺ュ彈鏁版嵁鐨勫洖璋�
     callBack(value) {
       if (this.form1.isShowHistory) this.form1.desc = this.readLi().join("");
@@ -641,9 +663,11 @@
         console.log("涓插彛鏀跺埌鏁版嵁-------------------"+scanValue)
         // if(this.cakeLamp.InPlace=== 1){
           if(this.headContent.sfcCode !== ''){
+            this.$message('鎵弿鐗╂枡缂栫爜'+scanValue);
             console.log(scanValue)
             this.serialPortMethod(scanValue)
           }else {
+            this.$message('鎵爜璇嗗埆浜у搧搴忓垪鍙�'+scanValue);
             this.headContent.sfcCode = scanValue;
             this.queryParams.productNum = scanValue;
             this.getList()

--
Gitblit v1.9.3