From a144a18ab582fd3a8c945cba60bc364dbe7f31e8 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 28 三月 2024 16:59:55 +0800 Subject: [PATCH] 1、新增点击设备运行状态图标跳转至设备监控页面并根据状态及当前层级筛选页面对应数据 2、新增点击设备利用率的横向柱状图跳转至统计分析页面并根据所点击层级筛选页面对应数据 3、解决router.push以及router.replace跳转后报错 --- src/views/dashboard/BranchFactorySignage.vue | 48 +++++++++++++++++------------------------------- 1 files changed, 17 insertions(+), 31 deletions(-) diff --git a/src/views/dashboard/BranchFactorySignage.vue b/src/views/dashboard/BranchFactorySignage.vue index 4de1dc3..7699025 100644 --- a/src/views/dashboard/BranchFactorySignage.vue +++ b/src/views/dashboard/BranchFactorySignage.vue @@ -118,28 +118,6 @@ barChartData: [], doubleBarChart: '', doubleBarChartData: {}, - supportPlanList: [ - { - label: '鏈湀涓変繚璁″垝', - value: 299, - background: '#719D8E' - }, - { - label: '鏈湀瀹屾垚', - value: 229, - background: '#409EFF' - }, - { - label: '涓嬫湀涓変繚璁″垝', - value: 319, - background: '#A8985D' - }, - { - label: '涓嬩笅鏈堜笁淇濊鍒�', - value: 329, - background: '#58D9F9' - } - ], maintenanceConfig: {}, problemConfig: {} } @@ -148,10 +126,6 @@ window.addEventListener('resize', this.handleWindowResize) this.drawCharts() this.getChartDataByApi() - }, - activated() { - console.log('瑙﹀彂activated') - this.handleWindowResize() }, beforeDestroy() { window.removeEventListener('resize', this.handleWindowResize) @@ -172,8 +146,8 @@ getRunningStateDataByApi() { signageApi.getEquipmentStatusStatisticsApi(this.productionCode) .then(res => { - if (res.success) this.runningStateData = res.result - this.drawRunningStateChart() + if (res.success) this.runningStateData = res.result.list + this.drawRunningStateChart(res.result.producitonId) }) }, @@ -276,7 +250,7 @@ }, /* 缁樺埗璁惧杩愯鐘舵�佺帿鐟伴ゼ鍥� */ - drawRunningStateChart() { + drawRunningStateChart(productionId) { this.runningStateChart = this.$echarts.init(document.getElementById('running_state_chart')) const option = { height: 300, @@ -356,6 +330,14 @@ ] } this.runningStateChart.setOption(option, true) + + this.runningStateChart.on('click', params => { + console.log('params', params) + this.$router.push({ + name: 'mdc-base-DeviceBaseInfo', + params: { signageData: params.data, productionId } + }) + }) }, /* 缁樺埗璁惧鍒╃敤鐜囪兌鍥婂浘 */ @@ -549,11 +531,15 @@ this.efficiencyChart.setOption(option, true) this.efficiencyChart.on('click', params => { - // 鐐瑰嚮瑙﹀彂鐨勪负鏌辩姸浣擄紝闄ゆ闄ゅ鏄爣棰� if (params.componentType === 'series') { console.log('seriesParams===========', params) - + const productionId = this.efficiencyData.find(item => item.productionCode === params.name).productionId + const tierName = this.efficiencyData.find(item => item.productionCode === params.name).name + this.$router.push({ + name: 'mdc-base-StatisticsChart', + params: { isEquipment: false, productionId, tierName } + }) } else { console.log('yAxisParams===========', params) this.$emit('switchToNextSignage', { signageName: 'WorkshopSection', productionCode: params.value }) -- Gitblit v1.9.3