From 943954bdcb3b672b89cfa097e53d2ac17a36a101 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期日, 30 六月 2024 13:13:25 +0800 Subject: [PATCH] 产品工艺路线路由节点选择功能更新 --- src/views/tigerprojects/system/lowcode/data.ts | 68 +++++++++++++++++++++------------ 1 files changed, 43 insertions(+), 25 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/data.ts b/src/views/tigerprojects/system/lowcode/data.ts index 6ff1417..d1ad12c 100644 --- a/src/views/tigerprojects/system/lowcode/data.ts +++ b/src/views/tigerprojects/system/lowcode/data.ts @@ -1,34 +1,10 @@ /* - * __----~~~~~~~~~~~------___ - * . . ~~//====...... __--~ ~~ - * -. \_|// |||\\ ~~~~~~::::... /~ - * ___-==_ _-~o~ \/ ||| \\ _/~~- - * __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ - * _-~~ .=~ | \\-_ '-~7 /- / || \ / - * .~ .~ | \\ -_ / /- / || \ / - * / ____ / | \\ ~-_/ /|- _/ .|| \ / - * |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ - * ' ~-| /| |-~\~~ __--~~ - * |-~~-_/ | | ~\_ _-~ /\ - * / \ \__ \/~ \__ - * _--~ _/ | .-~~____--~-/ ~~==. - * ((->/~ '.|||' -_| ~~-/ , . _|| - * -_ ~\ ~~---l__i__i__i--~~_/ - * _-~-__ ~) \--______________--~~ - * //.-~~~-~_--~- |-------~~~~~~~~ - * //.-~~~--\ - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * 绁炲吔淇濅綉 姘告棤BUG - */ - -/* * @Description: 閫氱敤浣庝唬鐮佸憟鐜伴〉闈富鏁版嵁 * @Author: Ben Lin * @version: * @Date: 2024-06-02 17:52:35 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-14 09:08:11 + * @LastEditTime: 2024-06-29 06:12:26 */ import { ActionItem, BasicColumn, FormSchema } from '/@/components/Table'; @@ -36,6 +12,19 @@ import { isNullOrEmpty } from '/@/utils/is'; import { woCustFn, woformSchema } from '/@/views/components/bizMesWo'; import { useModal } from '/@/components/Modal'; +import LogicFlow from '@logicflow/core'; +import { BpmnElement } from '@logicflow/extension/es/bpmn'; +import { Ref, ref, unref } from 'vue'; +import customEdge from '/@/components/FlowChart/src/customEdge'; +import actionRect from '/@/components/FlowChart/src/actionRect'; +import TestNode from '/@/components/FlowChart/src/TestNode'; +import CollectNode from '/@/components/FlowChart/src/CollectNode'; +import AssemblyNode from '/@/components/FlowChart/src/AssemblyNode'; +import PackingNode from '/@/components/FlowChart/src/PackingNode'; +import RepairNode from '/@/components/FlowChart/src/RepairNode'; +import { getRouteData } from '/@/api/tigerapi/mes/router'; +import { toLogicFlowData } from '/@/components/FlowChart/src/adpterForTurbo'; +import { SelectionSelect } from '@logicflow/extension'; const { t } = useI18n(); /** @@ -166,3 +155,32 @@ } return _formSchema; } + +/** + * @description: 宸ヨ壓璺嚎鍒濆鍖� + * @param {*} lf + * @return {*} + */ +export async function initRoute(lf, rotId, routeData, currlf) { + currlf.value = unref(lf); + //閫氳繃宸ヨ壓璺嚎ID鑾峰彇鍥惧舰鏁版嵁锛屽苟娓叉煋 + var _data = await getRouteData(rotId); + console.log('缁勪欢宸叉寕杞�', _data); + if (_data.Data != null) { + _data.Data.nodes.forEach((n) => { + n.node.properties = JSON.parse(n.node.properties); + n['node']['text']['value'] = n.NODE_NAME; + routeData.value.nodes.push(n['node']); + }); + console.log('111', routeData.value); + _data.Data.edges.forEach((e) => { + e.edge.properties = JSON.parse(e.edge.properties); + routeData.value.edges.push(e.edge); + }); + _data.Data.acts.forEach((act) => { + act.node.properties = JSON.parse(act.node.properties); + routeData.value.nodes.push(act.node); + }); + unref(lf).render(routeData.value); + } +} -- Gitblit v1.9.3