n20-common-lib 1.3.67 → 1.3.68-0.1

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": "1.3.67",
3
+ "version": "1.3.680.1",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -56,7 +56,6 @@
56
56
  "@vue/cli-plugin-babel": "~4.5.0",
57
57
  "@vue/cli-plugin-eslint": "~4.5.0",
58
58
  "@vue/cli-service": "~4.5.0",
59
- "@vue/compiler-sfc": "^3.2.38",
60
59
  "babel-eslint": "^10.1.0",
61
60
  "babel-plugin-component": "^1.1.1",
62
61
  "clipboard": "^2.0.11",
@@ -76,7 +75,7 @@
76
75
  "md2vue-loader": "git+https://gitee.com/bable2000/md2vue-loader.git",
77
76
  "mockjs": "^1.1.0",
78
77
  "node-sass": "6.0.0",
79
- "nstc-get-i18n": "^0.0.1",
78
+ "nstc-get-i18n": "^0.0.3",
80
79
  "qiankun": "^2.5.1",
81
80
  "sass-loader": "^10.2.0",
82
81
  "screenfull": "^5.1.0",
@@ -63,6 +63,5 @@
63
63
  font-weight: initial;
64
64
  font-size: $--font-size-base;
65
65
  color: $--color-text-regular;
66
- padding: 12px;
67
66
  }
68
67
  }
@@ -1,7 +1,24 @@
1
1
  /* 审批按钮组 */
2
2
  <template>
3
3
  <div>
4
- <el-form label-position="left" label-width="5em">
4
+ <el-form label-position="right" label-width="5em">
5
+ <div class="flex-box">
6
+ <div v-if="authList.includes('isCarboncopy')" class="flex-1">
7
+ <el-form-item label="抄送">
8
+ <el-input
9
+ :value="carbonCopyList.map((c) => c.uname).join(', ')"
10
+ type="textarea"
11
+ :autosize="{ minRows: 1 }"
12
+ @focus="setCarboncopyV = true"
13
+ />
14
+ </el-form-item>
15
+ </div>
16
+ <div v-if="authList.includes('加签')" class="flex-1">
17
+ <el-form-item label="加签">
18
+ <el-input type="textarea" :autosize="{ minRows: 1 }" />
19
+ </el-form-item>
20
+ </div>
21
+ </div>
5
22
  <el-form-item label="审批意见" :error="errMsg">
6
23
  <el-input
7
24
  ref="msg-input"
@@ -22,6 +39,9 @@
22
39
  <el-button v-if="authList.includes('discard')" type="danger" plain @click="discardFn">作 废</el-button>
23
40
  <el-button plain @click="goFrom">返 回</el-button>
24
41
  </div>
42
+ <cl-dialog v-drag :visible.sync="setCarboncopyV" title="设置抄送用户" width="900px" append-to-body top="7.5vh">
43
+ <carboncopy-prop :carbon-copy-list="carbonCopyList" @close="setCarboncopyV = false" @confirm="setCarboncopyOk" />
44
+ </cl-dialog>
25
45
  </div>
26
46
  </template>
27
47
 
@@ -29,9 +49,15 @@
29
49
  import axios from '../../utils/axios'
30
50
  import { linkGo } from '../../utils/urlToGo'
31
51
  import { closeTagsForBackPage } from '../../plugins/CompatibleOld'
52
+ import ClDialog from '../Dialog'
53
+ import CarboncopyProp from './setCarboncopyProp.vue'
32
54
 
