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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.13.6",
3
+ "version": "2.13.8",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -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 = XEUtils.clone(columns, true)
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', 2, (dnList) => {
106
- if (!dn) {
107
- Message.error('没有获取到签名参数DN!')
108
- reject()
109
- }
110
- if (!dnList) {
111
- Message.error('没有获取到证书列表!')
112
- reject()
113
- }
114
- if (dnList.length === 0) {
115
- Message.error('用户证书信息与当前用户不匹配!')
116
- reject()
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
- certInfo = verifyDn(dnList, dn)
120
- resolve(certInfo)
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 dnList = dnList?.map((res) => res.certDN)?.join(',')
174
+ let dnListA = dnList?.map((res) => res.certDN)?.join(',')
173
175
  Message({
174
176
  type: 'error',
175
- text: `证书Dn不匹配:${dnList}里面无法匹配===>${dn}`,
177
+ text: `证书Dn不匹配:${dnListA}里面无法匹配===>${dn}`,
176
178
  duration: 5000
177
179
  })
178
180
  return index