1
lzhe
2024-09-30 1988d77f4df3c01a9137303e0c959b3442c14377
src/views/mdc/station-live.vue
@@ -2,14 +2,14 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-03-26 10:28:33
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-06-17 15:54:59
 * @LastEditTime: 2024-09-12 11:28:21
 * @FilePath: /smart-web/src/views/master/person/main/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
   <div class="aposcope-main">
      <div class="aposcope-left">
         <div class="left-title">查询条件</div>
         <div class="left-title">查询条件1</div>
         <el-tree :data="tableData" node-key="id" default-expand-all :expand-on-click-node="false" :props="defalutProps" @node-click="handleNodeClick" ref="treeRef" highlight-current />
      </div>
      <div class="aposcope-right">
@@ -70,7 +70,7 @@
                           <div class="status-box" v-for="item in achievements"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div>
                        </div>
                        <div class="status-wrap">
                           <el-checkbox v-model="checked1" label="人工反馈状态" size="large" />
                           <el-checkbox v-model="humanFeedback" label="人工反馈状态" size="large" />
                           <div class="status-con">
                              <div class="status-box" v-for="item in collectionstatus"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div>
                           </div>
@@ -133,7 +133,7 @@
         return {
            achievements: [],
            collectionstatus: [],
            checked1: "",
            humanFeedback: "",
            alarmtotal: 0,
            alarmtableData: [],
            wcsDate: "",
@@ -336,7 +336,7 @@
         getrecord() {  //班次状态记录table
            var obj = {
               date: this.wcsDate,
               humanFeedback: true,
               humanFeedback: this.humanFeedback,
               workstationId: this.lastLevelId
            }
            this.$HTTP.post(`/api/blade-mdc/status-record/shift-index-status-record-table`,obj).then(res=> {
@@ -412,7 +412,7 @@
            var obj = {
               date: this.wcsDate,
               //date : "2024-05-15",
               humanFeedback: true,
               humanFeedback: this.humanFeedback,
               workstationId: this.lastLevelId
            }
            this.$HTTP.post(`/api/blade-mdc/status-record/shift-index-status-record-chart`,obj).then(res=> {
@@ -560,7 +560,7 @@
         getwscLvalue() {
            var obj = {
               date: this.wcsDate,
               humanFeedback: true,
               humanFeedback: this.humanFeedback,
               workstationId: this.lastLevelId
            }
            this.$HTTP.post(`/api/blade-mdc/status-record/time-distribution`,obj).then(res=> {
@@ -599,7 +599,7 @@
         getwcsR() {
            var obj = {
               date: this.wcsDate,
               humanFeedback: true,
               humanFeedback: this.humanFeedback,
               workstationId: this.lastLevelId
            }
            this.$HTTP.post(`/api/blade-mdc/status-record/equipment-efficiency`,obj).then(res=> {
@@ -662,8 +662,10 @@
                       res.data.forEach((item,index)=> {  //第一步把v放到code里
                          var eventData = JSON.parse(event.data);
                         if(item.name == "DeviceStatus") {  //机器状态
                             item.code = eventData.data[item.name].v;
                             that.allwcs.forEach(item1=> {
                           if(eventData.data[item.name]) {
                              item.code = eventData.data[item.name].v;
                           }
                             that.allwcs.forEach((item1)=> {
                                if(item.code == item1.code) {
                                   item.codeName = item1.name;    //第二步把v的code和运行对应
                                   if(item.code == "2") {
@@ -694,8 +696,8 @@
                            }else {
                              if(eventData.data[item.name]) {
                                 item.codeName = eventData.data[item.name].v;
                                   item.color = "#75C0C0";
                              }
                              item.color = "#75C0C0";
                            }
                         }
                     });