parent
8cc04a5b35
commit
2a76389faa
|
@ -0,0 +1,176 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form ref="form" v-model="form">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="访问人姓名:">
|
||||
<el-input v-model="form.USER_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">搜索</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="USER_NAME" label="访问人姓名"/>
|
||||
<el-table-column prop="PHONE" label="手机号"/>
|
||||
<el-table-column prop="CORPINFO_NAME" label="企业名称"/>
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="部门名称"/>
|
||||
<el-table-column prop="CAR_NO" label="车牌号"/>
|
||||
<el-table-column label="车牌类型" align="center" width="120">
|
||||
<template slot-scope="{row}">
|
||||
{{ getCarPlantType(row.CAR_PLANT_TYPE) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车辆类型" align="center" width="120">
|
||||
<template slot-scope="{row}">
|
||||
{{ getCarType(row.CAR_TYPE) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="VISIT_START_TIME" label="访问起始时间"/>
|
||||
<el-table-column prop="VISIT_END_TIME" label="访问结束时间"/>
|
||||
<el-table-column prop="DOOR_NAME" label="访问口门名称"/>
|
||||
<el-table-column label="操作" align="left" width="110">
|
||||
<template slot-scope="{row}">
|
||||
<el-button v-if="showFirstButton(row.FIRST_AUDIT_USER_ID,row.AUDIT_TYPE)" type="success" icon="el-icon-view" size="mini" @click="approve(row)">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/><div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<send-util ref="sendUtil" append-to-body @refresh="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import SendUtil from '../../person/components/sendUtil.vue'
|
||||
export default{
|
||||
components: { SendUtil, Pagination },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
areaList: [], // 省市县列表
|
||||
placeList: [],
|
||||
listLoading: true,
|
||||
varList: [],
|
||||
total: 0,
|
||||
title: '',
|
||||
isShow: false,
|
||||
form: {
|
||||
USER_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: '',
|
||||
TEMPORARY_TYPE: '2'
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取车牌类型
|
||||
getCarPlantType(CAR_PLANT_TYPE) {
|
||||
if (CAR_PLANT_TYPE === '0') {
|
||||
return '白牌'
|
||||
} else if (CAR_PLANT_TYPE === '1') {
|
||||
return '蓝牌'
|
||||
} else if (CAR_PLANT_TYPE === '2') {
|
||||
return '黄牌'
|
||||
} else if (CAR_PLANT_TYPE === '3') {
|
||||
return '绿牌'
|
||||
} else if (CAR_PLANT_TYPE === '4') {
|
||||
return '黑牌'
|
||||
}
|
||||
},
|
||||
|
||||
getCarType(CAR_TYPE) {
|
||||
if (CAR_TYPE === '0') {
|
||||
return '货车'
|
||||
} else if (CAR_TYPE === '1') {
|
||||
return '轿车'
|
||||
} else if (CAR_TYPE === '2') {
|
||||
return '大巴客车'
|
||||
}
|
||||
},
|
||||
// 判断审核按钮权限
|
||||
showFirstButton(FIRST_AUDIT_USER_ID, AUDIT_TYPE) {
|
||||
return FIRST_AUDIT_USER_ID === JSON.parse(sessionStorage.getItem('user')).USER_ID && AUDIT_TYPE === '1'
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
USER_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: ''
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/temporary/access/getAccessList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, this.form
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
approve(row) {
|
||||
this.$refs.sendUtil.init(row)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<template>
|
||||
<component :is="activeName" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
export default {
|
||||
components: {
|
||||
List: List
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
USER_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,167 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form ref="form" v-model="form">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="访问人姓名:">
|
||||
<el-input v-model="form.USER_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">搜索</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="USER_NAME" label="访问人姓名"/>
|
||||
<el-table-column prop="PHONE" label="手机号"/>
|
||||
<el-table-column prop="ID_CARD" label="身份证号"/>
|
||||
<el-table-column prop="CORPINFO_NAME" label="企业名称"/>
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="部门名称"/>
|
||||
<el-table-column prop="VISIT_START_TIME" label="访问起始时间"/>
|
||||
<el-table-column prop="VISIT_END_TIME" label="访问结束时间"/>
|
||||
<el-table-column prop="DOOR_NAME" label="访问口门名称"/>
|
||||
<el-table-column label="审核状态" align="center" width="120">
|
||||
<template slot-scope="{row}">
|
||||
{{ getType(row.AUDIT_TYPE) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="110">
|
||||
<template slot-scope="{row}">
|
||||
<el-button v-if="showFirstButton(row.FIRST_AUDIT_USER_ID,row.AUDIT_TYPE)" type="success" icon="el-icon-view" size="mini" @click="approve(row)">审核</el-button>
|
||||
<!-- <el-button v-if="showSecondButton(row.SECOND_AUDIT_USER_ID,row.AUDIT_TYPE)" type="success" icon="el-icon-view" size="mini" @click="approve(row)">复审</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/><div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<send-util ref="sendUtil" append-to-body @refresh="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import SendUtil from '../components/sendUtil.vue'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
export default{
|
||||
components: { SendUtil, Pagination },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
areaList: [], // 省市县列表
|
||||
placeList: [],
|
||||
listLoading: true,
|
||||
varList: [],
|
||||
total: 0,
|
||||
title: '',
|
||||
isShow: false,
|
||||
form: {
|
||||
USER_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: '',
|
||||
TEMPORARY_TYPE: '1'
|
||||
},
|
||||
TEMPORARY_ID: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.TEMPORARY_ID
|
||||
},
|
||||
// 获取审核类型
|
||||
getType(AUDIT_TYPE) {
|
||||
if (AUDIT_TYPE === '0') {
|
||||
return '不通过'
|
||||
} else if (AUDIT_TYPE === '1') {
|
||||
return '审核中'
|
||||
} else if (AUDIT_TYPE === '2') {
|
||||
return '通过'
|
||||
}
|
||||
},
|
||||
// 判断审核按钮是否显示
|
||||
showFirstButton(FIRST_AUDIT_USER_ID, AUDIT_TYPE) {
|
||||
return FIRST_AUDIT_USER_ID === JSON.parse(sessionStorage.getItem('user')).USER_ID && AUDIT_TYPE === '1'
|
||||
},
|
||||
// showSecondButton(SECOND_AUDIT_USER_ID, AUDIT_TYPE) {
|
||||
// return SECOND_AUDIT_USER_ID === JSON.parse(sessionStorage.getItem('user')).USER_ID && AUDIT_TYPE === 2
|
||||
// },
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
USER_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: ''
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/temporary/access/getAccessList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, this.form
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
approve(row) {
|
||||
this.$refs.sendUtil.init(row)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-loading="loading"
|
||||
:visible.sync="visible"
|
||||
:append-to-body="appendToBody"
|
||||
:before-close="beforeClose"
|
||||
title="审批"
|
||||
width="1200px"
|
||||
destroy-on-close>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="200px" label-position="right" type="flex">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="STATUS" label="是否通过: ">
|
||||
<el-select v-model="form.STATUS" filterable style="width: 300px" placeholder="请选择" @change="clearInfo">
|
||||
<el-option label="是" value="1"/>
|
||||
<el-option label="否" value="0"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col v-if="form.STATUS === '0'" :span="24">
|
||||
<el-form-item v-if="form.STATUS === '0'" prop="OPINION" label="打回原因:">
|
||||
<el-input v-model="form.OPINION" :rows="2" type="textarea" placeholder="填写审批意见"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">关 闭</el-button>
|
||||
<el-button type="primary" @click="sendMessage">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vueQr from 'vue-qr'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import uploadFile from '../../../util/uploadFile/index.vue'
|
||||
import { requestFN } from '@/utils/request'
|
||||
export default {
|
||||
components: { uploadFile, Treeselect, vueQr },
|
||||
props: {
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
form: {
|
||||
STATUS: null,
|
||||
APPOINT_CORP_ID: '',
|
||||
APPOINT_CORP_NAME: '',
|
||||
APPOINT_DEPARTMENT_ID: null,
|
||||
APPOINT_DEPARTMENT_NAME: '',
|
||||
APPOINT_USER_ID: null,
|
||||
APPOINT_USER_NAME: '',
|
||||
OPINION: '',
|
||||
APPOINT_ANNEX: [],
|
||||
user: '',
|
||||
tm: new Date().getTime(),
|
||||
list: [],
|
||||
isShow: true,
|
||||
info: {},
|
||||
BACK_NAME: '',
|
||||
BACK_STEP: ''
|
||||
},
|
||||
rules: {
|
||||
STATUS: [
|
||||
{ required: true, message: '请选择是否通过', trigger: 'change' }
|
||||
],
|
||||
OPINION: [
|
||||
{ required: true, message: '请填写打回原因', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
heirloom: {},
|
||||
|
||||
normalizer(node) {
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.nodes
|
||||
}
|
||||
},
|
||||
|
||||
departmentTree: [],
|
||||
peopleList: [],
|
||||
corpFlag: false,
|
||||
menu: {
|
||||
department: '',
|
||||
user: '',
|
||||
uploadFile: '',
|
||||
limitFlag: ''
|
||||
},
|
||||
step: 0,
|
||||
list: [],
|
||||
ACCESS_AUDIT_ID: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init(e) {
|
||||
this.loading = true
|
||||
this.visible = true
|
||||
this.ACCESS_AUDIT_ID = e.ACCESS_AUDIT_ID
|
||||
console.log(this.ACCESS_AUDIT_ID)
|
||||
console.log(e.ACCESS_AUDIT_ID)
|
||||
this.loading = false
|
||||
},
|
||||
handleClose() {
|
||||
this.form = {
|
||||
STATUS: '',
|
||||
APPOINT_DEPARTMENT_ID: null,
|
||||
APPOINT_DEPARTMENT_NAME: '',
|
||||
APPOINT_USER_ID: '',
|
||||
APPOINT_USER_NAME: '',
|
||||
OPINION: '',
|
||||
user: '',
|
||||
list: [],
|
||||
tm: new Date().getTime()
|
||||
}
|
||||
this.visible = false
|
||||
},
|
||||
goDetail() {
|
||||
this.$parent.activeName = 'List'
|
||||
},
|
||||
sendMessage() {
|
||||
requestFN(
|
||||
'/temporary/access/audit',
|
||||
{
|
||||
FIRST_AUDIT_USER_ID: JSON.parse(sessionStorage.getItem('user')).USER_ID,
|
||||
STATUS: this.form.STATUS,
|
||||
ACCESS_AUDIT_ID: this.ACCESS_AUDIT_ID,
|
||||
REASON: this.form.OPINION
|
||||
}
|
||||
).then((data) => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', '')
|
||||
}).catch((e) => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-show="activeName==='List'" ref="list" />
|
||||
<SendUtil v-if="activeName==='SendUtil'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
import SendUtil from './components/sendUtil.vue'
|
||||
export default {
|
||||
components: {
|
||||
List: List,
|
||||
SendUtil: SendUtil
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
USER_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue