02bd9b35 by renchao@pashanhoo.com

style:身份证打卡器

1 parent 484e387e
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-12-14 14:12:33 4 * @LastEditTime: 2023-12-15 09:17:46
5 --> 5 -->
6 <template> 6 <template>
7 <dialogBox 7 <dialogBox
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
276 </el-col> 276 </el-col>
277 </el-row> 277 </el-row>
278 </el-form> 278 </el-form>
279 <el-table :data="tableDataQy.data" border v-Loading="loading" :height="426.8"> 279 <el-table :data="tableDataQy.data" border v-Loading="loading" :height="583">
280 <el-table-column label="序号" type="index" width="50" align="center"> 280 <el-table-column label="序号" type="index" width="50" align="center">
281 <template slot-scope="scope"> 281 <template slot-scope="scope">
282 {{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}} 282 {{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}}
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
315 </el-col> 315 </el-col>
316 </el-row> 316 </el-row>
317 </el-form> 317 </el-form>
318 <el-table :data="tableDataYh.data" border v-Loading="loading" :height="426.8"> 318 <el-table :data="tableDataYh.data" border v-Loading="loading" :height="583">
319 <el-table-column label="序号" type="index" width="50" align="center"> 319 <el-table-column label="序号" type="index" width="50" align="center">
320 <template slot-scope="scope"> 320 <template slot-scope="scope">
321 {{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}} 321 {{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}}
...@@ -613,40 +613,33 @@ ...@@ -613,40 +613,33 @@
613 Agencvy, 613 Agencvy,
614 PhotoB64 614 PhotoB64
615 } = JSON.parse(res) 615 } = JSON.parse(res)
616 this.ruleForm.sqrmc = Name; 616 this.ruleForm.qlrmc = Name;
617 this.ruleForm.zjzl = '1'; 617 this.ruleForm.zjzl = '1';
618 this.ruleForm.zjh = IdNo; 618 this.ruleForm.zjh = IdNo;
619 this.ruleForm.xb = getObjectByValue(this.dictData['A43'], Sex); 619 this.ruleForm.xb = getObjectByValue(this.dictData['A43'], Sex);
620 this.ruleForm.txdz = Address; 620 this.ruleForm.dz = Address;
621 this.ruleForm.fzjg = Agencvy; 621 this.ruleForm.fzjg = Agencvy;
622 this.ruleForm.avatar = 'data:image/png;base64,' + PhotoB64 622 this.ruleForm.avatar = 'data:image/png;base64,' + PhotoB64
623 if (this.ruleForm.sqrmc) {
624 this.$message({ 623 this.$message({
625 message: '读取成功!', 624 message: '读取成功!',
626 type: 'success' 625 type: 'success'
627 }) 626 })
628 } else { 627 } else {
629 this.$message({
630 message: '请重新放置身份证',
631 type: 'warning'
632 })
633 }
634 } else {
635 if (res.data.code == 0) { 628 if (res.data.code == 0) {
636 let data = res.data.IDCardInfo; 629 let data = res.data.IDCardInfo;
637 const { 630 const {
638 name, 631 name,
639 cardID: zjh, 632 cardID: zjh,
640 sexCode: xb, 633 sexCode: xb,
641 address: txdz, 634 address: dz,
642 issueOrgan: fzjg, 635 issueOrgan: fzjg,
643 photoBase64 636 photoBase64
644 } = data 637 } = data
645 this.ruleForm.sqrmc = name; 638 this.ruleForm.qlrmc = name;
646 this.ruleForm.zjzl = '1'; 639 this.ruleForm.zjzl = '1';
647 this.ruleForm.zjh = zjh; 640 this.ruleForm.zjh = zjh;
648 this.ruleForm.xb = xb 641 this.ruleForm.xb = xb
649 this.ruleForm.txdz = txdz; 642 this.ruleForm.dz = dz;
650 this.ruleForm.fzjg = fzjg; 643 this.ruleForm.fzjg = fzjg;
651 this.ruleForm.avatar = 'data:image/png;base64,' + photoBase64 644 this.ruleForm.avatar = 'data:image/png;base64,' + photoBase64
652 this.$message({ 645 this.$message({
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-12-14 14:12:58 4 * @LastEditTime: 2023-12-15 09:18:10
5 --> 5 -->
6 <template> 6 <template>
7 <dialogBox 7 <dialogBox
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
274 </el-col> 274 </el-col>
275 </el-row> 275 </el-row>
276 </el-form> 276 </el-form>
277 <el-table :data="tableDataQy.data" border v-Loading="loading" :height="426.8"> 277 <el-table :data="tableDataQy.data" border v-Loading="loading" :height="583">
278 <el-table-column label="序号" type="index" width="50" align="center"> 278 <el-table-column label="序号" type="index" width="50" align="center">
279 <template slot-scope="scope"> 279 <template slot-scope="scope">
280 {{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}} 280 {{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}}
...@@ -313,7 +313,7 @@ ...@@ -313,7 +313,7 @@
313 </el-col> 313 </el-col>
314 </el-row> 314 </el-row>
315 </el-form> 315 </el-form>
316 <el-table :data="tableDataYh.data" border v-Loading="loading" :height="426.8"> 316 <el-table :data="tableDataYh.data" border v-Loading="loading" :height="583">
317 <el-table-column label="序号" type="index" width="50" align="center"> 317 <el-table-column label="序号" type="index" width="50" align="center">
318 <template slot-scope="scope"> 318 <template slot-scope="scope">
319 {{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}} 319 {{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}}
...@@ -602,25 +602,18 @@ ...@@ -602,25 +602,18 @@
602 Agencvy, 602 Agencvy,
603 PhotoB64 603 PhotoB64
604 } = JSON.parse(res) 604 } = JSON.parse(res)
605 this.ruleForm.sqrmc = Name; 605 this.ruleForm.ywrmc = Name;
606 this.ruleForm.zjzl = '1'; 606 this.ruleForm.zjzl = '1';
607 this.ruleForm.zjh = IdNo; 607 this.ruleForm.zjh = IdNo;
608 this.ruleForm.xb = getObjectByValue(this.dictData['A43'], Sex); 608 this.ruleForm.xb = getObjectByValue(this.dictData['A43'], Sex);
609 this.ruleForm.txdz = Address; 609 this.ruleForm.txdz = Address;
610 this.ruleForm.fzjg = Agencvy; 610 this.ruleForm.fzjg = Agencvy;
611 this.ruleForm.avatar = 'data:image/png;base64,' + PhotoB64 611 this.ruleForm.avatar = 'data:image/png;base64,' + PhotoB64
612 if (this.ruleForm.sqrmc) {
613 this.$message({ 612 this.$message({
614 message: '读取成功!', 613 message: '读取成功!',
615 type: 'success' 614 type: 'success'
616 }) 615 })
617 } else { 616 } else {
618 this.$message({
619 message: '请重新放置身份证',
620 type: 'warning'
621 })
622 }
623 } else {
624 if (res.data.code == 0) { 617 if (res.data.code == 0) {
625 let data = res.data.IDCardInfo 618 let data = res.data.IDCardInfo
626 this.ruleForm.ywrmc = data.name 619 this.ruleForm.ywrmc = data.name
...@@ -629,6 +622,7 @@ ...@@ -629,6 +622,7 @@
629 this.ruleForm.xb = data.sexCode 622 this.ruleForm.xb = data.sexCode
630 this.ruleForm.txdz = data.address 623 this.ruleForm.txdz = data.address
631 this.ruleForm.fzjg = data.issueOrgan 624 this.ruleForm.fzjg = data.issueOrgan
625 this.ruleForm.avatar = 'data:image/png;base64,' + data.photoBase64
632 this.$message({ 626 this.$message({
633 message: '读取成功!', 627 message: '读取成功!',
634 type: 'success' 628 type: 'success'
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-09-28 15:15:37 4 * @LastEditTime: 2023-12-15 09:10:28
5 --> 5 -->
6 <template> 6 <template>
7 <div> 7 <div>
...@@ -260,7 +260,42 @@ ...@@ -260,7 +260,42 @@
260 * @author: renchao 260 * @author: renchao
261 */ 261 */
262 readClick (row) { 262 readClick (row) {
263 getIdCardInfo().then(res => { 263 function getObjectByValue (arrayOfObjects, value) {
264 var name = ''
265 arrayOfObjects.forEach(item => {
266 if (item.dname.includes(value)) name = item.dcode
267 })
268 return name
269 }
270 getIdCardInfo(this.BASE_API.gaopaiyi).then(res => {
271 if (this.BASE_API.gaopaiyi == 'jy') {
272 const {
273 Name,
274 IdNo,
275 Sex,
276 Address,
277 Agencvy,
278 PhotoB64
279 } = JSON.parse(res)
280 row.qlrmc = Name;
281 row.zjzl = '1';
282 row.zjh = IdNo;
283 row.xb = getObjectByValue(this.dictData['A43'], Sex);
284 row.dz = Address;
285 row.fzjg = Agencvy;
286 row.avatar = 'data:image/png;base64,' + PhotoB64
287 if (row.qlrmc) {
288 this.$message({
289 message: '读取成功!',
290 type: 'success'
291 })
292 } else {
293 this.$message({
294 message: '请重新放置身份证',
295 type: 'warning'
296 })
297 }
298 } else {
264 if (res.data.code == 0) { 299 if (res.data.code == 0) {
265 let data = res.data.IDCardInfo 300 let data = res.data.IDCardInfo
266 row.qlrmc = data.name 301 row.qlrmc = data.name
...@@ -269,6 +304,7 @@ ...@@ -269,6 +304,7 @@
269 row.xb = data.sexCode 304 row.xb = data.sexCode
270 row.dz = data.address 305 row.dz = data.address
271 row.fzjg = data.issueOrgan 306 row.fzjg = data.issueOrgan
307 row.avatar = 'data:image/png;base64,' + data.photoBase64
272 this.$message({ 308 this.$message({
273 message: '读取成功!', 309 message: '读取成功!',
274 type: 'success' 310 type: 'success'
...@@ -279,6 +315,8 @@ ...@@ -279,6 +315,8 @@
279 type: 'warning' 315 type: 'warning'
280 }) 316 })
281 } 317 }
318 }
319 this.$emit('upDateQlrxxList', this.tableDataList)
282 }) 320 })
283 }, 321 },
284 /** 322 /**
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-09-28 15:15:21 4 * @LastEditTime: 2023-12-15 09:10:42
5 --> 5 -->
6 <template> 6 <template>
7 <div> 7 <div>
...@@ -178,27 +178,19 @@ ...@@ -178,27 +178,19 @@
178 let that = this; 178 let that = this;
179 this.$nextTick(() => { 179 this.$nextTick(() => {
180 if (val.length == 0 || !val) { 180 if (val.length == 0 || !val) {
181 that.tableDataList = _.cloneDeep([ 181 that.tableDataList = _.cloneDeep([])
182 // {
183 // ywrmc: "",
184 // dlrzjlx: "",
185 // dlrzjh: "",
186 // fr: "",
187 // },
188 ]);
189 } else { 182 } else {
190 that.tableDataList = _.cloneDeep(val); 183 that.tableDataList = _.cloneDeep(val)
191 } 184 }
192 }); 185 })
193 }, 186 },
194 immediate: true, 187 immediate: true,
195 deep: true, 188 deep: true
196 }, 189 },
197 gyfs: { 190 gyfs: {
198 handler (newVal, oldValue) { 191 handler (newVal, oldValue) {
199 let dataList = _.cloneDeep(this.InformationTable); 192 let dataList = _.cloneDeep(this.InformationTable);
200 if (newVal == 0) { 193 if (newVal == 0) {
201 // this.column = _.cloneDeep(dataList).slice(1, dataList.length)
202 this.column = _.cloneDeep(dataList); 194 this.column = _.cloneDeep(dataList);
203 } else if (newVal == "1" || newVal == "3") { 195 } else if (newVal == "1" || newVal == "3") {
204 this.column = dataList; 196 this.column = dataList;
...@@ -261,7 +253,42 @@ ...@@ -261,7 +253,42 @@
261 * @author: renchao 253 * @author: renchao
262 */ 254 */
263 readClick (row) { 255 readClick (row) {
264 getIdCardInfo().then(res => { 256 function getObjectByValue (arrayOfObjects, value) {
257 var name = ''
258 arrayOfObjects.forEach(item => {
259 if (item.dname.includes(value)) name = item.dcode
260 })
261 return name
262 }
263 getIdCardInfo(this.BASE_API.gaopaiyi).then(res => {
264 if (this.BASE_API.gaopaiyi == 'jy') {
265 const {
266 Name,
267 IdNo,
268 Sex,
269 Address,
270 Agencvy,
271 PhotoB64
272 } = JSON.parse(res)
273 row.ywrmc = Name;
274 row.zjzl = '1';
275 row.zjh = IdNo;
276 row.xb = getObjectByValue(this.dictData['A43'], Sex);
277 row.txdz = Address;
278 row.fzjg = Agencvy;
279 row.avatar = 'data:image/png;base64,' + PhotoB64
280 if (row.ywrmc) {
281 this.$message({
282 message: '读取成功!',
283 type: 'success'
284 })
285 } else {
286 this.$message({
287 message: '请重新放置身份证',
288 type: 'warning'
289 })
290 }
291 } else {
265 if (res.data.code == 0) { 292 if (res.data.code == 0) {
266 let data = res.data.IDCardInfo 293 let data = res.data.IDCardInfo
267 row.ywrmc = data.name 294 row.ywrmc = data.name
...@@ -270,6 +297,7 @@ ...@@ -270,6 +297,7 @@
270 row.xb = data.sexCode 297 row.xb = data.sexCode
271 row.txdz = data.address 298 row.txdz = data.address
272 row.fzjg = data.issueOrgan 299 row.fzjg = data.issueOrgan
300 row.avatar = 'data:image/png;base64,' + data.photoBase64
273 this.$message({ 301 this.$message({
274 message: '读取成功!', 302 message: '读取成功!',
275 type: 'success' 303 type: 'success'
...@@ -280,6 +308,8 @@ ...@@ -280,6 +308,8 @@
280 type: 'warning' 308 type: 'warning'
281 }) 309 })
282 } 310 }
311 }
312 this.$emit("upDateQlrxxList", this.tableDataList)
283 }) 313 })
284 }, 314 },
285 315
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-12-14 13:49:58 4 * @LastEditTime: 2023-12-15 09:01:05
5 --> 5 -->
6 <template> 6 <template>
7 <div> 7 <div>
...@@ -297,6 +297,7 @@ ...@@ -297,6 +297,7 @@
297 }) 297 })
298 } 298 }
299 } 299 }
300 this.$emit('upDateQlrxxList', this.tableDataList)
300 }) 301 })
301 }, 302 },
302 /** 303 /**
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-12-14 14:01:29 4 * @LastEditTime: 2023-12-15 09:02:50
5 --> 5 -->
6 <template> 6 <template>
7 <div> 7 <div>
...@@ -268,6 +268,7 @@ ...@@ -268,6 +268,7 @@
268 }) 268 })
269 } 269 }
270 } 270 }
271 this.$emit('upDateQlrxxList', this.tableDataList)
271 }) 272 })
272 }, 273 },
273 /** 274 /**
......