master
lion 3 years ago
parent 5ee735adde
commit b44c717151

@ -0,0 +1,220 @@
<template>
<div style="padding: 0 20px" class="listwrap">
<el-dialog title="今日访客" :visible.sync="listShow" width="80%">
<xy-table :table-item="table" :list="data" :total="total" :height="tableHeights"
:auths='[]'
:is-page='false'
@pageSizeChange="e => {select.rows = e;select.page = 1;getList()}"
@pageIndexChange="e => {select.page = e;getList()}">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="listShow = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getList
} from '@/api/gate'
export default {
components: {},
data() {
return {
listShow:false,
tableHeights: 0,
select: {
page: 1,
rows: 999,
keyword: "",
audit_status: "",
start_date: "",
end_date: "",
is_export: 0
},
selectRange: [],
statusList: [{
id: -1,
value: '待学习'
},
{
id: 0,
value: '待审核'
},
{
id: 1,
value: '通过(待进厂)'
},
{
id: 2,
value: '驳回'
},
{
id: 3,
value: '已进厂'
},
{
id: 4,
value: '已离厂'
}
],
total: 0,
data: [],
table: [{
label: '序号',
type: "index",
fixed: "left",
width: 80
},
{
label: '姓名',
sortable: false,
prop: 'name',
fixed: "left",
width: 120
},
{
label: '类型',
sortable: false,
prop: 'type_text',
width: 120
},
{
label: '状态',
sortable: false,
prop: 'audit_status_text',
width: 120
},
{
label: '是否随访',
sortable: false,
prop: 'follw_people',
width: 80,
formatter: (cell, data, value) => {
return value ? '是' : '否'
}
},
{
label: '预约时间',
sortable: false,
prop: 'date',
width: 120
},
{
label: '证件类型',
sortable: false,
prop: 'credent',
width: 120,
formatter: (cell, data, value) => {
return value == 1 ? '身份证' : '护照'
},
},
{
label: '证件号',
sortable: false,
prop: 'idcard',
width: 180
},
{
label: '手机号',
sortable: false,
prop: 'mobile',
width: 120
},
{
label: '单位名称',
sortable: false,
prop: 'company_name',
width: 180
},
{
label: '开始时间',
sortable: false,
prop: 'start_date',
width: 180
},
{
label: '结束时间',
sortable: false,
prop: 'end_date',
width: 180
},
{
label: '创建时间',
sortable: false,
prop: 'created_at',
width: 180
}
// {
// label: '',
// sortable: false,
// prop: 'admin_id',
// width: 120
// }
]
}
},
computed: {},
mounted() {
},
created() {
this.tableHeight()
this.getToday()
// this.getList()
},
watch:{
listShow(newval){
if(newval){
this.getList()
}
}
},
methods: {
getToday() {
let now = new Date()
let nowDay = this.$moment(now).format("YYYY-MM-DD")
this.select.start_date = nowDay
this.select.end_date = nowDay
this.selectRange = [nowDay, nowDay]
},
async getList() {
let res = await getList(this.select)
this.data = res.data
this.total = res.total
},
selectRangeM(val) {
console.log(val)
if (val) {
this.select.start_date = val[0]
this.select.end_date = val[1]
} else {
this.select.start_date = ""
this.select.end_date = ""
}
},
tableHeight(val) {
this.$nextTick(function() {
let clientHeight = document.documentElement.clientHeight;
let paginationHeight = 37; //
let topHeight = 50; //
this.tableHeights = clientHeight*.5
console.log(this.tableHeights)
})
}
},
}
</script>
<style scoped>
.listwrap .el-button{
}
</style>

