| | |
| | | </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 |
| | |
| | | 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) |
| | |
| | | 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) |
| | | }) |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | /* 绘制设备运行状态玫瑰饼图 */ |
| | | drawRunningStateChart() { |
| | | drawRunningStateChart(productionId) { |
| | | this.runningStateChart = this.$echarts.init(document.getElementById('running_state_chart')) |
| | | const option = { |
| | | title: { |
| | |
| | | ] |
| | | } |
| | | this.runningStateChart.setOption(option, true) |
| | | |
| | | this.runningStateChart.on('click', params => { |
| | | this.$router.push({ |
| | | name: 'mdc-base-DeviceBaseInfo', |
| | | params: { signageData: params.data, productionId } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /* 绘制折线图 */ |
| | |
| | | } |
| | | } |
| | | ], |
| | | series: seriesData, |
| | | series: seriesData |
| | | // dataZoom: { |
| | | // show: false, |
| | | // startValue: 0, // 从头开始。 |