@lambo-design/workflow-approve 1.0.0-beta.46 → 1.0.0-beta.48
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/assignee-box.vue +45 -32
- package/src/components/countersigners-box.vue +202 -274
- package/src/components/history.vue +404 -400
- package/src/portrait.vue +101 -1
- package/src/workflow-diagram.vue +392 -382
package/src/portrait.vue
CHANGED
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
</Table>
|
|
203
203
|
</Modal>
|
|
204
204
|
<assigneeBox ref="assigneeHelpBox" :execution-completed="executionCompleted"
|
|
205
|
-
@update-selected="handleSelectedUser" @update-next-node-assignee="updateNextNodeAssignee"
|
|
205
|
+
@update-selected="handleSelectedUser" @update-next-node-assignee="updateNextNodeAssignee" @add-multitask-instance="addMultitaskInstance"
|
|
206
206
|
:data="assigneeBoxData" :smart-flow-server-context="smartFlowServerContext"
|
|
207
207
|
:upms-server-context="upmsServerContext"/>
|
|
208
208
|
<Modal v-model="modalBoxShow" width="1000" title="流程跟踪图">
|
|
@@ -212,6 +212,15 @@
|
|
|
212
212
|
:smart-flow-server-context="smartFlowServerContext">
|
|
213
213
|
</Workflow_Diagram>
|
|
214
214
|
</Modal>
|
|
215
|
+
<Modal v-model="reductionMultitaskInstanceModal" title="会签减签"
|
|
216
|
+
@on-cancel="reductionModalCancel"
|
|
217
|
+
@on-ok="reductionMultitaskInstance">
|
|
218
|
+
<Table border
|
|
219
|
+
:data="unapprovedAssigneeList"
|
|
220
|
+
:columns="reductionColumn"
|
|
221
|
+
@on-selection-change="selectAssignee">
|
|
222
|
+
</Table>
|
|
223
|
+
</Modal>
|
|
215
224
|
<Modal v-model="appointBoxShow" title="下一环节设置"
|
|
216
225
|
@on-cancel="appointBoxShow = false" width="600"
|
|
217
226
|
@on-ok="appointOk">
|
|
@@ -313,6 +322,12 @@
|
|
|
313
322
|
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo82') && !isDetail"
|
|
314
323
|
:disabled="disable" :loading="loading" @click="audit('82')">指定他人处理
|
|
315
324
|
</Button>
|
|
325
|
+
<Button style="margin-left: 10px;" v-if="isParallelCountersignature && handleButtons && handleButtons.includes('addMultitaskInstance') && !isDetail"
|
|
326
|
+
:disabled="disable" :loading="loading" @click="showUpdateMultitaskInstanceModal('81')">加签
|
|
327
|
+
</Button>
|
|
328
|
+
<Button style="margin-left: 10px;" v-if="isParallelCountersignature && handleButtons && handleButtons.includes('reductionMultitaskInstance') && !isDetail"
|
|
329
|
+
:disabled="disable" :loading="loading" @click="showUpdateMultitaskInstanceModal('83')">减签
|
|
330
|
+
</Button>
|
|
316
331
|
<Button style="margin-left: 10px;" v-if="handleButtons && handleButtons.includes('auditTo50') && !isDetail"
|
|
317
332
|
:disabled="disable" :loading="loading" @click="audit('50')">直接结束流程
|
|
318
333
|
</Button>
|
|
@@ -463,9 +478,12 @@ export default {
|
|
|
463
478
|
auditParams: {},
|
|
464
479
|
modal1: false,
|
|
465
480
|
modalBoxShow: false,
|
|
481
|
+
reductionMultitaskInstanceModal: false,
|
|
466
482
|
candidateGroupsHelpBoxShow: false,
|
|
467
483
|
appointBoxShow: false,
|
|
468
484
|
autoOpenNode: '0',
|
|
485
|
+
unapprovedAssigneeList: [],
|
|
486
|
+
reductionAssigneeList: [],
|
|
469
487
|
nextNodesOldSettings: [],
|
|
470
488
|
nextNodesFormList: [],
|
|
471
489
|
hisNode: [],
|
|
@@ -485,6 +503,7 @@ export default {
|
|
|
485
503
|
disable: false,
|
|
486
504
|
instanceId: '',
|
|
487
505
|
curTaskId: '',
|
|
506
|
+
isParallelCountersignature: false,
|
|
488
507
|
handleButtons: [],
|
|
489
508
|
handleName: '',
|
|
490
509
|
auditOpinionTitle: '',
|
|
@@ -660,6 +679,13 @@ export default {
|
|
|
660
679
|
})
|
|
661
680
|
return column
|
|
662
681
|
},
|
|
682
|
+
reductionColumn: function () {
|
|
683
|
+
let column = []
|
|
684
|
+
column.push({title: '#', key: 'selectId', type: 'selection', align: 'center', width: 55})
|
|
685
|
+
column.push({title: '账号', key: 'auditId', align: 'center'})
|
|
686
|
+
column.push({title: '姓名', key: 'auditName', align: 'center'})
|
|
687
|
+
return column
|
|
688
|
+
},
|
|
663
689
|
diagramTableColumns: function () {
|
|
664
690
|
let column = []
|
|
665
691
|
column.push({title: '序号', type: 'index', width: 60});
|
|
@@ -674,6 +700,10 @@ export default {
|
|
|
674
700
|
label = '流程发起';
|
|
675
701
|
tagColor = 'green'; // 绿色
|
|
676
702
|
}
|
|
703
|
+
else if (row.auditResult == '10'){
|
|
704
|
+
label = '自动跳过';
|
|
705
|
+
tagColor = 'green'; // 绿色
|
|
706
|
+
}
|
|
677
707
|
else if (row.auditResult == '30'){
|
|
678
708
|
label = '通过';
|
|
679
709
|
tagColor = 'green'; // 绿色
|
|
@@ -698,6 +728,10 @@ export default {
|
|
|
698
728
|
label = '跳转到指定节点';
|
|
699
729
|
tagColor = 'cyan'; // 青色
|
|
700
730
|
}
|
|
731
|
+
else if (row.auditResult == '83'){
|
|
732
|
+
label = '会签减签';
|
|
733
|
+
tagColor = 'red'; // 青色
|
|
734
|
+
}
|
|
701
735
|
else if (row.auditResult == '90'){
|
|
702
736
|
label = '驳回到指定节点';
|
|
703
737
|
tagColor = 'magenta'; // 品红色
|
|
@@ -898,6 +932,9 @@ export default {
|
|
|
898
932
|
ajax.post(self.smartFlowServerContext + '/manage/approvalCenter/getNodeData', param).then(function (resp) {
|
|
899
933
|
if (resp.data.code === '200') {
|
|
900
934
|
self.handleButtons = resp.data.data[0].handleButtons
|
|
935
|
+
if (resp.data.data[0].hasOwnProperty('isSequential')){
|
|
936
|
+
self.isParallelCountersignature = !resp.data.data[0].isSequential
|
|
937
|
+
}
|
|
901
938
|
self.handleName = resp.data.data[0].handleName ? resp.data.data[0].handleName : '审批'
|
|
902
939
|
self.auditOpinionTitle = resp.data.data[0].handleName ? resp.data.data[0].handleName + '意见' : '审批意见'
|
|
903
940
|
if (!self.handleButtons || (!self.handleButtons.includes('auditOpinion') && !self.handleButtons.includes('attachmentFile') && !self.handleButtons.includes('auditHistory'))){
|
|
@@ -1255,6 +1292,62 @@ export default {
|
|
|
1255
1292
|
})
|
|
1256
1293
|
}
|
|
1257
1294
|
},
|
|
1295
|
+
showUpdateMultitaskInstanceModal(updateType){
|
|
1296
|
+
const self = this
|
|
1297
|
+
if (updateType === '81'){
|
|
1298
|
+
this.$refs.assigneeHelpBox.toggleShowHelpBox(this.organTreeType, '', 'addMultitaskInstance')
|
|
1299
|
+
} else if (updateType === '83') {
|
|
1300
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getUnapprovedListOfMultiNode?taskId=' + self.curTaskId).then(function (resp) {
|
|
1301
|
+
if (resp.data.code === '200') {
|
|
1302
|
+
self.unapprovedAssigneeList = resp.data.data
|
|
1303
|
+
self.reductionMultitaskInstanceModal = true
|
|
1304
|
+
} else {
|
|
1305
|
+
self.$Message.error(resp.data.message)
|
|
1306
|
+
}
|
|
1307
|
+
}).catch(err => {
|
|
1308
|
+
console.log(err);
|
|
1309
|
+
})
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
updateMultitaskInstance(updateType, assignees){
|
|
1313
|
+
const self = this
|
|
1314
|
+
self.loading = true
|
|
1315
|
+
self.disable = true
|
|
1316
|
+
let param = {
|
|
1317
|
+
taskId: self.curTaskId,
|
|
1318
|
+
applyId: self.applyId,
|
|
1319
|
+
assignees: assignees,
|
|
1320
|
+
updateType: updateType
|
|
1321
|
+
}
|
|
1322
|
+
ajax.post(self.smartFlowServerContext + '/manage/processTodo/updateMultitaskInstance', param).then(resp => {
|
|
1323
|
+
let result = resp.data
|
|
1324
|
+
if (result.code == '200') {
|
|
1325
|
+
self.loading = false
|
|
1326
|
+
self.disable = false
|
|
1327
|
+
self.$Message.success(result.message);
|
|
1328
|
+
} else {
|
|
1329
|
+
self.loading = false
|
|
1330
|
+
self.disable = false
|
|
1331
|
+
self.$Message.error(result.message)
|
|
1332
|
+
}
|
|
1333
|
+
}).catch(err => {
|
|
1334
|
+
console.log(err);
|
|
1335
|
+
})
|
|
1336
|
+
},
|
|
1337
|
+
//加签
|
|
1338
|
+
addMultitaskInstance(assingeeList){
|
|
1339
|
+
const assingees = assingeeList.join(',')
|
|
1340
|
+
this.updateMultitaskInstance('81', assingees)
|
|
1341
|
+
},
|
|
1342
|
+
//减签
|
|
1343
|
+
reductionMultitaskInstance(){
|
|
1344
|
+
if (this.reductionAssigneeList.length === 0){
|
|
1345
|
+
this.$Message.error('请选择减签人员')
|
|
1346
|
+
return
|
|
1347
|
+
}
|
|
1348
|
+
const assingees = this.reductionAssigneeList.map(item => item.auditId).join(',')
|
|
1349
|
+
this.updateMultitaskInstance('83', assingees)
|
|
1350
|
+
},
|
|
1258
1351
|
|
|
1259
1352
|
doSearch() {
|
|
1260
1353
|
//不需要实现,是子组件assigneeBox要求使用父组件的这个方法
|
|
@@ -1343,6 +1436,13 @@ export default {
|
|
|
1343
1436
|
this.modal = false
|
|
1344
1437
|
this.auditResult = '';
|
|
1345
1438
|
},
|
|
1439
|
+
reductionModalCancel() {
|
|
1440
|
+
this.reductionMultitaskInstanceModal = false
|
|
1441
|
+
this.reductionAssigneeList = []
|
|
1442
|
+
},
|
|
1443
|
+
selectAssignee(selection) {
|
|
1444
|
+
this.reductionAssigneeList = selection
|
|
1445
|
+
},
|
|
1346
1446
|
selectNode(currentRow, oldCurrentRow) {
|
|
1347
1447
|
let self = this
|
|
1348
1448
|
self.targetTaskNode = currentRow.taskNode
|