Merge remote-tracking branch 'origin/pet' into pet

pet
guoyuepeng 2024-11-29 14:15:08 +08:00
commit 54ca3bc92d
18 changed files with 2864 additions and 16 deletions

View File

@ -31,6 +31,10 @@
<svg-icon icon-class="dashboard" />
<span>在线监测</span>
</div>
<div class="right-menu-item hover-effect" @click="setShowModel('mkmj')">
<svg-icon icon-class="dashboard" />
<span>口门门禁管理</span>
</div>
<div class="right-menu-item hover-effect" @click="setShowModel('system')">
<svg-icon icon-class="example" />
<span>系统管理</span>

View File

@ -70,6 +70,7 @@
</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>
</div>

View File

@ -1,7 +1,8 @@
<template>
<keep-alive exclude="CorpUserList">
<component :is="activeName" />
</keep-alive>
<div>
<CardOverdueList v-show="activeName==='CardOverdueList'" />
<CorpUserList v-if="activeName==='corpUserList'" />
</div>
</template>
<script>

View File

@ -96,6 +96,9 @@
<el-form-item label="备注">
<el-input :rows="3" v-model="form.BZ" type="textarea" placeholder="这里输入备注..."/>
</el-form-item>
<el-form-item label="车辆信息">
<span>{{ form.vehicleMessage }}</span>
</el-form-item>
<el-form-item label="是否在线学习人员">
<el-switch v-model="form.ISSTUDENT" active-color="#13ce66" inactive-color="#ff4949"/>
</el-form-item>
@ -746,7 +749,8 @@ export default {
letTypeOfWorkType: 'select',
USER_ID_CARD: '',
PERSONNEL_TYPE: '',
userCerList: []
userCerList: [],
vehicleMessage: '' //
},
uesrInfoDic: {
minzuList: [], // 0a0e406f27f74ee698fe9979d25f62dd
@ -1129,6 +1133,7 @@ export default {
).then((data) => {
this.form = { ...this.form, ...data.pd, ...data.licenseinfor }
// this.form = Object.assign(this.form, data.pd, data.licenseinfor) // copy obj
this.form.vehicleMessage = data.pd.VEHICLE_NOS
this.form.userCerList = data.userCerList
if (this.form.ROLE_ID != null && this.form.ROLE_ID != '') {
//

View File

@ -0,0 +1,320 @@
<template>
<div class="app-container">
<el-form label-width="90px">
<el-row>
<el-col :span="4">
<el-form-item label="分公司名称">
<el-input v-model="searchForm.CORP_NAME" placeholder="分公司名称"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<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="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<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="CORP_NAME" label="分公司名称" />
<el-table-column label="属地" >
<template slot-scope="{row}">
<span v-if="row.prvinceName">{{ row.prvinceName }}</span>
<span v-if="row.cityName"> -- {{ row.cityName }}</span>
<span v-if="row.countryName"> --{{ row.countryName }}</span>
<span v-if="row.villageName"> -- {{ row.villageName }}</span>
</template>
</el-table-column>
<el-table-column prop="INDUSTRYALL" label="所属行业">
<!-- <template slot-scope="{row}">-->
<!-- {{ translate(industryList,row.INDUSTRY) }}-->
<!-- </template>-->
</el-table-column>
<el-table-column prop="count" label="人数"/>
<el-table-column prop="CORP_STATE" label="分公司状态">
<template slot-scope="{row}">
{{ translate(qyztList,row.CORP_STATE) }}
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="110">
<template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="handleEdit(row.CORPINFO_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<!--
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
-->
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<el-dialog :visible.sync="dialogFormEdit" title="查看公司组织架构" width="600px">
<el-tree :data="treeData" :props="defaultProps"/>
</el-dialog>
</div>
</template>
<script>
import SelectTree from '@/components/SelectTree'
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
export default {
components: { Pagination, SelectTree },
directives: { waves },
data() {
return {
listLoading: true,
add: true,
del: true,
edit: true,
listQuery: {
page: 1,
limit: 20
},
searchForm: {
CORP_NAME: '',
PROVINCE: '',
CITY: '',
CORP_STATE: '',
CREATTIME: ''
},
total: 0,
varList: [],
qyztList: [],
options: [{
value: '0',
label: '启用'
}, {
value: '1',
label: '禁用'
}],
STATE: [],
industryList: [],
countryList: [],
villageList: [],
treeData: [],
CITY_CODE: '',
COUNTRY: '',
VILLAGE: '',
config: config,
dialogFormEdit: false,
rules: {
CORP_NAME: [{ required: true, message: '分公司名称不能为空', trigger: 'blur' }],
NEWCORP_NAME: [{ required: true, message: '新分公司名称不能为空', trigger: 'blur' }],
PASSWORD: [{ required: true, message: '分公司密码不能为空', trigger: 'blur' }]
},
updateBranchNameForm: {
CORPINFO_ID: '',
CORP_NAME: '',
NEWCORP_NAME: '',
PASSWORD: ''
},
defaultProps: {
children: 'nodes',
label: 'name'
}
}
},
created() {
this.getList()
this.getDicList('qyztList', '07c2674470c1498ba1ebd74906b3b518')
this.getDicList('industryList', 'f2598ba72e864eadabf0ca4b664d26b9')
},
methods: {
getRowKey(row) {
return row.CORPINFO_ID
},
//
getQuery() {
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'/corpinfo/listRetrieval?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{ ...this.searchForm }
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.CITY_CODE = data.CITY_CODE
this.getCountryList()
}).catch((e) => {
this.listLoading = false
})
},
getCountryList() {
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID: this.CITY_CODE
}
).then((data) => {
this.countryList = data.list
}).catch((e) => {
})
},
getVillageList(value, id) {
this.COUNTRY = value
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID: id
}
).then((data) => {
this.villageList = data.list
}).catch((e) => {
})
},
changeVillage(village) {
this.VILLAGE = village
},
//
handleEdit(ID) {
this.$parent.activeName = 'IndexView'
this.$parent.CORPINFO_ID = ID
},
enableORDisable(ISUSE, CORPINFO_ID) {
this.$confirm(ISUSE === '0' ? '确定要启用该账户吗?' : '确定要禁用该账户吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/corpinfo/editisuse',
{
CORPINFO_ID,
ISUSE
}
).then(() => {
this.$message({
message: ISUSE === '0' ? '启用成功' : '禁用成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {})
},
//
hasButton: function() {
var keys = 'corpinfo:add,corpinfo:del,corpinfo:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.corpinfofhadminadd //
this.del = data.corpinfofhadmindel //
this.edit = data.corpinfofhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.searchForm = {
CORP_NAME: '',
PROVINCE: '',
CITY: '',
CORP_STATE: '',
CREATTIME: ''
}
this.getList()
},
resetPwd(id) {
this.$confirm('确定要重置选中的密码吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/corpinfo/resetPwd',
{
CORPINFO_ID: id
}
).then(() => {
this.$message({
message: '重置成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
//
getDicList(list, DICTIONARIES_ID) {
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID
}
).then((data) => {
this[list] = data.list
}).catch((e) => {
})
},
translate(list, id) {
for (let i = 0; i < list.length; i++) {
if (list[i].BIANMA === id || list[i].DICTIONARIES_ID === id) {
return list[i].NAME
}
}
},
showBranchName(CORPINFO_ID, CORP_NAME) {
this.$refs.form && this.$refs.form.resetFields()
this.dialogFormEdit = true
this.updateBranchNameForm.CORPINFO_ID = CORPINFO_ID
this.updateBranchNameForm.CORP_NAME = CORP_NAME
},
updateBranchName(ID) {
requestFN(
'/department/listTreeCorpInfo',
{
CORPINFO_ID: ID
}
).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
}
}
}
</script>

View File

@ -0,0 +1,981 @@
<template>
<div class="icons-container">
<el-container>
<el-aside width="200px" style="background-color:#fff">
<div class="filter-btn-group">
<el-tree
v-loading="treeLoading"
ref="tree"
:data="treeData"
:props="defaultProps"
:filter-node-method="filterNode"
class="filter-tree"
@node-click="handleNodeClick"/>
</div>
</el-aside>
<el-main>
<el-form label-width="60px">
<el-row>
<el-col :span="2">
<el-form-item label-width="0px">
<el-button v-show="DEPARTMENT_ID != '0'" icon="el-icon-arrow-left" @click="goReturn()"></el-button>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="车牌号">
<el-input v-model="searchForm.LICENCE_NO" placeholder="请输入车牌号..." />
</el-form-item>
</el-col>
<el-col :span="4" class="m-l-10">
<el-form-item label="车辆类型" prop="VEHICLE_TYPE" label-width="100px">
<SelectTree
ref="selectTree_Search1"
:clearable="false"
:options="vehicleTypeList"
:props="vehicleDefaultProps"
v-model="searchForm.VEHICLE_TYPE"
placeholder="请选择车辆类型"/>
</el-form-item>
</el-col>
<el-col :span="4" class="m-l-10">
<el-form-item label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID" label-width="100px">
<SelectTree
ref="selectTree_Search2"
:clearable="false"
:options="treeData"
:props="defaultProps"
v-model="searchForm.VEHICLE_DEPARTMENT_ID"
placeholder="请选择车辆所属部门"/>
</el-form-item>
</el-col>
<el-col :span="4" class="m-l-10">
<el-form-item label="车辆责任人" label-width="100px">
<el-input v-model="searchForm.USER_NAME" placeholder="请输入车辆责任人..." />
</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="vehicleMessageTable"
: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="CORPINFO_NAME" label="分公司名称" align="center" />
<el-table-column prop="LICENCE_NO" label="车牌号" align="center" />
<el-table-column label="车牌类型" align="center">
<template slot-scope="{row}">
{{ translateLicenceType(row.LICENCE_TYPE) }}
</template>
</el-table-column>
<el-table-column label="车辆类型" align="center">
<template slot-scope="{row}">
{{ 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>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="openEditDialogEditBtn(row.VEHICLE_ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteSingleDataDeleteBtn(row.VEHICLE_ID, row.USER_ID, row.EMPLOYEE_VEHICLE_USER_ID)">删除</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>
<!-- 白牌蓝牌黄牌绿牌黑牌 下拉框-->
<el-form-item :rules="[{required: true}]" label="车牌类型" prop="LICENCE_TYPE">
<SelectTree
ref="selectTree_add2"
:clearable="false"
:options="licenceTypeList"
:props="vehicleDefaultProps"
v-model="addForm.LICENCE_TYPE"
placeholder="请选择车牌类型"
style="width: 300px"/>
</el-form-item>
<!-- 货车轿车大巴客车 下拉框-->
<el-form-item :rules="[{required: true}]" label="车辆类型" prop="VEHICLE_TYPE">
<SelectTree
ref="selectTree_add3"
:clearable="false"
:options="vehicleTypeList"
:props="vehicleDefaultProps"
v-model="addForm.VEHICLE_TYPE"
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 :rules="[{required: true}]" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<SelectTree
ref="selectTree_add1"
:clearable="false"
:options="treeData"
:props="defaultProps"
v-model="addForm.VEHICLE_DEPARTMENT_ID"
placeholder="请选择车辆所属部门"
style="width: 300px"
@change="addUserList"/>
</el-form-item>
<!-- 车辆责任人下拉框 -->
<el-form-item :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-select>
</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 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 :value="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 :value="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 :value="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 label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<SelectTree
ref="selectTree_edit"
:clearable="true"
:options="treeData"
:props="defaultProps"
v-model="editForm.VEHICLE_DEPARTMENT_ID"
placeholder="请选择车辆所属部门"
style="width: 300px"
@change="updateUserList"/>
</el-form-item>
<!-- 车辆责任人下拉框 -->
<el-form-item 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>
<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>
</el-main>
</el-container>
<div class="heightt"/>
<!-- <div class="subdy-foot">-->
<!-- <el-row style="text-align: center">-->
<!-- <el-button @click="goReturn"></el-button>-->
<!-- </el-row>-->
<!-- </div>-->
</div>
</template>
<script>
import SelectTree from '@/components/SelectTree'
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
export default {
components: { Pagination, SelectTree },
directives: { waves },
data() {
return {
config: config,
treeLoading: false,
listLoading: true,
add: true,
del: true,
edit: true,
readonly: true,
listQuery: {
page: 1,
limit: 20
},
total: 0,
defaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
treeData: [],
//
loginUserCorpInfoId: '', //
CORPINFO_ID: '', // id
DEPARTMENT_ID: '', // ID
KEYWORDS: '',
loginUserId: '', // ID
//
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: '大巴客车' }
],
//
vehicleBelongTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '员工车辆' },
{ ID: '1', NAME: '单位车辆' }
// { ID: '2', NAME: '' }
],
//
vehicleDefaultProps: {
value: 'ID',
label: 'NAME',
children: 'nodes'
},
departmentTreeData: [],
// inspectionTypeList: [], //
//
varList: [],
//
searchForm: {
DEPARTMENT_ID: '',
VEHICLE_ID: '', // ID()
LICENCE_NO: '', //
VEHICLE_TYPE: '', //
VEHICLE_DEPARTMENT_ID: '' // ID
},
//
addForm: {
LICENCE_NO: '', //
VEHICLE_DEPARTMENT_ID: '', // id
VEHICLE_DEPARTMENT_NAME: '', //
USER_ID: '', //
LICENCE_TYPE: '', //
VEHICLE_TYPE: '', //
VEHICLE_BELONG_TYPE: '', //
EMPLOYEE_VEHICLE_USER_ID: '', // id
EMPLOYEE_VEHICLE_USER_NAME: '', //
DEPARTMENT_NAME: '', //
DEPARTMENT_ID: '',
USER_NAME: '' //
},
//
editForm: {
VEHICLE_ID: '', // id()
LICENCE_NO: '', //
OLD_LICENCE_NO: '', //
USER_ID: '', //
USER_NAME: '', //
LICENCE_TYPE: '', //
VEHICLE_TYPE: '', //
VEHICLE_BELONG_TYPE: '', //
DEPARTMENT_NAME: '', //
EMPLOYEE_VEHICLE_USER_ID: '', //
EMPLOYEE_VEHICLE_USER_NAME: '', //
VEHICLE_DEPARTMENT_ID: '', //
VEHICLE_DEPARTMENT_NAME: '' //
},
//
detailForm: {
LICENCE_NO: '', //
VEHICLE_BELONG_TYPE: '', //
VEHICLE_DEPARTMENT_ID: '', //
USER_ID: '', // id
EMPLOYEE_VEHICLE_USER_ID: '', //
LICENCE_TYPE: null, //
VEHICLE_TYPE: null //
},
addDialogVisible: false, //
editDialogVisible: false, //
detailDialogVisible: false, //
userList: [], //
selectTree_edit: []
}
},
created() {
// this.getDepartmentTreeData() //
// this.getDicList('qyztList', '07c2674470c1498ba1ebd74906b3b518')
// this.getDicList('industryList', 'f2598ba72e864eadabf0ca4b664d26b9')
//
this.getLoginUserInfo() //
this.CORPINFO_ID = this.$parent.CORPINFO_ID
this.updateBranchName(this.CORPINFO_ID)
this.getPageList() //
},
methods: {
//
// hasButton: function() {
// var keys = 'corpinfo:add,corpinfo:del,corpinfo:edit,toExcel'
// requestFN(
// '/head/hasButton',
// {
// keys: keys
// }
// ).then((data) => {
// this.add = data.corpinfofhadminadd //
// this.del = data.corpinfofhadmindel //
// this.edit = data.corpinfofhadminedit //
// }).catch((e) => {
// this.listLoading = false
// })
// },
//
// getDicList(list, DICTIONARIES_ID) {
// requestFN(
// '/dictionaries/getLevels',
// {
// DICTIONARIES_ID
// }
// ).then((data) => {
// this[list] = data.list
// }).catch((e) => {
// })
// },
//
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleNodeClick(node, data, value) {
this.searchForm.VEHICLE_DEPARTMENT_ID = node.id
this.getPageList(node.id)
},
updateBranchName(ID) {
requestFN(
'/department/listTreeCorpInfo',
// '/department/listTree',
{
CORPINFO_ID: ID
}
).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
},
goReturn() {
this.$parent.activeName = 'IndexList'
},
//
getRowKey(row) {
return row.VEHICLE_ID
},
translateLicenceType(id) {
for (var i = 0; i < this.licenceTypeList.length; i++) {
if (this.licenceTypeList[i].ID == id) return this.licenceTypeList[i].NAME
}
},
translateVehicleType(id) {
for (var i = 0; i < this.vehicleTypeList.length; i++) {
if (this.vehicleTypeList[i].ID == id) return this.vehicleTypeList[i].NAME
}
},
translateVehicleBelongType(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',
{}
).then((data) => {
console.info(data.pd)
this.loginUserId = data.pd.USER_ID
// this.loginUserName = data.pd.NAME
this.loginUserCorpInfoId = data.pd.CORPINFO_ID
// this.loginUserDepartmentName = data.pd.DEPARTMENT_NAME
resolve('ok')
}).catch((e) => {
})
})
},
//
getQuery() {
this.$refs.vehicleMessageTable.clearSelection() //
this.getPageList()
},
goKeyReset() {
this.resetSearch()
this.getQuery()
},
//
getPageList(DEPARTMENT_ID) {
this.listLoading = true
if (DEPARTMENT_ID) {
this.VEHICLE_DEPARTMENT_ID = DEPARTMENT_ID
}
requestFN(
'vehiclemessage/getPageList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm,
'CORPINFO_ID': this.CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
// this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
//
openAddDialogAddBtn() {
this.addDialogVisible = true
this.reSetAddDialog()
this.ISCHECK = false
},
//
addDialogCancelBtn() {
this.addDialogVisible = false
},
//
detailDialogReturnBtn() {
this.detailDialogVisible = 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 = ''
},
//
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.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
}
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.CORPINFO_ID
}
).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.detailForm = {
LICENCE_NO: '', //
VEHICLE_DEPARTMENT_ID: '', //
VEHICLE_BELONG_TYPE: '', //
USER_ID: '', //
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.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.translateVehicleBelongType(data.pd.VEHICLE_BELONG_TYPE)
this.detailForm.USER_ID = data.pd.USER_NAME //
} else {
this.$message({
message: '数据回显失败',
type: 'error'
})
}
}).catch((e) => {
})
},
//
editDialogConfirmBtn() {
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
}
).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
}
).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',
{}
).then((data) => {
this.departmentTreeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
},
resetSearch() {
this.searchForm = {
LICENCE_NO: '' //
}
this.$refs.selectTree_Search1.clearHandle() //
this.$refs.selectTree_Search2.clearHandle()
},
addUserList(DEPARTMENT_ID) {
// this.getUserList(DEPARTMENT_ID)
this.customGetUserList(DEPARTMENT_ID)
this.handleDepartmentAddChange(DEPARTMENT_ID)
},
updateUserList(DEPARTMENT_ID) {
this.getUserList(DEPARTMENT_ID)
this.handleDepartmentUpdateChange(DEPARTMENT_ID)
},
getUserList(DEPARTMENT_ID) { //
this.userList = []
console.info(DEPARTMENT_ID)
requestFN(
'/user/listAll',
{
DEPARTMENT_ID: DEPARTMENT_ID,
tm: new Date().getTime()
}
).then((data) => {
console.info(data)
this.userList = data.userList
}).catch((e) => {
// this.listLoading = false
})
},
customGetUserList(DEPARTMENT_ID) { //
this.userList = []
requestFN(
'vehiclemessage/selectTreeByDepartmentId',
{
DEPARTMENT_ID: DEPARTMENT_ID,
tm: new Date().getTime()
}
).then((data) => {
this.userList = data.list
}).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.treeData, value)
},
handleDepartmentUpdateChange(value) {
this.editForm.VEHICLE_DEPARTMENT_NAME = this.findLabelByValue(this.treeData, 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 = ''
}
},
goCheckLicenceNoAdd() {
if (this.addForm.LICENCE_NO) {
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
const result = regex.test(this.addForm.LICENCE_NO)
if (result) {
console.log('格式校验通过')
requestFN(
'vehiclemessage/goCheckLicenceNo',
{
'LICENCE_NO': this.addForm.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
}
}
},
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
}
}
}
</script>
<style>
.m-l-10 {
margin-left: 10px;
}
.q-f-w-v-200{
width: 200px;
}
</style>

