1、组件路径

business/platform/bpmn/components/flow-diagram/index.vue

2、使用举例

template

<template>
    <flow-diagram
    ref="flowDiagram"
    :def-id="defId1"
    :task-id="taskId1"
    :inst-id="instId1"
    :biz-key="bizKey1"
   />
</template>

script

import FlowDiagram from '@business/platform/bpmn/components/flow-diagram'
......
components: {
    FlowDiagram,
  },
    data() {
    return {
      loading: false,
      init: false,
      defId1: '',
      proInstId1: '',
      taskId1: '',
      instId1: '',
      bizKey1: ''
    }
  },
   mounted() {
    if (this.initLoad) {
      const data = {
        defId: this.defId,
        taskId: this.taskId,
        instId: this.instId,
        bizKey: this.bizKey
      }
      this.loadFormData(data)
    }
   methods: {
    loadFormData(data = {}) {
      this.defId1 = data.defId
      this.taskId1 = data.taskId
      this.instId1 = data.instId
      this.bizKey1 = data.bizKey
      this.$nextTick(() => {
          this.$refs.flowDiagram.getFormData()
      })
    }
  }
 ......

更多举例
记得一定要调用 this.$refs.flowDiagram.getFormData() 否则无法显示数据

3、API 属性

参数说明:
defId:  流程定义ID【新建流程、启动流程和草稿传】
taskId: 流程任务ID【待办或流程任务传】
instId :  流程实例ID【正在流转或流程完成传】
bizKey:业务表单主键

4、API 方法

暂无,具体看代码方法
getFormData 获取流程图数据

作者:hugh  创建时间:2023-12-26 17:56
最后编辑:hugh  更新时间:2024-11-25 19:17