Commit e12c17360a8a49f39ca0ff9c35a95b6d683ef403
1 parent
cc9a2199
bpm 的实例详情界面,接入 businessKey
Showing
3 changed files
with
27 additions
and
15 deletions
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/oa/BpmOALeaveController.http
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/task/vo/instance/BpmProcessInstanceRespVO.java
| ... | ... | @@ -36,6 +36,9 @@ public class BpmProcessInstanceRespVO { |
| 36 | 36 | @ApiModelProperty(value = "提交的表单值", required = true) |
| 37 | 37 | private Map<String, Object> formVariables; |
| 38 | 38 | |
| 39 | + @ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号") | |
| 40 | + private String businessKey; | |
| 41 | + | |
| 39 | 42 | /** |
| 40 | 43 | * 发起流程的用户 |
| 41 | 44 | */ | ... | ... |
yudao-admin-ui/src/views/bpm/processInstance/detail.vue
| ... | ... | @@ -32,11 +32,18 @@ |
| 32 | 32 | <div slot="header" class="clearfix"> |
| 33 | 33 | <span class="el-icon-document">申请信息【{{ processInstance.name }}】</span> |
| 34 | 34 | </div> |
| 35 | - <el-col :span="16" :offset="6"> | |
| 36 | - <div> | |
| 35 | + <el-col v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 10" | |
| 36 | + :span="16" :offset="6"> | |
| 37 | + <div > | |
| 37 | 38 | <parser :key="new Date().getTime()" :form-conf="detailForm" @submit="submitForm" /> |
| 38 | 39 | </div> |
| 39 | 40 | </el-col> |
| 41 | + <div v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 20"> | |
| 42 | + <router-link :to="this.processInstance.processDefinition.formCustomViewPath + '?id=' | |
| 43 | + + this.processInstance.businessKey"> | |
| 44 | + <el-button type="primary">点击查看</el-button> | |
| 45 | + </router-link> | |
| 46 | + </div> | |
| 40 | 47 | </el-card> |
| 41 | 48 | <el-card class="box-card" v-loading="tasksLoad"> |
| 42 | 49 | <div slot="header" class="clearfix"> |
| ... | ... | @@ -188,19 +195,21 @@ export default { |
| 188 | 195 | this.processInstance = response.data; |
| 189 | 196 | |
| 190 | 197 | // 设置表单信息 |
| 191 | - this.detailForm = { | |
| 192 | - ...JSON.parse(this.processInstance.processDefinition.formConf), | |
| 193 | - disabled: true, // 表单禁用 | |
| 194 | - formBtns: false, // 按钮隐藏 | |
| 195 | - fields: decodeFields(this.processInstance.processDefinition.formFields) | |
| 196 | - } | |
| 197 | - // 设置表单的值 | |
| 198 | - this.detailForm.fields.forEach(item => { | |
| 199 | - const val = this.processInstance.formVariables[item.__vModel__] | |
| 200 | - if (val) { | |
| 201 | - item.__config__.defaultValue = val | |
| 198 | + if (this.processInstance.processDefinition.formType === 10) { | |
| 199 | + this.detailForm = { | |
| 200 | + ...JSON.parse(this.processInstance.processDefinition.formConf), | |
| 201 | + disabled: true, // 表单禁用 | |
| 202 | + formBtns: false, // 按钮隐藏 | |
| 203 | + fields: decodeFields(this.processInstance.processDefinition.formFields) | |
| 202 | 204 | } |
| 203 | - }); | |
| 205 | + // 设置表单的值 | |
| 206 | + this.detailForm.fields.forEach(item => { | |
| 207 | + const val = this.processInstance.formVariables[item.__vModel__] | |
| 208 | + if (val) { | |
| 209 | + item.__config__.defaultValue = val | |
| 210 | + } | |
| 211 | + }); | |
| 212 | + } | |
| 204 | 213 | |
| 205 | 214 | // 加载流程图 |
| 206 | 215 | getProcessDefinitionBpmnXML(this.processInstance.processDefinition.id).then(response => { | ... | ... |