mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
bpm 的实例详情界面,接入 businessKey
This commit is contained in:
parent
cc9a2199b1
commit
e12c17360a
@ -6,7 +6,7 @@ Authorization: Bearer {{token}}
|
|||||||
|
|
||||||
{
|
{
|
||||||
"startTime": "2022-03-01",
|
"startTime": "2022-03-01",
|
||||||
"endTime": "2022-03-03",
|
"endTime": "2022-03-05",
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"reason": "我要请假啦啦啦!"
|
"reason": "我要请假啦啦啦!"
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ public class BpmProcessInstanceRespVO {
|
|||||||
@ApiModelProperty(value = "提交的表单值", required = true)
|
@ApiModelProperty(value = "提交的表单值", required = true)
|
||||||
private Map<String, Object> formVariables;
|
private Map<String, Object> formVariables;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号")
|
||||||
|
private String businessKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起流程的用户
|
* 发起流程的用户
|
||||||
*/
|
*/
|
||||||
|
@ -32,11 +32,18 @@
|
|||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span class="el-icon-document">申请信息【{{ processInstance.name }}】</span>
|
<span class="el-icon-document">申请信息【{{ processInstance.name }}】</span>
|
||||||
</div>
|
</div>
|
||||||
<el-col :span="16" :offset="6">
|
<el-col v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 10"
|
||||||
<div>
|
:span="16" :offset="6">
|
||||||
|
<div >
|
||||||
<parser :key="new Date().getTime()" :form-conf="detailForm" @submit="submitForm" />
|
<parser :key="new Date().getTime()" :form-conf="detailForm" @submit="submitForm" />
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</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>
|
||||||
<el-card class="box-card" v-loading="tasksLoad">
|
<el-card class="box-card" v-loading="tasksLoad">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
@ -188,19 +195,21 @@ export default {
|
|||||||
this.processInstance = response.data;
|
this.processInstance = response.data;
|
||||||
|
|
||||||
// 设置表单信息
|
// 设置表单信息
|
||||||
this.detailForm = {
|
if (this.processInstance.processDefinition.formType === 10) {
|
||||||
...JSON.parse(this.processInstance.processDefinition.formConf),
|
this.detailForm = {
|
||||||
disabled: true, // 表单禁用
|
...JSON.parse(this.processInstance.processDefinition.formConf),
|
||||||
formBtns: false, // 按钮隐藏
|
disabled: true, // 表单禁用
|
||||||
fields: decodeFields(this.processInstance.processDefinition.formFields)
|
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
|
|
||||||
}
|
}
|
||||||
});
|
// 设置表单的值
|
||||||
|
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 => {
|
getProcessDefinitionBpmnXML(this.processInstance.processDefinition.id).then(response => {
|
||||||
|
Loading…
Reference in New Issue
Block a user