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/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