n20-common-lib 2.2.29 → 2.2.30

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.2.29",
3
+ "version": "2.2.30",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -69,7 +69,7 @@ export default {
69
69
  let addTaskPre = {}
70
70
  for (let k in res.data.addTask) {
71
71
  let item = res.data.addTask[k]
72
- let addTaskPreItem = item.filter((c) => /@2@addTaskType$/.test(c.addTaskDefId))
72
+ let addTaskPreItem = item.filter((c) => /@2@addTaskType/.test(c.addTaskDefId))
73
73
 
74
74
  if (addTaskPreItem.length) {
75
75
  addTaskPre[k] = addTaskPreItem
@@ -198,24 +198,25 @@ export default {
198
198
  this.setTaskRecord(obj)
199
199
  })
200
200
 
201
+ // 非加签节点添加事件
201
202
  currentActivityIdList.forEach((currentActivityId) => {
202
203
  let assignee = currAssMap[currentActivityId]
203
204
  let assigneeEnd = taskDefIdMap[currentActivityId]
204
- taskDefIdMap[currentActivityId] = undefined
205
-
206
205
  let task = this.svgW.querySelector(`[data-element-id="${currentActivityId}"]`)
207
206
  if (task) {
208
207
  task.classList.add('activiti-node-at')
209
- !currentActivityId.includes('@addTaskType') && this.addEvent(task, { assignee, assigneeEnd }, 'pending')
210
- // this.addEvent(task, { assignee, assigneeEnd }, 'pending')
208
+ if (!currentActivityId.includes('@addTaskType')) {
209
+ this.addEvent(task, { assignee, assigneeEnd }, 'pending')
210
+ }
211
211
  }
212
212
  })
213
213
  for (let k in taskDefIdMap) {
214
- if (taskDefIdMap[k]) {
214
+ if (!currentActivityIdList.includes(k)) {
215
215
  let taskK = this.svgW.querySelector(`[data-element-id="${k}"]`)
216
216
  if (taskK) {
217
- !k.includes('@addTaskType') && this.addEvent(taskK, taskDefIdMap[k])
218
- // this.addEvent(taskK, taskDefIdMap[k])
217
+ if (!k.includes('@addTaskType')) {
218
+ this.addEvent(taskK, taskDefIdMap[k])
219
+ }
219
220
  }
220
221
  }
221
222
  }
@@ -475,7 +476,16 @@ export default {
475
476
  if (el.currentTarget.getAttribute('class').includes('activiti-node-reject')) {
476
477
  list.forEach((c) => (c.examineType = 'reject'))
477
478
  }
478
- this.addTaskList = list
479
+
480
+ // 合并驳回再次加签的节点
481
+ let _list = []
482
+ list.forEach((item) => {
483
+ if (!_list.some((_item) => _item.addTaskDefId === item.addTaskDefId)) {
484
+ _list.push(item)
485
+ }
486
+ })
487
+
488
+ this.addTaskList = _list
479
489
  this.addTaskV = false
480
490
  this.$nextTick(() => {
481
491
  this.$refs['addTask-pop'].doDestroy()