@lambo-design/workflow-approve 1.0.0-beta.96 → 1.0.0-beta.98
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 +3 -3
- package/src/components/assignee-box.vue +65 -37
- package/src/components/history.vue +2 -1
- package/src/components/horizontal/attachment.vue +224 -224
- package/src/components/horizontal/history.vue +464 -464
- package/src/components/horizontal/opinion.vue +263 -263
- package/src/components/title.vue +24 -24
- package/src/horizontal.vue +1002 -1002
- package/src/portrait.vue +101 -45
package/src/portrait.vue
CHANGED
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
</Card>
|
|
143
143
|
</Modal>
|
|
144
144
|
<!-- 指定他人处理弹框 -->
|
|
145
|
-
<assigneeBox ref="assigneeHelpBox" :execution-completed="executionCompleted"
|
|
145
|
+
<assigneeBox ref="assigneeHelpBox" :execution-completed="executionCompleted" :show-confirm-box="showConfirmBox"
|
|
146
146
|
@update-selected="handleSelectedUser" @update-next-node-assignee="updateNextNodeAssignee"
|
|
147
147
|
@add-multitask-instance="addMultitaskInstance" @delegate-task-assignee="delegateTask"
|
|
148
148
|
@appoint-handler-with-candGroups="updateNextNodeCandGroups"
|
|
@@ -370,6 +370,12 @@ export default {
|
|
|
370
370
|
required: false,
|
|
371
371
|
default: '',
|
|
372
372
|
},
|
|
373
|
+
//是否展示操作按钮二次弹框
|
|
374
|
+
showConfirmBox: {
|
|
375
|
+
type: Boolean,
|
|
376
|
+
required: false,
|
|
377
|
+
default: false
|
|
378
|
+
},
|
|
373
379
|
//审批历史默认排序规则
|
|
374
380
|
historySortBy: {
|
|
375
381
|
type: String,
|
|
@@ -528,9 +534,9 @@ export default {
|
|
|
528
534
|
},
|
|
529
535
|
handleButtonsNames: {
|
|
530
536
|
'30': '通过',
|
|
531
|
-
'70':
|
|
532
|
-
'40':
|
|
533
|
-
'90':
|
|
537
|
+
'70': `驳回到原点`,
|
|
538
|
+
'40': `驳回上一节点`,
|
|
539
|
+
'90': `驳回指定节点`,
|
|
534
540
|
'80': '跳转指定节点',
|
|
535
541
|
'82': '指定他人处理',
|
|
536
542
|
'50': '直接结束流程',
|
|
@@ -1032,7 +1038,6 @@ export default {
|
|
|
1032
1038
|
const windowHeight = window.innerHeight - 50;
|
|
1033
1039
|
this.maxHeight = (this.maxHeightPercent / 100) * windowHeight;
|
|
1034
1040
|
this.minHeight = 0.15 * windowHeight;
|
|
1035
|
-
|
|
1036
1041
|
let initialHeight = (this.initialHeightPercent / 100) * windowHeight;
|
|
1037
1042
|
initialHeight = Math.max(this.minHeight, Math.min(initialHeight, this.maxHeight));
|
|
1038
1043
|
this.currentHeight = initialHeight;
|
|
@@ -1218,6 +1223,19 @@ export default {
|
|
|
1218
1223
|
if (!self.handleButtons || (!self.handleButtons.includes('auditOpinion') && !self.handleButtons.includes('attachmentFile') && !self.handleButtons.includes('auditHistory'))) {
|
|
1219
1224
|
self.showProcessInfo = false;
|
|
1220
1225
|
}
|
|
1226
|
+
self.handleButtonsNames = {
|
|
1227
|
+
'30': `${self.passName}`,
|
|
1228
|
+
'70': `${self.rejectName}到原点`,
|
|
1229
|
+
'40': `${self.rejectName}上一节点`,
|
|
1230
|
+
'90': `${self.rejectName}指定节点`,
|
|
1231
|
+
'80': '跳转指定节点',
|
|
1232
|
+
'82': '指定他人处理',
|
|
1233
|
+
'50': '直接结束流程',
|
|
1234
|
+
'84': '委派任务',
|
|
1235
|
+
'61': '交回委派任务',
|
|
1236
|
+
'62': '撤回委派任务',
|
|
1237
|
+
'passContinue': '通过并继续',
|
|
1238
|
+
}
|
|
1221
1239
|
} else {
|
|
1222
1240
|
self.$Message.error(resp.data.message);
|
|
1223
1241
|
}
|
|
@@ -1484,39 +1502,37 @@ export default {
|
|
|
1484
1502
|
//委派任务
|
|
1485
1503
|
this.getTransferRangeAndOpenModal(self.organTreeType, '', 'delegateTask', '')
|
|
1486
1504
|
} else if (self.auditResult === '62') {
|
|
1505
|
+
if (!self.showConfirmBox){
|
|
1506
|
+
self.execute('撤回委派成功', auditResult)
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1487
1509
|
//撤回委派任务
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1510
|
+
self.$Modal.confirm({
|
|
1511
|
+
title: '提示',
|
|
1512
|
+
content: '确定要' + auditResult.name + '吗?',
|
|
1513
|
+
onOk: () => {
|
|
1514
|
+
self.execute('撤回委派成功', auditResult)
|
|
1515
|
+
},
|
|
1516
|
+
onCancel: () => {
|
|
1491
1517
|
self.loading = false
|
|
1492
1518
|
self.disable = false
|
|
1493
|
-
self.revokeDelegateTask = false
|
|
1494
|
-
self.$Message.success('撤回委派成功')
|
|
1495
|
-
} else {
|
|
1496
|
-
self.loading = false
|
|
1497
|
-
self.disable = false
|
|
1498
|
-
self.$Message.error(result.message)
|
|
1499
1519
|
}
|
|
1500
1520
|
})
|
|
1501
1521
|
} else if (self.auditResult === '61') {
|
|
1522
|
+
if (!self.showConfirmBox){
|
|
1523
|
+
self.execute('交回委派任务成功', auditResult)
|
|
1524
|
+
return;
|
|
1525
|
+
}
|
|
1502
1526
|
//交回委派任务
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1527
|
+
self.$Modal.confirm({
|
|
1528
|
+
title: '提示',
|
|
1529
|
+
content: '确定要' + auditResult.name + '吗?',
|
|
1530
|
+
onOk: () => {
|
|
1531
|
+
self.execute('交回委派任务成功', auditResult)
|
|
1532
|
+
},
|
|
1533
|
+
onCancel: () => {
|
|
1506
1534
|
self.loading = false
|
|
1507
1535
|
self.disable = false
|
|
1508
|
-
self.$Message.success('交回委派任务成功')
|
|
1509
|
-
if (result.data) {
|
|
1510
|
-
let taskIds = result.data.id ? result.data.id : result.data.map(item => item.id).join(',')
|
|
1511
|
-
setTimeout(() => {
|
|
1512
|
-
self.executionCompleted(true, result.data.id ? result.data.processInstanceId : result.data[0].processInstanceId, taskIds, auditResult, self.curTaskId)
|
|
1513
|
-
self.isPassContinue = false // 重置标志
|
|
1514
|
-
}, 1000)
|
|
1515
|
-
}
|
|
1516
|
-
} else {
|
|
1517
|
-
self.loading = false
|
|
1518
|
-
self.disable = false
|
|
1519
|
-
self.$Message.error(result.message)
|
|
1520
1536
|
}
|
|
1521
1537
|
})
|
|
1522
1538
|
} else if (self.auditResult === '80') {
|
|
@@ -1608,6 +1624,26 @@ export default {
|
|
|
1608
1624
|
code: self.isPassContinue ? 'passContinue' : self.auditResult,
|
|
1609
1625
|
name: self.isPassContinue ? self.handleButtonsNames['passContinue'] : self.handleButtonsNames[self.auditResult]
|
|
1610
1626
|
}
|
|
1627
|
+
if (!self.showConfirmBox){
|
|
1628
|
+
self.executePass(auditResult)
|
|
1629
|
+
return;
|
|
1630
|
+
}
|
|
1631
|
+
//二次确认
|
|
1632
|
+
self.$Modal.confirm({
|
|
1633
|
+
title: '提示',
|
|
1634
|
+
content: '确定要' + auditResult.name + '吗?',
|
|
1635
|
+
onOk: () => {
|
|
1636
|
+
self.executePass(auditResult)
|
|
1637
|
+
},
|
|
1638
|
+
onCancel: () => {
|
|
1639
|
+
self.loading = false
|
|
1640
|
+
self.disable = false
|
|
1641
|
+
}
|
|
1642
|
+
})
|
|
1643
|
+
|
|
1644
|
+
},
|
|
1645
|
+
executePass(auditResult){
|
|
1646
|
+
const self = this
|
|
1611
1647
|
if (self.auditResult === '82' && (self.targetTaskNode == '' || self.targetTaskNode == null)) {
|
|
1612
1648
|
self.auditResult = ''
|
|
1613
1649
|
self.$Message.error(`请选择${self.handleName}节点!`)
|
|
@@ -1682,6 +1718,31 @@ export default {
|
|
|
1682
1718
|
})
|
|
1683
1719
|
}
|
|
1684
1720
|
},
|
|
1721
|
+
execute(successMessage, auditResult){
|
|
1722
|
+
ajax.post(self.smartFlowServerContext + '/manage/processTodo/audit', self.auditParams).then(resp => {
|
|
1723
|
+
let result = resp.data
|
|
1724
|
+
if (result.code == '200') {
|
|
1725
|
+
self.loading = false
|
|
1726
|
+
self.disable = false
|
|
1727
|
+
self.$Message.success(successMessage)
|
|
1728
|
+
if (result.data) {
|
|
1729
|
+
let taskIds = result.data.id ? result.data.id : result.data.map(item => item.id).join(',')
|
|
1730
|
+
setTimeout(() => {
|
|
1731
|
+
self.executionCompleted(true, result.data.id ? result.data.processInstanceId : result.data[0].processInstanceId, taskIds, auditResult, self.curTaskId)
|
|
1732
|
+
self.isPassContinue = false // 重置标志
|
|
1733
|
+
}, 1000)
|
|
1734
|
+
}
|
|
1735
|
+
} else {
|
|
1736
|
+
self.loading = false
|
|
1737
|
+
self.disable = false
|
|
1738
|
+
self.$Message.error(result.message)
|
|
1739
|
+
}
|
|
1740
|
+
}).catch(err => {
|
|
1741
|
+
self.loading = false
|
|
1742
|
+
self.disable = false
|
|
1743
|
+
console.log(err)
|
|
1744
|
+
})
|
|
1745
|
+
},
|
|
1685
1746
|
doJump(){
|
|
1686
1747
|
if (this.auditResult === '90'){
|
|
1687
1748
|
this.auditParams.rejectAttribute = this.rejectAttribute ? this.rejectAttribute :'inSequence'
|
|
@@ -1742,25 +1803,20 @@ export default {
|
|
|
1742
1803
|
name: self.handleButtonsNames[self.auditResult]
|
|
1743
1804
|
}
|
|
1744
1805
|
self.auditParams.selectedUserId = assignee
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
}
|
|
1757
|
-
} else {
|
|
1806
|
+
if (!self.showConfirmBox){
|
|
1807
|
+
self.execute('委派成功', auditResult)
|
|
1808
|
+
return;
|
|
1809
|
+
}
|
|
1810
|
+
self.$Modal.confirm({
|
|
1811
|
+
title: '提示',
|
|
1812
|
+
content: '确定要' + auditResult.name + '吗?',
|
|
1813
|
+
onOk: () => {
|
|
1814
|
+
self.execute('委派成功', auditResult)
|
|
1815
|
+
},
|
|
1816
|
+
onCancel: () => {
|
|
1758
1817
|
self.loading = false
|
|
1759
1818
|
self.disable = false
|
|
1760
|
-
self.$Message.error(result.message)
|
|
1761
1819
|
}
|
|
1762
|
-
}).catch(err => {
|
|
1763
|
-
console.log(err)
|
|
1764
1820
|
})
|
|
1765
1821
|
},
|
|
1766
1822
|
//加签
|