1.修复设备状态详情查询功能未清空问题
2.OEE图表转换百分比
main
liuhr 1 year ago
parent 81c707fe2a
commit 86ef1fe23b

@ -20,3 +20,10 @@ export class EquipmentOEE {
begDate!: string;
endDate!: string;
}
export class EquipmentOEEEntity {
totalRunningTime!: string; // 总运行时间
totalAlarmTime!: string; // 总报警时间
totalStopTime!: string; // 总待机时间
oee!: string;// OEE时序
}

@ -598,7 +598,7 @@ const EquipmentRecordOEEMonthTotal = () => {
month.forEach((m: any) => {
res.forEach((item: any) => {
if (item.totalMonth == m) {
oeeData.push(item.oee);
oeeData.push(item.oee * 100);
}
else {
oeeData.push(0);

@ -55,16 +55,16 @@
<q-card-section>
<div class="row q-col-gutter-md items-center">
<div class="col-xl-6 col-lg-6 col-sm-6">
<q-input class="text-h6" outlined readonly label="总运行时间(小时)" v-model="formData.val1" />
<q-input class="text-h6" outlined readonly label="总运行时间(小时)" v-model="formData.totalRunningTime" />
</div>
<div class="col-xl-6 col-lg-6 col-sm-6">
<q-input class="text-h6" outlined readonly label="总报警时间(小时)" v-model="formData.val2" />
<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.val3" />
<q-input class="text-h6" outlined readonly label="总待机时间(小时)" v-model="formData.totalStopTime" />
</div>
<div class="col-xl-6 col-lg-6 col-sm-6">
<q-input class="text-h6" outlined readonly label="OEE时序" v-model="formData.val4" />
<q-input class="text-h6" outlined readonly label="OEE时序" v-model="formData.oee" />
</div>
</div>
</q-card-section>
@ -77,7 +77,7 @@
</template>
<script setup lang="ts">
import { Notify, date } from 'quasar'
import { EquipmentOEE } from 'src/api/equipmentRecord/model/equipmentRecord'
import { EquipmentOEE, EquipmentOEEEntity } from 'src/api/equipmentRecord/model/equipmentRecord'
import { equipmentRecordApi } from 'src/api/equipmentRecord/equipmentRecordApi';
import { ref } from 'vue';
@ -85,12 +85,8 @@ const rangeDate = ref();
const rangDateText = ref();
const visible = ref(false);
const currObj = ref();
const formData = ref({
val1: 0, //
val2: 0, //
val3: 0, //
val4: '', // OEE
});
const formData = ref(new EquipmentOEEEntity());
const equipmentOEE = ref(new EquipmentOEE());
const clickForm = (e: any) => {
currObj.value = JSON.parse(JSON.stringify(e)); // ;
@ -112,15 +108,16 @@ const setCurrMonthToDay = () => {
}
const getPage = () => {
formData.value = new EquipmentOEEEntity();
if (rangeDate.value) {
equipmentOEE.value.begDate = rangeDate.value.from;
equipmentOEE.value.endDate = rangeDate.value.to;
}
equipmentRecordApi.GetEquipmentOEEMonthTotal(equipmentOEE.value).then((res: any) => {
formData.value.val1 = res.totalRunningTime; //(Math.random() * 100).toFixed(1)
formData.value.val2 = res.totalAlarmTime; // (Math.random() * 100).toFixed(1)
formData.value.val3 = res.totalStopTime; // (Math.random() * 100).toFixed(1)
formData.value.val4 = res.oee; // (res.totalRunningTime / 24).toFixed(2) + '%' // (Math.random() * 24).toFixed(1)
formData.value.totalRunningTime = res.totalRunningTime; //(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.oee = res.oee; // (res.totalRunningTime / 24).toFixed(2) + '%' // (Math.random() * 24).toFixed(1)
})
}

Loading…
Cancel
Save