Merge branch 'dev'
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"> |
... | @@ -147,21 +147,49 @@ | ... | @@ -147,21 +147,49 @@ |
147 | * @author: renchao | 147 | * @author: renchao |
148 | */ | 148 | */ |
149 | readClick () { | 149 | readClick () { |
150 | getIdCardInfo().then(res => { | 150 | function getObjectByValue (arrayOfObjects, value) { |
151 | if (res.data.code == 0) { | 151 | var name = '' |
152 | let data = res.data.IDCardInfo | 152 | arrayOfObjects.forEach(item => { |
153 | this.ruleForm.lzrxm = data.name | 153 | if (item.dname.includes(value)) name = item.dcode |
154 | this.ruleForm.lzrzjlb = '1' | 154 | }) |
155 | this.ruleForm.lzrzjh = data.cardID | 155 | return name |
156 | this.$message({ | 156 | } |
157 | message: '读取成功!', | 157 | getIdCardInfo(this.BASE_API.gaopaiyi).then(res => { |
158 | type: 'success' | 158 | if (this.BASE_API.gaopaiyi == 'jy') { |
159 | }) | 159 | const { |
160 | Name, | ||
161 | IdNo, | ||
162 | } = JSON.parse(res) | ||
163 | if (Name) { | ||
164 | this.ruleForm.lzrxm = Name; | ||
165 | this.ruleForm.lzrzjlb = '1'; | ||
166 | this.ruleForm.lzrzjh = IdNo; | ||
167 | this.$message({ | ||
168 | message: '读取成功!', | ||
169 | type: 'success' | ||
170 | }) | ||
171 | } else { | ||
172 | this.$message({ | ||
173 | message: '请放置身份证', | ||
174 | type: 'warning' | ||
175 | }) | ||
176 | } | ||
160 | } else { | 177 | } else { |
161 | this.$message({ | 178 | if (res.data.code == 0) { |
162 | message: res.data.message, | 179 | let data = res.data.IDCardInfo |
163 | type: 'warning' | 180 | this.ruleForm.lzrxm = data.name |
164 | }) | 181 | this.ruleForm.lzrzjlb = '1' |
182 | this.ruleForm.lzrzjh = data.cardID | ||
183 | this.$message({ | ||
184 | message: '读取成功!', | ||
185 | type: 'success' | ||
186 | }) | ||
187 | } else { | ||
188 | this.$message({ | ||
189 | message: res.data.message, | ||
190 | type: 'warning' | ||
191 | }) | ||
192 | } | ||
165 | } | 193 | } |
166 | }) | 194 | }) |
167 | }, | 195 | }, | ... | ... |
-
Please register or sign in to post a comment