master
lion 3 years ago
parent 8ce222aa13
commit 781ab03990

@ -30,6 +30,7 @@
"view-design": "^4.7.0",
"vue": "2.6.10",
"vue-count-to": "^1.0.13",
"vue-jsonp": "^2.0.0",
"vue-router": "3.0.6",
"vuex": "3.1.0"
},

@ -42,6 +42,9 @@ Vue.use(VueParticles)
// 如果想要中文版 element-ui按如下方式声明
Vue.use(ElementUI)
import {VueJsonp} from 'vue-jsonp'
Vue.use(VueJsonp)
Vue.config.productionTip = false
import avue from '@smallwei/avue'

@ -1,309 +0,0 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="拜访记录" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;align-items: center;" class="selector">
<div style="margin-right: 10px;">关键词</div>
<el-input size="mini" placeholder="请输入关键词" v-model="select.keyword"
style="width: 160px;margin-right: 10px;"></el-input>
<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>
<div style="margin:0 10px;">起始时间</div>
<el-date-picker v-model="selectRange" @change="selectRangeM" value-format="yyyy-MM-dd" type="daterange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
<el-button @click="getList" slot="reference" size="medium" type="primary" style="margin-left: 10px">查询
</el-button>
</div>
</slot>
</lx-header>
</div>
<xy-table :table-item="table" :list="data" :total="total" @tableHeight="tableHeight" :height="tableHeights"
@pageSizeChange="e => {select.rows = e;select.page = 1;getList()}"
@pageIndexChange="e => {select.page = e;getList()}">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="220" header-align="center">
<template slot-scope="scope">
<i-button v-if="scope.row.audit_status==1" style="margin-right:6px" type="primary" size="small" @click="showVisitForm(scope.row,1)"
>
进入核验扫码
</i-button>
<i-button v-if="scope.row.audit_status==3" style="margin-right:6px" type="primary" size="small" @click="showVisitForm(scope.row,2)"
>
离开核验扫码
</i-button>
</template>
</el-table-column>
</template>
</xy-table>
<showVisit ref="showVisit" @refresh='getList'></showVisit>
<!-- 选择门岗人员 -->
<el-dialog
title="请先选择门岗人员"
:visible.sync="gateShow"
width="60%"
:close-on-click-modal='false'
:show-close='false' >
<el-radio-group v-model="gateAdminId">
<el-radio v-for="item in gateData" :label="item.id" border>{{item.name}}</el-radio>
</el-radio-group>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmGate"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import showVisit from '@/views/visit/component/showVisit'
import {
getList,
getUserList
} from '@/api/gate'
export default {
components: {
showVisit
},
data() {
return {
gateShow:true,
gateAdminId:'',
gateData:[],
visible: false,
tableHeights: 0,
select: {
page: 1,
rows: 10,
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.getUserList()
this.getToday()
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
},
async getUserList() {
let res = await getUserList()
this.gateData = res
},
confirmGate(){
if(!this.gateAdminId){
this.$successMessage("请先选择门岗",'','warning')
return
}
this.gateShow = false
},
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() {
this.tableHeights = val + 25 + 50
})
},
showVisitForm(row,type) {
this.$refs['showVisit'].form = row
this.$refs['showVisit'].formDataType = 'coderecord'
this.$refs['showVisit'].codeType = type
this.$refs['showVisit'].gateAdminId=this.gateAdminId
this.$refs['showVisit'].isShow = true
}
},
}
</script>
<style scoped lang="scss">
//::v-deep .el-button + .el-button{
// margin-left: 0 !important;
//}
::v-deep .el-button {
padding: 5px 8px !important;
}
.selector {
::v-deep .el-input--suffix .el-input__inner {
height: 28px;
}
::v-deep .el-select .el-input .el-select__caret {
line-height: 28px;
}
::v-deep .el-range-editor.el-input__inner {
height: 28px;
width: 250px
}
::v-deep .el-date-editor .el-range__icon {
line-height: 21px;
}
::v-deep .el-date-editor .el-range-separator {
line-height: 21px;
}
::v-deep .el-date-editor .el-range__close-icon {
line-height: 21px;
}
}
</style>