View File

@ -0,0 +1,205 @@
<template>
<div class="app-container">
<el-form label-width="100px">
<el-row>
<el-col :span="2">
<el-form-item label-width="0px">
<el-button icon="el-icon-arrow-left" @click="goReturn()"></el-button>
</el-form-item>
</el-col>
<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
import safetyFlowChart from '../../../hiddenUtil/safetyFlowChart'
export default {
components: { Pagination, safetyFlowChart },
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(
'/vehiclemessage/getInOutPageList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm
}
).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
}
},
goReturn() {
this.$parent.activeName = 'IndexView'
},
getDict() {
requestFN(
'dictionaries/getLevels',
{
DICTIONARIES_ID: '1c73fa2717f2835165104aee234caefe'
}
).then((data) => {
this.RegionList = data.list
})
.catch((e) => {
this.listLoading = false
})
},
}
}
</script>

View File

@ -0,0 +1,42 @@
<template>
<div>
<IndexList v-show="activeName=='IndexList'" ref="list" />
<IndexView v-if="activeName=='IndexView'" />
<!-- <List v-show="activeName==='List'" />-->
<Record v-if="activeName==='Record'" />
</div>
</template>
<script>
import IndexList from './components/indexList'
import IndexView from './components/index_view'
// import List from './components/list'
import Record from './components/record'
export default {
components: {
IndexList,
IndexView,
// List,
Record
},
data() {
return {
activeName: 'IndexList',
INSPECTION_ID: '',
LICENCE_NO: '',
indexVal: ''
}
},
watch: {
activeName(newValue, oldValue) {
if (newValue == 'IndexList') {
this.$refs.list.getQuery()
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -55,7 +55,7 @@
</div>
</div>
</div>
<div v-if="!(corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId === '033549ed3bd648e49c8a65eb4993ec2f')" class="block4">
<div v-if="corpInfoId === '035958e685cf4850bc40151c5e0617a6'" class="block4">
<layout-title title="报警列表"/>
<div class="content">
<div class="table">
@ -72,7 +72,7 @@
</div>
</div>
</div>
<div v-if="corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId === '033549ed3bd648e49c8a65eb4993ec2f'" class="block4">
<div v-if="corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" class="block4">
<layout-title title="报警列表"/>
<div class="content">
<div class="table">
@ -195,8 +195,8 @@ export default {
'/map/getAllDwMessage', { corpId: this.corpInfoId }
).then((data) => {
//
console.log(this.corpInfoId)
if (this.corpInfoId === '035958e685cf4850bc40151c5e0617a6') {
this.block4List = data.alarmList.list
this.block1OptionsList = [
{
title: '在线设备数',
@ -216,16 +216,17 @@ export default {
{
title: '在线摄像头数',
img: require('../../../assets/map/renyuan/ico4.png'),
count: data.orthermessage.infoList.HKcamera.num
count: data.orthermessage.infoList.HKcamera ? data.orthermessage.infoList.HKcamera.num : 0
},
{
title: '在线报警设备数',
img: require('../../../assets/map/renyuan/ico5.png'),
count: data.orthermessage.infoList.tklyr.num
count: data.orthermessage.infoList.tklyr ? data.orthermessage.infoList.tklyr.num : 0
}
]
this.block4List = data.alarmList.list
}
if (this.corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || this.corpInfoId === '033549ed3bd648e49c8a65eb4993ec2f' ) {
if (this.corpInfoId !== '035958e685cf4850bc40151c5e0617a6') {
this.block1OptionsList = [
{
title: '总设备数',
@ -246,6 +247,7 @@ export default {
this.block4List = data.orthermessage.alarmList
}
}).catch((e) => {
console.log(e)
this.$message.error(e)
})
}

View File

@ -62,8 +62,8 @@
<carPositionCfdD v-if="type === 'carPosition'" :id="id" :type="type" :infoname="infoname"/>
<!--曹妃甸东 八项作业 曹实业详细页面 end-->
<peoplePositionNine v-if="type === 'peoplePositionNine'" :id="id" :type="type" :infoname="infoname"/>
<peoplePositionOne v-if="type === 'peoplePositionOne' && !(corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId ==='033549ed3bd648e49c8a65eb4993ec2f')" :id="id" :type="type" />
<peoplePositionYGS v-if="type === 'peoplePositionOne' && (corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId ==='033549ed3bd648e49c8a65eb4993ec2f')" :id="id" :type="type" :corp-id="corpInfoId" />
<peoplePositionOne v-if="type === 'peoplePositionOne' && !(corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId ==='033549ed3bd648e49c8a65eb4993ec2f' || !corpInfoId)" :id="id" :type="type" />
<peoplePositionYGS v-if="type === 'peoplePositionOne' && (corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId ==='033549ed3bd648e49c8a65eb4993ec2f' || !corpInfoId)" :id="id" :type="type" :corp-id="corpInfoId" />
<!-- 重点工程 start -->
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />

View File

@ -49,7 +49,7 @@
</tr>
</table>
<!-- 九公司人员定位页面 -->
<table v-if="corpId === '21590a00ea5e462e9ee44dd332dddc26' || corpId === '033549ed3bd648e49c8a65eb4993ec2f'" class="table-ui">
<table v-if="corpId !== '035958e685cf4850bc40151c5e0617a6'" class="table-ui">
<tr>
<td class="bbg-transparent">姓名</td>
<td >{{ (info && info.name) ? info.name : '未绑定人员' }}</td>

View File

@ -2198,7 +2198,7 @@ export default {
}
}
}
if (this.gangkouActive === '00003' && (this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' || this.CORP_INFO_ID === '033549ed3bd648e49c8a65eb4993ec2f') && urlType === 'peoplePosition') {
if (this.gangkouActive === '00003' && (this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' || this.CORP_INFO_ID === '033549ed3bd648e49c8a65eb4993ec2f' || this.CORP_INFO_ID === '') && urlType === 'peoplePosition') {
this.clearRYDWPoint('+/UwbBQ/')
this.removeTrajectory()
}
@ -2247,7 +2247,7 @@ export default {
}
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
!this.connecting ? this.createConnection(this.CORP_INFO_ID) : this.doSubscribe()
} else if (this.gangkouActive === '00003' && (this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' || this.CORP_INFO_ID === '033549ed3bd648e49c8a65eb4993ec2f') && urlType === 'peoplePosition') {
} else if (this.gangkouActive === '00003' && (this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' || this.CORP_INFO_ID === '033549ed3bd648e49c8a65eb4993ec2f' || this.CORP_INFO_ID === '') && urlType === 'peoplePosition') {
// websocket
this.initRYDWWebsocket(this.CORP_INFO_ID)
} else {

View File

@ -0,0 +1,451 @@
<template>
<div class="app-container">
<!-- 查询列表-->
<el-form label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="车牌号">
<el-input v-model="searchFrom.LICENCE_NO" placeholder="请输入车牌号..." />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="车辆责任人">
<el-input v-model="searchFrom.USER_NAME" placeholder="请输入车辆责任人..." />
</el-form-item>
</el-col>
<!-- <el-col :span="4">-->
<!-- <el-form-item label="违规类型" prop="VIOLATION_TYPE">-->
<!-- <SelectTree-->
<!-- ref="selectTree_Search2"-->
<!-- :clearable="false"-->
<!-- :options="violationTypeList"-->
<!-- :props="oneselfDefaultProps"-->
<!-- v-model="searchFrom.VIOLATION_TYPE"-->
<!-- placeholder="请选择违规类型"/>-->
<!-- </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="vehicleMessageTable"
: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="CORPINFO_NAME" label="分公司名称" align="center" />
<el-table-column prop="LICENCE_NO" label="车牌号" align="center" />
<el-table-column label="车牌类型" align="center">
<template slot-scope="{row}">
{{ translateLicenceType(row.LICENCE_TYPE) }}
</template>
</el-table-column>
<el-table-column label="车辆类型" align="center">
<template slot-scope="{row}">
{{ translateVehicleType(row.VEHICLE_TYPE) }}
</template>
</el-table-column>
<el-table-column prop="VEHICLE_DEPARTMENT_NAME" label="车辆所属部门" align="center"/>
<el-table-column prop="USER_NAME" label="车辆责任人" align="center"/>
<el-table-column prop="ISEXIST" label="是否存在" align="center" />
<el-table-column label="操作" align="center" width="480">
<template slot-scope="{row}">
<el-button icon="el-icon-view" size="mini" @click="showDetail(row.BLACK_LIST_ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteSingleDataDeleteBtn(row.BLACK_LIST_ID, row.VEHICLE_ID)">移除黑名单</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="车牌号" label-width="110px">
<el-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNo()"/>
</el-form-item>
<!-- 白牌蓝牌黄牌绿牌黑牌 下拉框-->
<el-form-item label="车牌类型" label-width="110px" prop="LICENCE_TYPE">
<SelectTree
ref="selectTree_add2"
:clearable="false"
:options="licenceTypeList"
:props="oneselfDefaultProps"
v-model="addForm.LICENCE_TYPE"
placeholder="请选择车牌类型"
style="width: 300px"/>
</el-form-item>
<!-- 货车轿车大巴客车 下拉框-->
<el-form-item label="车辆类型" label-width="110px" prop="VEHICLE_TYPE">
<SelectTree
ref="selectTree_add3"
:clearable="false"
:options="vehicleTypeList"
:props="oneselfDefaultProps"
v-model="addForm.VEHICLE_TYPE"
placeholder="请选择车辆类型"
style="width: 300px"/>
</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="detailDialogVisible" title="查看详情" width="600px">
<el-form label-width="170px" style="padding:0 20px; width: 500px;">
<!-- 违规类型0-未按规定车道行驶1-违规停车-->
<el-form-item label="车牌号" label-width="130px">
<el-input v-model="detailForm.LICENCE_NO" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="车牌类型" label-width="130px">
<el-input v-model="detailForm.LICENCE_TYPE" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="车辆类型" label-width="130px" prop="DESCRIBE_MESSAGE" >
<el-input :rows="3" v-model="detailForm.VEHICLE_TYPE" :disabled="true" type="textarea"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="detailDialogCloseBtn"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import WriteSign from '@/components/WriteSign'
import SelectTree from '@/components/SelectTree'
import safetyFlowChart from '../../../hiddenUtil/safetyFlowChart'
export default {
components: { Pagination, WriteSign, safetyFlowChart, SelectTree },
directives: { waves },
data() {
return {
ISCHECK: false, //
listLoading: true,
add: false,
del: false,
edit: false,
detailDialogVisible: false,
loginUserId: '', // id
loginUserName: '', //
loginUserCorpInfoId: '', // id
//
listQuery: {
page: 1,
limit: 20
},
total: 0,
varList: [], //
//
departmentTreeData: [],
defaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
//
searchFrom: {
LICENCE_NO: '', //
USER_NAME: '', //
VIOLATION_TYPE: '' //
},
//
addForm: {
LICENCE_NO: '', //
VIOLATION_TYPE: '', //
VIOLATIONTIME: '', //
LICENCE_TYPE: '', //
VEHICLE_TYPE: '', //
DESCRIBE_MESSAGE: '' //
},
//
detailForm: {
LICENCE_NO: '', //
LICENCE_TYPE: '', //
VEHICLE_TYPE: '' //
},
//
violationTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '未按规定车道行驶' },
{ ID: '1', NAME: '违规停车' }
],
//
vehicleTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '货车' },
{ ID: '1', NAME: '轿车' },
{ ID: '2', NAME: '大巴客车' }
],
//
licenceTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '白牌' },
{ ID: '1', NAME: '蓝牌' },
{ ID: '2', NAME: '黄牌' },
{ ID: '3', NAME: '绿牌' },
{ ID: '4', NAME: '黑牌' }
],
//
oneselfDefaultProps: {
value: 'ID',
label: 'NAME',
children: 'nodes'
},
addDialogVisible: false,
dialogImageVisible: false, //
violation_files: [],
dialogImageUrl: '' //
}
},
created() {
this.getLoginUserInfo() //
// this.getDict() //
this.getDepartmentTreeData() //
this.getPageList() //
},
methods: {
// ID
getRowKey(row) {
return row.BLACK_LIST_ID
},
//
// getDict: function() {
// requestFN(
// '/dictionaries/listSelectTree',
// {
// DICTIONARIES_ID: '60e6481d96e44a5390ff5c347c4d1ffe' //
// }
// ).then((data) => {
// this.inspectionTypeList = JSON.parse(data.zTreeNodes)
// }).catch((e) => {
//
// })
// },
//
getDepartmentTreeData() {
requestFN(
'/department/listTree',
{}
).then((data) => {
this.departmentTreeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
},
getLoginUserInfo() { //
return new Promise((resolve) => {
requestFN(
'/user/goEditMyInfo',
{}
).then((data) => {
this.loginUserId = data.pd.USER_ID
this.loginUserName = data.pd.NAME
this.loginUserCorpInfoId = data.pd.CORPINFO_ID
resolve('ok')
}).catch((e) => {
})
})
},
//
getQuery() {
// vehicleMessageTable ref
this.$refs.vehicleMessageTable.clearSelection() //
this.getPageList()
},
//
goKeyReset() {
this.resetSearch() //
this.getQuery() //
},
//
resetSearch() {
this.searchFrom.LICENCE_NO = '' //
this.searchFrom.USER_NAME = '' //
// this.$refs.selectTree_Search2.clearHandle()
},
//
getPageList() {
this.listLoading = true
requestFN(
'blackListManage/getPageList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchFrom
// 'CORPINFO_ID': this.loginUserCorpInfoId
}
).then((data) => {
this.listLoading = false
console.info('输出获取到的数据')
console.log(data)
this.varList = data.varList
this.total = data.page.totalResult
// this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
//
openAddDialogAddBtn() {
this.addDialogVisible = true
this.reSetAddDialog()
},
//
addDialogCancelBtn() {
this.addDialogVisible = false
},
reSetAddDialog() {
this.addForm.LICENCE_NO = ''
this.addForm.VIOLATION_TYPE = ''
this.addForm.VIOLATIONTIME = ''
this.addForm.DESCRIBE_MESSAGE = ''
this.addForm.LICENCE_TYPE = '' //
this.addForm.VEHICLE_TYPE = '' //
},
//
addDialogConfirmBtn() {
if (this.addForm.LICENCE_NO !== null && this.addForm.LICENCE_NO === '') {
this.$message({
message: '车牌号不能为空',
type: 'error'
})
return false
}
this.sendRequest()
},
sendRequest() {
this.$refs.addForm.validate(valid => {
requestFN(
'blackListManage/addBlackList',
{
...this.addForm
// 'CORPINFO_ID': this.loginUserCorpInfoId
}
).then((data) => {
if (data.result === 'fail') {
this.$message({
message: data.msg,
type: 'error'
})
} else {
this.addDialogVisible = false
this.getPageList() //
}
this.listLoading = false
}).catch((e) => {
})
})
},
translateVehicleType(id) {
for (var i = 0; i < this.vehicleTypeList.length; i++) {
if (this.vehicleTypeList[i].ID == id) return this.vehicleTypeList[i].NAME
}
},
translateLicenceType(id) {
for (var i = 0; i < this.licenceTypeList.length; i++) {
if (this.licenceTypeList[i].ID == id) return this.licenceTypeList[i].NAME
}
},
//
translateViolationType(id) {
for (var i = 0; i < this.violationTypeList.length; i++) {
if (this.violationTypeList[i].ID == id) return this.violationTypeList[i].NAME
}
},
reSetDetail() {
this.detailForm.LICENCE_NO = ''
this.detailForm.LICENCE_TYPE = ''
this.detailForm.VEHICLE_TYPE = ''
},
showDetail(BLACK_LIST_ID) {
this.detailDialogVisible = true
this.reSetDetail()
requestFN(
'blackListManage/detailBlackList',
{
'BLACK_LIST_ID': BLACK_LIST_ID
}
).then((data) => {
this.detailForm.LICENCE_NO = data.pd.LICENCE_NO
this.detailForm.LICENCE_TYPE = this.translateLicenceType(data.pd.LICENCE_TYPE)
this.detailForm.VEHICLE_TYPE = this.translateVehicleType(data.pd.VEHICLE_TYPE)
})
},
detailDialogCloseBtn() {
this.detailDialogVisible = false
},
deleteSingleDataDeleteBtn(BLACK_LIST_ID, VEHICLE_ID) {
requestFN(
'blackListManage/delBlackList',
{
'BLACK_LIST_ID': BLACK_LIST_ID,
'VEHICLE_ID': VEHICLE_ID
}
).then((data) => {
if (data.result === 'success') {
this.$message({
message: '删除成功',
type: 'success'
})
this.getPageList()
} else {
this.$message({
message: data.msg,
type: 'error'
})
}
})
},
//
goCheckLicenceNo() {
if (this.addForm.LICENCE_NO === '') {
this.$message.success('请输入车牌号')
this.ISCHECK = false
} else {
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
const result = regex.test(this.addForm.LICENCE_NO)
if (result) {
this.$message.success('验证通过')
this.ISCHECK = true
} else {
this.$message.success('车牌号不规范')
this.ISCHECK = false
}
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,31 @@
<template>
<div>
<List v-show="activeName==='List'" ref="list" />
</div>
</template>
<script>
import List from './components/list'
export default {
components: {
List
},
data() {
return {
activeName: 'List',
VEHICLE_ID: '' // id
}
},
watch: {
activeName(newValue, oldValue) {
if (newValue == 'List') {
this.$refs.list.getQuery()
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,203 @@
<template>
<div class="app-container">
<div class="page-btn-group">
<div>
<el-button plain type="info" icon="el-icon-arrow-left" class="return-btn" @click="detailListReturnBtn"></el-button>
</div>
</div>
<!-- 违规详情列表 -->
<el-table
v-loading="listLoading"
ref="vehicleViolationTable"
: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 label="违规类型" align="center" width="120">
<template slot-scope="{row}">
{{ translateLicenceType(row.VIOLATION_TYPE) }}
</template>
</el-table-column>
<el-table-column prop="LOCATION" label="违规区域" align="center" />
<el-table-column prop="VIOLATIONTIME" label="违规时间" width="150" align="center" />
<el-table-column prop="DESCRIBE_MESSAGE" label="违规说明" align="center" />
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-button icon="el-icon-view" size="mini" @click="showDetail(row.VIOLATION_ID)"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteSingleDataDeleteBtn(row.VIOLATION_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<!-- 查看详情 -->
<el-dialog :visible.sync="detailDialogVisible" title="查看详情" width="600px">
<el-form label-width="170px" style="padding:0 20px; width: 500px;">
<!-- 违规类型0-未按规定车道行驶1-违规停车-->
<el-form-item label="违规类型" label-width="110px">
<el-input v-model="detailForm.VIOLATION_TYPE" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="违规时间" label-width="110px">
<el-input v-model="detailForm.VIOLATIONTIME" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
</el-form-item>
<el-form-item label="违规区域" label-width="110px" prop="LOCATION">
<el-input :rows="3" v-model="detailForm.LOCATION" :disabled="true" type="textarea"/>
</el-form-item>
<el-form-item label="违规照片" label-width="110px" prop="LOCATION">
<viewer :images="detailForm.FILEPATHS">
<img v-for="(item,index) in detailForm.FILEPATHS" :src="config.fileUrl + item" :key="index" width="100" style="margin-left: 3px" height="100">
</viewer>
</el-form-item>
<el-form-item label="违规说明" label-width="110px" prop="DESCRIBE_MESSAGE" >
<el-input :rows="3" v-model="detailForm.DESCRIBE_MESSAGE" :disabled="true" type="textarea"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="detailDialogCloseBtn"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import WriteSign from '@/components/WriteSign'
import SelectTree from '@/components/SelectTree'
import safetyFlowChart from '../../../hiddenUtil/safetyFlowChart'
export default {
components: { Pagination, WriteSign, safetyFlowChart, SelectTree },
directives: { waves },
data() {
return {
config: config,
imageError: false,
listLoading: true,
add: false,
del: false,
edit: false,
varList: [], //
detailDialogVisible: false, //
//
violationTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '未按规定车道行驶' },
{ ID: '1', NAME: '违规停车' }
],
//
detailForm: {
VIOLATION_TYPE: '', //
LOCATION: '', //
DESCRIBE_MESSAGE: '', //
VIOLATIONTIME: '', //
FILEPATH: '', //
FILEPATHS: [] //
}
}
},
created() {
this.getList() //
},
methods: {
// ID
getRowKey(row) {
return row.VIOLATION_ID
},
//
getList() {
this.listLoading = true
requestFN(
'/breakRulesRecord/getDetailList',
{
'VEHICLE_ID': this.$parent.VEHICLE_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
// this.total = data.page.totalResult
// this.hasButton()
// this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
//
openAddDialogDetailBtn() {
this.reSetDetailDialog()
this.detailDialogVisible = true
},
//
detailDialogCloseBtn() {
this.detailDialogVisible = false
},
detailListReturnBtn() {
this.$parent.activeName = 'List'
},
reSetDetailDialog() {
this.detailForm.VIOLATION_TYPE = ''
this.detailForm.LOCATION = ''
this.detailForm.FILEPATH = ''
this.detailForm.VIOLATIONTIME = ''
this.detailForm.DESCRIBE_MESSAGE = ''
this.detailForm.FILEPATHS = []
},
translateLicenceType(id) {
for (var i = 0; i < this.violationTypeList.length; i++) {
if (this.violationTypeList[i].ID == id) return this.violationTypeList[i].NAME
}
},
showDetail(VIOLATION_ID) {
this.detailDialogVisible = true
requestFN(
'/breakRulesRecord/getDetail',
{
'VIOLATION_ID': VIOLATION_ID
}
).then((data) => {
this.detailForm.VIOLATION_TYPE = this.translateLicenceType(data.pd.VIOLATION_TYPE)
this.detailForm.FILEPATH = this.config.fileUrl + data.pd.FILEPATH
this.detailForm.DESCRIBE_MESSAGE = data.pd.DESCRIBE_MESSAGE
this.detailForm.LOCATION = data.pd.LOCATION
this.detailForm.VIOLATIONTIME = data.pd.VIOLATIONTIME
this.detailForm.FILEPATHS = data.FILEPATHS
})
},
//
deleteSingleDataDeleteBtn(VIOLATION_ID) {
requestFN(
'/breakRulesRecord/deleteRecord',
{
'VIOLATION_ID': VIOLATION_ID
}
).then((data) => {
if (data.result == 'error') {
this.$message({
message: '违规记录清除失败',
type: 'error'
})
return false
} else {
this.$refs.vehicleViolationTable.clearSelection() //
this.getList() //
}
})
}
}
}
</script>
<style scoped>
.return-btn{
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,567 @@
<template>
<div class="app-container">
<!-- 查询列表-->
<el-form label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="车牌号">
<el-input v-model="searchFrom.LICENCE_NO" placeholder="请输入车牌号..." />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="车辆类型" prop="VEHICLE_TYPE">
<SelectTree
ref="selectTree_Search1"
:clearable="false"
:options="vehicleTypeList"
:props="oneselfDefaultProps"
v-model="searchFrom.VEHICLE_TYPE"
placeholder="请选择车辆类型"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="违规类型" prop="VIOLATION_TYPE">
<SelectTree
ref="selectTree_Search2"
:clearable="false"
:options="violationTypeList"
:props="oneselfDefaultProps"
v-model="searchFrom.VIOLATION_TYPE"
placeholder="请选择违规类型"/>
</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="vehicleMessageTable"
: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="CORPINFO_NAME" label="分公司名称" align="center" />
<el-table-column prop="LICENCE_NO" label="车牌号" align="center" />
<el-table-column label="车牌类型" align="center" width="120">
<template slot-scope="{row}">
{{ translateLicenceType(row.LICENCE_TYPE) }}
</template>
</el-table-column>
<el-table-column label="车辆类型" align="center" width="120">
<template slot-scope="{row}">
{{ translateVehicleType(row.VEHICLE_TYPE) }}
</template>
</el-table-column>
<el-table-column prop="VEHICLE_DEPARTMENT_NAME" label="车辆所属部门" align="center" />
<el-table-column prop="USER_NAME" label="车辆责任人" align="center" width="120" />
<el-table-column prop="VIOLATION_COUNT" label="违规次数" align="center" />
<el-table-column prop="ISEXIST" label="是否存在" align="center" />
<el-table-column label="操作" align="center" width="480">
<template slot-scope="{row}">
<el-button icon="el-icon-view" size="mini" @click="showDetail(row.VEHICLE_ID)"></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" :rules="addFormRules" :model="addForm" label-width="170px" style="padding:0 20px; width: 500px;">
<el-form-item :rules="[{required: true}]" label="车牌号" label-width="110px">
<el-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNo()"/>
</el-form-item>
<!-- 白牌蓝牌黄牌绿牌黑牌 下拉框-->
<el-form-item :rules="[{required: true}]" label="车牌类型" label-width="110px" prop="LICENCE_TYPE">
<SelectTree
ref="selectTree_add2"
:clearable="false"
:options="licenceTypeList"
:props="oneselfDefaultProps"
v-model="addForm.LICENCE_TYPE"
placeholder="请选择车牌类型"
style="width: 300px"/>
</el-form-item>
<!-- 货车轿车大巴客车 下拉框-->
<el-form-item :rules="[{required: true}]" label="车辆类型" label-width="110px" prop="VEHICLE_TYPE">
<SelectTree
ref="selectTree_add3"
:clearable="false"
:options="vehicleTypeList"
:props="oneselfDefaultProps"
v-model="addForm.VEHICLE_TYPE"
placeholder="请选择车辆类型"
style="width: 300px"/>
</el-form-item>
<el-form-item :rules="[{required: true}]" label="违规时间" label-width="110px">
<el-date-picker id="VIOLATIONTIME" ref="VIOLATIONTIME" v-model="addForm.VIOLATIONTIME" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" style="width: 100%" type="datetime" placeholder="请选择" />
</el-form-item>
<!-- 违规类型0-未按规定车道行驶1-违规停车 下拉框-->
<el-form-item :rules="[{required: true}]" label="违规类型" label-width="110px" prop="VIOLATION_TYPE">
<SelectTree
ref="selectTree_add3"
:clearable="false"
:options="violationTypeList"
:props="oneselfDefaultProps"
v-model="addForm.VIOLATION_TYPE"
placeholder="请选择违规类型"
style="width: 300px"/>
</el-form-item>
<el-form-item :rules="[{required: true}]" label="违规区域" label-width="110px" prop="LOCATION">
<el-input :rows="3" v-model="addForm.LOCATION" type="textarea" placeholder="违规区域需明确车辆在港口内的具体违规位置如某一口门附近、某一码头区域、某一仓库通道等..."/>
</el-form-item>
<el-form-item :rules="[{required: true}]" label="违规图片" label-width="110px" prop="FFILE">
<el-upload
ref="violationImageUpload"
:class="{hide:violationUpload}"
:on-preview="handlePictureCardPreview"
:before-upload="beforeFileUpload"
:on-remove="handleRemove"
:on-change="handleChangeIMG"
:limit="4"
:auto-upload="false"
action="#"
accept=".jpg,.jpeg,.png"
class="avatar-uploader"
list-type="picture-card">
<i class="el-icon-plus" />
</el-upload>
<span class="red-tip">* 最多只能上传四张图片</span>
<el-dialog :visible.sync="dialogImageVisible">
<img :src="dialogImageUrl" width="100%" alt="">
</el-dialog>
</el-form-item>
<el-form-item label="违规说明" label-width="110px" prop="DESCRIBE_MESSAGE" >
<el-input :rows="3" v-model="addForm.DESCRIBE_MESSAGE" type="textarea" placeholder="请在此处输入违规说明..."/>
</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>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import WriteSign from '@/components/WriteSign'
import SelectTree from '@/components/SelectTree'
import safetyFlowChart from '../../../hiddenUtil/safetyFlowChart'
import { upload } from '@/utils/upload'
export default {
components: { Pagination, WriteSign, safetyFlowChart, SelectTree },
directives: { waves },
data() {
return {
ISCHECK: false,
listLoading: true,
add: false,
del: false,
edit: false,
//
listQuery: {
page: 1,
limit: 20
},
total: 0,
varList: [], //
loginUserId: '', // id
loginUserName: '', //
loginUserCorpInfoId: '', // id
//
departmentTreeData: [],
defaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
//
searchFrom: {
VEHICLE_ID: '', // ID()
LICENCE_NO: '', //
VEHICLE_TYPE: '', //
VIOLATION_TYPE: '' //
},
//
addForm: {
LICENCE_NO: '', //
LICENCE_TYPE: '', //
VEHICLE_TYPE: '', //
VIOLATION_TYPE: '', //
LOCATION: '', //
FFILE: [], //
VIOLATIONTIME: '', //
DESCRIBE_MESSAGE: '' //
},
detailForm: {
LICENCE_NO: '', //
LICENCE_TYPE: '', //
VEHICLE_TYPE: '', //
VIOLATION_TYPE: '', //
LOCATION: '', //
FFILE: [], //
VIOLATIONTIME: '', //
DESCRIBE_MESSAGE: '' //
},
//
addFormRules: {
LICENCE_NO: [{ required: true, message: '车牌号不能为空', trigger: 'blur' }],
VIOLATION_TYPE: [{ required: true, message: '请选择违规类型', trigger: 'blur' }],
FFILE: [{ required: true, message: '违规图片不能为空', trigger: 'blur' }],
LICENCE_TYPE: [{ required: true, message: '请选择车牌类型', trigger: 'blur' }],
VEHICLE_TYPE: [{ required: true, message: '请选择车辆类型', trigger: 'blur' }]
},
//
violationTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '未按规定车道行驶' },
{ ID: '1', NAME: '违规停车' }
],
//
vehicleTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '货车' },
{ ID: '1', NAME: '轿车' },
{ ID: '2', NAME: '大巴客车' }
],
//
licenceTypeList: [
// { ID: '', NAME: '' },
{ ID: '0', NAME: '白牌' },
{ ID: '1', NAME: '蓝牌' },
{ ID: '2', NAME: '黄牌' },
{ ID: '3', NAME: '绿牌' },
{ ID: '4', NAME: '黑牌' }
],
//
oneselfDefaultProps: {
value: 'ID',
label: 'NAME',
children: 'nodes'
},
addDialogVisible: false,
violationUpload: false, //
dialogImageVisible: false, //
violation_files: [], //
dialogImageUrl: '' //
}
},
created() {
this.getLoginUserInfo() //
this.getDepartmentTreeData() //
// this.getDict() //
this.getPageList() //
},
methods: {
// ID
getRowKey(row) {
return row.VEHICLE_ID
},
//
// getDict: function() {
// requestFN(
// '/dictionaries/listSelectTree',
// {
// DICTIONARIES_ID: '60e6481d96e44a5390ff5c347c4d1ffe' //
// }
// ).then((data) => {
// this.inspectionTypeList = JSON.parse(data.zTreeNodes)
// }).catch((e) => {
//
// })
// },
//
getDepartmentTreeData() {
requestFN(
'/department/listTree',
{}
).then((data) => {
this.departmentTreeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
},
getLoginUserInfo() { //
return new Promise((resolve) => {
requestFN(
'/user/goEditMyInfo',
{}
).then((data) => {
this.loginUserId = data.pd.USER_ID
this.loginUserName = data.pd.NAME
this.loginUserCorpInfoId = data.pd.CORPINFO_ID
resolve('ok')
}).catch((e) => {
})
})
},
//
getQuery() {
this.$refs.vehicleMessageTable.clearSelection() //
this.getPageList()
},
//
goKeyReset() {
this.resetSearch() //
this.getQuery() //
},
//
resetSearch() {
this.searchFrom.LICENCE_NO = '' //
this.$refs.selectTree_Search1.clearHandle() //
this.$refs.selectTree_Search2.clearHandle()
},
//
getPageList() {
this.listLoading = true
requestFN(
'breakRulesRecord/getPageList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchFrom
// CORPINFO_ID: this.loginUserCorpInfoId !== '' ? this.loginUserCorpInfoId : this.$parent.CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
// this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
//
openAddDialogAddBtn() {
this.addDialogVisible = true
this.reSetAddDialog()
},
//
addDialogCancelBtn() {
this.addDialogVisible = false
},
reSetAddDialog() {
this.addForm.LICENCE_NO = ''
this.addForm.VIOLATION_TYPE = ''
this.addForm.LOCATION = ''
this.addForm.FFILE = ''
this.addForm.VIOLATIONTIME = ''
this.addForm.DESCRIBE_MESSAGE = ''
this.addForm.LICENCE_TYPE = '' //
this.addForm.VEHICLE_TYPE = '' //
this.violation_files = [] //
},
//
handleRemove(file, fileList) {
this.violationUpload = fileList.length >= 4
},
handleChangeIMG(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.violationUpload = fileList.length >= 4
},
//
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogImageVisible = true
},
beforeFileUpload(file) {
const types = ['image/jpeg', 'image/jpg', 'image/png']
const isImage = types.includes(file.type)
if (!isImage) {
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
return false
} else {
this.violation_files.push(file) //
// this.addForm.FFILE = file //
}
},
//
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.VIOLATIONTIME !== null && this.addForm.VIOLATIONTIME === '') {
this.$message({
message: '请选择违规时间',
type: 'error'
})
return false
}
if (this.addForm.VIOLATION_TYPE !== null && this.addForm.VIOLATION_TYPE === '') {
this.$message({
message: '请选择违规类型',
type: 'error'
})
return false
}
if (this.addForm.LOCATION !== null && this.addForm.LOCATION === '') {
this.$message({
message: '请填写违规区域',
type: 'error'
})
return false
}
if (this.$refs.violationImageUpload.uploadFiles.length < 1) {
this.$message({
message: '请上传违规图片',
type: 'error'
})
this.loading = false
return false
}
this.$refs.addForm.validate(valid => {
this.addRequest(valid) //
})
},
addRequest(valid) {
requestFN(
'breakRulesRecord/addRecord',
{
...this.addForm
// CORPINFO_ID: this.loginUserCorpInfoId
}
).then((data) => {
if (data.result === 'fail') {
this.$message({
message: data.msg,
type: 'error'
})
} else {
this.saveViolationRecordImg(data.VIOLATION_ID) //
this.$message.success('违规记录添加成功')
this.getPageList() //
this.addDialogVisible = false
}
}).catch((e) => {
})
},
//
saveViolationRecordImg(VIOLATION_ID) {
var _this = this
const loading = this.$loading({
lock: true,
text: '加载中......',
background: 'rgba(0,0,0,0.5)'
})
this.$refs.violationImageUpload.submit()
const todata = new FormData()
// violation_files
for (var i = 0; i < _this.violation_files.length; i++) {
if (_this.violation_files[i]) {
todata.append('FFILE', _this.violation_files[i])
}
}
if (!todata.get('FFILE')) {
return
}
todata.append('FOREIGN_KEY', VIOLATION_ID)
todata.append('TYPE', 301) //
upload(
'/imgfiles/add',
todata
).then((data) => {
loading.close()
if (data.result == 'success') {
this.$message({
message: '违规记录图片上传成功',
type: 'success'
})
} else {
this.$message({
message: '违规记录图片上传失败',
type: 'error'
})
this.loading = false
}
}).catch((e) => {
this.listLoading = false
this.loading = false
})
},
translateLicenceType(id) {
for (var i = 0; i < this.licenceTypeList.length; i++) {
if (this.licenceTypeList[i].ID == id) return this.licenceTypeList[i].NAME
}
},
translateVehicleType(id) {
for (var i = 0; i < this.vehicleTypeList.length; i++) {
if (this.vehicleTypeList[i].ID == id) return this.vehicleTypeList[i].NAME
}
},
showDetail(VEHICLE_ID) {
this.$parent.VEHICLE_ID = VEHICLE_ID
this.$parent.activeName = 'Info'
},
//
goCheckLicenceNo() {
if (this.addForm.LICENCE_NO === '') {
this.$message.success('请输入车牌号')
this.ISCHECK = false
} else {
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
const result = regex.test(this.addForm.LICENCE_NO)
if (result) {
this.$message.success('验证通过')
this.ISCHECK = true
} else {
this.$message.success('车牌号不规范')
this.ISCHECK = false
}
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,35 @@
<template>
<div>
<List v-show="activeName==='List'" ref="list" />
<Info v-if="activeName==='Info'" />
</div>
</template>
<script>
import List from './components/list'
import Info from './components/info'
export default {
components: {
List,
Info
},
data() {
return {
activeName: 'List',
VEHICLE_ID: '', // id
CORPINFO_ID: '' // id
}
},
watch: {
activeName(newValue, oldValue) {
if (newValue == 'List') {
this.$refs.list.getQuery()
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -101,7 +101,7 @@
<el-table-column :formatter="(row) => formatDictionaryLabel(row, '0')" prop="EMPLOYMENT_FORM" label="用工形式" />
<el-table-column :formatter="(row) => formatDictionaryLabel(row, '1')" prop="SELECT_FORM" label="选取形式" />
<el-table-column prop="ruserCount" label="持证人员数"/>
<el-table-column prop="userCount" label="证书数"/>
<el-table-column prop="specialUserCount" label="证书数"/>
<el-table-column label="操作" align="left" width="110">
<template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="toCorpUserPage(row.CORPINFO_ID)"></el-button>