Ben Lin
2024-06-12 da85b09c600ddcf4e5c8cad66012fa29a8252b39
岗位资源更新
已修改7个文件
1190 ■■■■ 文件已修改
src/api/tigerapi/mes/mesApi.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/mes/router.ts 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/model/router.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/system.ts 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/components/PostProps.vue 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/index.vue 1025 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/mes/mesApi.ts
@@ -1,3 +1,11 @@
/*
 * @Description: file content
 * @Author: your name
 * @version:
 * @Date: 2024-04-27 15:54:50
 * @LastEditors: your name
 * @LastEditTime: 2024-06-12 20:28:14
 */
export enum mesApi {
  GetRoute = '/MES/GetRoute',
  GetRouteData = '/MES/GetRouteData',
@@ -8,4 +16,5 @@
  DeleteMesWo = '/MES/DeleteMesWo',
  SaveMesWs = '/MES/SaveMesWs',
  DeleteMesWs = '/MES/DeleteMesWs',
  SaveRouteNodePost = '/MES/SaveRouteNodePost',
}
src/api/tigerapi/mes/router.ts
@@ -1,7 +1,7 @@
import { ApiAction, ApiActionPage } from '../../model/baseModel';
import { Api, genAction, genActionPage } from '../system';
import { defHttp } from '/@/utils/http/axios';
import { MES_ROUTE, RouteData } from '../model/router';
import { MES_ROUTE, MES_ROUTE_NODE_POST, RouteData } from '../model/router';
import { mesApi } from './mesApi';
import { useUserStore } from '/@/store/modules/user';
import { RoutePageListGetResultModel, RoutelistPageParams } from '../model/mesModel';
@@ -27,7 +27,11 @@
  return data;
}
//保存
/**
 * @description: 保存工艺路线
 * @param {RouteData} params
 * @return {*}
 */
export const SaveRouteData = async (params: RouteData) => {
  const data = await defHttp.post(
    { url: mesApi.SaveRouteData, params: genAction('', params) },
@@ -38,6 +42,7 @@
  );
  return data;
};
export const SaveRoute = async (params: MES_ROUTE) => {
  params.CREATE_USER = useUserStore().getUserInfo.userId as string;
  params.UPDATE_USER = useUserStore().getUserInfo.userId as string;
@@ -104,3 +109,14 @@
      isTransformResponse: false,
    },
  );
  export const SaveRouteNodePost = async (params: MES_ROUTE_NODE_POST[]) => {
    const data = await defHttp.post(
      { url: mesApi.SaveRouteNodePost, params: genAction('MES_ROUTE_NODE_POST', params) },
      {
        errorMessageMode: 'none',
        isTransformResponse: false,
      },
    );
    return data;
  };
