From e081f232138b318338ffca07e7c9fcd941ac20b4 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期五, 12 四月 2024 09:54:17 +0800
Subject: [PATCH] 1、设备综合效率分析以及设备加工工件报表页面表格高度设置为页面进入时即可拖动水平滚动条的高度 2、首页 (1)OEE标题增加月份展示,利用率等效率标题增加日期展示 (2)公司及车间级看板单击OEE车间图表跳转至设备综合效率分析页面并根据唯一编号筛选页面对应数据 (3)工段级看板单击设备效率统计仪表盘图标跳转至统计分析页面并根据唯一编号筛选页面对应数据 (4)调整折线图数据展示维度,通过当前工段下各个设备前7天的利用率、开动率和开机率轮播展示

---
 src/views/dashboard/EquipmentSignage.vue                                   |   14 +
 src/views/dashboard/BranchFactorySignage.vue                               |   63 ++++++++-
 src/views/dashboard/IndexSignage.vue                                       |   79 +++++++++++-
 src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue         |    6 
 src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue                 |   19 ++
 src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue             |    6 
 src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue |    9 +
 src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue   |    6 
 src/views/dashboard/WorkshopSectionSignage.vue                             |  133 ++++++++++++++++++---
 src/api/signage.js                                                         |    4 
 10 files changed, 277 insertions(+), 62 deletions(-)

diff --git a/src/api/signage.js b/src/api/signage.js
index 4a4e433..4b20d10 100644
--- a/src/api/signage.js
+++ b/src/api/signage.js
@@ -28,5 +28,7 @@
   // 宸ユ绾у墠7澶╁埄鐢ㄧ巼鎶樼嚎鍥�
   getEquipmentDayUtilizationStatisticsApi: productionCode => getAction('/mdc/home/equipmentDayUtilizationStatistics', { productionCode }),
   // 涓婁釜鏈堝悇璁惧OEE缁熻
-  getEquipmentOEEMonthStatisticsApi: productionCode => getAction('/mdc/home/equipmentOEEMonthStatistics', { productionCode })
+  getEquipmentOEEMonthStatisticsApi: productionCode => getAction('/mdc/home/equipmentOEEMonthStatistics', { productionCode }),
+  // 璁惧鏁堢巼浠〃鐩�
+  getEquipmentEfficiencyStatisticsApi: productionCode => getAction('/mdc/home/equipmentEfficiencyStatistics', { productionCode })
 }
\ No newline at end of file
diff --git a/src/views/dashboard/BranchFactorySignage.vue b/src/views/dashboard/BranchFactorySignage.vue
index 4b15280..fa20fd7 100644
--- a/src/views/dashboard/BranchFactorySignage.vue
+++ b/src/views/dashboard/BranchFactorySignage.vue
@@ -110,7 +110,20 @@
         nextNextMonthMaintenancePlanNum: 0,
         twoMaintenanceChartData: [['-', '-', '-']],
         barChart: '',
-        barChartData: [],
+        barChartData: [
+          {
+            'value': '34',
+            'name': '401涓�宸ユ',
+            'productionCode': '4215215621',
+            'productionId': '1729761410329280513'
+          },
+          {
+            'value': '77',
+            'name': '401浜屽伐娈�',
+            'productionCode': '8563354643',
+            'productionId': '1729783206308302849'
+          }
+        ],
         doubleBarChart: '',
         doubleBarChartData: {},
         maintenanceConfig: {},
@@ -133,7 +146,7 @@
         this.getWarrantyMalfunctionDataByApi()
         this.getMonthMaintenanceNumByApi()
         this.getTwoMaintenanceChartDataByApi()
-        this.getBarChartDataByApi()
+        // this.getBarChartDataByApi()
         this.getDoubleBarChartDataByApi()
       },
 
