Ben Lin
2024-04-25 e404c076586d9682c3d782a4ecb0dc254f0bfd48
src/views/tigerprojects/mes/eng/router/index.vue
@@ -20,11 +20,12 @@
  </PageWrapper>
</template>
<script lang="ts">
<script lang="ts" setup>
  import { FlowChart } from '/@/components/FlowChart';
  import { PageWrapper } from '/@/components/Page';
  import { BasicForm, FormSchema } from '/@/components/Form/index';
  import { getOperAllList } from '/@/api/tigerapi/mes/oper';
  import { ref } from 'vue';
  const isRuter = (type: string) => type === '0';
  const isOper = (type: string) => type === '1';
@@ -147,134 +148,125 @@
      labelWidth: 200,
    },
  ];
  export default {
    components: { FlowChart, PageWrapper, BasicForm },
    setup() {
      let demoData = {
        nodes: [
  const demoData = ref({
    nodes: [
      {
        id: '5d82e943-477f-4313-aaff-a736d8caba74',
        type: 'rect',
        x: 340,
        y: 120,
        properties: {},
        text: {
          x: 340,
          y: 120,
          value: '测试工序',
        },
      },
      {
        id: '6e0c6714-69a7-4160-8bda-61f4e6d285dd',
        type: 'rect',
        x: 560,
        y: 120,
        properties: {},
        text: {
          x: 560,
          y: 120,
          value: '上料工序',
        },
      },
      {
        id: '80b2ee17-5a0e-4586-ba28-6ba59fcc0f59',
        type: 'rect',
        x: 340,
        y: 280,
        properties: {
          isReturn: true,
        },
        text: {
          x: 340,
          y: 280,
          value: '维修工序',
        },
      },
    ],
    edges: [
      {
        id: 'Flow_0p4u47c',
        type: 'bpmn:sequenceFlow',
        sourceNodeId: '5d82e943-477f-4313-aaff-a736d8caba74',
        targetNodeId: '6e0c6714-69a7-4160-8bda-61f4e6d285dd',
        startPoint: {
          x: 390,
          y: 120,
        },
        endPoint: {
          x: 510,
          y: 120,
        },
        properties: {},
        pointsList: [
          {
            id: '5d82e943-477f-4313-aaff-a736d8caba74',
            type: 'rect',
            x: 340,
            x: 390,
            y: 120,
            properties: {},
            text: {
              x: 340,
              y: 120,
              value: '测试工序',
            },
          },
          {
            id: '6e0c6714-69a7-4160-8bda-61f4e6d285dd',
            type: 'rect',
            x: 560,
            x: 510,
            y: 120,
            properties: {},
            text: {
              x: 560,
              y: 120,
              value: '上料工序',
            },
          },
          {
            id: '80b2ee17-5a0e-4586-ba28-6ba59fcc0f59',
            type: 'rect',
            x: 340,
            y: 280,
            properties: {
              isReturn: true,
            },
            text: {
              x: 340,
              y: 280,
              value: '维修工序',
            },
          },
        ],
        edges: [
      },
      {
        id: 'Flow_09tu4cm',
        type: 'bpmn:sequenceFlow',
        sourceNodeId: '5d82e943-477f-4313-aaff-a736d8caba74',
        targetNodeId: '80b2ee17-5a0e-4586-ba28-6ba59fcc0f59',
        startPoint: {
          x: 340,
          y: 160,
        },
        endPoint: {
          x: 340,
          y: 240,
        },
        properties: {},
        pointsList: [
          {
            id: 'Flow_0p4u47c',
            type: 'bpmn:sequenceFlow',
            sourceNodeId: '5d82e943-477f-4313-aaff-a736d8caba74',
            targetNodeId: '6e0c6714-69a7-4160-8bda-61f4e6d285dd',
            startPoint: {
              x: 390,
              y: 120,
            },
            endPoint: {
              x: 510,
              y: 120,
            },
            properties: {},
            pointsList: [
              {
                x: 390,
                y: 120,
              },
              {
                x: 510,
                y: 120,
              },
            ],
            x: 340,
            y: 160,
          },
          {
            id: 'Flow_09tu4cm',
            type: 'bpmn:sequenceFlow',
            sourceNodeId: '5d82e943-477f-4313-aaff-a736d8caba74',
            targetNodeId: '80b2ee17-5a0e-4586-ba28-6ba59fcc0f59',
            startPoint: {
              x: 340,
              y: 160,
            },
            endPoint: {
              x: 340,
              y: 240,
            },
            properties: {},
            pointsList: [
              {
                x: 340,
                y: 160,
              },
              {
                x: 340,
                y: 240,
              },
            ],
          },
          {
            id: '22226ec4-9960-497d-93cb-6226a3f29b3d',
            type: 'custom-edge',
            sourceNodeId: '80b2ee17-5a0e-4586-ba28-6ba59fcc0f59',
            targetNodeId: '5d82e943-477f-4313-aaff-a736d8caba74',
            startPoint: {
              x: 351,
              y: 240,
            },
            endPoint: {
              x: 351,
              y: 160,
            },
            properties: {},
            pointsList: [
              {
                x: 351,
                y: 240,
              },
              {
                x: 351,
                y: 160,
              },
            ],
            x: 340,
            y: 240,
          },
        ],
      };
      return {
        demoData,
        schemas,
        handleReset: () => {},
        handleSubmit: (_values: any) => {},
      };
    },
  };
      },
      {
        id: '22226ec4-9960-497d-93cb-6226a3f29b3d',
        type: 'custom-edge',
        sourceNodeId: '80b2ee17-5a0e-4586-ba28-6ba59fcc0f59',
        targetNodeId: '5d82e943-477f-4313-aaff-a736d8caba74',
        startPoint: {
          x: 351,
          y: 240,
        },
        endPoint: {
          x: 351,
          y: 160,
        },
        properties: {},
        pointsList: [
          {
            x: 351,
            y: 240,
          },
          {
            x: 351,
            y: 160,
          },
        ],
      },
    ],
  });
  function handleReset() {}
  function handleSubmit(_values: any) {}
</script>