songshankun
2023-11-20 3a3cc473c33cb4a97399ace76a1b35e9ffd68525
src/stores/plc.ts
@@ -27,8 +27,7 @@
  } = useRequest(
    () =>
      getProductProgress({
        channel: taskStore.activeTask?.Channel,
        procedureId: taskStore.activeTask?.Procedure.ID
        channel: taskStore.activeChannel ?? 0
      } as ProductProgressParams),
    {
      manual: true,
@@ -42,7 +41,7 @@
     * 如果切换到其他通道的任务,则重新轮询plc
     */
    unwatch.value = watch(
      () => taskStore.activeTask?.Channel,
      () => taskStore.activeChannel,
      () => {
        cancelPLCPolling()
        startPLCPolling()