@@ -727,10 +740,11 @@
       /* 缁樺埗鍗曟煴鍥� */
       drawBarChart() {
         this.barChart = this.$echarts.init(document.getElementById('bar_chart'))
+        const defaultData = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
         const option = {
           title: {
             show: true, // 鏄惁鏄剧ず鏍囬锛岄粯璁や负true
-            text: 'OEE杞﹂棿', // 涓绘爣棰樻枃鏈�
+            text: '', // 涓绘爣棰樻枃鏈�
             x: 'center', // 鏍囬姘村钩瀹夋斁浣嶇疆锛屽彲閫夊�间负'left'銆�'center'銆�'right'鎴栧叿浣撶殑姘村钩鍧愭爣鍊�
             y: 'top', // 鏍囬鍨傜洿瀹夋斁浣嶇疆锛屽彲閫夊�间负'top'銆�'bottom'銆�'center'鎴栧叿浣撶殑鍨傜洿鍧愭爣鍊�
             textStyle: {
@@ -744,6 +758,10 @@
             trigger: 'axis',
             axisPointer: {
               type: 'shadow'
+            },
+            formatter: function(params) {
+              return '<span style="font-weight:bolder;">' + params[0].name + '</span><br/>' +
+                '<span style="display:inline-block; width:10px; height:10px; border-radius:100px; margin-right:5px; background:' + params[0].color + '"></span>' + ' OEE: ' + params[0].value + '%'
             },
             // backgroundColor: 'rgba(9, 24, 48, 0.5)',
             borderColor: 'rgba(75, 253, 238, 0.4)',
@@ -761,7 +779,7 @@
             nameLocation: 'middle',
             nameGap: 40, // x杞磏ame涓庢í鍧愭爣杞寸嚎鐨勯棿璺�
             type: 'category',
-            data: this.barChartData.map(item => item.name),
+            data: this.barChartData.map(item => item.productionId),
             axisLine: {
               lineStyle: {
                 color: '#FFFFFF'
@@ -772,7 +790,9 @@
               interval: 0, // 鍧愭爣杞村埢搴︽爣绛剧殑鏄剧ず闂撮殧锛屽湪绫荤洰杞翠腑鏈夋晥锛涢粯璁や細閲囩敤鏍囩涓嶉噸鍙犵殑绛栫暐闂撮殧鏄剧ず鏍囩锛涘彲浠ヨ缃垚0寮哄埗鏄剧ず鎵�鏈夋爣绛撅紱濡傛灉璁剧疆涓�1锛岃〃绀恒�庨殧涓�涓爣绛炬樉绀轰竴涓爣绛俱�忥紝濡傛灉鍊间负2锛岃〃绀洪殧涓や釜鏍囩鏄剧ず涓�涓爣绛撅紝浠ユ绫绘帹銆�
               rotate: this.barChartData.length >= 5 ? -30 : 0, // 鍒诲害鏍囩鏃嬭浆鐨勮搴︼紝鍦ㄧ被鐩酱鐨勭被鐩爣绛炬樉绀轰笉涓嬬殑鏃跺�欏彲浠ラ�氳繃鏃嬭浆闃叉鏍囩涔嬮棿閲嶅彔锛涙棆杞殑瑙掑害浠�-90搴﹀埌90搴�
               inside: false, // 鍒诲害鏍囩鏄惁鏈濆唴锛岄粯璁ゆ湞澶�
-              margin: 6 // 鍒诲害鏍囩涓庤酱绾夸箣闂寸殑璺濈
+              formatter: value => {
+                return `${this.barChartData.find(item => item.productionId === value).name}`
+              }
             },
             axisTick: {
               show: true,
@@ -780,9 +800,8 @@
             }
           }],
           yAxis: [{
-            name: '鏁伴噺',
-            nameLocation: 'middle',
-            nameGap: 30, // x杞磏ame涓庢í鍧愭爣杞寸嚎鐨勯棿璺�
+            name: '%',
+            max: 100,
             axisLabel: {
               formatter: '{value}',
               color: '#e2e9ff'
@@ -810,7 +829,7 @@
             itemStyle: {
               color: '#55D6A5'
             },
-            showBackground: true,
+            zlevel: 1,
             label: {
               show: true,
               lineHeight: 10,
@@ -824,9 +843,33 @@
                 fontSize: 18
               }
             }
-          }]
+          },
+            {
+              name: '鑳屾櫙',
+              type: 'bar',
+              barWidth: '15%',
+              barGap: '-100%',
+              data: defaultData,
+              itemStyle: {
+                color: '#11294d'
+              }
+            }]
         }
+        option.title.text = moment().subtract(1, 'months').format('M鏈�') + `OEE杞﹂棿`
         this.barChart.setOption(option, true)
+
+        this.barChart.on('click', params => {
+          console.log('params', params)
+          let productionId
+          // 鐐瑰嚮鐨勬槸鏌变綋鐨勫�硷紝鍚﹀垯鐐瑰嚮鐨勪负鏌变綋鑳屾櫙闃村奖
+          if (params.seriesIndex === 0) productionId = params.data.productionId
+          else productionId = params.name
+
+          this.$router.push({
+            name: 'mdc-base-OEEAnalysis',
+            params: { isEquipment: false, productionId }
+          })
+        })
       },
 
       /* 缁樺埗鍙屾煴鍥� */
