From 8f4d079c073edd5d95118158fc60800473026073 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 09 五月 2024 14:51:31 +0800 Subject: [PATCH] 1、首页调整技术状态图表禁用显示颜色 2、首页设备级看板操作证信息增加操作工字段 3、全局设备组选择设备增加按照设备编号查询功能 --- src/views/dashboard/IndexSignage.vue | 206 ++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 168 insertions(+), 38 deletions(-) diff --git a/src/views/dashboard/IndexSignage.vue b/src/views/dashboard/IndexSignage.vue index 334ba0d..8681db6 100644 --- a/src/views/dashboard/IndexSignage.vue +++ b/src/views/dashboard/IndexSignage.vue @@ -15,39 +15,11 @@ <div id="warranty_malfunction_chart" style="width:50%;height: 340px;"></div> </div> <div class="support-plan-container"> - <!--<div v-for="item in supportPlanList" class="support-plan-item"--> - <!--:style="{background:item.background}">--> - <!--<div>{{item.label}}</div>--> - <!--<div class="plan-value-container">--> - <!--<div class="plan-value">{{item.value}}</div>--> - <!--<div>鍙�</div>--> - <!--</div>--> - <!--</div>--> - <div class="support-plan-item" style="background:#5FE0AF"> - <div>鏈湀涓変繚璁″垝</div> + <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">{{thisMonthMaintenancePlanNum}}</div> - <div>鍙�</div> - </div> - </div> - <div class="support-plan-item" style="background:#409EFF"> - <div>鏈湀瀹屾垚</div> - <div class="plan-value-container"> - <div class="plan-value">{{thisMonthMaintenanceRealNum}}</div> - <div>鍙�</div> - </div> - </div> - <div class="support-plan-item" style="background:#D6BC52"> - <div>涓嬫湀涓変繚璁″垝</div> - <div class="plan-value-container"> - <div class="plan-value">{{nextMonthMaintenancePlanNum}}</div> - <div>鍙�</div> - </div> - </div> - <div class="support-plan-item" style="background:#58D9F9"> - <div>涓嬩笅鏈堜笁淇濊鍒�</div> - <div class="plan-value-container"> - <div class="plan-value">{{nextNextMonthMaintenancePlanNum}}</div> + <div class="plan-value">{{$data[item.planValueLabel]}}</div> <div>鍙�</div> </div> </div> @@ -68,15 +40,21 @@ </dv-border-box-9> </div> </div> + + <SignageModal :modalVisible="modalVisible" :modalTitle=modalTitle :modalDataApiUrl="modalDataApiUrl" + :modalTableColumns="modalTableColumns" + @closeModal="modalVisible=false"/> </div> </template> <script> import signageApi from '@/api/signage' import moment from 'moment' + import SignageModal from './modules/SignageModal' export default { name: 'IndexSignage', + components: { SignageModal }, data() { return { runningStateChart: '', @@ -100,6 +78,28 @@ { value: '10', name: '鍋滄満' }, { value: '8', name: '杩愯' } ], + supportPlanList: [ + { + planTime: '鏈湀涓変繚璁″垝', + planValueLabel: 'thisMonthMaintenancePlanNum', + backgroundColor: '#5FE0AF' + }, + { + planTime: '鏈湀瀹屾垚', + planValueLabel: 'thisMonthMaintenanceRealNum', + backgroundColor: '#409EFF' + }, + { + planTime: '涓嬫湀涓変繚璁″垝', + planValueLabel: 'nextMonthMaintenancePlanNum', + backgroundColor: '#D6BC52' + }, + { + planTime: '涓嬩笅鏈堜笁淇濊鍒�', + planValueLabel: 'nextNextMonthMaintenancePlanNum', + backgroundColor: '#58D9F9' + } + ], thisMonthMaintenancePlanNum: 0, thisMonthMaintenanceRealNum: 0, nextMonthMaintenancePlanNum: 0, @@ -111,7 +111,11 @@ doubleBarChartData: {}, efficiencyChartConfig: {}, maintenanceConfig: {}, - problemConfig: {} + problemConfig: {}, + modalVisible: false, + modalTitle: '', + modalDataApiUrl: '', + modalTableColumns: [] } }, mounted() { @@ -431,7 +435,7 @@ } }, xAxis: { - name: '鍗曚綅', + name: '', nameTextStyle: { color: '#fff' }, @@ -558,7 +562,7 @@ } ] } - option.title.text = `${moment().format('M鏈圖鏃�')}鍒╃敤鐜嘸 + option.title.text = `${moment().subtract(1, 'days').format('M鏈圖鏃�')}鍒╃敤鐜嘸 this.efficiencyChart.setOption(option, true) this.efficiencyChart.hideLoading() this.efficiencyChart.on('click', params => { @@ -638,7 +642,7 @@ center: ['45%', '60%'], color: [ '#0FC61A', - '#0DAF15', + '#F56436', '#8B8B8B' ], label: { @@ -665,6 +669,50 @@ } this.techConditionChart.setOption(option, true) this.techConditionChart.hideLoading() + + // this.techConditionChart.on('click', params => { + // console.log('params', params) + // this.modalTitle = '鎶�鏈姸鎬�' + // this.modalTableColumns = [ + // { + // title: '#', + // dataIndex: '', + // key: 'rowIndex', + // width: 60, + // align: 'center', + // customRender: function(t, r, index) { + // return parseInt(index) + 1 + // } + // }, + // { + // title: '璁惧缂栧彿', + // dataIndex: 'equipmentId', + // key: 'equipmentId' + // }, + // { + // title: '璁惧鍚嶇О', + // dataIndex: 'equipmentName', + // key: 'equipmentName' + // }, + // { + // title: '璁惧鍨嬪彿', + // dataIndex: 'equipmentModel', + // key: 'equipmentModel' + // }, + // { + // title: '璁惧绫诲瀷', + // key: 'equipmentType', + // dataIndex: 'equipmentType' + // }, + // { + // title: '椹卞姩绫诲瀷', + // key: 'driveType', + // dataIndex: 'driveType' + // } + // ] + // this.modalDataApiUrl = '/mdc/mdcEquipment/list' + // this.modalVisible = true + // }) }, /* 缁樺埗璁惧鎶ヤ慨鏁呴殰楗煎浘 */ @@ -744,6 +792,45 @@ } this.warrantyMalfunctionChart.setOption(option, true) this.warrantyMalfunctionChart.hideLoading() + + // this.warrantyMalfunctionChart.on('click', params => { + // console.log('params', params) + // this.modalTitle = '鎶ヤ慨鏁呴殰' + // this.modalTableColumns = [ + // { + // title: '#', + // dataIndex: '', + // key: 'rowIndex', + // width: 60, + // align: 'center', + // customRender: function(t, r, index) { + // return parseInt(index) + 1 + // } + // }, + // { + // title: '绫诲瀷', + // align: 'center', + // dataIndex: 'planCloseType' + // }, + // { + // title: '鏃堕棿绫诲瀷', + // align: 'center', + // dataIndex: 'planCloseTimeType' + // }, + // { + // title: '鏃堕暱锛堝垎閽燂級', + // align: 'center', + // dataIndex: 'planCloseTimeLong' + // }, + // { + // title: '澶囨敞', + // align: 'center', + // dataIndex: 'remark' + // } + // ] + // this.modalDataApiUrl = '/mdc/mdcPlanClose/list' + // this.modalVisible = true + // }) }, /* 缁樺埗杞﹂棿淇濆吇婊氬姩琛� */ @@ -756,7 +843,7 @@ evenRowBGC: '#295562', data: this.twoMaintenanceChartData, index: true, - columnWidth: [100], + columnWidth: [100, 300, 300, 300], align: ['center', 'center', 'center', 'center'] } }, @@ -836,7 +923,7 @@ interval: yAxisInterval, axisLabel: { formatter: '{value}', - color: '#e2e9ff' + color: '#fff' }, axisTick: { show: false @@ -1083,6 +1170,48 @@ }, /** + * 鐐瑰嚮涓変繚灞曠ず鏍忓悗鎵撳紑寮圭獥 + * @param record 鐐瑰嚮褰撳墠涓変繚淇℃伅 + */ + openMaintenanceModal(record) { + this.modalTitle = record.planTime + this.modalTableColumns = [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '绫诲瀷', + align: 'center', + dataIndex: 'planCloseType' + }, + { + title: '鏃堕棿绫诲瀷', + align: 'center', + dataIndex: 'planCloseTimeType' + }, + { + title: '鏃堕暱锛堝垎閽燂級', + align: 'center', + dataIndex: 'planCloseTimeLong' + }, + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark' + } + ] + this.modalDataApiUrl = '/mdc/mdcPlanClose/list' + // this.modalVisible = true + }, + + /** * 绐楀彛灏哄鍙樺寲鏃惰Е鍙� * 璋冩暣鍥捐〃灏哄浠ラ�傚簲鍒嗚鲸鐜� */ @@ -1127,6 +1256,7 @@ padding: 5px 20px; font-size: 20px; margin-bottom: 10px; + cursor: pointer; .plan-value-container { display: flex; -- Gitblit v1.9.3