-
admin
2024-06-05 16714e1a824acd878b105e6ac433866cfc50ed89
jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
@@ -43,34 +43,7 @@
               </el-table-column>
             </el-table>
           </el-col>
<!--           <el-col :span="14">-->
<!--             <el-image style="height: 520px;width: 100%" :src="imgSrc"></el-image>-->
<!--           </el-col>-->
         </el-tab-pane>
<!--         <el-tab-pane name="second">-->
<!--           <span slot="label"> <b class="el-icon-date"></b>物料BOM</span>-->
<!--           <el-empty>-->
<!--             <span slot="description">暂无数据</span>-->
<!--           </el-empty>-->
<!--         </el-tab-pane>-->
<!--         <el-tab-pane name="third">-->
<!--           <span slot="label"> <b class="el-icon-date"></b>采集清单</span>-->
<!--           <el-empty>-->
<!--             <span slot="description">暂无数据</span>-->
<!--           </el-empty>-->
<!--         </el-tab-pane>-->
<!--         <el-tab-pane name="fourth">-->
<!--           <span slot="label"> <b class="el-icon-date"></b>安灯状态</span>-->
<!--           <el-empty>-->
<!--             <span slot="description">暂无数据</span>-->
<!--           </el-empty>-->
<!--         </el-tab-pane>-->
<!--         <el-tab-pane name="fifth">-->
<!--           <span slot="label"> <b class="el-icon-date"></b>工艺配方</span>-->
<!--           <el-empty>-->
<!--             <span slot="description">暂无数据</span>-->
<!--           </el-empty>-->
<!--         </el-tab-pane>-->
       </el-tabs>
     </el-col>
   </el-row>
@@ -214,26 +187,22 @@
  </div>
</template>
<script>
import {listWorkReport} from "@/api/main/om/workReport/workReport";
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {getIpv4, listStationConf} from "@/api/main/sc/stationConf";
import {
  listFormulaChild,
  fistSetpNumber,
  noPageListFormulaChild,
  releaseCheck,
  updateResults,
  updateTighteningFormula,
  workpieceRelease, yzUpdateResults, yzUpdateTighteningFormula
  workpieceRelease,
  yzUpdateResults,
  yzUpdateTighteningFormula
} from "@/api/main/bs/formulaChild/formulaChild";
import MySerialPort from "@/utils/MySerialPort";
import USBDevice from "@/utils/usb.json";
import {listProductionOrde} from "@/api/main/om/productionOrde/productionOrde";
import {addPassingStationCollection} from "@/api/main/da/passingStationCollection/passingStationCollection";
import {
  addBasicParameters,
  addParamCollection,
  addTighteningParameters,
  saveCampaignTimeParameters,
  replaceAssemblyCode,
  saveCampaignTimeParameters,
  yzAddBasicParameters,
} from "@/api/main/da/paramCollection/paramCollection";
export default {
@@ -288,7 +257,7 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://192.168.2.248:8080/websocket/message/",
      url: "ws://192.168.2.76:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -369,6 +338,7 @@
        });
      }
    },
    Release(){
      // this.$message('portsList!'+this.portsList.length);
      if(this.btnType === "danger"){
@@ -408,6 +378,25 @@
      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(){
@@ -432,24 +421,28 @@
    },
    /** 查询工单列表 */
    async getList() {
      const param = {
        processesCode: this.headContent.processesCode,
      }
      fistSetpNumber(param).then(response => {});
      this.getListFormulaChild()
      // this.addOverStationCollection()
      this.addOverStationCollection()
    },
    /** 入站增加过站采集记录 **/
    addOverStationCollection(){
      this.passingStationForm = {
        id: null,
        workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: this.workpieceInformation.productCode,
        // workOrderNo: this.workpieceInformation.workOrderNo,
        productCode: "1P102S",
        locationCode: this.headContent.processesCode,
        model: this.workpieceInformation.productModel,
        // model: this.workpieceInformation.productModel,
        productBarcode: this.headContent.sfcCode,
        sfcCode: this.headContent.sfcCode,
        inboundTime: new Date()
      }
      addPassingStationCollection(this.passingStationForm).then(response => {});
      addBasicParameters(this.passingStationForm).then(response => {});
      yzAddBasicParameters(this.passingStationForm).then(response => {});
    },
    exit() {
      if (this.ws) {
@@ -535,20 +528,20 @@
          const param = {
            tightenTheArray: event.data,
            paramCode: formulaChilds.paramCode,
            workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: self.workpieceInformation.productCode,
            // workOrderNo: self.workpieceInformation.workOrderNo,
            productCode: "1P102S",
            locationCode: self.headContent.processesCode,
            productBarcode: self.headContent.sfcCode,
          }
          if(formulaChilds.paramCode === null||formulaChilds.paramCode ===''){
            self.$message('未找到参数码,请检查参数码是否正确');
            return;
          }
          addTighteningParameters(param).then(response => {});
          yzUpdateTighteningFormula(param).then(response => {
          //   self.getListFormulaChild()
          // }).catch(error =>{
          //   self.getListFormulaChild()
            console.log(response.msg)
            if(response.msg === "1"){
            console.log(response)
            if(response.msg === "1" || response.msg === "3"){
                self.getListFormulaChild()
            }else {
              const param = {
                workOrderNo: self.workpieceInformation.workOrderNo,
@@ -562,6 +555,8 @@
              self.headContent.sfcCode = '';
            }
          });
          // self.getListFormulaChild()
        }
      };
    },
@@ -576,7 +571,7 @@
        console.log("串口收到数据-------------------"+scanValue)
        if(this.headContent.sfcCode !== ''){
          this.$message('扫描物料编码'+scanValue);
          this.$message('预装工位扫描物料编码'+scanValue);
          console.log(scanValue)
          this.serialPortMethod(scanValue)
        } else {