@lambo-design-mobile/workflow-approve 1.0.0-beta.14 → 1.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/ApprovalNodeCell.vue +0 -1
- package/src/FlowNodeCell.vue +116 -0
- package/src/WorkflowDiagram.vue +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## [1.0.0-beta.15](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design-mobile/workflow-approve@1.0.0-beta.14...@lambo-design-mobile/workflow-approve@1.0.0-beta.15) (2025-03-19)
|
|
3
|
+
|
|
2
4
|
## [1.0.0-beta.14](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design-mobile/workflow-approve@1.0.0-beta.13...@lambo-design-mobile/workflow-approve@1.0.0-beta.14) (2025-03-18)
|
|
3
5
|
|
|
4
6
|
|
package/package.json
CHANGED
package/src/ApprovalNodeCell.vue
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
style="font-size: 16px;font-weight: bold;padding:5px 0;">
|
|
18
18
|
{{ Array.isArray(item.auditName) ? item.auditName[0] : item.auditName }}
|
|
19
19
|
</div>
|
|
20
|
-
<div>{{ item.taskName }}</div>
|
|
21
20
|
<div>
|
|
22
21
|
<div v-if="foldingApprovalComments">
|
|
23
22
|
<span v-if="item.auditComment" @click="showAuditDetail(item.auditComment)">
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<van-cell center>
|
|
3
|
+
<template v-slot:icon>
|
|
4
|
+
<div
|
|
5
|
+
v-if="['通过','流程发起','跳转指定节点'].includes(getAuditStatus(item.auditResult).text)"
|
|
6
|
+
class="completed-icon">
|
|
7
|
+
<van-icon class="iconfont" class-prefix='icon' :name=getAuditStatus(item.auditResult).icon
|
|
8
|
+
size="28px" color="#fff"/>
|
|
9
|
+
</div>
|
|
10
|
+
<div v-else class="pending-icon">
|
|
11
|
+
<van-icon class="iconfont" class-prefix='icon' :name=getAuditStatus(item.auditResult).icon
|
|
12
|
+
size="28px" color="#fff"/>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<template v-slot:title>
|
|
16
|
+
<div :style="{ color: getAuditStatus(item.auditResult).color }"
|
|
17
|
+
style="font-size: 16px;font-weight: bold;padding:5px 0;">
|
|
18
|
+
{{ Array.isArray(item.auditName) ? item.auditName[0] : item.auditName }}
|
|
19
|
+
</div>
|
|
20
|
+
<div>{{ item.taskName }}</div>
|
|
21
|
+
<div>
|
|
22
|
+
<div v-if="foldingApprovalComments">
|
|
23
|
+
<span v-if="item.auditComment" @click="showAuditDetail(item.auditComment)">
|
|
24
|
+
审批意见 <van-icon name="comment-circle-o"/>
|
|
25
|
+
</span>
|
|
26
|
+
</div>
|
|
27
|
+
<div v-else >
|
|
28
|
+
<div v-if="item.auditComment">
|
|
29
|
+
意见: {{ item.auditComment }}
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
<template v-slot:label>
|
|
35
|
+
<div>{{ item.auditDate || item.createTime }}</div>
|
|
36
|
+
</template>
|
|
37
|
+
<template v-slot:default>
|
|
38
|
+
<span :style="{ color: getAuditStatus(item.auditResult).color }">{{
|
|
39
|
+
getAuditStatus(item.auditResult).text
|
|
40
|
+
}}</span>
|
|
41
|
+
</template>
|
|
42
|
+
</van-cell>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
import {Dialog} from "vant";
|
|
47
|
+
import {getAuditStatus} from "./js/global";
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
name: "FlowNodeCell",
|
|
51
|
+
props: {
|
|
52
|
+
nodeDetail: {
|
|
53
|
+
type: Object,
|
|
54
|
+
required: true
|
|
55
|
+
},
|
|
56
|
+
foldingApprovalComments: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
data() {
|
|
62
|
+
return {
|
|
63
|
+
item: this.nodeDetail
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
getAuditStatus,
|
|
68
|
+
showAuditDetail(auditComment) {
|
|
69
|
+
Dialog.alert({
|
|
70
|
+
title: '审批意见',
|
|
71
|
+
message: auditComment,
|
|
72
|
+
}).then(() => {
|
|
73
|
+
// on close
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<style scoped>
|
|
81
|
+
.completed-icon {
|
|
82
|
+
width: 50px;
|
|
83
|
+
height: 50px;
|
|
84
|
+
background-clip: padding-box; /* 使背景不填充边框 */
|
|
85
|
+
|
|
86
|
+
border-radius: 50%;
|
|
87
|
+
margin-right: 1rem;
|
|
88
|
+
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
|
|
93
|
+
background: linear-gradient(90deg, #0096FF, #1677FF);
|
|
94
|
+
border: 0.3rem solid rgb(229, 244, 255); /* 半透明边框,颜色和背景色相同 */
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.pending-icon {
|
|
98
|
+
width: 50px;
|
|
99
|
+
height: 50px;
|
|
100
|
+
background-clip: padding-box; /* 使背景不填充边框 */
|
|
101
|
+
|
|
102
|
+
border-radius: 50%;
|
|
103
|
+
margin-right: 1rem;
|
|
104
|
+
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
|
|
109
|
+
background: linear-gradient(90deg, #FF7E00, #FFA200);
|
|
110
|
+
border: 0.4rem solid rgb(255, 245, 229); /* 半透明边框,颜色和背景色相同 */
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
::v-deep .van-cell__value {
|
|
114
|
+
flex: 0 auto;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
package/src/WorkflowDiagram.vue
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
<div v-if="auditData.length > 0">
|
|
20
20
|
<div v-for="(item,index) in auditData" :key="index" class="record-item">
|
|
21
|
-
<
|
|
21
|
+
<flow-node-cell :node-detail="item"/>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
<div v-else>
|
|
@@ -51,10 +51,11 @@
|
|
|
51
51
|
import Viewer from "bpmn-js/lib/Viewer";
|
|
52
52
|
import {getHisAudit, getPrintData, printData} from "../api";
|
|
53
53
|
import ApprovalNodeCell from "./ApprovalNodeCell.vue";
|
|
54
|
-
import { getAuditStatus } from './js/global';
|
|
54
|
+
import { getAuditStatus } from './js/global';
|
|
55
|
+
import FlowNodeCell from "./FlowNodeCell.vue"; // 根据路径修改
|
|
55
56
|
|
|
56
57
|
export default {
|
|
57
|
-
components: {ApprovalNodeCell},
|
|
58
|
+
components: {FlowNodeCell, ApprovalNodeCell},
|
|
58
59
|
props: {
|
|
59
60
|
procId: {
|
|
60
61
|
type: String,
|
|
@@ -319,4 +320,4 @@ export default {
|
|
|
319
320
|
flex: 0 auto;
|
|
320
321
|
}
|
|
321
322
|
|
|
322
|
-
</style>
|
|
323
|
+
</style>
|