mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 12:18:42 +08:00 
			
		
		
		
	bpm 的实例详情界面,接入 businessKey
This commit is contained in:
		@@ -6,7 +6,7 @@ Authorization: Bearer {{token}}
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  "startTime": "2022-03-01",
 | 
			
		||||
  "endTime": "2022-03-03",
 | 
			
		||||
  "endTime": "2022-03-05",
 | 
			
		||||
  "type": 1,
 | 
			
		||||
  "reason": "我要请假啦啦啦!"
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -36,6 +36,9 @@ public class BpmProcessInstanceRespVO {
 | 
			
		||||
    @ApiModelProperty(value = "提交的表单值", required = true)
 | 
			
		||||
    private Map<String, Object> formVariables;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号")
 | 
			
		||||
    private String businessKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 发起流程的用户
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -32,11 +32,18 @@
 | 
			
		||||
      <div slot="header" class="clearfix">
 | 
			
		||||
        <span class="el-icon-document">申请信息【{{ processInstance.name }}】</span>
 | 
			
		||||
      </div>
 | 
			
		||||
      <el-col :span="16" :offset="6">
 | 
			
		||||
        <div>
 | 
			
		||||
      <el-col v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 10"
 | 
			
		||||
              :span="16" :offset="6">
 | 
			
		||||
        <div >
 | 
			
		||||
          <parser :key="new Date().getTime()" :form-conf="detailForm" @submit="submitForm" />
 | 
			
		||||
        </div>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <div v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 20">
 | 
			
		||||
        <router-link :to="this.processInstance.processDefinition.formCustomViewPath + '?id='
 | 
			
		||||
                          + this.processInstance.businessKey">
 | 
			
		||||
          <el-button type="primary">点击查看</el-button>
 | 
			
		||||
        </router-link>
 | 
			
		||||
      </div>
 | 
			
		||||
    </el-card>
 | 
			
		||||
    <el-card class="box-card" v-loading="tasksLoad">
 | 
			
		||||
      <div slot="header" class="clearfix">
 | 
			
		||||
@@ -188,19 +195,21 @@ export default {
 | 
			
		||||
        this.processInstance = response.data;
 | 
			
		||||
 | 
			
		||||
        // 设置表单信息
 | 
			
		||||
        this.detailForm = {
 | 
			
		||||
          ...JSON.parse(this.processInstance.processDefinition.formConf),
 | 
			
		||||
          disabled: true, // 表单禁用
 | 
			
		||||
          formBtns: false, // 按钮隐藏
 | 
			
		||||
          fields: decodeFields(this.processInstance.processDefinition.formFields)
 | 
			
		||||
        }
 | 
			
		||||
        // 设置表单的值
 | 
			
		||||
        this.detailForm.fields.forEach(item => {
 | 
			
		||||
          const val = this.processInstance.formVariables[item.__vModel__]
 | 
			
		||||
          if (val) {
 | 
			
		||||
            item.__config__.defaultValue = val
 | 
			
		||||
        if (this.processInstance.processDefinition.formType === 10) {
 | 
			
		||||
          this.detailForm = {
 | 
			
		||||
            ...JSON.parse(this.processInstance.processDefinition.formConf),
 | 
			
		||||
            disabled: true, // 表单禁用
 | 
			
		||||
            formBtns: false, // 按钮隐藏
 | 
			
		||||
            fields: decodeFields(this.processInstance.processDefinition.formFields)
 | 
			
		||||
          }
 | 
			
		||||
        });
 | 
			
		||||
          // 设置表单的值
 | 
			
		||||
          this.detailForm.fields.forEach(item => {
 | 
			
		||||
            const val = this.processInstance.formVariables[item.__vModel__]
 | 
			
		||||
            if (val) {
 | 
			
		||||
              item.__config__.defaultValue = val
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 加载流程图
 | 
			
		||||
        getProcessDefinitionBpmnXML(this.processInstance.processDefinition.id).then(response => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user