lion 3 years ago
parent 73634ded92
commit cbb0b814ac

@ -0,0 +1,33 @@
import request from "@/utils/request";
export function getList(params){
return request({
url:'/api/admin/gate/visit-list',
method:'get',
params
})
}
// export function show(params){
// return request({
// method:'get',
// url:'/api/admin/visit_audit/show',
// params
// })
// }
// export function save(data){
// return request({
// method:'post',
// url:'/api/admin/visit_audit/save',
// data
// })
// }
// export function destroy(data){
// return request({
// method:'post',
// url:'/api/admin/visit_audit/destroy',
// data
// })
// }

@ -202,7 +202,7 @@ export default {
let topHeight = 50; //
this.tableHeight =
clientHeight - lxHeader_height - topHeight - paginationHeight - 20 - 25;
// console.log(this.tableHeight)
this.$emit("tableHeight",this.tableHeight)
},
getTableData(isRefresh = false){
if(isRefresh){

@ -0,0 +1,136 @@
<template>
<div class="upload-container">
<!-- <el-button icon="el-icon-upload" size="mini" type="primary" @click="dialogVisible=true">
上传图片
</el-button> -->
<el-dialog :visible.sync="dialogVisible" :modal="false" @close="canceldialogVisible">
<el-upload
:multiple="true"
:file-list="fileList"
:show-file-list="true"
:on-remove="handleRemove"
:on-success="handleSuccess"
:before-upload="beforeUpload"
class="editor-slide-upload"
:action="action"
list-type="picture-card"
>
<el-button size="small" type="primary">
点击上传
</el-button>
</el-upload>
<el-button @click="canceldialogVisible">
取消
</el-button>
<el-button type="primary" @click="handleSubmit">
确认
</el-button>
</el-dialog>
</div>
</template>
<script>
import { Message } from 'element-ui'
export default {
name: 'EditorSlideUpload',
props: {
show:{
type:Boolean,
default:false
}
},
data() {
return {
action:`${process.env.VUE_APP_UPLOAD_API}`,
dialogVisible: this.show,
listObj: {},
fileList: []
}
},
watch:{
show(val){
this.dialogVisible = val
}
},
methods: {
checkAllSuccess() {
return Object.keys(this.listObj).every(item => this.listObj[item].hasSuccess)
},
handleSubmit() {
const arr = Object.keys(this.listObj).map(v => this.listObj[v])
if (!this.checkAllSuccess()) {
this.$message('请等待所有图片上传成功。如有网络问题,请刷新页面重新上传!')
return
}
this.$emit('successCBK', arr)
this.listObj = {}
this.fileList = []
this.dialogVisible = false
this.$emit('updateshow',this.dialogVisible)
// this.show = false
},
canceldialogVisible(){
this.dialogVisible = false
this.$emit('updateshow',this.dialogVisible)
},
handleSuccess(response, file) {
const uid = file.uid
const objKeyArr = Object.keys(this.listObj)
console.log("response",response)
if(response.url.indexOf("../storage/files") != -1){
response.url = response.url.replace('../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}
for (let i = 0, len = objKeyArr.length; i < len; i++) {
if (this.listObj[objKeyArr[i]].uid === uid) {
this.listObj[objKeyArr[i]].url = response.url
this.listObj[objKeyArr[i]].hasSuccess = true
return
}
}
},
handleRemove(file) {
const uid = file.uid
const objKeyArr = Object.keys(this.listObj)
for (let i = 0, len = objKeyArr.length; i < len; i++) {
if (this.listObj[objKeyArr[i]].uid === uid) {
delete this.listObj[objKeyArr[i]]
return
}
}
},
beforeUpload(file) {
console.log(file)
if((file.size/1000) > 1024){
Message({
type:'warning',
message:'上传图片大小超过1M'
})
return false
}
const _self = this
const _URL = window.URL || window.webkitURL
const fileName = file.uid
this.listObj[fileName] = {}
return new Promise((resolve, reject) => {
const img = new Image()
img.src = _URL.createObjectURL(file)
img.onload = function() {
_self.listObj[fileName] = { hasSuccess: false, uid: file.uid, width: this.width, height: this.height }
}
resolve(true)
})
}
}
}
</script>
<style lang="scss" scoped>
.editor-slide-upload {
margin-bottom: 20px;
::v-deep .el-upload--picture-card {
width: 100%;
}
}
</style>

@ -0,0 +1,141 @@
<template>
<div class="tinymce">
<Editor v-model="myValue" :init="init" :disabled="disabled"></Editor>
<EditorImage
:show="showImg"
class="tinymce__upload"
@successCBK="imageSuccessCBK"
@updateshow="updateshow"
></EditorImage>
</div>
</template>
<script>
import EditorImage from "@/components/XyTinymce/EditorImage.vue";
import tinymce from "tinymce/tinymce";
import Editor from "@tinymce/tinymce-vue";
import "tinymce/skins/ui/oxide/skin.css";
import "@/assets/tinymce/langs/zh_CN";
import "tinymce/themes/silver/theme";
import "tinymce/plugins/media";
import "tinymce/plugins/lists";
import "tinymce/plugins/table";
import "tinymce/plugins/hr";
import "tinymce/plugins/autolink";
import "tinymce/plugins/help";
import "tinymce/plugins/visualblocks";
import "tinymce/plugins/fullscreen";
import "tinymce/plugins/textpattern";
import "tinymce/plugins/contextmenu";
import "tinymce/plugins/wordcount";
import "tinymce/plugins/colorpicker";
import "tinymce/plugins/textcolor";
import "tinymce/icons/default"
export default {
components: {
Editor,
EditorImage,
},
props: {
height: {
type: Number,
default: 300,
},
value: {
type: String,
default: "",
},
disabled: {
type: Boolean,
default: false,
},
plugins: {
type: [String, Array],
default:
"paste preview searchreplace autolink directionality visualblocks visualchars fullscreen image template codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave ",
},
toolbar: {
type: [String, Array],
default: ` undo redo restoredraft | assignment | cut copy paste pastetext | forecolor backcolor bold italic underline strikethrough anchor | alignleft aligncenter alignright alignjustify outdent indent |
styleselect formatselect fontselect fontsizeselect | table image charmap emoticons hr pagebreak |bullist numlist | blockquote subscript superscript removeformat |
insertdatetime print preview | fullscreen | bdmap indent2em lineheight formatpainter axupimgs`,
},
menubar: {
type: String,
default: "edit insert view format table CardBtn",
},
},
data() {
return {
myValue: this.value,
showImg:false,
init: {
language_url: "@/asset/tinymce/langs/zh_CN.js", //
language: "zh_CN",
height: this.height,
plugins: this.plugins,
fontsize_formats: "8px 10px 12px 14px 16px 18px 24px 28px 36px",
toolbar: this.toolbar,
branding: false,
menubar: this.menubar,
setup: (editor) => {
let _this = this
// assignment toolbar
editor.ui.registry.addButton('assignment', {
text: `<i class="el-icon-position" style="font-size: 16px">上传</i>`,
// tooltip: '',
onAction: () => {
this.showImg = true
// _this.showEdit = true
},
})
},
//base64
//ajaxhttps://www.tiny.cloud/docs/configure/file-image-upload/#images_upload_handler
// images_upload_handler: (blobInfo, success, failure) => {
// const img = 'data:image/jpeg;base64,' + blobInfo.base64()
// success(img)
// },
},
};
},
methods: {
updateshow(val){
this.showImg = val
},
imageSuccessCBK(arr) {
console.log("arr",arr)
arr.forEach(
(v) => (this.myValue += `<img class="wscnph" src="${v.url}" >`)
);
},
},
computed: {},
mounted() {
tinymce.init({});
},
watch: {
value(newValue) {
this.myValue = newValue;
},
myValue(newValue) {
this.$emit("input", newValue);
},
},
};
</script>
<style scoped lang="scss">
.tinymce {
position: relative;
&__upload {
z-index: 2;
position: absolute;
right: 4px;
top: 0px;
}
::v-deep .tox.tox-tinymce.tox-fullscreen{
z-index:0
}
}
</style>

@ -8,7 +8,7 @@ import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login'] // no redirect whitelist
const whiteList = ['/login','/gate/visitlist'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
// start progress bar

@ -40,6 +40,11 @@ export const constantRoutes = [{
path: '/404',
component: () => import('@/views/404'),
hidden: true
},
{
path: '/gate/visitlist',
component: () => import('@/views/gate/visitlist'),
hidden: true
},
{

@ -0,0 +1,276 @@
<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)"
>
进入核验扫码
</i-button>
<i-button v-if="scope.row.audit_status==3" style="margin-right:6px" type="primary" size="small" onClick=""
>
离开核验扫码
</i-button>
</template>
</el-table-column>
</template>
</xy-table>
<showVisit ref="showVisit"></showVisit>
</div>
</template>
<script>
import showVisit from '@/views/visit/component/showVisit'
import {
getList
} from '@/api/gate'
export default {
components: {
showVisit
},
data() {
return {
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.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
},
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) {
// let addWhat = row.type == 1 ? "addCommon" : (row.type == 2 ? "addBuild" : (row.type == 3 ? "addPark" : ""))
this.$refs['showVisit'].form = row
this.$refs['showVisit'].formDataType = 'coderecord'
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>

@ -220,6 +220,8 @@
let that = this
if (this.type === 'editor') {
this.form.id = this.id
}else{
this.form.id = ""
}
save({
...that.form

@ -51,7 +51,10 @@
<div class="xy-table-item">
<div class="xy-table-item-label">
学习内容
</div>
</div>
<!-- <div class="xy-table-item-content" style="width: 680px;">
<xyTinymce v-if="isShow" :height="200" v-model="form.content"></xyTinymce>
</div> -->
<div class="xy-table-item-content">
<el-input :autosize="{minRows:2}" type="textarea" v-model="form.content" placeholder="请输入学习内容" clearable
style="width: 300px;"></el-input>
@ -166,9 +169,13 @@
} from "@/api/resource/study.js"
import {
getparameter
} from "@/api/system/dictionary";
} from "@/api/system/dictionary";
// import xyTinymce from "@/components/XyTinymce/index.vue";
export default {
components: {},
components: {
// xyTinymce
},
data() {
return {
isShow: false,
@ -408,6 +415,8 @@
let that = this
if (this.type === 'editor') {
this.form.id = this.id
}else{
this.form.id = ""
}
save({
...that.form

@ -87,6 +87,8 @@
let that = this
if (this.type === 'editor') {
this.form.id = this.id
}else{
this.form.id = ""
}
save({
...that.form

@ -71,9 +71,10 @@
</el-table-column>
</template>
</xy-table>
<checkRecord ref="checkRecord" @refresh="getList"></checkRecord>
<!-- <checkRecord ref="checkRecord" @refresh="getList"></checkRecord> -->
<!-- <addBuild ref="addBuild" @refresh="getList"></addBuild>
<addPark ref="addPark" @refresh="getList"></addPark> -->
<addPark ref="addPark" @refresh="getList"></addPark> -->
<showVisit ref="showVisit" @refresh="getList"></showVisit>
</div>
</template>
@ -81,11 +82,13 @@
import {
getList,
destroy
} from '@/api/visit/check.js'
import checkRecord from '@/views/visit/component/checkRecord'
} from '@/api/visit/record.js'
import checkRecord from '@/views/visit/component/checkRecord'
import showVisit from '@/views/visit/component/showVisit'
export default {
components: {
checkRecord
checkRecord,
showVisit
},
data() {
return {
@ -94,7 +97,7 @@
page: 1,
rows: 10,
keyword: "",
audit_status: "",
audit_status: 0,
myself_accept: 0,
myself_audit: 0
},
@ -243,8 +246,11 @@
})
},
checkRecords(row){
this.$refs['checkRecord'].isShow = true
this.$refs['checkRecord'].id = row.id
this.$refs['showVisit'].form = row
this.$refs['showVisit'].formDataType='checkrecord'
this.$refs['showVisit'].isShow = true
// this.$refs['checkRecord'].id = row.id
// this.$refs['checkRecord'].isShow = true
}
},
}

@ -223,6 +223,8 @@
let that = this
if (this.type === 'editor') {
this.form.id = this.id
}else{
this.form.id = ""
}
save({
...that.form

@ -49,7 +49,7 @@
</div>
<div class="xy-table-item-content">
<el-select v-model="form.reason" placeholder="请选择" style="width:300px">
<el-option v-for="item in reasonList" :key="item.is" :label="item.value" :value="item.id">
<el-option v-for="item in reasonList" :key="item.value" :label="item.value" :value="item.value">
</el-option>
</el-select>
</div>
@ -467,7 +467,7 @@
visit_time_id: res?.visit_time_id,
visit_area_id: res?.visit_area_id,
workRange: res.work_start_time?[res.work_start_time,res.work_end_time]:"",
reason: res?parseInt(res.reason):'',
reason: res?.reason,
plate: res?.plate,
remark: res?.remark,
visitorinfo: "",
@ -512,6 +512,8 @@
let that = this
if (this.type === 'editor') {
this.form.id = this.id
}else{
this.form.id = ""
}
console.log("that.form", that.form)
// return

@ -1,8 +1,209 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" title="审核记录"
:form="form" :rules="rules" @submit="submit">
<template v-slot:status>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="normal" title="审核记录"
:form="form" :rules="rules" @submit="submit">
<template v-slot:default>
<div>
<div style="width:600px">
拜访信息
</div>
<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">
{{recordform.date}}
</div>
</div>
<template>
<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">
{{form.visit_time?form.visit_time.start_time:''}}{{form.visit_time?form.visit_time.end_time:''}}
</div>
</div>
</template>
<template>
<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">
{{form.visit_area?form.visit_area.name:''}}
</div>
</div>
</template>
<template v-if="visitType==1">
<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">
{{form.reason}}
</div>
</div>
</template>
<template v-if="visitType==2">
<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">
{{form.work_start_time}}{{form.work_end_time}}
</div>
</div>
</template>
<template v-if="visitType==3">
<div class="xy-table-item">
<div class="xy-table-item-label">
车牌号
</div>
<div class="xy-table-item-content">
{{form.plate}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">
备注
</div>
<div class="xy-table-item-content">
{{form.remark}}
</div>
</div>
</template>
<template >
<div class="xy-table-item">
<div class="xy-table-item-content" style="width:400px">
拜访人信息
</div>
</div>
</template>
<template>
<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">
{{form.name}}
</div>
</div>
</template>
<template>
<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">
{{form.mobile}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">证件类型
</div>
<div class="xy-table-item-content">
{{form.credent==1?'身份证':'护照'}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">
证件号码
</div>
<div class="xy-table-item-content">
{{form.idcard}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">
单位名称
</div>
<div class="xy-table-item-content">
{{form.company_name}}
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-label">
到访车辆
</div>
<div class="xy-table-item-content">
{{form.cars}}
</div>
</div>
</template>
<template v-if="visitType==1||visitType==2">
<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">
<xy-table style="width: 620px" :height="260" :is-page="false" :list="form.follw_people"
:table-item="followTable">
<template v-slot:btns>
</template>
</xy-table>
</div>
</div>
</template>
<template>
<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" style="width:620px">
{{form.long_time==0?'否':'是'}}
<div v-if="form.long_time==1" style="display: inline-block;vertical-align: middle;margin-left:10px">
{{form.start_date}}{{form.end_date}}
</div>
</div>
</div>
</template>
<template>
<div class="xy-table-item">
<div class="xy-table-item-content" style="width:400px">
被访人信息
</div>
</div>
</template>
<template>
<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">
{{form.accept_admin?form.accept_admin.name:''}}
</div>
</div>
</template>
<template v-if="visitType==3">
<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">
{{form.accept_goods_admin?form.accept_goods_admin.name:''}}
</div>
</div>
</template>
</div>
</template>
<!-- <template v-slot:status>
<div class="xy-table-item">
<div class="xy-table-item-label">状态
</div>
@ -14,6 +215,18 @@
</div>
</div>
</template>
<template v-slot:level>
<div class="xy-table-item">
<div class="xy-table-item-label">状态
</div>
<div class="xy-table-item-content">
<el-select v-model="form.status" placeholder="请选择" style="width:300px">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:reason>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -23,7 +236,7 @@
<el-input type="textarea" v-model="form.reason" placeholder="请输入备注" style="width:300px"></el-input>
</div>
</div>
</template>
</template> -->
</xy-dialog>
@ -35,6 +248,9 @@
import {
show
} from "@/api/visit/record.js"
import {
save
} from "@/api/visit/check.js"
export default {
components: {},
@ -42,8 +258,12 @@
return {
isShow: false,
id: '',
recordform:{},
form: {
recordform:{
},
form: {
visit_id:"",
audit_admin_id:'',
status:"",
reason:"",
level:""
@ -73,12 +293,14 @@
async getDetail() {
const res = await show({
id: this.id
})
this.recordform = {
}
})
this.form.visit_id = res.id
this.recordform = res
},
submit() {
submit() {
console.log("122333")
return
let that = this
// this.form.id = this.id
save({

@ -0,0 +1,411 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="`审核${form.type_text}`" :form="formData">
<template v-slot:visitinfo>
<div style="width:600px">
拜访信息
</div>
</template>
<template v-slot:date>
<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">
{{form.date}}
</div>
</div>
</template>
<template v-slot:visit_time_id>
<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">
{{form.visit_time?form.visit_time.start_time:''}}{{form.visit_time?form.visit_time.end_time:''}}
</div>
</div>
</template>
<template v-slot:visit_area_id>
<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">
{{form.visit_area?form.visit_area.name:''}}
</div>
</div>
</template>
<template v-slot:reason v-if="form.type==1">
<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">
{{form.reason}}
</div>
</div>
</template>
<template v-slot:workRange v-if="form.type==2">
<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">
{{form.work_start_time}}{{form.work_end_time}}
</div>
</div>
</template>
<template v-slot:plate v-if="form.type==3">
<div class="xy-table-item">
<div class="xy-table-item-label">
车牌号
</div>
<div class="xy-table-item-content">
{{form.plate}}
</div>
</div>
</template>
<template v-slot:remark>
<div class="xy-table-item">
<div class="xy-table-item-label">
备注
</div>
<div class="xy-table-item-content">
{{form.remark}}
</div>
</div>
</template>
<template v-slot:visitorinfo>
<div class="xy-table-item">
<div class="xy-table-item-content" style="width:400px">
拜访人信息
</div>
</div>
</template>
<template v-slot:name>
<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">
{{form.name}}
</div>
</div>
</template>
<template v-slot:mobile>
<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">
{{form.mobile}}
</div>
</div>
</template>
<template v-slot:credent>
<div class="xy-table-item">
<div class="xy-table-item-label">证件类型
</div>
<div class="xy-table-item-content">
{{form.credent==1?'身份证':'护照'}}
</div>
</div>
</template>
<template v-slot:idcard>
<div class="xy-table-item">
<div class="xy-table-item-label">
证件号码
</div>
<div class="xy-table-item-content">
{{form.idcard}}
</div>
</div>
</template>
<template v-slot:company_name>
<div class="xy-table-item">
<div class="xy-table-item-label">
单位名称
</div>
<div class="xy-table-item-content">
{{form.company_name}}
</div>
</div>
</template>
<template v-slot:cars>
<div class="xy-table-item">
<div class="xy-table-item-label">
到访车辆
</div>
<div class="xy-table-item-content">
{{form.cars}}
</div>
</div>
</template>
<template v-slot:follw_people v-if="form.type==1||form.type==2">
<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">
<xy-table style="width: 620px" :height="260" :is-page="false" :list="form.follw_people"
:table-item="followTable">
<template v-slot:btns>
</template>
</xy-table>
</div>
</div>
</template>
<template v-slot:long_time>
<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" style="width:620px">
{{form.long_time==0?'否':'是'}}
<div v-if="form.long_time==1" style="display: inline-block;vertical-align: middle;margin-left:10px">
{{form.start_date}}{{form.end_date}}
</div>
</div>
</div>
</template>
<template v-slot:visitorinfos>
<div class="xy-table-item">
<div class="xy-table-item-content" style="width:400px">
被访人信息
</div>
</div>
</template>
<template v-slot:accept_admin_id>
<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">
{{form.accept_admin?form.accept_admin.name:''}}
</div>
</div>
</template>
<template v-slot:accept_goods_admin_id v-if="form.type==3">
<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">
{{form.accept_goods_admin?form.accept_goods_admin.name:''}}
</div>
</div>
</template>
<!-- 审核 -->
<template v-slot:checkRecord v-if="formDataType=='checkrecord'">
<div style="width:600px">
审核
</div>
</template>
<template v-slot:checkForm v-if="formDataType=='checkrecord'">
<el-form-item prop='checkForm.status' style="margin-bottom:20px">
<div class="xy-table-item">
<div class="xy-table-item-label">状态
</div>
<div class="xy-table-item-content">
<el-select v-model="checkForm.status" placeholder="请选择" style="width:200px">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</el-form-item>
<el-form-item prop='checkForm.status' style="margin-bottom:20px">
<div class="xy-table-item">
<div class="xy-table-item-label">审核
</div>
<div class="xy-table-item-content">
<el-select v-model="checkForm.level" @change="selectLevel" placeholder="请选择" style="width:200px;margin-right:10px">
<el-option v-for="(item,index) in form.visit_area.audit_admin" :key="item.level" :label="item.type_name" :value="item.level">
</el-option>
</el-select>
<span>
{{check_admin_name}}
</span>
</div>
</div>
</el-form-item>
<el-form-item prop='checkForm.reason' style="margin-bottom:20px">
<div class="xy-table-item">
<div class="xy-table-item-label">
备注
</div>
<div class="xy-table-item-content">
<el-input type="textarea" v-model="checkForm.reason" placeholder="请输入备注" style="width:300px"></el-input>
</div>
</div>
</el-form-item>
</template>
<template v-slot:footerContent >
<div>
<Button ghost type="primary" @click="reset"></Button>
<Button v-if="formDataType=='checkrecord'" type="primary" @click="checkSubmit"></Button>
<Button v-if="formDataType=='coderecord'" type="primary" @click="codeSubmit"></Button>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
save
} from "@/api/visit/check.js"
export default {
components: {},
data() {
return {
isShow: false,
id: '',
formDataType:'',
formData: {
visitinfo: "",
date: "",
visit_time_id: "",
visit_area_id: "",
workRange: "",
reason: "",
plate: "",
remark: "",
visitorinfo: "",
name: "",
mobile: "",
credent: 1,
idcard: "",
company_name: "",
cars: "",
follw_people: [],
long_time: 0,
longrange: "",
visitorinfos: "",
accpet_department_id: "",
accept_admin_id: "",
accept_goods_admin_id: "",
checkRecord:'',
checkForm:{},
},
form: {},
checkForm:{},//
check_admin_name:"",
followTable: [{
label: "姓名",
prop: "name",
width: 200
},
{
label: "联系电话",
prop: "mobile",
width: 200
},
{
label: "证件类型",
// width: 180,
width: 200,
}, {
label: "证件号码",
prop: "idcard",
width: 200
}
],
statusList: [{
id: 0,
value: "待审核"
},
{
id: 1,
value: "通过"
},
{
id: 2,
value: "驳回"
},
],
}
},
created() {
// this.getVisitTime()
},
watch: {
isShow(newVal) {
if (newVal) {
this.checkForm.visit_id = this.form.id
} else {
this.reset()
}
}
},
methods: {
selectLevel(val){
console.log(val)
this.form.visit_area.audit_admin.map(item=>{
if(item.level==val){
this.checkForm.level = item.level
this.checkForm.audit_admin_id = item.admin_id
this.check_admin_name = item.admin_name?item.admin_name:''
}
})
},
reset(){
this.formDataType=''
this.checkForm = {}
this.check_admin_name = ''
this.isShow = false
this.$refs['dialog'].reset()
},
checkSubmit(){
console.log(this.checkForm)
let that = this
// this.form.id = this.id
save({
...that.checkForm
}).then(res => {
this.$successMessage('审核成功')
this.isShow = false
this.$emit('refresh')
})
},
codeSubmit(){
}
}
}
</script>
<style scoped lang="scss">
.xy-table-item-label {
width: 180px !important;
}
.xy-table-item-content {
width: 100%
}
.img__delete {
transform: scale(0.8, 0.8);
position: absolute;
top: 4px;
right: 4px;
}
</style>

@ -14,7 +14,7 @@
</el-option>
</el-select>
<div style="margin:0 10px;">起始时间</div>
<el-date-picker v-model="selectRange" value-format="yyyy-MM-dd" type="daterange" range-separator=""
<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">查询
@ -204,7 +204,17 @@
mounted() {
this.getList()
},
methods: {
methods: {
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 = ""
}
},
async getList() {
let res = await getList(this.select)
console.log(res)

Loading…
Cancel
Save