@lambo-design/workflow-approve 1.0.0-beta.132 → 1.0.0-beta.134
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/portrait.vue +145 -12
- package/src/styles/css/index.less +8 -0
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.134",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"axios": "^0.24.0",
|
|
14
14
|
"axios-cache-plugin": "^0.1.0",
|
|
15
|
-
"@lambo-design/
|
|
16
|
-
"@lambo-design/
|
|
15
|
+
"@lambo-design/shared": "^1.0.0-beta.346",
|
|
16
|
+
"@lambo-design/core": "^4.7.1-beta.176"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"bpmn-js": "^7.3.1",
|
package/src/portrait.vue
CHANGED
|
@@ -140,7 +140,18 @@
|
|
|
140
140
|
highlight-row
|
|
141
141
|
@on-current-change="selectNode">
|
|
142
142
|
</Table>
|
|
143
|
-
<Card v-if="
|
|
143
|
+
<Card class="reject-attribute-card" dis-hover v-if="showRejectToSelected && auditResult == '90'">
|
|
144
|
+
<p slot="title">
|
|
145
|
+
选择驳回人员
|
|
146
|
+
<Tooltip max-width="350" placement="right" content="驳回节点为会签节点,可选择驳回部分办理人员">
|
|
147
|
+
<Icon type="ios-information-circle" />
|
|
148
|
+
</Tooltip>
|
|
149
|
+
:
|
|
150
|
+
</p>
|
|
151
|
+
<span>{{ rejectUsers.name }}</span>
|
|
152
|
+
<Button size="small" class="reject-user-button" @click="handleSelectRejectUser">选择</Button>
|
|
153
|
+
</Card>
|
|
154
|
+
<Card class="reject-attribute-card" dis-hover v-if="showProcessControl && auditResult == '90'">
|
|
144
155
|
<p slot="title">驳回的节点通过后:</p>
|
|
145
156
|
<RadioGroup v-model="rejectAttribute">
|
|
146
157
|
<Radio v-for="(item, index) in rejectAttributeList" :key="index" :label="item.type">{{item.name}}</Radio>
|
|
@@ -265,12 +276,40 @@
|
|
|
265
276
|
<Button type="primary" @click="appointOk">确定</Button>
|
|
266
277
|
</template>
|
|
267
278
|
</Modal>
|
|
268
|
-
|
|
279
|
+
<!-- 驳回设置弹框 -->
|
|
280
|
+
<Modal v-model="rejectAttributesBoxShow" :title="showRejectToSelected ? '驳回设置' : '驳回的节点通过后'"
|
|
269
281
|
@on-cancel="rejectAttributesCancel"
|
|
270
282
|
@on-ok="rejectProcessWithRejectAttributes">
|
|
271
|
-
<
|
|
272
|
-
<
|
|
273
|
-
|
|
283
|
+
<Form :label-width="150">
|
|
284
|
+
<FormItem v-if="showProcessControl" :label="showRejectToSelected ? '驳回的节点通过后:' : ''" :label-width="showRejectToSelected ? 150 : 0">
|
|
285
|
+
<RadioGroup v-model="rejectAttribute">
|
|
286
|
+
<Radio v-for="(item, index) in rejectAttributeList" :key="index" :label="item.type">{{item.name}}</Radio>
|
|
287
|
+
</RadioGroup>
|
|
288
|
+
</FormItem>
|
|
289
|
+
<FormItem v-if="showRejectToSelected">
|
|
290
|
+
<template slot="label">
|
|
291
|
+
<span>
|
|
292
|
+
选择驳回人员
|
|
293
|
+
<Tooltip max-width="200" content="上一节点为会签节点,可选择驳回部分办理人员">
|
|
294
|
+
<Icon type="ios-information-circle" />
|
|
295
|
+
</Tooltip>
|
|
296
|
+
:
|
|
297
|
+
</span>
|
|
298
|
+
</template>
|
|
299
|
+
<span>{{ rejectUsers.name }}</span>
|
|
300
|
+
<Button size="small" class="reject-user-button" @click="handleSelectRejectUser">选择</Button>
|
|
301
|
+
</FormItem>
|
|
302
|
+
</Form>
|
|
303
|
+
</Modal>
|
|
304
|
+
<!-- 选择驳回人员弹框 -->
|
|
305
|
+
<Modal v-model="selectRejectUserModal" title="选择驳回人员"
|
|
306
|
+
@on-cancel="rejectUserClose('cancel')"
|
|
307
|
+
@on-ok="rejectUserClose('ok')">
|
|
308
|
+
<Table border
|
|
309
|
+
:data="rejectUserList"
|
|
310
|
+
:columns="rejectUserColumn"
|
|
311
|
+
@on-selection-change="selectRejectUser">
|
|
312
|
+
</Table>
|
|
274
313
|
</Modal>
|
|
275
314
|
<candidateGroupsHelpBox ref="candidateGroupsHelpBox" :show="candidateGroupsHelpBoxShow"
|
|
276
315
|
@update-cand-groups="updateCandGroups"
|
|
@@ -479,13 +518,21 @@ export default {
|
|
|
479
518
|
candidateGroupsHelpBoxShow: false,
|
|
480
519
|
appointBoxShow: false,
|
|
481
520
|
rejectAttributesBoxShow: false,
|
|
521
|
+
selectRejectUserModal: false,
|
|
482
522
|
rejectAttributes: {},
|
|
483
523
|
showProcessControl: false,
|
|
524
|
+
showRejectToSelected: false,
|
|
525
|
+
rejectUsers: {
|
|
526
|
+
name: '全部办理人',
|
|
527
|
+
id: 'all'
|
|
528
|
+
},
|
|
484
529
|
autoOpenNode: '0',
|
|
485
530
|
unapprovedAssigneeList: [],
|
|
486
531
|
rejectAttribute: 'inSequence',
|
|
487
532
|
rejectAttributeList: [],
|
|
488
533
|
reductionAssigneeList: [],
|
|
534
|
+
rejectUserList: [],
|
|
535
|
+
selectedRejectUserList: [],
|
|
489
536
|
nextNodesOldSettings: [],
|
|
490
537
|
nextNodesFormList: [],
|
|
491
538
|
hisNode: [],
|
|
@@ -974,6 +1021,17 @@ export default {
|
|
|
974
1021
|
column.push({ title: '姓名', key: 'auditName', align: 'center' })
|
|
975
1022
|
return column
|
|
976
1023
|
},
|
|
1024
|
+
rejectUserColumn: function () {
|
|
1025
|
+
let column = []
|
|
1026
|
+
column.push({ title: '#', key: 'selectId', type: 'selection', align: 'center', width: 55 })
|
|
1027
|
+
column.push({ title: '姓名', key: 'auditName', align: 'center' })
|
|
1028
|
+
column.push({ title: '部门', key: 'auditUserOrgan', align: 'center',
|
|
1029
|
+
render: (h, params) => {
|
|
1030
|
+
return h('div', {}, `${params.row.auditUserOrgan?.split(':')[1]}`)
|
|
1031
|
+
}, })
|
|
1032
|
+
column.push({ title: '审批意见', key: 'auditComment', align: 'center' })
|
|
1033
|
+
return column
|
|
1034
|
+
},
|
|
977
1035
|
diagramTableColumns: function () {
|
|
978
1036
|
let column = []
|
|
979
1037
|
column.push({
|
|
@@ -1796,7 +1854,14 @@ export default {
|
|
|
1796
1854
|
self.executionCompleted(true, null, null, auditResult, self.curTaskId)
|
|
1797
1855
|
}, 1000)
|
|
1798
1856
|
} else {
|
|
1799
|
-
|
|
1857
|
+
// 前序节点只有一个会签节点才可选择驳回人员
|
|
1858
|
+
self.showRejectToSelected = Array.isArray(result.data) && result.data.length === 1 && result.data[0].handleButtons?.includes('rejectToSelected')
|
|
1859
|
+
self.targetTaskNode = Array.isArray(result.data) && result.data.length === 1 ? result.data[0].taskNode : ''
|
|
1860
|
+
if (self.showRejectToSelected && !self.handleButtons?.includes('rejectProcessControl')) {
|
|
1861
|
+
self.rejectAttributesBoxShow = true
|
|
1862
|
+
} else {
|
|
1863
|
+
self.handleButtons && self.handleButtons.includes('rejectProcessControl') ? self.getProcessAttributes() : self.doPass()
|
|
1864
|
+
}
|
|
1800
1865
|
}
|
|
1801
1866
|
})
|
|
1802
1867
|
} else {
|
|
@@ -1838,14 +1903,17 @@ export default {
|
|
|
1838
1903
|
},
|
|
1839
1904
|
executePass(auditResult) {
|
|
1840
1905
|
const self = this
|
|
1841
|
-
if (self.auditResult === '
|
|
1906
|
+
if ((self.auditResult === '90' || self.auditResult === '80') && (self.targetTaskNode == '' || self.targetTaskNode == null)) {
|
|
1842
1907
|
self.auditResult = ''
|
|
1843
|
-
self.$Message.error(`请选择${self.
|
|
1908
|
+
self.$Message.error(`请选择${self.auditResult === '90' ? self.rejectName : '跳转'}节点!`)
|
|
1844
1909
|
self.loading = false
|
|
1845
1910
|
} else {
|
|
1846
1911
|
self.loading = true
|
|
1847
1912
|
self.disable = true
|
|
1848
1913
|
self.auditParams.targetTaskNode = self.targetTaskNode
|
|
1914
|
+
if (self.rejectUsers.id != 'all'){
|
|
1915
|
+
self.auditParams.rejectUsers = self.rejectUsers.id
|
|
1916
|
+
}
|
|
1849
1917
|
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
1850
1918
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
1851
1919
|
let result = resp.data
|
|
@@ -2071,8 +2139,31 @@ export default {
|
|
|
2071
2139
|
cancel() {
|
|
2072
2140
|
this.modal = false
|
|
2073
2141
|
this.auditResult = ''
|
|
2142
|
+
this.targetTaskNode = ''
|
|
2074
2143
|
this.rejectAttribute = 'inSequence'
|
|
2075
|
-
this.targetTaskNodeProcessControl = ''
|
|
2144
|
+
this.targetTaskNodeProcessControl = 'inSequence'
|
|
2145
|
+
this.showProcessControl = false
|
|
2146
|
+
this.showRejectToSelected = false
|
|
2147
|
+
this.selectedRejectUserList = []
|
|
2148
|
+
this.rejectUsers = { name: '全部办理人', id: 'all' }
|
|
2149
|
+
},
|
|
2150
|
+
rejectUserClose(actionType) {
|
|
2151
|
+
if (actionType === 'cancel') {
|
|
2152
|
+
this.selectedRejectUserList = []
|
|
2153
|
+
this.selectRejectUserModal = false
|
|
2154
|
+
return;
|
|
2155
|
+
}
|
|
2156
|
+
if (this.selectedRejectUserList.length === 0){
|
|
2157
|
+
this.rejectUsers = {
|
|
2158
|
+
name: '全部办理人',
|
|
2159
|
+
id: 'all'
|
|
2160
|
+
}
|
|
2161
|
+
this.selectRejectUserModal = false
|
|
2162
|
+
return
|
|
2163
|
+
}
|
|
2164
|
+
this.rejectUsers.name = this.selectedRejectUserList.map(item => item.auditName).join(',')
|
|
2165
|
+
this.rejectUsers.userId = this.selectedRejectUserList.map(item => item.auditId).join(',')
|
|
2166
|
+
this.selectRejectUserModal = false
|
|
2076
2167
|
},
|
|
2077
2168
|
reductionModalCancel() {
|
|
2078
2169
|
this.reductionMultitaskInstanceModal = false
|
|
@@ -2081,16 +2172,55 @@ export default {
|
|
|
2081
2172
|
rejectAttributesCancel() {
|
|
2082
2173
|
this.rejectAttributesBoxShow = false
|
|
2083
2174
|
this.rejectAttribute = 'inSequence'
|
|
2175
|
+
this.targetTaskNode = ''
|
|
2084
2176
|
this.loading = false
|
|
2085
2177
|
this.disable = false
|
|
2178
|
+
this.showProcessControl = false
|
|
2179
|
+
this.showRejectToSelected = false
|
|
2180
|
+
this.selectedRejectUserList = []
|
|
2181
|
+
this.rejectUsers = { name: '全部办理人', id: 'all' }
|
|
2086
2182
|
},
|
|
2087
2183
|
selectAssignee(selection) {
|
|
2088
2184
|
this.reductionAssigneeList = selection
|
|
2089
2185
|
},
|
|
2186
|
+
selectRejectUser(selection) {
|
|
2187
|
+
this.selectedRejectUserList = selection
|
|
2188
|
+
},
|
|
2090
2189
|
selectNode(currentRow, oldCurrentRow) {
|
|
2091
2190
|
let self = this
|
|
2092
2191
|
self.targetTaskNode = currentRow.taskNode
|
|
2192
|
+
self.rejectUsers = { name: '全部办理人', id: 'all' }
|
|
2093
2193
|
self.targetTaskNodeProcessControl = currentRow.processControl
|
|
2194
|
+
self.showRejectToSelected = currentRow.rejectToSelected
|
|
2195
|
+
},
|
|
2196
|
+
handleSelectRejectUser() {
|
|
2197
|
+
let self = this
|
|
2198
|
+
const params = {
|
|
2199
|
+
taskNode: self.targetTaskNode,
|
|
2200
|
+
applyId: self.applyId,
|
|
2201
|
+
}
|
|
2202
|
+
ajax.get(self.smartFlowServerContext + '/manage/processDone/getDoneDetail', {params}).then(function (resp) {
|
|
2203
|
+
if (resp.data.code === '200') {
|
|
2204
|
+
const data = resp.data.data.rows
|
|
2205
|
+
const latestAudit = data.reduce((max, current) => {
|
|
2206
|
+
return current.auditDate > max.auditDate ? current : max;
|
|
2207
|
+
});
|
|
2208
|
+
const seenNames = new Set();
|
|
2209
|
+
self.rejectUserList = data.filter(item => {
|
|
2210
|
+
if (item.parentExecutionId !== latestAudit.parentExecutionId) {
|
|
2211
|
+
return false;
|
|
2212
|
+
}
|
|
2213
|
+
if (seenNames.has(item.auditName)) {
|
|
2214
|
+
return false;
|
|
2215
|
+
}
|
|
2216
|
+
seenNames.add(item.auditName);
|
|
2217
|
+
return true;
|
|
2218
|
+
});
|
|
2219
|
+
self.selectRejectUserModal = true
|
|
2220
|
+
} else {
|
|
2221
|
+
self.$Message.error(resp.data.message)
|
|
2222
|
+
}
|
|
2223
|
+
})
|
|
2094
2224
|
},
|
|
2095
2225
|
getAllPreNodes() {
|
|
2096
2226
|
let self = this
|
|
@@ -2377,6 +2507,10 @@ export default {
|
|
|
2377
2507
|
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessAttributes', {params: params}).then(function (resp) {
|
|
2378
2508
|
if (resp.data.code === '200') {
|
|
2379
2509
|
if ((self.auditParams.auditResult == '70' && !resp.data.data.jumpFirstNode) || (self.auditParams.auditResult == '40' && (resp.data.data.multiNode || resp.data.data.preNodeGateway))) {
|
|
2510
|
+
if (self.showRejectToSelected && self.targetTaskNode) {
|
|
2511
|
+
self.rejectAttributesBoxShow = true
|
|
2512
|
+
return
|
|
2513
|
+
}
|
|
2380
2514
|
self.doPass()
|
|
2381
2515
|
return
|
|
2382
2516
|
} else {
|
|
@@ -2422,9 +2556,8 @@ export default {
|
|
|
2422
2556
|
)
|
|
2423
2557
|
}
|
|
2424
2558
|
}
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
} else if (self.auditParams.auditResult == '70' || self.auditParams.auditResult == '40') {
|
|
2559
|
+
self.showProcessControl = self.rejectAttributeList.length > 0 && self.handleButtons && self.handleButtons.includes('rejectProcessControl')
|
|
2560
|
+
if (self.auditParams.auditResult == '70' || self.auditParams.auditResult == '40') {
|
|
2428
2561
|
self.rejectAttributesBoxShow = self.handleButtons && self.handleButtons.includes('rejectProcessControl')
|
|
2429
2562
|
}
|
|
2430
2563
|
}
|