02bd9b35 by renchao@pashanhoo.com

style:身份证打卡器

1 parent 484e387e
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-12-14 14:12:33
* @LastEditTime: 2023-12-15 09:17:46
-->
<template>
<dialogBox
......@@ -276,7 +276,7 @@
</el-col>
</el-row>
</el-form>
<el-table :data="tableDataQy.data" border v-Loading="loading" :height="426.8">
<el-table :data="tableDataQy.data" border v-Loading="loading" :height="583">
<el-table-column label="序号" type="index" width="50" align="center">
<template slot-scope="scope">
{{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}}
......@@ -315,7 +315,7 @@
</el-col>
</el-row>
</el-form>
<el-table :data="tableDataYh.data" border v-Loading="loading" :height="426.8">
<el-table :data="tableDataYh.data" border v-Loading="loading" :height="583">
<el-table-column label="序号" type="index" width="50" align="center">
<template slot-scope="scope">
{{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}}
......@@ -613,40 +613,33 @@
Agencvy,
PhotoB64
} = JSON.parse(res)
this.ruleForm.sqrmc = Name;
this.ruleForm.qlrmc = Name;
this.ruleForm.zjzl = '1';
this.ruleForm.zjh = IdNo;
this.ruleForm.xb = getObjectByValue(this.dictData['A43'], Sex);
this.ruleForm.txdz = Address;
this.ruleForm.dz = Address;
this.ruleForm.fzjg = Agencvy;
this.ruleForm.avatar = 'data:image/png;base64,' + PhotoB64
if (this.ruleForm.sqrmc) {
this.$message({
message: '读取成功!',
type: 'success'
})
} else {
this.$message({
message: '请重新放置身份证',
type: 'warning'
})
}
} else {
if (res.data.code == 0) {
let data = res.data.IDCardInfo;
const {
name,
cardID: zjh,
sexCode: xb,
address: txdz,
address: dz,
issueOrgan: fzjg,
photoBase64
} = data
this.ruleForm.sqrmc = name;
this.ruleForm.qlrmc = name;
this.ruleForm.zjzl = '1';
this.ruleForm.zjh = zjh;
this.ruleForm.xb = xb
this.ruleForm.txdz = txdz;
this.ruleForm.dz = dz;
this.ruleForm.fzjg = fzjg;
this.ruleForm.avatar = 'data:image/png;base64,' + photoBase64
this.$message({
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-12-14 14:12:58
* @LastEditTime: 2023-12-15 09:18:10
-->
<template>
<dialogBox
......@@ -274,7 +274,7 @@
</el-col>
</el-row>
</el-form>
<el-table :data="tableDataQy.data" border v-Loading="loading" :height="426.8">
<el-table :data="tableDataQy.data" border v-Loading="loading" :height="583">
<el-table-column label="序号" type="index" width="50" align="center">
<template slot-scope="scope">
{{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}}
......@@ -313,7 +313,7 @@
</el-col>
</el-row>
</el-form>
<el-table :data="tableDataYh.data" border v-Loading="loading" :height="426.8">
<el-table :data="tableDataYh.data" border v-Loading="loading" :height="583">
<el-table-column label="序号" type="index" width="50" align="center">
<template slot-scope="scope">
{{(pageData.currentPage - 1) * pageData.pageSize + scope.$index + 1}}
......@@ -602,25 +602,18 @@
Agencvy,
PhotoB64
} = JSON.parse(res)
this.ruleForm.sqrmc = Name;
this.ruleForm.ywrmc = Name;
this.ruleForm.zjzl = '1';
this.ruleForm.zjh = IdNo;
this.ruleForm.xb = getObjectByValue(this.dictData['A43'], Sex);
this.ruleForm.txdz = Address;
this.ruleForm.fzjg = Agencvy;
this.ruleForm.avatar = 'data:image/png;base64,' + PhotoB64
if (this.ruleForm.sqrmc) {
this.$message({
message: '读取成功!',
type: 'success'
})
} else {
this.$message({
message: '请重新放置身份证',
type: 'warning'
})
}
} else {
if (res.data.code == 0) {
let data = res.data.IDCardInfo
this.ruleForm.ywrmc = data.name
......@@ -629,6 +622,7 @@
this.ruleForm.xb = data.sexCode
this.ruleForm.txdz = data.address
this.ruleForm.fzjg = data.issueOrgan
this.ruleForm.avatar = 'data:image/png;base64,' + data.photoBase64
this.$message({
message: '读取成功!',
type: 'success'
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-28 15:15:37
* @LastEditTime: 2023-12-15 09:10:28
-->
<template>
<div>
......@@ -260,7 +260,42 @@
* @author: renchao
*/
readClick (row) {
getIdCardInfo().then(res => {
function getObjectByValue (arrayOfObjects, value) {
var name = ''
arrayOfObjects.forEach(item => {
if (item.dname.includes(value)) name = item.dcode
})
return name
}
getIdCardInfo(this.BASE_API.gaopaiyi).then(res => {
if (this.BASE_API.gaopaiyi == 'jy') {
const {
Name,
IdNo,
Sex,
Address,
Agencvy,
PhotoB64
} = JSON.parse(res)
row.qlrmc = Name;
row.zjzl = '1';
row.zjh = IdNo;
row.xb = getObjectByValue(this.dictData['A43'], Sex);
row.dz = Address;
row.fzjg = Agencvy;
row.avatar = 'data:image/png;base64,' + PhotoB64
if (row.qlrmc) {
this.$message({
message: '读取成功!',
type: 'success'
})
} else {
this.$message({
message: '请重新放置身份证',
type: 'warning'
})
}
} else {
if (res.data.code == 0) {
let data = res.data.IDCardInfo
row.qlrmc = data.name
......@@ -269,6 +304,7 @@
row.xb = data.sexCode
row.dz = data.address
row.fzjg = data.issueOrgan
row.avatar = 'data:image/png;base64,' + data.photoBase64
this.$message({
message: '读取成功!',
type: 'success'
......@@ -279,6 +315,8 @@
type: 'warning'
})
}
}
this.$emit('upDateQlrxxList', this.tableDataList)
})
},
/**
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-28 15:15:21
* @LastEditTime: 2023-12-15 09:10:42
-->
<template>
<div>
......@@ -178,27 +178,19 @@
let that = this;
this.$nextTick(() => {
if (val.length == 0 || !val) {
that.tableDataList = _.cloneDeep([
// {
// ywrmc: "",
// dlrzjlx: "",
// dlrzjh: "",
// fr: "",
// },
]);
that.tableDataList = _.cloneDeep([])
} else {
that.tableDataList = _.cloneDeep(val);
that.tableDataList = _.cloneDeep(val)
}
});
})
},
immediate: true,
deep: true,
deep: true
},
gyfs: {
handler (newVal, oldValue) {
let dataList = _.cloneDeep(this.InformationTable);
if (newVal == 0) {
// this.column = _.cloneDeep(dataList).slice(1, dataList.length)
this.column = _.cloneDeep(dataList);
} else if (newVal == "1" || newVal == "3") {
this.column = dataList;
......@@ -261,7 +253,42 @@
* @author: renchao
*/
readClick (row) {
getIdCardInfo().then(res => {
function getObjectByValue (arrayOfObjects, value) {
var name = ''
arrayOfObjects.forEach(item => {
if (item.dname.includes(value)) name = item.dcode
})
return name
}
getIdCardInfo(this.BASE_API.gaopaiyi).then(res => {
if (this.BASE_API.gaopaiyi == 'jy') {
const {
Name,
IdNo,
Sex,
Address,
Agencvy,
PhotoB64
} = JSON.parse(res)
row.ywrmc = Name;
row.zjzl = '1';
row.zjh = IdNo;
row.xb = getObjectByValue(this.dictData['A43'], Sex);
row.txdz = Address;
row.fzjg = Agencvy;
row.avatar = 'data:image/png;base64,' + PhotoB64
if (row.ywrmc) {
this.$message({
message: '读取成功!',
type: 'success'
})
} else {
this.$message({
message: '请重新放置身份证',
type: 'warning'
})
}
} else {
if (res.data.code == 0) {
let data = res.data.IDCardInfo
row.ywrmc = data.name
......@@ -270,6 +297,7 @@
row.xb = data.sexCode
row.txdz = data.address
row.fzjg = data.issueOrgan
row.avatar = 'data:image/png;base64,' + data.photoBase64
this.$message({
message: '读取成功!',
type: 'success'
......@@ -280,6 +308,8 @@
type: 'warning'
})
}
}
this.$emit("upDateQlrxxList", this.tableDataList)
})
},
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-12-14 13:49:58
* @LastEditTime: 2023-12-15 09:01:05
-->
<template>
<div>
......@@ -297,6 +297,7 @@
})
}
}
this.$emit('upDateQlrxxList', this.tableDataList)
})
},
/**
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-12-14 14:01:29
* @LastEditTime: 2023-12-15 09:02:50
-->
<template>
<div>
......@@ -268,6 +268,7 @@
})
}
}
this.$emit('upDateQlrxxList', this.tableDataList)
})
},
/**
......