gaoshp
2024-04-22 5fb43d29f47d9b316414b28ea84a6fab3133b856
src/views/mdc/station-live.vue
@@ -297,7 +297,7 @@
      },
      mounted(){
         this.newDate();  //获取当前日期
         this.getTreeList();
         this.getTreeList(this.$route.query.code);
      },
      components: {
         saveDialog
@@ -347,7 +347,6 @@
                     item.temdata = "00:00:00";
                     item.perdata = "0";
                  })
                  console.log(res.data,980)
                  this.recordData = res.data;
               }
            })
@@ -425,7 +424,6 @@
                  })
                  this.wcsOptionR.series[0].data = res.data;   
                  myChart.setOption(this.wcsOptionR);
                  console.log(res.data)
               }
            })
         },
@@ -460,6 +458,7 @@
            this.$HTTP.get(`/api/blade-cps/workstation/get-dmp-variables?machineId=${machineId}&workstationId=${lastLevelId}`).then(res=> {
               if(res.code == 200) {
                  this.dmpList = res.data;
                  console.log(this.dmpList,1)
               }
            })
         },
@@ -518,7 +517,7 @@
            })
            return tree;
         },
         getTreeList(flag) {
         getTreeList(id) {
            var obj = {
               groupCategory: 1,
               groupType: "group_workstation"
@@ -529,10 +528,14 @@
                     var treeDisabled = this.addTreeDisable(res.data);
                     this.tableData = this.buildTree(treeDisabled);  //从扁平化变为树状结构
                     this.$nextTick(()=> {
                        this.lastLevelId = this.getLastLevelIds(this.tableData).lastLevelId;
                        if(id) {
                           this.lastLevelId = id;  //指定id
                        }else {
                           this.lastLevelId = this.getLastLevelIds(this.tableData).lastLevelId;
                        }
                        this.$refs.treeRef.setCurrentKey(this.lastLevelId);  //第一个节点的第一个子节点最后一级默认选中
                        //以下是初始化数据
                        this.getlist();  //渲染反馈列表
                        this.getlist();  //渲染详情和(状态list)
                        this.getwcsLcolor();  //左侧图表
                        this.getwcsR();  //右侧图标
                        this.getachievements();  //班次状态记录采集状态