@ -1,6 +1,9 @@
<template>
<div>
<div class="gatewrap">
<div class="gatewrap">
<div class="gateLeft">
<span @click='openList'>今日访客</span>
</div>
<div class="gateRight">
<span>
{{gateName}}<span @click="gateShow = true">切换</span>
@ -34,7 +37,7 @@
</div>
<showVisit ref="showVisit" @refresh='clearCode'></showVisit>
<list ref='list'></list>
<!-- 选择门岗人员 -->
<el-dialog title="请先选择门岗人员" :visible.sync="gateShow" width="60%" :close-on-click-modal='false' :show-close='false'>
<el-radio-group v-model="gateAdminId">
@ -50,14 +53,17 @@
<script>
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,
getUserList
} from '@/api/gate'
export default {
components: {
showVisit
showVisit,
list
},
data() {
return {
@ -98,6 +104,9 @@
init() {
let clientHeight = document.documentElement.clientHeight;
this.clientHeight = clientHeight
},
openList(){
this.$refs.list.listShow = true
},
getToday() {
let now = new Date()
@ -133,7 +142,7 @@
if (this.data.length > 0) {
for (var k of this.data) {
if (k.audit_status == 1 || k.audit_status == 3) {
this.$refs['showVisit'].form = this.data[0]
this.$refs['showVisit'].form = k
this.$refs['showVisit'].formDataType = 'coderecord'
this.$refs['showVisit'].gateAdminId = this.gateAdminId
this.$refs['showVisit'].isShow = true
@ -178,7 +187,6 @@
gateName: this.gateName,
gateAdminId: this.gateAdminId
})
this.$nextTick(() => {
this.$refs.codeInput.focus()
})
@ -306,11 +314,17 @@
margin-right: 10px;
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
}
/deep/ .el-input {
width: 400px !important;
}
@ -321,7 +335,7 @@
width: 400px;
}
/deep/ .el-button {
/deep/ .gatewrap .el-button {
vertical-align: top;
height: 45px;
width: 145px;

@ -27,78 +27,13 @@
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>详情内容
</div>
<div class="xy-table-item-content">
<el-input :autosize="{minRows:2}" type="textarea" v-model="form.value" placeholder="请输入详情内容" clearable
style="width: 300px;"></el-input>
<!-- <el-input v-model="form.value" placeholder="请输入详情内容" clearable style="width: 300px;"></el-input> -->
<div class="xy-table-item-content" style="width: 680px;">
<xyTinymce v-if="isShow" :height="200" v-model="form.value"></xyTinymce>
<!-- <el-input :autosize="{minRows:2}" type="textarea" v-model="form.value" placeholder="请输入详情内容" clearable
style="width: 300px;"></el-input> -->
</div>
</div>
</template>
<!-- <template v-slot:studyName>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>访客开放时间
</div>
<div class="xy-table-item-content">
<el-input v-model="form.studyName" placeholder="请输入访客开放时间" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:studyName1>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>随访人员最大数量
</div>
<div class="xy-table-item-content">
<el-input v-model="form.studyName1" type="number" placeholder="请输入随访人员最大数量" clearable style=""></el-input>
</div>
</div>
</template>
<template v-slot:studyName2>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>单次预约可进车辆数量
</div>
<div class="xy-table-item-content">
<el-input v-model="form.studyName2" type="number" placeholder="请输入单次预约可进车辆数量" clearable style=""></el-input>
</div>
</div>
</template>
<template v-slot:recommend>
<div class="xy-table-item">
<div class="xy-table-item-label">
普通访客须知
</div>
<div class="xy-table-item-content">
<el-input :autosize="{minRows:2}" type="textarea" v-model="form.recommend" placeholder="请输入学习内容" clearable
style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:recommend1>
<div class="xy-table-item">
<div class="xy-table-item-label">
施工访客须知
</div>
<div class="xy-table-item-content">
<el-input :autosize="{minRows:2}" type="textarea" v-model="form.recommend1" placeholder="请输入学习内容" clearable
style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:recommend2>
<div class="xy-table-item">
<div class="xy-table-item-label">
物流访客须知
</div>
<div class="xy-table-item-content">
<el-input :autosize="{minRows:2}" type="textarea" v-model="form.recommend2" placeholder="请输入学习内容" clearable
style="width: 300px;"></el-input>
</div>
</div>
</template> -->
</xy-dialog>
@ -109,9 +44,12 @@
import {
show,
save
} from "@/api/resource/bd.js"
} from "@/api/resource/bd.js"
import xyTinymce from "@/components/XyTinymce/index.vue";
export default {
components: {},
components: {
xyTinymce
},
data() {
return {
isShow: false,
@ -149,7 +87,9 @@
id: this.id
})
this.form = {
name:res?.name,
key:res?.key,
value:res?.value
}
},
submit() {

@ -118,8 +118,11 @@
}, {
label: '创建人',
sortable: false,
prop: 'admin',
width: 180
prop: 'admin.name',
width: 120,
formatter(cell, data, value){
return value?value:''
}
}
]
}

@ -227,8 +227,11 @@
{
label: '创建人',
sortable: false,
prop: 'admin_id',
width: 120
prop: 'admin.name',
width: 120,
formatter(cell, data, value){
return value?value:''
}
}
]
}

