master
lion 1 week ago
parent dc37f4822e
commit a34129c6cf

@ -2,5 +2,5 @@
ENV = 'development'
# base api与测试/正式环境同一后端域名)
VUE_APP_BASE_API = http://yxbd-fangke.ali251.langye.net
VUE_APP_UPLOAD_API = http://yxbd-fangke.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API = https://yxbd-fangke.ali251.langye.net
VUE_APP_UPLOAD_API = https://yxbd-fangke.ali251.langye.net/api/admin/upload-file

@ -1,8 +1,8 @@
<template>
<div>
<div class="gatewrap">
<div class="gateLeft">
<span @click='openList'>今日访客</span>
<div class="gatewrap">
<div class="gateLeft">
<span @click='openList'>今日访客</span>
</div>
<div class="gateRight">
<span>
@ -51,9 +51,9 @@
</div>
</template>
<script>
import Cookies from 'js-cookie'
import Cookies from 'js-cookie'
import axios from 'axios'
import showVisit from '@/views/visit/component/showVisit'
import showVisit from '@/views/visit/component/showVisit'
import list from '@/views/gate/components/list.vue'
import {
getList,
@ -61,8 +61,8 @@
} from '@/api/gate'
export default {
components: {
showVisit,
list
showVisit,
list
},
data() {
@ -99,9 +99,9 @@
this.getToday()
// this.enterfullscreen()
},
methods: {
openList(){
this.$refs.list.listShow = true
methods: {
openList(){
this.$refs.list.listShow = true
},
getToday() {
let now = new Date()
@ -140,7 +140,7 @@
this.$refs['showVisit'].form = k
this.$refs['showVisit'].formDataType = 'coderecord'
this.$refs['showVisit'].gateAdminId = this.gateAdminId
this.$refs['showVisit'].isShow = true
this.$refs['showVisit'].isShow = true
return
} else {
this.$successMessage(k.audit_status_text, '', 'success')
@ -148,8 +148,8 @@
}
} else {
this.$successMessage("未查询到记录", '', 'warning')
}
this.select.code = ''
}
this.select.code = ''
this.select.idcard = ''
},
async getUserList() {
@ -187,27 +187,27 @@
})
this.gateShow = false
},
getIdcard() {
let that = this
axios.get('https://127.0.0.1:24011/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1',{
'headers':{
"Content-Type":'application/json'
}
})
.then(res=>{
console.log(res)
console.log(res.data)
if(!res.data){
return
}
let data1 = res.data?res.data.split('"IDNumber"'):''
let data2= data1[1].split(",")
let data3 =data2[0].replace(/[^\d]/g, "")
that.select.idcard = data3
that.getList()
}).catch(err=>{
console.log(err)
this.$successMessage(err.statusText, '', 'warning')
getIdcard() {
let that = this
axios.get('https://127.0.0.1:24011/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1',{
'headers':{
"Content-Type":'application/json'
}
})
.then(res=>{
console.log(res)
console.log(res.data)
if(!res.data){
return
}
let data1 = res.data?res.data.split('"IDNumber"'):''
let data2= data1[1].split(",")
let data3 =data2[0].replace(/[^\d]/g, "")
that.select.idcard = data3
that.getList()
}).catch(err=>{
console.log(err)
this.$successMessage(err.statusText, '', 'warning')
})
},
screen() {
@ -309,15 +309,15 @@
margin-left: 5px;
}
.gateRight span>span {
text-decoration: underline;
text-decoration: underline;
color:#004593
}
.gateLeft{
position: absolute;
left: 20px;
top: 20px;
font-size: 20px;
color:#004593
.gateLeft{
position: absolute;
left: 20px;
top: 20px;
font-size: 20px;
color:#004593
}
/deep/ .el-input {
width: 400px !important;
@ -360,4 +360,4 @@
font-size: 32px;
height: 70px
}
</style>
</style>

@ -642,6 +642,12 @@
this.getLabel()
},
methods: {
syncCarsToForm() {
//
this.form.cars = (this.carsList || [])
.map(item => (item && item.car ? String(item.car).trim() : ""))
.filter(Boolean)
},
async getDetail() {
const res = await show({
@ -818,6 +824,7 @@
},
submit() {
let that = this
this.syncCarsToForm()
if(that.form.credent==1){
const regtest = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
if(!regtest.test(that.form.idcard)){
@ -833,11 +840,7 @@
}
}
that.form.follw_people = that.followList
let _car = []
for(var k of that.carsList){
_car.push(k.car)
}
this.form.cars = _car
this.syncCarsToForm()
console.log("this.form.cars",this.form.cars)
// return
if(this.visitType==3){
@ -859,6 +862,12 @@
}
},
watch: {
carsList: {
deep: true,
handler() {
this.syncCarsToForm()
}
},
isShow(newVal) {
if (newVal) {
console.log("this.visitType",this.visitType)

Loading…
Cancel
Save