1、口门门禁管理系统--->长期车辆进港管理模块--->分公司车辆信息--->车辆进出记录修复部分bug

2、口门门禁管理系统--->车辆违规管理模块--->车辆违规记录管理---普通用户增加只允许查看。不允许修改和删除
3、口门门禁管理系统--->车辆违规管理模块--->黑名单管理---普通用户增加只允许查看。不允许修改和删除
zhy_20241128
fufeifei 2024-11-28 17:13:08 +08:00
parent 69b62e8bf8
commit bfc7f1e02b
5 changed files with 119 additions and 38 deletions

View File

@ -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 + '&currentPage=' + 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: '数据回显失败',

View File

@ -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
})
}
}
}

View File

@ -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 + '&currentPage=' + 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) => {

View File

@ -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

View File

@ -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 + '&currentPage=' + 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) => {