自学内容网 自学内容网

基于jeecgboot-vue3的Flowable流程-自定义业务表单流程历史信息显示

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

1、对于自定义业务表单的流程历史记录信息做了调整,增加显示自定义业务表单

<el-tab-pane label="表单信息" name="form">
        <div v-if="customForm.visible"> <!-- 自定义表单 -->
            <component ref="refCustomForm" :formDisabled="customForm.disabled" :is="customForm.formComponent" :model="customForm.model"
                        :formData="customForm.customFormData" :isNew = "customForm.isNew"></component>
        </div>
        <div style="margin-left:10%;margin-bottom: 30px">
           <!--对上传文件进行显示处理,临时方案 add by nbacheng 2022-07-27 -->
           <el-upload action="#" :on-preview="handleFilePreview" :file-list="fileList" v-if="fileDisplay" />
        </div>
      </el-tab-pane >

2、流程显示也做了调整

<el-tab-pane label="流程跟踪" name="track">
        <el-card class="box-card" shadow="never">
          <process-viewer ref="processViewerRef" :key="`designer-${loadIndex}`" :style="'height:' + height" :xml="xmlData"
                          :finishedInfo="finishedInfo" :allCommentList="historyProcNodeList"
          />
        </el-card>
      </el-tab-pane>

3、流程获取信息如下

const getFlowRecordList = (dataId) => {
    const params = {dataId: props.dataId}
    flowRecordBydataid(params).then(res => {
      console.log("flowRecordList res",res)
      flowRecordList.value = res.result.flowList;
      console.log("flowRecordList", flowRecordList.value);
      // 流程过程中不存在初始化表单 直接读取的流程变量中存储的表单值
      if (res.result.formData) {
        customForm.disabled = true;
        customForm.visible = true;
        customForm.formComponent = getFormComponent(res.result.routeName).component;
        customForm.model = res.result.formData;
        customForm.customFormData = res.result.formData;
        console.log("detailProcess customForm",customForm);
        getModelDetail();
      }
    }).catch(res => {
      console.log(res)
    })
  }

4、后端也要做调整,满足上面要求flowRecordBydataid这个做一下调整

// 获取初始化表单
        String serviceImplName = business.getServiceImplName();
        FlowCallBackServiceI flowCallBackService = (FlowCallBackServiceI) SpringContextUtils.getBean(serviceImplName);
        // 流程处理完后,进行回调业务层
        if (flowCallBackService!=null){
            Object businessDataById = flowCallBackService.getBusinessDataById(dataId);
            map.put("formData",businessDataById);
            map.put("routeName", business.getRouteName());
        }

5、效果图


原文地址:https://blog.csdn.net/qq_40032778/article/details/140674059

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!