[新增功能](hyx_门口门禁):

- 门口门禁相关页面
hyx_门口门禁
huangyuxuan 2025-01-10 16:26:48 +08:00
parent 288053aba9
commit 2e35e8f5ca
12 changed files with 1403 additions and 713 deletions

View File

@ -2,132 +2,28 @@
<div v-loading="listLoading">
<div style="padding:20px">
<el-form ref="form" :model="form" label-width="210px">
<!--第一行-->
<el-row>
<!-- 动态生成表单项 -->
<el-row v-for="(item, index) in uploadConfig" :key="index">
<el-col :span="12">
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
<div >
<img :src="config.fileUrl + form.REQUISITION_FILE" width="100" height="100">
<el-form-item v-if="dialogType !== 'savePhoto'" :label="`已上传${item.label}`">
<div>
<img :src="config.fileUrl + form[item.prop]" width="100" height="100">
</div>
</el-form-item>
<el-form-item label="智能口门管理系统账号申请单" prop="REQUISITION_FILE" >
<el-form-item :label="item.label" :prop="item.prop">
<el-upload
ref="photoUpload"
:file-list="form.REQUISITION_FILE"
:file-list="form[item.prop]"
:multiple="false"
:limit="1"
:class="{hide:hideUpload}"
:class="{hide: item.hideUpload}"
:auto-upload="false"
:on-remove="REQUISITION_FILERemove"
:on-change="REQUISITION_FILEChangeIMG"
:on-remove="(file, fileList) => handleRemove(file, fileList, item.prop)"
:on-change="(file, fileList) => handleChange(file, fileList, item.prop)"
action="#"
accept=".jpg,.jpeg,.png"
list-type="picture-card">
<i class="el-icon-plus" />
</el-upload>
</el-form-item>
</el-col>
</el-row>
<!--第二行-->
<el-row>
<el-col :span="12">
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
<div >
<img :src="config.fileUrl + form.COMMITMENT_FILE" width="100" height="100">
</div>
</el-form-item>
<el-form-item label="智能口门管理系统使用承诺书" prop="COMMITMENT_FILE" >
<el-upload
ref="photoUpload"
:file-list="form.COMMITMENT_FILE"
:multiple="false"
:limit="1"
:class="{hide:hideUpload}"
:auto-upload="false"
:on-remove="REQUISITION_FILERemove"
:on-change="REQUISITION_FILEChangeIMG"
action="#"
accept=".jpg,.jpeg,.png"
list-type="picture-card">
<i class="el-icon-plus" />
</el-upload>
</el-form-item>
</el-col>
</el-row>
<!--第三行-->
<el-row>
<el-col :span="12">
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
<div >
<img :src="config.fileUrl + form.LICENSE_FILE" width="100" height="100">
</div>
</el-form-item>
<el-form-item label="营业执照" prop="LICENSE_FILE" >
<el-upload
ref="photoUpload"
:file-list="form.LICENSE_FILE"
:multiple="false"
:limit="1"
:class="{hide:hideUpload}"
:auto-upload="false"
:on-remove="REQUISITION_FILERemove"
:on-change="REQUISITION_FILEChangeIMG"
action="#"
accept=".jpg,.jpeg,.png"
list-type="picture-card">
<i class="el-icon-plus" />
</el-upload>
</el-form-item>
</el-col>
</el-row>
<!--第四行-->
<el-row>
<el-col :span="12">
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
<div >
<img :src="config.fileUrl + form.TRANSPORT_PERMIT_FILE" width="100" height="100">
</div>
</el-form-item>
<el-form-item label="道路运输经营许可证" prop="TRANSPORT_PERMIT_FILE" >
<el-upload
ref="photoUpload"
:file-list="form.TRANSPORT_PERMIT_FILE"
:multiple="false"
:limit="1"
:class="{hide:hideUpload}"
:auto-upload="false"
:on-remove="REQUISITION_FILERemove"
:on-change="REQUISITION_FILEChangeIMG"
action="#"
accept=".jpg,.jpeg,.png"
list-type="picture-card">
<i class="el-icon-plus" />
</el-upload>
</el-form-item>
</el-col>
</el-row>
<!--第五行-->
<el-row>
<el-col :span="12">
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
<div >
<img :src="config.fileUrl + form.HAZARDOUS_CHEMICALS_FILE" width="100" height="100">
</div>
</el-form-item>
<el-form-item label="危险化学品经营许可证" prop="HAZARDOUS_CHEMICALS_FILE" >
<el-upload
ref="photoUpload"
:file-list="form.HAZARDOUS_CHEMICALS_FILE"
:multiple="false"
:limit="1"
:class="{hide:hideUpload}"
:auto-upload="false"
:on-remove="REQUISITION_FILERemove"
:on-change="REQUISITION_FILEChangeIMG"
action="#"
accept=".jpg,.jpeg,.png"
list-type="picture-card">
<i class="el-icon-plus" />
<i class="el-icon-plus"/>
</el-upload>
</el-form-item>
</el-col>
@ -144,10 +40,12 @@
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import {requestFN} from '@/utils/request'
import SelectTree from '@/components/SelectTree'
export default{
components: { Pagination, SelectTree},
import {upload} from "../../../../../utils/upload";
export default {
components: {Pagination, SelectTree},
data() {
return {
listQuery: {
@ -172,7 +70,7 @@ export default{
VEHICLE_TYPE: '',
CONTACT: '',
PHONE: '',
EMISSION_STANDARDS:'',
EMISSION_STANDARDS: '',
},
form: {
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
@ -182,11 +80,19 @@ export default{
LICENSE_FILE: '',
TRANSPORT_PERMIT_FILE: '',
HAZARDOUS_CHEMICALS_FILE: ''
}
},
uploadConfig: [
{label: '智能口门管理系统账号申请单', prop: 'REQUISITION_FILE', hideUpload: false},
{label: '智能口门管理系统使用承诺书', prop: 'COMMITMENT_FILE', hideUpload: false},
{label: '营业执照', prop: 'LICENSE_FILE', hideUpload: false},
{label: '道路运输经营许可证', prop: 'TRANSPORT_PERMIT_FILE', hideUpload: false},
{label: '危险化学品经营许可证', prop: 'HAZARDOUS_CHEMICALS_FILE', hideUpload: false}
]
}
},
async created() {
this.getList()
this.getUploadedFiles()
},
methods: {
//
@ -212,7 +118,7 @@ export default{
getList() {
this.listLoading = true
requestFN(
'/mkmj/management/carInfoList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
'/mkmj/management/carInfoList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
).then((data) => {
console.log(data)
this.listLoading = false
@ -224,43 +130,85 @@ export default{
this.listLoading = false
})
},
reSetAddDialog() {
this.addForm.LICENCE_NO = ''
this.addForm.USER_ID = ''
this.addForm.VEHICLE_DEPARTMENT_ID = ''
this.addForm.LICENCE_TYPE = ''
this.addForm.VEHICLE_TYPE = ''
this.addForm.VEHICLE_BELONG_TYPE = ''
this.addForm.EMPLOYEE_VEHICLE_USER_ID = ''
this.userList = []
this.addForm.DEPARTMENT_NAME = ''
this.addForm.DEPARTMENT_ID = ''
},
REQUISITION_FILERemove(file, fileList) {
this.form.REQUISITION_FILE = fileList
this.hideUpload = fileList.length >= 1
},
REQUISITION_FILEChangeIMG(file, fileList) {
const types = ['image/jpeg', 'image/jpg', 'image/png']
const isImage = types.includes(file.raw.type)
if (!isImage) {
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
fileList.pop()
this.form.REQUISITION_FILE = []
return
//
handleRemove(file, fileList, prop) {
this.form[prop] = fileList;
const configItem = this.uploadConfig.find(item => item.prop === prop);
if (configItem) {
configItem.hideUpload = fileList.length >= 1;
}
this.form.REQUISITION_FILE = []
this.form.REQUISITION_FILE.push(file)
this.hideUpload = fileList.length >= 1
},
confirm(){
alert('1111')
//
handleChange(file, fileList, prop) {
const types = ['image/jpeg', 'image/jpg', 'image/png'];
const isImage = types.includes(file.raw.type);
if (!isImage) {
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!');
fileList.pop();
this.form[prop] = [];
return;
}
this.form[prop] = [];
this.form[prop].push(file);
const configItem = this.uploadConfig.find(item => item.prop === prop);
if (configItem) {
configItem.hideUpload = fileList.length >= 1;
}
},
goBack(){
alert('222')
getUploadedFiles() {
try {
const response = requestFN('/mkmj/management/getUploadedFiles', {
MOTORCADE_ID: this.form.MOTORCADE_ID
});
//
if (response && response.result === "success" && response.corpFilingApplicationEntity) {
const uploadedFiles = response.corpFilingApplicationEntity;
// uploadConfig
this.uploadConfig.forEach(item => {
if (uploadedFiles[item.prop]) {
// form
this.form[item.prop] = [{
url: this.config.fileUrl + uploadedFiles[item.prop], // URL
name: uploadedFiles[item.prop] //
}];
}
});
}
} catch (error) {
console.error('获取已上传文件失败', error);
}
},
confirm() {
this.listLoading = true;
console.log(this.form);
const formData = new FormData();
formData.append('CORPINFO_ID', this.form.CORPINFO_ID);
formData.append("MOTORCADE_ID",this.form.MOTORCADE_ID);
formData.append('REQUISITION_FILE', this.form.REQUISITION_FILE[0].raw);
formData.append('COMMITMENT_FILE', this.form.COMMITMENT_FILE[0].raw);
formData.append('LICENSE_FILE', this.form.LICENSE_FILE[0].raw);
formData.append('TRANSPORT_PERMIT_FILE', this.form.TRANSPORT_PERMIT_FILE[0].raw);
formData.append('HAZARDOUS_CHEMICALS_FILE', this.form.HAZARDOUS_CHEMICALS_FILE[0].raw);
console.log(formData); // FormData
upload(
'/mkmj/management/fleetFilingApply',
formData
).then(response => {
console.log('上传成功', response);
this.listLoading = false;
this.goBack()
}).catch(error => {
console.error('上传失败', error);
this.listLoading = false;
});
},
goBack() {
this.$parent.activeName = 'List'
}
}
}
</script>

View File

@ -38,15 +38,43 @@
<el-table-column prop="MOTORCADE_NAME" label="车队名称"/>
<el-table-column label="操作" align="left" width="300">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" size="mini" @click="handleEdit(row)"></el-button>
<el-button type="primary" icon="el-icon-view" size="mini" @click="getAuditInfo(row)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/><div/>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<div/>
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<flow-step ref="flowStep" append-to-body @refresh="getList"/>
<!--新增-->
<el-dialog :visible.sync="addLoading" width="600px">
<el-form ref="form" :model="form" label-width="110px" style="width: 500px;">
<el-form-item label="车队名称:">
<el-input v-model="form.ADD_MOTORCADE_NAME" placeholder="请输入车队名称" class="filter-item" style="width: 200px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="addLoading = false"> </el-button>
<el-button type="primary" @click="saveMotorcade"> </el-button>
</div>
</el-dialog>
<!--编辑-->
<el-dialog :visible.sync="editLoading" width="600px">
<el-form ref="form" :model="form" label-width="110px" style="width: 500px;">
<el-form-item label="车队名称:">
<el-input v-model="form.ADD_MOTORCADE_NAME" placeholder="请输入车队名称" class="filter-item" style="width: 200px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="editLoading = false"> </el-button>
<el-button type="primary" @click="editMotorcade()"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -64,12 +92,16 @@ export default{
areaList: [], //
placeList: [],
listLoading: true,
addLoading: false,
editLoading: false,
varList: [],
total: 0,
title: '',
isShow: false,
form: {
MOTORCADE_ID: '',
MOTORCADE_NAME: '',
ADD_MOTORCADE_NAME: '',
PHONE: '',
ID_CARD: '',
CORPINFO_NAME: '',
@ -121,6 +153,64 @@ export default{
this.listLoading = false
})
},
handleAdd(){
this.addLoading = true
},
saveMotorcade(){
requestFN(
'/mkmj/management/motorcadeInfoManagement',
{
MOTORCADE_NAME: this.form.ADD_MOTORCADE_NAME,
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
}
).then((data) => {
this.addLoading = false
this.form.MOTORCADE_NAME = ''
this.getQuery()
}).catch((e) => {
this.addLoading = false
})
},
handleEdit(row){
this.form.MOTORCADE_ID = row.MOTORCADE_ID
this.editLoading = true
},
editMotorcade(){
requestFN(
'/mkmj/management/motorcadeInfoManagement',
{
MOTORCADE_ID : this.form.MOTORCADE_ID,
MOTORCADE_NAME: this.form.ADD_MOTORCADE_NAME,
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
}
).then((data) => {
this.editLoading = false
this.form.MOTORCADE_NAME = ''
this.getQuery()
}).catch((e) => {
this.editLoading = false
})
},
handleDelete(row) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/mkmj/management/deleteMotorCade',
{
MOTORCADE_ID : row.MOTORCADE_ID
}
).then((data) => {
this.listLoading = false
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
getAuditInfo(row) {
this.$parent.activeName = 'Apply'
this.$parent.MOTORCADE_ID = row.MOTORCADE_ID

View File

@ -4,8 +4,8 @@
<el-form ref="form" v-model="form">
<el-row>
<el-col :span="5">
<el-form-item label="车队名称:">
<el-input v-model="form.MOTORCADE_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
<el-form-item label="车牌号:">
<el-input v-model="form.LICENCE_NO" placeholder="搜索" class="filter-item" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col :span="4">
@ -42,22 +42,21 @@
<el-table-column prop="VEHICLE_TYPE" label="车辆类型"/>
<el-table-column label="操作" align="left" width="300">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="getAuditInfo(row)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="getAuditInfo(row)"></el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="goEdit(row)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="goDelete(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="openAddDialogAddBtn(row)"></el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="openAddDialogAddBtn()"></el-button>
<div/>
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<!-- 添加车辆信息 -->
<el-dialog :visible.sync="addDialogVisible" title="添加车辆信息" width="600px">
<el-form v-if="addDialogVisible" ref="addForm" :model="addForm" label-width="170px" style="padding:0 20px; width: 500px;">
<el-form-item :rules="[{required: true}]" label="车牌号">
<el-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
<el-form-item :rules="[{required: true}]" label="车牌号" prop="LICENCE_NO">
<el-input v-model="addForm.LICENCE_NO" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
</el-form-item>
<!-- 白牌蓝牌黄牌绿牌黑牌 下拉框-->
<el-form-item :rules="[{required: true}]" label="车牌类型" prop="LICENCE_TYPE">
@ -81,20 +80,189 @@
placeholder="请选择车辆类型"
style="width: 300px"/>
</el-form-item>
<el-form-item label="负责人">
<!--是否为危化车辆-->
<el-form-item :rules="[{required: true}]" label="是否为危化车辆" prop="IS_DANGEROUS_CAR">
<SelectTree
ref="selectTree_add4"
:clearable="false"
:options="DANGEROUS_CAR_LIST"
:props="vehicleDefaultProps"
v-model="addForm.IS_DANGEROUS_CAR"
placeholder="请选择是否危化车辆"
style="width: 300px"/>
</el-form-item>
<el-form-item label="负责人" :rules="[{ required: true, message: '请填写负责人姓名', trigger: 'blur' }]">
<el-input v-model="addForm.CONTACT" type="text" maxlength="300" placeholder="这里输入负责人名称..."/>
</el-form-item>
<el-form-item label="负责人手机号">
<el-form-item label="负责人手机号" :rules="[{ required: true, message: '请填写负责人手机号', trigger: 'blur' }]">
<el-input v-model="addForm.PHONE" type="text" maxlength="300" placeholder="这里输入负责人手机号..."/>
</el-form-item>
<el-form-item label="排放标准" :rules="[{ required: true, message: '请填写排放标准', trigger: 'blur' }]">
<el-input v-model="addForm.EMISSION_STANDARDS" type="text" maxlength="300" placeholder="这里输入排放标准..."/>
</el-form-item>
<!-- 驾驶证上传 -->
<el-form-item label="驾驶证" :rules="[{ required: true, message: '请上传驾驶证', trigger: 'blur' }]">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleDrivingLicenseSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="绿本" :rules="[{ required: true, message: '请上传绿本', trigger: 'blur' }]">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleGreenBookSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="环保随车清单" :rules="[{ required: true, message: '请上传环保随车清单', trigger: 'blur' }]">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleEcoFriendlyChecklistSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="出厂合格证" :rules="[{ required: true, message: '请上传出厂合格证', trigger: 'blur' }]">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleFactoryCertificateSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="环保信息截图" :rules="[{ required: true, message: '请上传环保信息截图', trigger: 'blur' }]">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleEnvironmentalScreenshotsSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="addDialogCancelBtn"> </el-button>
<el-button type="primary" @click="addDialogConfirmBtn"> </el-button>
</div>
</el-dialog>
<!--编辑-->
<el-dialog :visible.sync="editDialogVisible" title="编辑车辆信息" width="600px">
<el-form v-if="editDialogVisible" ref="editForm" :model="addForm" label-width="170px" style="padding:0 20px; width: 500px;">
<el-form-item label="车牌号" prop="LICENCE_NO">
<el-input v-model="addForm.LICENCE_NO" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
</el-form-item>
<!-- 白牌蓝牌黄牌绿牌黑牌 下拉框-->
<el-form-item label="车牌类型" prop="LICENCE_TYPE">
<SelectTree
ref="selectTree_edit2"
:clearable="false"
:options="licenceTypeList"
:props="vehicleDefaultProps"
v-model="addForm.LICENCE_TYPE"
placeholder="请选择车牌类型"
style="width: 300px"/>
</el-form-item>
<!-- 货车轿车大巴客车 下拉框-->
<el-form-item label="车辆类型" prop="VEHICLE_TYPE">
<SelectTree
ref="selectTree_edit3"
:clearable="false"
:options="vehicleTypeList"
:props="vehicleDefaultProps"
v-model="addForm.VEHICLE_TYPE"
placeholder="请选择车辆类型"
style="width: 300px"/>
</el-form-item>
<!--是否为危化车辆-->
<el-form-item label="是否为危化车辆" prop="IS_DANGEROUS_CAR">
<SelectTree
ref="selectTree_edit4"
:clearable="false"
:options="DANGEROUS_CAR_LIST"
:props="vehicleDefaultProps"
v-model="addForm.IS_DANGEROUS_CAR"
placeholder="请选择是否危化车辆"
style="width: 300px"/>
</el-form-item>
<el-form-item label="负责人">
<el-input v-model="addForm.CONTACT" type="text" maxlength="300" placeholder="这里输入负责人名称..."/>
</el-form-item>
<el-form-item label="负责人手机号">
<el-input v-model="addForm.PHONE" type="text" maxlength="300" placeholder="这里输入负责人手机号..."/>
</el-form-item>
<el-form-item label="排放标准">
<el-input v-model="addForm.EMISSION_STANDARDS" type="text" maxlength="300" placeholder="这里输入排放标准..."/>
</el-form-item>
<!-- 驾驶证上传 -->
<el-form-item label="驾驶证">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleDrivingLicenseSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<flow-step ref="flowStep" append-to-body @refresh="getList"/>
<el-form-item label="绿本">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleGreenBookSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="环保随车清单">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleEcoFriendlyChecklistSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="出厂合格证">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleFactoryCertificateSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="环保信息截图">
<el-upload
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
:on-success="handleEnvironmentalScreenshotsSuccess"
:before-upload="beforeUpload"
:limit="1">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="editDialogCancelBtn"> </el-button>
<el-button type="primary" @click="editDialogConfirmBtn"> </el-button>
</div>
</el-dialog>
<div class="bottom-btn-group">
<el-button type="info" icon="el-icon-back" size="mini" @click="goBack"></el-button>
</div>
</div>
</template>
@ -118,15 +286,25 @@ export default{
title: '',
isShow: false,
addDialogVisible: false,
editDialogVisible: false,
addForm: {
LICENCE_NO: '', //
MOTORCADE_ID: '', // ID
CORPINFO_ID: '',
VEHICLE_ID: '',
LICENCE_NO: '',
LICENCE_TYPE: '',
VEHICLE_TYPE: '',
CONTACT: '',
PHONE: '',
EMISSION_STANDARDS:'',
EMISSION_STANDARDS: '',
IS_DANGEROUS_CAR: '',
DRIVING_LICENSE: '',
GREEN_BOOK: '',
ECO_FRIENDLY_CHECKLIST: '',
FACTORY_CERTIFICATE: '',
ENVIRONMENTAL_SCREENSHOTS: '',
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
MOTORCADE_ID: this.$parent.MOTORCADE_ID,
VEHICLE_BELONG_TYPE: '3',
CAR_FROM: '2'
},
form: {
MOTORCADE_NAME: '',
@ -143,7 +321,6 @@ export default{
},
//
licenceTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '白牌' },
{ ID: '1', NAME: '蓝牌' },
{ ID: '2', NAME: '黄牌' },
@ -157,6 +334,10 @@ export default{
{ ID: '1', NAME: '轿车' },
{ ID: '2', NAME: '大巴客车' }
],
DANGEROUS_CAR_LIST: [
{ ID: '0', NAME: '否' },
{ ID: '1', NAME: '是' },
],
//
vehicleDefaultProps: {
value: 'ID',
@ -211,7 +392,7 @@ export default{
if (result) {
console.log('格式校验通过')
requestFN(
'vehiclemessage/goCheckLicenceNo',
'/mkmj/management/goCheckLicenceNo',
{
'LICENCE_NO': this.addForm.LICENCE_NO
}
@ -241,26 +422,108 @@ export default{
this.ISCHECK = false
},
reSetAddDialog() {
this.addForm.LICENCE_NO = ''
this.addForm.USER_ID = ''
this.addForm.VEHICLE_DEPARTMENT_ID = ''
this.addForm.LICENCE_TYPE = ''
this.addForm.VEHICLE_TYPE = ''
this.addForm.VEHICLE_BELONG_TYPE = ''
this.addForm.EMPLOYEE_VEHICLE_USER_ID = ''
this.userList = []
this.addForm.DEPARTMENT_NAME = ''
this.addForm.DEPARTMENT_ID = ''
this.addForm.VEHICLE_ID = '',
this.addForm.LICENCE_NO = '',
this.addForm.LICENCE_TYPE = '',
this.addForm.VEHICLE_TYPE = '',
this.addForm.CONTACT = '',
this.addForm.PHONE = '',
this.addForm.EMISSION_STANDARDS = '',
this.addForm.IS_DANGEROUS_CAR = '',
this.addForm.DRIVING_LICENSE = '',
this.addForm.GREEN_BOOK = '',
this.addForm.ECO_FRIENDLY_CHECKLIST = '',
this.addForm.FACTORY_CERTIFICATE = '',
this.addForm.ENVIRONMENTAL_SCREENSHOTS = ''
},
handleDrivingLicenseSuccess(response, file) {
this.addForm.DRIVING_LICENSE = response.uploadPath;
},
handleGreenBookSuccess(response, file) {
this.addForm.GREEN_BOOK = response.uploadPath;
},
handleEcoFriendlyChecklistSuccess(response, file) {
this.addForm.ECO_FRIENDLY_CHECKLIST = response.uploadPath;
},
handleFactoryCertificateSuccess(response, file) {
this.addForm.FACTORY_CERTIFICATE = response.uploadPath;
},
handleEnvironmentalScreenshotsSuccess(response, file) {
this.addForm.ENVIRONMENTAL_SCREENSHOTS = response.uploadPath;
},
beforeUpload(file) {
//
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error('上传文件大小不能超过 2MB!');
}
return isLt2M;
},
//
addDialogCancelBtn() {
this.addDialogVisible = false
this.addDialogVisible = false;
},
getAuditInfo(row) {
this.$refs.flowStep.init(row)
addDialogConfirmBtn() {
requestFN(
'/mkmj/management/carInfoMaintenance' ,
this.addForm
).then((data) => {
this.addDialogVisible = false
this.reSetAddDialog()
this.getList()
}).catch((e) => {
this.addDialogVisible = false
})
},
goDelete(row){
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/mkmj/management/deleteCarInfo',
{
VEHICLE_ID : row.VEHICLE_ID
}
).then((data) => {
this.listLoading = false
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
goEdit(row){
this.addForm.VEHICLE_ID = row.VEHICLE_ID
this.editDialogVisible = true
},
editDialogCancelBtn(){
this.editDialogVisible = false
},
editDialogConfirmBtn(){
requestFN(
'/mkmj/management/carInfoMaintenance' ,
this.addForm
).then((data) => {
this.editDialogVisible = false
this.reSetAddDialog()
this.getList()
}).catch((e) => {
this.editDialogVisible = false
})
},
goBack(){
this.$parent.activeName = 'List'
}
}
}
</script>
<style scoped>
.bottom-btn-group {
margin-top: 20px;
text-align: center;
}
</style>

View File

@ -123,6 +123,7 @@ export default{
},
carMaintenance(row) {
console.log('---------------------------------')
console.log(row)
this.$parent.MOTORCADE_ID = row.MOTORCADE_ID
this.$parent.activeName = 'CarList'
},

View File

@ -0,0 +1,128 @@
<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.LICENCE_NO" 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="LICENCE_NO" label="车牌号"/>
<el-table-column prop="LICENCE_TYPE" label="车牌类型"/>
<el-table-column prop="VEHICLE_TYPE" label="车辆类型"/>
<el-table-column prop="vehicle_arrival_barrier" label="车辆入港闸口"/>
<el-table-column prop="vehicle_arrival_time" label="车辆入港时间"/>
<el-table-column prop="vehicle_departure_barrier" label="车辆离岗闸口"/>
<el-table-column prop="vehicle_departure_time" label="车辆离岗时间"/>
</el-table>
<div class="page-btn-group">
<div/><div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
export default{
components: { Pagination },
data() {
return {
listQuery: {
page: 1,
limit: 10
},
areaList: [], //
placeList: [],
listLoading: true,
varList: [],
total: 0,
title: '',
isShow: false,
form: {
LICENCE_NO: '',
PHONE: '',
ID_CARD: '',
CORPINFO_NAME: '',
DEPARTMENT_NAME: '',
VISIT_START_TIME: '',
VISIT_END_TIME: '',
DOOR_NAME: '',
TEMPORARY_TYPE: '2',
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
}
}
},
created() {
this.getList()
},
methods: {
//
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(
'/mkmj/management/getCarExitRecords?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
).then((data) => {
console.log(data)
this.listLoading = false
this.varList = data.recordList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
}
}
}
</script>

View File

@ -0,0 +1,24 @@
<template>
<div>
<List v-show="activeName==='List'" ref="list" />
</div>
</template>
<script>
import List from './components/list'
export default {
components: {
List: List
},
data() {
return {
activeName: 'List',
USER_ID: ''
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,322 @@
<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.MOTORCADE_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="LICENCE_NO" label="车牌号"/>
<el-table-column prop="CONTACT" label="联系人姓名"/>
<el-table-column prop="PHONE" label="联系人电话"/>
<el-table-column prop="LICENCE_TYPE" label="车牌类型"/>
<el-table-column prop="VEHICLE_TYPE" label="车辆类型"/>
<el-table-column prop="AUDIT_STATE" label="审核状态" >
<template slot-scope="{row}">
<el-tag v-if="row.IS_AUDIT === '0' || row.IS_AUDIT === null" type="success"></el-tag>
<el-tag v-if="row.IS_AUDIT === '1'" type="success"></el-tag>
<el-tag v-if="row.IS_AUDIT === '2'" type="success"></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="300">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="apply(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button plain type="info" @click="returnBtn"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<el-dialog
title="申请信息"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<el-form ref="auditForm" :model="auditForm" label-width="120px">
<el-form-item label="访问起始时间">
<el-date-picker
v-model="auditForm.VISIT_START_TIME"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="访问结束时间">
<el-date-picker
v-model="auditForm.VISIT_END_TIME"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="审核人公司" v-if="showCorpSelect">
<el-select
v-model="auditForm.CORPINFO_ID"
placeholder="请选择公司"
@change="handleCorpChange">
<el-option
v-for="corp in corpList"
:key="corp.CORPINFO_ID"
:label="corp.CORP_NAME"
:value="corp.CORPINFO_ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="审核人">
<el-select
v-model="auditForm.AUDITOR_ID"
placeholder="请选择审核人">
<el-option
v-for="auditor in personList"
:key="auditor.USER_ID"
:label="auditor.USERNAME"
:value="auditor.USER_ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="访问地">
<el-select
v-model="auditForm.VISIT_PLACE"
placeholder="请选择访问口门">
<el-option
v-for="place in doorList"
:key="place.DOOR_ID"
:label="place.DOOR_NAME"
:value="place.DOOR_ID">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitAudit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import SelectTree from '@/components/SelectTree'
export default{
components: { Pagination, SelectTree},
data() {
return {
listQuery: {
page: 1,
limit: 10
},
areaList: [], //
listLoading: true,
varList: [],
total: 0,
title: '',
isShow: false,
dialogVisible: false,
addForm: {
LICENCE_NO: '', //
MOTORCADE_ID: '', // ID
CORPINFO_ID: '',
LICENCE_TYPE: '',
VEHICLE_TYPE: '',
CONTACT: '',
PHONE: '',
EMISSION_STANDARDS:'',
},
form: {
MOTORCADE_NAME: '',
PHONE: '',
ID_CARD: '',
CORPINFO_NAME: '',
DEPARTMENT_NAME: '',
VISIT_START_TIME: '',
VISIT_END_TIME: '',
DOOR_NAME: '',
TEMPORARY_TYPE: '2',
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
MOTORCADE_ID: this.$parent.MOTORCADE_ID
},
showCorpSelect: true,
auditForm: {
VISIT_START_TIME: '',
VISIT_END_TIME: '',
CORPINFO_ID: '',
AUDITOR_ID: '',
VISIT_PLACE: ''
},
corpList: [], //
doorList: [], //
personList: [], //
//
licenceTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '白牌' },
{ ID: '1', NAME: '蓝牌' },
{ ID: '2', NAME: '黄牌' },
{ ID: '3', NAME: '绿牌' },
{ ID: '4', NAME: '黑牌' }
],
//
vehicleTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '货车' },
{ ID: '1', NAME: '轿车' },
{ ID: '2', NAME: '大巴客车' }
],
//
vehicleDefaultProps: {
value: 'ID',
label: 'NAME',
children: 'nodes'
}
}
},
async created() {
this.getList()
},
methods: {
//
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(
'/mkmj/management/carInfoList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
).then((data) => {
console.log(data)
this.listLoading = false
this.varList = data.carInfoList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
apply(row) {
this.dialogVisible = true;
this.auditForm = {
VISIT_START_TIME: '',
VISIT_END_TIME: '',
CORPINFO_ID: '',
AUDITOR_ID: '',
VISIT_PLACE: ''
};
this.VEHICLE_ID = row.VEHICLE_ID
this.IS_DANGEROUS_CAR = row.IS_DANGEROUS_CAR
this.showCorpSelect = row.IS_DANGEROUS_CAR !== '1';
// 访
this.getCorpList();
this.getPlaceList();
if (!this.showCorpSelect){
this.getAuditorList();
}
},
handleCorpChange(corpId) {
// ID
this.getAuditorList(corpId);
},
getCorpList() {
//
requestFN('/mkmj/management/getCorpList').then(response => {
this.corpList = response.corpList;
});
},
getAuditorList(corpId) {
//
requestFN('/mkmj/management/getPersonList',
{ CORPINFO_ID: corpId }
).then(response => {
this.personList = response.personList;
});
},
getPlaceList() {
// 访
requestFN('/mkmj/management/getPlaceList').then(response => {
this.doorList = response.doorList;
});
},
submitAudit() {
//
requestFN('/mkmj/management/intoPortApplication',
{
VEHICLE_ID: this.VEHICLE_ID,
IS_DANGEROUS_CAR: this.IS_DANGEROUS_CAR,
VISIT_START_TIME: this.auditForm.VISIT_START_TIME,
VISIT_END_TIME: this.auditForm.VISIT_END_TIME,
AUDITOR: this.auditForm.AUDITOR_ID,
DOOR_ID: this.auditForm.VISIT_PLACE
}
).then(response => {
this.$message.success('申请提交成功');
this.dialogVisible = false;
this.getList()
});
},
handleClose(){
this.dialogVisible = false;
this.auditForm = {
VISIT_START_TIME: '',
VISIT_END_TIME: '',
CORPINFO_ID: '',
AUDITOR_ID: '',
VISIT_PLACE: ''
};
},
returnBtn(){
this.$parent.activeName = 'List'
}
}
}
</script>

View File

@ -0,0 +1,136 @@
<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.MOTORCADE_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="MOTORCADE_NAME" label="车队名称"/>
<el-table-column label="操作" align="left" width="200">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" size="mini" @click="carMaintenance(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>
<flow-step ref="flowStep" append-to-body @refresh="getList"/>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
export default{
components: { Pagination },
data() {
return {
listQuery: {
page: 1,
limit: 10
},
areaList: [], //
placeList: [],
listLoading: true,
varList: [],
total: 0,
title: '',
isShow: false,
form: {
MOTORCADE_NAME: '',
PHONE: '',
ID_CARD: '',
CORPINFO_NAME: '',
DEPARTMENT_NAME: '',
VISIT_START_TIME: '',
VISIT_END_TIME: '',
DOOR_NAME: '',
TEMPORARY_TYPE: '2',
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
}
}
},
created() {
this.getList()
},
methods: {
//
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(
'/mkmj/management/getMotorcadeList?showCount=' + this.listQuery.limit + '&currentPage=' + 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
})
},
carMaintenance(row) {
console.log('---------------------------------')
this.$parent.MOTORCADE_ID = row.MOTORCADE_ID
this.$parent.activeName = 'CarList'
},
getAuditInfo(row) {
this.$refs.flowStep.init(row)
}
}
}
</script>

View File

@ -0,0 +1,27 @@
<template>
<div>
<List v-show="activeName==='List'" ref="list" />
<CarList v-if="activeName==='CarList'"/>
</div>
</template>
<script>
import List from './components/list'
import CarList from "./components/carList";
export default {
components: {
List: List,
CarList: CarList
},
data() {
return {
activeName: 'List',
USER_ID: ''
}
}
}
</script>
<style scoped>
</style>

View File

@ -77,25 +77,24 @@
{{ translateVehicleType(row.VEHICLE_TYPE) }}
</template>
</el-table-column>
<el-table-column prop="DEPARTMENT_NAME" label="车辆所属部门" align="center" />
<el-table-column prop="USER_NAME" label="车辆责任人" align="center"/>
<!-- <el-table-column label="操作" align="center" width="480">-->
<!-- <template slot-scope="{row}">-->
<!-- <el-button type="warning" icon="el-icon-more" size="mini" @click="vehicleInOutRecordBtn(row.LICENCE_NO)"></el-button>-->
<!-- <el-button icon="el-icon-view" size="mini" @click="showDetail(row.VEHICLE_ID)"></el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="DEPT_NAME" label="车辆所属部门" align="center" />
<el-table-column prop="U_NAME" label="车辆责任人" align="center"/>
<el-table-column label="操作" align="center" width="480">
<template slot-scope="{row}">
<el-button type="warning" icon="el-icon-more" size="mini" @click="vehicleInOutRecordBtn(row.LICENCE_NO)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button type="primary" icon="el-icon-plus" @click="openAddDialogAddBtn"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getPageList" />
</div>
<!-- 添加车辆信息 -->
<el-dialog :visible.sync="addDialogVisible" title="添加车辆信息" width="600px">
<el-form v-if="addDialogVisible" ref="addForm" :model="addForm" label-width="170px" style="padding:0 20px; width: 500px;">
<el-form-item :rules="[{required: true}]" label="车牌号">
<el-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
<el-form-item :rules="[{required: true}]" label="车牌号" prop="LICENCE_NO">
<el-input v-model="addForm.LICENCE_NO" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
</el-form-item>
<!-- 白牌蓝牌黄牌绿牌黑牌 下拉框-->
<el-form-item :rules="[{required: true}]" label="车牌类型" prop="LICENCE_TYPE">
@ -119,40 +118,30 @@
placeholder="请选择车辆类型"
style="width: 300px"/>
</el-form-item>
<!-- 员工车辆单位车辆外部车辆 下拉框 -->
<el-form-item :rules="[{required: true}]" label="车辆所属类型" prop="VEHICLE_BELONG_TYPE">
<SelectTree
ref="selectTree_add4"
:clearable="false"
:options="vehicleBelongTypeList"
:props="vehicleDefaultProps"
v-model="addForm.VEHICLE_BELONG_TYPE"
placeholder="请选择车辆所属类型"
style="width: 300px"/>
</el-form-item>
<!-- 车辆所属部门下拉框 -->
<el-form-item v-show="roleName !== '普通用户角色'" :rules="[{required: true}]" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<SelectTree
ref="selectTree_add1"
:clearable="false"
:options="departmentTreeData"
:props="defaultProps"
v-model="addForm.VEHICLE_DEPARTMENT_ID"
placeholder="请选择车辆所属部门"
style="width: 300px"
@change="addUserList"/>
</el-form-item>
<el-form-item v-show="roleName === '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<el-input v-model="loginDepartmentName" disabled/>
</el-form-item>
<!-- 车辆责任人下拉框 -->
<el-form-item v-show="roleName !== '普通用户角色'" :rules="[{required: true}]" label="车辆责任人" prop="USER_ID">
<el-select :value="addForm.USER_ID" clearable placeholder="请选择" @visible-change="$forceUpdate()" @change="userIdAddChange">
<el-option v-for="item in userList" :key="item.USER_ID" :label="item.NAME" :value="item.USER_ID"/>
<el-form-item label="车辆所属部门">
<el-select
v-model="addForm.DEPARTMENT_ID"
placeholder="请选择部门"
@change="handleCorpChange">
<el-option
v-for="dept in departmentTreeData"
:key="dept.DEPARTMENT_ID"
:label="dept.NAME"
:value="dept.DEPARTMENT_ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-show="roleName === '普通用户角色'" label="车辆责任人" prop="USER_ID">
<el-input v-model="loginUserName" disabled/>
<el-form-item label="负责人">
<el-select
v-model="addForm.USER_ID"
placeholder="请选择负责人">
<el-option
v-for="user in personList"
:key="user.USER_ID"
:label="user.NAME"
:value="user.USER_ID">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -160,81 +149,6 @@
<el-button type="primary" @click="addDialogConfirmBtn"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="editDialogVisible" title="修改" width="600px">
<el-form ref="editForm" :model="editForm" label-width="170px" style="width: 500px;">
<el-form-item :rules="[{required: true}]" label="车牌号">
<el-input v-model="editForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoUpdate()"/>
</el-form-item>
<el-form-item label="车牌类型" prop="LICENCE_TYPE">
<el-select v-model="editForm.LICENCE_TYPE" clearable placeholder="请选择" @visible-change="$forceUpdate()">
<el-option v-for="item in licenceTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
</el-select>
</el-form-item>
<el-form-item label="车辆类型" prop="VEHICLE_TYPE">
<el-select v-model="editForm.VEHICLE_TYPE" clearable placeholder="请选择" @visible-change="$forceUpdate()">
<el-option v-for="item in vehicleTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
</el-select>
</el-form-item>
<el-form-item label="车辆所属类型" prop="VEHICLE_BELONG_TYPE">
<el-select v-model="editForm.VEHICLE_BELONG_TYPE" clearable placeholder="请选择" @visible-change="$forceUpdate()">
<el-option v-for="item in vehicleBelongTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
</el-select>
</el-form-item>
<!-- 车辆所属部门下拉框 -->
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<SelectTree
ref="selectTree_edit"
:clearable="true"
:options="departmentTreeData"
:props="defaultProps"
v-model="editForm.VEHICLE_DEPARTMENT_ID"
placeholder="请选择车辆所属部门"
style="width: 300px"
@change="updateUserList"/>
</el-form-item>
<el-form-item v-show="roleName === '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<el-input v-model="loginDepartmentName" disabled/>
</el-form-item>
<!-- 车辆责任人下拉框 -->
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆责任人" prop="USER_ID">
<el-select :value="editForm.USER_ID" clearable placeholder="请选择" @visible-change="$forceUpdate()" @change="userIdUpdateChange">
<el-option v-for="item in userList" :key="item.USER_ID" :label="item.NAME" :value="item.USER_ID" />
</el-select>
</el-form-item>
<el-form-item v-show="roleName === '普通用户角色'" label="车辆责任人" prop="USER_ID">
<el-input v-model="loginUserName" disabled/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="editDialogCancelBtn"> </el-button>
<el-button type="primary" @click="editDialogConfirmBtn"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="detailDialogVisible" title="详情" width="600px">
<el-form ref="form" :model="detailForm" label-width="170px" style="width: 500px;">
<el-form-item label="车牌号">
<el-input v-model="detailForm.LICENCE_NO" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="车牌类型">
<el-input v-model="detailForm.LICENCE_TYPE" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="车辆类型">
<el-input v-model="detailForm.VEHICLE_TYPE" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="车辆所属类型">
<el-input v-model="detailForm.VEHICLE_BELONG_TYPE" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="车辆所属部门">
<el-input v-model="detailForm.VEHICLE_DEPARTMENT_ID" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="车辆责任人">
<el-input v-model="detailForm.USER_ID" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="detailDialogReturnBtn"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
@ -301,6 +215,7 @@ export default {
children: 'nodes'
},
departmentTreeData: [],
personList: [],
// inspectionTypeList: [], //
//
varList: [],
@ -314,8 +229,7 @@ export default {
//
addForm: {
LICENCE_NO: '', //
VEHICLE_DEPARTMENT_ID: '', // id
VEHICLE_DEPARTMENT_NAME: '', //
CORPINFO_ID: '',
USER_ID: '', //
LICENCE_TYPE: '', //
VEHICLE_TYPE: '', //
@ -363,7 +277,6 @@ export default {
this.loginUserInfo = JSON.parse(sessionStorage.getItem('user')) //
this.getDepartmentTreeData() //
this.getLoginUserInfo() //
// this.getDict() //
this.getPageList() //
},
methods: {
@ -380,13 +293,7 @@ export default {
if (this.vehicleTypeList[i].ID == id) return this.vehicleTypeList[i].NAME
}
},
vehicleBelongType(id) {
for (var i = 0; i < this.vehicleBelongTypeList.length; i++) {
if (this.vehicleBelongTypeList[i].ID == id) return this.vehicleBelongTypeList[i].NAME
}
},
getLoginUserInfo() { //
// return new Promise((resolve) => {
requestFN(
'/user/goEditMyInfo',
{}
@ -439,14 +346,6 @@ export default {
this.reSetAddDialog()
this.ISCHECK = false
},
//
addDialogCancelBtn() {
this.addDialogVisible = false
},
//
detailDialogReturnBtn() {
this.detailDialogVisible = false
},
//
reSetAddDialog() {
this.addForm.LICENCE_NO = ''
@ -460,288 +359,31 @@ export default {
this.addForm.DEPARTMENT_NAME = ''
this.addForm.DEPARTMENT_ID = ''
},
//
addDialogConfirmBtn() {
if (this.addForm.LICENCE_NO !== null && this.addForm.LICENCE_NO === '') {
this.$message({
message: '车牌号不能为空',
type: 'error'
})
return false
}
if (this.addForm.LICENCE_TYPE !== null && this.addForm.LICENCE_TYPE === '') {
this.$message({
message: '请选择车牌类型',
type: 'error'
})
return false
}
if (this.addForm.VEHICLE_TYPE !== null && this.addForm.VEHICLE_TYPE === '') {
this.$message({
message: '请选择车辆类型',
type: 'error'
})
return false
}
if (this.addForm.VEHICLE_BELONG_TYPE !== null && this.addForm.VEHICLE_BELONG_TYPE === '') {
this.$message({
message: '请选择车辆所属类型',
type: 'error'
})
return false
}
if (this.roleName !== '普通用户角色') {
if (this.addForm.VEHICLE_DEPARTMENT_ID !== null && this.addForm.VEHICLE_DEPARTMENT_ID === '') {
this.$message({
message: '请选择车辆所属部门',
type: 'error'
})
return false
}
if (this.addForm.USER_ID !== null && this.addForm.USER_ID === '') {
this.$message({
message: '请选择车辆责任人',
type: 'error'
})
return false
}
} else {
this.addForm.VEHICLE_DEPARTMENT_ID = this.loginDepartmentId // id
this.addForm.VEHICLE_DEPARTMENT_NAME = this.loginDepartmentName //
this.addForm.USER_ID = this.loginUserId // id
this.addForm.USER_NAME = this.loginUserName //
}
if (this.addForm.VEHICLE_BELONG_TYPE === '0') { // ()
this.addForm.EMPLOYEE_VEHICLE_USER_ID = this.addForm.USER_ID // id
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = this.addForm.USER_NAME //
} else { //
this.addForm.EMPLOYEE_VEHICLE_USER_ID = '' // id
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = '' //
}
this.addRequest()
},
addRequest() {
requestFN(
'vehiclemessage/addVehicleMessage',
{
...this.addForm,
'CORPINFO_ID': this.corpInfoId,
'loginUserId': this.loginUserId
}
).then((data) => {
if (data.result === 'fail') {
this.$message({
message: data.msg,
type: 'error'
})
} else {
this.$message.success('车辆信息添加成功')
this.getPageList() //
this.addDialogVisible = false
}
}).catch((e) => {
})
},
//
openEditDialogEditBtn(VEHICLE_ID) {
this.editForm = {
VEHICLE_ID: VEHICLE_ID, // id()
LICENCE_NO: '', //
OLD_LICENCE_NO: '', //
USER_ID: '', //
EMPLOYEE_VEHICLE_USER_ID: '', //
VEHICLE_DEPARTMENT_ID: '' //
}
this.userList = []
this.editDialogVisible = true
//
requestFN(
'vehiclemessage/updateShowVehicleMessage',
{
VEHICLE_ID: VEHICLE_ID
}
).then((data) => {
if (data.result === 'success') {
this.editForm.LICENCE_NO = data.pd.LICENCE_NO //
this.editForm.OLD_LICENCE_NO = data.pd.LICENCE_NO //
this.editForm.USER_ID = data.pd.USER_ID //
this.editForm.LICENCE_TYPE = String(data.pd.LICENCE_TYPE) //
this.editForm.VEHICLE_TYPE = String(data.pd.VEHICLE_TYPE) //
this.editForm.VEHICLE_BELONG_TYPE = data.pd.VEHICLE_BELONG_TYPE === undefined ? '' : data.pd.VEHICLE_BELONG_TYPE //
if ('VEHICLE_DEPARTMENT_ID' in data.pd) { // id
const node = {}
node.id = data.pd.VEHICLE_DEPARTMENT_ID
// this.$refs.selectTree_edit.clearHandle()
this.editForm.VEHICLE_DEPARTMENT_ID = data.pd.VEHICLE_DEPARTMENT_ID
this.$nextTick(() => { // 使
this.$refs.selectTree_edit.handleNodeClick(node)
})
}
} else {
this.$message({
message: '数据回显失败',
type: 'error'
})
}
}).catch((e) => {
})
},
editDialogCancelBtn() {
this.editDialogVisible = false
},
// ()
showDetail(VEHICLE_ID) {
// this.$parent.activeName = 'Info'
// this.$parent.INSPECTION_ID = row.INSPECTION_ID
this.detailForm = {
LICENCE_NO: '', //
VEHICLE_DEPARTMENT_ID: '', //
VEHICLE_BELONG_TYPE: '', //
USER_ID: '', //
USER_NAME: '', //
EMPLOYEE_VEHICLE_USER_ID: '', //
LICENCE_TYPE: null, //
VEHICLE_TYPE: null //
}
this.detailDialogVisible = true
//
requestFN(
'vehiclemessage/detailVehicleMessage',
{
VEHICLE_ID: VEHICLE_ID
}
).then((data) => {
if (data.result === 'success') {
this.detailForm.LICENCE_NO = data.pd.LICENCE_NO //
this.detailForm.VEHICLE_DEPARTMENT_ID = data.pd.DEPARTMENT_NAME //
this.detailForm.USER_ID = data.pd.USER_NAME //
this.detailForm.LICENCE_TYPE = this.translateLicenceType(data.pd.LICENCE_TYPE) //
this.detailForm.VEHICLE_TYPE = this.translateVehicleType(data.pd.VEHICLE_TYPE) //
this.detailForm.VEHICLE_BELONG_TYPE = data.pd.VEHICLE_BELONG_TYPE === undefined ? '' : this.vehicleBelongType(data.pd.VEHICLE_BELONG_TYPE)
} else {
this.$message({
message: '数据回显失败',
type: 'error'
})
}
}).catch((e) => {
})
},
judgeEdit() {
if (this.editForm.VEHICLE_BELONG_TYPE === '0') { // ()
this.editForm.EMPLOYEE_VEHICLE_USER_ID = this.editForm.USER_ID // id
this.editForm.EMPLOYEE_VEHICLE_USER_NAME = this.editForm.USER_NAME //
} else { //
this.editForm.EMPLOYEE_VEHICLE_USER_ID = '' // id
this.editForm.EMPLOYEE_VEHICLE_USER_NAME = '' //
}
},
//
editDialogConfirmBtn() {
this.judgeEdit()
this.$refs.editForm.validate(valid => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '数据保存中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
this.listLoading = true
requestFN(
'vehiclemessage/updateVehicleMessage',
{
...this.editForm,
'CORPINFO_ID': this.loginUserInfo.CORPINFO_ID,
'loginUserId': this.loginUserInfo.USER_ID,
'roleName': this.loginUserInfo.ROLE_NAME
}
).then((data) => {
if (data.result === 'success') {
this.$message({
message: '修改成功',
type: 'success'
})
} else {
this.$message({
message: data.msg,
type: 'success'
})
}
this.listLoading = false
loading.close()
this.editDialogVisible = false
this.getQuery()
}).catch((e) => {
this.listLoading = false
loading.close()
})
} else {
return false
}
})
},
//
deleteSingleDataDeleteBtn(id, USER_ID, EMPLOYEE_VEHICLE_USER_ID) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'vehiclemessage/deleteVehicleMessage',
{
'VEHICLE_ID': id,
'USER_ID': USER_ID,
'EMPLOYEE_VEHICLE_USER_ID': EMPLOYEE_VEHICLE_USER_ID,
'CORPINFO_ID': this.loginUserInfo.CORPINFO_ID,
'loginUserId': this.loginUserInfo.USER_ID,
'roleName': this.loginUserInfo.ROLE_NAME
}
).then((data) => {
if (data.result === 'success') {
this.$message({
message: '删除成功',
type: 'success'
})
} else {
this.$message({
message: data.msg,
type: 'success'
})
}
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getPageList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
//
// getDict: function() {
// requestFN(
// '/dictionaries/listSelectTree',
// {
// DICTIONARIES_ID: '60e6481d96e44a5390ff5c347c4d1ffe' //
// }
// ).then((data) => {
// this.inspectionTypeList = JSON.parse(data.zTreeNodes)
// }).catch((e) => {
//
// })
// },
//
getDepartmentTreeData() {
requestFN(
'/department/listTree',
{}
'/mkmj/management/getDeptList',
{
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
}
).then((data) => {
this.departmentTreeData = JSON.parse(data.zTreeNodes)
this.departmentTreeData = data.deptList
}).catch((e) => {
})
},
handleCorpChange(deptId) {
// ID
this.getUserList(deptId);
},
getUserList(deptId){
requestFN(
'/mkmj/management/getUserListByDeptId',
{
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
DEPARTMENT_ID: deptId
}
).then((data) => {
this.personList = data.userList
}).catch((e) => {
})
},
@ -752,86 +394,6 @@ export default {
this.$refs.selectTree_Search1.clearHandle() //
this.$refs.selectTree_Search2.clearHandle()
},
addUserList(DEPARTMENT_ID) {
this.getUserList(DEPARTMENT_ID)
this.handleDepartmentAddChange(DEPARTMENT_ID)
},
updateUserList(DEPARTMENT_ID) {
this.getUserList(DEPARTMENT_ID)
this.handleDepartmentUpdateChange(DEPARTMENT_ID)
},
getUserList(DEPARTMENT_ID) { //
requestFN(
'/user/listAll',
{
DEPARTMENT_ID: DEPARTMENT_ID,
tm: new Date().getTime()
}
).then((data) => {
this.userList = data.userList
}).catch((e) => {
// this.listLoading = false
})
},
//
userIdAddChange(event) {
this.addForm.USER_ID = event
this.handleUserAddChange(event)
},
//
employeeUserIdAddChange(event) {
this.addForm.EMPLOYEE_VEHICLE_USER_ID = event
this.handleEmployeeUserAddChange(event)
},
//
userIdUpdateChange(event) {
this.editForm.USER_ID = event
this.handleUserUpdateChange(event)
},
handleDepartmentAddChange(value) {
this.addForm.VEHICLE_DEPARTMENT_NAME = this.findLabelByValue(this.departmentTreeData, value)
},
handleDepartmentUpdateChange(value) {
this.editForm.VEHICLE_DEPARTMENT_NAME = this.findLabelByValue(this.departmentTreeData, value)
},
findLabelByValue(tree, value) {
for (const node of tree) {
if (node.id === value) {
return node.name
}
if (node.nodes && node.nodes.length > 0) {
const result = this.findLabelByValue(node.nodes, value)
if (result) {
return result
}
}
}
return ''
},
handleUserAddChange(value) {
const selectedUser = this.userList.find(user => user.USER_ID === value)
if (selectedUser) {
this.addForm.USER_NAME = selectedUser.NAME
} else {
this.addForm.USER_NAME = ''
}
},
handleEmployeeUserAddChange(value) {
const selectedUser = this.userList.find(user => user.USER_ID === value)
if (selectedUser) {
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = selectedUser.NAME
} else {
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = ''
}
},
handleUserUpdateChange(value) {
const selectedUser = this.userList.find(user => user.USER_ID === value)
if (selectedUser) {
this.editForm.USER_NAME = selectedUser.NAME
} else {
this.editForm.USER_NAME = ''
}
},
resetForm(row) {
this.searchFrom = {
LICENCE_NO: '', //
@ -846,7 +408,7 @@ export default {
if (result) {
console.log('格式校验通过')
requestFN(
'vehiclemessage/goCheckLicenceNo',
'/mkmj/management/goCheckLicenceNo',
{
'LICENCE_NO': this.addForm.LICENCE_NO
}
@ -869,42 +431,32 @@ export default {
}
}
},
goCheckLicenceNoUpdate() {
if (this.editForm.LICENCE_NO) {
if (this.editForm.LICENCE_NO !== this.editForm.OLD_LICENCE_NO) {
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
const result = regex.test(this.editForm.LICENCE_NO)
if (result) {
console.log('格式校验通过')
requestFN(
'vehiclemessage/goCheckLicenceNo',
{
'LICENCE_NO': this.editForm.LICENCE_NO
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('验证通过')
this.ISCHECK = true
} else {
this.$message.error('车牌号已存在,请重新输入')
this.ISCHECK = false
}
}).catch((e) => {
console.info(e)
this.listLoading = false
this.ISCHECK = false
})
} else {
this.$message.success('车牌号不规范')
this.ISCHECK = false
}
}
}
},
//
vehicleInOutRecordBtn(LICENCE_NO) {
this.$parent.activeName = 'Record'
this.$parent.LICENCE_NO = LICENCE_NO
},
addDialogCancelBtn(){
this.addDialogVisible = false
this.reSetAddDialog()
},
addDialogConfirmBtn(){
requestFN(
'/mkmj/management/saveLongTimeCarInfo',
{
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
DEPARTMENT_ID: this.addForm.DEPARTMENT_ID,
USER_ID: this.addForm.USER_ID,
LICENCE_NO: this.addForm.LICENCE_NO,
LICENCE_TYPE: this.addForm.LICENCE_TYPE,
VEHICLE_TYPE: this.addForm.VEHICLE_TYPE,
CAR_FROM: '2'
}
).then((data) => {
this.addDialogVisible = false
this.getPageList()
}).catch((e) => {
})
}
}
}

View File

@ -0,0 +1,196 @@
<template>
<div class="app-container">
<el-form label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="口门名称:" label-width="110px">
<el-input v-model="searchForm.KEYWORDS" style="width:206px" placeholder="请输入内容"/>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="口门状态" label-width="110px">
<el-select v-model="searchForm.GATE_STATUS" placeholder="请选择">
<el-option v-for="(item,index) in StatusList" :key="index" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="所属区域" label-width="110px">
<el-select v-model="searchForm.REGION_BIANMA" placeholder="请选择">
<el-option v-for="(item,index) in RegionList" :key="index" :label="item.NAME" :value="item.BIANMA"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
ref="queryTable"
:data="varList"
:cell-style="getPlateColor"
: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="REGION_NAME" label="区域" width="100px" align="center"/>
<el-table-column prop="AREA_NAME" label="口门名称" width="100px" align="center"/>
<el-table-column prop="AREA_LEVEL_NAME" label="口门级别" width="100px" align="center"/>
<el-table-column prop="vehicle_plate_number" label="车牌号" width="100px" align="center"/>
<!-- <el-table-column prop="vehicle_category_name" label="车辆类型" width="150px" align="center"/>-->
<el-table-column prop="VEHICLE_TYPE_NAME" label="车辆类型" width="150px" align="center"/>
<!-- <el-table-column prop="vehicle_filing_method" label="车辆所属类型" width="100px" align="center"/>-->
<el-table-column prop="VEHICLE_BELONG_TYPE_NAME" label="车辆所属类型" width="100px" align="center"/>
<el-table-column prop="vehicle_arrival_status" label="车辆在港状态" width="100px" align="center"/>
<el-table-column prop="VEHICLE_DEPARTMENT_NAME" label="车辆所属部门" align="center"/>
<!-- <el-table-column prop="vehicle_filing_info_recording_org" label="车辆所属部门" align="center"/>-->
<el-table-column prop="USER_NAME" label="车辆责任人" width="150ox" align="center"/>
<!-- <el-table-column prop="vehicle_contact_name" label="车辆联系人" width="150ox" align="center"/>-->
<!-- <el-table-column prop="vehicle_contact_phone_number" label="联系人手机号" width="120px" align="center"/>-->
<el-table-column prop="vehicle_arrival_barrier" label="入港闸口" align="center"/>
<el-table-column prop="vehicle_arrival_time" label="入港时间" align="center"/>
<el-table-column prop="vehicle_departure_barrier" label="离港闸口" align="center"/>
<el-table-column prop="vehicle_departure_time" label="离港时间" align="center"/>
</el-table>
<div class="page-btn-group">
<div>
<el-button plain type="info" @click="returnBtn"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getPageList" />
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
export default {
components: { Pagination},
directives: { waves },
data() {
return {
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 20
},
total: 0,
KEYWORDS: '',
//
varList: [],
//
searchForm: {
LICENCE_NO: '', //
KEYWORDS: '',
GATE_STATUS: '',
REGION_BIANMA: ''
},
RegionList: [],
StatusList: [
{ value: '0', label: '停用' },
{ value: '1', label: '正常' },
{ value: '2', label: '暂时关闭' }
]
}
},
created() {
this.getDict()
this.searchForm.LICENCE_NO = this.$parent.LICENCE_NO
this.getPageList() //
},
methods: {
getRowKey(row) {
return row.id_sequence
},
//
getQuery() {
this.$refs.queryTable.clearSelection() //
this.getPageList()
},
resetSearch() {
this.searchForm.KEYWORDS = ''
this.searchForm.GATE_STATUS = ''
this.searchForm.REGION_BIANMA = ''
},
goKeyReset() {
this.resetSearch()
this.getQuery()
},
//
getPageList() {
this.listLoading = true
requestFN(
'/mkmj/management/getCarExitRecords?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
LICENCE_NO: this.searchForm.LICENCE_NO
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
// this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
//
returnBtn() {
this.$parent.activeName = 'List'
},
getPlateColor(row, column, rowIndex, columnIndex) {
if (row.column.label === '车牌号') {
const colorMap = {
蓝牌: 'background-color: blue;color: white',
黄牌: 'background-color: yellow;color: black',
新能源: 'background-color: green;color: white',
白牌: 'background-color: gray;color: black',
黑牌: 'background-color: black;color: white',
其他: 'background-color: white;color: black',
default: 'background-color: white;color: black'
}
// const plateColor = row.row.vehicle_plate_color || 'default'
const plateColor = row.row.LICENCE_TYPE_NAME || 'default'
const backgroundColorAndColor = colorMap[plateColor] || colorMap.default
return backgroundColorAndColor
}
},
getDict() {
requestFN(
'dictionaries/getLevels',
{
DICTIONARIES_ID: '1c73fa2717f2835165104aee234caefe'
}
).then((data) => {
this.RegionList = data.list
})
.catch((e) => {
this.listLoading = false
})
}
}
}
</script>

View File

@ -1,14 +1,17 @@
<template>
<div>
<List v-show="activeName==='List'" ref="list" />
<Record v-if="activeName==='Record'" />
</div>
</template>
<script>
import List from './components/list'
import Record from './components/record'
export default {
components: {
List
List: List,
Record: Record
},
data() {
return {