@lambo-design/workflow-approve 1.0.0-beta.140 → 1.0.0-beta.142
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 +1 -1
- package/src/components/history.vue +317 -29
- package/src/components/reject-node-table.vue +837 -0
- package/src/portrait.vue +162 -40
package/src/portrait.vue
CHANGED
|
@@ -134,37 +134,53 @@
|
|
|
134
134
|
<Modal v-model="modal1" title="选择节点"
|
|
135
135
|
@on-cancel="cancel"
|
|
136
136
|
@on-ok="doJump">
|
|
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
|
-
|
|
137
|
+
<template v-if="rejectNodeModalMode === 'prototype'">
|
|
138
|
+
<RejectNodeTable
|
|
139
|
+
:nodes="allNode"
|
|
140
|
+
:current-task-node="taskNode"
|
|
141
|
+
:default-reject-to-take-over="defaultRejectToTakeOver"
|
|
142
|
+
:visible="modal1 && rejectNodeModalMode === 'prototype'"
|
|
143
|
+
@selection-change="handleRejectNodeSelectionChange"/>
|
|
144
|
+
</template>
|
|
145
|
+
|
|
146
|
+
<template v-else>
|
|
147
|
+
<Table border
|
|
148
|
+
:data="allNode"
|
|
149
|
+
:columns="nodeColumn"
|
|
150
|
+
highlight-row
|
|
151
|
+
@on-current-change="selectNode">
|
|
152
|
+
</Table>
|
|
153
|
+
<Card class="reject-attribute-card" dis-hover v-if="showRejectToSelected && auditResult == '90'">
|
|
154
|
+
<p slot="title">
|
|
155
|
+
选择驳回人员
|
|
156
|
+
<Tooltip max-width="350" placement="right" content="驳回节点为会签节点,可选择驳回部分办理人员">
|
|
157
|
+
<Icon type="ios-information-circle" />
|
|
158
|
+
</Tooltip>
|
|
159
|
+
:
|
|
160
|
+
</p>
|
|
161
|
+
<span>{{ rejectUsers.name }}</span>
|
|
162
|
+
<Button size="small" class="reject-user-button" @click="handleSelectRejectUser">选择</Button>
|
|
163
|
+
</Card>
|
|
164
|
+
<Card class="reject-attribute-card" dis-hover v-if="showRejectOption && auditResult == '90'">
|
|
165
|
+
<p slot="title">驳回给:</p>
|
|
166
|
+
<RadioGroup v-model="rejectToTakeOver">
|
|
167
|
+
<Radio label="original">原办理人</Radio>
|
|
168
|
+
<Radio label="actual">实际办理人</Radio>
|
|
169
|
+
</RadioGroup>
|
|
170
|
+
</Card>
|
|
171
|
+
<Card class="reject-attribute-card" dis-hover v-if="showProcessControl && auditResult == '90'">
|
|
172
|
+
<p slot="title">驳回的节点通过后:</p>
|
|
173
|
+
<RadioGroup v-model="rejectAttribute">
|
|
174
|
+
<Radio v-for="(item, index) in rejectAttributeList" :key="index" :label="item.type">{{item.name}}</Radio>
|
|
175
|
+
</RadioGroup>
|
|
176
|
+
<Alert v-if="rejectAttribute == 'returnToCurrentNode'" type="warning" show-icon style="margin-top: 3px">本节点人员有:{{taskAuditUserList.join(',')}}</Alert>
|
|
177
|
+
</Card>
|
|
178
|
+
</template>
|
|
179
|
+
|
|
180
|
+
<template slot="footer">
|
|
181
|
+
<Button @click="cancel">取消</Button>
|
|
182
|
+
<Button type="primary" @click="doJump">确定</Button>
|
|
183
|
+
</template>
|
|
168
184
|
</Modal>
|
|
169
185
|
<!-- 指定他人处理弹框 -->
|
|
170
186
|
<assigneeBox ref="assigneeHelpBox" :execution-completed="executionCompleted" :show-confirm-box="showConfirmBox"
|
|
@@ -362,6 +378,7 @@ import processHistory from './components/history'
|
|
|
362
378
|
import assigneeBox from './components/assignee-box'
|
|
363
379
|
import CandidateGroupsHelpBox from './components/candidate-groups-box'
|
|
364
380
|
import CountersingersBox from './components/countersigners-box'
|
|
381
|
+
import RejectNodeTable from './components/reject-node-table'
|
|
365
382
|
import { timestampToTime } from '@lambo-design/shared/utils/date'
|
|
366
383
|
import ProcessInfo from './components/process-info'
|
|
367
384
|
import { NodeType, WorkflowInfoButtons } from './utils/const'
|
|
@@ -502,6 +519,7 @@ export default {
|
|
|
502
519
|
LamboIndicatorCard,
|
|
503
520
|
CandidateGroupsHelpBox,
|
|
504
521
|
CountersingersBox,
|
|
522
|
+
RejectNodeTable,
|
|
505
523
|
ProcessInfo,
|
|
506
524
|
},
|
|
507
525
|
data() {
|
|
@@ -532,6 +550,14 @@ export default {
|
|
|
532
550
|
targetTaskNode: '',
|
|
533
551
|
targetTaskNodeProcessControl: '',
|
|
534
552
|
allNode: [],
|
|
553
|
+
rejectNodeModalMode: 'legacy',
|
|
554
|
+
rejectNodeSelection: {
|
|
555
|
+
taskNodes: [],
|
|
556
|
+
taskNames: [],
|
|
557
|
+
pathKeys: [],
|
|
558
|
+
pathEntries: [],
|
|
559
|
+
rejectToTakeOver: this.defaultRejectToTakeOver ? 'actual' : 'original'
|
|
560
|
+
},
|
|
535
561
|
taskAuditUserList: [],
|
|
536
562
|
auditParams: {},
|
|
537
563
|
scrollElement: null,
|
|
@@ -721,8 +747,15 @@ export default {
|
|
|
721
747
|
{
|
|
722
748
|
id: 'auditTo90',
|
|
723
749
|
label: `${this.rejectName}指定节点`,
|
|
724
|
-
condition: this.handleButtons?.includes('auditTo90') && !this.displayedOperButton.includes('auditTo90') && showButtons,
|
|
725
|
-
action: () => this.
|
|
750
|
+
condition: this.handleButtons?.includes('auditTo90') && !this.handleButtons?.includes('auditTo92') && !this.displayedOperButton.includes('auditTo90') && showButtons,
|
|
751
|
+
action: () => this.startRejectNodeAudit('legacy'),
|
|
752
|
+
disabled: this.disable
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
id: 'auditTo92',
|
|
756
|
+
label: `${this.rejectName}指定节点`,
|
|
757
|
+
condition: this.handleButtons?.includes('auditTo92') && !this.displayedOperButton.includes('auditTo92') && showButtons,
|
|
758
|
+
action: () => this.startRejectNodeAudit('prototype'),
|
|
726
759
|
disabled: this.disable
|
|
727
760
|
},
|
|
728
761
|
{
|
|
@@ -1641,6 +1674,12 @@ export default {
|
|
|
1641
1674
|
self.submit()
|
|
1642
1675
|
},
|
|
1643
1676
|
|
|
1677
|
+
startRejectNodeAudit(mode) {
|
|
1678
|
+
this.rejectNodeModalMode = mode
|
|
1679
|
+
this.clearRejectNodeSelection()
|
|
1680
|
+
this.audit('90')
|
|
1681
|
+
},
|
|
1682
|
+
|
|
1644
1683
|
// 通过并继续审批
|
|
1645
1684
|
passContinueAudit: function () {
|
|
1646
1685
|
let self = this
|
|
@@ -1823,7 +1862,24 @@ export default {
|
|
|
1823
1862
|
self.getNodesBehind()
|
|
1824
1863
|
} else if (self.auditResult === '90') {
|
|
1825
1864
|
//驳回到前序指定节点
|
|
1826
|
-
self.
|
|
1865
|
+
const usePrototype = self.rejectNodeModalMode === 'prototype'
|
|
1866
|
+
self.targetTaskNode = ''
|
|
1867
|
+
self.clearRejectNodeSelection()
|
|
1868
|
+
self.targetTaskNodeProcessControl = 'inSequence'
|
|
1869
|
+
self.showRejectToSelected = false
|
|
1870
|
+
self.showRejectOption = false
|
|
1871
|
+
self.showProcessControl = false
|
|
1872
|
+
self.rejectAttributesBoxShow = false
|
|
1873
|
+
self.selectRejectUserModal = false
|
|
1874
|
+
self.rejectAttribute = 'inSequence'
|
|
1875
|
+
self.rejectUsers = { name: '全部办理人', id: 'all' }
|
|
1876
|
+
self.rejectToTakeOver = self.defaultRejectToTakeOver ? 'actual' : 'original'
|
|
1877
|
+
self.selectedRejectUserList = []
|
|
1878
|
+
if (usePrototype) {
|
|
1879
|
+
self.getAllPreNodesByPath()
|
|
1880
|
+
} else {
|
|
1881
|
+
self.getAllPreNodes()
|
|
1882
|
+
}
|
|
1827
1883
|
} else if (self.auditResult === '40') {
|
|
1828
1884
|
//驳回到上一级
|
|
1829
1885
|
self.loading = true
|
|
@@ -1916,6 +1972,7 @@ export default {
|
|
|
1916
1972
|
name: self.isPassContinue ? self.handleButtonsNames['passContinue'] : self.handleButtonsNames[self.auditResult]
|
|
1917
1973
|
}
|
|
1918
1974
|
if (!self.showConfirmBox) {
|
|
1975
|
+
self.modal1 = false;
|
|
1919
1976
|
self.$Spin.show();
|
|
1920
1977
|
self.executePass(auditResult)
|
|
1921
1978
|
return;
|
|
@@ -1925,6 +1982,7 @@ export default {
|
|
|
1925
1982
|
title: '提示',
|
|
1926
1983
|
content: '确定要' + auditResult.name + '吗?',
|
|
1927
1984
|
onOk: () => {
|
|
1985
|
+
self.modal1 = false;
|
|
1928
1986
|
self.$Spin.show();
|
|
1929
1987
|
self.executePass(auditResult)
|
|
1930
1988
|
},
|
|
@@ -1938,19 +1996,32 @@ export default {
|
|
|
1938
1996
|
},
|
|
1939
1997
|
executePass(auditResult) {
|
|
1940
1998
|
const self = this
|
|
1941
|
-
|
|
1999
|
+
const isRejectAnyNodesMode = self.auditResult === '90' && self.rejectNodeModalMode === 'prototype'
|
|
2000
|
+
const selectedTaskNodes = Array.from(new Set((self.rejectNodeSelection?.taskNodes || []).filter(Boolean)))
|
|
2001
|
+
if (isRejectAnyNodesMode && selectedTaskNodes.length === 0) {
|
|
1942
2002
|
self.auditResult = ''
|
|
1943
|
-
self.$Message.error(`请选择${self.
|
|
2003
|
+
self.$Message.error(`请选择${self.rejectName}节点!`)
|
|
2004
|
+
self.loading = false
|
|
2005
|
+
self.$Spin.hide();
|
|
2006
|
+
return
|
|
2007
|
+
}
|
|
2008
|
+
if (!isRejectAnyNodesMode && (self.auditResult === '90' || self.auditResult === '80') && (self.targetTaskNode == '' || self.targetTaskNode == null)) {
|
|
2009
|
+
const auditResultCode = self.auditResult
|
|
2010
|
+
self.auditResult = ''
|
|
2011
|
+
self.$Message.error(`请选择${auditResultCode === '90' ? self.rejectName : '跳转'}节点!`)
|
|
1944
2012
|
self.loading = false
|
|
1945
2013
|
self.$Spin.hide();
|
|
1946
2014
|
} else {
|
|
1947
2015
|
self.loading = true
|
|
1948
2016
|
self.disable = true
|
|
1949
|
-
self.auditParams.targetTaskNode = self.targetTaskNode
|
|
2017
|
+
self.auditParams.targetTaskNode = isRejectAnyNodesMode ? selectedTaskNodes.join(',') : self.targetTaskNode
|
|
2018
|
+
self.auditParams.auditResult = isRejectAnyNodesMode ? '92' : self.auditResult
|
|
1950
2019
|
if (self.rejectUsers.id != 'all'){
|
|
1951
2020
|
self.auditParams.rejectUsers = self.rejectUsers.id
|
|
1952
2021
|
}
|
|
1953
|
-
self.auditParams.rejectToTakeOver =
|
|
2022
|
+
self.auditParams.rejectToTakeOver = isRejectAnyNodesMode
|
|
2023
|
+
? self.rejectNodeSelection?.rejectToTakeOver && self.rejectNodeSelection.rejectToTakeOver != 'original'
|
|
2024
|
+
: self.rejectToTakeOver && self.rejectToTakeOver != 'original'
|
|
1954
2025
|
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
1955
2026
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
1956
2027
|
let result = resp.data
|
|
@@ -2178,8 +2249,10 @@ export default {
|
|
|
2178
2249
|
|
|
2179
2250
|
cancel() {
|
|
2180
2251
|
this.modal = false
|
|
2252
|
+
this.modal1 = false
|
|
2181
2253
|
this.auditResult = ''
|
|
2182
|
-
this.
|
|
2254
|
+
this.clearRejectNodeSelection()
|
|
2255
|
+
this.rejectNodeModalMode = 'legacy'
|
|
2183
2256
|
this.rejectAttribute = 'inSequence'
|
|
2184
2257
|
this.targetTaskNodeProcessControl = 'inSequence'
|
|
2185
2258
|
this.showProcessControl = false
|
|
@@ -2214,7 +2287,7 @@ export default {
|
|
|
2214
2287
|
rejectAttributesCancel() {
|
|
2215
2288
|
this.rejectAttributesBoxShow = false
|
|
2216
2289
|
this.rejectAttribute = 'inSequence'
|
|
2217
|
-
this.
|
|
2290
|
+
this.clearRejectNodeSelection()
|
|
2218
2291
|
this.loading = false
|
|
2219
2292
|
this.disable = false
|
|
2220
2293
|
this.showProcessControl = false
|
|
@@ -2230,8 +2303,32 @@ export default {
|
|
|
2230
2303
|
selectRejectUser(selection) {
|
|
2231
2304
|
this.selectedRejectUserList = selection
|
|
2232
2305
|
},
|
|
2306
|
+
clearRejectNodeSelection() {
|
|
2307
|
+
this.targetTaskNode = ''
|
|
2308
|
+
this.rejectNodeSelection = this.createEmptyRejectNodeSelection()
|
|
2309
|
+
this.rejectToTakeOver = this.rejectNodeSelection.rejectToTakeOver
|
|
2310
|
+
},
|
|
2311
|
+
createEmptyRejectNodeSelection() {
|
|
2312
|
+
return {
|
|
2313
|
+
taskNodes: [],
|
|
2314
|
+
taskNames: [],
|
|
2315
|
+
pathKeys: [],
|
|
2316
|
+
pathEntries: [],
|
|
2317
|
+
rejectToTakeOver: this.defaultRejectToTakeOver ? 'actual' : 'original'
|
|
2318
|
+
}
|
|
2319
|
+
},
|
|
2320
|
+
handleRejectNodeSelectionChange(selection) {
|
|
2321
|
+
this.rejectNodeSelection = selection || this.createEmptyRejectNodeSelection()
|
|
2322
|
+
this.rejectToTakeOver = this.rejectNodeSelection.rejectToTakeOver
|
|
2323
|
+
},
|
|
2233
2324
|
selectNode(currentRow, oldCurrentRow) {
|
|
2234
2325
|
let self = this
|
|
2326
|
+
if (!currentRow) {
|
|
2327
|
+
return
|
|
2328
|
+
}
|
|
2329
|
+
if (currentRow.type === 'group') {
|
|
2330
|
+
return
|
|
2331
|
+
}
|
|
2235
2332
|
self.targetTaskNode = currentRow.taskNode
|
|
2236
2333
|
self.rejectUsers = { name: '全部办理人', id: 'all' }
|
|
2237
2334
|
self.targetTaskNodeProcessControl = currentRow.processControl
|
|
@@ -2278,6 +2375,7 @@ export default {
|
|
|
2278
2375
|
if (resp.data.code === '200') {
|
|
2279
2376
|
if (resp.data.data.length > 0) {
|
|
2280
2377
|
self.allNode = resp.data.data.filter(node => !self.displayedPreNodes.includes(node.taskNode))
|
|
2378
|
+
self.clearRejectNodeSelection()
|
|
2281
2379
|
self.modal1 = true
|
|
2282
2380
|
} else {
|
|
2283
2381
|
self.$Message.warning('当前流程无前序节点')
|
|
@@ -2287,6 +2385,28 @@ export default {
|
|
|
2287
2385
|
}
|
|
2288
2386
|
})
|
|
2289
2387
|
},
|
|
2388
|
+
getAllPreNodesByPath() {
|
|
2389
|
+
let self = this
|
|
2390
|
+
let params = {
|
|
2391
|
+
processDefId: self.procId,
|
|
2392
|
+
taskId: self.curTaskId,
|
|
2393
|
+
}
|
|
2394
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getAllPreNodesByPath', {params: params}).then(function (resp) {
|
|
2395
|
+
if (resp.data.code === '200') {
|
|
2396
|
+
if (resp.data.data.length > 0) {
|
|
2397
|
+
self.allNode = resp.data.data.filter(node => !self.displayedPreNodes.includes(node.taskNode))
|
|
2398
|
+
self.clearRejectNodeSelection()
|
|
2399
|
+
self.modal1 = true
|
|
2400
|
+
} else {
|
|
2401
|
+
self.$Message.warning('当前流程无前序节点')
|
|
2402
|
+
}
|
|
2403
|
+
} else {
|
|
2404
|
+
self.$Message.error(resp.data.message)
|
|
2405
|
+
}
|
|
2406
|
+
}).catch(err => {
|
|
2407
|
+
console.log(err)
|
|
2408
|
+
})
|
|
2409
|
+
},
|
|
2290
2410
|
getNodesBehind() {
|
|
2291
2411
|
let self = this
|
|
2292
2412
|
let params = {
|
|
@@ -2297,6 +2417,8 @@ export default {
|
|
|
2297
2417
|
if (resp.data.code === '200') {
|
|
2298
2418
|
if (resp.data.data.length > 0) {
|
|
2299
2419
|
self.allNode = resp.data.data
|
|
2420
|
+
self.rejectNodeModalMode = 'legacy'
|
|
2421
|
+
self.clearRejectNodeSelection()
|
|
2300
2422
|
self.modal1 = true
|
|
2301
2423
|
} else {
|
|
2302
2424
|
self.$Message.warning('当前流程无后续节点')
|