From 509366a157059aeaf6daa2492cf32e108a8ca104 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期五, 14 六月 2024 20:01:14 +0800 Subject: [PATCH] 工艺路线更新 --- src/views/tigerprojects/mes/eng/route/index.vue | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/views/tigerprojects/mes/eng/route/index.vue b/src/views/tigerprojects/mes/eng/route/index.vue index aed1fc9..662633f 100644 --- a/src/views/tigerprojects/mes/eng/route/index.vue +++ b/src/views/tigerprojects/mes/eng/route/index.vue @@ -175,12 +175,8 @@ var _nodes = unref(lf).getGraphData().nodes as node[]; var _edges = unref(lf).getGraphData().edges as edge[]; var _num = 1; - const diffnodes = routeConfig.routeData.nodes.filter((itemA) => - _nodes.some((itemB) => itemB.id === itemA.ID), - ); - const diffacts = routeConfig.routeData.acts.filter((itemA) => - _nodes.some((itemB) => itemB.id === itemA.ID), - ); + const diffnodes = routeConfig.routeData.nodes.filter((itemA) => _nodes.some((itemB) => itemB.id === itemA.ID)); + const diffacts = routeConfig.routeData.acts.filter((itemA) => _nodes.some((itemB) => itemB.id === itemA.ID),); _nodes.forEach((n) => { if (n.properties.operType && n.properties.operType == 'Action') { var _diffacts = diffacts.length > 0 ? diffacts : routeConfig.routeData.acts; @@ -432,12 +428,47 @@ routeConfig.routeData.nodes.push(_node); } //鏄涓� - if (selectnode.value.properties.operType && selectnode.value.properties.operType == 'Action') { + if (selectnode.value.properties['operType'] && selectnode.value.properties['operType'] == 'Action') { var _act = routeConfig.routeData.acts.filter((x) => x.ID == selectnode.value.id)[0]; routeConfig.activeKey = 2; IsOperation.value = false; title.value = '琛屼负'; posttitle.value = ''; + if (isNullOrUnDef(_act)) { + _act = { + ID: selectnode.value.id, + CREATE_TIME: currRoute.value.CREATE_TIME, + CREATE_USER: useUserStore().getUserInfo.userId as string, + UPDATE_TIME: currRoute.value.UPDATE_TIME, + UPDATE_USER: useUserStore().getUserInfo.userId as string, + GHOST_ROW: false, + AUTH_ORG: '', + AUTH_PROD: '', + AUTH_WH: '', + ACT_NAME: `${routeConfig.routeData.route.ROT_CODE}_${selectnode.value.text.value}_0`, + ROT_ID: currRoute.value.ID, + NODE_ID: '', + ACT_TYPE: 0, + GPH_TYPE: selectnode.value.type, + GPH_X: selectnode.value.x, + GPH_Y: selectnode.value.y, + GPH_PROP: JSON.stringify(selectnode.value.properties), + GPH_TEXT: selectnode.value.text.value, + DO_TYPE: 0, + DO_METHOD: '', + DO_IF_PASS: '', + DO_IF_FAIL: '', + IS_ACTIVE: '', + OPTION_1: '', + OPTION_2: '', + OPTION_3: '', + OPTION_4: '', + OPTION_5: '', + REMARK: '', + node: {} as node, + } + routeConfig.routeData.acts.push(_act); + } routeConfig.currentAct = { ID: selectnode.value.id, CREATE_TIME: currRoute.value.CREATE_TIME, @@ -506,7 +537,7 @@ IsOperation.value = true; title.value = '宸ュ簭'; posttitle.value = '宀椾綅'; - }, 50); + }, 100); } } -- Gitblit v1.9.3