1.首页设备运行总览、月度时长统计报表添加 “维护时间” 字段
2.运行报表 查询二 添加 ”总维护时长(小时)“ 字段
3.设备状态列表 查看详情模态窗内添加 “总维护时间(小时)” 字段
main
liuhr 2 years ago
parent 7d361591fc
commit fb0e273cd6

@ -25,5 +25,6 @@ export class EquipmentOEEEntity {
totalRunningTime!: string; // 总运行时间 totalRunningTime!: string; // 总运行时间
totalAlarmTime!: string; // 总报警时间 totalAlarmTime!: string; // 总报警时间
totalStopTime!: string; // 总待机时间 totalStopTime!: string; // 总待机时间
totalMaintainTime!:string; // 总维护时间
oee!: string;// OEE时序 oee!: string;// OEE时序
} }

@ -264,18 +264,18 @@ const EquipmentStateView = () => {
equipmentRecordApi.getEquipmentStateView().then((res: any) => { equipmentRecordApi.getEquipmentStateView().then((res: any) => {
res.forEach((item: any) => { res.forEach((item: any) => {
if (item.equipmentType == 'All') { if (item.equipmentType == 'All') {
All.push(item.run, item.stop, item.alarm); All.push(item.run, item.stop, item.alarm, item.maintain);
} else if (item.equipmentType == 'Homegrown') { } else if (item.equipmentType == 'Homegrown') {
Homegrown.push(item.run, item.stop, item.alarm); Homegrown.push(item.run, item.stop, item.alarm, item.maintain);
} }
else if (item.equipmentType == 'Import') { else if (item.equipmentType == 'Import') {
Import.push(item.run, item.stop, item.alarm); Import.push(item.run, item.stop, item.alarm, item.maintain);
} }
}); });
let equipmentStateViewOption = { let equipmentStateViewOption = {
color: ['#02ad42', '#7b6a74', '#f60c0f'], //绿 --- ff9800 color: ['#02ad42', '#7b6a74', '#f60c0f', '#ff9800'], //绿 --- ff9800
title: [ title: [
{ {
text: '设备运行状态总览', text: '设备运行状态总览',
@ -330,7 +330,7 @@ const EquipmentStateView = () => {
dataset: { dataset: {
source: { source: {
// product: ['All', 'Homegrown', 'Import'], // product: ['All', 'Homegrown', 'Import'],
product: ['运行', '停机', '报警'], product: ['运行', '停机', '报警', '维护'],
All, All,
Homegrown, Homegrown,
Import, Import,
@ -454,7 +454,7 @@ const EquipmentRecordStateMonthTotal = () => {
// borderWidth: 1, // borderWidth: 1,
// borderColor: '#ccc' // borderColor: '#ccc'
}, },
color: ['#02ad42', '#7b6a74', '#f60c0f'], //绿 --- ff9800 color: ['#02ad42', '#7b6a74', '#f60c0f', '#ff9800'], //绿 --- ff9800 fc8452
tooltip: { tooltip: {
enable: true, enable: true,
show: true, show: true,
@ -466,7 +466,6 @@ const EquipmentRecordStateMonthTotal = () => {
// } // }
// }, // },
// formatter: function (params: any) { // formatter: function (params: any) {
// debugger
// let name = params.name // // let name = params.name //
// let percent = params.percent // // let percent = params.percent //
// let value = params.value[params.encode.value[0]] // // let value = params.value[params.encode.value[0]] //
@ -484,7 +483,7 @@ const EquipmentRecordStateMonthTotal = () => {
legend: { legend: {
top: 1, top: 1,
right: '2%', right: '2%',
data: ['运行时间', '待机时间', '报警时间'] data: ['运行时间', '待机时间', '报警时间', '维护时间']
}, },
xAxis: [ xAxis: [
{ {
@ -521,7 +520,7 @@ const EquipmentRecordStateMonthTotal = () => {
} }
], ],
dataset: { dataset: {
dimensions: ['product', 'totalRunningTime', 'totalAlarmTime', 'totalStopTime'], dimensions: ['product', 'totalRunningTime', 'totalAlarmTime', 'totalStopTime', 'totalMaintainTime'],
source: result source: result
}, },
series: [ series: [
@ -581,6 +580,25 @@ const EquipmentRecordStateMonthTotal = () => {
return value + ' 小时'; return value + ' 小时';
} }
} }
},
{
name: '维护时间',
type: 'bar',
// data: totalMaintainTime,
itemStyle: {
normal: {
label: {
color: '#ff9800',
position: 'top', //
show: true // 线
},
}
},
tooltip: {
valueFormatter: function (value: any) {
return value + ' 小时';
}
}
} }
] ]
} }
@ -642,7 +660,6 @@ const EquipmentRecordOEEMonthTotal = () => {
// } // }
// }, // },
// formatter: function (params: any) { // formatter: function (params: any) {
// debugger
// let name = params.name // // let name = params.name //
// let percent = params.percent // // let percent = params.percent //
// let value = params.value[params.encode.value[0]] // // let value = params.value[params.encode.value[0]] //

@ -19,7 +19,8 @@
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-tooltip content-class="bg-amber text-black shadow-4" :offset="[10, 10]" <q-tooltip content-class="bg-amber text-black shadow-4" :offset="[10, 10]"
content-style="font-size: 12px">选择日期范围</q-tooltip> content-style="font-size: 12px">选择日期范围</q-tooltip>
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy" transition-show="scale"
transition-hide="scale">
<q-date v-model="rangeDate" years-in-month-view landscape range <q-date v-model="rangeDate" years-in-month-view landscape range
mask="YYYY-MM-DD" @update:model-value="rangeDateUpdate"> mask="YYYY-MM-DD" @update:model-value="rangeDateUpdate">
<div class="row"> <div class="row">
@ -28,8 +29,8 @@
color="orange" flat /> color="orange" flat />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-btn v-close-popup label="本年" @click="setCurrYear" color="red" <q-btn v-close-popup label="本年" @click="setCurrYear"
flat /> color="red" flat />
</div> </div>
<div class="col-3"></div> <div class="col-3"></div>
<div class="col-3"> <div class="col-3">
@ -55,10 +56,16 @@
<q-card-section> <q-card-section>
<div class="row q-col-gutter-md items-center"> <div class="row q-col-gutter-md items-center">
<div class="col-xl-6 col-lg-6 col-sm-6"> <div class="col-xl-6 col-lg-6 col-sm-6">
<q-input class="text-h6" outlined readonly label="总运行时间(小时)" v-model="formData.totalRunningTime" /> <q-input class="text-h6" outlined readonly label="总运行时间(小时)"
v-model="formData.totalRunningTime" />
</div> </div>
<div class="col-xl-6 col-lg-6 col-sm-6"> <div class="col-xl-6 col-lg-6 col-sm-6">
<q-input class="text-h6" outlined readonly label="总报警时间(小时)" v-model="formData.totalAlarmTime" /> <q-input class="text-h6" outlined readonly label="总报警时间(小时)"
v-model="formData.totalAlarmTime" />
</div>
<div class="col-xl-6 col-lg-6 col-sm-6">
<q-input class="text-h6" outlined readonly label="总维护时间(小时)"
v-model="formData.totalMaintainTime" />
</div> </div>
<div class="col-xl-6 col-lg-6 col-sm-6"> <div class="col-xl-6 col-lg-6 col-sm-6">
<q-input class="text-h6" outlined readonly label="总待机时间(小时)" v-model="formData.totalStopTime" /> <q-input class="text-h6" outlined readonly label="总待机时间(小时)" v-model="formData.totalStopTime" />
@ -117,6 +124,7 @@ const getPage = () => {
formData.value.totalRunningTime = res.totalRunningTime; //(Math.random() * 100).toFixed(1) formData.value.totalRunningTime = res.totalRunningTime; //(Math.random() * 100).toFixed(1)
formData.value.totalAlarmTime = res.totalAlarmTime; // (Math.random() * 100).toFixed(1) formData.value.totalAlarmTime = res.totalAlarmTime; // (Math.random() * 100).toFixed(1)
formData.value.totalStopTime = res.totalStopTime; // (Math.random() * 100).toFixed(1) formData.value.totalStopTime = res.totalStopTime; // (Math.random() * 100).toFixed(1)
formData.value.totalMaintainTime = res.totalMaintainTime; // (Math.random() * 100).toFixed(1)
formData.value.oee = res.oee; // (res.totalRunningTime / 24).toFixed(2) + '%' // (Math.random() * 24).toFixed(1) formData.value.oee = res.oee; // (res.totalRunningTime / 24).toFixed(2) + '%' // (Math.random() * 24).toFixed(1)
}) })
} }

@ -248,9 +248,7 @@ const EquipmentList = () => {
// obj3.splice(7, 0, templateJSON); // obj3.splice(7, 0, templateJSON);
// obj3.splice(10, 0, templateJSON); // obj3.splice(10, 0, templateJSON);
// obj3.splice(11, 0, templateJSON); // obj3.splice(11, 0, templateJSON);
debugger
for (let i = 1; Coating2Val.length < 22; i++) { for (let i = 1; Coating2Val.length < 22; i++) {
debugger
Coating2Val.push(templateJSON) Coating2Val.push(templateJSON)
} }
list2.value = Coating2Val //obj3 list2.value = Coating2Val //obj3

@ -86,6 +86,8 @@
props.row.totalRunningTime }}</q-td> props.row.totalRunningTime }}</q-td>
<q-td style="font-size: 16px;" key="totalAlarmTime" :props="props">{{ <q-td style="font-size: 16px;" key="totalAlarmTime" :props="props">{{
props.row.totalAlarmTime }}</q-td> props.row.totalAlarmTime }}</q-td>
<q-td style="font-size: 16px;" key="totalMaintainTime" :props="props">{{
props.row.totalMaintainTime }}</q-td>
<q-td style="font-size: 16px;" key="totalStopTime" :props="props">{{ <q-td style="font-size: 16px;" key="totalStopTime" :props="props">{{
props.row.totalStopTime }}</q-td> props.row.totalStopTime }}</q-td>
</q-tr> </q-tr>
@ -150,6 +152,7 @@ const columns = ref([
{ name: 'furnaceNum', align: 'center', label: '开炉次数', field: 'furnaceNum', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, { name: 'furnaceNum', align: 'center', label: '开炉次数', field: 'furnaceNum', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
{ name: 'totalRunningTime', align: 'center', label: '总运行时长(小时)', field: 'totalRunningTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, { name: 'totalRunningTime', align: 'center', label: '总运行时长(小时)', field: 'totalRunningTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
{ name: 'totalAlarmTime', align: 'center', label: '总报警时长(小时)', field: 'totalAlarmTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, { name: 'totalAlarmTime', align: 'center', label: '总报警时长(小时)', field: 'totalAlarmTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
{ name: 'totalMaintainTime', align: 'center', label: '总维护时长(小时)', field: 'totalMaintainTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
{ name: 'totalStopTime', align: 'center', label: '总待机时长(小时)', field: 'totalStopTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, { name: 'totalStopTime', align: 'center', label: '总待机时长(小时)', field: 'totalStopTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
]) ])

Loading…
Cancel
Save