From e4f79a7e36214e5836cb0e667b3ffbd3db45456d Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 22 十月 2024 23:54:26 +0800 Subject: [PATCH] 工单变量删除优化,预览优化 --- src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts b/src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts index a9a8b4d..3bc1df4 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-10-22 01:00:21 + * @LastEditTime: 2024-10-22 23:36:24 */ import { Ref, h, ref, render, unref } from 'vue'; @@ -32,11 +32,14 @@ import { buildUUID } from '/@/utils/uuid'; import { mesApi } from '/@/api/tigerapi/mes/mesApi'; import { useProdRouteStore } from '/@/store/modules/prodRoute'; +import { useWebSocketStore } from '/@/store/modules/websocket'; +import { useGlobSetting } from '/@/hooks/setting'; const { t } = useI18n(); const { createErrorModal } = useMessage(); const useProdRoute = useProdRouteStore(); const { getLocale } = useLocale(); +const globSetting = useGlobSetting(); function _default() { /* 瀹氫箟鍙橀噺 */ const isNormal = (type: number) => type === 0; @@ -874,7 +877,25 @@ param.values['WORK_ORDER'] = param.others['WORK_ORDER']; param.values['ID'] = buildUUID(); - await AddOrEditLabelVarByWorkOrder(param.values as unknown as BAS_LABEL_VAR_WO); + const apiaction = await AddOrEditLabelVarByWorkOrder( + param.values as unknown as BAS_LABEL_VAR_WO, + ); + if (apiaction.IsSuccessed) { + const webSocketStore = useWebSocketStore(); + if (webSocketStore.GetSocketState == 1) { + webSocketStore.sendMessage( + `wsGetNew ${param.values['LABEL_ID']}_#_${ param.values['WORK_ORDER']}`, + ); + } + } + case 'delete': + const webSocketStore = useWebSocketStore(); + if (webSocketStore.GetSocketState == 1) { + webSocketStore.sendMessage( + `wsGetNew ${param.values['LABEL_ID']}_#_${ param.values['WORK_ORDER']}`, + ); + } + break; } resolve('OK'); } catch (e) { -- Gitblit v1.9.3