src/api/tigerapi/model/router.ts
@@ -158,3 +158,8 @@
  edges: MES_ROUTE_EDGE[];
  acts: MES_ROUTE_NODE_ACT[];
}
export interface MES_ROUTE_NODE_POST {
    NODE_ID: string;
    POST_CODE: string;
}
src/api/tigerapi/system.ts
@@ -31,7 +31,7 @@
  iSYS_ROLE_PROD,
} from './model/systemModel';
import { defHttp } from '/@/utils/http/axios';
import { isNullOrEmpty, isTimeType } from '/@/utils/is';
import { isDate, isNullOrEmpty, isTimeType } from '/@/utils/is';
import { MES_ROUTE_EDGE, MES_ROUTE_NODE } from './model/router';
export enum Api {
@@ -712,7 +712,7 @@
      Keys[k] != '0' &&
      !Keys[k].toString().endsWith('PSelect_0')
    ) {
      if (!isNullOrEmpty(params[Keys[k]].length) && isTimeType(params[Keys[k]][0])) {
      if (!isNullOrEmpty(params[Keys[k]].length) && isDate(params[Keys[k]][0])) {
        sqlcmd += ` And ${Keys[k]} > '${params[Keys[k]][0]}'`;
        sqlcmd += ` And ${Keys[k]} < '${params[Keys[k]][1]}'`;
      } else {
@@ -784,7 +784,28 @@
  );
}
//获取服务器Json文件返回Json数据
/**
 * @description: 根据条件删除
 * @param {string} sqlcmd
 * @param {string} entityName
 * @return {*}
 */
export const DeleteWhere = async (sqlcmd: string, entityName: string) => {
  const usParams = genAction(entityName, sqlcmd);
  return await defHttp.post(
    { url: Api.DeleteWhere, params: usParams },
    {
      errorMessageMode: 'none',
      isTransformResponse: false,
    },
  );
};
/**
 * @description: 获取服务器Json文件返回Json数据
 * @param {string} url
 * @return {*}
 */
export async function fetchJson(url: string) {
  try {
    const response = await fetch(url);
src/views/tigerprojects/mes/eng/route/components/PostProps.vue
@@ -4,24 +4,22 @@
 * @version: 
 * @Date: 2024-06-11 21:07:04
 * @LastEditors: your name
 * @LastEditTime: 2024-06-12 17:29:41
 * @LastEditTime: 2024-06-12 23:04:02
-->
<!--
 * @Description: 右侧属性面板控件 表单属性面板
-->
<template>
  <div class="mt-3">
    <Button type="primary" @click="handleCreate" preIcon="add_02|svg" :size="size"> 新增 </Button>
    <a-table :columns="columns" :data-source="data" bordered>
      <template #name="{ text }">
        <a>{{ text }}</a>
    <BasicTable @register="registerTable">
      <template #toolbar>
        <a-button type="primary" @click="handleCreate" preIcon="add_02|svg" :size="size"> 新增 </a-button>
      </template>
      <template #action="{ record }">
        <TableAction :actions="[
          {
            icon: 'ant-design:delete-outlined',
            color: 'error',
            tooltip: '删除',
            popConfirm: {
              title: '是否确认删除?',
              placement: 'left',
@@ -30,23 +28,25 @@
          },
        ]" />
      </template>
    </a-table>
    </BasicTable>
  </div>
  <NormalModal @register="register" @success="handleSuccess"></NormalModal>
</template>
<script lang="ts" setup>
import { Table, notification } from 'ant-design-vue';
import { Button } from '/@/components/Button';
import { TableAction } from '/@/components/Table';
import { notification } from 'ant-design-vue';
import { BasicTable, TableAction, useTable } from '/@/components/Table';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { ref } from 'vue';
import { onMounted, ref, unref, watch } from 'vue';
import { useModal } from '/@/components/Modal';
import NormalModal from '/@/views/components/NormalModal.vue';
import { useI18n } from '/@/hooks/web/useI18n';
import { DeleteEntity, DeleteWhere, SaveEntity, getEntity, getListByPage } from '/@/api/tigerapi/system';
import { useRouteDesignState } from '../hooks/useRouteDesignState';
import { SaveRouteNodePost } from '/@/api/tigerapi/mes/router';
const { t } = useI18n();
const ATable = Table;
const { routeConfig, mesRoute } = useRouteDesignState();
const size = ref<SizeType>('small');
const columns = [
  {
@@ -60,31 +60,37 @@
    dataIndex: 'POST_CODE',
    key: 'POST_CODE',
  },
  {
    title: '操作',
    key: 'operation',
    fixed: 'right',
    width: 65,
    slots: { customRender: 'action' },
  },
];
const data: DataItem[] = [];
for (let i = 0; i < 5; i++) {
  data.push({
    key: i,
    POST_NAME: `Edrward ${i}`,
    POST_CODE: 32,
  });
}
interface DataItem {
  key: number;
  POST_NAME: string;
  POST_CODE: number;
}
const [register, { openModal }] = useModal();
const [registerTable, { reload }] = useTable({
  title: '列表',
  api: getListByPage,
  searchInfo: { TABLE_NAME: 'V_MES_ROUTE_NOE_POST', NODE_ID: routeConfig.currentItem.ID },
  columns,
  useSearchForm: false,
  showTableSetting: false,
  bordered: true,
  showIndexColumn: false,
  actionColumn: {
    width: 80,
    title: '操作',
    dataIndex: 'action',
    slots: { customRender: 'action' },
  },
});
// watch(
//   () => routeConfig.currentItem.ID,
//   (newVal, oldVal) => {
//     if (newVal != oldVal) {
//       reload();
//     }
//   },
//   { deep: true, immediate: true },
// );
onMounted(() => {
});
/**
 * @description: 新增方法
@@ -130,11 +136,26 @@
   * @return {*}
   */
function handleDelete(record: Recordable) {
  DeleteWhere(`POST_CODE = '${record.POST_CODE}'`, 'MES_ROUTE_NODE_POST').then((res) => {
    reload();
  });
}
/**
 * @description: 选择岗位资源成功返回方法
 * @param {*} d
 * @param {*} u
 * @return {*}
 */
function handleSuccess(d, u) {
  let xx = d.values.val.split(',');
  let a = '';
 }
  let codes = d.values.val.split(',');
  let eintity: any[] = [];
  var i;
  for (i = 0; i < codes.length; i++) {
    eintity.push({ NODE_ID: routeConfig.currentItem.ID, POST_CODE: codes[i], REMARK: '' });
  }
  SaveRouteNodePost(eintity).then((res) => {
    reload();
  });
}
</script>
src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue
@@ -4,14 +4,14 @@
 * @version: 
 * @Date: 2024-04-28 15:15:22
 * @LastEditors: your name
 * @LastEditTime: 2024-06-12 15:44:00
 * @LastEditTime: 2024-06-12 22:53:25
-->
<!--
 * @Description: 右侧属性配置面板
-->
<template>
  <div>
    <Tabs v-model:activeKey="routeConfig.activeKey" :tabBarStyle="{ margin: 0 }">
    <Tabs v-model:activeKey="routeConfig.activeKey" :tabBarStyle="{ margin: 0 }" >
      <TabPane :key="1" tab="工艺路线">
        <FormProps />
      </TabPane>
@@ -19,7 +19,7 @@
        <FormItemProps v-if="IsOper" />
        <ActionItemProps v-if="!IsOper"  />
      </TabPane>
      <TabPane :key="3" :tab="posttitle">
      <TabPane :key="3" :tab="posttitle" >
        <PostProps v-if="IsOper" />
      </TabPane>
      <!-- <TabPane :key="4" tab="组件">
@@ -52,6 +52,7 @@
    entityName: String,
  });
  const IsOper = ref(false);
  const IsReload = ref(false);
  const title = ref('');
  const posttitle = ref('');
  const colSlots = ref<any>([]);
src/views/tigerprojects/mes/eng/route/index.vue
@@ -2,32 +2,14 @@
  <PageWrapper title="工艺流程图" content="根据生产工艺设计工艺流程" contentFullHeight fixedHeight>
    <Layout class="h-full">
      <LayoutContent :style="{ overflow: 'initial' }">
        <FlowChart
          :data="routeData"
          @save-data="handleSave"
          @add-lf="handleAddlf"
          @select-node="handleSelect"
          @click-blank="clickBlank"
          @init="init"
        />
        <FlowChart :data="routeData" @save-data="handleSave" @add-lf="handleAddlf" @select-node="handleSelect"
          @click-blank="clickBlank" @init="init" />
      </LayoutContent>
      <LayoutSider
        :class="`right`"
        collapsible
        :reverseArrow="true"
        collapsedWidth="0"
        width="400"
      <LayoutSider :class="`right`" collapsible :reverseArrow="true" collapsedWidth="0" width="400"
        style="background: #fafafa; border-left: 1px solid #d9d9d9; padding: 10px"
        :zeroWidthTriggerStyle="{ 'margin-top': '-70px', 'background-color': 'gray' }"
      >
        <PropsPanel ref="propsPanel"
          :activeKey="routeConfig.activeKey"
          :IsOperation="IsOperation"
          :title="title"
          :posttitle="posttitle"
          :colSlots="colSlots"
          :crudColSlots="crudColSlots"
          :entityName="entityName">
        :zeroWidthTriggerStyle="{ 'margin-top': '-70px', 'background-color': 'gray' }">
        <PropsPanel ref="propsPanel" :activeKey="routeConfig.activeKey" :IsOperation="IsOperation" :title="title"
          :posttitle="posttitle" :colSlots="colSlots" :crudColSlots="crudColSlots" :entityName="entityName">
          <!-- <template v-for="item of formConfig.schemas" #[`${item.component}Props`]="data">
            <slot
              :name="`${item.component}Props`"
