1、口门门禁管理系统--->长期车辆进港管理模块--->分公司车辆信息--->车辆进出记录修复部分bug
2、口门门禁管理系统--->车辆违规管理模块--->车辆违规记录管理---普通用户增加只允许查看。不允许修改和删除 3、口门门禁管理系统--->车辆违规管理模块--->黑名单管理---普通用户增加只允许查看。不允许修改和删除zhy_20241128
parent
69b62e8bf8
commit
bfc7f1e02b
|
@ -19,7 +19,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<SelectTree
|
||||
ref="selectTree_Search2"
|
||||
:clearable="false"
|
||||
|
@ -30,7 +30,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="车辆责任人">
|
||||
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆责任人">
|
||||
<el-input v-model="searchFrom.USER_NAME" placeholder="请输入车辆责任人..." />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -134,7 +134,7 @@
|
|||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<!-- 车辆所属部门下拉框 -->
|
||||
<el-form-item :rules="[{required: true}]" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<el-form-item v-show="roleName !== '普通用户角色'" :rules="[{required: true}]" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<SelectTree
|
||||
ref="selectTree_add1"
|
||||
:clearable="false"
|
||||
|
@ -145,12 +145,18 @@
|
|||
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 :rules="[{required: true}]" label="车辆责任人" prop="USER_ID">
|
||||
<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-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="addDialogCancelBtn">取 消</el-button>
|
||||
|
@ -162,8 +168,23 @@
|
|||
<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 :rules="[{required: true}]" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<SelectTree
|
||||
ref="selectTree_edit"
|
||||
:clearable="true"
|
||||
|
@ -174,12 +195,18 @@
|
|||
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 :rules="[{required: true}]" label="车辆责任人" prop="USER_ID">
|
||||
<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>
|
||||
|
@ -197,6 +224,9 @@
|
|||
<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>
|
||||
|
@ -228,6 +258,11 @@ export default {
|
|||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
roleName: '', // 角色名称
|
||||
loginUserId: '',
|
||||
loginUserName: '',
|
||||
loginDepartmentId: '',
|
||||
loginDepartmentName: '',
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
|
@ -239,7 +274,6 @@ export default {
|
|||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
loginUserId: '', // 登录人ID
|
||||
// 车牌类型列表
|
||||
licenceTypeList: [
|
||||
// { ID: '', NAME: '请选择' },
|
||||
|
@ -302,6 +336,9 @@ export default {
|
|||
OLD_LICENCE_NO: '', // 修改前的车牌号
|
||||
USER_ID: '', // 车辆责任人
|
||||
USER_NAME: '', // 车辆责任人姓名
|
||||
LICENCE_TYPE: '', // 车牌类型
|
||||
VEHICLE_TYPE: '', // 车辆类型
|
||||
VEHICLE_BELONG_TYPE: '', // 车辆所属类型
|
||||
DEPARTMENT_NAME: '', // 车辆所属部门名称
|
||||
EMPLOYEE_VEHICLE_USER_ID: '', // 车辆所属人
|
||||
EMPLOYEE_VEHICLE_USER_NAME: '', // 车辆所属人姓名
|
||||
|
@ -312,6 +349,7 @@ export default {
|
|||
detailForm: {
|
||||
LICENCE_NO: '', // 车牌号
|
||||
VEHICLE_DEPARTMENT_ID: '', // 车辆所属部门
|
||||
VEHICLE_BELONG_TYPE: '', // 车辆所属类型
|
||||
USER_ID: '', // 车辆责任人
|
||||
EMPLOYEE_VEHICLE_USER_ID: '', // 车辆所属人
|
||||
LICENCE_TYPE: null, // 车牌类型
|
||||
|
@ -344,6 +382,11 @@ 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(
|
||||
|
@ -352,6 +395,8 @@ export default {
|
|||
).then((data) => {
|
||||
this.loginUserId = data.pd.USER_ID
|
||||
this.loginUserName = data.pd.NAME
|
||||
this.loginDepartmentId = data.pd.DEPARTMENT_ID
|
||||
this.loginDepartmentName = data.pd.deptName
|
||||
resolve('ok')
|
||||
}).catch((e) => {
|
||||
|
||||
|
@ -369,6 +414,7 @@ export default {
|
|||
},
|
||||
// 获取列表
|
||||
getPageList() {
|
||||
this.roleName = ''
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'vehiclemessage/getPageList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
|
@ -379,6 +425,7 @@ export default {
|
|||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.roleName = data.roleName
|
||||
// this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
|
@ -442,24 +489,32 @@ export default {
|
|||
})
|
||||
return false
|
||||
}
|
||||
if (this.addForm.VEHICLE_DEPARTMENT_ID !== null && this.addForm.VEHICLE_DEPARTMENT_ID === '') {
|
||||
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.USER_ID !== null && this.addForm.USER_ID === '') {
|
||||
this.$message({
|
||||
message: '请选择车辆责任人',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (this.addForm.VEHICLE_BELONG_TYPE === '0') {
|
||||
|
||||
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 {
|
||||
} else { // 单位车辆(只需添加责任人,无需添加所属人)
|
||||
this.addForm.EMPLOYEE_VEHICLE_USER_ID = '' // 车辆所属人id
|
||||
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = '' // 车辆所属人姓名
|
||||
}
|
||||
|
@ -508,16 +563,18 @@ export default {
|
|||
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.VEHICLE_DEPARTMENT_ID = data.pd.VEHICLE_DEPARTMENT_ID // 车辆归属公司或责任公司(车辆所属部门)
|
||||
this.editForm.VEHICLE_DEPARTMENT_ID = ''
|
||||
// this.$refs.selectTree_edit.clearHandle()
|
||||
|
||||
const node = {}
|
||||
node.id = data.pd.VEHICLE_DEPARTMENT_ID
|
||||
|
||||
this.$nextTick(() => { // 此处使用这个可以等节点渲染后再获取节点
|
||||
this.$refs.selectTree_edit.handleNodeClick(node)
|
||||
})
|
||||
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: '数据回显失败',
|
||||
|
@ -537,6 +594,7 @@ export default {
|
|||
this.detailForm = {
|
||||
LICENCE_NO: '', // 车牌号
|
||||
VEHICLE_DEPARTMENT_ID: '', // 车辆所属部门
|
||||
VEHICLE_BELONG_TYPE: '', // 车辆所属类型
|
||||
USER_ID: '', // 车辆责任人
|
||||
EMPLOYEE_VEHICLE_USER_ID: '', // 员工车辆所属人
|
||||
LICENCE_TYPE: null, // 车牌类型
|
||||
|
@ -556,6 +614,7 @@ export default {
|
|||
this.detailForm.USER_ID = data.pd.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: '数据回显失败',
|
||||
|
|
|
@ -119,6 +119,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
this.searchForm.LICENCE_NO = this.$parent.LICENCE_NO
|
||||
this.getPageList() // 获取分页列表要展示的数据
|
||||
},
|
||||
|
@ -177,6 +178,19 @@ export 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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,13 +73,13 @@
|
|||
<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>
|
||||
<el-button v-show="roleName !== '普通用户角色'" 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>
|
||||
<el-button v-show="roleName !== '普通用户角色'" 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>
|
||||
|
@ -218,6 +218,7 @@ export default {
|
|||
label: 'NAME',
|
||||
children: 'nodes'
|
||||
},
|
||||
roleName: '', // 角色名称
|
||||
addDialogVisible: false,
|
||||
dialogImageVisible: false, // 放大照片的显示和隐藏
|
||||
violation_files: [],
|
||||
|
@ -291,6 +292,7 @@ export default {
|
|||
},
|
||||
// 获取分页列表的数据
|
||||
getPageList() {
|
||||
this.roleName = ''
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'blackListManage/getPageList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
|
@ -299,10 +301,9 @@ export default {
|
|||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
console.info('输出获取到的数据')
|
||||
console.log(data)
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.roleName = data.roleName
|
||||
// this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<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>
|
||||
<el-button v-show="roleName !== '普通用户角色'" type="danger" icon="el-icon-delete" size="mini" @click="deleteSingleDataDeleteBtn(row.VIOLATION_ID)">清除违规记录</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -87,6 +87,7 @@ export default {
|
|||
del: false,
|
||||
edit: false,
|
||||
varList: [], // 列表数据
|
||||
roleName: '', // 角色名称
|
||||
detailDialogVisible: false, // 查看详情的弹窗
|
||||
// 违规类型列表
|
||||
violationTypeList: [
|
||||
|
@ -116,6 +117,7 @@ export default {
|
|||
// 获取列表的数据
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.roleName = ''
|
||||
requestFN(
|
||||
'/breakRulesRecord/getDetailList',
|
||||
{
|
||||
|
@ -124,6 +126,7 @@ export default {
|
|||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.roleName = data.roleName
|
||||
// this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
// this.pd = data.pd
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="openAddDialogAddBtn">新增</el-button>
|
||||
<el-button v-show="roleName !== '普通用户角色'" 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>
|
||||
|
@ -263,6 +263,7 @@ export default {
|
|||
label: 'NAME',
|
||||
children: 'nodes'
|
||||
},
|
||||
roleName: '', // 角色名称
|
||||
addDialogVisible: false,
|
||||
violationUpload: false, // 违规照片
|
||||
dialogImageVisible: false, // 放大照片的显示和隐藏
|
||||
|
@ -322,6 +323,7 @@ export default {
|
|||
getQuery() {
|
||||
// vehicleMessageTable 需要置空表格的ref值
|
||||
this.$refs.vehicleMessageTable.clearSelection() // 先置空表格再查询
|
||||
this.roleName = ''
|
||||
this.getPageList()
|
||||
},
|
||||
// 重置搜索表单按钮的点击事件
|
||||
|
@ -338,6 +340,7 @@ export default {
|
|||
// 获取分页列表的数据
|
||||
getPageList() {
|
||||
this.listLoading = true
|
||||
this.roleName = ''
|
||||
requestFN(
|
||||
'breakRulesRecord/getPageList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
|
@ -347,6 +350,7 @@ export default {
|
|||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.roleName = data.roleName
|
||||
// this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
|
|
Loading…
Reference in New Issue