@ -1,6 +1,6 @@
<template>
<div>
<div class="gatewrap">
<div class="gatewrap">
<div class="gateRight">
<span>
{{gateName}}<span @click="gateShow = true">切换</span>
@ -60,8 +60,8 @@
showVisit
},
data() {
return {
fullscreen:false,
return {
fullscreen: false,
clientHeight: 0,
gateShow: false,
gateAdminId: '',
@ -86,12 +86,13 @@
},
computed: {},
mounted() {
// this.screen()
},
created() {
this.getIdcard()
// this.getIdcard()
this.getUserList()
this.getToday()
// this.enterfullscreen()
},
methods: {
init() {
@ -145,7 +146,8 @@
}
},
async getUserList() {
this.gateUser = JSON.parse(Cookies.get("gateUser"))
this.gateUser = Cookies.get("gateUser") ? JSON.parse(Cookies.get("gateUser")) : ''
console.log(this.gateUser)
let res = await getUserList()
this.gateData = res
@ -179,9 +181,20 @@
})
this.gateShow = false
},
getIdcard() {
const idCard = getIdcard("/idcard")
console.log(idCard)
getIdcard() {
let that = this
this.$jsonp(
'http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1'
)
.then((res) => {
console.log(res)
that.select.idcard = res.Certificate.IDNumber
that.getList()
})
.catch((err) => {
console.log(err)
this.$successMessage(err.statusText, '', 'warning')
})
},
screen() {
let element = document.documentElement;
@ -208,6 +221,37 @@
}
}
this.fullscreen = !this.fullscreen;
},
enterfullscreen() { //
var docElm = document.documentElement
//W3C
if (docElm.requestFullscreen) {
docElm.requestFullscreen()
}
//FireFox
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen()
}
//Chrome
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen()
}
//IE11
else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen()
}
},
//退
exitfullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen()
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen()
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen()
} else if (document.msExitFullscreen) {
document.msExitFullscreen()
}
}
},
@ -217,8 +261,8 @@
<style scoped>
.gatewrap {
background-color: #fff;
position: relative;
height:100vh
position: relative;
height: 100vh
}
.gatecode {
@ -234,9 +278,11 @@
.gatecode>div {
margin-bottom: 40px;
}
.gatecode>div:last-child {
margin-bottom: 0px;
.gatecode>div:last-child {
margin-bottom: 0px;
}
.gateRight {
position: absolute;
right: 20px;

@ -21,21 +21,21 @@
</div>
</div>
</div>
</template>
<template v-slot:codeType v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-size: 32px;width: 280px!important;">
核销状态
</div>
<div class="xy-table-item-content">
<div style="font-size: 32px;padding: 25px;width:400px">
<el-radio-group v-model="codeForm.type">
<el-radio :label="item.id" v-for="item in codeTypeList">{{item.value}}</el-radio>
</el-radio-group>
<!-- {{form.audit_status_text}} -->
</div>
</div>
</div>
</template>
<template v-slot:codeType v-if="formDataType=='coderecord'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-size: 32px;width: 280px!important;">
核销状态
</div>
<div class="xy-table-item-content">
<div style="font-size: 32px;padding: 25px;width:400px">
<el-radio-group v-model="codeForm.type">
<el-radio :label="item.id" v-for="item in codeTypeList">{{item.value}}</el-radio>
</el-radio-group>
<!-- {{form.audit_status_text}} -->
</div>
</div>
</div>
</template>
<template v-slot:person_no v-if="formDataType=='coderecord'">
<div class="xy-table-item">
@ -44,7 +44,8 @@
</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>
</div>
</div>
</template>
@ -55,7 +56,8 @@
</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>
</div>
</div>
</template>
@ -335,8 +337,8 @@
userId: '',
formDataType: '',
formData: {
checkcode: '',
codeType:"",
checkcode: '',
codeType: "",
car_no: '',
person_no: '',
@ -372,17 +374,17 @@
checkForm: {
status: 1
}, //
codeForm: {
type:1,
car_no:'',
person_no:''
}, //
codeTypeList:[{
id:1,
value:'入场'
},{
id:2,
value:'离场'
codeForm: {
type: 1,
car_no: '',
person_no: ''
}, //
codeTypeList: [{
id: 1,
value: '入场'
}, {
id: 2,
value: '离场'
}],
gateAdminId: '',
check_admin_name: "",
@ -435,7 +437,6 @@
},
created() {
// this.getVisitTime()
this.getUserId()
},
watch: {
isShow(newVal) {
@ -443,13 +444,14 @@
let that = this
if (this.formDataType == 'checkrecord') {
this.checkForm.visit_id = this.id
this.getUserId()
this.getDetail()
}
if (this.formDataType == 'coderecord') {
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.admin_id = parseInt(this.gateAdminId)
this.codeForm.type = this.form.audit_status == 1 ? 1 : (this.form.audit_status == 3 ? 2 : '')
}
} else {
this.reset()
@ -556,11 +558,13 @@
position: absolute;
top: 4px;
right: 4px;
}
/deep/ .el-radio__input{
vertical-align: super;
}
/deep/ .el-radio__label{
font-size: 32px;
}
</style>
/deep/ .el-radio__input {
vertical-align: super;
}
/deep/ .el-radio__label {
font-size: 32px;
}
</style>

@ -45,12 +45,12 @@ module.exports = {
},
//before: require('./mock/mock-server.js'),
proxy: {
'/idcard': {
'^/idcard': {
target: 'http://127.0.0.1:24010',
changeOrigin: true, //配置跨域
"secure": false, // 接受运行在https上默认不接受
"secure": true, // 接受运行在https上默认不接受
pathRewrite: {
'^/idcard':''
['^/idcard']:'http://127.0.0.1:24010'
}
},
[process.env.VUE_APP_BASE_API]: {

Loading…
Cancel
Save