33
55
  export default {
34
56
  name: 'ApprovalButtons',
57
+ components: {
58
+ ClDialog,
59
+ CarboncopyProp
60
+ },
35
61
  props: {
36
62
  message: {
37
63
  type: String,
@@ -59,7 +85,9 @@ export default {
59
85
  errMsg: undefined,
60
86
  taskId: '',
61
87
  taskDefKey: '',
62
- authList: []
88
+ authList: [],
89
+ setCarboncopyV: false,
90
+ carbonCopyList: []
63
91
  }
64
92
  },
65
93
  computed: {
@@ -125,7 +153,8 @@ export default {
125
153
  message: this.messageC,
126
154
  formData: JSON.stringify(this.formData),
127
155
  signText: this.signText,
128
- isAgentcy: isAgentcy
156
+ isAgentcy: isAgentcy,
157
+ carbonCopyUserDtoList: this.carbonCopyList.map((c) => ({ userNo: c.uno, userName: c.uname }))
129
158
  }
130
159
  ]
131
160
  },
@@ -208,6 +237,11 @@ export default {
208
237
  this.thenMsg(data, '作废')
209
238
  })
210
239
  })
240
+ },
241
+ setCarboncopyOk(list) {
242
+ this.carbonCopyList = list
243
+
244
+ this.setCarboncopyV = false
211
245
  }
212
246
  }
213
247
  }
@@ -0,0 +1,117 @@
1
+ <template>
2
+ <cl-page style="height: 75vh">
3
+ <div slot="header" class="flex-box flex-v m-b">
4
+ <span class="m-r-ss">单位名称</span>
5
+ <span>
6
+ <el-input v-model="searchObj.cltName" size="mini" />
7
+ </span>
8
+ <span class="m-l m-r-ss">姓名</span>
9
+ <span>
10
+ <el-input v-model="searchObj.uname" size="mini" />
11
+ </span>
12
+ <span class="m-l m-r-ss">用户编号</span>
13
+ <span>
14
+ <el-input v-model="searchObj.uno" size="mini" />
15
+ </span>
16
+ <el-button class="m-l-auto" plain size="mini" @click="searchFn">查询</el-button>
17
+ </div>
18
+
19
+ <el-table
20
+ ref="elTable"
21
+ :key="elTableKey"
22
+ :data="nodeTable"
23
+ row-key="uno"
24
+ border
25
+ height="100%"
26
+ @select="sltChange"
27
+ @select-all="sltChange"
28
+ >
29
+ <el-table-column :reserve-selection="true" type="selection" width="46" header-align="center" align="center" />
30
+ <el-table-column prop="uno" label="编号" header-align="center" align="center" />
31
+ <el-table-column prop="uname" label="姓名" header-align="center" align="center" />
32
+ <el-table-column prop="cltName" label="单位" header-align="center" align="center" />
33
+ </el-table>
34
+ <template slot="footer">
35
+ <div class="flex-box flex-r m-t m-b">
36
+ <cl-pagination
37
+ :page-obj="pageObj"
38
+ :page-key="{ no: 'pageNum', size: 'pageSize', total: 'totalSize' }"
39
+ @change="getList"
40
+ />
41
+ </div>
42
+ <div class="text-c">
43
+ <el-button type="primary" @click="confirmFn">确 定</el-button>
44
+ <el-button @click="$emit('close')">取 消</el-button>
45
+ </div>
46
+ </template>
47
+ </cl-page>
48
+ </template>
49
+
50
+ <script>
51
+ import ClPage from '../PageLayout/page.vue'
52
+ import ClPagination from '../Pagination/index.vue'
53
+ export default {
54
+ components: {
55
+ ClPage,
56
+ ClPagination
57
+ },
58
+ props: {
59
+ carbonCopyList: {
60
+ type: Array,
61
+ default: () => []
62
+ }
63
+ },
64
+ data() {
65
+ return {
66
+ nodeTable: [],
67
+ searchObj: {
68
+ uno: undefined,
69
+ uname: undefined,
70
+ cltName: undefined,
71
+ roleName: undefined
72
+ },
73
+ pageObj: {
74
+ pageNum: 1,
75
+ pageSize: 10,
76
+ totalSize: 0
77
+ },
78
+ selectArr: [],
79
+ elTableKey: 0
80
+ }
81
+ },
82
+ mounted() {
83
+ this.$refs.elTable.clearSelection()
84
+ this.carbonCopyList.forEach((item) => {
85
+ this.$refs.elTable.toggleRowSelection(item, true)
86
+ })
87
+
88
+ this.pageObj = { pageNum: 1, pageSize: 10, totalSize: 0 }
89
+ this.getList()
90
+ },
91
+ methods: {
92
+ getList() {
93
+ this.$axios
94
+ .post('/bems/activiti/online/chdUserInfo', {
95
+ data: this.searchObj,
96
+ ...this.pageObj
97
+ })
98
+ .then(({ data }) => {
99
+ this.nodeTable = data.list
100
+ this.pageObj.totalSize = data.totalSize
101
+ })
102
+ },
103
+ searchFn() {
104
+ this.pageObj.pageNum = 1
105
+ this.getList()
106
+ },
107
+ sltChange(list) {
108
+ this.selectArr = list || []
109
+ },
110
+ confirmFn() {
111
+ this.$emit('confirm', this.selectArr)
112
+ }
113
+ }
114
+ }
115
+ </script>
116
+
117
+ <style></style>
@@ -27,9 +27,10 @@
27
27
  >
