Ben Lin
2024-06-30 943954bdcb3b672b89cfa097e53d2ac17a36a101
产品工艺路线路由节点选择功能更新
已修改25个文件
已添加1个文件
1938 ■■■■■ 文件已修改
src/api/tigerapi/model/basModel.ts 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/FlowChart/index.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/FlowChart/src/FlowChartView.vue 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/CustModal.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/RouteViewModal.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/data.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/prod/biz_mes_wo/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/composition/CarGridNav.vue 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/composition/LeftTree.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/composition/index.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/data.ts 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/detail/detail.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT.ts 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT_GRP.ts 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_VAR.ts 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_RULE.ts 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts 890 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/QMS_INS_ITEM.ts 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/QMS_INS_STD.ts 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/entityts/V_BAS_PROD.ts 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/system/lowcode/normal/mainTable.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/model/basModel.ts
@@ -115,6 +115,10 @@
export type SupplierInfoPageListGetResultModel = BasicFetchResult<SupplierInfoListItem>;
export type PackageRulePageListGetResultModel = BasicFetchResult<PackageRuleListItem>;
/**
 * @description: è‡ªå®šä¹‰æ–¹æ³•接口
 * @return {*}
 */
export interface EntityCustFunctionType {
  CreateAction: (fnName: string) => {};
  ActionItem: (params: Recordable<any>, data, ...args) => ActionItem[];
@@ -126,15 +130,18 @@
  GetSearchForm: () => [];
  GetCrudForm: (type: string) => [];
  GetBaseForm: () => [];
  GetBaseCards: () => [];
  GetBaseCards: (type: string | undefined) => [];
  OthersValues: (val: string, id: string) => {};
  GetTitle: (type: string) => {};
  GetCrudColSlots: () => [];
  nodeChange: ({}) => void;
  CreateIcon: (params: Recordable<any>) => string;
  SelectNode: (selectedNodes: Ref<any[]>) => {};
  GetNavItems: () => NavItem[];
  GetNavItems: (type: string) => NavItem[];
  navChangeItem: (action: any, ...args) => void;
  GetUseModals: () => {};
  SubmitFunc: (values: Recordable<any>, type: string, emit) => void;
  GetSlots: (type: string | undefined) => {};
  GenerateHtml: (type: string | null) => HTMLElement | null;
  CustFunc: (type: string | undefined, ...args) => void | any;
}
src/components/FlowChart/index.ts
@@ -1,4 +1,15 @@
/*
 * @Description: file content
 * @Author: Ben Lin
 * @version:
 * @Date: 2024-06-18 15:09:47
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-29 05:14:10
 */
import { withInstall } from '@/utils';
import flowChart from './src/FlowChart.vue';
import flowChartView from './src/FlowChartView.vue';
export const FlowChart = withInstall(flowChart);
export const FlowChartView = withInstall(flowChartView);
src/components/FlowChart/src/FlowChartView.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,257 @@
<template>
  <div class="h-full" :class="prefixCls">
    <div ref="lfElRef" class="h-full"></div>
  </div>
</template>
<script lang="ts" setup>
  import type { Ref } from 'vue';
  import type { Definition } from '@logicflow/core';
  import { ref, onMounted, unref, nextTick, computed, watch } from 'vue';
  import FlowChartToolbar from './FlowChartToolbar.vue';
  import LogicFlow from '@logicflow/core';
  import { Snapshot, BpmnElement, Menu, DndPanel, SelectionSelect } from '@logicflow/extension';
  import { useDesign } from '@/hooks/web/useDesign';
  import { useAppStore } from '@/store/modules/app';
  import { createFlowChartContext } from './useFlowContext';
  import { toLogicFlowData } from './adpterForTurbo';
  import { useModal, BasicModal } from '@/components/Modal';
  import { JsonPreview } from '@/components/CodeEditor';
  import { configDefaultDndPanel } from './config';
  import '@logicflow/core/dist/style/index.css';
  import '@logicflow/extension/lib/style/index.css';
  import { useGlobSetting } from '/@/hooks/setting';
  import customEdge from './customEdge';
  import { useMessage } from '/@/hooks/web/useMessage';
  import { useI18n } from '/@/hooks/web/useI18n';
  import actionRect from './actionRect';
  import TestNode from './TestNode';
  import CollectNode from './CollectNode';
  import AssemblyNode from './AssemblyNode';
  import PackingNode from './PackingNode';
  import RepairNode from './RepairNode';
  defineOptions({ name: 'FlowChart' });
  const props = defineProps({
    flowOptions: {
      type: Object as PropType<Definition>,
      default: () => ({}),
    },
    data: {
      type: Object as PropType<any>,
      default: () => ({}),
    },
    toolbar: {
      type: Boolean,
      default: true,
    },
    patternItems: {
      type: Array,
    },
  });
  const emit = defineEmits([
    'view-data',
    'save-data',
    'add-lf',
    'select-node',
    'click-blank',
    'init',
    'undo',
    'redo',
  ]);
  const lfElRef = ref(null);
  const graphData = ref({});
  const lfInstance = ref(null) as Ref<LogicFlow | null>;
  const { prefixCls } = useDesign('flow-chart');
  const appStore = useAppStore();
  const [register, { openModal }] = useModal();
  createFlowChartContext({
    logicFlow: lfInstance as unknown as LogicFlow,
  });
  const getFlowOptions = computed(() => {
    const { flowOptions } = props;
    const defaultOptions: Partial<Definition> = {
      grid: true,
      background: {
        color: appStore.getDarkMode === 'light' ? '#f7f9ff' : '#151515',
      },
      keyboard: {
        enabled: true,
      },
      edgeType: 'polyline',
      ...flowOptions,
    };
    return defaultOptions as Definition;
  });
  watch(
    () => props.data,
    () => {
      onRender();
    },
  );
  // TODO
  // watch(
  //   () => appStore.getDarkMode,
  //   () => {
  //     init();
  //   }
  // );
  watch(
    () => unref(getFlowOptions),
    (options) => {
      unref(lfInstance)?.updateEditConfig(options);
    },
  );
  // init logicFlow
  async function init() {
    await nextTick();
    const lfEl = unref(lfElRef);
    if (!lfEl) {
      return;
    }
    // LogicFlow.use(DndPanel);
    // Canvas configuration
    // LogicFlow.use(Snapshot);
    // Use the bpmn plug-in to introduce bpmn elements, which can be used after conversion in turbo
    LogicFlow.use(BpmnElement);
    // Start the right-click menu
    // LogicFlow.use(Menu);
    LogicFlow.use(SelectionSelect);
    lfInstance.value = new LogicFlow({
      ...unref(getFlowOptions),
      container: lfEl,
      edgeGenerator: (sourceNode) => {
        // console.log('a');
        // èµ·å§‹èŠ‚ç‚¹ç±»åž‹ rect æ—¶ä½¿ç”¨ è‡ªå®šä¹‰çš„è¾¹ custom-edge
        if (sourceNode.properties.isReturn) return 'custom-edge';
        // if (sourceNode.type === 'rect') return 'custom-edge';
        // return 'custom-edge';
      },
    });
    const lf = unref(lfInstance)!;
    lf?.setDefaultEdgeType('polyline');
    lf.register(actionRect);
    lf.register(TestNode);
    lf.register(CollectNode);
    lf.register(AssemblyNode);
    lf.register(PackingNode);
    lf.register(RepairNode);
    lf.register(customEdge);
    onRender();
    lf?.setPatternItems(props.patternItems || configDefaultDndPanel(lf));
  }
  async function onRender() {
    await nextTick();
    const lf = unref(lfInstance);
    if (!lf) {
      return;
    }
    const lFData = toLogicFlowData(props.data);
    lf.render(lFData);
    lf.on('anchor:drop', (data) => {
      const nodeData = data.nodeModel.getData();
      if (nodeData.properties.isReturn === true) {
        console.log(11, nodeData.properties.isReturn);
        data.nodeModel.graphModel.edges.forEach((element) => {
          if (element.sourceNodeId === data.nodeModel.id) {
            lf.changeEdgeType(element.id, 'custom-edge');
          }
        });
      }
    });
    lf.on('node:click,edge:click', (data) => {
      if (data.isSelected) {
        console.log(data.data.text.value, data.isSelected);
        // notification.success({
        //   message: t('点击了节点'),
        //   description: `${data.data.text.value}: ${data.isSelected}`,
        //   duration: 3,
        // });
        emit('select-node', data, lf);
      } else {
        console.log(data.data.type);
      }
    });
    lf.on('blank:mousedown', (e) => {
      emit('click-blank');
    });
    lf.on('node:dnd-add', (data, e) => {
      console.log('node:dnd-add', data);
      emit('select-node', data, lf);
    });
    emit('init', lf);
  }
  function handlePreview() {
    const lf = unref(lfInstance);
    if (!lf) {
      return;
    }
    graphData.value = unref(lf).getGraphData();
    openModal();
  }
