n20-common-lib 2.22.51 → 2.22.52

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.22.51",
3
+ "version": "2.22.52",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -231,7 +231,7 @@ export default {
231
231
  this.setSvgAttrs(flowSvg)
232
232
  this.setPendingUserInfo(unApplayUserTaskCandidate)
233
233
  this.bindTaskEvents({ currentActivityIdList, currAssMap, taskDefIdMap, addTask, addTaskPre, seqRecords })
234
- await this.initPanzoom()
234
+ await this.initPanZoom()
235
235
  document.body.addEventListener('click', this.addTaskFn)
236
236
  },
237
237
 
@@ -266,48 +266,49 @@ export default {
266
266
  this.setTaskRecord(obj)
267
267
  })
268
268
 
269
- // 非加签节点添加事件
270
- currentActivityIdList.forEach((currentActivityId) => {
271
- let assignee = currAssMap[currentActivityId]
272
- let assigneeEnd = taskDefIdMap[currentActivityId]
273
- let task = this.svgW.querySelector(`[data-element-id="${currentActivityId}"]`)
274
- if (task) {
275
- task.classList.add('activiti-node-at')
276
- if (!currentActivityId.includes('@addTaskType')) {
277
- this.addEvent(task, { assignee, assigneeEnd }, 'pending')
269
+ // 非加签节点添加事件
270
+ currentActivityIdList.forEach((currentActivityId) => {
271
+ let assignee = currAssMap[currentActivityId]
272
+ let assigneeEnd = taskDefIdMap[currentActivityId]
273
+ let task = this.svgW.querySelector(`[data-element-id="${currentActivityId}"]`)
274
+ if (task) {
275
+ task.classList.add('activiti-node-at')
276
+ if (!currentActivityId.includes('@addTaskType')) {
277
+ this.addEvent(task, { assignee, assigneeEnd }, 'pending')
278
+ }
278
279
  }
279
- }
280
- })
281
- for (let k in currAssMap) {
282
- let submitter = currAssMap[k]
283
- if (
284
- !currentActivityIdList.includes(k) &&
285
- !k.includes('@addTaskType') &&
286
- typeof submitter === 'string' &&
287
- submitter.trim()
288
- ) {
289
- let taskK = this.svgW.querySelector(`[data-element-id="${k}"]`)
290
- if (taskK) {
291
- this.addEvent(taskK, { assignee: `${$lc('发起人')}:${submitter.trim()}` }, 'pending')
280
+ })
281
+ for (let k in currAssMap) {
282
+ let submitter = currAssMap[k]
283
+ if (
284
+ !currentActivityIdList.includes(k) &&
285
+ !k.includes('@addTaskType') &&
286
+ typeof submitter === 'string' &&
287
+ submitter.trim()
288
+ ) {
289
+ let taskK = this.svgW.querySelector(`[data-element-id="${k}"]`)
290
+ if (taskK) {
291
+ this.addEvent(taskK, { assignee: `${$lc('发起人')}:${submitter.trim()}` }, 'pending')
292
+ }
292
293
  }
293
294
  }
294
- }
295
- for (let k in taskDefIdMap) {
296
- if (!currentActivityIdList.includes(k)) {
297
- let taskK = this.svgW.querySelector(`[data-element-id="${k}"]`)
298
- if (taskK) {
299
- if (!k.includes('@addTaskType')) {
300
- this.addEvent(taskK, taskDefIdMap[k])
301
- this.addChildEvent(taskK, taskDefIdMap[k])
295
+ for (let k in taskDefIdMap) {
296
+ if (!currentActivityIdList.includes(k)) {
297
+ let taskK = this.svgW.querySelector(`[data-element-id="${k}"]`)
298
+ if (taskK) {
299
+ if (!k.includes('@addTaskType')) {
300
+ this.addEvent(taskK, taskDefIdMap[k])
301
+ this.addChildEvent(taskK, taskDefIdMap[k])
302
+ }
302
303
  }
303
304
  }
304
305
  }
306
+ } catch (error) {
307
+ console.warn('setTaskErr:', error)
305
308
  }
306
- } catch (error) {
307
- console.warn('setTaskErr:', error)
308
- }
309
-
310
- let { default: panzoom } = await importG('panzoom', () => import(/*webpackChunkName: "panzoom"*/ 'panzoom'))
309
+ },
310
+ async initPanZoom() {
311
+ let { default: panzoom } = await importG('panzoom', () => import(/*webpackChunkName: "panzoom"*/ 'panzoom'))
311
312
 
312
313
  this.svgPanzoom = panzoom(this.svgElement, {
313
314
  maxZoom: this.max,