bpm 的实例详情界面,接入 businessKey

This commit is contained in:
YunaiV 2022-01-22 20:54:23 +08:00
parent cc9a2199b1
commit e12c17360a
3 changed files with 27 additions and 15 deletions

View File

@ -6,7 +6,7 @@ Authorization: Bearer {{token}}
{
"startTime": "2022-03-01",
"endTime": "2022-03-03",
"endTime": "2022-03-05",
"type": 1,
"reason": "我要请假啦啦啦!"
}

View File

@ -36,6 +36,9 @@ public class BpmProcessInstanceRespVO {
@ApiModelProperty(value = "提交的表单值", required = true)
private Map<String, Object> formVariables;
@ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号")
private String businessKey;
/**
* 发起流程的用户
*/

View File

@ -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 => {