From f1ce06843ba7498ff0966d506304670e687c29ae Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 05 九月 2025 17:47:57 +0800 Subject: [PATCH] 1、mdc首页工段级看板删除二保计划 2、调整mdc首页整体背景颜色 --- src/views/dashboard/WorkshopSectionSignage.vue | 514 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 254 insertions(+), 260 deletions(-) diff --git a/src/views/dashboard/WorkshopSectionSignage.vue b/src/views/dashboard/WorkshopSectionSignage.vue index 5d2e786..976e442 100644 --- a/src/views/dashboard/WorkshopSectionSignage.vue +++ b/src/views/dashboard/WorkshopSectionSignage.vue @@ -7,29 +7,17 @@ </div> <dv-border-box-9 style="padding: 15px 15px 0"> - <div id="tech_condition_chart" style="width:100%;height: 240px;"></div> - <div id="warranty_malfunction_chart" style="width:100%;height: 240px;"></div> - <div> - <div style="display: flex;flex-direction:column;align-items: center"> - <dv-decoration-11 style="width:45%;height:60px;color: #fff;font-size: 20px;align-self: flex-start">涓変繚璁″垝 - </dv-decoration-11> - <div class="support-plan-container"> - <div v-for="(item,index) in supportPlanList" :key="index" class="support-plan-item" - :style="{background:item.backgroundColor}" @click="openMaintenanceModal(item)"> - <div>{{item.planTime}}</div> - <div class="plan-value-container"> - <div class="plan-value">{{$data[item.planValueLabel]}}</div> - <div>鍙�</div> - </div> + <div id="tech_condition_chart" style="width:100%;height: 280px;"></div> + <div id="warranty_malfunction_chart" style="width:100%;height: 280px;"></div> + <div style="display: flex;flex-direction:column;align-items: center;margin-top: 40px"> + <div class="support-plan-container"> + <div v-for="(item,index) in supportPlanList" :key="index" class="support-plan-item" + :style="{background:item.backgroundColor}" @click="openMaintenanceModal(item)"> + <div>{{item.planTime}}</div> + <div class="plan-value-container"> + <div class="plan-value">{{$data[item.planValueLabel]}}</div> + <div>鍙�</div> </div> - </div> - </div> - - <div style="display: flex;margin-top: 10px;justify-content: space-between;align-items: center;"> - <dv-decoration-11 style="width:45%;height:60px;font-size: 20px;color: #fff">浜屼繚璁″垝</dv-decoration-11> - <div - style="flex:1;text-align:center;font-size: 25px;color: #9BD890;overflow: hidden;text-overflow: ellipsis;white-space: nowrap"> - 2024骞�4鏈�1鏃ュぇ淇� </div> </div> </div> @@ -79,6 +67,7 @@ import signageApi from '@/api/signage' import moment from 'moment' import SignageModal from './modules/SignageModal' + import * as echarts from 'echarts' export default { name: 'WorkshopSectionSignage', @@ -124,40 +113,38 @@ { planTime: '鏈湀涓変繚璁″垝', planValueLabel: 'thisMonthMaintenancePlanNum', - backgroundColor: '#5FE0AF', - apiUrl: '/eam/calibrationOrder/showThisMonthMaintenanceList' + backgroundColor: '#719D8E', + code: 'bysbzs' }, - { planTime: '鏈湀瀹屾垚閲�', planValueLabel: 'thisMonthMaintenanceRealNum', backgroundColor: '#409EFF', - apiUrl: '/eam/calibrationOrder/showThisMonthMaintenanceFinishList' + code: 'bwc' }, { planTime: '寤舵湡', planValueLabel: 'maintenanceExtensionNum', - backgroundColor: '#FCAA29', - apiUrl: '/eam/calibrationOrder/show3MaintenancePostponeList' + backgroundColor: '#E89D29', + code: '' }, - { planTime: '瓒呮湡', planValueLabel: 'maintenanceOverdueNum', backgroundColor: '#F56C6C', - apiUrl: '/eam/calibrationOrder/show3MaintenanceOverdueList' + code: '' }, { planTime: '涓嬫湀璁″垝', planValueLabel: 'nextMonthMaintenancePlanNum', - backgroundColor: '#D6BC52', - apiUrl: '/eam/calibrationOrder/showNextMonthMaintenanceList' + backgroundColor: '#A8985D', + code: 'xysb' }, { planTime: '涓嬩笅鏈堣鍒�', planValueLabel: 'nextNextMonthMaintenancePlanNum', backgroundColor: '#58D9F9', - apiUrl: '/eam/calibrationOrder/showNextNextMonthMaintenanceList' + code: 'xxysb' } ], thisMonthMaintenancePlanNum: 0, @@ -204,78 +191,83 @@ methods: { /* 璋冪敤鎺ュ彛鑾峰彇鍥捐〃鏁版嵁姹囨�绘柟娉� */ getChartDataByApi() { - this.getTechConditionDataByApi() - this.getWarrantyMalfunctionDataByApi() + this.getTechConditionAndWarrantyMalfunctionDataByApi() this.getRunningStateDataByApi() - this.getMonthMaintenanceNumByApi() + this.getThirdMaintenanceNumByApi() this.getFirst7DaysEfficiencyDataByApi() this.getGaugeChartDataByApi() this.getBarChartDataByApi() }, - /* 璋冪敤鎺ュ彛鑾峰彇鎶�鏈姸鎬� */ - getTechConditionDataByApi() { + /* 璋冪敤鎺ュ彛鑾峰彇鎶�鏈姸鎬佷笌鏁呴殰鎶ヤ慨 */ + getTechConditionAndWarrantyMalfunctionDataByApi() { this.techConditionChart = this.$echarts.init(document.getElementById('tech_condition_chart')) + this.warrantyMalfunctionChart = this.$echarts.init(document.getElementById('warranty_malfunction_chart')) this.techConditionChart.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0, 0, 0, .45)' }) - signageApi.getEquipmentTechnologyStatusListApi(this.productionCode) - .then(res => { - if (res.success && res.result) { - this.techConditionData = [ - { value: res.result[0].qualifiedCount, name: '鍚堟牸', technologyStatus: 'qualified' }, - { value: res.result[0].disabledCount, name: '绂佺敤', technologyStatus: 'disabled' }, - { value: res.result[0].limitedUseCount, name: '闄愮敤', technologyStatus: 'limitedUse' } - ] - this.techConditionChartRequireFinished = true - this.drawTechConditionChart() - } - }) - }, - - /* 璋冪敤鎺ュ彛鑾峰彇璁惧鎶ヤ慨鏁呴殰 */ - getWarrantyMalfunctionDataByApi() { - this.warrantyMalfunctionChart = this.$echarts.init(document.getElementById('warranty_malfunction_chart')) this.warrantyMalfunctionChart.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0, 0, 0, .45)' }) - signageApi.getReportRepairEquipmentListApi(this.productionCode) + signageApi.getEquipmentTechnologyStatusAndReportRepairEquipmentListApi(this.productionCode) .then(res => { if (res.success && res.result) { - this.warrantyMalfunctionData = [ - { value: res.result[0].failurTotalCount, name: '鎶ヤ慨', isStop: '' }, - { value: res.result[0].stopCount, name: '鍋滄満', isStop: '2' }, - { value: res.result[0].noStopCount, name: '杩愯', isStop: '1' } + this.techConditionData = [ + { + value: res.result.jszt.length > 0 ? res.result.jszt.find(item => item.code === 'QUALIFIED').value : 0, + name: '鍚堟牸', + technologyStatus: 'QUALIFIED' + }, + { + value: res.result.jszt.length > 0 ? res.result.jszt.find(item => item.code === 'RESTRICTED').value : 0, + name: '闄愮敤', + technologyStatus: 'RESTRICTED' + }, + { + value: res.result.jszt.length > 0 ? res.result.jszt.find(item => item.code === 'PROHIBITED').value : 0, + name: '绂佺敤', + technologyStatus: 'PROHIBITED' + } ] + this.warrantyMalfunctionData = [ + { + value: res.result.bxqk.length > 0 ? res.result.bxqk.find(item => item.code === 'run').value : 0, + name: '杩愯', + code: 'run' + }, + { + value: res.result.bxqk.length > 0 ? res.result.bxqk.find(item => item.code === 'stop').value : 0, + name: '鍋滄満', + code: 'stop' + }, + { + value: res.result.bxqk.length > 0 ? res.result.bxqk.find(item => item.code === 'bx').value : 0, + name: '鎶ヤ慨', + code: 'bx' + } + ] + this.techConditionChartRequireFinished = true this.warrantyMalfunctionChartRequireFinished = true + this.drawTechConditionChart() this.drawWarrantyMalfunctionChart() } }) }, /* 璋冪敤鎺ュ彛鑾峰彇涓変繚璁″垝 */ - getMonthMaintenanceNumByApi() { - signageApi.getThisMonthMaintenanceListApi(this.productionCode) + getThirdMaintenanceNumByApi() { + signageApi.getThirdMaintenanceConditionApi(this.productionCode) .then(res => { - if (res.success && res.result) this.thisMonthMaintenancePlanNum = res.result[0].totalCount - }) - signageApi.getThisMonthMaintenanceFinishListApi(this.productionCode) - .then(res => { - if (res.success && res.result) this.thisMonthMaintenanceRealNum = res.result[0].totalCount - }) - signageApi.getNextMonthMaintenanceList(this.productionCode) - .then(res => { - if (res.success && res.result) this.nextMonthMaintenancePlanNum = res.result[0].totalCount - }) - signageApi.getNextNextMonthMaintenanceListApi(this.productionCode) - .then(res => { - if (res.success && res.result) this.nextNextMonthMaintenancePlanNum = res.result[0].totalCount + if (res.success && res.result) { + this.thisMonthMaintenancePlanNum = res.result.find(item => item.code === 'bysbzs').value + this.thisMonthMaintenanceRealNum = res.result.find(item => item.code === 'bwc').value + this.nextMonthMaintenancePlanNum = res.result.find(item => item.code === 'xysb').value + this.nextNextMonthMaintenancePlanNum = res.result.find(item => item.code === 'xxysb').value + } }) }, @@ -285,8 +277,7 @@ this.runningStateChart.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0,0,0,.45)' }) signageApi.getEquipmentStatusStatisticsApi(this.productionCode) .then(res => { @@ -305,8 +296,7 @@ this.first7DaysEfficiencyChart.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0,0,0,.45)' }) signageApi.getEquipmentDayUtilizationStatisticsApi(this.productionCode) .then(res => { @@ -326,26 +316,22 @@ this.gaugeChart1.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0,0,0,.45)' }) this.gaugeChart2.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0,0,0,.45)' }) this.gaugeChart3.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0,0,0,.45)' }) this.gaugeChart4.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0,0,0,.45)' }) signageApi.getEquipmentEfficiencyStatisticsApi(this.productionCode) .then(res => { @@ -360,12 +346,11 @@ this.barChart.showLoading({ text: '鏁版嵁鍔犺浇涓� ...', color: '#0696e1', // 鍔犺浇鍔ㄧ敾棰滆壊 - textColor: '#fff', - maskColor: 'rgba(1, 25, 75, 0.2)' // 閬僵灞� + textColor: 'rgba(0,0,0,.45)' }) signageApi.getEquipmentOEEMonthStatisticsApi(this.productionCode) .then(res => { - if (res.success && res.result && res.result.length > 0) { + if (res.success && res.result) { this.barChartData = res.result.map(item => { return { name: item.equipmentId, @@ -374,7 +359,6 @@ }) this.drawBarChart() } - }) }, @@ -404,17 +388,15 @@ top: 'bottom', orient: 'horizontal', right: 0, - // bottom: "0", itemWidth: 14, itemHeight: 14, icon: 'roundRect', itemGap: 15, textStyle: { - color: 'inherit', - fontSize: 14, - padding: [0, 0, 0, 0] + color: 'rgba(0,0,0,.45)', + fontSize: 14 }, - data: ['鍚堟牸', '绂佺敤', '闄愮敤'] + data: ['鍚堟牸', '闄愮敤', '绂佺敤'] }, grid: { containLabel: true @@ -422,20 +404,17 @@ series: [ { type: 'pie', - // selectedMode: "single", radius: this.pieChartRadius, center: ['50%', '50%'], color: [ - '#0FC61A', - '#F56436', - '#8B8B8B' + '#0AA012', + '#247F49', + '#757160' ], label: { position: 'outside', show: true, - color: 'inherit', - // textBorderColor: 'inherit', - // textBorderWidth: 1, + color: 'rgba(0,0,0,.45)', fontSize: 16, formatter: function(params) { if (params.name !== '') { @@ -446,7 +425,10 @@ labelLine: { show: true, length2: 15, - length: 15 + length: 15, + lineStyle: { + color: 'rgba(0,0,0,.45)' + } }, data: this.techConditionData } @@ -466,12 +448,12 @@ }) }, - /* 缁樺埗璁惧鎶ヤ慨鏁呴殰楗煎浘 */ + /* 缁樺埗璁惧鎶ヤ慨鏁呴殰鎯呭喌楗煎浘 */ drawWarrantyMalfunctionChart() { const option = { title: { show: true, // 鏄惁鏄剧ず鏍囬锛岄粯璁や负true - text: '璁惧鎶ヤ慨鏁呴殰', // 涓绘爣棰樻枃鏈� + text: '璁惧鎶ヤ慨鏁呴殰鎯呭喌', // 涓绘爣棰樻枃鏈� x: 'left', // 鏍囬姘村钩瀹夋斁浣嶇疆锛屽彲閫夊�间负'left'銆�'center'銆�'right'鎴栧叿浣撶殑姘村钩鍧愭爣鍊� y: 'top', // 鏍囬鍨傜洿瀹夋斁浣嶇疆锛屽彲閫夊�间负'top'銆�'bottom'銆�'center'鎴栧叿浣撶殑鍨傜洿鍧愭爣鍊� textStyle: { @@ -492,15 +474,13 @@ top: 'bottom', orient: 'horizontal', right: 0, - // bottom: "0", itemWidth: 14, itemHeight: 14, icon: 'roundRect', itemGap: 15, textStyle: { - color: 'inherit', - fontSize: 14, - padding: [0, 0, 0, 0] + color: 'rgba(0,0,0,.45)', + fontSize: 14 }, data: ['鎶ヤ慨', '鍋滄満', '杩愯'] }, @@ -510,20 +490,17 @@ series: [ { type: 'pie', - // selectedMode: "single", radius: this.pieChartRadius, center: ['50%', '50%'], color: [ - '#24F2F5', - '#F56436', - '#FFFF40' + '#00CED1', + '#B85B38', + '#FFFF88' ], label: { position: 'outside', show: true, - color: 'inherit', - // textBorderColor: 'inherit', - // textBorderWidth: 1, + color: 'rgba(0,0,0,.45)', fontSize: 16, formatter: function(params) { if (params.name !== '') { @@ -534,7 +511,10 @@ labelLine: { show: true, length2: 15, - length: 15 + length: 15, + lineStyle: { + color: 'rgba(0,0,0,.45)' + } }, data: this.warrantyMalfunctionData } @@ -559,7 +539,7 @@ const option = { title: { show: true, // 鏄惁鏄剧ず鏍囬锛岄粯璁や负true - text: '璁惧鐘舵��', // 涓绘爣棰樻枃鏈� + text: '璁惧杩愯鐘舵�佺粺璁�', // 涓绘爣棰樻枃鏈� x: 'left', // 鏍囬姘村钩瀹夋斁浣嶇疆锛屽彲閫夊�间负'left'銆�'center'銆�'right'鎴栧叿浣撶殑姘村钩鍧愭爣鍊� y: 'top', // 鏍囬鍨傜洿瀹夋斁浣嶇疆锛屽彲閫夊�间负'top'銆�'bottom'銆�'center'鎴栧叿浣撶殑鍨傜洿鍧愭爣鍊� textStyle: { @@ -580,17 +560,15 @@ top: 'bottom', orient: 'horizontal', right: 0, - // bottom: "0", itemWidth: 14, itemHeight: 14, icon: 'roundRect', itemGap: 15, textStyle: { - color: 'inherit', - fontSize: 14, - padding: [0, 0, 0, 0] + color: 'rgba(0,0,0,.45)', + fontSize: 14 }, - data: ['鍏虫満', '鎶ヨ', '寰呮満', '杩愯'] + data: ['杩愯', '寰呮満', '鎶ヨ', '鍏虫満'] }, grid: { containLabel: true @@ -599,22 +577,19 @@ { type: 'pie', roseType: 'angle', // 鐜懓鍥� - // selectedMode: "single", radius: this.pieChartRadius, center: ['50%', '50%'], color: [ - '#8B8B8B', - '#F56436', - '#FFFF40', - '#0FC61A' + '#686869', + '#AA6349', + '#FFFF88', + '#5D975D' ], label: { position: 'outside', show: true, - color: 'inherit', - // textBorderColor: 'inherit', - // textBorderWidth: 1, - fontSize: 30, + color: 'rgba(0,0,0,.45)', + fontSize: 16, formatter: function(params) { if (params.name !== '') { return `${params.name}:${params.value}` @@ -624,7 +599,10 @@ labelLine: { show: true, length2: 20, - length: 30 + length: 30, + lineStyle: { + color: 'rgba(0,0,0,.45)' + } }, data: this.runningStateData } @@ -660,7 +638,7 @@ xAxis: equipmentIdList, yAxis: [ { - name: '鍒╃敤鐜�', + name: 'TEEP', value: this.first7DaysEfficiencyData.dataList.map(item => item.utilizationRate) }, { @@ -671,22 +649,22 @@ name: '寮�鏈虹巼', value: this.first7DaysEfficiencyData.dataList.map(item => item.openRate) } - ], - yAxisName: '鍓�7澶╁埄鐢ㄧ巼(%)' + ] } let legendData = [] let seriesData = [] - let colorArr = ['#A7F0C1', '#FAE893', '#66DFE2'] + let colorArr = ['#1890FF', '#2EC35C', '#EA967B'] legendData = newData.yAxis.map((item) => item.name) seriesData = newData.yAxis.map((item1, index1) => { return { name: item1.name, type: 'bar', symbol: 'circle', + barGap: '0%', symbolSize: 8, itemStyle: { color: colorArr[index1], - barBorderRadius: 100 + barBorderRadius: 4 }, lineStyle: { width: 2 @@ -695,10 +673,35 @@ show: true }, yAxisIndex: 1, - data: item1.value // 鎶樼嚎鍥剧殑鏁版嵁 + data: item1.value,// 鎶樼嚎鍥剧殑鏁版嵁 + label: { + show: true, + lineHeight: 10, + formatter: params => { + if (+params.value === 0) return '' + else return params.value + }, + position: index1 % 2 === 0 ? 'top' : 'inside', + textStyle: { + color: 'rgba(0,0,0,.45)', + fontSize: 10 + } + } } }) const option = { + title: { + show: true, // 鏄惁鏄剧ず鏍囬锛岄粯璁や负true + text: '鍓�7澶㏕EEP(%)', // 涓绘爣棰樻枃鏈� + x: 'left', // 鏍囬姘村钩瀹夋斁浣嶇疆锛屽彲閫夊�间负'left'銆�'center'銆�'right'鎴栧叿浣撶殑姘村钩鍧愭爣鍊� + y: 'top', // 鏍囬鍨傜洿瀹夋斁浣嶇疆锛屽彲閫夊�间负'top'銆�'bottom'銆�'center'鎴栧叿浣撶殑鍨傜洿鍧愭爣鍊� + textStyle: { + // 涓绘爣棰樻枃鏈牱寮� + fontSize: 18, + fontWeight: 'normal', + color: '#1AD8DE' + } + }, grid: { containLabel: true, bottom: '1%', @@ -730,7 +733,7 @@ itemGap: 10, textStyle: { fontSize: 14, - color: '#fff' + color: 'rgba(0,0,0,.45)' } }, xAxis: { @@ -739,13 +742,13 @@ interval: 0, show: true, fontSize: 14, - color: '#fff' - // rotate: -30, + margin: 10, + color: 'rgba(0,0,0,.45)' }, axisLine: { show: true, lineStyle: { - color: '#fff' + color: 'rgba(0,0,0,.45)' } }, axisTick: { @@ -758,8 +761,7 @@ name: newData.yAxisName, nameTextStyle: { color: '#1AD8DE', - fontSize: 18, - padding: [0, 0, 0, 110] + fontSize: 18 }, nameGap: 30, type: 'value', @@ -767,17 +769,14 @@ axisLine: { show: true, lineStyle: { - color: '#fff' + color: 'rgba(0,0,0,.45)' } }, axisTick: { show: false }, splitLine: { - show: false, - lineStyle: { - color: '#fff' - } + show: false } }, { @@ -787,23 +786,20 @@ max: 100, axisLabel: { show: true, - color: '#fff', + color: 'rgba(0,0,0,.45)', fontSize: 14 }, axisLine: { show: true, lineStyle: { - color: '#fff' + color: 'rgba(0,0,0,.45)' } }, axisTick: { show: true }, splitLine: { - show: false, - lineStyle: { - color: '#fff' - } + show: false } } ], @@ -813,15 +809,6 @@ startValue: 0, // 浠庡ご寮�濮嬨�� endValue: 6 // 涓�娆℃�у睍绀哄嚑涓� } - // toolbox: { - // show: true, - // feature: { - // mark: { show: true }, - // magicType: { show: true, type: ['line', 'bar'] }, - // restore: { show: true }, - // saveAsImage: { show: true, name: '鍓�7澶╁埄鐢ㄧ巼缁熻鍥�', pixelRatio: 1 } - // } - // } } this.first7DaysEfficiencyChart.setOption(option, true) this.first7DaysEfficiencyChart.hideLoading() @@ -841,6 +828,7 @@ // 璁惧鍒楄〃澶т簬7涓椂寮�鍚嚜鍔ㄨ疆鎾� if (this.first7DaysEfficiencyData.mdcEquipmentList.length <= 7) return this.first7DaysEfficiencyChartCarouselTime = setInterval(() => { + colorArr.push(colorArr.shift()) newData.xAxis.push(newData.xAxis.shift()) newData.yAxis.forEach(item => item.value.push(item.value.shift())) this.$nextTick(() => { @@ -893,14 +881,14 @@ show: true, length: 10, lineStyle: { - color: '#fff', + color: 'rgba(0,0,0,.45)', width: 2 } }, axisTick: { length: 5, lineStyle: { - color: '#fff', + color: 'rgba(0,0,0,.45)', width: 1 } }, @@ -953,8 +941,8 @@ } }) .finally(() => { - option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + `鍒╃敤鐜嘸 - option.series[0].name = '鍒╃敤鐜�' + option.title.text = moment().subtract(1, 'days').format('M鏈圖鏃�') + `TEEP` + option.series[0].name = 'TEEP' option.series[0].data = [this.gaugeChartData.utilizationRate] this.gaugeChart1.setOption(option, true) this.gaugeChart1.hideLoading() @@ -1078,7 +1066,9 @@ drawBarChart() { const defaultData = [] const colorArray = ['#79CEAA', '#F589A2', '#6FBF9D', '#66DFE2', '#A7F0C1', '#FAE893', '#F7B7A0'] - const dataMax = +this.barChartData.sort((x, y) => +y.value - +x.value)[0].value + let barTopColor = ['#EA967B', '#62AC75', '#32ACBF', '#7196CE'] + let barBottomColor = ['#F8E18B', '#A8D07C', '#7BCAC5', '#8DCCEF'] + const dataMax = this.barChartData.length > 0 ? +this.barChartData.sort((x, y) => +y.value - +x.value)[0].value : 0 let yAxisMax if (dataMax === 0) yAxisMax = 1 // 鑻ユ暟鎹腑鏈�澶у�间负0锛屽垯灏嗚儗鏅粯璁ゅ�艰缃负1 else yAxisMax = Math.ceil(dataMax / 5) * 5 // 璁剧疆鏌卞浘鑳屾櫙闃村奖榛樿鍊硷紝鎬濊矾涓烘暟鎹渶澶у�兼渶鎺ヨ繎鐨勮兘琚�5鏁撮櫎鐨勬暟瀛� @@ -1116,31 +1106,26 @@ left: '6%', right: '3%' }, - xAxis: [ - { - // name: '涓婁釜鏈圤EE', - // nameLocation: 'middle', - // nameGap: 40, // x杞磏ame涓庢í鍧愭爣杞寸嚎鐨勯棿璺� - type: 'category', - data: xAisData, - axisLine: { - lineStyle: { - color: '#fff' - } - }, - axisLabel: { - show: true, // 鏄惁鏄剧ず鍒诲害鏍囩锛岄粯璁ゆ樉绀� - interval: 0, // 鍧愭爣杞村埢搴︽爣绛剧殑鏄剧ず闂撮殧锛屽湪绫荤洰杞翠腑鏈夋晥锛涢粯璁や細閲囩敤鏍囩涓嶉噸鍙犵殑绛栫暐闂撮殧鏄剧ず鏍囩锛涘彲浠ヨ缃垚0寮哄埗鏄剧ず鎵�鏈夋爣绛撅紱濡傛灉璁剧疆涓�1锛岃〃绀恒�庨殧涓�涓爣绛炬樉绀轰竴涓爣绛俱�忥紝濡傛灉鍊间负2锛岃〃绀洪殧涓や釜鏍囩鏄剧ず涓�涓爣绛撅紝浠ユ绫绘帹銆� - // rotate: this.barChartData.length >= 5 ? -30 : 0, // 鍒诲害鏍囩鏃嬭浆鐨勮搴︼紝鍦ㄧ被鐩酱鐨勭被鐩爣绛炬樉绀轰笉涓嬬殑鏃跺�欏彲浠ラ�氳繃鏃嬭浆闃叉鏍囩涔嬮棿閲嶅彔锛涙棆杞殑瑙掑害浠�-90搴﹀埌90搴� - inside: false, // 鍒诲害鏍囩鏄惁鏈濆唴锛岄粯璁ゆ湞澶� - margin: 6, // 鍒诲害鏍囩涓庤酱绾夸箣闂寸殑璺濈 - fontSize: 14 - }, - axisTick: { - show: true, - alignWithLabel: true + xAxis: { + type: 'category', + data: xAisData, + axisLine: { + lineStyle: { + color: 'rgba(0,0,0,.45)' } - }], + }, + axisLabel: { + show: true, // 鏄惁鏄剧ず鍒诲害鏍囩锛岄粯璁ゆ樉绀� + interval: 0, // 鍧愭爣杞村埢搴︽爣绛剧殑鏄剧ず闂撮殧锛屽湪绫荤洰杞翠腑鏈夋晥锛涢粯璁や細閲囩敤鏍囩涓嶉噸鍙犵殑绛栫暐闂撮殧鏄剧ず鏍囩锛涘彲浠ヨ缃垚0寮哄埗鏄剧ず鎵�鏈夋爣绛撅紱濡傛灉璁剧疆涓�1锛岃〃绀恒�庨殧涓�涓爣绛炬樉绀轰竴涓爣绛俱�忥紝濡傛灉鍊间负2锛岃〃绀洪殧涓や釜鏍囩鏄剧ず涓�涓爣绛撅紝浠ユ绫绘帹銆� + inside: false, // 鍒诲害鏍囩鏄惁鏈濆唴锛岄粯璁ゆ湞澶� + margin: 10, // 鍒诲害鏍囩涓庤酱绾夸箣闂寸殑璺濈 + fontSize: 14 + }, + axisTick: { + show: true, + alignWithLabel: true + } + }, yAxis: [ { name: '%', @@ -1150,7 +1135,7 @@ position: 'left', axisLabel: { formatter: '{value}', - color: '#fff', + color: 'rgba(0,0,0,.45)', fontSize: 14 }, axisTick: { @@ -1159,14 +1144,11 @@ axisLine: { show: true, lineStyle: { - color: '#fff' + color: 'rgba(0,0,0,.45)' } }, splitLine: { - show: false, - lineStyle: { - color: 'rgba(255,255,255,0.12)' - } + show: false } }, { @@ -1174,48 +1156,68 @@ axisLine: { show: true, lineStyle: { - color: '#fff' + color: 'rgba(0,0,0,.45)' } } } ], - series: [{ - type: 'bar', - data: this.barChartData, - barWidth: this.barChartData.length > 5 ? '40%' : 30, - itemStyle: { - color: function(params) { - let num = colorArray.length - return colorArray[params.dataIndex % num] - }, - barBorderRadius: 100 - }, - label: { - show: false, - lineHeight: 10, - formatter: params => { - if (+params.value === 0) return '' - else return params.value - }, - position: 'inside', - textStyle: { - color: '#fff', - fontSize: 18 - } - }, - zlevel: 1 - }, + series: [ { - name: '鑳屾櫙', - type: 'bar', - barWidth: this.barChartData.length > 5 ? '40%' : 30, - barGap: '-100%', - data: defaultData, + type: 'pictorialBar', + symbolSize: [26, 10], + symbolOffset: [0, -5], + z: 12, itemStyle: { - color: '#11294d', - barBorderRadius: 100 - } - }], + color: function(params) { + return barBottomColor[params.dataIndex % barBottomColor.length] + } + }, + label: { + show: true, + position: 'top', + fontSize: 12, + color: 'rgba(0,0,0,.45)' + }, + symbolPosition: 'end', + data: this.barChartData + }, + { + type: 'pictorialBar', + symbolSize: [26, 10], + symbolOffset: [0, 5], + z: 12, + itemStyle: { + color: function(params) { + return barTopColor[params.dataIndex % barTopColor.length] + } + }, + data: this.barChartData + }, + { + type: 'bar', + itemStyle: { + color: function(params) { + return new echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [{ + offset: 1, + color: barTopColor[params.dataIndex % barTopColor.length] + }, + { + offset: 0, + color: barBottomColor[params.dataIndex % barBottomColor.length] + } + ] + ) + }, + opacity: .9 + }, + z: 16, + barWidth: 26, + barGap: '-100%', + data: this.barChartData + } + ], dataZoom: { show: false, startValue: 0, // 浠庡ご寮�濮嬨�� @@ -1239,7 +1241,8 @@ this.barChartCarouselTime = setInterval(() => { this.barChartData.push(this.barChartData.shift()) xAisData.push(xAisData.shift()) - colorArray.push(colorArray.shift()) + barTopColor.push(barTopColor.shift()) + barBottomColor.push(barBottomColor.shift()) this.$nextTick(() => { this.barChart.setOption(option, true) }) @@ -1272,9 +1275,10 @@ openMaintenanceModal(record) { this.modalTitle = record.planTime this.modalDataApiParams = { - productionCode: this.productionCode + productionCode: this.productionCode, + code: record.code } - this.modalDataApiUrl = record.apiUrl + this.modalDataApiUrl = '/eam/home/maintenanceList' this.modalVisible = true }, @@ -1314,15 +1318,6 @@ <style lang="less" scoped> .page-container { - .page-title { - display: flex; - justify-content: space-evenly; - flex-wrap: wrap; - color: #fff; - margin-bottom: 10px; - - } - .content-container { padding-top: 5px; display: flex; @@ -1335,7 +1330,6 @@ justify-content: space-around; flex-wrap: wrap; color: #fff; - padding-top: 20px; .support-plan-item { border-radius: 3px; @@ -1352,7 +1346,7 @@ .plan-value { margin-right: 20px; font-size: 30px; - color: #EAC910; + color: #fff; } } } @@ -1374,7 +1368,7 @@ } /deep/ .ant-form .ant-form-item-label label { - color: #fff; + color: rgba(0, 0, 0, .45); font-size: 18px; } @@ -1384,16 +1378,16 @@ /deep/ .ant-select-selection__clear { background: transparent !important; - color: #fff; + color: rgba(0, 0, 0, .45); } /deep/ .ant-select { - color: #fff; + color: rgba(0, 0, 0, .45); } /deep/ .ant-input { - border: 1px solid #689ACA; - color: #fff; + border: 1px solid rgba(0, 0, 0, .45); + color: rgba(0, 0, 0, .45); background: transparent !important; } </style> \ No newline at end of file -- Gitblit v1.9.3