|
|
|
@ -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)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|