懒羊羊
2024-01-29 a36b834b2957440a755652ff17d067b18f4e9250
jcdm-ui/src/views/main/kb/stationTerminal/index.vue
@@ -93,6 +93,9 @@
           </el-col>
         </el-row>
         <el-row style="margin-top: 20px">
             <el-button @click="Release" type="primary">放行</el-button>
         </el-row>
       </el-card>
     </el-col>
@@ -101,7 +104,7 @@
         <el-tab-pane name="first">
           <span slot="label"> <a class="el-icon-date"></a>首页</span>
           <el-col :span="8">
             <el-table :data="formulaChildList">
             <el-table :cell-style="rowStyle" :data="formulaChildList">
               <el-table-column label="排序" width="60" align="center" prop="stepSort">
               </el-table-column>
               <el-table-column label="操作内容" :show-overflow-tooltip='true' align="center" prop="operationSteps">
@@ -144,7 +147,7 @@
<script>
import {listWorkReport} from "@/api/main/om/workReport/workReport";
import {listStationConf,getIpv4} from "@/api/main/sc/stationConf";
import {listFormulaChild} from "@/api/main/bs/formulaChild/formulaChild";
import {listFormulaChild, releaseCheck, updateResults} from "@/api/main/bs/formulaChild/formulaChild";
export default {
  name: "stationTerminal",
@@ -195,7 +198,7 @@
      },
      content: '',
      activeName: 'first',
      url: "ws://192.168.10.184:8080/websocket/message/",
      url: "ws://192.168.11.60:8080/websocket/message/",
      message: "",
      text_content: "",
      ws: null,
@@ -216,8 +219,32 @@
  },
  methods: {
    serialPortMethod(){
    Release(){
      releaseCheck().then(response => {
        if(response.data === 0){
          //改变状态
          this.$message('放行成功!');
        }else {
          this.$message('步骤未完成不许放行!');
        }
      });
    },
    serialPortMethod(){
      let formulaChildParams = {
        materialCode: this.serialPortContent
      }
      updateResults(formulaChildParams).then(response => {
        this.getListFormulaChild()
      });
    },
    rowStyle({ row }) {
      if (row.results === 'OK') {
        return 'background-color: PaleGreen';
      } else if (row.results === 'NG') {
        return 'background-color: LightSalmon';
      }
      return '';
    },
    /** 查询配方配置子信息列表 */
    getListFormulaChild() {
@@ -238,7 +265,7 @@
      this.headContent.sfcCode = this.content
      this.queryParams.sfcCode = this.content
      this.getList()
      // this.getListFormulaChild()
      this.getListFormulaChild()
      this.cakeLamp.scanFinish = 1
      this.cakeLamp.startWork = 1
@@ -247,6 +274,7 @@
    async getList() {
      await listWorkReport(this.queryParams).then(response => {
        let rowsData = response.rows[0];
        console.log(rowsData)
        this.workpieceInformation.workOrderCode = rowsData.workOrderCode;
        this.workpieceInformation.productCode = rowsData.productCode;
        this.workpieceInformation.productModel = rowsData.productModel;
@@ -345,6 +373,9 @@
          setTimeout(() => {
            this.resetting()
          }, 2000); // 延时2秒触发
        }else if(event.data === 'TIGHTEN'){
          console.log('开始拧紧')
          self.getListFormulaChild()
        }
      };
    },
@@ -393,5 +424,12 @@
span{
  font-size: 15px;
}
.el-table .warning-row {
  background: oldlace;
}
.el-table .success-row {
  background: #f0f9eb;
}
</style>