function handleSave() {
  // console.log('handleSave');
  const lf = unref(lfInstance);
  if (!lf) {
    return;
  }
  emit('save-data', lf);
}
function handleAdd() {
  const lf = unref(lfInstance);
  console.log('handleAdd');
  if (!lf) {
    return;
  }
  // lf.clearData();
  lf.render({});
}
function handleAddlf() {
  const lf = unref(lfInstance);
  if (!lf) {
    return;
  }
  emit('add-lf', lf);
}
function handleUndo() {
  const lf = unref(lfInstance);
  if (!lf) {
    return;
  }
  emit('undo', lf);
}
function handleRedo() {
  const lf = unref(lfInstance);
  if (!lf) {
    return;
  }
  emit('redo', lf);
}
  onMounted(init);
</script>
src/views/components/CustModal.vue
@@ -4,7 +4,7 @@
 * @version: 
 * @Date: 2024-06-05 15:46:07
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-13 09:28:27
 * @LastEditTime: 2024-06-28 14:26:49
-->
<template>
  <BasicModal
@@ -55,7 +55,7 @@
  const dtlSlots = ref([] as any[]);
  const formSchema = ref([] as FormSchema[]);
  const formElName = ref([]);
  const useFormData = ref({});
  const useFormData = ref<any>({});
  const props = defineProps({
    detailSlots: { type: Array, default: [] },
  });
