YangYuGang
2025-03-11 bfdfeb40c7ba97511584a30477acf5ad801398ba
src/views/tigerprojects/mes/eng/route/index.vue
@@ -359,6 +359,8 @@
            if (unref(lf).getNodeIncomingNode(n.id).length == 0) {
              node.IS_FIRST_NODE = 'Y';
              nd.IS_FIRST_NODE = 'Y';
              node.IS_INPUT = 'Y';
              nd.IS_INPUT = 'Y';
            }
            currRotData.nodes.push(node);
          }
@@ -425,20 +427,34 @@
      });
    } else {
      var hasError = false;
      let msg = '';
      unref(lf)
        .getGraphData()
        .nodes.forEach((n) => {
          /* 判断是否有Node未连接 */
          if (
            unref(lf).getNodeIncomingEdge(n.id).length == 0 &&
            unref(lf).getNodeOutgoingEdge(n.id).length == 0
          ) {
            hasError = true;
            msg = '有节点未连线,请重新设计工艺路线再保存数据!';
          }
          if (
            unref(lf)
              .getNodeOutgoingNode(n.id)
              .some((q) => q.properties.operType == 'End') &&
            unref(lf)
              .getNodeOutgoingNode(n.id)
              .some((q) => q.properties.operType != 'End' && q.properties.operType != 'Action')
          ) {
            hasError = true;
            msg = '完工节点不是唯一的最后节点,请重新设计工艺路线再保存数据!';
          }
        });
      if (hasError) {
        createErrorModal({
          title: t('警告'),
          content: t('有节点未连线,请重新设计工艺路线再保存数据!'),
          content: t(msg),
          getContainer: () => document.body,
        });
      } else {
@@ -716,7 +732,12 @@
          getContainer: () => document.body,
        });
      } else {
        if (unref(lf).getNodeIncomingNode(data.nodeModel.id).length == 0) {
        if (
          unref(lf).getNodeIncomingNode(data.nodeModel.id).length == 0 &&
          unref(lf)
            .getNodeOutgoingNode(data.nodeModel.id)
            .some((q) => q.properties.operType == 'Node')
        ) {
          lf.graphModel.deleteEdgeById(data.edgeModel.id);
          createErrorModal({
            title: t('警告'),