From 76a9e755ef42b12cfcf16ac9f293322a34d348bd Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 16 五月 2024 16:58:00 +0800 Subject: [PATCH] 1、首页公司级和分厂级看板中的问题列表接口完成与后端数据联调 2、问题反馈页面完成所有布局及相关功能 --- src/views/dashboard/EquipmentSignage.vue | 80 ++++++++++++++++++++++++++++++---------- 1 files changed, 60 insertions(+), 20 deletions(-) diff --git a/src/views/dashboard/EquipmentSignage.vue b/src/views/dashboard/EquipmentSignage.vue index e0aa148..9345f9f 100644 --- a/src/views/dashboard/EquipmentSignage.vue +++ b/src/views/dashboard/EquipmentSignage.vue @@ -534,11 +534,21 @@ /* 缁樺埗鍒╃敤鐜囦华琛ㄧ洏鍥捐〃 */ drawGaugeChart1(opt) { const option = Object.assign({}, opt) - option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '鍒╃敤鐜�' - option.series[0].name = '鍒╃敤鐜�' - option.series[0].data = [this.gaugeChartData.utilizationRate] - this.gaugeChart1.setOption(option, true) - setTimeout(() => this.gaugeChart1.hideLoading(), this.hideLoadingDelayTime) + + signageApi.getGaugeColorByTypeApi('lyl') + .then(res => { + if (res.success) { + const colorRange = res.result.map(item => item = [+item.maximumRange / 100, item.rateParameterColor]) + option.series[0].axisLine.lineStyle.color = colorRange + } + }) + .finally(() => { + option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '鍒╃敤鐜�' + option.series[0].name = '鍒╃敤鐜�' + option.series[0].data = [this.gaugeChartData.utilizationRate] + this.gaugeChart1.setOption(option, true) + setTimeout(() => this.gaugeChart1.hideLoading(), this.hideLoadingDelayTime) + }) this.gaugeChart1.getZr().on('click', params => { // 浠呮湁鐐瑰嚮琛ㄧ洏鍖哄煙鎵嶄細鏈変互涓嬪睘鎬э紝topTarget琛ㄧず瑙﹀彂浜嬩欢瀵硅薄锛宻hape琛ㄧず瑙﹀彂浜嬩欢瀵硅薄鐨勫浘鍍忓睘鎬э紝clockwise琛ㄧず琛ㄧ洏鏄惁浠ラ『鏃堕拡鎺掑垪锛岄粯璁や负true @@ -558,11 +568,21 @@ /* 缁樺埗寮�鍔ㄧ巼浠〃鐩樺浘琛� */ drawGaugeChart2(opt) { const option = Object.assign({}, opt) - option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '寮�鍔ㄧ巼' - option.series[0].name = '寮�鍔ㄧ巼' - option.series[0].data = [this.gaugeChartData.startRate] - this.gaugeChart2.setOption(option, true) - setTimeout(() => this.gaugeChart2.hideLoading(), this.hideLoadingDelayTime) + + signageApi.getGaugeColorByTypeApi('lyl') + .then(res => { + if (res.success) { + const colorRange = res.result.map(item => item = [+item.maximumRange / 100, item.rateParameterColor]) + option.series[0].axisLine.lineStyle.color = colorRange + } + }) + .finally(() => { + option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '寮�鍔ㄧ巼' + option.series[0].name = '寮�鍔ㄧ巼' + option.series[0].data = [this.gaugeChartData.startRate] + this.gaugeChart2.setOption(option, true) + setTimeout(() => this.gaugeChart2.hideLoading(), this.hideLoadingDelayTime) + }) this.gaugeChart2.getZr().on('click', params => { // 浠呮湁鐐瑰嚮琛ㄧ洏鍖哄煙鎵嶄細鏈変互涓嬪睘鎬э紝topTarget琛ㄧず瑙﹀彂浜嬩欢瀵硅薄锛宻hape琛ㄧず瑙﹀彂浜嬩欢瀵硅薄鐨勫浘鍍忓睘鎬э紝clockwise琛ㄧず琛ㄧ洏鏄惁浠ラ『鏃堕拡鎺掑垪锛岄粯璁や负true @@ -582,11 +602,21 @@ /* 缁樺埗寮�鏈虹巼浠〃鐩樺浘琛� */ drawGaugeChart3(opt) { const option = Object.assign({}, opt) - option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '寮�鏈虹巼' - option.series[0].name = '寮�鏈虹巼' - option.series[0].data = [this.gaugeChartData.openRate] - this.gaugeChart3.setOption(option, true) - setTimeout(() => this.gaugeChart3.hideLoading(), this.hideLoadingDelayTime) + + signageApi.getGaugeColorByTypeApi('lyl') + .then(res => { + if (res.success) { + const colorRange = res.result.map(item => item = [+item.maximumRange / 100, item.rateParameterColor]) + option.series[0].axisLine.lineStyle.color = colorRange + } + }) + .finally(() => { + option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + '寮�鏈虹巼' + option.series[0].name = '寮�鏈虹巼' + option.series[0].data = [this.gaugeChartData.openRate] + this.gaugeChart3.setOption(option, true) + setTimeout(() => this.gaugeChart3.hideLoading(), this.hideLoadingDelayTime) + }) this.gaugeChart3.getZr().on('click', params => { // 浠呮湁鐐瑰嚮琛ㄧ洏鍖哄煙鎵嶄細鏈変互涓嬪睘鎬э紝topTarget琛ㄧず瑙﹀彂浜嬩欢瀵硅薄锛宻hape琛ㄧず瑙﹀彂浜嬩欢瀵硅薄鐨勫浘鍍忓睘鎬э紝clockwise琛ㄧず琛ㄧ洏鏄惁浠ラ『鏃堕拡鎺掑垪锛岄粯璁や负true @@ -606,11 +636,21 @@ /* 缁樺埗OEE浠〃鐩樺浘琛� */ drawGaugeChart4(opt) { const option = Object.assign({}, opt) - option.title.text = moment().subtract(1, 'months').format('M鏈�') + `OEE` - option.series[0].name = 'OEE' - option.series[0].data = [this.gaugeChartData.overallEquipmentEfficiency] - this.gaugeChart4.setOption(option, true) - setTimeout(() => this.gaugeChart4.hideLoading(), this.hideLoadingDelayTime) + + signageApi.getGaugeColorByTypeApi('lyl') + .then(res => { + if (res.success) { + const colorRange = res.result.map(item => item = [+item.maximumRange / 100, item.rateParameterColor]) + option.series[0].axisLine.lineStyle.color = colorRange + } + }) + .finally(() => { + option.title.text = moment().subtract(1, 'months').format('M鏈�') + `OEE` + option.series[0].name = 'OEE' + option.series[0].data = [this.gaugeChartData.overallEquipmentEfficiency] + this.gaugeChart4.setOption(option, true) + setTimeout(() => this.gaugeChart4.hideLoading(), this.hideLoadingDelayTime) + }) this.gaugeChart4.getZr().on('click', params => { // 浠呮湁鐐瑰嚮琛ㄧ洏鍖哄煙鎵嶄細鏈変互涓嬪睘鎬э紝topTarget琛ㄧず瑙﹀彂浜嬩欢瀵硅薄锛宻hape琛ㄧず瑙﹀彂浜嬩欢瀵硅薄鐨勫浘鍍忓睘鎬э紝clockwise琛ㄧず琛ㄧ洏鏄惁浠ラ『鏃堕拡鎺掑垪锛岄粯璁や负true -- Gitblit v1.9.3