n20-common-lib 3.2.24 → 3.2.26
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/advanced-filter.scss +14 -0
- package/src/assets/css/v3/anchor.scss +2 -2
- package/src/components/AdvancedFilter/index.vue +11 -9
- package/src/components/ProFilterView/index.vue +1 -1
- package/src/plugins/Sign/index.js +2 -3
- package/src/plugins/Sign/sign.js +2 -1
- package/src/plugins/Sign/signV3/sign.js +8 -12
- package/style/index.css +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
package/package.json
CHANGED
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
background: #e9f2ff !important;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
&-item.notStyle{
|
|
15
|
+
border: 0px;
|
|
16
|
+
background: transparent !important;
|
|
17
|
+
padding: 0;
|
|
18
|
+
.el-form-item__label{
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.el-form-item__content{
|
|
23
|
+
height: auto;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
14
28
|
&-body {
|
|
15
29
|
|
|
16
30
|
.el-form-item,
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
&__list {
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
|
-
align-items:
|
|
49
|
+
align-items: stretch;
|
|
50
|
+
width: max-content;
|
|
50
51
|
padding: 8px;
|
|
51
52
|
background: $--color-white;
|
|
52
53
|
border: 1px solid $--border-color-base;
|
|
@@ -59,7 +60,6 @@
|
|
|
59
60
|
display: flex;
|
|
60
61
|
align-items: center;
|
|
61
62
|
gap: 8px;
|
|
62
|
-
width: 104px;
|
|
63
63
|
padding: 4px 8px;
|
|
64
64
|
border-radius: 2px;
|
|
65
65
|
cursor: pointer;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<el-form-item
|
|
6
6
|
v-for="item in GroupData"
|
|
7
7
|
:key="getOnlyKey(item)"
|
|
8
|
-
:class="[prefixCls + '-item', activeClassMap[item.value || item[onlyKey]] || '']"
|
|
8
|
+
:class="[prefixCls + '-item', activeClassMap[item.value || item[onlyKey]] || '',{notStyle: item.notStyle}]"
|
|
9
9
|
:label="item.label"
|
|
10
10
|
:required="!!item.required"
|
|
11
11
|
:disabled="item.props && item.props.disabled"
|
|
@@ -249,14 +249,16 @@ export default {
|
|
|
249
249
|
this.GroupData.forEach((item) => {
|
|
250
250
|
const key = item.value || item[this.onlyKey]
|
|
251
251
|
let isActive = false
|
|
252
|
-
if
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
252
|
+
if(!item.notActive) {
|
|
253
|
+
if (item.type === 'numberrange') {
|
|
254
|
+
isActive = hasRange(item.startValue, item.endValue)
|
|
255
|
+
} else if (rangeTypes.includes(item.type)) {
|
|
256
|
+
isActive = hasRange(item.startDate, item.endDate)
|
|
257
|
+
} else if (item.slotFields && item.slotFields.length > 0) {
|
|
258
|
+
isActive = item.slotFields.some((field) => hasValue(model[field]))
|
|
259
|
+
} else {
|
|
260
|
+
isActive = hasValue(model[item.value])
|
|
261
|
+
}
|
|
260
262
|
}
|
|
261
263
|
map[key] = isActive ? this.prefixCls + '-active' : ''
|
|
262
264
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import importG from '../../utils/importGlobal.js'
|
|
2
|
-
|
|
3
1
|
import CaMap from './CaMap.js'
|
|
4
2
|
|
|
3
|
+
import importG from '../../utils/importGlobal.js'
|
|
4
|
+
|
|
5
5
|
/**
|
|
6
6
|
* 统一处理签名逻辑
|
|
7
7
|
* @param {Object} config - 签名配置
|
|
@@ -93,7 +93,6 @@ export async function getSign(p1, p2, p3) {
|
|
|
93
93
|
*/
|
|
94
94
|
export function getCert(dn) {
|
|
95
95
|
let signType = window.sessionStorage.getItem('signType')
|
|
96
|
-
console.log('signType', signType)
|
|
97
96
|
return new Promise((resolve, reject) => {
|
|
98
97
|
if (signType === 'inetSign' /* 信安CA */) {
|
|
99
98
|
// 是否使用信安3.0版本sdk (默认使用2.0版本)
|
package/src/plugins/Sign/sign.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Attached方式签名
|
|
2
2
|
import { Message, Notification } from 'element-ui'
|
|
3
|
+
|
|
3
4
|
import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
|
|
4
5
|
|
|
5
6
|
const {
|
|
@@ -167,7 +168,7 @@ function verifyDn(dnList, dn) {
|
|
|
167
168
|
let index = -1
|
|
168
169
|
dnList.find((C, i) => {
|
|
169
170
|
let dnAttrsArr = C.certDN.split(',').map((c) => c.trim())
|
|
170
|
-
if (
|
|
171
|
+
if (userDnAttrsArr.every((dnAttr) => dnAttrsArr.includes(dnAttr))) {
|
|
171
172
|
index = i
|
|
172
173
|
return true
|
|
173
174
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Attached方式签名
|
|
2
|
-
import { Message, MessageBox,Notification } from 'element-ui'
|
|
2
|
+
import { Message, MessageBox, Notification } from 'element-ui'
|
|
3
|
+
|
|
3
4
|
import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
|
|
4
5
|
|
|
5
6
|
const {
|
|
@@ -15,7 +16,7 @@ const {
|
|
|
15
16
|
IWSASetTimeOut(6000)
|
|
16
17
|
let certIndex = 0
|
|
17
18
|
let certDN = ''
|
|
18
|
-
let certType='SHA1'
|
|
19
|
+
let certType = 'SHA1'
|
|
19
20
|
function getDN() {
|
|
20
21
|
let dn
|
|
21
22
|
let userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
|
|
@@ -90,7 +91,8 @@ export async function getSign(plain, dn) {
|
|
|
90
91
|
navigator.userAgent.toLowerCase().includes('linux') ||
|
|
91
92
|
// 检查是否为银河麒麟特有的环境变量或特征
|
|
92
93
|
typeof window.KylinOS !== 'undefined' ||
|
|
93
|
-
document.documentElement.dataset.osType === 'kylin'||
|
|
94
|
+
document.documentElement.dataset.osType === 'kylin' ||
|
|
95
|
+
certType === 'SM3'
|
|
94
96
|
) {
|
|
95
97
|
// 签名
|
|
96
98
|
return await MessageBox.prompt('请输入PIN码', '提示', {
|
|
@@ -101,10 +103,9 @@ export async function getSign(plain, dn) {
|
|
|
101
103
|
}).then(({ value }) => {
|
|
102
104
|
return performSignSkf(plainText, value)
|
|
103
105
|
})
|
|
104
|
-
}else{
|
|
106
|
+
} else {
|
|
105
107
|
return await performSign(plainText, index)
|
|
106
108
|
}
|
|
107
|
-
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
/**
|
|
@@ -216,7 +217,7 @@ async function performSignSkf(plainText, value) {
|
|
|
216
217
|
} else {
|
|
217
218
|
arg = process.env.VUE_APP_NetSign_ARG || window.VUE_APP_NetSign_ARG || 'WTSKFInterface.dll'
|
|
218
219
|
}
|
|
219
|
-
IWSASkfDetachedSignDefaultDN(plainText, certDN, value, certType,arg,'1', (errorCode, signedData) => {
|
|
220
|
+
IWSASkfDetachedSignDefaultDN(plainText, certDN, value, certType, arg, '1', (errorCode, signedData) => {
|
|
220
221
|
if (errorCode === 0 || errorCode === '0') {
|
|
221
222
|
resolve(signedData)
|
|
222
223
|
} else {
|
|
@@ -239,13 +240,12 @@ function verifyDn(dnList, dn) {
|
|
|
239
240
|
// 先过滤满足证书的条件
|
|
240
241
|
let dnListA = JSON.parse(JSON.stringify(dnList)).filter((C, i) => {
|
|
241
242
|
let dnAttrsArr = C.certDN.split(',').map((c) => c.trim())
|
|
242
|
-
if (
|
|
243
|
+
if (userDnAttrsArr.every((dnAttr) => dnAttrsArr.includes(dnAttr))) {
|
|
243
244
|
C.index = i
|
|
244
245
|
certDN = C.certDN
|
|
245
246
|
return C
|
|
246
247
|
}
|
|
247
248
|
})
|
|
248
|
-
console.log(dnListA)
|
|
249
249
|
if (dnListA.length > 0) {
|
|
250
250
|
for (let i = 0; i < dnListA.length; i++) {
|
|
251
251
|
if (dnListA[i].CertType === 'SM2' && dnListA[i].KeyUsage === 'signature') {
|
|
@@ -253,8 +253,6 @@ function verifyDn(dnList, dn) {
|
|
|
253
253
|
certIndex = dnListA[i].index
|
|
254
254
|
certType = 'SM3'
|
|
255
255
|
break
|
|
256
|
-
} else {
|
|
257
|
-
index = -1
|
|
258
256
|
}
|
|
259
257
|
}
|
|
260
258
|
}
|
|
@@ -266,8 +264,6 @@ function verifyDn(dnList, dn) {
|
|
|
266
264
|
certIndex = dnListA[i].index
|
|
267
265
|
certType = 'SHA1'
|
|
268
266
|
break
|
|
269
|
-
} else {
|
|
270
|
-
index = -1
|
|
271
267
|
}
|
|
272
268
|
}
|
|
273
269
|
}
|