From 15a9f1b16ae150eda723592917878c3c524d2e72 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 28 三月 2024 17:31:18 +0800 Subject: [PATCH] 调整车间层级看板设备运行状态统计图表内外圈直径 --- src/views/dashboard/WorkshopSectionSignage.vue | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/views/dashboard/WorkshopSectionSignage.vue b/src/views/dashboard/WorkshopSectionSignage.vue index 8c9094f..a925756 100644 --- a/src/views/dashboard/WorkshopSectionSignage.vue +++ b/src/views/dashboard/WorkshopSectionSignage.vue @@ -73,7 +73,8 @@ </div> <div style="width: 30%"> <dv-border-box-9 style="padding: 15px"> - <a-form layout="inline" @keyup.enter.native="$emit('switchToNextSignage', { signageName: 'Equipment', productionCode: equipmentId })"> + <a-form layout="inline" + @keyup.enter.native="$emit('switchToNextSignage', { signageName: 'Equipment', productionCode: equipmentId })"> <a-form-item label="璁惧缂栧彿"> <!--<a-input v-model="equipmentId" size="large"></a-input>--> <a-auto-complete @@ -198,11 +199,6 @@ this.drawCharts() this.getChartDataByApi() }, - activated() { - console.log('瑙﹀彂activated') - this.handleWindowResize() - if (this.barChartCarouselTime) clearInterval(this.barChartCarouselTime) - }, beforeDestroy() { window.removeEventListener('resize', this.handleWindowResize) if (this.barChartCarouselTime) clearInterval(this.barChartCarouselTime) @@ -249,8 +245,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) }) }, @@ -443,7 +439,7 @@ }, /* 缁樺埗璁惧杩愯鐘舵�佺帿鐟伴ゼ鍥� */ - drawRunningStateChart() { + drawRunningStateChart(productionId) { this.runningStateChart = this.$echarts.init(document.getElementById('running_state_chart')) const option = { title: { @@ -521,6 +517,13 @@ ] } this.runningStateChart.setOption(option, true) + + this.runningStateChart.on('click', params => { + this.$router.push({ + name: 'mdc-base-DeviceBaseInfo', + params: { signageData: params.data, productionId } + }) + }) }, /* 缁樺埗鎶樼嚎鍥� */ @@ -661,7 +664,7 @@ } } ], - series: seriesData, + series: seriesData // dataZoom: { // show: false, // startValue: 0, // 浠庡ご寮�濮嬨�� -- Gitblit v1.9.3