基于jeecgboot-vue3的Flowable新建流程定义(二)

86 篇文章 3 订阅
77 篇文章 0 订阅

因为这个项目license问题无法开源,更多技术支持与服务请加入我的知识星球。

接上一节

4、编辑好后进行保存,保存代码如下:

/*保存流程定义*/
  const save = (data: any) => {
    //console.log("save data", data); // { process: {...}, xml: '...', svg: '...' }
    let params = {
      name: data.process.name,
      category: modelForm.processType.id,
      xml: data.xml
    }
    if (modelForm.processType == null) {
      createMessage.success('请选择流程分类!');
      return '';
    }
    saveXml(params).then(res => {
      // 关闭当前标签页并返回上个页面
      getList()
      designerOpen.value = false
    })
  }

5、保存后效果图

6、里面可以进行流程与表单的预览

查看流程图

/** 查看流程图 */
  const handleProcessView = (deploymentId: string) => {
    processView.title = "流程图";
    processView.index = deploymentId;
    // 发送请求,获取xml
    readXml(deploymentId).then(res => {
      if (res.success) {
        processView.xmlData = res.result;
      } else {
        createMessage.error("获取流程图失败!")
      }
    })
    processView.open = true;
  }

预览表单

// 打开业务表单
  const handleForm = (formId: string) => {
    getForm(formId).then(res => {
      formTitle.value = "表单详情";
      console.log("handleForm res",res);
      formConfOpen.value = true;
      nextTick(async () => {
        vfRenderRef.value.setFormJson(res.result.formContent || {formConfig: {}, widgetList: []});
      });
    })
  }

7、效果图

  • 7
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

宁波阿成

你的支持,是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值