| | |
| | | * @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'; |
| | |
| | | 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; |
| | |
| | | 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) { |