n20-common-lib 2.7.55 → 2.7.57
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
|
@@ -55,9 +55,77 @@
|
|
|
55
55
|
{{ '加签审批人:' | $lc }}{{ item.addTaskName }}
|
|
56
56
|
</div>
|
|
57
57
|
<template v-if="item.resultName !== '撤回' || showCtdMsg">
|
|
58
|
-
<div v-if="item.
|
|
58
|
+
<div v-if="item.subProcInitId" class="n20-description-c n20-description-bgc m-t p-a-s">
|
|
59
|
+
<span class="color-primary pointer" @click="seeApproveChild(item.subProcInitId)">{{item.suggestion}}<i class="n20-icon-shouqizhedie f-s-m"></i></span>
|
|
60
|
+
|
|
61
|
+
<div class="n20-approve-wrap-children" v-if="showChildTimeline">
|
|
62
|
+
<el-timeline :reverse="true">
|
|
63
|
+
<el-timeline-item v-for="(row, i) in approvalChildrenData" :key="i" :type="row | typeF(status)" :hide-timestamp="true">
|
|
64
|
+
<div class="n20-time">
|
|
65
|
+
<div>{{ row.endTime | dataF }}</div>
|
|
66
|
+
<div>{{ row.endTime | timeF }}</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div>
|
|
69
|
+
<div v-if="row.result === 0" class="flex-box flex-v">
|
|
70
|
+
<div v-title="row.assignee" class="w-full n20-worker p-r-s text-ellipsis" :show-overflow-tooltip="true">
|
|
71
|
+
{{ row.assignee }}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
<div v-if="row.result === 5" class="flex-box">
|
|
75
|
+
<div class="result-left-name" :class="row | typeF(status, 'color-')">{{ $lc(row.resultName) }}</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div v-else class="flex-box">
|
|
78
|
+
<div class="result-left-name" :class="row | typeF(status, 'color-')">{{ $lc(row.resultName) }}</div>
|
|
79
|
+
<div
|
|
80
|
+
v-title="row.assignee"
|
|
81
|
+
class="flex-box flex-item n20-worker m-r-s text-ellipsis"
|
|
82
|
+
:show-overflow-tooltip="true"
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
v-title="row.memberName"
|
|
86
|
+
:show-overflow-tooltip="true"
|
|
87
|
+
class="flex-item n20-worker m-r-s text-ellipsis"
|
|
88
|
+
style="width: 250px"
|
|
89
|
+
>
|
|
90
|
+
{{ row.memberName }}
|
|
91
|
+
</div>
|
|
92
|
+
<div
|
|
93
|
+
v-title="row.roleName"
|
|
94
|
+
class="flex-item n20-worker text-ellipsis"
|
|
95
|
+
:show-overflow-tooltip="true"
|
|
96
|
+
style="width: 250px"
|
|
97
|
+
>
|
|
98
|
+
{{ row.roleName }}
|
|
99
|
+
</div>
|
|
100
|
+
<div
|
|
101
|
+
v-if="row.result !== 0"
|
|
102
|
+
v-title="row.assignee"
|
|
103
|
+
class="n20-worker text-ellipsis"
|
|
104
|
+
style="width: 180px"
|
|
105
|
+
:show-overflow-tooltip="true"
|
|
106
|
+
>
|
|
107
|
+
<span class="worker-icon n20-icon-user"></span>{{ row.assignee }}
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<div v-if="row.ccUserName" class="n20-description-c m-t">{{ '抄送人:' | $lc }}{{ row.ccUserName }}</div>
|
|
112
|
+
<div v-if="row.addTaskName" class="n20-description-c m-t">
|
|
113
|
+
{{ '加签审批人:' | $lc }}{{ row.addTaskName }}
|
|
114
|
+
</div>
|
|
115
|
+
<template v-if="row.resultName !== '撤回' || showCtdMsg">
|
|
116
|
+
<div v-if="row.suggestion" class="n20-description-c n20-description-bgc m-t p-a-s">
|
|
117
|
+
<span v-if="row.result !== status.waiting">{{ '审批意见:' | $lc }}</span>
|
|
118
|
+
<span>{{ row.suggestion }} </span>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
121
|
+
</div>
|
|
122
|
+
</el-timeline-item>
|
|
123
|
+
</el-timeline>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div v-if="!item.subProcInitId && item.suggestion" class="n20-description-c n20-description-bgc m-t p-a-s">
|
|
59
127
|
<span v-if="item.result !== status.waiting">{{ '审批意见:' | $lc }}</span>
|
|
60
|
-
<span>{{ item.suggestion }}</span>
|
|
128
|
+
<span>{{ item.suggestion }} </span>
|
|
61
129
|
</div>
|
|
62
130
|
<div v-if="item.flowHisFileList" class="n20-description-c n20-description-bgc m-t p-a-s">
|
|
63
131
|
<span>{{ '附件信息' | $lc }}:</span>
|
|
@@ -214,6 +282,8 @@ export default {
|
|
|
214
282
|
}
|
|
215
283
|
}
|
|
216
284
|
return {
|
|
285
|
+
showChildTimeline:false,
|
|
286
|
+
approvalChildrenData:[],
|
|
217
287
|
// 显示撤回意见,默认不显示
|
|
218
288
|
showCtdMsg: window._approvalExtend['card.countermand.suggestion'] === true,
|
|
219
289
|
visibleP: false,
|
|
@@ -225,59 +295,71 @@ export default {
|
|
|
225
295
|
seeRow: {}
|
|
226
296
|
}
|
|
227
297
|
},
|
|
228
|
-
|
|
298
|
+
async created() {
|
|
229
299
|
if (this.procInstId) {
|
|
230
|
-
|
|
300
|
+
const data =await this.getProcInstData(this.procInstId)
|
|
301
|
+
this.approvalData.push(...data)
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
methods: {
|
|
305
|
+
async seeApproveChild(id) {
|
|
306
|
+
this.showChildTimeline = !this.showChildTimeline
|
|
307
|
+
if (this.showChildTimeline) {
|
|
308
|
+
const data =await this.getProcInstData(id)
|
|
309
|
+
this.approvalChildrenData = data
|
|
310
|
+
} else {
|
|
311
|
+
this.approvalChildrenData = []
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
},
|
|
315
|
+
async getProcInstData(procInstId) {
|
|
316
|
+
const {data} = await axios
|
|
231
317
|
.get(
|
|
232
318
|
`/bems/activiti/sample/Q003?r=${Math.random()}`,
|
|
233
319
|
{
|
|
234
|
-
procInstId
|
|
320
|
+
procInstId
|
|
235
321
|
},
|
|
236
322
|
{ loading: !this.hideLoading }
|
|
237
323
|
)
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
324
|
+
let approvalData = []
|
|
325
|
+
data?.forEach((item) => {
|
|
326
|
+
let _item = {
|
|
327
|
+
endTime: item.endTime || '',
|
|
328
|
+
assignee: item.assignee,
|
|
329
|
+
suggestion: item.suggestion,
|
|
330
|
+
roleName: item.roleName,
|
|
331
|
+
flowHisFileList: item.flowHisFileList || null, //附件信息
|
|
332
|
+
ccUserName: item.ccUserName, // 抄送人
|
|
333
|
+
addTaskName: item.addTaskName, // 加签审批人
|
|
334
|
+
memberName: item.memberName, // 审批人单位
|
|
335
|
+
subProcInitId:item.subProcInitId // 子流程id
|
|
336
|
+
}
|
|
337
|
+
let resultName = item.optResult || ''
|
|
338
|
+
resultName = resultName.split('-')
|
|
339
|
+
resultName = resultName[resultName.length - 1]
|
|
340
|
+
_item.resultName = resultName === $lc('推进') ? $lc('批准') : resultName
|
|
341
|
+
if (item.taskName === $lc('开始')) {
|
|
342
|
+
_item.result = 1
|
|
343
|
+
} else if (_item.resultName === $lc('加签推进')) {
|
|
344
|
+
_item.result = 2
|
|
345
|
+
} else if (_item.resultName === $lc('作废')) {
|
|
346
|
+
_item.result = 4
|
|
347
|
+
} else if (item.taskName === $lc('结束')) {
|
|
348
|
+
_item.result = 5
|
|
349
|
+
} else if ('approvalState' in item) {
|
|
350
|
+
_item.result = item.approvalState
|
|
351
|
+
} else if (!item.endTime) {
|
|
352
|
+
_item.result = 0
|
|
353
|
+
} else if (item.rejectFlag === 1) {
|
|
354
|
+
_item.result = 3
|
|
355
|
+
} else {
|
|
356
|
+
_item.result = 2
|
|
357
|
+
}
|
|
272
358
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
})
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
methods: {
|
|
359
|
+
approvalData.push(_item)
|
|
360
|
+
})
|
|
361
|
+
return approvalData
|
|
362
|
+
},
|
|
281
363
|
async preview(row) {
|
|
282
364
|
this.visibleP = true
|
|
283
365
|
this.seeRow = row
|
|
@@ -180,7 +180,11 @@ export default {
|
|
|
180
180
|
},
|
|
181
181
|
methods: {
|
|
182
182
|
showOpt() {
|
|
183
|
-
if (this.showd)
|
|
183
|
+
if (this.showd) {
|
|
184
|
+
this.filterFn(this.value)
|
|
185
|
+
return
|
|
186
|
+
|
|
187
|
+
}
|
|
184
188
|
|
|
185
189
|
this.showd = true
|
|
186
190
|
|
|
@@ -247,6 +251,7 @@ export default {
|
|
|
247
251
|
this.$emit('change', this.value)
|
|
248
252
|
},
|
|
249
253
|
filterNode(value, data) {
|
|
254
|
+
|
|
250
255
|
if (!value) return true
|
|
251
256
|
let lK = this.props.label
|
|
252
257
|
return data[lK].indexOf(value) !== -1
|
|
@@ -223,16 +223,13 @@ export async function getSign(plain, dn) {
|
|
|
223
223
|
await MessageBox.prompt('请输入PIN码', '提示', {
|
|
224
224
|
confirmButtonText: '确定',
|
|
225
225
|
cancelButtonText: '取消',
|
|
226
|
-
inputType: 'password'
|
|
226
|
+
inputType: 'password'
|
|
227
227
|
})
|
|
228
228
|
.then(({ value }) => {
|
|
229
229
|
return performSign(plainText, value).then((signedData) => {
|
|
230
230
|
answer = signedData
|
|
231
231
|
})
|
|
232
232
|
})
|
|
233
|
-
.catch(() => {
|
|
234
|
-
resolve()
|
|
235
|
-
})
|
|
236
233
|
return answer
|
|
237
234
|
}
|
|
238
235
|
|