From 0c81362850314afd2a6cb5f5d6b332d7ad33058b Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 22 十月 2024 23:29:47 +0800 Subject: [PATCH] 模板生成预览 --- src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts | 17 +++++++++++++++-- 1 files changed, 15 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..732d685 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 22:46:28 */ 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,17 @@ 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']}`, + ); + } + } } resolve('OK'); } catch (e) { -- Gitblit v1.9.3