1
lzhe
2024-05-17 2786e49d866b0908422cf42cc681b8de451c60aa
src/views/mdc/station-live.vue
@@ -151,7 +151,7 @@
                  tooltip: {  
                      trigger: 'item',  
                      //formatter: '{a} <br/>{b} : {c} ({d}%)'  
                      formatter: '{a} 0分钟'
                      formatter: '{a} {c}分钟'
                  },  
                  legend: {  
                      orient: 'vertical',  
@@ -410,8 +410,8 @@
         },
         getlogcart() {  //班次状态记录chart
            var obj = {
               //date: this.wcsDate,
               date : "2024-05-15",
               date: this.wcsDate,
               //date : "2024-05-15",
               humanFeedback: true,
               workstationId: this.lastLevelId
            }
@@ -420,6 +420,16 @@
                  var yAxisData = [];
                  var newData = [];
                  this.records = res.data.reverse();
                  res.data.forEach(item=> {
                     if(item.statusRecordList == null) item.statusRecordList = [];
                     var filterRecordList = [];
                     item.statusRecordList.forEach(item1=> {
                        if(item1.endTime.startsWith(this.wcsDate)) {  //只返回当前结束日期的
                           filterRecordList.push(item1)
                        }
                     })
                     item.statusRecordList = filterRecordList;
                  })
                  res.data.forEach((item,index)=> {
                     yAxisData.push(item.shiftIndex);
                     //计算开始时间,显示时间
@@ -442,7 +452,7 @@
                  var nowTime = moment().format("HH:mm:ss");  //11:37:54
                  var spaceTime = moment(obj.date + " " + nowTime).diff(moment(obj.date + " 00:00:00"), 'hours');  //离当天00:00:00过了多少小时
                  console.log(spaceTime,obj.date + " " + nowTime,234)
                  //console.log(spaceTime,obj.date + " " + nowTime,234)
                  return;
                  //计算时间
                  var startOfDay = moment().startOf('day'); //00:00:00
@@ -495,7 +505,7 @@
                  interval: 1440/6,  //每隔多少分钟显示一个刻度
                  axisLabel: {
                     formatter: (value)=> {
                        console.log(value,111)
                        //console.log(value,111)
                        if(value == 0) {
                           return "00:00:00";
                        }else if(value == 240) {
@@ -560,7 +570,7 @@
                  var wcsOption = JSON.parse(JSON.stringify(this.wcsBeginOption));
                  if(res.data.length == 0) {
                     wcsOption.forEach(item=> {
                        item.value = 20;
                        item.value = 0;
                     })
                  }else {
                     wcsOption.forEach(item=> {
@@ -638,7 +648,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,111)
                  //console.log(this.dmpList,111)
               }
            })
         },