@@ -43,525 +25,365 @@
</template>
<script lang="ts" setup name="Route_View">
  import { FlowChart } from '/@/components/FlowChart';
  import { PageWrapper } from '/@/components/Page';
  import { SaveRouteData, getRouteData } from '/@/api/tigerapi/mes/router';
  import { useModal } from '/@/components/Modal';
  import RouteModal from './RouteModal.vue';
  import { onMounted, ref, unref, Ref, provide, reactive, nextTick, watch } from 'vue';
  import { Layout, LayoutContent, LayoutSider } from 'ant-design-vue';
  import {
    RouteData,
    node,
    edge,
    MES_ROUTE_NODE,
    MES_ROUTE_EDGE,
    MES_ROUTE_NODE_ACT,
    MES_ROUTE,
  } from '/@/api/tigerapi/model/router';
  import { useUserStore } from '/@/store/modules/user';
  import RouteDrawer from './RouteDrawer.vue';
  import { useDrawer } from '/@/components/Drawer';
  import PropsPanel from './components/PropsPanel.vue';
  import { IRouteConfig } from './typings/v-form-component';
  import { useMessage } from '/@/hooks/web/useMessage';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is';
  import { useRoute } from 'vue-router';
  import { useTabs } from '/@/hooks/web/useTabs';
  import LogicFlow from '@logicflow/core';