@@ -84,9 +84,9 @@
    //循环表单名数组,操作各表单字段
    formElName.value.forEach((name) => {
      if (!isNullOrUnDef(useFormData.value[name])) {
        useFormData.value[name][1].resetFields();
        useFormData.value[name][1]['resetFields']();
        if (unref(isUpdate)) {
          useFormData.value[name][1].setFieldsValue({
          useFormData.value[name][1]['setFieldsValue']({
            ...mValues.value,
          });
        }
src/views/components/RouteViewModal.vue
@@ -1,10 +1,18 @@
<!--
 * @Description: file content
 * @Author: Ben Lin
 * @version:
 * @Date: 2024-06-18 15:09:48
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-30 13:07:46
-->
<template>
  <BasicModal
    v-bind="$attrs"
    @register="registerModal"
    :defaultFullscreen="true"
    :title="title"
    @ok="custFunction(isUpdate, 'rvSubmit', cType, setModalProps, closeModal, emit, slotName)"
    @ok="custFunction(isUpdate, submitFn, cType, setModalProps, closeModal, emit, slotName)"
    :width="width"
  >
    <!-- è¿™é‡ŒåµŒå…¥router-view来展示路由页面 -->
@@ -12,9 +20,9 @@
  </BasicModal>
</template>
<script lang="ts" setup>
  import { ref, unref, onMounted } from 'vue';
  import { GetSelectSuccess, OpenSelectItem, custFunction, getFormSchema } from './data';
  import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
  import { ref, onMounted } from 'vue';
  import { custFunction } from './data';
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import Route_View from '/@/views/tigerprojects/mes/eng/route/index.vue';
  const emit = defineEmits(['success', 'register']);
@@ -23,12 +31,14 @@
  const title = ref('');
  const width = ref('');
  const rotId = ref('');
  const submitFn = ref('');
  const slotName = ref('');
  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    setModalProps({ confirmLoading: false });
    rotId.value = data?.rotId;
    slotName.value = data?.slotName;
    submitFn.value = data?.submitFn; //'rvSubmit'
  });
  onMounted(() => {});
src/views/components/data.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-05 15:50:59
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-27 10:54:27
 * @LastEditTime: 2024-06-28 11:31:37
 */
import {
  getWoFns,
@@ -47,7 +47,7 @@
}
export function getFormSchema(type: string) {
  let _formSchema = [] as FormSchema[];
  let _formSchema: FormSchema[] = [];
  switch (type) {
    case 'BIZ_MES_WO':
      _formSchema = woformSchema;
src/views/tigerprojects/mes/prod/biz_mes_wo/index.vue
@@ -4,7 +4,7 @@
 * @version: 
 * @Date: 2024-05-25 00:27:00
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-24 22:58:16
 * @LastEditTime: 2024-06-28 11:40:38
-->
<template>
  <div>
@@ -177,8 +177,8 @@
    edges: [],
  });
  const formSchema = ref([] as FormSchema[]);
  const woSchema = ref([] as FormSchema[]);
  const prodSchema = ref([] as FormSchema[]);
  const woSchema = ref<FormSchema[]>(getFormSchema('woinfo'));
  const prodSchema = ref<FormSchema[]>(getFormSchema('prodinfo'));
  const isCustEl = ref({
    forminfo: false,
    woinfo: false,
@@ -266,8 +266,6 @@
      },
      { name: 'rotinfo', slots: ['add'], preIcons: { add: 'search|svg' }, title: '工艺信息' },
    ];
    woSchema.value = getFormSchema('woinfo');
    prodSchema.value = getFormSchema('prodinfo');
    // rotSchema.value = getFormSchema('rotinfo');
    //工艺路线渲染图初始化
    if (lfInstance.value != null) {
src/views/tigerprojects/system/lowcode/composition/CarGridNav.vue
@@ -4,12 +4,12 @@
 * @version: 
 * @Date: 2024-06-20 12:13:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-27 00:39:37
 * @LastEditTime: 2024-06-30 13:04:00
-->
<template>
  <Card :title="GetTitle()['navTitle']">
  <Card :title="GetTitle(props.configType)['navTitle']">
    <CardGrid
      v-for="item in GetNavItems()"
      v-for="item in GetNavItems(props.configType)"
      :key="item.title"
      @click="navChangeItem(item.action, useModalData[item.action][1].openModal)"
    >
@@ -29,50 +29,105 @@
      />
    </CardGrid>
  </Card>
  <!-- å…¶ä»–自定义卡片内容 -->
  <a-card
    :title="item.title"
    :bordered="false"
    class="!mt-2"
    v-for="(item, index) in otherSlots"
    :key="item.name"
  >
    <slot :name="item.name" :index="index"></slot>
  </a-card>
  <RouteViewModal @register="registerRv" @success="RvItemSuccess" />
</template>
<script lang="ts" setup>
  import { Card, CardGrid } from 'ant-design-vue';
  import Icon from '@/components/Icon/Icon.vue';
  import GeneralModal from '/@/views/components/GeneralModal.vue';
  import RouteViewModal from '/@/views/components/RouteViewModal.vue';
  import StepModal from '/@/views/components/StepModal.vue';
  import { Ref, inject, ref, watch } from 'vue';
  import { Ref, inject, nextTick, onMounted, ref, watch } from 'vue';
  import { isNullOrUnDef } from '/@/utils/is';
  import { useTabs } from '/@/hooks/web/useTabs';
  import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel';
  import { useModal } from '/@/components/Modal';
  const ACard = Card;
  const objParams = inject('objParams') as Ref<any>;
  const props = defineProps({
    configType: { type: String },
    nodes: { type: Array as PropType<any[]> },
  });
  const custImport = ref<any[]>([]);
  const EntityCustFunction = ref([
    {
      GetTitle() {},
      GetNavItems() {},
      GetTitle(type: string) {},
      GetNavItems(type: string) {},
      navChangeItem(action: any, ...args) {},
      GetUseModals() {},
      GetBaseCards(type: string | undefined) {},
      GetSelectSuccess(d, u, ...args) {},
      GenerateHtml(ype: string | null) {},
      CustFunc(type: string | undefined, ...args) {},
    } as EntityCustFunctionType,
  ]);
  /* åŠ¨æ€import实体名.ts的自定义方法 */
  try {
    custImport.value = await import(`../entityts/${objParams.value['Name']}.ts`);
  } catch (e) {}
  const [{ GetTitle, GetNavItems, navChangeItem, GetUseModals, GetSelectSuccess }] = isNullOrUnDef(
    custImport.value['default'],
  )
  const [
    {
      GetTitle,
      GetNavItems,
      navChangeItem,
      GetUseModals,
      GetSelectSuccess,
      GetBaseCards,
      GenerateHtml,
      CustFunc,
    },
  ] = isNullOrUnDef(custImport.value['default'])
    ? EntityCustFunction.value
    : custImport.value['default']();
  const useModalData = ref(GetUseModals());
  const otherSlots = ref<any[]>(GetBaseCards(props.configType));
  const { refreshPage } = useTabs();
  const [registerRv, { openModal: openRvModal }] = useModal();
  // watch(
  //   () => Prod_Code,
  //   (v) => {
  //     if (v !== Prod_Code.value) {
  //       Prod_Code.value = isNullOrEmpty(v) ? Prod_Code.value : v;
  //     }
  //   },
  //   { deep: true },
  // );
  watch(
    [() => props.configType, () => props.nodes],
    (v) => {
      otherSlots.value = GetBaseCards(v[0]);
      nextTick(() => {
        // var div = document.getElementById('container') as HTMLElement;
        // div.innerHTML = '';
        // div.appendChild(GenerateHtml(v[0]));
        // setTimeout(() => {
        //   if (!isNullOrUnDef(v[1])) {
        //     CustFunc(v[0], v[1][0]['id'], '#lfContainer');
        //   }
        // }, 100);
      });
    },
    { deep: true },
  );
  onMounted(() => {
    nextTick(() => {
      //   var div = document.getElementById('container') as HTMLElement;
      //   if (!isNullOrUnDef(div)) {
      //     div.innerHTML = '';
      //     div.appendChild(GenerateHtml(props.configType));
      //     setTimeout(() => {
      //       if (!isNullOrUnDef(props.nodes) && props.nodes.length > 0) {
      //         CustFunc(props.configType, props.nodes[0]['id'], '#lfContainer');
      //       }
      //     }, 100);
      //   }
    });
  });
  /**
   * @description: å¼¹å‡ºé€‰æ‹©æ¡†æˆåŠŸè¿”å›žæ–¹æ³•
src/views/tigerprojects/system/lowcode/composition/LeftTree.vue
@@ -4,7 +4,7 @@
 * @version: 
 * @Date: 2024-06-26 15:31:43
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-26 21:41:54
 * @LastEditTime: 2024-06-29 05:50:18
-->
<template>
  <GeneralTree
@@ -27,7 +27,6 @@
  const emit = defineEmits(['select']);
  const objParams = inject('objParams') as Ref<any>;
  const nodeType = inject('nodeType') as Ref<any>;
  const selectedNodes = inject('selectedNodes') as Ref<any>;
  const custImport = ref<any[]>([]);
  const EntityCustFunction = ref([
@@ -40,7 +39,7 @@
  try {
    custImport.value = await import(`../entityts/${objParams.value['Name']}.ts`);
  } catch (e) {}
  const [{ CreateIcon, SelectNode }] = isNullOrUnDef(custImport.value['default'])
  const [{ CreateIcon, SelectNode, fetchTreeData }] = isNullOrUnDef(custImport.value['default'])
    ? EntityCustFunction.value
    : custImport.value['default']();
  const treeData = ref<TreeItem[]>([]);
@@ -68,7 +67,7 @@
   */
  async function fetch(type: string) {
    if (!isNullOrUnDef(custImport.value)) {
      const [{ fetchTreeData }] = custImport.value['default']();
      // const [{ fetchTreeData }] = custImport.value['default']();
      //根据type获取树形数据
      const data = await fetchTreeData(type, objParams.value['CODE']);
      title.value = data.title;
@@ -78,7 +77,6 @@
  }
  function handleSelect(Id = '', info) {
    nodeType.value = info.selectedNodes[0].type;
    selectedNodes.value = info.selectedNodes;
    emit('select', SelectNode(selectedNodes));
  }
@@ -89,7 +87,6 @@
   * @return {*}
   */
  function UnSelect(node) {
    nodeType.value = '';
    emit('select', SelectNode(undefined));
    // reload();
  }
src/views/tigerprojects/system/lowcode/composition/index.vue
@@ -4,7 +4,7 @@
 * @version: 
 * @Date: 2024-06-18 23:30:30
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-27 22:31:13
 * @LastEditTime: 2024-06-29 06:16:43
-->
<template>
  <PageWrapper
@@ -17,12 +17,19 @@
    @back="goBack"
  >
    <Suspense class="w-1/4 xl:w-1/5">
      <LeftTree @select="NodeSelect"/>
      <LeftTree @select="NodeSelect" />
    </Suspense>
    <Suspense>
      <div class="w-3/4 xl:w-4/5 p-5">
        <CarGridNav v-if="showNav" />
        <Config v-if="showConfig" :configType="configType" @success="configSuccess"/>
        <CarGridNav v-if="showNav" :configType="configType" :nodes="nodes">
          <template #[item] v-for="item in otherSlots" :key="item">
            <!-- è‡ªå®šä¹‰å†…容 -->
            <div class="h-full" style="height: 400px">
              <FlowChartView :data="routeData" @init="init"
            /></div>
          </template>
        </CarGridNav>
        <Config v-if="showConfig" :configType="configType" @success="configSuccess" />
      </div>
    </Suspense>
    <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable">
@@ -72,14 +79,17 @@
  import Config from './Config.vue';
  import LeftTree from './LeftTree.vue';
  import CustModal from '/@/views/components/CustModal.vue';
  import { OpenCustModal } from '../data';
  import { Ref, onMounted, provide, ref } from 'vue';
  import { OpenCustModal, initRoute } from '../data';
  import { Ref, VNode, onMounted, provide, ref, unref } from 'vue';
  import { FlowChartView } from '/@/components/FlowChart';
  import { useRoute } from 'vue-router';
  import { BasicForm, useForm } from '/@/components/Form/index';
  import { useTabs } from '/@/hooks/web/useTabs';
  import { isNullOrUnDef } from '/@/utils/is';
  import { useGo } from '/@/hooks/web/usePage';
  import { useMessage } from '/@/hooks/web/useMessage';
  import { getRouteData } from '/@/api/tigerapi/mes/router';
  import LogicFlow from '@logicflow/core';
  defineOptions({ name: 'DeptManagement' });
@@ -93,19 +103,23 @@
  const useFormData = ref({});
  const cType = ref('');
  const dtlSlots = ref([] as any[]);
  const otherSlots = ref<any[]>([]);
  const selectVals = ref({});
  const dense = isNullOrUnDef(objParams.value.dense) ? ref(false) : ref(objParams.value.dense);
  const pageTitle = ref(objParams.value.pageTitle);
  const pageContent = ref(objParams.value.pageContent);
  const nodeType = ref('');
  const selectedNodes = ref([]);
  const isMounted = ref(false);
  const showNav = ref(false);
  const showConfig = ref(false);
  const configType = ref('');
  const nodes = ref([]);
  const routeData = ref({
    nodes: [],
    edges: [],
  });
  const custImport = ref<any>(null);
  const [registerCust, { openModal: openCustomModal, closeModal }] = useModal();
  provide<Ref<string>>('nodeType', nodeType);
  provide<Ref<any>>('objParams', objParams);
  provide<Ref<any>>('selectedNodes', selectedNodes);
  setTitle(objParams.value.Title); //设置标签页标题
@@ -131,25 +145,46 @@
    /* åŠ¨æ€import实体名.ts的自定义方法 */
    try {
      custImport.value = await import(`../entityts/${entityName.value}.ts`);
      if (custImport.value['default']) {
        otherSlots.value = custImport.value['default']()[0]['GetSlots']();
      }
      isMounted.value = true;
    } catch (e) {}
    } catch (e) {
      console.log(e);
    }
  });
  const currlf = ref(null) as Ref<LogicFlow | null>;
  /**
   * @description: å·¥è‰ºè·¯çº¿åˆå§‹åŒ–
   * @param {*} lf
   * @return {*}
   */
  async function init(lf, rotId) {
    initRoute(lf, rotId, routeData, currlf);
  }
  /**
   * @description: é€‰æ‹©èŠ‚ç‚¹æ—¶æ ¹æ®è¿”å›žçš„äº‹ä»¶å‚æ•°æ˜¾ç¤ºéšè—ç›¸åº”ç»„ä»¶
   * @param {*} e
   * @return {*}
   */
   */
  function NodeSelect(e) {
    showConfig.value = e.showConfig;
    showNav.value = e.showNav;
    configType.value = e.type
    configType.value = e.type;
    nodes.value = e.nodes;
    routeData.value = {
      nodes: [],
      edges: [],
    };
    initRoute(currlf, e.nodes[0].id, routeData, currlf);
  }
  /**
   * @description: ä¿å­˜é…ç½®æˆåŠŸè¿”å›žæ–¹æ³•
   * @return {*}
   */
   */
  function configSuccess() {
    notification.success({ message: '成功保存行为配置数据' });
  }
src/views/tigerprojects/system/lowcode/data.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-02 17:52:35
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-26 22:23:12
 * @LastEditTime: 2024-06-29 06:12:26
 */
import { ActionItem, BasicColumn, FormSchema } from '/@/components/Table';
@@ -12,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();
/**
@@ -142,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);
  }
}
src/views/tigerprojects/system/lowcode/detail/detail.vue
@@ -63,7 +63,7 @@
      EditOperation(data, d, u) {},
      GetBaseColumns() {},
      GetSearchForm() {},
      GetCrudForm() {},
      GetCrudForm(type: string) {},
      OthersValues(val, id) {},
      GetSelectSuccess(d, u, ...args) {},
      OpenSelectItem(openItemModal: Fn, ...args) {},
src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-26 03:13:41
 * @LastEditTime: 2024-06-28 14:21:49
 */
import { Ref, h, unref } from 'vue';
@@ -26,7 +26,11 @@
    slots: { customRender: 'action' },
    fixed: undefined,
  };
  /**
   * @description: äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -240,7 +244,11 @@
        },
      ];
    },
    GetBaseCards: () => {
    /**
     * @description: èŽ·å–å¡ç‰‡å†…é…ç½®åˆ—è¡¨ï¼Œä»¥å¾ªçŽ¯æ˜¾ç¤ºå¤šä¸ªå¡ç‰‡å¹¶é…ç½®å¤šä¸ªæ’æ§½
     * @return {*}
     */
    GetBaseCards: (type: string) => {
      return [
        {
          name: 'BaseForm',
src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT_GRP.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-26 18:33:05
 * @LastEditTime: 2024-06-28 10:52:16
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -14,24 +14,6 @@
const { t } = useI18n();
function _default() {
  /**
   * @description: è‡ªå®šä¹‰ç¼–辑方法
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function DftGrpEdit(args: Fn[], params: {}) {
    const param = {
      CODE: params['record']['DFTG_CODE'],
      ID: params['record']['ID'],
      Name: 'BAS_DEFECT',
      Title: `编辑不良代码组:${params['record']['DFTG_CODE']}`,
      pCode: 'DFTG_CODE',
      IsID: false,
    };
    args[5](`/BAS_DEFECT/High/${encodeURI(JSON.stringify(param))}`);
  }
  const ActionColumn: BasicColumn = {
    width: 100,
    title: '操作',
@@ -39,7 +21,10 @@
    slots: { customRender: 'action' },
    fixed: 'right',
  };
 /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -121,6 +106,26 @@
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: è‡ªå®šä¹‰ç¼–辑方法
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function DftGrpEdit(args: Fn[], params: {}) {
    const param = {
      CODE: params['record']['DFTG_CODE'],
      ID: params['record']['ID'],
      Name: 'BAS_DEFECT',
      Title: `编辑不良代码组:${params['record']['DFTG_CODE']}`,
      pCode: 'DFTG_CODE',
      IsID: false,
    };
    args[5](`/BAS_DEFECT/High/${encodeURI(JSON.stringify(param))}`);
  }
  return [methods, ActionColumn];
}
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_PV.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-27 20:40:25
 * @LastEditTime: 2024-06-28 10:51:56
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -21,6 +21,10 @@
    fixed: undefined,
  };
  /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -49,40 +53,40 @@
        VAR_VALUE: d.values['val'],
      };
    },
    OpenSelectItem:(openItemModal: Fn, ...args) => {
        openItemModal(true, {
          title: '过程变量列表',
          schemas: [
            {
              field: 'VAR_CODE',
              component: 'Input',
              label: '过程变量编码',
              colProps: {
                span: 12,
              },
    OpenSelectItem: (openItemModal: Fn, ...args) => {
      openItemModal(true, {
        title: '过程变量列表',
        schemas: [
          {
            field: 'VAR_CODE',
            component: 'Input',
            label: '过程变量编码',
            colProps: {
              span: 12,
            },
          ],
          ItemColumns: [
            {
              title: t('过程变量编码'),
              dataIndex: 'VAR_CODE',
              resizable: true,
              sorter: true,
              width: 200,
            },
            {
              title: t('过程变量名称'),
              dataIndex: 'VAR_NAME',
              resizable: true,
              sorter: true,
              width: 180,
            },
          ],
          tableName: 'BAS_LABEL_PV',
          rowKey: 'VAR_CODE',
          searchInfo: {TABLE_NAME: 'BAS_LABEL_PV'}
        });
      }
          },
        ],
        ItemColumns: [
          {
            title: t('过程变量编码'),
            dataIndex: 'VAR_CODE',
            resizable: true,
            sorter: true,
            width: 200,
          },
          {
            title: t('过程变量名称'),
            dataIndex: 'VAR_NAME',
            resizable: true,
            sorter: true,
            width: 180,
          },
        ],
        tableName: 'BAS_LABEL_PV',
        rowKey: 'VAR_CODE',
        searchInfo: { TABLE_NAME: 'BAS_LABEL_PV' },
      });
    },
  };
  return [methods, ActionColumn];
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_TEMP.ts
@@ -4,35 +4,12 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-24 15:52:02
 * @LastEditTime: 2024-06-28 10:52:45
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
function _default() {
  /**
   * @description: è·³è½¬åˆ°è¯¦æƒ…页面方法
   * @param {Fn} go
   * @return {*}
   */
  function goDetail(go: Fn, params: Recordable) {
    const id = {
      ID: params['record'].ID,
      CODE: params['record']['LABEL_CODE'],
      Name: 'BAS_LABEL_VAR',
      firstTabName: '标签模板变量',
      secondTabName: '', //'标签过程变量',
      firstTitle: '模板变量',
      secondTitle: '', //'过程变量',
      pageTitle: '标签模板变量', //详情页面标题
      contentStr: '这里是标签模板变量管理页面,可以管理标签的模板变量或者打印过程中的变量',
      detailName: `模板[${params['record'].LABEL_NAME}]`,
      others: { LABEL_ID: params['record'].ID },
      colSlots: ['BAS_LABEL_PV1add'],
    };
    go(`/BAS_LABEL_VAR/${encodeURI(JSON.stringify(id))}`);
  }
  const ActionColumn: BasicColumn = {
    width: 120,
    title: '操作',
@@ -41,6 +18,10 @@
    fixed: 'right',
  };
  /**
   * @description: äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -69,6 +50,31 @@
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: è·³è½¬åˆ°è¯¦æƒ…页面方法
   * @param {Fn} go
   * @return {*}
   */
  function goDetail(go: Fn, params: Recordable) {
    const id = {
      ID: params['record'].ID,
      CODE: params['record']['LABEL_CODE'],
      Name: 'BAS_LABEL_VAR',
      firstTabName: '标签模板变量',
      secondTabName: '', //'标签过程变量',
      firstTitle: '模板变量',
      secondTitle: '', //'过程变量',
      pageTitle: '标签模板变量', //详情页面标题
      contentStr: '这里是标签模板变量管理页面,可以管理标签的模板变量或者打印过程中的变量',
      detailName: `模板[${params['record'].LABEL_NAME}]`,
      others: { LABEL_ID: params['record'].ID },
      colSlots: ['BAS_LABEL_PV1add'],
    };
    go(`/BAS_LABEL_VAR/${encodeURI(JSON.stringify(id))}`);
  }
  return [methods, ActionColumn];
}
src/views/tigerprojects/system/lowcode/entityts/BAS_LABEL_VAR.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-23 23:42:04
 * @LastEditTime: 2024-06-28 10:53:28
 */
import { Tag, Tooltip } from 'ant-design-vue';
@@ -26,6 +26,11 @@
    slots: { customRender: 'action' },
    fixed: undefined,
  };
  /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸ºï¼Œå¿…éœ€è¦æœ‰çš„æ–¹æ³•
src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_DTL.ts
@@ -16,32 +16,6 @@
import { formatToDateTime } from '/@/utils/dateUtil';
function _default(): any[] {
  /**
   * @description: è‡ªå®šä¹‰åˆ é™¤æ–¹æ³•
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function custDel(args: Fn[], params: {}) {
    if (!isNullOrEmpty(params['data'])) {
      var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']);
      params['data'].value = _data;
      args[6]({
        dataSource: [],
      });
      args[6]({
        dataSource: params['data'],
      });
      args[1]();
    } else {
      DeleteEntity(params['record'], params['entityName']).then((action) => {
        if (action.IsSuccessed) {
          args[1]();
        }
      });
    }
  }
  const ActionColumn: BasicColumn = {
    width: 80,
    title: '操作',
@@ -50,6 +24,10 @@
    fixed: undefined,
  };
  /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -339,6 +317,35 @@
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: è‡ªå®šä¹‰åˆ é™¤æ–¹æ³•
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function custDel(args: Fn[], params: {}) {
    if (!isNullOrEmpty(params['data'])) {
      var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']);
      params['data'].value = _data;
      args[6]({
        dataSource: [],
      });
      args[6]({
        dataSource: params['data'],
      });
      args[1]();
    } else {
      DeleteEntity(params['record'], params['entityName']).then((action) => {
        if (action.IsSuccessed) {
          args[1]();
        }
      });
    }
  }
  return [methods, ActionColumn];
}
src/views/tigerprojects/system/lowcode/entityts/BAS_PKG_RULE.ts
@@ -12,24 +12,6 @@
import { buildUUID } from '/@/utils/uuid';
function _default() {
  /**
   * @description: è‡ªå®šä¹‰ç¼–辑方法,跳转到高级页面
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function pkgGrpEdit(go: Fn, params: {}) {
    const param = {
      CODE: params['record']['RULE_CODE'],
      ID: params['record']['ID'],
      Name: 'BAS_PKG_DTL',
      Title: `编辑包装规则:${params['record']['RULE_CODE']}`,
      pCode: 'PKG_RULE_ID',
      IsID: true,
    };
    go(`/BAS_PKG_DTL/High/${encodeURI(JSON.stringify(param))}`);
  }
  const ActionColumn: BasicColumn = {
    width: 80,
    title: '操作',
@@ -38,6 +20,10 @@
    fixed: undefined,
  };
  /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -69,6 +55,26 @@
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: è‡ªå®šä¹‰ç¼–辑方法,跳转到高级页面
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function pkgGrpEdit(go: Fn, params: {}) {
    const param = {
      CODE: params['record']['RULE_CODE'],
      ID: params['record']['ID'],
      Name: 'BAS_PKG_DTL',
      Title: `编辑包装规则:${params['record']['RULE_CODE']}`,
      pCode: 'PKG_RULE_ID',
      IsID: true,
    };
    go(`/BAS_PKG_DTL/High/${encodeURI(JSON.stringify(param))}`);
  }
  return [methods, ActionColumn];
}
src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts
@@ -1,20 +1,11 @@
/*
 * @Description: file content
 * @Description: ä¸è‰¯åŽŸå› ç›¸å…³
 * @Author: Ben Lin
 * @version:
 * @Date: 2024-06-22 00:58:43
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-26 03:13:26
 */
/*
 * @Description: ä¸è‰¯åŽŸå› ç›¸å…³
 * @Author: Ben Lin
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-23 18:12:40
 */
import { Ref, h } from 'vue';
import { DeleteEntity, getEntity } from '/@/api/tigerapi/system';
import { ActionItem, BasicColumn } from '/@/components/Table';
@@ -25,32 +16,6 @@
import { Tag } from 'ant-design-vue';
function _default() {
  /**
   * @description: è‡ªå®šä¹‰åˆ é™¤æ–¹æ³•
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function rsnGrpDel(args: Fn[], params: {}) {
    if (!isNullOrEmpty(params['data'])) {
      var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']);
      params['data'].value = _data;
      args[6]({
        dataSource: [],
      });
      args[6]({
        dataSource: params['data'],
      });
      args[1]();
    } else {
      DeleteEntity(params['record'], params['entityName']).then((action) => {
        if (action.IsSuccessed) {
          args[1]();
        }
      });
    }
  }
  const ActionColumn: BasicColumn = {
    width: 80,
    title: '操作',
@@ -59,6 +24,10 @@
    fixed: undefined,
  };
  /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -120,7 +89,7 @@
    /**
     * @description: é«˜çº§è¡¨å•和详情页面返回主页面的url
     * @return {*}
     */
     */
    GetHomeUrl: () => {
      return `/BAS_REASON_GRP/LC/${encodeURI(JSON.stringify({ ID: 'BAS_REASON_GRP', colSlots: [], crudColSlots: [] }))}`;
    },
@@ -340,6 +309,34 @@
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: è‡ªå®šä¹‰åˆ é™¤æ–¹æ³•
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function rsnGrpDel(args: Fn[], params: {}) {
    if (!isNullOrEmpty(params['data'])) {
      var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']);
      params['data'].value = _data;
      args[6]({
        dataSource: [],
      });
      args[6]({
        dataSource: params['data'],
      });
      args[1]();
    } else {
      DeleteEntity(params['record'], params['entityName']).then((action) => {
        if (action.IsSuccessed) {
          args[1]();
        }
      });
    }
  }
  return [methods, ActionColumn];
}
src/views/tigerprojects/system/lowcode/entityts/BAS_REASON_GRP.ts
@@ -15,24 +15,6 @@
const { t } = useI18n();
function _default() {
  /**
   * @description: è‡ªå®šä¹‰ç¼–辑方法,跳转到高级页面
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function rsnGrpEdit(args: Fn[], params: {}) {
    const param = {
      CODE: params['record']['RSNG_CODE'],
      ID: params['record']['ID'],
      Name: 'BAS_REASON',
      Title: `编辑不良原因组:${params['record']['RSNG_CODE']}`,
      pCode: 'RSNG_CODE',
      IsID: false,
    };
    args[5](`/BAS_REASON/High/${encodeURI(JSON.stringify(param))}`);
  }
  const ActionColumn: BasicColumn = {
    width: 180,
    title: '操作',
@@ -41,6 +23,10 @@
    fixed: undefined,
  };
  /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -75,7 +61,7 @@
        RSNG_CODE: d.values['val'],
      };
    },
    OpenSelectItem:(openItemModal: Fn, ...args) => {
    OpenSelectItem: (openItemModal: Fn, ...args) => {
      openItemModal(true, {
        title: '不良原因组列表',
        schemas: [
@@ -106,11 +92,31 @@
        ],
        tableName: 'BAS_REASON_GRP',
        rowKey: 'RSNG_CODE',
        searchInfo: {TABLE_NAME: 'BAS_REASON_GRP'}
        searchInfo: { TABLE_NAME: 'BAS_REASON_GRP' },
      });
    }
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: è‡ªå®šä¹‰ç¼–辑方法,跳转到高级页面
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function rsnGrpEdit(args: Fn[], params: {}) {
    const param = {
      CODE: params['record']['RSNG_CODE'],
      ID: params['record']['ID'],
      Name: 'BAS_REASON',
      Title: `编辑不良原因组:${params['record']['RSNG_CODE']}`,
      pCode: 'RSNG_CODE',
      IsID: false,
    };
    args[5](`/BAS_REASON/High/${encodeURI(JSON.stringify(param))}`);
  }
  return [methods, ActionColumn];
}
src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts
@@ -4,10 +4,10 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-27 22:57:45
 * @LastEditTime: 2024-06-29 02:57:03
 */
import { Ref, ref, unref } from 'vue';
import { Ref, h, ref, render, unref } from 'vue';
import { GetRoutePTree, RouteToCust, RouteToProd } from '/@/api/tigerapi/mes/router';
import { GetEnum, SaveEntity, convertToTree, getEntity } from '/@/api/tigerapi/system';
import { useLocale } from '/@/locales/useLocale';
@@ -16,11 +16,14 @@
import { NavItem } from '/@/api/tigerapi/model/basModel';
import { useMessage } from '/@/hooks/web/useMessage';
import { useModal } from '/@/components/Modal';
import { FormSchema } from '/@/components/Table';
import { initRoute } from '../data';
const { t } = useI18n();
const { createErrorModal } = useMessage();
const { getLocale } = useLocale();
function _default() {
  /* å®šä¹‰å˜é‡ */
  const isNormal = (type: number) => type === 0;
  const isScan = (type: number) => type === 1;
  const isAssy = (type: number) => type === 2;
@@ -28,6 +31,10 @@
  const isAudit = (type: number) => type === 4;
  const isPrint = (type: number) => type === 5;
  const isPackage = (type: number) => type === 6;
  /**
   * @description: äº§å“ç»‘定工艺路线的一些自定义方法
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ ‘å½¢å›¾æ ‡
@@ -81,368 +88,19 @@
      data.fieldNames = { key: 'tid', title: 'name' };
      return data;
    },
    /**
     * @description: èŽ·å–é…ç½®é¡¹è¡¨å•å­—æ®µï¼Œæ ¹æ®æ ‘å½¢èŠ‚ç‚¹type不同而不同
     * @param {string} type
     * @return {*}
     */
    GetCrudForm: (type: string) => {
      let form: any[] = [];
      let form: FormSchema[] = [];
      switch (type) {
        case 'Action':
          form = [
            {
              field: 'PROD_CODE',
              label: '产品编码',
              component: 'Input',
              dynamicDisabled: ({ values }) => {
                return true;
              },
              colProps: { span: 12 },
            },
            {
              field: 'ID',
              label: 'ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ACT_ID',
              label: 'ACT_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ROT_ID',
              label: 'ROT_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ACT_CODE',
              label: 'ACT_CODE',
              component: 'Input',
              show: false,
            },
            {
              field: 'NODE_ID',
              label: 'NODE_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'CUST_CODE',
              label: '客户编码',
              component: 'Input',
              dynamicDisabled: ({ values }) => {
                return true;
              },
              colProps: { span: 12 },
            },
            {
              field: 'ACT_TYPE',
              label: '行为类型',
              component: 'ApiSelect',
              colProps: { span: 12 },
              defaultValue: 0,
              componentProps: {
                api: GetEnum,
                params: { name: 'MES_PROD_ACTION+ACT_TYPEs' },
                resultField: 'Data',
                labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
                valueField: 'Value',
                // onChange: (e, v) => {
                //   alert(e)
                //   console.log('ApiSelect====>:', e, v);
                // },
              },
            },
            {
              field: 'IS_ACTIVE',
              label: '是否启用',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'RULE_CODE',
              label: '扫码验证',
              component: 'Input',
              colProps: { span: 10 },
              ifShow: ({ values }) => isScan(values.ACT_TYPE),
            },
            {
              field: '0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isScan(values.ACT_TYPE),
              colSlot: 'scanadd',
            },
            {
              field: 'ITEM_CODE',
              label: '组装上料',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isAssy(values.ACT_TYPE),
            },
            {
              field: '00',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isAssy(values.ACT_TYPE),
              colSlot: 'assyadd',
            },
            {
              field: 'TEST_CODE',
              label: '产品测试',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isTest(values.ACT_TYPE),
            },
            {
              field: 'test0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isTest(values.ACT_TYPE),
              colSlot: 'testadd',
            },
            {
              field: 'SAPL_CODE',
              label: '产品抽检',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isAudit(values.ACT_TYPE),
            },
            {
              field: 'audit0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isAudit(values.ACT_TYPE),
              colSlot: 'auditadd',
            },
            {
              field: 'LABEL_CODE',
              label: '标签打印',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isPrint(values.ACT_TYPE),
            },
            {
              field: 'print0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isPrint(values.ACT_TYPE),
              colSlot: 'printadd',
            },
            {
              field: 'pkgRULE_CODE',
              label: '包装规则',
              colProps: { span: 10 },
              component: 'Input',
              ifShow: ({ values }) => isPackage(values.ACT_TYPE),
            },
            {
              field: 'pkg0',
              label: '1',
              defaultValue: '',
              component: 'Input',
              colProps: { span: 2, pull: 1 },
              ifShow: ({ values }) => isPackage(values.ACT_TYPE),
              colSlot: 'pkgadd',
            },
            {
              field: 'REMARK',
              label: '备注',
              component: 'Input',
              colProps: { span: 12 },
            },
          ];
          form = actionFormShema;
          break;
        case 'Node':
          form = [
            {
              field: 'PROD_CODE',
              label: '产品编码',
              component: 'Input',
              dynamicDisabled: ({ values }) => {
                return true;
              },
              colProps: { span: 12 },
            },
            {
              field: 'ID',
              label: 'ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ACT_ID',
              label: 'ACT_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'ROT_ID',
              label: 'ROT_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'NODE_ID',
              label: 'NODE_ID',
              component: 'Input',
              show: false,
            },
            {
              field: 'NODE_NAME',
              label: '工序节点名称',
              component: 'Input',
            },
            {
              field: 'CUST_CODE',
              label: '客户编码',
              component: 'Input',
              dynamicDisabled: ({ values }) => {
                return true;
              },
              colProps: { span: 12 },
            },
            {
              field: 'OPER_CODE',
              label: '工序编码',
              component: 'Input',
            },
            {
              field: 'IS_ACTIVE',
              label: '是否启用',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'IS_CALC_FPY',
              label: '是否计算直通率',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'CAN_SKIP',
              label: '是否允许跳站',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'IS_INPUT',
              label: '是否投入站',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'IS_OUTPUT',
              label: '是否产出站',
              required: true,
              component: 'Select',
              colProps: { span: 12 },
              componentProps: {
                options: [
                  {
                    label: '是',
                    value: 'Y',
                    key: 'Y',
                  },
                  {
                    label: '否',
                    value: 'N',
                    key: 'N',
                  },
                ],
              },
            },
            {
              field: 'REMARK',
              label: '备注',
              component: 'Input',
              colProps: { span: 12 },
            },
          ];
          form = nodeFormShema;
          break;
      }
      return form;
@@ -454,6 +112,10 @@
    GetCrudColSlots: () => {
      return ['scanadd', 'assyadd', 'testadd', 'auditadd', 'printadd', 'pkgadd'];
    },
    /**
     * @description: åˆ‡æ¢èŠ‚ç‚¹æ—¶äº‹ä»¶æ–¹æ³•
     * @return {*}
     */
    nodeChange: (params: {
      resetFields: any;
      setFieldsValue: any;
@@ -605,8 +267,6 @@
          for (i = 0; i < codes.length; i++) {
            if (d.which == 'addRoute') {
              RouteToProd({ rotId: codes[i], prodCode: args[1]['CODE'] });
            } else {
              RouteToCust({ rotId: codes[i], prodCode: args[1]['CODE'], custCode: '' });
            }
          }
@@ -639,6 +299,7 @@
      return {
        addRoute: useModal(),
        addCustomer: useModal(),
        editRoute: useModal(),
      };
    },
    /**
@@ -649,20 +310,25 @@
    GetTitle: (type: string) => {
      return {
        configTitle: type == 'Action' ? '行为配置' : '工序配置',
        navTitle: '添加工艺路线',
        navTitle: type == 'Product' ? '添加工艺路线' : '工艺路线维护',
      };
    },
    /**
     * @description: æ ¹æ®é€‰ä¸­çš„æ ‘节点判断要切换哪个组件
     * @description: æ ¹æ®é€‰ä¸­çš„æ ‘节点返回主页面,自定义方法,这里是判断要切换哪个组件
     * @param {Ref} selectedNodes
     * @return {*}
     */
    SelectNode: (selectedNodes: Ref<any[]>) => {
      let result = { showConfig: false, showNav: false, type: selectedNodes.value[0].type };
      let result = {
        showConfig: false,
        showNav: false,
        type: selectedNodes.value[0].type,
        nodes: selectedNodes.value,
      };
      if (isNullOrUnDef(selectedNodes)) {
        return result;
      }
      if (selectedNodes.value[0].type == 'Product') {
      if (selectedNodes.value[0].type == 'Product' || selectedNodes.value[0].type == 'Route') {
        result.showNav = true;
        result.showConfig = false;
      }
@@ -676,25 +342,43 @@
     * @description: èŽ·å–å¯¼èˆªé¡¹
     * @return {*}
     */
    GetNavItems: () => {
      return [
        {
          title: '添加产品工艺路线',
          icon: 'add_green|svg',
          color: '#1fdaca',
          url: '/addRoute',
          action: 'addRoute',
          isStep: false,
        },
        {
          title: '添加客户工艺路线',
          icon: 'add_customer|svg',
          color: '#bf0c2c',
          url: '/addCustomer',
          action: 'addCustomer',
          isStep: true,
        },
      ] as NavItem[];
    GetNavItems: (type: string) => {
      let item: NavItem[] = [];
      switch (type) {
        case 'Product':
          item = [
            {
              title: '添加产品工艺路线',
              icon: 'add_green|svg',
              color: '#1fdaca',
              url: '/addRoute',
              action: 'addRoute',
              isStep: false,
            },
            {
              title: '添加客户工艺路线',
              icon: 'add_customer|svg',
              color: '#bf0c2c',
              url: '/addCustomer',
              action: 'addCustomer',
              isStep: true,
            },
          ];
          break;
        case 'Route':
          item = [
            {
              title: '编辑工艺路线',
              icon: 'clarity:note-edit-line',
              color: '#1fdaca',
              url: '/editRoute',
              action: 'editRoute',
              isStep: false,
            },
          ];
          break;
      }
      return item;
    },
    /**
     * @description: å¯¼èˆªé¡µé¢åˆ‡æ¢æŒ‰é’®æ—¶è°ƒç”¨æ–¹æ³•
@@ -703,6 +387,8 @@
     */
    navChangeItem: (action: any, ...args) => {
      switch (action) {
        case 'editRoute':
          break;
        case 'addRoute':
          args[0](true, {
            title: '工艺路线列表',
@@ -746,8 +432,70 @@
          break;
      }
    },
    /**
     * @description: èŽ·å–å¡ç‰‡å†…é…ç½®åˆ—è¡¨ï¼Œä»¥å¾ªçŽ¯æ˜¾ç¤ºå¤šä¸ªå¡ç‰‡å¹¶é…ç½®å¤šä¸ªæ’æ§½
     * @return {*}
     */
    GetBaseCards: (type: string) => {
      let reusts: any[] = [];
      switch (type) {
        case 'Product':
          reusts = [];
          break;
        case 'Route':
          reusts = [
            {
              name: 'RotInfo',
              slots: [],
              preIcons: {},
              title: '工艺路线图',
              entityName: '',
            },
          ];
          break;
      }
      return reusts;
    },
    /**
     * @description: èŽ·å–æ’æ§½åˆ—è¡¨
     * @return {*}
     */
    GetSlots: () => {
      return ['RotInfo'];
    },
    /**
     * @description: ç”Ÿæˆhtml
     * @return {*}
     */
    GenerateHtml: (type: string | null) => {
      const newElement = document.createElement('div');
      // newElement.textContent = 'New Element =>'+type;
      // newElement.style.height = '250px';
      newElement.id = 'lfContainer';
      newElement.className = "h-full";
      // newElement.style.color = 'blue';
      // newElement.style.fontSize = '16px';
      return newElement;
    },
    /**
     * @description: è‡ªå®šä¹‰æ–¹æ³•
     * @param {string} type
     * @param {array} args
     * @return {*}
     */
    CustFunc: (type: string | undefined, ...args) => {
      if (type == 'Route') {
        initRoute(args[0], args[1]);
      }
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: å¼¹å‡ºé€‰æ‹©æ¡†-物料选择框配置
   * @return {*}
   */
  const itemCodeModalCfg = {
    title: '物料列表',
    schemas: [
@@ -781,6 +529,10 @@
    searchInfo: { TABLE_NAME: 'BAS_ITEM' },
  };
  /**
   * @description: å¼¹å‡ºé€‰æ‹©æ¡†-规则选择框配置
   * @return {*}
   */
  const ruleModalCfg = {
    title: '规则列表',
    schemas: [
@@ -814,6 +566,10 @@
    searchInfo: { TABLE_NAME: 'BAS_CODE_RULE' },
  };
  /**
   * @description: å¼¹å‡ºé€‰æ‹©æ¡†-打印模板选择框配置
   * @return {*}
   */
  const printModalCfg = {
    title: '打印模板列表',
    schemas: [
@@ -880,6 +636,372 @@
    searchInfo: { TABLE_NAME: 'BAS_PKG_RULE' },
  };
  /**
   * @description: è¡Œä¸ºé…ç½®è¡¨å•字段
   * @return {*}
   */
  const actionFormShema: FormSchema[] = [
    {
      field: 'PROD_CODE',
      label: '产品编码',
      component: 'Input',
      dynamicDisabled: ({ values }) => {
        return true;
      },
      colProps: { span: 12 },
    },
    {
      field: 'ID',
      label: 'ID',
      component: 'Input',
      show: false,
    },
    {
      field: 'ACT_ID',
      label: 'ACT_ID',
      component: 'Input',
      show: false,
    },
    {
      field: 'ROT_ID',
      label: 'ROT_ID',
      component: 'Input',
      show: false,
    },
    {
      field: 'ACT_CODE',
      label: 'ACT_CODE',
      component: 'Input',
      show: false,
    },
    {
      field: 'NODE_ID',
      label: 'NODE_ID',
      component: 'Input',
      show: false,
    },
    {
      field: 'CUST_CODE',
      label: '客户编码',
      component: 'Input',
      dynamicDisabled: ({ values }) => {
        return true;
      },
      colProps: { span: 12 },
    },
    {
      field: 'ACT_TYPE',
      label: '行为类型',
      component: 'ApiSelect',
      colProps: { span: 12 },
      defaultValue: 0,
      componentProps: {
        api: GetEnum,
        params: { name: 'MES_PROD_ACTION+ACT_TYPEs' },
        resultField: 'Data',
        labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
        valueField: 'Value',
        // onChange: (e, v) => {
        //   alert(e)
        //   console.log('ApiSelect====>:', e, v);
        // },
      },
    },
    {
      field: 'IS_ACTIVE',
      label: '是否启用',
      required: true,
      component: 'Select',
      colProps: { span: 12 },
      componentProps: {
        options: [
          {
            label: '是',
            value: 'Y',
            key: 'Y',
          },
          {
            label: '否',
            value: 'N',
            key: 'N',
          },
        ],
      },
    },
    {
      field: 'RULE_CODE',
      label: '扫码验证',
      component: 'Input',
      colProps: { span: 10 },
      ifShow: ({ values }) => isScan(values.ACT_TYPE),
    },
    {
      field: '0',
      label: '1',
      defaultValue: '',
      component: 'Input',
      colProps: { span: 2, pull: 1 },
      ifShow: ({ values }) => isScan(values.ACT_TYPE),
      colSlot: 'scanadd',
    },
    {
      field: 'ITEM_CODE',
      label: '组装上料',
      colProps: { span: 10 },
      component: 'Input',
      ifShow: ({ values }) => isAssy(values.ACT_TYPE),
    },
    {
      field: '00',
      label: '1',
      defaultValue: '',
      component: 'Input',
      colProps: { span: 2, pull: 1 },
      ifShow: ({ values }) => isAssy(values.ACT_TYPE),
      colSlot: 'assyadd',
    },
    {
      field: 'TEST_CODE',
      label: '产品测试',
      colProps: { span: 10 },
      component: 'Input',
      ifShow: ({ values }) => isTest(values.ACT_TYPE),
    },
    {
      field: 'test0',
      label: '1',
      defaultValue: '',
      component: 'Input',
      colProps: { span: 2, pull: 1 },
      ifShow: ({ values }) => isTest(values.ACT_TYPE),
      colSlot: 'testadd',
    },
    {
      field: 'SAPL_CODE',
      label: '产品抽检',
      colProps: { span: 10 },
      component: 'Input',
      ifShow: ({ values }) => isAudit(values.ACT_TYPE),
    },
    {
      field: 'audit0',
      label: '1',
      defaultValue: '',
      component: 'Input',
      colProps: { span: 2, pull: 1 },
      ifShow: ({ values }) => isAudit(values.ACT_TYPE),
      colSlot: 'auditadd',
    },
    {
      field: 'LABEL_CODE',
      label: '标签打印',
      colProps: { span: 10 },
      component: 'Input',
      ifShow: ({ values }) => isPrint(values.ACT_TYPE),
    },
    {
      field: 'print0',
      label: '1',
      defaultValue: '',
      component: 'Input',
      colProps: { span: 2, pull: 1 },
      ifShow: ({ values }) => isPrint(values.ACT_TYPE),
      colSlot: 'printadd',
    },
    {
      field: 'pkgRULE_CODE',
      label: '包装规则',
      colProps: { span: 10 },
      component: 'Input',
      ifShow: ({ values }) => isPackage(values.ACT_TYPE),
    },
    {
      field: 'pkg0',
      label: '1',
      defaultValue: '',
      component: 'Input',
      colProps: { span: 2, pull: 1 },
      ifShow: ({ values }) => isPackage(values.ACT_TYPE),
      colSlot: 'pkgadd',
    },
    {
      field: 'REMARK',
      label: '备注',
      component: 'Input',
      colProps: { span: 12 },
    },
  ];
  /**
   * @description: å·¥åºé…ç½®è¡¨å•字段
   * @return {*}
   */
  const nodeFormShema: FormSchema[] = [
    {
      field: 'PROD_CODE',
      label: '产品编码',
      component: 'Input',
      dynamicDisabled: ({ values }) => {
        return true;
      },
      colProps: { span: 12 },
    },
    {
      field: 'ID',
      label: 'ID',
      component: 'Input',
      show: false,
    },
    {
      field: 'ACT_ID',
      label: 'ACT_ID',
      component: 'Input',
      show: false,
    },
    {
      field: 'ROT_ID',
      label: 'ROT_ID',
      component: 'Input',
      show: false,
    },
    {
      field: 'NODE_ID',
      label: 'NODE_ID',
      component: 'Input',
      show: false,
    },
    {
      field: 'NODE_NAME',
      label: '工序节点名称',
      component: 'Input',
    },
    {
      field: 'CUST_CODE',
      label: '客户编码',
      component: 'Input',
      dynamicDisabled: ({ values }) => {
        return true;
      },
      colProps: { span: 12 },
    },
    {
      field: 'OPER_CODE',
      label: '工序编码',
      component: 'Input',
    },
    {
      field: 'IS_ACTIVE',
      label: '是否启用',
      required: true,
      component: 'Select',
      colProps: { span: 12 },
      componentProps: {
        options: [
          {
            label: '是',
            value: 'Y',
            key: 'Y',
          },
          {
            label: '否',
            value: 'N',
            key: 'N',
          },
        ],
      },
    },
    {
      field: 'IS_CALC_FPY',
      label: '是否计算直通率',
      required: true,
      component: 'Select',
      colProps: { span: 12 },
      componentProps: {
        options: [
          {
            label: '是',
            value: 'Y',
            key: 'Y',
          },
          {
            label: '否',
            value: 'N',
            key: 'N',
          },
        ],
      },
    },
    {
      field: 'CAN_SKIP',
      label: '是否允许跳站',
      required: true,
      component: 'Select',
      colProps: { span: 12 },
      componentProps: {
        options: [
          {
            label: '是',
            value: 'Y',
            key: 'Y',
          },
          {
            label: '否',
            value: 'N',
            key: 'N',
          },
        ],
      },
    },
    {
      field: 'IS_INPUT',
      label: '是否投入站',
      required: true,
      component: 'Select',
      colProps: { span: 12 },
      componentProps: {
        options: [
          {
            label: '是',
            value: 'Y',
            key: 'Y',
          },
          {
            label: '否',
            value: 'N',
            key: 'N',
          },
        ],
      },
    },
    {
      field: 'IS_OUTPUT',
      label: '是否产出站',
      required: true,
      component: 'Select',
      colProps: { span: 12 },
      componentProps: {
        options: [
          {
            label: '是',
            value: 'Y',
            key: 'Y',
          },
          {
            label: '否',
            value: 'N',
            key: 'N',
          },
        ],
      },
    },
    {
      field: 'REMARK',
      label: '备注',
      component: 'Input',
      colProps: { span: 12 },
    },
  ];
  return [methods];
}
src/views/tigerprojects/system/lowcode/entityts/QMS_INS_ITEM.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-26 03:07:40
 * @LastEditTime: 2024-06-28 10:57:44
 */
import { Ref, h, unref } from 'vue';
@@ -27,6 +27,10 @@
    fixed: undefined,
  };
  /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    EditOperation: ( data: Ref<any[]>, d, u) => {
      if (u.isUpdate) {
src/views/tigerprojects/system/lowcode/entityts/QMS_INS_STD.ts
@@ -14,25 +14,6 @@
const { t } = useI18n();
function _default() {
  /**
   * @description: è‡ªå®šä¹‰ç¼–辑方法
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function insStdEdit(args: Fn[], params: {}) {
    const param = {
      CODE: params['record']['STD_CODE'],
      ID: params['record']['ID'],
      Name: 'QMS_INS_ITEM', //一般是明细表实体
      Title: `编辑检验项目:${params['record']['STD_CODE']}`,
      pCode: 'TECH_STD', //跳转到高级表单的关键字段名
      mCode: 'STD_CODE', //跳转到高级表单的关键字段名映射字段
      IsID: false,
    };
    args[5](`/QMS_INS_ITEM/High/${encodeURI(JSON.stringify(param))}`);
  }
  const ActionColumn: BasicColumn = {
    width: 100,
    title: '操作',
@@ -41,6 +22,10 @@
    fixed: 'right',
  };
  /**
   * @description: ä¸€äº›è‡ªå®šæ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -76,7 +61,7 @@
     * @param {*} d
     * @param {*} u
     * @return {*}
     */
     */
    GetSelectSuccess: (d, u) => {
      return {
        ITEM_CODE: d.values['val'],
@@ -86,7 +71,7 @@
     * @description: å¼¹å‡ºé€‰æ‹©æ¡†æ‰“开方法
     * @param {Fn} openItemModal
     * @return {*}
     */
     */
    OpenSelectItem: (openItemModal: Fn, ...args) => {
      openItemModal(true, {
        title: '物料列表',
@@ -123,6 +108,27 @@
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: è‡ªå®šä¹‰ç¼–辑方法
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function insStdEdit(args: Fn[], params: {}) {
    const param = {
      CODE: params['record']['STD_CODE'],
      ID: params['record']['ID'],
      Name: 'QMS_INS_ITEM', //一般是明细表实体
      Title: `编辑检验项目:${params['record']['STD_CODE']}`,
      pCode: 'TECH_STD', //跳转到高级表单的关键字段名
      mCode: 'STD_CODE', //跳转到高级表单的关键字段名映射字段
      IsID: false,
    };
    args[5](`/QMS_INS_ITEM/High/${encodeURI(JSON.stringify(param))}`);
  }
  return [methods, ActionColumn];
}
src/views/tigerprojects/system/lowcode/entityts/V_BAS_PROD.ts
@@ -4,37 +4,12 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-25 18:37:56
 * @LastEditTime: 2024-06-28 10:58:43
 */
import { ActionItem, BasicColumn } from '/@/components/Table';
function _default() {
  /**
   * @description: è·³è½¬äº§å“å·¥è‰ºç»‘定页面
   * @param {*} params
   * @return {*}
   */
  function handleBinding(go: Fn, params: Recordable<any>) {
    const id = {
      ID: params['record'].ID,
      Name: 'ProdRouteBinding',
      CODE: params['record'].ITEM_CODE,
      Title: `产品[${params['record'].ITEM_CODE}]工艺绑定`,
      colSlots: [], /* è¡¨æ ¼å†…的查询表单字段的插槽列表,一般用于弹出选择框按钮 */
      crudColSlots: [], /* å¢žåˆ æ”¹è¡¨å•字段的插槽列表,一般用于弹出选择框按钮 */
      dense: true,
      pageTitle: `产品工艺绑定`,
      pageContent: `这里是管理产品的工艺绑定,一个产品可以绑定多个工艺路线`,
    };
    go(`/ProdRouteBinding/CP/${encodeURI(JSON.stringify(id))}`);
    // let obj = JSON.stringify(id);
    // push({
    //   path: '/ProdRouteBinding',
    //   state: {obj}, //HTML5 History API çš„传参,参数隐藏不在地址栏显示(history)
    // })
  }
  const ActionColumn: BasicColumn = {
    width: 80,
    title: '操作',
@@ -43,6 +18,10 @@
    fixed: undefined,
  };
  /**
   * @description: ä¸€äº›è‡ªå®šä¹‰æ–¹æ³•
   * @return {*}
   */
  const methods = {
    /**
     * @description: èŽ·å–æ–°å¢žæŒ‰é’®çš„è¡Œä¸º
@@ -71,6 +50,33 @@
    },
  };
  /* ä»¥ä¸‹æ˜¯å†…部方法,不export,供上面的方法调用 */
  /**
   * @description: è·³è½¬äº§å“å·¥è‰ºç»‘定页面
   * @param {*} params
   * @return {*}
   */
  function handleBinding(go: Fn, params: Recordable<any>) {
    const id = {
      ID: params['record'].ID,
      Name: 'ProdRouteBinding',
      CODE: params['record'].ITEM_CODE,
      Title: `产品[${params['record'].ITEM_CODE}]工艺绑定`,
      colSlots: [] /* è¡¨æ ¼å†…的查询表单字段的插槽列表,一般用于弹出选择框按钮 */,
      crudColSlots: [] /* å¢žåˆ æ”¹è¡¨å•字段的插槽列表,一般用于弹出选择框按钮 */,
      dense: true,
      pageTitle: `产品工艺绑定`,
      pageContent: `这里是管理产品的工艺绑定,一个产品可以绑定多个工艺路线`,
    };
    go(`/ProdRouteBinding/CP/${encodeURI(JSON.stringify(id))}`);
    // let obj = JSON.stringify(id);
    // push({
    //   path: '/ProdRouteBinding',
    //   state: {obj}, //HTML5 History API çš„传参,参数隐藏不在地址栏显示(history)
    // })
  }
  return [methods, ActionColumn];
}
src/views/tigerprojects/system/lowcode/normal/mainTable.vue
@@ -87,7 +87,7 @@
      EditOperation(data, d, u) {},
      GetBaseColumns() {},
      GetSearchForm() {},
      GetCrudForm() {},
      GetCrudForm(type: string) {},
      OthersValues(val, id) {},
    } as EntityCustFunctionType,
  ]);