| | |
| | | <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> |
| | |
| | | </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: '', |
| | |
| | | { 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, |
| | |
| | | doubleBarChartData: {}, |
| | | efficiencyChartConfig: {}, |
| | | maintenanceConfig: {}, |
| | | problemConfig: {} |
| | | problemConfig: {}, |
| | | modalVisible: false, |
| | | modalTitle: '', |
| | | modalDataApiUrl: '', |
| | | modalTableColumns: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | } |
| | | }, |
| | | xAxis: { |
| | | name: '单位', |
| | | name: '', |
| | | nameTextStyle: { |
| | | color: '#fff' |
| | | }, |
| | |
| | | } |
| | | ] |
| | | } |
| | | option.title.text = `${moment().format('M月D日')}利用率` |
| | | option.title.text = `${moment().subtract(1, 'days').format('M月D日')}利用率` |
| | | this.efficiencyChart.setOption(option, true) |
| | | this.efficiencyChart.hideLoading() |
| | | this.efficiencyChart.on('click', params => { |
| | |
| | | center: ['45%', '60%'], |
| | | color: [ |
| | | '#0FC61A', |
| | | '#0DAF15', |
| | | '#F56436', |
| | | '#8B8B8B' |
| | | ], |
| | | label: { |
| | |
| | | } |
| | | 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 |
| | | // }) |
| | | }, |
| | | |
| | | /* 绘制设备报修故障饼图 */ |
| | |
| | | } |
| | | 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 |
| | | // }) |
| | | }, |
| | | |
| | | /* 绘制车间保养滚动表 */ |
| | |
| | | evenRowBGC: '#295562', |
| | | data: this.twoMaintenanceChartData, |
| | | index: true, |
| | | columnWidth: [100], |
| | | columnWidth: [100, 300, 300, 300], |
| | | align: ['center', 'center', 'center', 'center'] |
| | | } |
| | | }, |
| | |
| | | interval: yAxisInterval, |
| | | axisLabel: { |
| | | formatter: '{value}', |
| | | color: '#e2e9ff' |
| | | color: '#fff' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 点击三保展示栏后打开弹窗 |
| | | * @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 |
| | | }, |
| | | |
| | | /** |
| | | * 窗口尺寸变化时触发 |
| | | * 调整图表尺寸以适应分辨率 |
| | | */ |
| | |
| | | padding: 5px 20px; |
| | | font-size: 20px; |
| | | margin-bottom: 10px; |
| | | cursor: pointer; |
| | | |
| | | .plan-value-container { |
| | | display: flex; |