From 621693acae8dad181eb8be6e60ffd73593e1177d Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期二, 14 十一月 2023 16:50:45 +0800
Subject: [PATCH] fix: 修复设备状态组件工序运行时间未正确显示的问题
---
src/views/dashboard/components/DeviceStatusInfo.vue | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/views/dashboard/components/DeviceStatusInfo.vue b/src/views/dashboard/components/DeviceStatusInfo.vue
index de86706..8baea36 100644
--- a/src/views/dashboard/components/DeviceStatusInfo.vue
+++ b/src/views/dashboard/components/DeviceStatusInfo.vue
@@ -34,7 +34,6 @@
</span>
</span>
</span>
- <!-- TODO: 搴旇鏀规垚 plc閲屽彇,缂烘帴鍙� -->
<div class="device-b">宸ュ簭杩愯鏃堕棿锛歿{ runningTime }}</div>
</div>
<div v-if="type == 2" class="color-two">
@@ -74,6 +73,7 @@
import { useTasksStore } from '@/stores/tasks'
import { storeToRefs } from 'pinia'
import type { TasksGroupByChannel } from '@/api/task'
+import { isNumber } from 'lodash-es'
export interface DeviceStatusInfoProps {
plc?: PLCResponse
@@ -150,7 +150,7 @@
* @param channelNumber
*/
function getChannelRunningTask(channelMap?: TasksGroupByChannel, channelNumber?: number) {
- if (!channelMap || !channelNumber) {
+ if (!channelMap || !isNumber(channelNumber)) {
return
}
--
Gitblit v1.8.0