-
懒羊羊
2024-03-29 0caf8761b4af8163a691ebb56723286926529ee4
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.11.6:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -494,11 +495,20 @@
      // 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
    },
    changeMenu(tab, event) {
      console.log(tab, event);
    },
@@ -561,6 +571,7 @@
        alert("未连接到服务器");
      }
    },
    initStation: async function () {
      await getIpv4().then(response => {
        this.StationConfQueryParams.ipAddress = response.msg
@@ -601,6 +612,8 @@
            productBarcode: self.headContent.sfcCode,
          }
          saveCampaignTimeParameters(param).then(response => {});
          self.cakeLamp.release = 1;
          self.endClear()
        } else if (event.data.includes("[")) {
          let formulaChilds = "";
@@ -633,6 +646,8 @@
      };
    },
    //接受数据的回调
    callBack(value) {
      if (this.form1.isShowHistory) this.form1.desc = this.readLi().join("");
@@ -641,9 +656,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()