From 1519870c0e18171ced014a840e86a459dc6b00f1 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 12 十二月 2023 17:26:06 +0800 Subject: [PATCH] 报工记录列表增加人员姓名 --- src/stores/plc.ts | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/stores/plc.ts b/src/stores/plc.ts index 50e7926..83ff4cd 100644 --- a/src/stores/plc.ts +++ b/src/stores/plc.ts @@ -5,6 +5,7 @@ import { useRequest } from 'vue-hooks-plus' import { useTasksStore } from '@/stores/tasks' import type { PLCResponse } from '@/api/plc' +import { PLC_POLLING_DURATION } from '@/common/constants' // 鍏ㄥ眬 watcher ref 闃叉澶氭璋冪敤 usePLCStore 鏃堕噸澶嶆敞鍐屼睛鍚櫒 const unwatch = ref() @@ -26,12 +27,12 @@ } = useRequest( () => getProductProgress({ - channel: taskStore.activeTask?.Channel, - procedureId: taskStore.activeTask?.Procedure.ID + channel: taskStore.activeChannel ?? 0, + procedureId: taskStore.activeTask?.Procedure.ID ?? undefined } as ProductProgressParams), { manual: true, - pollingInterval: 6000, + pollingInterval: PLC_POLLING_DURATION, pollingWhenHidden: false } ) @@ -41,7 +42,7 @@ * 濡傛灉鍒囨崲鍒板叾浠栭�氶亾鐨勪换鍔�,鍒欓噸鏂拌疆璇lc */ unwatch.value = watch( - () => taskStore.activeTask?.Channel, + () => taskStore.activeChannel, () => { cancelPLCPolling() startPLCPolling() -- Gitblit v1.8.0