| | |
| | | <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 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:#FCAA29"> |
| | | <div>延期</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{maintenanceExtensionNum}}</div> |
| | | <div>台</div> |
| | | </div> |
| | | </div> |
| | | <div class="support-plan-item" style="background:#F56C6C"> |
| | | <div>超期</div> |
| | | <div class="plan-value-container"> |
| | | <div class="plan-value">{{maintenanceOverdueNum}}</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> |
| | |
| | | </dv-border-box-9> |
| | | </div> |
| | | </div> |
| | | |
| | | <SignageModal :modalVisible="modalVisible" :modalTitle=modalTitle :modalDataApiUrl="modalDataApiUrl" |
| | | :modalDataApiParams="modalDataApiParams" |
| | | @closeModal="modalVisible=false"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import signageApi from '@/api/signage' |
| | | import moment from 'moment' |
| | | import SignageModal from './modules/SignageModal' |
| | | |
| | | export default { |
| | | name: 'WorkshopSectionSignage', |
| | | components: { SignageModal }, |
| | | props: { |
| | | productionCode: { |
| | | type: String, |
| | |
| | | { value: '0', name: '停机' }, |
| | | { value: '0', name: '运行' } |
| | | ], |
| | | supportPlanList: [ |
| | | { |
| | | planTime: '本月三保计划', |
| | | planValueLabel: 'thisMonthMaintenancePlanNum', |
| | | backgroundColor: '#5FE0AF', |
| | | apiUrl: '/eam/calibrationOrder/showThisMonthMaintenanceList' |
| | | }, |
| | | |
| | | { |
| | | planTime: '本月完成量', |
| | | planValueLabel: 'thisMonthMaintenanceRealNum', |
| | | backgroundColor: '#409EFF', |
| | | apiUrl: '/eam/calibrationOrder/showThisMonthMaintenanceFinishList' |
| | | }, |
| | | { |
| | | planTime: '延期', |
| | | planValueLabel: 'maintenanceExtensionNum', |
| | | backgroundColor: '#FCAA29', |
| | | apiUrl: '/eam/calibrationOrder/show3MaintenancePostponeList' |
| | | }, |
| | | |
| | | { |
| | | planTime: '超期', |
| | | planValueLabel: 'maintenanceOverdueNum', |
| | | backgroundColor: '#F56C6C', |
| | | apiUrl: '/eam/calibrationOrder/show3MaintenanceOverdueList' |
| | | }, |
| | | { |
| | | planTime: '下月计划', |
| | | planValueLabel: 'nextMonthMaintenancePlanNum', |
| | | backgroundColor: '#D6BC52', |
| | | apiUrl: '/eam/calibrationOrder/showNextMonthMaintenanceList' |
| | | }, |
| | | { |
| | | planTime: '下下月计划', |
| | | planValueLabel: 'nextNextMonthMaintenancePlanNum', |
| | | backgroundColor: '#58D9F9', |
| | | apiUrl: '/eam/calibrationOrder/showNextNextMonthMaintenanceList' |
| | | } |
| | | ], |
| | | thisMonthMaintenancePlanNum: 0, |
| | | thisMonthMaintenanceRealNum: 0, |
| | | maintenanceExtensionNum: 0, |
| | |
| | | }, |
| | | barChart: '', |
| | | barChartData: [], |
| | | equipmentId: '' |
| | | equipmentId: '', |
| | | modalVisible: false, |
| | | modalTitle: '', |
| | | modalDataApiUrl: '', |
| | | modalTableColumns: [], |
| | | modalDataApiParams: {} |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | .then(res => { |
| | | if (res.success && res.result) { |
| | | this.techConditionData = [ |
| | | { value: res.result[0].qualifiedCount, name: '合格' }, |
| | | { value: res.result[0].disabledCount, name: '禁用' }, |
| | | { value: res.result[0].limitedUseCount, name: '限用' } |
| | | { 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.drawTechConditionChart() |
| | |
| | | .then(res => { |
| | | if (res.success && res.result) { |
| | | this.warrantyMalfunctionData = [ |
| | | { value: res.result[0].failurTotalCount, name: '报修' }, |
| | | { value: res.result[0].stopCount, name: '停机' }, |
| | | { value: res.result[0].noStopCount, name: '运行' } |
| | | { value: res.result[0].failurTotalCount, name: '报修', isStop: '' }, |
| | | { value: res.result[0].stopCount, name: '停机', isStop: '2' }, |
| | | { value: res.result[0].noStopCount, name: '运行', isStop: '1' } |
| | | ] |
| | | } |
| | | this.drawWarrantyMalfunctionChart() |
| | |
| | | } |
| | | this.techConditionChart.setOption(option, true) |
| | | this.techConditionChart.hideLoading() |
| | | |
| | | this.techConditionChart.on('click', params => { |
| | | this.modalTitle = `技术状态(${params.name})` |
| | | this.modalDataApiParams = { |
| | | technologyStatus: this.techConditionData.find(item => item.name === params.name).technologyStatus, |
| | | productionCode: this.productionCode |
| | | } |
| | | this.modalDataApiUrl = '/eam/calibrationOrder/showEquipmentByTechnologyStatus' |
| | | this.modalVisible = true |
| | | }) |
| | | }, |
| | | |
| | | /* 绘制设备报修故障饼图 */ |
| | |
| | | } |
| | | this.warrantyMalfunctionChart.setOption(option, true) |
| | | this.warrantyMalfunctionChart.hideLoading() |
| | | |
| | | this.warrantyMalfunctionChart.on('click', params => { |
| | | this.modalTitle = `报修故障(${params.name})` |
| | | this.modalDataApiParams = { |
| | | isStop: this.warrantyMalfunctionData.find(item => item.name === params.name).isStop, |
| | | productionCode: this.productionCode |
| | | } |
| | | this.modalDataApiUrl = '/eam/calibrationOrder/showEquipmentByReportRepair' |
| | | this.modalVisible = true |
| | | }) |
| | | }, |
| | | |
| | | /* 绘制设备运行状态玫瑰饼图 */ |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 点击三保展示栏后打开弹窗 |
| | | * @param record 点击当前三保信息 |
| | | */ |
| | | openMaintenanceModal(record) { |
| | | this.modalTitle = record.planTime |
| | | this.modalDataApiParams = { |
| | | productionCode: this.productionCode |
| | | } |
| | | this.modalDataApiUrl = record.apiUrl |
| | | this.modalVisible = true |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * 窗口尺寸变化时触发 |
| | | * 调整图表尺寸以适应分辨率 |
| | | */ |
| | |
| | | width: 30%; |
| | | padding: 5px 10px; |
| | | margin-bottom: 10px; |
| | | cursor: pointer; |
| | | |
| | | .plan-value-container { |
| | | display: flex; |