From 15a9f1b16ae150eda723592917878c3c524d2e72 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 28 三月 2024 17:31:18 +0800 Subject: [PATCH] 调整车间层级看板设备运行状态统计图表内外圈直径 --- src/views/dashboard/BranchFactorySignage.vue | 53 +++++++++++++++++++---------------------------------- 1 files changed, 19 insertions(+), 34 deletions(-) diff --git a/src/views/dashboard/BranchFactorySignage.vue b/src/views/dashboard/BranchFactorySignage.vue index 4de1dc3..997f634 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,10 +250,9 @@ }, /* 缁樺埗璁惧杩愯鐘舵�佺帿鐟伴ゼ鍥� */ - drawRunningStateChart() { + drawRunningStateChart(productionId) { this.runningStateChart = this.$echarts.init(document.getElementById('running_state_chart')) const option = { - height: 300, title: { show: true, // 鏄惁鏄剧ず鏍囬锛岄粯璁や负true text: '璁惧杩愯鐘舵�佺粺璁�', // 涓绘爣棰樻枃鏈� @@ -325,8 +298,8 @@ type: 'pie', roseType: 'angle', // 鐜懓鍥� // selectedMode: "single", - radius: ['60%', '80%'], - center: ['50%', '60%'], + radius: ['40%', '60%'], + center: ['53%', '50%'], color: [ '#686869', '#AA6349', @@ -356,6 +329,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 +530,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