n20-common-lib 1.3.25 → 1.3.28
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/assets/css/title-pop.scss +7 -7
- package/src/components/FileUploadTable/index.vue +39 -171
- package/src/components/LoginTemporary/form.vue +2 -1
- package/src/components/Upload/index.vue +6 -0
- package/src/directives/VTitle/index.js +17 -4
- package/src/plugins/Sign/bjca/index.js +65 -14
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
.el-popover.n20-title-pop{
|
|
1
|
+
.el-popover.n20-title-pop {
|
|
3
2
|
background-color: #303133;
|
|
3
|
+
border: none;
|
|
4
4
|
min-width: auto;
|
|
5
5
|
color: $--color-white;
|
|
6
|
-
padding:
|
|
6
|
+
padding: 5px 8px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.n20-title-pop[x-placement^=left] .popper__arrow::after {
|
|
9
|
+
.n20-title-pop[x-placement^='left'] .popper__arrow::after {
|
|
10
10
|
border-left-color: #303133;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.n20-title-pop[x-placement^=right] .popper__arrow::after {
|
|
13
|
+
.n20-title-pop[x-placement^='right'] .popper__arrow::after {
|
|
14
14
|
border-right-color: #303133;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.n20-title-pop[x-placement^=bottom] .popper__arrow::after {
|
|
17
|
+
.n20-title-pop[x-placement^='bottom'] .popper__arrow::after {
|
|
18
18
|
border-bottom-color: #303133;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.n20-title-pop[x-placement^=top] .popper__arrow::after {
|
|
21
|
+
.n20-title-pop[x-placement^='top'] .popper__arrow::after {
|
|
22
22
|
border-top-color: #303133;
|
|
23
23
|
}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<slot name="user" :row="row">{{ row[keys.user] }}</slot>
|
|
59
59
|
</template>
|
|
60
60
|
</el-table-column>
|
|
61
|
-
<el-table-column label="操作" align="center" width="80">
|
|
61
|
+
<el-table-column label="操作" align="center" width="80" fixed="right">
|
|
62
62
|
<template slot="header" slot-scope="scope">
|
|
63
63
|
<slot name="handle-header" :column="scope.column">操作</slot>
|
|
64
64
|
</template>
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
>新增</el-button
|
|
92
92
|
>
|
|
93
93
|
</slot>
|
|
94
|
-
<slot name="batch-btn">
|
|
95
|
-
<el-button size="mini" plain @click="
|
|
94
|
+
<slot v-if="showBatchUpload" name="batch-btn">
|
|
95
|
+
<el-button size="mini" plain @click="visibleBatch = true"
|
|
96
96
|
>批量上传</el-button
|
|
97
97
|
>
|
|
98
98
|
</slot>
|
|
@@ -167,6 +167,7 @@
|
|
|
167
167
|
:disabled="!row[keys.type]"
|
|
168
168
|
:accept="row[keys.type] | acceptFilter(typeOptions, fileAccept)"
|
|
169
169
|
:size="row[keys.type] | sizeFilter(typeOptions, fileSize)"
|
|
170
|
+
:http-request="uploadHttpRequest"
|
|
170
171
|
:before-upload="(file) => beforeUploadFn(file, row)"
|
|
171
172
|
:on-progress="(event) => onProgressFn(event, row)"
|
|
172
173
|
:on-success="
|
|
@@ -235,7 +236,7 @@
|
|
|
235
236
|
</slot>
|
|
236
237
|
</template>
|
|
237
238
|
</el-table-column>
|
|
238
|
-
<el-table-column label="操作" align="center" width="80">
|
|
239
|
+
<el-table-column label="操作" align="center" width="80" fixed="right">
|
|
239
240
|
<template slot="header" slot-scope="scope">
|
|
240
241
|
<slot name="handle-header" :column="scope.column">操作</slot>
|
|
241
242
|
</template>
|
|
@@ -301,20 +302,22 @@
|
|
|
301
302
|
title="附件批量上传"
|
|
302
303
|
:visible.sync="visibleBatch"
|
|
303
304
|
top="5vh"
|
|
304
|
-
width="
|
|
305
|
+
width="692px"
|
|
305
306
|
>
|
|
306
|
-
<
|
|
307
|
+
<clUpload
|
|
308
|
+
ref="upload-batch"
|
|
307
309
|
class="n20-upload-drag"
|
|
310
|
+
:msg-type="null"
|
|
311
|
+
:show-clear="false"
|
|
308
312
|
:drag="true"
|
|
309
|
-
action="no"
|
|
310
313
|
:auto-upload="false"
|
|
311
314
|
:multiple="true"
|
|
312
|
-
:
|
|
313
|
-
:
|
|
314
|
-
:
|
|
315
|
-
:
|
|
316
|
-
:
|
|
317
|
-
|
|
315
|
+
:action="action"
|
|
316
|
+
:headers="headers"
|
|
317
|
+
:accept="fileAccept"
|
|
318
|
+
:http-request="uploadHttpRequest"
|
|
319
|
+
:on-remove="(file) => $emit('on-remove', file)"
|
|
320
|
+
:on-success="batchSuccess"
|
|
318
321
|
>
|
|
319
322
|
<template slot="trigger">
|
|
320
323
|
<i class="drag-icon n20-icon-shangchuan"></i>
|
|
@@ -323,9 +326,9 @@
|
|
|
323
326
|
<slot>支持扩展名:.rar .zip .doc .docx .pdf .jpg...</slot>
|
|
324
327
|
</span>
|
|
325
328
|
</template>
|
|
326
|
-
</
|
|
329
|
+
</clUpload>
|
|
327
330
|
<div class="dialog-footer">
|
|
328
|
-
<el-button type="primary" @click="
|
|
331
|
+
<el-button type="primary" @click="batchUploadFn">确认</el-button>
|
|
329
332
|
<el-button plain @click="visibleBatch = false">取消</el-button>
|
|
330
333
|
</div>
|
|
331
334
|
</Dialog>
|
|
@@ -367,10 +370,6 @@ export default {
|
|
|
367
370
|
type: Object,
|
|
368
371
|
default: undefined
|
|
369
372
|
},
|
|
370
|
-
actionBatch: {
|
|
371
|
-
type: String,
|
|
372
|
-
default: '/api/neams/eamsbaserecord/save'
|
|
373
|
-
},
|
|
374
373
|
seePrefix: {
|
|
375
374
|
type: String,
|
|
376
375
|
default: undefined
|
|
@@ -379,10 +378,6 @@ export default {
|
|
|
379
378
|
type: RegExp,
|
|
380
379
|
default: () => /\.jpg|\.png|\.gif|\.svg|\.pdf$/i
|
|
381
380
|
},
|
|
382
|
-
uploadParams: {
|
|
383
|
-
type: Object,
|
|
384
|
-
default: () => ({})
|
|
385
|
-
},
|
|
386
381
|
tableData: {
|
|
387
382
|
type: Array,
|
|
388
383
|
default: () => []
|
|
@@ -390,6 +385,14 @@ export default {
|
|
|
390
385
|
dataPorp: {
|
|
391
386
|
type: Object,
|
|
392
387
|
default: () => ({})
|
|
388
|
+
},
|
|
389
|
+
showBatchUpload: {
|
|
390
|
+
type: Boolean,
|
|
391
|
+
default: false
|
|
392
|
+
},
|
|
393
|
+
uploadHttpRequest: {
|
|
394
|
+
type: Function,
|
|
395
|
+
default: undefined
|
|
393
396
|
}
|
|
394
397
|
},
|
|
395
398
|
data() {
|
|
@@ -412,7 +415,6 @@ export default {
|
|
|
412
415
|
label: '其他合同'
|
|
413
416
|
}
|
|
414
417
|
],
|
|
415
|
-
batchData: {},
|
|
416
418
|
keys: this.dataPorp.keys || {
|
|
417
419
|
rowKey: 'id',
|
|
418
420
|
type: 'type',
|
|
@@ -430,86 +432,24 @@ export default {
|
|
|
430
432
|
}
|
|
431
433
|
},
|
|
432
434
|
methods: {
|
|
433
|
-
|
|
434
|
-
this.$
|
|
435
|
+
batchUploadFn() {
|
|
436
|
+
let $uploadwrap = this.$refs['upload-batch']
|
|
437
|
+
let $upload = $uploadwrap.$refs['upload']
|
|
438
|
+
$upload.submit()
|
|
435
439
|
},
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
headers: {
|
|
442
|
-
'Content-Type': 'multipart/form-data'
|
|
443
|
-
},
|
|
444
|
-
url: `/api/neams/eamsbaserecord/save`,
|
|
445
|
-
method: 'POST',
|
|
446
|
-
data: this.batchData
|
|
440
|
+
batchSuccess(response, file, fileList) {
|
|
441
|
+
let row = {}
|
|
442
|
+
this.tableData.splice(0, 0, row)
|
|
443
|
+
this.$nextTick(() => {
|
|
444
|
+
this.onSuccessFn(response, file, fileList, row)
|
|
447
445
|
})
|
|
448
446
|
|
|
449
|
-
if (
|
|
450
|
-
|
|
451
|
-
let flieList = data.map((item) => {
|
|
452
|
-
var keys = Object.keys(item)[0]
|
|
453
|
-
let row = JSON.parse(item[keys])
|
|
454
|
-
var d = new Date(row.uploadtime)
|
|
455
|
-
return {
|
|
456
|
-
name: row.recordname,
|
|
457
|
-
time: this.TimeDate(d),
|
|
458
|
-
user: row.creator,
|
|
459
|
-
archiveId: row.beid,
|
|
460
|
-
type: row.attno
|
|
461
|
-
}
|
|
462
|
-
})
|
|
463
|
-
|
|
464
|
-
this.tableData = this.tableData.concat(flieList)
|
|
465
|
-
this.visibleBatch = false
|
|
466
|
-
this.currFileList = []
|
|
467
|
-
}
|
|
447
|
+
if (fileList.every((f) => f.status === 'success')) {
|
|
448
|
+
this.visibleBatch = false
|
|
468
449
|
}
|
|
469
450
|
},
|
|
470
|
-
|
|
471
|
-
this
|
|
472
|
-
let params = this.uploadParams
|
|
473
|
-
let data = new FormData()
|
|
474
|
-
let dataArray = []
|
|
475
|
-
console.log(this.currFileList, 999)
|
|
476
|
-
this.currFileList.forEach((item) => {
|
|
477
|
-
data.append('file', item.raw)
|
|
478
|
-
let attno = null
|
|
479
|
-
dataArray.push({
|
|
480
|
-
...params,
|
|
481
|
-
recordname: item.name,
|
|
482
|
-
fileSize: item.size,
|
|
483
|
-
memo: item.name,
|
|
484
|
-
attno
|
|
485
|
-
})
|
|
486
|
-
})
|
|
487
|
-
data.append('data', JSON.stringify(dataArray))
|
|
488
|
-
//档案生效时间-截止时间
|
|
489
|
-
data.append('date', `${this.getFormatDate()},2099-12-31 23:59:59`)
|
|
490
|
-
this.batchData = data
|
|
491
|
-
},
|
|
492
|
-
onChange(file, filelist) {
|
|
493
|
-
this.currFileList = filelist
|
|
494
|
-
let params = this.uploadParams
|
|
495
|
-
let data = new FormData()
|
|
496
|
-
let dataArray = []
|
|
497
|
-
console.log(this.currFileList, 999)
|
|
498
|
-
this.currFileList.forEach((item) => {
|
|
499
|
-
data.append('file', item.raw)
|
|
500
|
-
let attno = null
|
|
501
|
-
dataArray.push({
|
|
502
|
-
...params,
|
|
503
|
-
recordname: item.name,
|
|
504
|
-
fileSize: item.size,
|
|
505
|
-
memo: item.name,
|
|
506
|
-
attno
|
|
507
|
-
})
|
|
508
|
-
})
|
|
509
|
-
data.append('data', JSON.stringify(dataArray))
|
|
510
|
-
//档案生效时间-截止时间
|
|
511
|
-
data.append('date', `${this.getFormatDate()},2099-12-31 23:59:59`)
|
|
512
|
-
this.batchData = data
|
|
451
|
+
addRow() {
|
|
452
|
+
this.$emit('add-row')
|
|
513
453
|
},
|
|
514
454
|
downRows() {
|
|
515
455
|
this.$emit('down-rows', this.selectionList)
|
|
@@ -535,78 +475,6 @@ export default {
|
|
|
535
475
|
return {}
|
|
536
476
|
}
|
|
537
477
|
},
|
|
538
|
-
getFormatDate() {
|
|
539
|
-
let date = new Date()
|
|
540
|
-
let month = date.getMonth() + 1
|
|
541
|
-
let strDate = date.getDate()
|
|
542
|
-
let getHours = date.getHours()
|
|
543
|
-
let getMinutes = date.getMinutes()
|
|
544
|
-
let getSeconds = date.getSeconds()
|
|
545
|
-
if (month >= 1 && month <= 9) {
|
|
546
|
-
month = '0' + month
|
|
547
|
-
}
|
|
548
|
-
if (strDate >= 0 && strDate <= 9) {
|
|
549
|
-
strDate = '0' + strDate
|
|
550
|
-
}
|
|
551
|
-
if (getHours >= 0 && getHours <= 9) {
|
|
552
|
-
getHours = '0' + getHours
|
|
553
|
-
}
|
|
554
|
-
if (getMinutes >= 0 && getMinutes <= 9) {
|
|
555
|
-
getMinutes = '0' + getMinutes
|
|
556
|
-
}
|
|
557
|
-
if (getSeconds >= 0 && getSeconds <= 9) {
|
|
558
|
-
getSeconds = '0' + getSeconds
|
|
559
|
-
}
|
|
560
|
-
return (
|
|
561
|
-
date.getFullYear() +
|
|
562
|
-
'-' +
|
|
563
|
-
month +
|
|
564
|
-
'-' +
|
|
565
|
-
strDate +
|
|
566
|
-
' ' +
|
|
567
|
-
getHours +
|
|
568
|
-
':' +
|
|
569
|
-
getMinutes +
|
|
570
|
-
':' +
|
|
571
|
-
getSeconds
|
|
572
|
-
)
|
|
573
|
-
},
|
|
574
|
-
TimeDate(now) {
|
|
575
|
-
var year = now.getFullYear()
|
|
576
|
-
var month = now.getMonth() + 1
|
|
577
|
-
var date = now.getDate()
|
|
578
|
-
var hour = now.getHours()
|
|
579
|
-
var minute = now.getMinutes()
|
|
580
|
-
var second = now.getSeconds()
|
|
581
|
-
if (month < 10) {
|
|
582
|
-
month = '0' + month
|
|
583
|
-
}
|
|
584
|
-
if (date < 10) {
|
|
585
|
-
date = '0' + date
|
|
586
|
-
}
|
|
587
|
-
if (hour < 10) {
|
|
588
|
-
hour = '0' + hour
|
|
589
|
-
}
|
|
590
|
-
if (minute < 10) {
|
|
591
|
-
minute = '0' + minute
|
|
592
|
-
}
|
|
593
|
-
if (second < 10) {
|
|
594
|
-
second = '0' + second
|
|
595
|
-
}
|
|
596
|
-
return (
|
|
597
|
-
year +
|
|
598
|
-
'-' +
|
|
599
|
-
month +
|
|
600
|
-
'-' +
|
|
601
|
-
date +
|
|
602
|
-
' ' +
|
|
603
|
-
hour +
|
|
604
|
-
':' +
|
|
605
|
-
minute +
|
|
606
|
-
':' +
|
|
607
|
-
second
|
|
608
|
-
)
|
|
609
|
-
},
|
|
610
478
|
async downFile(row) {
|
|
611
479
|
let { url, name } = await this.getFileInfo(row)
|
|
612
480
|
if (url) {
|
|
@@ -405,7 +405,6 @@ export default {
|
|
|
405
405
|
sign = await getSign(username, userDn)
|
|
406
406
|
certDn = userDn
|
|
407
407
|
}
|
|
408
|
-
|
|
409
408
|
await this.authorizationCode(username, password, code) // authorizationValue 使用一次后就失效了
|
|
410
409
|
axios
|
|
411
410
|
.post(
|
|
@@ -425,6 +424,8 @@ export default {
|
|
|
425
424
|
.then((res) => {
|
|
426
425
|
this.loginAfter(res.data)
|
|
427
426
|
})
|
|
427
|
+
this.loadingV = false
|
|
428
|
+
|
|
428
429
|
return
|
|
429
430
|
}
|
|
430
431
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
:on-success="successFn"
|
|
12
12
|
:on-error="errorFn"
|
|
13
13
|
:on-progress="progressFn"
|
|
14
|
+
:on-remove="removeFn"
|
|
14
15
|
:before-upload="beforeUploadFn"
|
|
15
16
|
v-on="$listeners"
|
|
16
17
|
>
|
|
@@ -256,6 +257,11 @@ export default {
|
|
|
256
257
|
})
|
|
257
258
|
}
|
|
258
259
|
}
|
|
260
|
+
},
|
|
261
|
+
removeFn(file, fileList) {
|
|
262
|
+
if (this.onRemove) {
|
|
263
|
+
this.onRemove(file, fileList)
|
|
264
|
+
}
|
|
259
265
|
}
|
|
260
266
|
}
|
|
261
267
|
}
|
|
@@ -2,16 +2,28 @@ let timer = undefined
|
|
|
2
2
|
const popClass = 'at-title-pop-' + Date.now()
|
|
3
3
|
|
|
4
4
|
function tipShow(el, tip) {
|
|
5
|
-
let _input = el.querySelector('.el-input__inner')
|
|
6
|
-
if (_input && !el.$tooltipTitle) el.$tooltipTitle = _input.value
|
|
7
5
|
if (el.$tooltipTitle) {
|
|
8
|
-
|
|
9
|
-
if (!el.$tooltipTitleOverflow || _el.clientWidth < _el.scrollWidth) {
|
|
6
|
+
if (!el.$tooltipTitleOverflow || el.clientWidth < el.scrollWidth) {
|
|
10
7
|
document.querySelector('.' + popClass).innerText = el.$tooltipTitle
|
|
11
8
|
|
|
12
9
|
tip.$refs['title-pop'].referenceElm = el
|
|
13
10
|
tip.$refs['title-pop'].doDestroy()
|
|
14
11
|
|
|
12
|
+
tip.$nextTick(() => {
|
|
13
|
+
tip.visible = true
|
|
14
|
+
timer = setInterval(() => {
|
|
15
|
+
if (tip.visible && !el.scrollWidth) tipHide(el, tip)
|
|
16
|
+
}, 1000)
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
let _input = el.querySelector('.el-input__inner')
|
|
21
|
+
if (_input && _input.clientWidth < _input.scrollWidth) {
|
|
22
|
+
document.querySelector('.' + popClass).innerText = _input.value
|
|
23
|
+
|
|
24
|
+
tip.$refs['title-pop'].referenceElm = el
|
|
25
|
+
tip.$refs['title-pop'].doDestroy()
|
|
26
|
+
|
|
15
27
|
tip.$nextTick(() => {
|
|
16
28
|
tip.visible = true
|
|
17
29
|
timer = setInterval(() => {
|
|
@@ -21,6 +33,7 @@ function tipShow(el, tip) {
|
|
|
21
33
|
}
|
|
22
34
|
}
|
|
23
35
|
}
|
|
36
|
+
|
|
24
37
|
function tipHide(el, tip) {
|
|
25
38
|
tip.visible = false
|
|
26
39
|
clearInterval(timer)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './XTXSAB.js'
|
|
2
|
-
|
|
2
|
+
import { Message } from 'element-ui'
|
|
3
3
|
let _dn
|
|
4
4
|
function getDN() {
|
|
5
5
|
if (!_dn) {
|
|
@@ -20,7 +20,7 @@ export async function getSign(plain, dn) {
|
|
|
20
20
|
() => resolve(),
|
|
21
21
|
() => {
|
|
22
22
|
errMsg = '没有检测到签名驱动!'
|
|
23
|
-
|
|
23
|
+
Message.error(errMsg)
|
|
24
24
|
reject(errMsg)
|
|
25
25
|
}
|
|
26
26
|
)
|
|
@@ -31,7 +31,7 @@ export async function getSign(plain, dn) {
|
|
|
31
31
|
}
|
|
32
32
|
if (!dn) {
|
|
33
33
|
errMsg = '签名参数DN错误!'
|
|
34
|
-
|
|
34
|
+
Message.error(errMsg)
|
|
35
35
|
return Promise.reject(errMsg)
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -41,33 +41,84 @@ export async function getSign(plain, dn) {
|
|
|
41
41
|
plainText = plain
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
/**
|
|
45
|
+
* 获取证书列表
|
|
46
|
+
*/
|
|
47
|
+
let CertIdList = []
|
|
45
48
|
await new Promise((resolve, reject) => {
|
|
46
|
-
window.
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
+
window.SOF_GetUserList((l) => {
|
|
50
|
+
if (l.retVal) {
|
|
51
|
+
CertIdList = l.retVal
|
|
52
|
+
.replace(/&&&$/, '')
|
|
53
|
+
.split('&&&')
|
|
54
|
+
.map((s) => s.split('||')[1])
|
|
49
55
|
resolve()
|
|
50
56
|
} else {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
reject(errMsg)
|
|
57
|
+
Message.error('证书获取失败')
|
|
58
|
+
resolve()
|
|
54
59
|
}
|
|
55
60
|
})
|
|
56
61
|
})
|
|
57
62
|
|
|
63
|
+
/**
|
|
64
|
+
* 获取证书
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
let r_retVal = []
|
|
68
|
+
await new Promise((resolve, reject) => {
|
|
69
|
+
for (let i = 0; i < CertIdList.length; i++) {
|
|
70
|
+
const item = CertIdList[i]
|
|
71
|
+
window.SOF_ExportUserCert(item, (r) => {
|
|
72
|
+
if (r.retVal) {
|
|
73
|
+
r_retVal.push({ certId: CertIdList[i], retVal: r.retVal })
|
|
74
|
+
resolve()
|
|
75
|
+
} else {
|
|
76
|
+
errMsg = '证书获取失败!'
|
|
77
|
+
Message.error(errMsg)
|
|
78
|
+
reject(errMsg)
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 根据OID获取证书信息
|
|
86
|
+
*/
|
|
87
|
+
let s_retVal = []
|
|
88
|
+
await new Promise((resolve, reject) => {
|
|
89
|
+
for (let i = 0; i < r_retVal.length; i++) {
|
|
90
|
+
const val = r_retVal[i].retVal
|
|
91
|
+
window.SOF_GetCertInfoByOid(val, '1.2.156.112562.2.1.1.23', (s) => {
|
|
92
|
+
if (s.retVal) {
|
|
93
|
+
s_retVal.push({ certId: r_retVal[i].certId, retVal: s.retVal })
|
|
94
|
+
resolve()
|
|
95
|
+
} else {
|
|
96
|
+
errMsg = '证书信息获取失败!'
|
|
97
|
+
Message.error(errMsg)
|
|
98
|
+
reject(errMsg)
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* 签名
|
|
106
|
+
*/
|
|
58
107
|
let v_retVal
|
|
108
|
+
let val = s_retVal.filter((v) => v.retVal === dn)
|
|
109
|
+
let cert = r_retVal.filter((s) => s.certId === val[0].certId)
|
|
59
110
|
await new Promise((resolve, reject) => {
|
|
60
|
-
window.SOF_SignData(
|
|
111
|
+
window.SOF_SignData(val[0].certId, plainText + '' + dn, (v) => {
|
|
61
112
|
if (v.retVal) {
|
|
62
|
-
v_retVal = v.retVal
|
|
113
|
+
v_retVal = v.retVal
|
|
63
114
|
resolve()
|
|
64
115
|
} else {
|
|
65
116
|
errMsg = '签名失败!'
|
|
66
|
-
|
|
117
|
+
Message.error(errMsg)
|
|
67
118
|
reject(errMsg)
|
|
68
119
|
}
|
|
69
120
|
})
|
|
70
121
|
})
|
|
71
122
|
|
|
72
|
-
return Promise.resolve(v_retVal + '@@@' +
|
|
123
|
+
return Promise.resolve(v_retVal + '@@@' + cert[0].retVal)
|
|
73
124
|
}
|