diff --git a/src/views/dashboard/EquipmentSignage.vue b/src/views/dashboard/EquipmentSignage.vue
index 04ac89e..6c954df 100644
--- a/src/views/dashboard/EquipmentSignage.vue
+++ b/src/views/dashboard/EquipmentSignage.vue
@@ -69,6 +69,9 @@
                 <a-descriptions-item label="鎿嶄綔宸�">
                   {{equipmentInfo.operator}}
                 </a-descriptions-item>
+                <a-descriptions-item label="璁惧鐘舵��">
+                  {{equipmentInfo.equipmentStatus}}
+                </a-descriptions-item>
               </a-descriptions>
             </dv-border-box-11>
 
@@ -251,7 +254,8 @@
           standard: '鏃�',
           depart: '杞ф満涓績',
           workshopSection: '407涓�宸ユ',
-          operator: 'admin'
+          operator: 'admin',
+          equipmentStatus: 0
         },
         buttonList: [
           {
@@ -406,7 +410,7 @@
       drawGaugeChart1(opt) {
         this.gaugeChart1 = this.$echarts.init(document.getElementById('gauge_chart1'))
         const option = Object.assign({}, opt)
-        option.title.text = '鍒╃敤鐜�'
+        option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '鍒╃敤鐜�'
         option.series[0].name = '鍒╃敤鐜�'
         option.series[0].data = [56]
         this.gaugeChart1.setOption(option, true)
@@ -416,7 +420,7 @@
       drawGaugeChart2(opt) {
         this.gaugeChart2 = this.$echarts.init(document.getElementById('gauge_chart2'))
         const option = Object.assign({}, opt)
-        option.title.text = '寮�鍔ㄧ巼'
+        option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '寮�鍔ㄧ巼'
         option.series[0].name = '寮�鍔ㄧ巼'
         option.series[0].data = [23]
         this.gaugeChart2.setOption(option, true)
@@ -426,7 +430,7 @@
       drawGaugeChart3(opt) {
         this.gaugeChart3 = this.$echarts.init(document.getElementById('gauge_chart3'))
         const option = Object.assign({}, opt)
-        option.title.text = '寮�鏈虹巼'
+        option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '寮�鏈虹巼'
         option.series[0].name = '寮�鏈虹巼'
         option.series[0].data = [44]
         this.gaugeChart3.setOption(option, true)
@@ -436,7 +440,7 @@
       drawGaugeChart4(opt) {
         this.gaugeChart4 = this.$echarts.init(document.getElementById('gauge_chart4'))
         const option = Object.assign({}, opt)
-        option.title.text = 'OEE'
+        option.title.text = moment().subtract(1, 'months').format('M鏈�') + `OEE`
         option.series[0].name = 'OEE'
         option.series[0].data = [78]
         this.gaugeChart4.setOption(option, true)
diff --git a/src/views/dashboard/IndexSignage.vue b/src/views/dashboard/IndexSignage.vue
index a3ddd65..ff2faab 100644
--- a/src/views/dashboard/IndexSignage.vue
+++ b/src/views/dashboard/IndexSignage.vue
@@ -87,7 +87,7 @@
           { value: '0', name: '杩愯' }
         ],
         efficiencyChart: '',
-        efficiencyData:[],
+        efficiencyData: [],
         techConditionChart: '',
         techConditionData: [
           { value: '0', name: '鍚堟牸' },
@@ -106,7 +106,32 @@
         nextNextMonthMaintenancePlanNum: 0,
         twoMaintenanceChartData: [['-', '-', '-']],
         barChart: '',
-        barChartData: [],
+        barChartData: [
+          {
+            'value': '32',
+            'name': '401',
+            'productionCode': '125487318',
+            'productionId': '1729419336207761409'
+          },
+          {
+            'value': '23',
+            'name': '406',
+            'productionCode': '4212152142',
+            'productionId': '1729419361201618945'
+          },
+          {
+            'value': '11',
+            'name': '407',
+            'productionCode': '321321345',
+            'productionId': '1729419381665628161'
+          },
+          {
+            'value': '44',
+            'name': '408',
+            'productionCode': '536341343',
+            'productionId': '1729670118396067842'
+          }
+        ],
         doubleBarChart: '',
         doubleBarChartData: {},
         efficiencyChartConfig: {},
@@ -130,7 +155,7 @@
         this.getWarrantyMalfunctionDataByApi()
         this.getMonthMaintenanceNumByApi()
         this.getTwoMaintenanceChartDataByApi()
-        this.getBarChartDataByApi()
+        // this.getBarChartDataByApi()
         this.getDoubleBarChartDataByApi()
       },
 
@@ -725,10 +750,11 @@
       /* 缁樺埗鍗曟煴鍥� */
       drawBarChart() {
         this.barChart = this.$echarts.init(document.getElementById('bar_chart'))
+        const defaultData = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
         const option = {
           title: {
             show: true, // 鏄惁鏄剧ず鏍囬锛岄粯璁や负true
-            text: 'OEE杞﹂棿', // 涓绘爣棰樻枃鏈�
+            text: '', // 涓绘爣棰樻枃鏈�
             x: 'center', // 鏍囬姘村钩瀹夋斁浣嶇疆锛屽彲閫夊�间负'left'銆�'center'銆�'right'鎴栧叿浣撶殑姘村钩鍧愭爣鍊�
             y: 'top', // 鏍囬鍨傜洿瀹夋斁浣嶇疆锛屽彲閫夊�间负'top'銆�'bottom'銆�'center'鎴栧叿浣撶殑鍨傜洿鍧愭爣鍊�
             textStyle: {
@@ -742,6 +768,10 @@
             trigger: 'axis',
             axisPointer: {
               type: 'shadow'
+            },
+            formatter: function(params) {
+              return '<span style="font-weight:bolder;">' + params[0].name + '</span><br/>' +
+                '<span style="display:inline-block; width:10px; height:10px; border-radius:100px; margin-right:5px; background:' + params[0].color + '"></span>' + ' OEE: ' + params[0].value + '%'
             },
             // backgroundColor: 'rgba(9, 24, 48, 0.5)',
             borderColor: 'rgba(75, 253, 238, 0.4)',
@@ -759,7 +789,7 @@
             nameLocation: 'middle',
             nameGap: 40, // x杞磏ame涓庢í鍧愭爣杞寸嚎鐨勯棿璺�
             type: 'category',
-            data: this.barChartData.map(item => item.name),
+            data: this.barChartData.map(item => item.productionId),
             axisLine: {
               lineStyle: {
                 color: '#FFFFFF'
@@ -770,7 +800,10 @@
               interval: 0, // 鍧愭爣杞村埢搴︽爣绛剧殑鏄剧ず闂撮殧锛屽湪绫荤洰杞翠腑鏈夋晥锛涢粯璁や細閲囩敤鏍囩涓嶉噸鍙犵殑绛栫暐闂撮殧鏄剧ず鏍囩锛涘彲浠ヨ缃垚0寮哄埗鏄剧ず鎵�鏈夋爣绛撅紱濡傛灉璁剧疆涓�1锛岃〃绀恒�庨殧涓�涓爣绛炬樉绀轰竴涓爣绛俱�忥紝濡傛灉鍊间负2锛岃〃绀洪殧涓や釜鏍囩鏄剧ず涓�涓爣绛撅紝浠ユ绫绘帹銆�
               rotate: this.barChartData.length >= 6 ? -30 : 0, // 鍒诲害鏍囩鏃嬭浆鐨勮搴︼紝鍦ㄧ被鐩酱鐨勭被鐩爣绛炬樉绀轰笉涓嬬殑鏃跺�欏彲浠ラ�氳繃鏃嬭浆闃叉鏍囩涔嬮棿閲嶅彔锛涙棆杞殑瑙掑害浠�-90搴﹀埌90搴�
               inside: false, // 鍒诲害鏍囩鏄惁鏈濆唴锛岄粯璁ゆ湞澶�
-              margin: 6 // 鍒诲害鏍囩涓庤酱绾夸箣闂寸殑璺濈
+              margin: 6, // 鍒诲害鏍囩涓庤酱绾夸箣闂寸殑璺濈
+              formatter: value => {
+                return `${this.barChartData.find(item => item.productionId === value).name}`
+              }
             },
             axisTick: {
               show: true,
@@ -778,9 +811,8 @@
             }
           }],
           yAxis: [{
-            name: '鏁伴噺',
-            nameLocation: 'middle',
-            nameGap: 30, // x杞磏ame涓庢í鍧愭爣杞寸嚎鐨勯棿璺�
+            name: '%',
+            max: 100,
             axisLabel: {
               formatter: '{value}',
               color: '#e2e9ff'
@@ -808,7 +840,7 @@
             itemStyle: {
               color: '#55D6A5'
             },
-            showBackground: true,
+            zlevel: 1,
             label: {
               show: true,
               lineHeight: 10,
@@ -822,9 +854,34 @@
                 fontSize: 18
               }
             }
-          }]
+          },
+            {
+              name: '鑳屾櫙',
+              type: 'bar',
+              barWidth: '15%',
+              barGap: '-100%',
+              data: defaultData,
+              itemStyle: {
+                color: '#11294d'
+              }
+            }]
         }
+        option.title.text = moment().subtract(1, 'months').format('M鏈�') + `OEE杞﹂棿`
         this.barChart.setOption(option, true)
+
+        this.barChart.on('click', params => {
+          console.log('params', params)
+          let productionId
+          // 鐐瑰嚮鐨勬槸鏌变綋鐨勫�硷紝鍚﹀垯鐐瑰嚮鐨勪负鏌变綋鑳屾櫙闃村奖
+          if (params.seriesIndex === 0) productionId = params.data.productionId
+          else productionId = params.name
+
+          console.log('productionId', productionId)
+          this.$router.push({
+            name: 'mdc-base-OEEAnalysis',
+            params: { isEquipment: false, productionId }
+          })
+        })
       },
 
       /* 缁樺埗鍙屾煴鍥� */
diff --git a/src/views/dashboard/WorkshopSectionSignage.vue b/src/views/dashboard/WorkshopSectionSignage.vue
index e5bf1e1..3a76eb1 100644
--- a/src/views/dashboard/WorkshopSectionSignage.vue
+++ b/src/views/dashboard/WorkshopSectionSignage.vue
@@ -151,10 +151,12 @@
         gaugeChart2: '',
         gaugeChart3: '',
         gaugeChart4: '',
-        gaugeChartData1: [],
-        gaugeChartData2: [],
-        gaugeChartData3: [],
-        gaugeChartData4: [],
+        gaugeChartData: {
+          utilizationRate: 0,
+          startRate: 0,
+          openRate: 0,
+          overallEquipmentEfficiency: 0
+        },
         barChart: '',
         barChartData: [],
         equipmentId: ''
@@ -168,6 +170,7 @@
     beforeDestroy() {
       window.removeEventListener('resize', this.handleWindowResize)
       if (this.barChartCarouselTime) clearInterval(this.barChartCarouselTime)
+      if (this.lineChartCarouselTime) clearInterval(this.lineChartCarouselTime)
     },
     methods: {
       getChartDataByApi() {
@@ -176,6 +179,7 @@
         this.getRunningStateDataByApi()
         this.getMonthMaintenanceNumByApi()
         this.getLineChartDataByApi()
+        this.getGaugeChartDataByApi()
         this.getBarChartDataByApi()
       },
 
@@ -247,10 +251,20 @@
           })
       },
 
+      /* 璋冪敤鎺ュ彛鑾峰彇璁惧鏁堢巼缁熻 */
+      getGaugeChartDataByApi() {
+        signageApi.getEquipmentEfficiencyStatisticsApi(this.productionCode)
+          .then(res => {
+            console.log('res=', res)
+            if (res.success) this.gaugeChartData = res.result
+            this.drawGaugeChart(res.result.productionId)
+          })
+      },
+
+      /* 璋冪敤鎺ュ彛鑾峰彇涓婃湀OEE */
       getBarChartDataByApi() {
         signageApi.getEquipmentOEEMonthStatisticsApi(this.productionCode)
           .then(res => {
-            console.log('res=', res)
             if (res.success) {
               this.barChartData = res.result.map(item => {
                 return {
@@ -518,8 +532,20 @@
       /* 缁樺埗鎶樼嚎鍥� */
       drawLineChart() {
         this.lineChart = this.$echarts.init(document.getElementById('line_chart'))
+        this.lineChartData.equipmentIdList.forEach(item => {
+          if (!this.lineChartData.dataList.map(item => item.equipmentId).includes(item)) {
+            const equipmentIdObj = {
+              equipmentId: item,
+              openRate: 0,
+              startRate: 0,
+              utilizationRate: 0
+            }
+            this.lineChartData.dataList.push(equipmentIdObj)
+          }
+        })
+        const equipmentIdList = this.lineChartData.dataList.map(item => item.equipmentId)
         const newData = {
-          xAxis: this.lineChartData.dateList,
+          xAxis: equipmentIdList,
           yAxis: [
             {
               name: '鍒╃敤鐜�',
@@ -664,14 +690,23 @@
               }
             }
           ],
-          series: seriesData
-          // dataZoom: {
-          //   show: false,
-          //   startValue: 0, // 浠庡ご寮�濮嬨��
-          //   endValue: 5 // 涓�娆℃�у睍绀哄嚑涓�
-          // }
+          series: seriesData,
+          dataZoom: {
+            show: false,
+            startValue: 0, // 浠庡ご寮�濮嬨��
+            endValue: 6 // 涓�娆℃�у睍绀哄嚑涓�
+          }
         }
         this.lineChart.setOption(option, true)
+
+        if (this.lineChartData.equipmentIdList.length <= 7) return
+        this.lineChartCarouselTime = setInterval(() => {
+          newData.xAxis.push(newData.xAxis.shift())
+          newData.yAxis.forEach(item => item.value.push(item.value.shift()))
+          this.$nextTick(() => {
+            this.lineChart.setOption(option, true)
+          })
+        }, 3000)
       },
 
       /* 缁樺埗浠〃鐩樺浘琛� */
@@ -691,6 +726,7 @@
             }
           },
           tooltip: {
+            trigger: 'item',
             formatter: params => {
               return params.seriesName + '锛�' + params.value + '%'
             }
@@ -770,40 +806,96 @@
       drawGaugeChart1(opt) {
         this.gaugeChart1 = this.$echarts.init(document.getElementById('gauge_chart1'))
         const option = Object.assign({}, opt)
-        option.title.text = '鍒╃敤鐜�'
+        option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + `鍒╃敤鐜嘸
         option.series[0].name = '鍒╃敤鐜�'
-        option.series[0].data = [52]
+        option.series[0].data = [this.gaugeChartData.utilizationRate]
         this.gaugeChart1.setOption(option, true)
+
+        this.gaugeChart1.getZr().on('click', params => {
+          // 浠呮湁鐐瑰嚮琛ㄧ洏鍖哄煙鎵嶄細鏈変互涓嬪睘鎬э紝topTarget琛ㄧず瑙﹀彂浜嬩欢瀵硅薄锛宻hape琛ㄧず瑙﹀彂浜嬩欢瀵硅薄鐨勫浘鍍忓睘鎬э紝clockwise琛ㄧず琛ㄧ洏鏄惁浠ラ『鏃堕拡鎺掑垪锛岄粯璁や负true
+          if (params.topTarget && params.topTarget.shape && params.topTarget.shape.clockwise !== undefined) {
+            this.$router.push({
+              name: 'mdc-base-StatisticsChart',
+              params: {
+                isEquipment: false,
+                productionId: this.gaugeChartData.productionId,
+                tierName: this.gaugeChartData.productionName
+              }
+            })
+          }
+        })
       },
 
       /* 缁樺埗寮�鍔ㄧ巼浠〃鐩樺浘琛� */
       drawGaugeChart2(opt) {
         this.gaugeChart2 = this.$echarts.init(document.getElementById('gauge_chart2'))
         const option = Object.assign({}, opt)
-        option.title.text = '寮�鍔ㄧ巼'
+        option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '寮�鍔ㄧ巼'
         option.series[0].name = '寮�鍔ㄧ巼'
-        option.series[0].data = [21]
+        option.series[0].data = [this.gaugeChartData.startRate]
         this.gaugeChart2.setOption(option, true)
+
+        this.gaugeChart2.getZr().on('click', params => {
+          // 浠呮湁鐐瑰嚮琛ㄧ洏鍖哄煙鎵嶄細鏈変互涓嬪睘鎬э紝topTarget琛ㄧず瑙﹀彂浜嬩欢瀵硅薄锛宻hape琛ㄧず瑙﹀彂浜嬩欢瀵硅薄鐨勫浘鍍忓睘鎬э紝clockwise琛ㄧず琛ㄧ洏鏄惁浠ラ『鏃堕拡鎺掑垪锛岄粯璁や负true
+          if (params.topTarget && params.topTarget.shape && params.topTarget.shape.clockwise !== undefined) {
+            this.$router.push({
+              name: 'mdc-base-StatisticsChart',
+              params: {
+                isEquipment: false,
+                productionId: this.gaugeChartData.productionId,
+                tierName: this.gaugeChartData.productionName
+              }
+            })
+          }
+        })
       },
 
       /* 缁樺埗寮�鏈虹巼浠〃鐩樺浘琛� */
       drawGaugeChart3(opt) {
         this.gaugeChart3 = this.$echarts.init(document.getElementById('gauge_chart3'))
         const option = Object.assign({}, opt)
-        option.title.text = '寮�鏈虹巼'
+        option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '寮�鏈虹巼'
         option.series[0].name = '寮�鏈虹巼'
-        option.series[0].data = [74]
+        option.series[0].data = [this.gaugeChartData.openRate]
         this.gaugeChart3.setOption(option, true)
+
+        this.gaugeChart3.getZr().on('click', params => {
+          // 浠呮湁鐐瑰嚮琛ㄧ洏鍖哄煙鎵嶄細鏈変互涓嬪睘鎬э紝topTarget琛ㄧず瑙﹀彂浜嬩欢瀵硅薄锛宻hape琛ㄧず瑙﹀彂浜嬩欢瀵硅薄鐨勫浘鍍忓睘鎬э紝clockwise琛ㄧず琛ㄧ洏鏄惁浠ラ『鏃堕拡鎺掑垪锛岄粯璁や负true
+          if (params.topTarget && params.topTarget.shape && params.topTarget.shape.clockwise !== undefined) {
+            this.$router.push({
+              name: 'mdc-base-StatisticsChart',
+              params: {
+                isEquipment: false,
+                productionId: this.gaugeChartData.productionId,
+                tierName: this.gaugeChartData.productionName
+              }
+            })
+          }
+        })
       },
 
       /* 缁樺埗OEE浠〃鐩樺浘琛� */
       drawGaugeChart4(opt) {
         this.gaugeChart4 = this.$echarts.init(document.getElementById('gauge_chart4'))
         const option = Object.assign({}, opt)
-        option.title.text = 'OEE'
+        option.title.text = moment().subtract(1, 'months').format('M鏈�') + `OEE`
         option.series[0].name = 'OEE'
-        option.series[0].data = [88]
+        option.series[0].data = [this.gaugeChartData.overallEquipmentEfficiency]
         this.gaugeChart4.setOption(option, true)
+
+        this.gaugeChart4.getZr().on('click', params => {
+          // 浠呮湁鐐瑰嚮琛ㄧ洏鍖哄煙鎵嶄細鏈変互涓嬪睘鎬э紝topTarget琛ㄧず瑙﹀彂浜嬩欢瀵硅薄锛宻hape琛ㄧず瑙﹀彂浜嬩欢瀵硅薄鐨勫浘鍍忓睘鎬э紝clockwise琛ㄧず琛ㄧ洏鏄惁浠ラ『鏃堕拡鎺掑垪锛岄粯璁や负true
+          if (params.topTarget && params.topTarget.shape && params.topTarget.shape.clockwise !== undefined) {
+            this.$router.push({
+              name: 'mdc-base-StatisticsChart',
+              params: {
+                isEquipment: false,
+                productionId: this.gaugeChartData.productionId,
+                tierName: this.gaugeChartData.productionName
+              }
+            })
+          }
+        })
       },
 
       /* 缁樺埗鍗曟煴鍥� */
@@ -932,6 +1024,7 @@
         }
         option.title.text = `${moment().subtract(1, 'months').format('M')}鏈圤EE`
         this.barChart.setOption(option, true)
+
         if (this.barChartData.length <= 6) return
         this.barChartCarouselTime = setInterval(() => {
           this.barChartData.push(this.barChartData.shift())
diff --git a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue
index 10b3f60..d5cad81 100644
--- a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue
+++ b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue
@@ -348,9 +348,12 @@
        * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙�
        */
       handleWindowResize(){
-        const boxHeight = +window.getComputedStyle(document.getElementById('EfficiencyShift')).height.slice(0,-2)
-        const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0,-2)
-        this.scrollY = boxHeight - tableHeadHeight
+        const devicePixelRatio = window.devicePixelRatio // 娴忚鍣ㄧ缉鏀炬瘮
+        if (devicePixelRatio < 1) return // 缂╂斁姣斿皬浜�1鏃朵笉杩涜楂樺害閲嶆柊璁剧疆锛屽洜涓簊crollY鍙樺ぇ鍚庤〃鏍艰秴鍑洪儴鍒嗕細琚殣钘忓鑷存粴鍔ㄦ潯涓嶅彲瑙�
+        const clientHeight = document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
+        const containerTopToClientTopHeight = document.getElementById('EfficiencyShift').getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺�
+        const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2) // 琛ㄦ牸琛ㄥご楂樺害
+        this.scrollY = clientHeight - containerTopToClientTopHeight - tableHeadHeight // 琛ㄦ牸鍨傜洿婊氬姩鏉¢珮搴�
       }
     }
   }
diff --git a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
index 43395c1..a7f309b 100644
--- a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
+++ b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
@@ -293,6 +293,14 @@
     },
     props: { nodeTree: '', Type: '', nodePeople: '' },
     created() {
+      const { isEquipment, productionId } = this.$route.params
+      if (productionId) {
+        console.log('productionId', productionId)
+        console.log('isEquipment', isEquipment)
+        if (!isEquipment) this.queryParam.parentId = productionId
+        else this.queryParam.equipmentId = productionId
+      }
+
       this.queryParam.startTime = moment(this.dates[0]).format('YYYY-MM')
       this.queryParam.endTime = moment(this.dates[1]).format('YYYY-MM')
       this.queryParam.typeTree = '1'
@@ -407,6 +415,8 @@
           this.queryParam.parentId = this.queryParamPeople.parentId
           this.queryParam.equipmentId = ''
         }
+
+
         this.queryParam.pageNo = 1
         this.loadData()
       },
@@ -478,9 +488,12 @@
        * 褰撴祻瑙堝櫒鍙绐楀彛灏哄鍙戠敓鏀瑰彉鏃惰Е鍙�
        */
       handleWindowResize() {
-        const boxHeight = +window.getComputedStyle(document.getElementById('EfficiencyShift')).height.slice(0, -2)
-        const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2)
-        this.scrollY = boxHeight - tableHeadHeight
+        const devicePixelRatio = window.devicePixelRatio // 娴忚鍣ㄧ缉鏀炬瘮
+        if (devicePixelRatio < 1) return // 缂╂斁姣斿皬浜�1鏃朵笉杩涜楂樺害閲嶆柊璁剧疆锛屽洜涓簊crollY鍙樺ぇ鍚庤〃鏍艰秴鍑洪儴鍒嗕細琚殣钘忓鑷存粴鍔ㄦ潯涓嶅彲瑙�
+        const clientHeight = document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
+        const containerTopToClientTopHeight = document.getElementById('EfficiencyShift').getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺�
+        const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2) // 琛ㄦ牸琛ㄥご楂樺害
+        this.scrollY = clientHeight - containerTopToClientTopHeight - tableHeadHeight  // 琛ㄦ牸鍨傜洿婊氬姩鏉¢珮搴�
       }
     }
   }
diff --git a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue
index 50ffa3e..f06041d 100644
--- a/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue
+++ b/src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue
@@ -524,9 +524,9 @@
      * 鍒嗚鲸鐜囨敼鍙樻椂鍚屾椂鏀瑰彉琛ㄦ牸楂樺害宸蹭繚璇侀椤典竴杩涘叆涓嶆嫋鍔ㄥ瀭鐩存粴鍔ㄦ潯鏃跺嵆鍙嫋鍔ㄨ〃鏍兼按骞虫粴鍔ㄦ潯
      */
     handleWindowResize() {
-      const tableContainer = document.getElementById('EfficiencyPO')
-      const clientHeight = document.body.clientHeight
-      const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top
+      const tableContainer = document.getElementById('EfficiencyPO') // 琛ㄦ牸瀹瑰櫒
+      const clientHeight = document.documentElement.clientHeight || document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
+      const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺�
       tableContainer.style.height = (clientHeight - containerTopToClientTopHeight - 32) + 'px'
     }
   }
diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
index 742d00d..dc29ab6 100644
--- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
+++ b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
@@ -567,9 +567,9 @@
        * 鍒嗚鲸鐜囨敼鍙樻椂鍚屾椂鏀瑰彉琛ㄦ牸楂樺害宸蹭繚璇侀椤典竴杩涘叆涓嶆嫋鍔ㄥ瀭鐩存粴鍔ㄦ潯鏃跺嵆鍙嫋鍔ㄨ〃鏍兼按骞虫粴鍔ㄦ潯
        */
       handleWindowResize() {
-        const tableContainer = document.getElementById('Efficiency')
-        const clientHeight = document.body.clientHeight
-        const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top
+        const tableContainer = document.getElementById('Efficiency') // 琛ㄦ牸瀹瑰櫒
+        const clientHeight = document.documentElement.clientHeight || document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
+        const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺�
         tableContainer.style.height = (clientHeight - containerTopToClientTopHeight - 32) + 'px'
       }
     }
diff --git a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue
index a1bcedd..5ff8dba 100644
--- a/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue
+++ b/src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue
@@ -594,9 +594,9 @@
        * 鍒嗚鲸鐜囨敼鍙樻椂鍚屾椂鏀瑰彉琛ㄦ牸楂樺害宸蹭繚璇侀椤典竴杩涘叆涓嶆嫋鍔ㄥ瀭鐩存粴鍔ㄦ潯鏃跺嵆鍙嫋鍔ㄨ〃鏍兼按骞虫粴鍔ㄦ潯
        */
       handleWindowResize() {
-        const tableContainer = document.getElementById('EfficiencyShift')
-        const clientHeight = document.body.clientHeight
-        const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top
+        const tableContainer = document.getElementById('EfficiencyShift') // 琛ㄦ牸瀹瑰櫒
+        const clientHeight = document.documentElement.clientHeight || document.body.clientHeight // 娴忚鍣ㄥ彲瑙嗗尯鍩熼珮搴�
+        const containerTopToClientTopHeight = tableContainer.getBoundingClientRect().top // 琛ㄦ牸瀹瑰櫒椤堕儴鍒版祻瑙堝櫒鍙鍖哄煙椤堕儴鐨勯棿璺�
         tableContainer.style.height = (clientHeight - containerTopToClientTopHeight - 32) + 'px'
       }
     }

--
Gitblit v1.9.3