import { FlowChart } from '/@/components/FlowChart';
import { PageWrapper } from '/@/components/Page';
import { SaveRouteData, getRouteData } from '/@/api/tigerapi/mes/router';
import { useModal } from '/@/components/Modal';
import RouteModal from './RouteModal.vue';
import { onMounted, ref, unref, Ref, provide, reactive, nextTick, watch } from 'vue';
import { Layout, LayoutContent, LayoutSider } from 'ant-design-vue';
import {
  RouteData,
  node,
  edge,
  MES_ROUTE_NODE,
  MES_ROUTE_EDGE,
  MES_ROUTE_NODE_ACT,
  MES_ROUTE,
} from '/@/api/tigerapi/model/router';
import { useUserStore } from '/@/store/modules/user';
import RouteDrawer from './RouteDrawer.vue';
import { useDrawer } from '/@/components/Drawer';
import PropsPanel from './components/PropsPanel.vue';
import { IRouteConfig } from './typings/v-form-component';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is';
import { useRoute } from 'vue-router';
import { useTabs } from '/@/hooks/web/useTabs';
import LogicFlow from '@logicflow/core';
import { getEntity } from '/@/api/tigerapi/system';
  const [registerDrawer, { openDrawer }] = useDrawer();
  const [registerModal, { openModal }] = useModal();
  const { t } = useI18n();
  const route = useRoute();
  const { setTitle } = useTabs();
  const { notification, createErrorModal } = useMessage();
  const routeConfig = reactive({
    // 表单配置
    schemas: [],
    layout: 'horizontal',
    labelLayout: 'flex',
    labelWidth: 100,
    labelCol: {},
    wrapperCol: {},
    currentItem: {} as MES_ROUTE_NODE,
    currentAct: {} as MES_ROUTE_NODE_ACT,
    routeData: {} as RouteData,
    activeKey: 1,
  } as IRouteConfig);
  const currRoute = ref({} as MES_ROUTE);
  const routeData = ref({
const [registerDrawer, { openDrawer }] = useDrawer();
const [registerModal, { openModal }] = useModal();
const { t } = useI18n();
const route = useRoute();
const { setTitle } = useTabs();
const { notification, createErrorModal } = useMessage();
const routeConfig = reactive({
  // 表单配置
  schemas: [],
  layout: 'horizontal',
  labelLayout: 'flex',
  labelWidth: 100,
  labelCol: {},
  wrapperCol: {},
  currentItem: {} as MES_ROUTE_NODE,
  currentAct: {} as MES_ROUTE_NODE_ACT,
  routeData: {} as RouteData,
  activeKey: 1,
} as IRouteConfig);
const currRoute = ref({} as MES_ROUTE);
const routeData = ref({
  nodes: [],
  edges: [],
});
provide<Ref<IRouteConfig>>('routeConfig', routeConfig);
provide<Ref<MES_ROUTE>>('mesRoute', currRoute);
const selectnode = ref({} as node);
const currRotId = ref(route.params?.id);
const colSlots = ref<any>([]);
const crudColSlots = ref<any>([]);
const entityName = ref<any>('MES_POSITION');
const props = defineProps({
  rotId: { type: String, default: '' },
});
const IsOperation = ref(false);
const title = ref('');
const posttitle = ref('');
watch(
  () => props.rotId,
  (v) => {
    if (v !== currRotId.value) {
      currRotId.value = v;
      if (!isNullOrUnDef(unref(currlf))) {
        unref(currlf).render({});
        routeData.value = {
          nodes: [],
          edges: [],
        };
        init(currlf);
      }
    }
  },
  { deep: true },
);
const currlf = ref(null) as Ref<LogicFlow | null>;
console.log(currRotId.value);
onMounted(() => { });
/**
 * @description: 工艺路线初始化
 * @param {*} lf
 * @return {*}
 */
async function init(lf) {
  currlf.value = unref(lf);
  //通过工艺路线ID获取图形数据,并渲染
  var _data = await getRouteData(currRotId.value);
  console.log('组件已挂载', _data);
  //工艺路线全信息,包括Node、Edge和Act
  routeConfig.routeData = _data.Data;
  if (_data.Data != null) {
    //工艺路线主信息
    currRoute.value = _data.Data.route;
    if (!isNullOrEmpty(currRotId.value) && isNullOrEmpty(props.rotId)) {
      setTitle('设计:工艺路线-' + currRoute.value.ROT_CODE);
    }
    _data.Data.nodes.forEach((n) => {
      n.node.properties = JSON.parse(n.node.properties);
      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);
    });
    console.log('init', unref(lf).getGraphData(), JSON.parse(JSON.stringify(routeData.value)));
    unref(lf).render(routeData.value);
  }
}
const GetRotData = (lf) => {
  var currRotData: RouteData = {
    route: {
      ID: currRoute.value.ID,
      CREATE_TIME: new Date(),
      CREATE_USER: useUserStore().getUserInfo.userId as string,
      UPDATE_TIME: new Date(),
      UPDATE_USER: useUserStore().getUserInfo.userId as string,
      GHOST_ROW: false,
      ROT_CODE: currRoute.value.ROT_CODE,
      ROT_NAME: currRoute.value.ROT_NAME,
      ROT_TYPE: currRoute.value.ROT_TYPE,
      ROT_VER: currRoute.value.ROT_VER,
      IS_ACTIVE: currRoute.value.IS_ACTIVE,
      REMARK: currRoute.value.REMARK,
      AUTH_ORG: '',
      AUTH_PROD: '',
      AUTH_WH: '',
    },
    nodes: [],
    edges: [],
  });
  provide<Ref<IRouteConfig>>('routeConfig', routeConfig);
  provide<Ref<MES_ROUTE>>('mesRoute', currRoute);
  const selectnode = ref({} as node);
  const currRotId = ref(route.params?.id);
  const colSlots = ref<any>([]);
  const crudColSlots = ref<any>([]);
  const entityName = ref<any>('MES_POSITION');
  const props = defineProps({
    rotId: { type: String, default: '' },
  });
  const IsOperation = ref(false);
  const title = ref('');
  const posttitle = ref('');
  watch(
    () => props.rotId,
    (v) => {
      if (v !== currRotId.value) {
        currRotId.value = v;
        if (!isNullOrUnDef(unref(currlf))) {
          unref(currlf).render({});
          routeData.value = {
            nodes: [],
            edges: [],
          };
          init(currlf);
        }
      }
    },
    { deep: true },
  );
  const currlf = ref(null) as Ref<LogicFlow | null>;
  console.log(currRotId.value);
  onMounted(() => {
    getEntity({
            sqlcmd: `ASSEMBLY_NAME ='MES_POSITION'`,
            entityName: 'SYS_LOW_CODE',
          }).then((data) => {
            var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON);
            for (const i in searchForms) {
              if(!isNullOrUnDef(searchForms[i]['colSlot'])){
                colSlots.value.push('form-'+searchForms[i]['colSlot']);
              }
            }
            var _cruds = JSON.parse(data.Data.Items[0].FORM_JSON);
            for (const i in _cruds) {
              if(!isNullOrUnDef(_cruds[i]['colSlot'])){
                crudColSlots.value.push(_cruds[i]['colSlot']);
              }
            }
            entityName.value = 'MES_POSITION';
          });
  });
  async function init(lf) {
    currlf.value = unref(lf);
    //通过工艺路线ID获取图形数据,并渲染
    var _data = await getRouteData(currRotId.value);
    console.log('组件已挂载', _data);
    //工艺路线全信息,包括Node、Edge和Act
    routeConfig.routeData = _data.Data;
    if (_data.Data != null) {
      //工艺路线主信息
      currRoute.value = _data.Data.route;
      if (!isNullOrEmpty(currRotId.value) && isNullOrEmpty(props.rotId)) {
        setTitle('设计:工艺路线-' + currRoute.value.ROT_CODE);
      }
      _data.Data.nodes.forEach((n) => {
        n.node.properties = JSON.parse(n.node.properties);
        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);
      });
      console.log('init', unref(lf).getGraphData(), JSON.parse(JSON.stringify(routeData.value)));
      unref(lf).render(routeData.value);
    }
  }
  const GetRotData = (lf) => {
    var currRotData: RouteData = {
      route: {
        ID: currRoute.value.ID,
        CREATE_TIME: new Date(),
        CREATE_USER: useUserStore().getUserInfo.userId as string,
        UPDATE_TIME: new Date(),
        UPDATE_USER: useUserStore().getUserInfo.userId as string,
        GHOST_ROW: false,
        ROT_CODE: currRoute.value.ROT_CODE,
        ROT_NAME: currRoute.value.ROT_NAME,
        ROT_TYPE: currRoute.value.ROT_TYPE,
        ROT_VER: currRoute.value.ROT_VER,
        IS_ACTIVE: currRoute.value.IS_ACTIVE,
        REMARK: currRoute.value.REMARK,
        AUTH_ORG: '',
        AUTH_PROD: '',
        AUTH_WH: '',
      },
      nodes: [],
      edges: [],
      acts: [],
    };
    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),
    );
    _nodes.forEach((n) => {
      if (n.properties.operType && n.properties.operType == 'Action') {
        var _diffacts = diffacts.length > 0 ? diffacts : routeConfig.routeData.acts;
        _diffacts.forEach((a) => {
          if (a.ID == n.id) {
            var act: MES_ROUTE_NODE_ACT = {
              ID: n.id,
              CREATE_TIME: routeConfig.routeData.route.CREATE_TIME,
              CREATE_USER: useUserStore().getUserInfo.userId as string,
              UPDATE_TIME: routeConfig.routeData.route.UPDATE_TIME,
              UPDATE_USER: useUserStore().getUserInfo.userId as string,
              GHOST_ROW: false,
              ROT_ID: routeConfig.routeData.route.ID,
              GPH_TYPE: n.type,
              GPH_X: n.x,
              GPH_Y: n.y,
              GPH_PROP: JSON.stringify(n.properties),
              GPH_TEXT: n.text.value,
              REMARK: a.REMARK,
              AUTH_ORG: '',
              AUTH_PROD: '',
              AUTH_WH: '',
              OPTION_1: '',
              OPTION_2: '',
              OPTION_3: '',
              OPTION_4: '',
              OPTION_5: '',
              ACT_NAME: `${routeConfig.routeData.route.ROT_CODE}_${n.text.value}_${_num}`,
              NODE_ID: a.NODE_ID,
              ACT_TYPE: a.ACT_TYPE,
              DO_TYPE: a.DO_TYPE,
              DO_METHOD: a.DO_METHOD,
              DO_IF_PASS: a.DO_IF_PASS,
              DO_IF_FAIL: a.DO_IF_FAIL,
              node: {} as node,
              IS_ACTIVE: a.IS_ACTIVE,
            };
            var pnode = [n];
            while (pnode[0].properties.operType == 'Action') {
              pnode = unref(lf).getNodeIncomingNode(pnode[0].id);
              if (pnode[0].properties.operType != 'Action') {
                act.NODE_ID = pnode[0].id;
                break;
              }
            }
            currRotData.acts.push(act);
          }
        });
        routeConfig.routeData.acts = _diffacts;
      } else {
        var _diffnodes = diffnodes.length > 0 ? diffnodes : routeConfig.routeData.nodes;
        _diffnodes.forEach((nd) => {
          if (nd.ID == n.id) {
            var node: MES_ROUTE_NODE = {
              ID: n.id,
              CREATE_TIME: currRotData.route.CREATE_TIME,
              CREATE_USER: useUserStore().getUserInfo.userId as string,
              UPDATE_TIME: currRotData.route.UPDATE_TIME,
              UPDATE_USER: useUserStore().getUserInfo.userId as string,
              GHOST_ROW: false,
              NODE_NAME: `${currRotData.route.ROT_CODE}_${n.text.value}_${_num}`,
              ROT_ID: currRotData.route.ID,
              SEGMENT: nd.SEGMENT,
              OPER_CODE: nd.OPER_CODE,
              GPH_TYPE: n.type,
              GPH_X: n.x,
              GPH_Y: n.y,
              GPH_PROP: JSON.stringify(n.properties),
              GPH_TEXT: n.text.value,
              IS_ACTIVE: nd.IS_ACTIVE,
              IS_CALC_FPY: nd.IS_CALC_FPY,
              CAN_SKIP: nd.CAN_SKIP,
              REMARK: nd.REMARK,
              AUTH_ORG: '',
              AUTH_PROD: '',
              AUTH_WH: '',
              IS_FIRST_NODE: 'N',
              IS_INPUT: nd.IS_INPUT,
              IS_OUTPUT: nd.IS_OUTPUT,
              OPTION_1: '',
              OPTION_2: '',
              OPTION_3: '',
              OPTION_4: '',
              OPTION_5: '',
              node: {} as node,
            };
            nd.GPH_TYPE = n.type;
            nd.GPH_PROP = JSON.stringify(n.properties);
            nd.GPH_TEXT = n.text.value;
            nd.GPH_X = n.x;
            nd.GPH_Y = n.y;
            if (unref(lf).getNodeIncomingNode(n.id).length == 0) {
              node.IS_FIRST_NODE = 'Y';
              nd.IS_FIRST_NODE = 'Y';
            }
            currRotData.nodes.push(node);
          }
        });
        routeConfig.routeData.nodes = _diffnodes;
      }
      _num++;
    });
    routeConfig.routeData.edges = [];
    _edges.forEach((e) => {
      var edge: MES_ROUTE_EDGE = {
        ID: e.id,
        CREATE_TIME: routeConfig.routeData.route.CREATE_TIME,
        CREATE_USER: useUserStore().getUserInfo.userId as string,
        UPDATE_TIME: routeConfig.routeData.route.UPDATE_TIME,
        UPDATE_USER: useUserStore().getUserInfo.userId as string,
        GHOST_ROW: false,
        EDGE_NAME: `${routeConfig.routeData.route.ROT_CODE}_${e.id}`,
        ROT_ID: routeConfig.routeData.route.ID,
        SRC_NODE: e.sourceNodeId,
        TGT_NODE: e.targetNodeId,
        GPH_TYPE: e.type,
        GPH_SRC_X: e.startPoint.x,
        GPH_SRC_Y: e.startPoint.y,
        GPH_TGT_X: e.endPoint.x,
        GPH_TGT_Y: e.endPoint.y,
        GPH_PROP: JSON.stringify(e.properties),
        GPH_POTS: JSON.stringify(e.pointsList),
        REMARK: '',
        AUTH_ORG: '',
        AUTH_PROD: '',
        AUTH_WH: '',
        EDGE_TYPE: 0,
        OPTION_1: '',
        OPTION_2: '',
        OPTION_3: '',
        OPTION_4: '',
        OPTION_5: '',
        edge: {} as edge,
      };
      routeConfig.routeData.edges.push(edge);
      currRotData.edges.push(edge);
    });
    return currRotData;
    acts: [],
  };
  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),
  );
  _nodes.forEach((n) => {
    if (n.properties.operType && n.properties.operType == 'Action') {
      var _diffacts = diffacts.length > 0 ? diffacts : routeConfig.routeData.acts;
      _diffacts.forEach((a) => {
        if (a.ID == n.id) {
          var act: MES_ROUTE_NODE_ACT = {
            ID: n.id,
            CREATE_TIME: routeConfig.routeData.route.CREATE_TIME,
            CREATE_USER: useUserStore().getUserInfo.userId as string,
            UPDATE_TIME: routeConfig.routeData.route.UPDATE_TIME,
            UPDATE_USER: useUserStore().getUserInfo.userId as string,
            GHOST_ROW: false,
            ROT_ID: routeConfig.routeData.route.ID,
            GPH_TYPE: n.type,
            GPH_X: n.x,
            GPH_Y: n.y,
            GPH_PROP: JSON.stringify(n.properties),
            GPH_TEXT: n.text.value,
            REMARK: a.REMARK,
            AUTH_ORG: '',
            AUTH_PROD: '',
            AUTH_WH: '',
            OPTION_1: '',
            OPTION_2: '',
            OPTION_3: '',
            OPTION_4: '',
            OPTION_5: '',
            ACT_NAME: `${routeConfig.routeData.route.ROT_CODE}_${n.text.value}_${_num}`,
            NODE_ID: a.NODE_ID,
            ACT_TYPE: a.ACT_TYPE,
            DO_TYPE: a.DO_TYPE,
            DO_METHOD: a.DO_METHOD,
            DO_IF_PASS: a.DO_IF_PASS,
            DO_IF_FAIL: a.DO_IF_FAIL,
            node: {} as node,
            IS_ACTIVE: a.IS_ACTIVE,
          };
          var pnode = [n];
          while (pnode[0].properties.operType == 'Action') {
            pnode = unref(lf).getNodeIncomingNode(pnode[0].id);
            if (pnode[0].properties.operType != 'Action') {
              act.NODE_ID = pnode[0].id;
              break;
            }
          }
          currRotData.acts.push(act);
        }
      });
      routeConfig.routeData.acts = _diffacts;
    } else {
      var _diffnodes = diffnodes.length > 0 ? diffnodes : routeConfig.routeData.nodes;
      _diffnodes.forEach((nd) => {
        if (nd.ID == n.id) {
          var node: MES_ROUTE_NODE = {
            ID: n.id,
            CREATE_TIME: currRotData.route.CREATE_TIME,
            CREATE_USER: useUserStore().getUserInfo.userId as string,
            UPDATE_TIME: currRotData.route.UPDATE_TIME,
            UPDATE_USER: useUserStore().getUserInfo.userId as string,
            GHOST_ROW: false,
            NODE_NAME: `${currRotData.route.ROT_CODE}_${n.text.value}_${_num}`,
            ROT_ID: currRotData.route.ID,
            SEGMENT: nd.SEGMENT,
            OPER_CODE: nd.OPER_CODE,
            GPH_TYPE: n.type,
            GPH_X: n.x,
            GPH_Y: n.y,
            GPH_PROP: JSON.stringify(n.properties),
            GPH_TEXT: n.text.value,
            IS_ACTIVE: nd.IS_ACTIVE,
            IS_CALC_FPY: nd.IS_CALC_FPY,
            CAN_SKIP: nd.CAN_SKIP,
            REMARK: nd.REMARK,
            AUTH_ORG: '',
            AUTH_PROD: '',
            AUTH_WH: '',
            IS_FIRST_NODE: 'N',
            IS_INPUT: nd.IS_INPUT,
            IS_OUTPUT: nd.IS_OUTPUT,
            OPTION_1: '',
            OPTION_2: '',
            OPTION_3: '',
            OPTION_4: '',
            OPTION_5: '',
            node: {} as node,
          };
          nd.GPH_TYPE = n.type;
          nd.GPH_PROP = JSON.stringify(n.properties);
          nd.GPH_TEXT = n.text.value;
          nd.GPH_X = n.x;
          nd.GPH_Y = n.y;
          if (unref(lf).getNodeIncomingNode(n.id).length == 0) {
            node.IS_FIRST_NODE = 'Y';
            nd.IS_FIRST_NODE = 'Y';
          }
          currRotData.nodes.push(node);
        }
      });
      routeConfig.routeData.nodes = _diffnodes;
    }
    _num++;
  });
  routeConfig.routeData.edges = [];
  _edges.forEach((e) => {
    var edge: MES_ROUTE_EDGE = {
      ID: e.id,
      CREATE_TIME: routeConfig.routeData.route.CREATE_TIME,
      CREATE_USER: useUserStore().getUserInfo.userId as string,
      UPDATE_TIME: routeConfig.routeData.route.UPDATE_TIME,
      UPDATE_USER: useUserStore().getUserInfo.userId as string,
      GHOST_ROW: false,
      EDGE_NAME: `${routeConfig.routeData.route.ROT_CODE}_${e.id}`,
      ROT_ID: routeConfig.routeData.route.ID,
      SRC_NODE: e.sourceNodeId,
      TGT_NODE: e.targetNodeId,
      GPH_TYPE: e.type,
      GPH_SRC_X: e.startPoint.x,
      GPH_SRC_Y: e.startPoint.y,
      GPH_TGT_X: e.endPoint.x,
      GPH_TGT_Y: e.endPoint.y,
      GPH_PROP: JSON.stringify(e.properties),
      GPH_POTS: JSON.stringify(e.pointsList),
      REMARK: '',
      AUTH_ORG: '',
      AUTH_PROD: '',
      AUTH_WH: '',
      EDGE_TYPE: 0,
      OPTION_1: '',
      OPTION_2: '',
      OPTION_3: '',
      OPTION_4: '',
      OPTION_5: '',
      edge: {} as edge,
    };
    routeConfig.routeData.edges.push(edge);
    currRotData.edges.push(edge);
  });
  return currRotData;
};
  /*
   *保存工艺路线事件
   */
  async function handleSave(lf) {
    console.log('handleSave', unref(lf).getGraphData().nodes[0]);
    if (isNullOrEmpty(currRoute.value.ROT_CODE)) {
/*
 *保存工艺路线事件
 */
async function handleSave(lf) {
  console.log('handleSave', unref(lf).getGraphData().nodes[0]);
  if (isNullOrEmpty(currRoute.value.ROT_CODE)) {
    createErrorModal({
      title: t('未选择'),
      content: t('未选择工艺路线或者新增工艺路线'),
      getContainer: () => document.body,
    });
  } else {
    var hasError = false;
    unref(lf)
      .getGraphData()
      .nodes.forEach((n) => {
        if (
          unref(lf).getNodeIncomingEdge(n.id).length == 0 &&
          unref(lf).getNodeOutgoingEdge(n.id).length == 0
        ) {
          hasError = true;
        }
      });
    if (hasError) {
      createErrorModal({
        title: t('未选择'),
        content: t('未选择工艺路线或者新增工艺路线'),
        title: t('警告'),
        content: t('有节点未连线,请重新设计工艺路线再保存数据!'),
        getContainer: () => document.body,
      });
    } else {
      var hasError = false;
      unref(lf)
        .getGraphData()
        .nodes.forEach((n) => {
          if (
            unref(lf).getNodeIncomingEdge(n.id).length == 0 &&
            unref(lf).getNodeOutgoingEdge(n.id).length == 0
          ) {
            hasError = true;
          }
      var action = await SaveRouteData(GetRotData(lf));
      if (action.IsSuccessed) {
        notification['success']({
          message: '操作成功',
          description: `保存工艺路线:${currRoute.value.ROT_CODE} 成功`,
        });
      if (hasError) {
        createErrorModal({
          title: t('警告'),
          content: t('有节点未连线,请重新设计工艺路线再保存数据!'),
          getContainer: () => document.body,
        });
      } else {
        var action = await SaveRouteData(GetRotData(lf));
        if (action.IsSuccessed) {
          notification['success']({
            message: '操作成功',
            description: `保存工艺路线:${currRoute.value.ROT_CODE} 成功`,
          });
        }
      }
    }
  }
}
  /*
   *新增工艺路线弹出模态窗口事件
   */
  async function handleAddlf(lf) {
    // openDrawer(true, {
    //   isUpdate: false,
    //   lf: lf,
    // });
    openModal(true, {
      isUpdate: false,
      lf: lf,
    });
  }
/*
 *新增工艺路线弹出模态窗口事件
 */
async function handleAddlf(lf) {
  // openDrawer(true, {
  //   isUpdate: false,
  //   lf: lf,
  // });
  openModal(true, {
    isUpdate: false,
    lf: lf,
  });
}
  /*
   *点击节点选中事件
   */
  function handleSelect(data, lf) {
    lf.graphModel.clearSelectElements();
    lf.graphModel.getNodeModelById(data.data.id).setSelected(true);
    selectnode.value = data.data;
    if (isNullOrUnDef(routeConfig.routeData)) {
      //先初始化routeData
      routeConfig.routeData = {};
      routeConfig.routeData.route = currRoute.value;
      routeConfig.routeData.nodes = [];
      routeConfig.routeData.edges = [];
      routeConfig.routeData.acts = [];
      //再返回具体数据
      routeConfig.routeData = GetRotData(lf);
    }
    var _node = routeConfig.routeData.nodes.filter((x) => x.ID == selectnode.value.id)[0];
    if (isNullOrUnDef(_node)) {
      _node = {
        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,
        NODE_NAME: `${currRoute.value.ROT_CODE}_${selectnode.value.text.value}_0`,
        ROT_ID: currRoute.value.ID,
        SEGMENT: '',
        OPER_CODE: selectnode.value.type,
        GPH_TYPE: selectnode.value.type,
        GPH_X: selectnode.value.x,
        GPH_Y: selectnode.value.y,
        GPH_PROP: '',
        GPH_TEXT: selectnode.value.text.value,
        IS_ACTIVE: 'Y',
        IS_CALC_FPY: 'N',
        CAN_SKIP: 'N',
        REMARK: '',
        AUTH_ORG: '',
        AUTH_PROD: '',
        AUTH_WH: '',
        IS_FIRST_NODE: '',
        IS_INPUT: '',
        IS_OUTPUT: '',
        OPTION_1: '',
        OPTION_2: '',
        OPTION_3: '',
        OPTION_4: '',
        OPTION_5: '',
        node: {} as node,
      };
      routeConfig.routeData.nodes.push(_node);
    }
    //是行为
    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 = '';
      routeConfig.currentAct = {
        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: _act.ACT_NAME,
        ROT_ID: currRoute.value.ID,
        NODE_ID: _act.NODE_ID,
        ACT_TYPE: _act.ACT_TYPE,
        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: _act.DO_TYPE,
        DO_METHOD: _act.DO_METHOD,
        DO_IF_PASS: _act.DO_IF_PASS,
        DO_IF_FAIL: _act.DO_IF_FAIL,
        IS_ACTIVE: _act.IS_ACTIVE,
        OPTION_1: '',
        OPTION_2: '',
        OPTION_3: '',
        OPTION_4: '',
        OPTION_5: '',
        REMARK: '',
        node: {} as node,
      };
    } else {
      //是工序
      routeConfig.currentItem = {
        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,
        NODE_NAME: _node.NODE_NAME ?? '',
        ROT_ID: currRoute.value.ID,
        SEGMENT: _node.SEGMENT,
        OPER_CODE: _node.OPER_CODE,
        GPH_TYPE: selectnode.value.type,
        GPH_X: selectnode.value.x,
        GPH_Y: selectnode.value.y,
        GPH_PROP: '',
        GPH_TEXT: selectnode.value.text.value,
        IS_ACTIVE: _node.IS_ACTIVE,
        IS_CALC_FPY: _node.IS_CALC_FPY,
        CAN_SKIP: _node.CAN_SKIP,
        IS_INPUT: _node.IS_INPUT,
        IS_OUTPUT: _node.IS_OUTPUT,
        REMARK: _node.REMARK,
      };
      routeConfig.isCalcFpy = _node.IS_CALC_FPY == 'Y';
      routeConfig.canSkip = _node.CAN_SKIP == 'Y';
      routeConfig.isInput = _node.IS_INPUT == 'Y';
      routeConfig.isOutput = _node.IS_OUTPUT == 'Y';
      console.log(routeConfig.currentItem);
      routeConfig.activeKey = 2;
      IsOperation.value = true;
      title.value = '工序';
      posttitle.value = '岗位';
    }
  }
  function handleSuccess(lfInstance) {
    unref(lfInstance).render({});
  }
  /*
   *点击画布事件
   */
  function clickBlank() {
    routeConfig.activeKey = 1;
    title.value = '';
    posttitle.value = '';
  }
  /*
   *新增工艺路线成功后事件
   */
  async function modalSuccess(lfInstance, route) {
    unref(lfInstance).render({});
    currRoute.value = route;
    currRotId.value = currRoute.value.ID;
    setTitle('设计:工艺路线-' + currRoute.value.ROT_CODE);
/*
 *点击节点选中事件
 */
function handleSelect(data, lf) {
  lf.graphModel.clearSelectElements();
  lf.graphModel.getNodeModelById(data.data.id).setSelected(true);
  selectnode.value = data.data;
  if (isNullOrUnDef(routeConfig.routeData)) {
    //先初始化routeData
    routeConfig.routeData = {};
    routeConfig.routeData.route = currRoute.value;
@@ -569,6 +391,153 @@
    routeConfig.routeData.edges = [];
    routeConfig.routeData.acts = [];
    //再返回具体数据
    routeConfig.routeData = GetRotData(unref(lfInstance));
    routeConfig.routeData = GetRotData(lf);
  }
  var _node = routeConfig.routeData.nodes.filter((x) => x.ID == selectnode.value.id)[0];
  if (isNullOrUnDef(_node)) {
    _node = {
      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,
      NODE_NAME: `${currRoute.value.ROT_CODE}_${selectnode.value.text.value}_0`,
      ROT_ID: currRoute.value.ID,
      SEGMENT: '',
      OPER_CODE: selectnode.value.type,
      GPH_TYPE: selectnode.value.type,
      GPH_X: selectnode.value.x,
      GPH_Y: selectnode.value.y,
      GPH_PROP: '',
      GPH_TEXT: selectnode.value.text.value,
      IS_ACTIVE: 'Y',
      IS_CALC_FPY: 'N',
      CAN_SKIP: 'N',
      REMARK: '',
      AUTH_ORG: '',
      AUTH_PROD: '',
      AUTH_WH: '',
      IS_FIRST_NODE: '',
      IS_INPUT: '',
      IS_OUTPUT: '',
      OPTION_1: '',
      OPTION_2: '',
      OPTION_3: '',
      OPTION_4: '',
      OPTION_5: '',
      node: {} as node,
    };
    routeConfig.routeData.nodes.push(_node);
  }
  //是行为
  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 = '';
    routeConfig.currentAct = {
      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: _act.ACT_NAME,
      ROT_ID: currRoute.value.ID,
      NODE_ID: _act.NODE_ID,
      ACT_TYPE: _act.ACT_TYPE,
      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: _act.DO_TYPE,
      DO_METHOD: _act.DO_METHOD,
      DO_IF_PASS: _act.DO_IF_PASS,
      DO_IF_FAIL: _act.DO_IF_FAIL,
      IS_ACTIVE: _act.IS_ACTIVE,
      OPTION_1: '',
      OPTION_2: '',
      OPTION_3: '',
      OPTION_4: '',
      OPTION_5: '',
      REMARK: '',
      node: {} as node,
    };
  } else {
    //是工序
    IsOperation.value = false;
    routeConfig.currentItem = {
      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,
      NODE_NAME: _node.NODE_NAME ?? '',
      ROT_ID: currRoute.value.ID,
      SEGMENT: _node.SEGMENT,
      OPER_CODE: _node.OPER_CODE,
      GPH_TYPE: selectnode.value.type,
      GPH_X: selectnode.value.x,
      GPH_Y: selectnode.value.y,
      GPH_PROP: '',
      GPH_TEXT: selectnode.value.text.value,
      IS_ACTIVE: _node.IS_ACTIVE,
      IS_CALC_FPY: _node.IS_CALC_FPY,
      CAN_SKIP: _node.CAN_SKIP,
      IS_INPUT: _node.IS_INPUT,
      IS_OUTPUT: _node.IS_OUTPUT,
      REMARK: _node.REMARK,
    };
    routeConfig.isCalcFpy = _node.IS_CALC_FPY == 'Y';
    routeConfig.canSkip = _node.CAN_SKIP == 'Y';
    routeConfig.isInput = _node.IS_INPUT == 'Y';
    routeConfig.isOutput = _node.IS_OUTPUT == 'Y';
    setTimeout(() => {
      console.log(routeConfig.currentItem);
      routeConfig.activeKey = 2;
      IsOperation.value = true;
      title.value = '工序';
      posttitle.value = '岗位';
    }, 50);
  }
}
function handleSuccess(lfInstance) {
  unref(lfInstance).render({});
}
/*
 *点击画布事件
 */
function clickBlank() {
  routeConfig.activeKey = 1;
  title.value = '';
  posttitle.value = '';
}
/*
 *新增工艺路线成功后事件
 */
async function modalSuccess(lfInstance, route) {
  unref(lfInstance).render({});
  currRoute.value = route;
  currRotId.value = currRoute.value.ID;
  setTitle('设计:工艺路线-' + currRoute.value.ROT_CODE);
  //先初始化routeData
  routeConfig.routeData = {};
  routeConfig.routeData.route = currRoute.value;
  routeConfig.routeData.nodes = [];
  routeConfig.routeData.edges = [];
  routeConfig.routeData.acts = [];
  //再返回具体数据
  routeConfig.routeData = GetRotData(unref(lfInstance));
}
</script>