@lambo-design/workflow-approve 1.0.0-beta.32 → 1.0.0-beta.35
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/package.json +2 -2
- package/src/components/candidate-groups-box.vue +24 -26
- package/src/portrait.vue +40 -10
- package/src/workflow-diagram.vue +377 -371
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/workflow-approve",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.35",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"axios": "^0.24.0",
|
|
14
14
|
"axios-cache-plugin": "^0.1.0",
|
|
15
15
|
"@lambo-design/core": "^4.7.1-beta.147",
|
|
16
|
-
"@lambo-design/shared": "^1.0.0-beta.
|
|
16
|
+
"@lambo-design/shared": "^1.0.0-beta.233"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"bpmn-js": "^7.3.1",
|
|
@@ -1367,33 +1367,31 @@ export default {
|
|
|
1367
1367
|
if (self.permScope == "all" || self.permScope == "undefined") {
|
|
1368
1368
|
let userIdSet = new Set()
|
|
1369
1369
|
data.forEach(itemCom => {
|
|
1370
|
-
if ((jsonArray.orgCode || jsonArray.organCode) != itemCom.code) {
|
|
1371
|
-
|
|
1372
|
-
ajax.get(self.upmsServerContext + "/manage/user/getList", {
|
|
1373
|
-
params: {
|
|
1374
|
-
organId: itemCom.id,
|
|
1375
|
-
orgTreeType: self.organTreeType,
|
|
1376
|
-
limit: "1000",
|
|
1377
|
-
directChild: true,
|
|
1378
|
-
}
|
|
1379
|
-
}).then(function (resp) {
|
|
1380
|
-
if (resp.data.message == "成功") {
|
|
1381
|
-
let nodeUser = resp.data.data
|
|
1382
|
-
nodeUser.forEach(item => {
|
|
1383
|
-
if (!userIdSet.has(item.userId)) {
|
|
1384
|
-
userIdSet.add(item.userId)
|
|
1385
|
-
treeUserCenters.push({
|
|
1386
|
-
userId: item.userId,
|
|
1387
|
-
userName: item.userName,
|
|
1388
|
-
nameItem: item.superiorOrgName,
|
|
1389
|
-
organName: item.organName
|
|
1390
|
-
})
|
|
1391
|
-
}
|
|
1392
|
-
})
|
|
1393
|
-
}
|
|
1394
1370
|
|
|
1395
|
-
|
|
1396
|
-
|
|
1371
|
+
ajax.get(self.upmsServerContext + "/manage/user/getList", {
|
|
1372
|
+
params: {
|
|
1373
|
+
organId: itemCom.id,
|
|
1374
|
+
orgTreeType: self.organTreeType,
|
|
1375
|
+
limit: "1000",
|
|
1376
|
+
directChild: true,
|
|
1377
|
+
}
|
|
1378
|
+
}).then(function (resp) {
|
|
1379
|
+
if (resp.data.message == "成功") {
|
|
1380
|
+
let nodeUser = resp.data.data
|
|
1381
|
+
nodeUser.forEach(item => {
|
|
1382
|
+
if (!userIdSet.has(item.userId)) {
|
|
1383
|
+
userIdSet.add(item.userId)
|
|
1384
|
+
treeUserCenters.push({
|
|
1385
|
+
userId: item.userId,
|
|
1386
|
+
userName: item.userName,
|
|
1387
|
+
nameItem: item.superiorOrgName,
|
|
1388
|
+
organName: item.organName
|
|
1389
|
+
})
|
|
1390
|
+
}
|
|
1391
|
+
})
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
})
|
|
1397
1395
|
})
|
|
1398
1396
|
} else {
|
|
1399
1397
|
let userIdSet = new Set()
|
package/src/portrait.vue
CHANGED
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
<Modal v-model="modalBoxShow" width="1000" title="流程跟踪图">
|
|
209
209
|
<Workflow_Diagram ref="processTrace" :instanceId="process.instanceId" :applyId="process.applyId"
|
|
210
210
|
:procId="process.procId" :table-columns="diagramTableColumns"
|
|
211
|
-
:tableData="process.tableData" :hisAudit="hisAudit"
|
|
211
|
+
:tableData="process.tableData" :hisAudit="hisAudit" :approve-detail-show-way="approveDetailShowWay"
|
|
212
212
|
:smart-flow-server-context="smartFlowServerContext">
|
|
213
213
|
</Workflow_Diagram>
|
|
214
214
|
</Modal>
|
|
@@ -383,6 +383,18 @@ export default {
|
|
|
383
383
|
required: false,
|
|
384
384
|
default: true,
|
|
385
385
|
},
|
|
386
|
+
//流程跟踪图附件列
|
|
387
|
+
showAttachmentFile: {
|
|
388
|
+
type: Boolean,
|
|
389
|
+
required: false,
|
|
390
|
+
default: true,
|
|
391
|
+
},
|
|
392
|
+
//流程跟踪图审批详情触发方式
|
|
393
|
+
approveDetailShowWay: {
|
|
394
|
+
type: String,
|
|
395
|
+
required: false,
|
|
396
|
+
default: 'click',
|
|
397
|
+
},
|
|
386
398
|
//业务表单保存方法
|
|
387
399
|
businessFormSave: {
|
|
388
400
|
type: Function,
|
|
@@ -706,7 +718,7 @@ export default {
|
|
|
706
718
|
}, label)
|
|
707
719
|
}
|
|
708
720
|
})
|
|
709
|
-
if (this.
|
|
721
|
+
if (this.showAttachmentFile){
|
|
710
722
|
column.push({
|
|
711
723
|
title: `附件`, key: 'fileList', minWidth: 200,
|
|
712
724
|
render: (h, { row }) => {
|
|
@@ -1121,6 +1133,14 @@ export default {
|
|
|
1121
1133
|
self.disable = false
|
|
1122
1134
|
}
|
|
1123
1135
|
})
|
|
1136
|
+
} else if (result.code == '10012') {
|
|
1137
|
+
// 数据同步
|
|
1138
|
+
self.loading = false
|
|
1139
|
+
self.disable = false
|
|
1140
|
+
self.$Message.warning(result.message)
|
|
1141
|
+
setTimeout(() => {
|
|
1142
|
+
self.executionCompleted(true, null, null, auditResult, self.curTaskId)
|
|
1143
|
+
}, 1000)
|
|
1124
1144
|
} else {
|
|
1125
1145
|
self.loading = true
|
|
1126
1146
|
self.disable = true
|
|
@@ -1131,12 +1151,14 @@ export default {
|
|
|
1131
1151
|
self.loading = false
|
|
1132
1152
|
self.disable = false
|
|
1133
1153
|
self.$Message.success(result.message);
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1154
|
+
setTimeout(() => {
|
|
1155
|
+
if (result.data) {
|
|
1156
|
+
let taskIds = result.data.map(item => item.id).join(',');
|
|
1157
|
+
self.executionCompleted(true, result.data[0].processInstanceId, taskIds, auditResult, self.curTaskId)
|
|
1158
|
+
} else {
|
|
1159
|
+
self.executionCompleted(true, null, null, auditResult, self.curTaskId)
|
|
1160
|
+
}
|
|
1161
|
+
}, 1000)
|
|
1140
1162
|
} else {
|
|
1141
1163
|
self.loading = false
|
|
1142
1164
|
self.disable = false
|
|
@@ -1189,6 +1211,14 @@ export default {
|
|
|
1189
1211
|
self.executionCompleted(true, null, null, auditResult, self.curTaskId)
|
|
1190
1212
|
}, 1000)
|
|
1191
1213
|
}
|
|
1214
|
+
} else if (result.code == '10012') {
|
|
1215
|
+
// 数据同步
|
|
1216
|
+
self.loading = false
|
|
1217
|
+
self.disable = false
|
|
1218
|
+
self.$Message.warning(result.message)
|
|
1219
|
+
setTimeout(() => {
|
|
1220
|
+
self.executionCompleted(true, null, null, auditResult, self.curTaskId)
|
|
1221
|
+
}, 1000)
|
|
1192
1222
|
} else if (result.code == '20002') {
|
|
1193
1223
|
// 流程结束
|
|
1194
1224
|
self.loading = false
|
|
@@ -1458,12 +1488,12 @@ export default {
|
|
|
1458
1488
|
return false
|
|
1459
1489
|
},
|
|
1460
1490
|
readingRangeClick(item) {
|
|
1461
|
-
let permScope = item.
|
|
1491
|
+
let permScope = item.orgTreeType === this.defaultOrganTreeType ? this.permScope : 'all'
|
|
1462
1492
|
let orgTreeType = item.orgTreeType ? item.orgTreeType : this.defaultOrganTreeType
|
|
1463
1493
|
this.$refs.assigneeHelpBox.toggleShowHelpBox(orgTreeType, permScope, 'transferNextTask', item.id)
|
|
1464
1494
|
},
|
|
1465
1495
|
candidateGroupsReadingRangeClick(item) {
|
|
1466
|
-
let permScope = item.
|
|
1496
|
+
let permScope = item.orgTreeType === this.defaultOrganTreeType ? this.permScope : 'all'
|
|
1467
1497
|
let orgTreeType = item.orgTreeType ? item.orgTreeType : this.defaultOrganTreeType
|
|
1468
1498
|
this.$refs.candidateGroupsHelpBox.toggleShowHelpBox(permScope, item.candidates, orgTreeType, item.id);
|
|
1469
1499
|
},
|
package/src/workflow-diagram.vue
CHANGED
|
@@ -1,371 +1,377 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
|
|
4
|
-
<Collapse v-show="showChart" v-model="showDefaultExpand">
|
|
5
|
-
<Panel name="0">
|
|
6
|
-
流程跟踪图
|
|
7
|
-
<div slot="content">
|
|
8
|
-
<div class="notes-div">
|
|
9
|
-
<span class="notes-done-task">已办结点</span>
|
|
10
|
-
<span class="notes-todo-task">在办结点</span>
|
|
11
|
-
<span class="notes-none-task">未办结点</span>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="containers" :style="'height: '+canvasHeight+ 'px'">
|
|
14
|
-
<div class="canvas" ref="canvas"></div>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</Panel>
|
|
18
|
-
</Collapse>
|
|
19
|
-
|
|
20
|
-
<Collapse v-show="showTable" v-model="showDefaultExpand">
|
|
21
|
-
<Panel name="1">
|
|
22
|
-
{{ tableName }}
|
|
23
|
-
<div slot="content">
|
|
24
|
-
<EditTable :columns="tableColumns" v-model="hisAudit" :show-table-option="false">
|
|
25
|
-
</EditTable>
|
|
26
|
-
</div>
|
|
27
|
-
</Panel>
|
|
28
|
-
</Collapse>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<Modal v-model="showDetail" :width="modelWidth" :footer-hide='true' :title="detailDones[0] && detailDones[0].handleName ? detailDones[0].handleName + '详情' : '审批详情'">
|
|
32
|
-
<Card v-for="(item,index) in detailDones" :key="index" style="margin-bottom: 10px">
|
|
33
|
-
<Form :model="item" :label-width="140">
|
|
34
|
-
<Row>
|
|
35
|
-
<i-col span="12" offset="0">
|
|
36
|
-
<FormItem :label="item.handleName ? item.handleName + '节点:' : '审批节点:'">
|
|
37
|
-
{{ item.taskName }}
|
|
38
|
-
</FormItem>
|
|
39
|
-
</i-col>
|
|
40
|
-
<i-col span="12" offset="0">
|
|
41
|
-
<FormItem :label="item.handleName ? item.handleName + '人:' : '审批人:'">
|
|
42
|
-
<Tooltip placement="bottom-end">
|
|
43
|
-
<span class="tooltip-text">{{ item.auditName }}</span>
|
|
44
|
-
<div slot="content" style="white-space: normal;">
|
|
45
|
-
{{ item.auditName }}
|
|
46
|
-
</div>
|
|
47
|
-
</Tooltip>
|
|
48
|
-
|
|
49
|
-
</FormItem>
|
|
50
|
-
</i-col>
|
|
51
|
-
|
|
52
|
-
</Row>
|
|
53
|
-
<Row>
|
|
54
|
-
<i-col span="12" offset="0">
|
|
55
|
-
<FormItem :label="item.handleName ? item.handleName + '结果:' : '审批结果:'">
|
|
56
|
-
<Tag color="green" v-if="item.auditResult == '30'">通过</Tag>
|
|
57
|
-
<Tag color="volcano" v-else-if="item.auditResult == '40'">驳回上一节点</Tag>
|
|
58
|
-
<Tag color="red" v-else-if="item.auditResult=='50'">驳回到原点</Tag>
|
|
59
|
-
<Tag color="purple" v-else-if="item.auditResult=='51'">流程终止</Tag>
|
|
60
|
-
<Tag color="blue" v-else-if="item.auditResult == '60'">撤回</Tag>
|
|
61
|
-
<Tag color="cyan" v-else-if="item.auditResult == '80'">跳转指定节点</Tag>
|
|
62
|
-
<Tag color="magenta" v-else-if="item.auditResult == '90'">驳回指定节点</Tag>
|
|
63
|
-
<Tag color="orange" v-else>待审核</Tag>
|
|
64
|
-
</FormItem>
|
|
65
|
-
</i-col>
|
|
66
|
-
<i-col span="12" offset="0">
|
|
67
|
-
<FormItem v-if="item.startDate" label="发起时间:">
|
|
68
|
-
{{ item.startDate }}
|
|
69
|
-
</FormItem>
|
|
70
|
-
<FormItem v-else :label="item.handleName ? item.handleName + '时间:' : '审批时间:'">
|
|
71
|
-
{{ item.auditDate }}
|
|
72
|
-
</FormItem>
|
|
73
|
-
</i-col>
|
|
74
|
-
</Row>
|
|
75
|
-
<Row>
|
|
76
|
-
<i-col span="24" offset="0">
|
|
77
|
-
<FormItem v-if="item.auditComment" :label="item.handleName ? item.handleName + '意见:' : '审批意见:'">
|
|
78
|
-
{{ item.auditComment }}
|
|
79
|
-
</FormItem>
|
|
80
|
-
</i-col>
|
|
81
|
-
</Row>
|
|
82
|
-
</Form>
|
|
83
|
-
</Card>
|
|
84
|
-
</Modal>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</div>
|
|
88
|
-
</template>
|
|
89
|
-
|
|
90
|
-
<script>
|
|
91
|
-
import ajax from "@lambo-design/shared/utils/ajax";
|
|
92
|
-
import zoomScroll from "@lambo-design/shared/utils/zoomScroll";
|
|
93
|
-
import BpmnViewer from "bpmn-js/lib/Viewer";
|
|
94
|
-
import ModelingModule from 'bpmn-js/lib/features/modeling';
|
|
95
|
-
import MoveCanvasModule from 'diagram-js/lib/navigation/movecanvas';
|
|
96
|
-
import EditTable from "@lambo-design/edit-table";
|
|
97
|
-
|
|
98
|
-
export default {
|
|
99
|
-
components: {
|
|
100
|
-
EditTable
|
|
101
|
-
},
|
|
102
|
-
props: {
|
|
103
|
-
canvasHeight: {
|
|
104
|
-
type: Number,
|
|
105
|
-
default: 350
|
|
106
|
-
},
|
|
107
|
-
modelWidth: {
|
|
108
|
-
type: Number,
|
|
109
|
-
default: 693
|
|
110
|
-
},
|
|
111
|
-
modelTitle: {
|
|
112
|
-
type: String,
|
|
113
|
-
default: "审批详情"
|
|
114
|
-
},
|
|
115
|
-
showChart: {
|
|
116
|
-
type: Boolean,
|
|
117
|
-
default: true
|
|
118
|
-
},
|
|
119
|
-
showTable: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
default: true
|
|
122
|
-
},
|
|
123
|
-
tableName: {
|
|
124
|
-
type: String,
|
|
125
|
-
default: "流程跟踪表"
|
|
126
|
-
},
|
|
127
|
-
handleName: {
|
|
128
|
-
type: String,
|
|
129
|
-
default: "审批"
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
type:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
this.bpmnViewer
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
this.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
if
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<Collapse v-show="showChart" v-model="showDefaultExpand">
|
|
5
|
+
<Panel name="0">
|
|
6
|
+
流程跟踪图
|
|
7
|
+
<div slot="content">
|
|
8
|
+
<div class="notes-div">
|
|
9
|
+
<span class="notes-done-task">已办结点</span>
|
|
10
|
+
<span class="notes-todo-task">在办结点</span>
|
|
11
|
+
<span class="notes-none-task">未办结点</span>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="containers" :style="'height: '+canvasHeight+ 'px'">
|
|
14
|
+
<div class="canvas" ref="canvas"></div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</Panel>
|
|
18
|
+
</Collapse>
|
|
19
|
+
|
|
20
|
+
<Collapse v-show="showTable" v-model="showDefaultExpand">
|
|
21
|
+
<Panel name="1">
|
|
22
|
+
{{ tableName }}
|
|
23
|
+
<div slot="content">
|
|
24
|
+
<EditTable :columns="tableColumns" v-model="hisAudit" :show-table-option="false">
|
|
25
|
+
</EditTable>
|
|
26
|
+
</div>
|
|
27
|
+
</Panel>
|
|
28
|
+
</Collapse>
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
<Modal v-model="showDetail" :width="modelWidth" :footer-hide='true' :title="detailDones[0] && detailDones[0].handleName ? detailDones[0].handleName + '详情' : '审批详情'">
|
|
32
|
+
<Card v-for="(item,index) in detailDones" :key="index" style="margin-bottom: 10px">
|
|
33
|
+
<Form :model="item" :label-width="140">
|
|
34
|
+
<Row>
|
|
35
|
+
<i-col span="12" offset="0">
|
|
36
|
+
<FormItem :label="item.handleName ? item.handleName + '节点:' : '审批节点:'">
|
|
37
|
+
{{ item.taskName }}
|
|
38
|
+
</FormItem>
|
|
39
|
+
</i-col>
|
|
40
|
+
<i-col span="12" offset="0">
|
|
41
|
+
<FormItem :label="item.handleName ? item.handleName + '人:' : '审批人:'">
|
|
42
|
+
<Tooltip placement="bottom-end">
|
|
43
|
+
<span class="tooltip-text">{{ item.auditName }}</span>
|
|
44
|
+
<div slot="content" style="white-space: normal;">
|
|
45
|
+
{{ item.auditName }}
|
|
46
|
+
</div>
|
|
47
|
+
</Tooltip>
|
|
48
|
+
|
|
49
|
+
</FormItem>
|
|
50
|
+
</i-col>
|
|
51
|
+
|
|
52
|
+
</Row>
|
|
53
|
+
<Row>
|
|
54
|
+
<i-col span="12" offset="0">
|
|
55
|
+
<FormItem :label="item.handleName ? item.handleName + '结果:' : '审批结果:'">
|
|
56
|
+
<Tag color="green" v-if="item.auditResult == '30'">通过</Tag>
|
|
57
|
+
<Tag color="volcano" v-else-if="item.auditResult == '40'">驳回上一节点</Tag>
|
|
58
|
+
<Tag color="red" v-else-if="item.auditResult=='50'">驳回到原点</Tag>
|
|
59
|
+
<Tag color="purple" v-else-if="item.auditResult=='51'">流程终止</Tag>
|
|
60
|
+
<Tag color="blue" v-else-if="item.auditResult == '60'">撤回</Tag>
|
|
61
|
+
<Tag color="cyan" v-else-if="item.auditResult == '80'">跳转指定节点</Tag>
|
|
62
|
+
<Tag color="magenta" v-else-if="item.auditResult == '90'">驳回指定节点</Tag>
|
|
63
|
+
<Tag color="orange" v-else>待审核</Tag>
|
|
64
|
+
</FormItem>
|
|
65
|
+
</i-col>
|
|
66
|
+
<i-col span="12" offset="0">
|
|
67
|
+
<FormItem v-if="item.startDate" label="发起时间:">
|
|
68
|
+
{{ item.startDate }}
|
|
69
|
+
</FormItem>
|
|
70
|
+
<FormItem v-else :label="item.handleName ? item.handleName + '时间:' : '审批时间:'">
|
|
71
|
+
{{ item.auditDate }}
|
|
72
|
+
</FormItem>
|
|
73
|
+
</i-col>
|
|
74
|
+
</Row>
|
|
75
|
+
<Row>
|
|
76
|
+
<i-col span="24" offset="0">
|
|
77
|
+
<FormItem v-if="item.auditComment" :label="item.handleName ? item.handleName + '意见:' : '审批意见:'">
|
|
78
|
+
{{ item.auditComment }}
|
|
79
|
+
</FormItem>
|
|
80
|
+
</i-col>
|
|
81
|
+
</Row>
|
|
82
|
+
</Form>
|
|
83
|
+
</Card>
|
|
84
|
+
</Modal>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<script>
|
|
91
|
+
import ajax from "@lambo-design/shared/utils/ajax";
|
|
92
|
+
import zoomScroll from "@lambo-design/shared/utils/zoomScroll";
|
|
93
|
+
import BpmnViewer from "bpmn-js/lib/Viewer";
|
|
94
|
+
import ModelingModule from 'bpmn-js/lib/features/modeling';
|
|
95
|
+
import MoveCanvasModule from 'diagram-js/lib/navigation/movecanvas';
|
|
96
|
+
import EditTable from "@lambo-design/edit-table";
|
|
97
|
+
|
|
98
|
+
export default {
|
|
99
|
+
components: {
|
|
100
|
+
EditTable
|
|
101
|
+
},
|
|
102
|
+
props: {
|
|
103
|
+
canvasHeight: {
|
|
104
|
+
type: Number,
|
|
105
|
+
default: 350
|
|
106
|
+
},
|
|
107
|
+
modelWidth: {
|
|
108
|
+
type: Number,
|
|
109
|
+
default: 693
|
|
110
|
+
},
|
|
111
|
+
modelTitle: {
|
|
112
|
+
type: String,
|
|
113
|
+
default: "审批详情"
|
|
114
|
+
},
|
|
115
|
+
showChart: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: true
|
|
118
|
+
},
|
|
119
|
+
showTable: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: true
|
|
122
|
+
},
|
|
123
|
+
tableName: {
|
|
124
|
+
type: String,
|
|
125
|
+
default: "流程跟踪表"
|
|
126
|
+
},
|
|
127
|
+
handleName: {
|
|
128
|
+
type: String,
|
|
129
|
+
default: "审批"
|
|
130
|
+
},
|
|
131
|
+
approveDetailShowWay: {
|
|
132
|
+
type: String,
|
|
133
|
+
required: false,
|
|
134
|
+
default: "click"
|
|
135
|
+
},
|
|
136
|
+
tableColumns: {
|
|
137
|
+
type: Array,
|
|
138
|
+
default: () => {
|
|
139
|
+
return [
|
|
140
|
+
{title: '序号', type: 'index', width: 80},
|
|
141
|
+
{title: '审批节点', key: 'taskName', minWidth: 130},
|
|
142
|
+
{title: '办理人', key: 'auditName', minWidth: 180, tooltip: true},
|
|
143
|
+
{
|
|
144
|
+
title: '审批结果', key: 'auditResult', minWidth: 100,
|
|
145
|
+
render: (h, {row, column, index}) => {
|
|
146
|
+
let label = "";
|
|
147
|
+
let tagColor = "";
|
|
148
|
+
if (row.auditResult == '30'){
|
|
149
|
+
label = '通过';
|
|
150
|
+
tagColor = 'green'; // 绿色
|
|
151
|
+
}
|
|
152
|
+
else if (row.auditResult == '40'){
|
|
153
|
+
label = '驳回到上一级';
|
|
154
|
+
tagColor = 'volcano'; // 火红色
|
|
155
|
+
}
|
|
156
|
+
else if (row.auditResult == '50'){
|
|
157
|
+
label = '驳回到原点';
|
|
158
|
+
tagColor = 'red'; // 红色
|
|
159
|
+
}
|
|
160
|
+
else if (row.auditResult == '51'){
|
|
161
|
+
label = '流程终止';
|
|
162
|
+
tagColor = 'purple'; // 紫色
|
|
163
|
+
}
|
|
164
|
+
else if (row.auditResult == '60'){
|
|
165
|
+
label = '撤回';
|
|
166
|
+
tagColor = 'blue'; // 蓝色
|
|
167
|
+
}
|
|
168
|
+
else if (row.auditResult == '80'){
|
|
169
|
+
label = '跳转到指定节点';
|
|
170
|
+
tagColor = 'cyan'; // 青色
|
|
171
|
+
}
|
|
172
|
+
else if (row.auditResult == '90'){
|
|
173
|
+
label = '驳回到指定节点';
|
|
174
|
+
tagColor = 'magenta'; // 品红色
|
|
175
|
+
}
|
|
176
|
+
else{
|
|
177
|
+
label = '待审核';
|
|
178
|
+
tagColor = 'orange'; // 默认橙色
|
|
179
|
+
}
|
|
180
|
+
return h('Tag', {
|
|
181
|
+
props: {
|
|
182
|
+
color: tagColor,
|
|
183
|
+
value: row.auditResult
|
|
184
|
+
}
|
|
185
|
+
}, label);
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
title: '审批时间', key: 'auditTime', minWidth: 150,
|
|
190
|
+
render: (h, {row}) => {
|
|
191
|
+
const displayDate = row.startDate || row.auditDate;
|
|
192
|
+
return h('span', displayDate);
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
title: '审批意见', key: 'auditComment', minWidth: 180, tooltip: true,
|
|
197
|
+
render: (h, {row, column, index}) => {
|
|
198
|
+
let label = "";
|
|
199
|
+
if (row.auditComment == '' || row.auditComment == null) label = '无';
|
|
200
|
+
else label = row.auditComment;
|
|
201
|
+
return h('Label', {
|
|
202
|
+
props: {
|
|
203
|
+
value: row.auditComment
|
|
204
|
+
}
|
|
205
|
+
}, label)
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
];
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
hisAudit: {
|
|
212
|
+
type: Array,
|
|
213
|
+
default: () => {
|
|
214
|
+
return []
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
tableData: {
|
|
218
|
+
type: Array,
|
|
219
|
+
default: () => {
|
|
220
|
+
return []
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
applyId: {
|
|
224
|
+
type: String,
|
|
225
|
+
default: ""
|
|
226
|
+
},
|
|
227
|
+
instanceId: {
|
|
228
|
+
type: String,
|
|
229
|
+
default: ""
|
|
230
|
+
},
|
|
231
|
+
procId: {
|
|
232
|
+
type: String,
|
|
233
|
+
default: ""
|
|
234
|
+
},
|
|
235
|
+
smartFlowServerContext: {
|
|
236
|
+
type: String,
|
|
237
|
+
default: '/api/smart-flow-server',
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
data() {
|
|
241
|
+
return {
|
|
242
|
+
detailDones: [],
|
|
243
|
+
showDetail: false,
|
|
244
|
+
showDefaultExpand: this.getShowDefaultExpand(),
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
computed: {},
|
|
248
|
+
methods: {
|
|
249
|
+
getShowDefaultExpand() {
|
|
250
|
+
let expand = [];
|
|
251
|
+
if (this.showChart) {
|
|
252
|
+
expand.push('0');
|
|
253
|
+
}
|
|
254
|
+
if (this.showTable) {
|
|
255
|
+
expand.push('1');
|
|
256
|
+
}
|
|
257
|
+
return expand;
|
|
258
|
+
},
|
|
259
|
+
|
|
260
|
+
//画流程图
|
|
261
|
+
workflowInit() {
|
|
262
|
+
const canvas = this.$refs.canvas;
|
|
263
|
+
// this.bpmnViewer.destroy();
|
|
264
|
+
// if (this.bpmnViewer) return
|
|
265
|
+
if (this.bpmnViewer){
|
|
266
|
+
this.bpmnViewer.destroy()
|
|
267
|
+
}
|
|
268
|
+
this.bpmnViewer = new BpmnViewer({
|
|
269
|
+
container: canvas,
|
|
270
|
+
additionalModules: [
|
|
271
|
+
// MoveModule, // 可以调整元素
|
|
272
|
+
ModelingModule, // 基础工具 MoveModule、SetColor 等依赖于此
|
|
273
|
+
MoveCanvasModule, // 移动整个画布
|
|
274
|
+
zoomScroll // 放大缩小
|
|
275
|
+
]
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
ajax.get(this.smartFlowServerContext + "/manage/processTodo/printData", {
|
|
279
|
+
params: {
|
|
280
|
+
applyId: this.applyId,
|
|
281
|
+
instanceId: this.instanceId,
|
|
282
|
+
procId: this.procId
|
|
283
|
+
}
|
|
284
|
+
}).then(resp => {
|
|
285
|
+
if (resp.data.code == '200') {
|
|
286
|
+
const bpmnXmlStr = resp.data.data.processXml;
|
|
287
|
+
this.bpmnViewer.importXML(bpmnXmlStr);
|
|
288
|
+
setTimeout(() => {
|
|
289
|
+
const printData = resp.data.data.historicData;
|
|
290
|
+
this.doPrint(printData);
|
|
291
|
+
}, 700);
|
|
292
|
+
} else {
|
|
293
|
+
this.$Message.error("加载流程xml失败," + resp.data.data);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
},
|
|
297
|
+
doPrint(printData) {
|
|
298
|
+
var self = this;
|
|
299
|
+
const {doneLightSet, donePointSet, doneTaskSet, todoPointSet} =
|
|
300
|
+
printData;
|
|
301
|
+
const canvas = this.bpmnViewer.get("canvas");
|
|
302
|
+
const elementRegistry = this.bpmnViewer.get('elementRegistry');
|
|
303
|
+
const userTaskList = elementRegistry.filter(
|
|
304
|
+
(item) => item.type === 'bpmn:UserTask'
|
|
305
|
+
);
|
|
306
|
+
//循环节点查找multiple
|
|
307
|
+
self.notMultiple = true;
|
|
308
|
+
canvas.zoom("fit-viewport", "auto");
|
|
309
|
+
var eventBus = this.bpmnViewer.get("eventBus");
|
|
310
|
+
var dones = this.tableData;
|
|
311
|
+
// eventBus.on('element.click', function (evt) {
|
|
312
|
+
// eventBus.on('element.hover', function (evt) {
|
|
313
|
+
eventBus.on(`element.${this.approveDetailShowWay}`, function (evt) {
|
|
314
|
+
self.detailDones = [];
|
|
315
|
+
for (var item of dones) {
|
|
316
|
+
if (item.taskNode == evt.element.id) {
|
|
317
|
+
self.detailDones.push(item);
|
|
318
|
+
// self.showDetail = true;
|
|
319
|
+
// self.$emit("showTaskNode", item);
|
|
320
|
+
// break;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
if(self.detailDones.length > 0) {
|
|
324
|
+
self.showDetail = true;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
for (var k in doneLightSet) {
|
|
329
|
+
if (doneLightSet[k]) {
|
|
330
|
+
canvas.addMarker(doneLightSet[k], "done-line");
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
for (var k in donePointSet) {
|
|
334
|
+
if (donePointSet[k]) {
|
|
335
|
+
canvas.addMarker(donePointSet[k], "done-point");
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
for (var k in doneTaskSet) {
|
|
339
|
+
if (doneTaskSet[k]) {
|
|
340
|
+
canvas.addMarker(doneTaskSet[k], "done-task");
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
for (var k in todoPointSet) {
|
|
344
|
+
if (todoPointSet[k]) {
|
|
345
|
+
canvas.addMarker(todoPointSet[k], "todo-point");
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
},
|
|
350
|
+
// 校验必填
|
|
351
|
+
isNotBlank(val) {
|
|
352
|
+
return (val != null || val === 0) && (val.toString().trim() != '' || val === 0)
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
mounted() {
|
|
356
|
+
if (this.isNotBlank(this.applyId)) {
|
|
357
|
+
this.workflowInit();
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
watch: {
|
|
361
|
+
applyId(val) {
|
|
362
|
+
if (this.isNotBlank(val)) {
|
|
363
|
+
this.workflowInit();
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
instanceId(val) {
|
|
367
|
+
if (this.isNotBlank(this.applyId) && this.isNotBlank(val)) {
|
|
368
|
+
this.workflowInit();
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
</script>
|
|
374
|
+
|
|
375
|
+
<style lang="less">
|
|
376
|
+
@import "./styles/css/index.less";
|
|
377
|
+
</style>
|