28
28
  </div>
29
29
  </div>
30
- <div v-if="item.suggestion" class="n20-description-c">
30
+ <div v-if="item.suggestion" class="n20-description-c m-t">
31
31
  {{ item.suggestion }}
32
32
  </div>
33
+ <div v-if="item.ccUserName" class="n20-description-c m-t">抄送人:{{ item.ccUserName }}</div>
33
34
  </div>
34
35
  </el-timeline-item>
35
36
  </el-timeline>
@@ -102,7 +103,8 @@ export default {
102
103
  let _item = {
103
104
  endTime: item.endTime || '',
104
105
  assignee: item.assignee,
105
- suggestion: item.suggestion
106
+ suggestion: item.suggestion,
107
+ ccUserName: item.ccUserName // 抄送人
106
108
  }
107
109
 
108
110
  if (item.taskName === '开始') {
@@ -34,32 +34,32 @@
34
34
  }}</span>
35
35
  <el-button type="text" icon="el-icon-full-screen" style="font-size: 16px" @click="scaleReset" />
36
36
  </div>
37
- <span v-title></span>
38
- <div ref="msgEl" class="activiti-msg">
39
- <div v-if="assignee">{{ assignee }}</div>
40
- <div v-else-if="assigneeEnd">
41
- <table cellspacing="0" class="m-t-ss m-b-ss" style="border-collapse: collapse; min-width: 460px">
42
- <tr>
43
- <td class="text-c">已审批人</td>
44
- <td class="text-c">审批类型</td>
45
- <td class="text-c">审批意见</td>
46
- <td class="text-c">审批时间</td>
47
- </tr>
48
- <tr v-for="(item, i) in assigneeEnd" :key="i">
49
- <td>{{ item.assignee }}</td>
50
- <td class="text-c">{{ item.optResult }}</td>
51
- <td>{{ item.suggestion }}</td>
52
- <td>{{ item.endTime }}</td>
53
- </tr>
54
- </table>
37
+ <el-popover ref="title-pop" v-model="msgV" trigger="manual" placement="top">
38
+ <div class="activiti-msg">
39
+ <div v-if="assigneeEnd" class="m-t-ss m-b-ss">
40
+ <table cellspacing="0" style="border-collapse: collapse; min-width: 460px">
41
+ <tr>
42
+ <td class="text-c">已审批人</td>
43
+ <td class="text-c">审批类型</td>
44
+ <td class="text-c">审批意见</td>
45
+ <td class="text-c">审批时间</td>
46
+ </tr>
47
+ <tr v-for="(item, i) in assigneeEnd" :key="i">
48
+ <td>{{ item.assignee }}</td>
49
+ <td class="text-c">{{ item.optResult }}</td>
50
+ <td>{{ item.suggestion }}</td>
51
+ <td>{{ item.endTime }}</td>
52
+ </tr>
53
+ </table>
54
+ </div>
55
+ <div v-if="assignee" :class="{ 'm-t-s': assigneeEnd }">{{ assignee }}</div>
55
56
  </div>
