BPMN.js学习

查看流程图 

processView: {
  title: '',
  open: false,
  index: undefined,
  xmlData:"",
},
<el-table-column label="模型名称" align="center" :show-overflow-tooltip="true">
   <template slot-scope="scope">
       <el-button type="text" @click="handleProcessView(scope.row)">
            <span>{{ scope.row.modelName }}</span>
       </el-button>
   </template>
</el-table-column>

   <!-- 流程图 -->
 <el-dialog :title="processView.title" :visible.sync="processView.open" width="70%" append-to-body>
      <!-- 传递了key和xml -->
      <process-viewer :key="`designer-${processView.index}`" :xml="processView.xmlData" :style="{height: '400px'}" />
 </el-dialog>
----------------------------------------------------------------------------------------
 /** 查看流程图 */
    handleProcessView(row) {
      let modelId = row.modelId;
      this.processView.title = "流程图";
      this.processView.index = modelId;
      // 发送请求,获取xml
      getBpmnXml(modelId).then(response => {
        this.processView.xmlData = response.data;
      })
      this.processView.open = true;
    },
----------------------------------------------------------------------------------------

启动流程

    submit(data) {
      if (data && this.definitionId) {
        // 启动流程并将表单数据加入流程变量
        startProcess(this.definitionId, JSON.stringify(data.valData))
          .then(
            this.$tab.closeOpenPage({path: '/run/own' })
          // this.pollForResult();
        ).catch(err =>console.error("发生错误:",error))
      }
    },

获取是否有开始表单数据

      this.deployId = this.$route.params && this.$route.params.deployId;
      this.definitionId = this.$route.query && this.$route.query.definitionId;
      this.procInsId = this.$route.query && this.$route.query.procInsId;
      getProcessForm({
        definitionId: this.definitionId,
        deployId: this.deployId,
        procInsId: this.procInsId
      }).then(res => {
        if (res.data) {
          this.formData = res.data;
          this.formOpen = true
        }
      })

相关推荐

  1. bpmn+vue 中文文档

    2024-07-12 07:34:04       45 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-12 07:34:04       66 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-12 07:34:04       70 阅读
  3. 在Django里面运行非项目文件

    2024-07-12 07:34:04       57 阅读
  4. Python语言-面向对象

    2024-07-12 07:34:04       68 阅读

热门阅读

  1. 【WPF】Enum与Converter的使用

    2024-07-12 07:34:04       24 阅读
  2. 【CH32V305FBP6】USBD 初始化分析

    2024-07-12 07:34:04       26 阅读
  3. Ansible的Playbook

    2024-07-12 07:34:04       24 阅读
  4. Ansible

    2024-07-12 07:34:04       22 阅读
  5. RabbitMQ保证消息被成功发送和消费

    2024-07-12 07:34:04       23 阅读
  6. Python实现一对多WebSocket发送给指定多个客户端

    2024-07-12 07:34:04       26 阅读
  7. React 18 + Babel 7 + Webpack 5 开发环境搭建

    2024-07-12 07:34:04       27 阅读
  8. flutter常用库的介绍(1)

    2024-07-12 07:34:04       31 阅读
  9. 用Python和TensorFlow实现图像分类:从零开始

    2024-07-12 07:34:04       28 阅读
  10. 鸿蒙开发工程师面试题-架构篇

    2024-07-12 07:34:04       29 阅读