@ -609,10 +609,15 @@
},
submit() {
let that = this
console.log("that.carsList",that.carsList)
that.form.follw_people = that.followList
let _car = []
for(var k of that.carsList){
that.form.cars.push(k.car)
_car.push(k.car)
}
this.form.cars = _car
console.log("this.form.cars",this.form.cars)
// return
if(this.visitType==3){
this.form.accept_admin_id = this.form.accept_goods_admin_id
}

@ -44,8 +44,13 @@
</div>
<div class="xy-table-item-content">
<el-input style="font-size: 32px;padding: 25px;width:400px" v-model="codeForm.person_no"
placeholder="请输入入场牌"></el-input>
<!-- <el-input style="font-size: 32px;padding: 25px;width:400px" v-model="codeForm.person_no"
placeholder="请输入入场牌"></el-input> -->
<xy-table style="width: 620px" :height="260" :is-page="false" :list="codeForm.person_no"
:table-item="codefollowTable">
<template v-slot:btns>
</template>
</xy-table>
</div>
</div>
</template>
@ -56,8 +61,14 @@
</div>
<div class="xy-table-item-content">
<el-input style="font-size: 32px;padding: 25px;width:400px" v-model="codeForm.car_no"
placeholder="请输入停车牌"></el-input>
<!-- <el-input style="font-size: 32px;padding: 25px;width:400px" v-model="codeForm.car_no"
placeholder="请输入停车牌"></el-input> -->
<xy-table style="width: 620px" :height="260" :is-page="false" :list="codeForm.car_no"
:table-item="carfollowTable">
<template v-slot:btns>
</template>
</xy-table>
</div>
</div>
</template>
@ -338,9 +349,9 @@
formDataType: '',
formData: {
checkcode: '',
codeType: "",
car_no: '',
codeType: "",
person_no: '',
car_no: '',
visitinfo: "",
date: "",
@ -376,8 +387,8 @@
}, //
codeForm: {
type: 1,
car_no: '',
person_no: ''
car_no: [],
person_no: []
}, //
codeTypeList: [{
id: 1,
@ -387,7 +398,37 @@
value: '离场'
}],
gateAdminId: '',
check_admin_name: "",
check_admin_name: "",
carfollowTable: [{
label: "车牌",
prop: "car",
width: 200
},{
label: "停车牌",
prop: "car_no",
width: 420,
customFn: (row, scope) => {
return (<el-input type="text" placeholder = "请填写停车牌"
v-model={row.car_no}>
</el-input>
)
}
}],
codefollowTable: [{
label: "姓名",
prop: "name",
width: 200
},{
label: "入场牌",
prop: "person_no",
width: 420,
customFn: (row, scope) => {
return (<el-input type="text" placeholder = "请填写入场牌"
v-model={row.person_no}>
</el-input>
)
}
}],
followTable: [{
label: "姓名",
prop: "name",
@ -451,7 +492,14 @@
if (this.formDataType == 'coderecord') {
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.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:''})
}
for(var m of this.form.cars){
this.codeForm.car_no.push({car:m,car_no:''})
}
}
} else {
this.reset()
@ -528,7 +576,9 @@
},
codeSubmit() {
let that = this
console.log(this.codeForm)
console.log(this.codeForm)
console.log(this.codeForm.person_no)
return
cancelCode({
...that.codeForm
}).then(res => {
@ -567,4 +617,4 @@
/deep/ .el-radio__label {
font-size: 32px;
}
</style>
</style>

@ -8,11 +8,11 @@
<el-input size="mini" placeholder="请输入关键词" v-model="select.keyword"
style="width: 160px;margin-right: 10px;"></el-input>
<div style="margin-right: 10px;">状态</div>
<!-- <div style="margin-right: 10px;">状态</div>
<el-select v-model="select.audit_status" clearable placeholder="请选择">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-select> -->
<div style="margin:0 10px;">起始时间</div>
<el-date-picker v-model="selectRange" @change="selectRanges" value-format="yyyy-MM-dd" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期">
@ -27,9 +27,11 @@
</lx-header>
</div>
<xy-table :table-item="table" :list="data" :total="total"
<xy-table :table-item="table" :list="data" :total="total"
:auths="['edit','delete']"
@pageSizeChange="e => {select.rows = e;select.page = 1;getList()}"
@pageIndexChange="e => {select.page = e;getList()}">
@pageIndexChange="e => {select.page = e;getList()}">
</xy-table>
</div>
</template>
@ -177,8 +179,11 @@
{
label: '创建人',
sortable: false,
prop: 'admin_id',
width: 120
prop: 'admin.name',
width: 120,
formatter(cell, data, value){
return value?value:''
}
}
]
}

@ -200,8 +200,11 @@
{
label: '创建人',
sortable: false,
prop: 'admin_id',
width: 120
prop: 'admin.name',
width: 120,
formatter(cell, data, value){
return value?value:''
}
}
]
}

Loading…
Cancel
Save