style:证书领取
Showing
1 changed file
with
43 additions
and
15 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-11-07 08:46:12 | 4 | * @LastEditTime: 2023-12-18 09:24:03 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"> | 7 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"> |
... | @@ -146,21 +146,49 @@ | ... | @@ -146,21 +146,49 @@ |
146 | * @author: renchao | 146 | * @author: renchao |
147 | */ | 147 | */ |
148 | readClick () { | 148 | readClick () { |
149 | getIdCardInfo().then(res => { | 149 | function getObjectByValue (arrayOfObjects, value) { |
150 | if (res.data.code == 0) { | 150 | var name = '' |
151 | let data = res.data.IDCardInfo | 151 | arrayOfObjects.forEach(item => { |
152 | this.ruleForm.lzrxm = data.name | 152 | if (item.dname.includes(value)) name = item.dcode |
153 | this.ruleForm.lzrzjlb = '1' | 153 | }) |
154 | this.ruleForm.lzrzjh = data.cardID | 154 | return name |
155 | this.$message({ | 155 | } |
156 | message: '读取成功!', | 156 | getIdCardInfo(this.BASE_API.gaopaiyi).then(res => { |
157 | type: 'success' | 157 | if (this.BASE_API.gaopaiyi == 'jy') { |
158 | }) | 158 | const { |
159 | Name, | ||
160 | IdNo, | ||
161 | } = JSON.parse(res) | ||
162 | if (Name) { | ||
163 | this.ruleForm.lzrxm = Name; | ||
164 | this.ruleForm.lzrzjlb = '1'; | ||
165 | this.ruleForm.lzrzjh = IdNo; | ||
166 | this.$message({ | ||
167 | message: '读取成功!', | ||
168 | type: 'success' | ||
169 | }) | ||
170 | } else { | ||
171 | this.$message({ | ||
172 | message: '请放置身份证', | ||
173 | type: 'warning' | ||
174 | }) | ||
175 | } | ||
159 | } else { | 176 | } else { |
160 | this.$message({ | 177 | if (res.data.code == 0) { |
161 | message: res.data.message, | 178 | let data = res.data.IDCardInfo |
162 | type: 'warning' | 179 | this.ruleForm.lzrxm = data.name |
163 | }) | 180 | this.ruleForm.lzrzjlb = '1' |
181 | this.ruleForm.lzrzjh = data.cardID | ||
182 | this.$message({ | ||
183 | message: '读取成功!', | ||
184 | type: 'success' | ||
185 | }) | ||
186 | } else { | ||
187 | this.$message({ | ||
188 | message: res.data.message, | ||
189 | type: 'warning' | ||
190 | }) | ||
191 | } | ||
164 | } | 192 | } |
165 | }) | 193 | }) |
166 | }, | 194 | }, | ... | ... |
-
Please register or sign in to post a comment