n20-common-lib 2.13.6 → 2.13.8
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
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
:show-word-limit="showWordLimit"
|
|
24
24
|
:maxlength="maxlength"
|
|
25
25
|
class="w-100p"
|
|
26
|
+
:placeholder="placeholder"
|
|
26
27
|
/>
|
|
27
28
|
</el-form-item>
|
|
28
29
|
</el-form>
|
|
@@ -88,7 +89,9 @@ export default {
|
|
|
88
89
|
reason: '',
|
|
89
90
|
otherAttDataA: [],
|
|
90
91
|
procInstId: '',
|
|
91
|
-
whether: false
|
|
92
|
+
whether: false,
|
|
93
|
+
optionsRequired: false,
|
|
94
|
+
placeholder: ''
|
|
92
95
|
}
|
|
93
96
|
},
|
|
94
97
|
methods: {
|
|
@@ -109,6 +112,12 @@ export default {
|
|
|
109
112
|
if (code === 200) {
|
|
110
113
|
this.otherAttDataA = data.customizationList || []
|
|
111
114
|
this.whether = data.whether
|
|
115
|
+
this.optionsRequired = data.optionsRequired
|
|
116
|
+
if (data.optionsRequired) {
|
|
117
|
+
this.placeholder = '请选择或输入意见(必填)'
|
|
118
|
+
} else {
|
|
119
|
+
this.placeholder = '请选择或输入意见(选填)'
|
|
120
|
+
}
|
|
112
121
|
this.visible = data.whether === true || this.otherAttDataA.length > 0
|
|
113
122
|
this.flowOptions = data?.opinions?.map((d) => {
|
|
114
123
|
return {
|
|
@@ -159,6 +168,10 @@ export default {
|
|
|
159
168
|
this.reason = val
|
|
160
169
|
},
|
|
161
170
|
submit() {
|
|
171
|
+
if (this.whether && this.optionsRequired && !this.reason) {
|
|
172
|
+
this.$message.warning('请选择或输入意见')
|
|
173
|
+
return
|
|
174
|
+
}
|
|
162
175
|
const getOtherAttData = this.$refs['showOtherAttNew'] && this.$refs['showOtherAttNew']?.getOtherAttData()
|
|
163
176
|
this.visible = false
|
|
164
177
|
if (this.beforeSubmit) {
|
|
@@ -334,7 +334,12 @@ export default {
|
|
|
334
334
|
},
|
|
335
335
|
// 计算列宽
|
|
336
336
|
calcColumnWidth(columns) {
|
|
337
|
-
columns =
|
|
337
|
+
columns = columns.map((item) => {
|
|
338
|
+
return {
|
|
339
|
+
...item,
|
|
340
|
+
_width_: 0
|
|
341
|
+
}
|
|
342
|
+
})
|
|
338
343
|
const wrapperEl = document.querySelector('div#app')
|
|
339
344
|
const notHasWidth = columns.filter((column) => !column.width && !column.minWidth && column.label !== $lc('操作'))
|
|
340
345
|
if (!wrapperEl || notHasWidth.length > 0) {
|
|
@@ -368,7 +373,6 @@ export default {
|
|
|
368
373
|
return column
|
|
369
374
|
})
|
|
370
375
|
}
|
|
371
|
-
|
|
372
376
|
return calc(columns)
|
|
373
377
|
}
|
|
374
378
|
}
|
|
@@ -102,22 +102,24 @@ export function getCertInfo(dn) {
|
|
|
102
102
|
}
|
|
103
103
|
return new Promise((resolve, reject) => {
|
|
104
104
|
let certInfo
|
|
105
|
-
IWSAGetAllCertsListInfo('infosec.sm2', 'Sign',
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
IWSAGetAllCertsListInfo('infosec.sm2', 'Sign', 0, (dnList) => {
|
|
106
|
+
IWSAGetAllCertsListInfo('infosec.sm2', 'Sign', 2, (dnList2) => {
|
|
107
|
+
if (!dn) {
|
|
108
|
+
Message.error('没有获取到签名参数DN!')
|
|
109
|
+
reject()
|
|
110
|
+
}
|
|
111
|
+
if (!dnList && !dnList2) {
|
|
112
|
+
Message.error('没有获取到证书列表!')
|
|
113
|
+
reject()
|
|
114
|
+
}
|
|
115
|
+
if (dnList.length === 0 && dnList2.length === 0) {
|
|
116
|
+
Message.error('用户证书信息与当前用户不匹配!')
|
|
117
|
+
reject()
|
|
118
|
+
}
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
certInfo = verifyDn([...dnList, ...dnList2], dn)
|
|
121
|
+
resolve(certInfo)
|
|
122
|
+
})
|
|
121
123
|
})
|
|
122
124
|
})
|
|
123
125
|
}
|
|
@@ -169,10 +171,10 @@ function verifyDn(dnList, dn) {
|
|
|
169
171
|
}
|
|
170
172
|
})
|
|
171
173
|
if (index === -1) {
|
|
172
|
-
let
|
|
174
|
+
let dnListA = dnList?.map((res) => res.certDN)?.join(',')
|
|
173
175
|
Message({
|
|
174
176
|
type: 'error',
|
|
175
|
-
text: `证书Dn不匹配:${
|
|
177
|
+
text: `证书Dn不匹配:${dnListA}里面无法匹配===>${dn}`,
|
|
176
178
|
duration: 5000
|
|
177
179
|
})
|
|
178
180
|
return index
|