|
|
@@ -12,7 +12,6 @@
|
|
|
:maxable="true"
|
|
|
:resizable="true"
|
|
|
>
|
|
|
-
|
|
|
<div class="app-container" style="padding: 15px">
|
|
|
<!-- 审批记录 -->
|
|
|
<el-card class="box-card" v-loading="tasksLoad">
|
|
|
@@ -32,32 +31,41 @@
|
|
|
<el-card :body-style="{ padding: '10px' }">
|
|
|
<label
|
|
|
v-if="item.assigneeUser"
|
|
|
- style="font-weight: normal; margin-right: 30px">
|
|
|
- {{index==0?' 审批人':'发起人' }}:{{ item.assigneeUser.nickname }}
|
|
|
+ style="font-weight: normal; margin-right: 30px"
|
|
|
+ >
|
|
|
+ {{ index == 0 ? ' 审批人' : '发起人' }}:{{
|
|
|
+ item.assigneeUser.nickname
|
|
|
+ }}
|
|
|
<el-tag type="info" size="mini">{{
|
|
|
item.assigneeUser.deptName
|
|
|
}}</el-tag>
|
|
|
</label>
|
|
|
<label style="font-weight: normal" v-if="item.createTime"
|
|
|
- >创建时间:</label>
|
|
|
+ >创建时间:</label
|
|
|
+ >
|
|
|
<label style="color: #8a909c; font-weight: normal">{{
|
|
|
item.createTime
|
|
|
}}</label>
|
|
|
<label
|
|
|
v-if="item.endTime"
|
|
|
style="margin-left: 30px; font-weight: normal"
|
|
|
- >审批时间:</label>
|
|
|
+ >审批时间:</label
|
|
|
+ >
|
|
|
<label
|
|
|
v-if="item.endTime"
|
|
|
- style="color: #8a909c; font-weight: normal">
|
|
|
- {{ item.endTime }}</label>
|
|
|
+ style="color: #8a909c; font-weight: normal"
|
|
|
+ >
|
|
|
+ {{ item.endTime }}</label
|
|
|
+ >
|
|
|
<label
|
|
|
v-if="item.durationInMillis"
|
|
|
style="margin-left: 30px; font-weight: normal"
|
|
|
- >耗时:</label>
|
|
|
+ >耗时:</label
|
|
|
+ >
|
|
|
<label
|
|
|
v-if="item.durationInMillis"
|
|
|
- style="color: #8a909c; font-weight: normal">
|
|
|
+ style="color: #8a909c; font-weight: normal"
|
|
|
+ >
|
|
|
{{ getDateStar(item.durationInMillis) }}
|
|
|
</label>
|
|
|
<p v-if="item.reason">
|
|
|
@@ -78,7 +86,6 @@
|
|
|
</div>
|
|
|
|
|
|
<my-process-viewer
|
|
|
-
|
|
|
key="designer"
|
|
|
v-model="bpmnXML"
|
|
|
v-bind="bpmnControlForm"
|
|
|
@@ -143,6 +150,15 @@
|
|
|
this.dialogVisible = true;
|
|
|
this.getDetail();
|
|
|
},
|
|
|
+ getChildren(data) {
|
|
|
+ let arr = [];
|
|
|
+ console.log(data, 'data');
|
|
|
+ arr.push(...data);
|
|
|
+ if (data.children) {
|
|
|
+ this.getChildren(data.children);
|
|
|
+ }
|
|
|
+ return arr;
|
|
|
+ },
|
|
|
/** 获得流程实例 */
|
|
|
getDetail() {
|
|
|
// 获得流程实例相关
|
|
|
@@ -185,8 +201,10 @@
|
|
|
this.tasks = [];
|
|
|
// 移除已取消的审批
|
|
|
response.forEach((task) => {
|
|
|
- // if (task.result !== 4) {
|
|
|
- this.tasks.push(task);
|
|
|
+ if (task.children.length > 0) {
|
|
|
+ this.tasks.push(...this.getChildren(task.children));
|
|
|
+ }
|
|
|
+ this.tasks.push(task);
|
|
|
// }
|
|
|
});
|
|
|
// 排序,将未完成的排在前面,已完成的排在后面;
|