From d018fd83920fe298008bf27a61d99f07154ecc56 Mon Sep 17 00:00:00 2001
From: ZhaoTongYao <531131322@qq.com>
Date: Mon, 23 Aug 2021 18:42:27 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E5=88=B7=E6=96=B0=EF=BC=9B=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=89=8B=E6=9C=BA=E5=8F=B7=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/epidemic/persontesting.vue | 4 +--
src/views/modules/epidemic/reader.vue | 32 +++++++++++++++-----
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/src/views/modules/epidemic/persontesting.vue b/src/views/modules/epidemic/persontesting.vue
index e380432..4583452 100644
--- a/src/views/modules/epidemic/persontesting.vue
+++ b/src/views/modules/epidemic/persontesting.vue
@@ -59,7 +59,7 @@
-
+
@@ -83,7 +83,7 @@
-
+
diff --git a/src/views/modules/epidemic/reader.vue b/src/views/modules/epidemic/reader.vue
index 5cccffe..4067e81 100644
--- a/src/views/modules/epidemic/reader.vue
+++ b/src/views/modules/epidemic/reader.vue
@@ -1,5 +1,5 @@
-
+
连接
@@ -54,7 +54,7 @@
-->
- {{ $t('cancel') }}
+ {{ $t('cancel') }}
{{ $t('confirm') }}
@@ -86,7 +86,7 @@ export default {
// result: ''
},
imageSrc: '',
- connectStatus: false // 是否已经连接设备
+ connectStatus: false, // 是否已经连接设备
}
},
computed: {
@@ -124,11 +124,15 @@ export default {
this.btnAble = false
this.visible = true
this.connect()
- this.$refs['dataForm'].resetFields()
- this.imageSrc = ''
+ this.$nextTick(() => {
+ this.$refs['dataForm'].resetFields()
+ this.imageSrc = ''
+ })
},
handleClose () {
// this.disconnect()
+ this.visible = false
+ this.$emit('refreshDataList')
},
formatDate (str) {
return str.substring(0,4) + '-' + str.substring(4,6) + '-' + str.substring(6,8)
@@ -156,6 +160,9 @@ export default {
// message: res.errorMsg,
// type: 'success'
// })
+ if (!this.dataForm.idcard) {
+ this.getMobileById(res.certNumber)
+ }
this.dataForm.name = res.partyName
this.dataForm.sex = res.gender
this.dataForm.nation = res.nation,
@@ -165,8 +172,11 @@ export default {
this.dataForm.organ = res.certOrg
this.dataForm.imgCode = res.identityPic
this.imageSrc = 'data:image/png;base64,' + this.dataForm.imgCode
+ console.log('读卡成功', this.dataForm.idcard)
} else {
- this.$message.error(res.errorMsg)
+ // this.$message.error(res.errorMsg)
+ this.$refs['dataForm'].resetFields()
+ this.imageSrc = ''
}
}).catch(() => {
this.$message.error('读取失败')
@@ -200,6 +210,14 @@ export default {
this.$message.error('断开失败')
})
},
+ getMobileById (idcard) {
+ this.$http.get(`/custom/persontesting/getMobileByIdCard?idcard=${idcard}`).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.dataForm.mobile = res.data || ''
+ }).catch(() => {})
+ },
// 表单提交
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
@@ -218,7 +236,7 @@ export default {
duration: 500,
onClose: () => {
// this.visible = false
- // this.$emit('refreshDataList')
+ this.$emit('refreshDataList')
this.$refs['dataForm'].resetFields()
this.imageSrc = ''
}
From 965cde37f479fc8ff411bb5b33dcd3cdde278f67 Mon Sep 17 00:00:00 2001
From: Jackwang
Date: Mon, 23 Aug 2021 19:05:36 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/epidemic/persontesting-add-or-update.vue | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/views/modules/epidemic/persontesting-add-or-update.vue b/src/views/modules/epidemic/persontesting-add-or-update.vue
index 107f4b0..78724f6 100644
--- a/src/views/modules/epidemic/persontesting-add-or-update.vue
+++ b/src/views/modules/epidemic/persontesting-add-or-update.vue
@@ -200,6 +200,8 @@
},
methods: {
init() {
+ this.$set(this.dataForm,'testingTime', new Date())
+ console.log(this.dataForm.testingTime)
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
From 955f8bc8b40e1530a9255a114ea551b33914e432 Mon Sep 17 00:00:00 2001
From: ZhaoTongYao <531131322@qq.com>
Date: Mon, 23 Aug 2021 19:15:48 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/epidemic/persontesting-add-or-update.vue | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/views/modules/epidemic/persontesting-add-or-update.vue b/src/views/modules/epidemic/persontesting-add-or-update.vue
index 78724f6..367aa1d 100644
--- a/src/views/modules/epidemic/persontesting-add-or-update.vue
+++ b/src/views/modules/epidemic/persontesting-add-or-update.vue
@@ -190,6 +190,7 @@
}
},
created() {
+ console.log('add')
// this.visible = true
this.$nextTick(() => {
// this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null
@@ -200,11 +201,11 @@
},
methods: {
init() {
- this.$set(this.dataForm,'testingTime', new Date())
- console.log(this.dataForm.testingTime)
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
+ // this.$set(this.dataForm,'testingTime', new Date())
+ this.dataForm.testingTime = new Date()
if (this.dataForm.id) {
this.getInfo()
}