n20-common-lib 2.2.27 → 2.2.29
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/ApprovalButtons/index.vue +39 -2
- package/src/components/ApprovalButtons/setCarboncopyProp.vue +6 -1
- package/src/components/ApprovalRecord/approvalImg.vue +14 -0
- package/src/components/ApprovalRecord/approvalImgPro/index.vue +35 -14
- package/src/components/ApprovalRecord/index.vue +13 -6
- package/src/components/TableOperateColumn/OperateBtns.vue +1 -0
- package/src/index.js +3 -0
package/package.json
CHANGED
|
@@ -23,9 +23,21 @@
|
|
|
23
23
|
</el-tooltip>
|
|
24
24
|
</label>
|
|
25
25
|
<div class="flex-box">
|
|
26
|
+
<el-select
|
|
27
|
+
v-if="preAddTask"
|
|
28
|
+
v-model="addTaskWay"
|
|
29
|
+
class="m-r-ss"
|
|
30
|
+
clearable
|
|
31
|
+
:placeholder="'请选择加签类型' | $lc"
|
|
32
|
+
style="width: 10em"
|
|
33
|
+
@change="() => addTaskWay === '2' && addTaskType === '2' && (addTaskType = '3')"
|
|
34
|
+
>
|
|
35
|
+
<el-option :label="'向前加签' | $lc" value="2" />
|
|
36
|
+
<el-option :label="'向后加签' | $lc" value="1" />
|
|
37
|
+
</el-select>
|
|
26
38
|
<el-select v-model="addTaskType" clearable :placeholder="'请选择审批方式' | $lc" style="width: 10em">
|
|
27
39
|
<!-- <el-option :label="'普通节点' | $lc" value="1" /> -->
|
|
28
|
-
<el-option :label="'会签并行' | $lc" value="2" />
|
|
40
|
+
<el-option :label="'会签并行' | $lc" value="2" :disabled="addTaskWay === '2'" />
|
|
29
41
|
<el-option :label="'普通串行' | $lc" value="3" />
|
|
30
42
|
</el-select>
|
|
31
43
|
<el-input
|
|
@@ -199,6 +211,8 @@ export default {
|
|
|
199
211
|
setAddtaskV: false,
|
|
200
212
|
addTaskList: [],
|
|
201
213
|
addTaskType: undefined,
|
|
214
|
+
preAddTask: false,
|
|
215
|
+
addTaskWay: undefined,
|
|
202
216
|
rejectToV: false,
|
|
203
217
|
approvalToV: false,
|
|
204
218
|
showApprovalTo: false,
|
|
@@ -226,6 +240,7 @@ export default {
|
|
|
226
240
|
this.getBtns()
|
|
227
241
|
this.getShowApprovalTo()
|
|
228
242
|
this.getHasQueryAppOpiAndUser()
|
|
243
|
+
this.getHasPreAddTask()
|
|
229
244
|
},
|
|
230
245
|
methods: {
|
|
231
246
|
// 换回到发起页
|
|
@@ -273,6 +288,21 @@ export default {
|
|
|
273
288
|
})
|
|
274
289
|
}
|
|
275
290
|
},
|
|
291
|
+
// 刺探是否具有向前加签功能
|
|
292
|
+
getHasPreAddTask() {
|
|
293
|
+
if (this.showBtn && window._approvalExtend['appOpi.addTaskWay.exist'] === undefined) {
|
|
294
|
+
axios
|
|
295
|
+
.get('/bems/activiti/online/addTaskWay', null, { loading: false, noMsg: true })
|
|
296
|
+
.then(() => {
|
|
297
|
+
this.preAddTask = window._approvalExtend['appOpi.addTaskWay.exist'] = true
|
|
298
|
+
})
|
|
299
|
+
.catch(() => {
|
|
300
|
+
window._approvalExtend['appOpi.addTaskWay.exist'] = false
|
|
301
|
+
})
|
|
302
|
+
} else {
|
|
303
|
+
this.preAddTask = window._approvalExtend['appOpi.addTaskWay.exist']
|
|
304
|
+
}
|
|
305
|
+
},
|
|
276
306
|
// 刺探审批意见接口是否存在
|
|
277
307
|
getHasQueryAppOpiAndUser() {
|
|
278
308
|
if (this.showBtn && window._approvalExtend['appOpi.queryAppOpiAndUser.exist'] === undefined) {
|
|
@@ -304,6 +334,7 @@ export default {
|
|
|
304
334
|
carbonCopyUserDtoList: this.carbonCopyList.map((c) => ({ userNo: c.uno, userName: c.uname })),
|
|
305
335
|
addTaskList: this.addTaskList.map((c) => ({ userNo: c.uno, userName: c.uname })),
|
|
306
336
|
addTaskType: this.addTaskType,
|
|
337
|
+
addTaskWay: this.addTaskWay,
|
|
307
338
|
...this.otherAtt
|
|
308
339
|
}
|
|
309
340
|
]
|
|
@@ -434,7 +465,13 @@ export default {
|
|
|
434
465
|
},
|
|
435
466
|
setAddtaskOk(list) {
|
|
436
467
|
this.addTaskList = list
|
|
437
|
-
if (this.addTaskList.length > 0 && !this.addTaskType)
|
|
468
|
+
if (this.addTaskList.length > 0 && !this.addTaskType) {
|
|
469
|
+
if (this.addTaskWay === '2') {
|
|
470
|
+
this.addTaskType = '3'
|
|
471
|
+
} else {
|
|
472
|
+
this.addTaskType = '2'
|
|
473
|
+
}
|
|
474
|
+
}
|
|
438
475
|
|
|
439
476
|
this.setAddtaskV = false
|
|
440
477
|
}
|
|
@@ -147,7 +147,12 @@ export default {
|
|
|
147
147
|
},
|
|
148
148
|
closeFn(item) {
|
|
149
149
|
this.selectArr = this.selectArr.filter((d) => d.uno !== item.uno)
|
|
150
|
-
|
|
150
|
+
|
|
151
|
+
this.$refs.elTable.clearSelection()
|
|
152
|
+
this.selectArr.forEach((row) => {
|
|
153
|
+
this.$refs.elTable.toggleRowSelection(row)
|
|
154
|
+
})
|
|
155
|
+
this.nodeTable = [...this.nodeTable]
|
|
151
156
|
},
|
|
152
157
|
confirmFn() {
|
|
153
158
|
this.$emit('confirm', this.selectArr)
|
|
@@ -64,6 +64,20 @@ export default {
|
|
|
64
64
|
{ noMsg: true, loading: !this.hideLoading }
|
|
65
65
|
)
|
|
66
66
|
.then((res) => {
|
|
67
|
+
// 区分后加签还是前加签(addTaskPreItem)
|
|
68
|
+
if (res.data && res.data.addTask) {
|
|
69
|
+
let addTaskPre = {}
|
|
70
|
+
for (let k in res.data.addTask) {
|
|
71
|
+
let item = res.data.addTask[k]
|
|
72
|
+
let addTaskPreItem = item.filter((c) => /@2@addTaskType$/.test(c.addTaskDefId))
|
|
73
|
+
|
|
74
|
+
if (addTaskPreItem.length) {
|
|
75
|
+
addTaskPre[k] = addTaskPreItem
|
|
76
|
+
delete res.data.addTask[k]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
res.data['addTaskPre'] = addTaskPre
|
|
80
|
+
}
|
|
67
81
|
this.dataPro = res.data
|
|
68
82
|
})
|
|
69
83
|
.catch((err) => {
|
|
@@ -169,7 +169,8 @@ export default {
|
|
|
169
169
|
taskDefIdMap = {},
|
|
170
170
|
currAssMap = {},
|
|
171
171
|
currentActivityIdList = [],
|
|
172
|
-
addTask = {}
|
|
172
|
+
addTask = {},
|
|
173
|
+
addTaskPre = {}
|
|
173
174
|
} = this.dataPro
|
|
174
175
|
let flowSvg = flowString
|
|
175
176
|
if (flowString.includes('bpmn2:definitions')) {
|
|
@@ -186,6 +187,12 @@ export default {
|
|
|
186
187
|
this.addNode(k, line, addTask[k])
|
|
187
188
|
}
|
|
188
189
|
}
|
|
190
|
+
for (let k in addTaskPre) {
|
|
191
|
+
let g = this.svgW.querySelector(`[data-element-id="${k}"]`)
|
|
192
|
+
if (g) {
|
|
193
|
+
this.addNode(k, g, addTaskPre[k], 'addTaskPre')
|
|
194
|
+
}
|
|
195
|
+
}
|
|
189
196
|
|
|
190
197
|
seqRecords.forEach((obj) => {
|
|
191
198
|
this.setTaskRecord(obj)
|
|
@@ -415,21 +422,35 @@ export default {
|
|
|
415
422
|
}
|
|
416
423
|
return rect
|
|
417
424
|
},
|
|
418
|
-
addNode(id, line, list) {
|
|
419
|
-
let D = line.getAttribute('d')
|
|
420
|
-
let Ds = D.replace(/\s+/g, '')
|
|
421
|
-
.split(/[A-z]/)
|
|
422
|
-
.filter((d) => !!d)
|
|
423
|
-
|
|
425
|
+
addNode(id, line, list, addType) {
|
|
424
426
|
let centreD
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
427
|
+
|
|
428
|
+
// 前加签,"加号"位置
|
|
429
|
+
if (addType === 'addTaskPre') {
|
|
430
|
+
let matrix = line.getAttribute('transform')
|
|
431
|
+
if (matrix) {
|
|
432
|
+
matrix = matrix.replace(/matrix\(|\)/g, '')
|
|
433
|
+
matrix = matrix.split(' ')
|
|
434
|
+
let left = Number(matrix[4])
|
|
435
|
+
let top = Number(matrix[5])
|
|
436
|
+
centreD = [left + 100, top]
|
|
437
|
+
}
|
|
438
|
+
} else {
|
|
439
|
+
let D = line.getAttribute('d')
|
|
440
|
+
let Ds = D.replace(/\s+/g, '')
|
|
441
|
+
.split(/[A-z]/)
|
|
442
|
+
.filter((d) => !!d)
|
|
443
|
+
|
|
444
|
+
if (Ds.length === 2) {
|
|
445
|
+
let Ds1 = Ds[0].split(',')
|
|
446
|
+
let Ds2 = Ds[1].split(',')
|
|
447
|
+
centreD = [(Number(Ds1[0]) + Number(Ds2[0])) / 2, (Number(Ds1[1]) + Number(Ds2[1])) / 2]
|
|
448
|
+
} else if (Ds.length > 2) {
|
|
449
|
+
let Ds2 = Ds[1].split(',')
|
|
450
|
+
centreD = [Number(Ds2[0]), Number(Ds2[1])]
|
|
451
|
+
}
|
|
432
452
|
}
|
|
453
|
+
|
|
433
454
|
if (centreD) {
|
|
434
455
|
let circleG = document.createElementNS('http://www.w3.org/2000/svg', 'g')
|
|
435
456
|
circleG.classList.add('activiti-node-achieve')
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
append-to-body
|
|
17
17
|
top="10vh"
|
|
18
18
|
>
|
|
19
|
-
<approvalCard class="p-a" :proc-inst-id="
|
|
19
|
+
<approvalCard class="p-a" :proc-inst-id="procInstIdC" style="height: 70vh; overflow: auto" />
|
|
20
20
|
</el-dialog>
|
|
21
21
|
<el-dialog
|
|
22
22
|
v-drag
|
|
@@ -27,11 +27,7 @@
|
|
|
27
27
|
append-to-body
|
|
28
28
|
top="10vh"
|
|
29
29
|
>
|
|
30
|
-
<approvalImg
|
|
31
|
-
class="text-c p-a"
|
|
32
|
-
:proc-inst-id="$route.query.processInstanceId"
|
|
33
|
-
style="height: 70vh; overflow: auto"
|
|
34
|
-
/>
|
|
30
|
+
<approvalImg class="text-c p-a" :proc-inst-id="procInstIdC" style="height: 70vh; overflow: auto" />
|
|
35
31
|
</el-dialog>
|
|
36
32
|
</div>
|
|
37
33
|
</template>
|
|
@@ -47,11 +43,22 @@ export default {
|
|
|
47
43
|
approvalCard,
|
|
48
44
|
approvalImg
|
|
49
45
|
},
|
|
46
|
+
props: {
|
|
47
|
+
procInstId: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: undefined
|
|
50
|
+
}
|
|
51
|
+
},
|
|
50
52
|
data() {
|
|
51
53
|
return {
|
|
52
54
|
cardV: false,
|
|
53
55
|
imgV: false
|
|
54
56
|
}
|
|
57
|
+
},
|
|
58
|
+
computed: {
|
|
59
|
+
procInstIdC() {
|
|
60
|
+
return this.procInstId || this.$route.query.processInstanceId
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
</script>
|
package/src/index.js
CHANGED
|
@@ -37,6 +37,7 @@ import FileUploadTable from './components/FileUploadTable/index.vue'
|
|
|
37
37
|
import FooterBox from './components/FooterBox/index.vue'
|
|
38
38
|
import Filters from './components/Filters/index.vue'
|
|
39
39
|
import Table from './components/Table/index.vue'
|
|
40
|
+
import TableOperate from './components/TableOperateColumn/OperateBtns.vue'
|
|
40
41
|
import TableOperateColumn from './components/TableOperateColumn/index.vue'
|
|
41
42
|
import TableSetSize from './components/TableSetSize'
|
|
42
43
|
import Button from './components/Button/index.vue'
|
|
@@ -152,6 +153,7 @@ const components = [
|
|
|
152
153
|
FooterBox,
|
|
153
154
|
Filters,
|
|
154
155
|
Table,
|
|
156
|
+
TableOperate,
|
|
155
157
|
TableOperateColumn,
|
|
156
158
|
TableSetSize,
|
|
157
159
|
Button,
|
|
@@ -289,6 +291,7 @@ export {
|
|
|
289
291
|
FooterBox,
|
|
290
292
|
Filters,
|
|
291
293
|
Table,
|
|
294
|
+
TableOperate,
|
|
292
295
|
TableOperateColumn,
|
|
293
296
|
TableSetSize,
|
|
294
297
|
Button,
|