懒羊羊
2024-01-30 c346aba6d0196673d43fb81610ec6f0ca9cddbbd
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -147,7 +147,7 @@
<script>
import {listWorkReport} from "@/api/main/om/workReport/workReport";
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {listFormulaChild, releaseCheck, updateResults} from "@/api/main/bs/formulaChild/formulaChild";
import {listFormulaChild, releaseCheck, updateResults, workpieceRelease} from "@/api/main/bs/formulaChild/formulaChild";
export default {
  name: "stationTerminal",
@@ -159,6 +159,7 @@
        pageNum: 1,
        pageSize: 10,
        productCode: null,
        processesCode: null,
      },
      // 配方配置子信息表格数据
      formulaChildList: [],
@@ -198,7 +199,7 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://192.168.11.60:8080/websocket/message/",
      url: "ws://192.168.10.252:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -220,11 +221,18 @@
  },
  methods: {
    Release(){
      releaseCheck().then(response => {
      let formulaChildParams = {
        productCode: this.workpieceInformation.productCode,
        processesCode: this.headContent.processesCode
      }
      releaseCheck(formulaChildParams).then(response => {
        if(response.data === 0){
          //改变状态
          workpieceRelease(formulaChildParams).then(response => {
          });
          this.$message('放行成功!');
          this.formulaChildList = []
          this.getListFormulaChild()
        }else {
          this.$message('步骤未完成不许放行!');
        }
@@ -249,6 +257,7 @@
    /** 查询配方配置子信息列表 */
    getListFormulaChild() {
      this.formulaChildParams.productCode = this.workpieceInformation.productCode
      this.formulaChildParams.processesCode = this.headContent.processesCode
      listFormulaChild(this.formulaChildParams).then(response => {
        this.formulaChildList = response.rows;
      });
@@ -375,6 +384,7 @@
          }, 2000); // 延时2秒触发
        }else if(event.data === 'TIGHTEN'){
          console.log('开始拧紧')
          this.formulaChildList = []
          self.getListFormulaChild()
        }
      };