56
- </div>
57
+ </el-popover>
57
58
  </div>
58
59
  </template>
59
60
 
60
61
  <script>
61
62
  import importG from '../../../utils/importGlobal.js'
62
- import { tipShow, tipHide } from '../../../directives/VTitle/index.js'
63
63
  export default {
64
64
  filters: {
65
65
  zoomFormat(val) {
@@ -75,13 +75,15 @@ export default {
75
75
  data() {
76
76
  this.svgW = undefined
77
77
  this.svgC = undefined
78
+ this.markerId = ''
78
79
  return {
79
80
  assignee: undefined,
80
81
  assigneeEnd: undefined,
81
82
  min: 0.4,
82
83
  max: 2,
83
84
  step: 0.1,
84
- zoomValue: 1
85
+ zoomValue: 1,
86
+ msgV: false
85
87
  }
86
88
  },
87
89
  watch: {
@@ -92,7 +94,7 @@ export default {
92
94
  async mounted() {
93
95
  this.svgW = this.$refs['activiti-svg-wrap']
94
96
 
95
- let { flowString, seqRecords, taskDefIdMap, currentActivityId, currentAssigneeName } = this.dataPro
97
+ let { flowString, seqRecords, taskDefIdMap = {}, currAssMap = {}, currentActivityIdList = [] } = this.dataPro
96
98
  let flowSvg = flowString
97
99
  if (flowString.includes('bpmn2:definitions')) {
98
100
  let { default: bpmn2svg } = await importG('bpmn2svg', () =>
@@ -105,12 +107,17 @@ export default {
105
107
  seqRecords.forEach((obj) => {
106
108
  this.setTaskRecord(obj)
107
109
  })
108
- for (let k in taskDefIdMap) {
109
- this.addEvent(k, taskDefIdMap[k])
110
- }
111
- if (currentActivityId) {
112
- this.addEvent(currentActivityId, currentAssigneeName, 'pending')
110
+ currentActivityIdList.forEach((currentActivityId) => {
111
+ let assignee = currAssMap[currentActivityId]
112
+ let assigneeEnd = taskDefIdMap[currentActivityId]
113
+ taskDefIdMap[currentActivityId] = undefined
114
+
115
+ this.addEvent(currentActivityId, { assignee, assigneeEnd }, 'pending')
116
+
113
117
  this.svgW.querySelector(`[data-element-id="${currentActivityId}"]`).classList.add('activiti-node-at')
118
+ })
119
+ for (let k in taskDefIdMap) {
120
+ taskDefIdMap[k] && this.addEvent(k, taskDefIdMap[k])
114
121
  }
115
122
  } catch (error) {
116
123
  console.log('setTaskErr:', error)
@@ -132,7 +139,11 @@ export default {
132
139
  this.zoomValue = scale
133
140
  })
134
141
  },
142
+ deactivated() {
143
+ this.msgV = false
144
+ },
135
145
  beforeDestroy() {
146
+ this.msgV = false
136
147
  this.svgPanzoom && this.svgPanzoom.dispose()
137
148
  },
138
149
  methods: {
@@ -148,6 +159,9 @@ export default {
148
159
  this.svgC.setAttribute('width', Number(width) + 10)
149
160
  this.svgC.setAttribute('height', Number(height) + 10)
150
161
  this.svgC.setAttribute('viewBox', viewBox)
162
+
163
+ let marker = this.svgC.querySelector('defs marker')
164
+ marker && (this.markerId = marker.getAttribute('id'))
151
165
  },
152
166
  setTaskRecord(obj) {
153
167
  let { resouceTaskDefId: from, targetTaskDefId: to, seqDefid: line, type: type } = obj
@@ -176,6 +190,7 @@ export default {
176
190
  let path = document.createElementNS('http://www.w3.org/2000/svg', 'path')
177
191
  path.setAttribute('class', 'activiti-line-reject')
178
192
  path.setAttribute('d', d)
193
+ path.style.markerEnd = `url('#${this.markerId}')`
179
194
  this.svgC.appendChild(path)
180
195
 
181
196
  if (msg) {
@@ -218,24 +233,24 @@ export default {
218
233
  }
219
234
  return rect
220
235
  },
221
- addEvent(id, list = [], type) {
236
+ addEvent(id, list, type) {
222
237
  let task = this.svgW.querySelector(`[data-element-id="${id}"]`)
223
238
  task.addEventListener('mouseenter', () => {
224
239
  if (type === 'pending') {
225
- this.assignee = list
226
- this.assigneeEnd = undefined
240
+ this.assignee = list.assignee
241
+ this.assigneeEnd = list.assigneeEnd
227
242
  } else {
228
243
  this.assignee = undefined
229
244
  this.assigneeEnd = list
230
245
  }
231
246
  this.$nextTick(() => {
232
- setTimeout(() => {
233
- tipShow(task, this.$refs['msgEl'])
234
- }, 100)
247
+ this.$refs['title-pop'].doDestroy()
248
+ this.$refs['title-pop'].referenceElm = task
249
+ this.msgV = true
235
250
  })
236
251
  })
237
252
  task.addEventListener('mouseleave', () => {
238
- tipHide(task)
253
+ this.msgV = false
239
254
  })
240
255
  },
241
256
  scaleMinus() {
@@ -368,14 +383,13 @@ setRejectLink(from, to) {
368
383
  height: 100%;
369
384
  overflow: auto;
370
385
  }
371
- .n20-approval-img-por .activiti-msg {
372
- display: none;
373
- }
386
+
374
387
  .activiti-msg th,
375
388
  .activiti-msg td {
376
389
  padding: 6px 8px;
377
- border: 1px solid var(--border-color-light);
390
+ border: 1px solid var(--border-color-base);
378
391
  }
392
+
379
393
  .activiti-svg-zoom {
380
394
  position: absolute;
381
395
  z-index: 9;
@@ -35,30 +35,22 @@ function tipInit(Vue) {
35
35
  }).$mount(el)
36
36
  }
37
37
 
38
- export function tipShow(el, popC) {
39
- let _C = undefined
40
- if (popC) {
41
- _C = popC
42
- } else if (el.$tooltipTitle) {
38
+ function tipShow(el) {
39
+ let text = undefined
40
+ if (el.$tooltipTitle) {
43
41
  if (!el.$tooltipTitleOverflow || el.clientWidth < el.scrollWidth) {
44
- _C = el.$tooltipTitle
42
+ text = el.$tooltipTitle
45
43
  }
46
44
  } else {
47
45
  let _input = el.querySelector('.el-input__inner')
48
46
  if (_input && _input.clientWidth < _input.scrollWidth) {
49
- _C = _input.value
47
+ text = _input.value
50
48
  }
51
49
  }
52
50
 
53
- if (_C) {
51
+ if (text) {
54
52
  let popEl = document.querySelector('.' + popClass)
55
- if (_C.nodeName) {
56
- popEl.innerText = ''
57
- _C = _C.cloneNode(true)
58
- popEl.appendChild(_C)
59
- } else {
60
- popEl.innerText = _C
61
- }
53
+ popEl.innerText = text
62
54
 
63
55
  if (tooltip.$refs['title-pop'].referenceElm !== el) {
64
56
  tooltip.$refs['title-pop'].doDestroy()
@@ -69,7 +61,7 @@ export function tipShow(el, popC) {
69
61
  }
70
62
  }
71
63
 
72
- export function tipHide(el) {
64
+ function tipHide(el) {
73
65
  if (tooltip.$refs['title-pop'].referenceElm === el) {
74
66
  tooltip.visible = false
75
67
  }