Merge branch 'dev'
Showing
1 changed file
with
30 additions
and
2 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,7 +147,34 @@ | ... | @@ -147,7 +147,34 @@ |
147 | * @author: renchao | 147 | * @author: renchao |
148 | */ | 148 | */ |
149 | readClick () { | 149 | readClick () { |
150 | getIdCardInfo().then(res => { | 150 | function getObjectByValue (arrayOfObjects, value) { |
151 | var name = '' | ||
152 | arrayOfObjects.forEach(item => { | ||
153 | if (item.dname.includes(value)) name = item.dcode | ||
154 | }) | ||
155 | return name | ||
156 | } | ||
157 | getIdCardInfo(this.BASE_API.gaopaiyi).then(res => { | ||
158 | if (this.BASE_API.gaopaiyi == 'jy') { | ||
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 | } | ||
177 | } else { | ||
151 | if (res.data.code == 0) { | 178 | if (res.data.code == 0) { |
152 | let data = res.data.IDCardInfo | 179 | let data = res.data.IDCardInfo |
153 | this.ruleForm.lzrxm = data.name | 180 | this.ruleForm.lzrxm = data.name |
... | @@ -163,6 +190,7 @@ | ... | @@ -163,6 +190,7 @@ |
163 | type: 'warning' | 190 | type: 'warning' |
164 | }) | 191 | }) |
165 | } | 192 | } |
193 | } | ||
166 | }) | 194 | }) |
167 | }, | 195 | }, |
168 | /** | 196 | /** | ... | ... |
-
Please register or sign in to post a comment