From 5eb9e8454cca4fb93482eeef1983ed00193289a4 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Mon, 10 Apr 2023 14:15:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=B2=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/gate/visitlist.vue | 8 +---- src/views/visit/component/showVisit.vue | 44 +++++++++++++++++-------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/src/views/gate/visitlist.vue b/src/views/gate/visitlist.vue index c6236e8..d7d5a8e 100644 --- a/src/views/gate/visitlist.vue +++ b/src/views/gate/visitlist.vue @@ -68,7 +68,6 @@ data() { return { fullscreen: false, - clientHeight: 0, gateShow: false, gateAdminId: '', gateName: "", @@ -100,11 +99,7 @@ this.getToday() // this.enterfullscreen() }, - methods: { - init() { - let clientHeight = document.documentElement.clientHeight; - this.clientHeight = clientHeight - }, + methods: { openList(){ this.$refs.list.listShow = true }, @@ -203,7 +198,6 @@ console.log(res) console.log(res.data) if(!res.data){ - return } let data1 = res.data?res.data.split('"IDNumber"'):'' diff --git a/src/views/visit/component/showVisit.vue b/src/views/visit/component/showVisit.vue index aaf658d..732b170 100644 --- a/src/views/visit/component/showVisit.vue +++ b/src/views/visit/component/showVisit.vue @@ -46,7 +46,7 @@ - @@ -64,7 +64,7 @@ - @@ -406,7 +406,7 @@ },{ label: "停车牌", prop: "car_no", - width: 420, + width: 400, customFn: (row, scope) => { return ( @@ -421,7 +421,7 @@ },{ label: "入场牌", prop: "person_no", - width: 420, + width: 400, customFn: (row, scope) => { return ( @@ -489,17 +489,30 @@ this.getDetail() } - if (this.formDataType == 'coderecord') { + if (this.formDataType == 'coderecord') { + console.log("123") + console.log(this.form) this.codeForm.code = this.form.code this.codeForm.admin_id = parseInt(this.gateAdminId) this.codeForm.type = this.form.audit_status == 1 ? 1 : (this.form.audit_status == 3 ? 2 : '') - this.codeForm.person_no.push({name:this.form.name,person_no:''}) - for(var k of this.form.follw_people){ - this.codeForm.person_no.push({name:k.name,person_no:''}) + if(this.codeForm.type==1){ + this.codeForm.person_no.push({name:this.form.name,person_no:''}) + for(var k of this.form.follw_people){ + this.codeForm.person_no.push({name:k.name,person_no:''}) + } + for(var m of this.form.cars){ + this.codeForm.car_no.push({car:m,car_no:''}) + } + }else{ + for(var k of this.form.person_no){ + this.codeForm.person_no.push(JSON.parse(k)) + } + for(var m of this.form.car_no){ + this.codeForm.car_no.push(JSON.parse(m)) + } + } - for(var m of this.form.cars){ - this.codeForm.car_no.push({car:m,car_no:''}) - } + } } else { this.reset() @@ -555,7 +568,11 @@ this.formDataType = '' this.checkForm = {} this.check_admin_name = '' - this.codeForm = {} + this.codeForm = { + type: 1, + car_no: [], + person_no: [] + } this.codeType = '' this.gateAdminId = '' this.isShow = false @@ -577,8 +594,7 @@ codeSubmit() { let that = this console.log(this.codeForm) - console.log(this.codeForm.person_no) - return + console.log(this.codeForm.person_no) cancelCode({ ...that.codeForm }).then(res => {