From e2d90f5f4031363b2cdbfb7f094b7b6639eb294e Mon Sep 17 00:00:00 2001
From: bsw215583320 <baoshiwei121@163.com>
Date: 星期一, 25 十一月 2024 21:05:16 +0800
Subject: [PATCH] 在 BigFaultCloud 组件中添加实时故障记录查询功能

---
 src/views/dry/bigScreen/BigFaultCloud.vue |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/views/dry/bigScreen/BigFaultCloud.vue b/src/views/dry/bigScreen/BigFaultCloud.vue
index 62d1500..3ec3f30 100644
--- a/src/views/dry/bigScreen/BigFaultCloud.vue
+++ b/src/views/dry/bigScreen/BigFaultCloud.vue
@@ -296,6 +296,7 @@
 	import { Icon, IconPicker, SvgIcon } from '/@/components/Icon/index'
 	import { defHttp } from '/@/utils/http/axios'
 	import { queryById, listAll } from '../api/DryEquipment.api'
+  import { queryByOrderId } from '../dryFaultRecord/DryFaultRecord.api'
 	import { dryEquipment } from '../dataDefine/DryEquipment.data'
 	import { useUserStore } from '/@/store/modules/user'
 	const domRef = ref<Nullable<HTMLElement>>(null)
@@ -530,11 +531,24 @@
         res.totalRemain = res.remain - (res.dryTime - totalTime) > 0 ? res.remain - (res.dryTime - totalTime) : 0
 				// console.log(`output->res`, res.detailList[res.detailList.length-1])
 				realData.value = res
+        getRealFault()
 			})
 		}
 	}
 
 
+  function getRealFault() {
+    return new Promise((resolve, reject) => {
+      queryByOrderId({ orderId: realData.value.code, tenantId: tenant.value }).then((res) => {
+        console.log(`output->res`, res)
+
+        // 寰幆鍒楄〃锛屾牴鎹粨鏉熸椂闂村拰寮�濮嬫椂闂达紝璁$畻鏁呴殰鏃堕暱
+        res.forEach((item) => {
+          item.totalTime = item.endTime - item.startTime
+        })
+})
+    })
+  }
 
 
 	var move = true

--
Gitblit v1.9.3