口门门禁管理

dev-2.0-mkmj
LiuJiaNan 2025-07-19 10:03:05 +08:00
parent 3aa9fc61e6
commit 2e2e595e8d
10 changed files with 442 additions and 15 deletions

View File

@ -9,11 +9,11 @@
:is-show-clear="isShowClear" :is-show-clear="isShowClear"
theme-color="#3377ff" theme-color="#3377ff"
page-height="92vh" page-height="92vh"
label-key="name" label-key="DEPARTMENT_NAME"
value-key="id" value-key="DEPARTMENT_ID"
children-key="children" children-key="nodes"
@confirm="fnTreeConfirm" @confirm="fnTreeConfirm"
@cancel="visible = false" @cancel="$emit('update:visible', false)"
/> />
</template> </template>
@ -57,9 +57,11 @@ export default {
async fnGetData() { async fnGetData() {
const resData = await getDepartmentTree({ const resData = await getDepartmentTree({
loading: false, loading: false,
postMethod: 'application/json', // postMethod: 'application/json',
TYPE:'2',
CORP_ID:this.$store.getters.getUserInfo.CORPINFO_ID,
}); });
this.treeData = JSON.parse(resData.zTreeNodes); this.treeData = resData.tree.tree;
} }
}, },
} }

View File

@ -83,8 +83,8 @@ export default {
methods: { methods: {
fnConfirm(event) { fnConfirm(event) {
if (event.length > 0) { if (event.length > 0) {
this.$emit('update:name', event[0].name) this.$emit('update:name', event[0].DEPARTMENT_NAME)
this.$emit('update:id', event[0].id) this.$emit('update:id', event[0].DEPARTMENT_ID)
} else { } else {
this.$emit('update:name', '') this.$emit('update:name', '')
this.$emit('update:id', '') this.$emit('update:id', '')

View File

@ -29,8 +29,7 @@
</template> </template>
<script> <script>
import {getPersonnelList} from "@/api/api"; import {getUserList} from "@/api";
export default { export default {
props: { props: {
@ -83,13 +82,14 @@ export default {
}, },
methods: { methods: {
async fnGetData() { async fnGetData() {
const resData = await getPersonnelList({ const resData = await getUserList({
DEPARTMENT_ID: this.departmentId, DEPARTMENT_ID: this.departmentId,
NOMAIN: "1", TYPE:'0',
CORP_ID:this.$store.getters.getUserInfo.CORPINFO_ID,
loading: false, loading: false,
postMethod: 'application/json', // postMethod: 'application/json',
}); });
this.columns = resData.userList; this.columns = resData.list.list;
}, },
fnShowPicker(){ fnShowPicker(){
if (this.disabled) return; if (this.disabled) return;

View File

@ -435,6 +435,30 @@
"style": { "style": {
"navigationBarTitleText": "隐患整改" "navigationBarTitleText": "隐患整改"
} }
},
{
"path" : "pages/door_access_control/index",
"style" : {
"navigationBarTitleText" : "口门门禁管理"
}
},
{
"path" : "pages/door_access_control/vehicle_info/index",
"style" : {
"navigationBarTitleText" : "入港车辆信息"
}
},
{
"path" : "pages/door_access_control/vehicle_info/add",
"style" : {
"navigationBarTitleText" : "新增"
}
},
{
"path" : "pages/door_access_control/vehicle_info/view",
"style" : {
"navigationBarTitleText" : "查看"
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@ -0,0 +1,39 @@
<template>
<view class="content">
<u-cell-group>
<u-cell v-for="(item,index) in baseList" :key="index" isLink :url="item.url">
<view slot="title">{{ item.title }}</view>
<!-- <view slot="value">-->
<!-- <u-badge :value="item.NUM"></u-badge>-->
<!-- </view>-->
</u-cell>
</u-cell-group>
</view>
</template>
<script>
export default {
data() {
return {
baseList: [
{
title: '股份公司车辆管理',
url: '/pages/door_access_control/vehicle_info/index'
},
]
}
},
methods: {
fnNavigator(e) {
uni.$u.route({
url: this.baseList[e].url
})
}
},
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,147 @@
<template>
<view class="content">
<view class="card" style="padding-left: 20px;">
<u-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="140px">
<u-form-item label="车牌类型" prop="LICENCE_TYPE" borderBottom required
@click="fnSingleChoiceClick('LICENCE_TYPE')">
<u-input v-model="form.LICENCE_TYPE_NAME" border="none" readonly input-align="right"/>
<u-icon name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="车牌号" prop="LICENCE_NO" borderBottom required>
<u-input v-model="form.LICENCE_NO" border="none" :readonly="!!VEHICLE_ID" input-align="right"/>
</u-form-item>
<u-form-item label="车辆类型" prop="VEHICLE_TYPE" borderBottom required
@click="fnSingleChoiceClick('VEHICLE_TYPE')">
<u-input v-model="form.VEHICLE_TYPE_NAME" border="none" readonly input-align="right"/>
<u-icon name="arrow-right"></u-icon>
</u-form-item>
<app-department label="车辆所属部门" :id.sync="form.DEPARTMENT_ID" :name.sync="form.DEPARTMENT_NAME"
:form.sync="form" prop="DEPARTMENT_ID" clear-key="USER_NAME,USER_ID"/>
<app-personnel :id.sync="form.USER_ID" :name.sync="form.USER_NAME" :department-id="form.DEPARTMENT_ID"
prop="USER_ID" label="负责人"/>
<app-time v-model="form.VISIT_START_TIME" prop="VISIT_START_TIME" label="有效期开始"/>
<app-time v-model="form.VISIT_END_TIME" prop="VISIT_END_TIME" label="有效期结束"/>
<app-department label="审核部门" :id.sync="form.AUDITOR_DEPARTMENT_ID" :name.sync="form.AUDITOR_DEPARTMENT_NAME"
prop="AUDITOR_DEPARTMENT_ID"/>
</u-form>
<view class="mt-10">
<u-button type="primary" text="提交" @click="$u.debounce(fnSubmit, 1000, true)"/>
</view>
</view>
</view>
</template>
<script>
import AppTime from "@/components/time/index.vue";
import AppDepartment from "@/components/department/index.vue";
import AppPersonnel from "@/components/personnel/index.vue";
export default {
components: {
AppTime,
AppDepartment,
AppPersonnel,
},
data() {
return {
VEHICLE_ID: '',
VEHICLE_LICENSE_PLATE_TYPE_LIST: [
{id: '0', name: "白牌"},
{id: '1', name: "蓝牌"},
{id: '2', name: "黄牌"},
{id: '3', name: "绿牌"},
{id: '4', name: "黑牌"},
],
VEHICLE_TYPE_LIST: [{id: '1', name: "轿车"}],
form: {
LICENCE_TYPE: '',
LICENCE_TYPE_NAME: '',
LICENCE_NO: '',
VEHICLE_TYPE: '',
VEHICLE_TYPE_NAME: '',
DEPARTMENT_ID: '',
DEPARTMENT_NAME: '',
USER_ID: '',
USER_NAME: '',
VISIT_START_TIME: '',
VISIT_END_TIME: '',
AUDITOR_DEPARTMENT_ID: '',
AUDITOR_DEPARTMENT_NAME: '',
},
rules: {
LICENCE_TYPE: [{type: 'string', required: true, message: '请选择车牌类型', trigger: ['blur', 'change']}],
LICENCE_NO: [{type: 'string', required: true, message: '请输入车牌号', trigger: ['blur', 'change']}],
VEHICLE_TYPE: [{type: 'string', required: true, message: '请选择车辆类型', trigger: ['blur', 'change']}],
DEPARTMENT_ID: [{type: 'string', required: true, message: '请选择车辆所属部门', trigger: ['blur', 'change']}],
USER_ID: [{type: 'string', required: true, message: '请选择负责人', trigger: ['blur', 'change']}],
VISIT_START_TIME: [{type: 'string', required: true, message: '请选择有效期开始', trigger: ['blur', 'change']}],
VISIT_END_TIME: [{type: 'string', required: true, message: '请选择有效期结束', trigger: ['blur', 'change']}],
AUDITOR_DEPARTMENT_ID: [{type: 'string', required: true, message: '请选择审核部门', trigger: ['blur', 'change']}],
},
picker: {
show: false,
columns: [],
key: 'name',
type: 'picker',
defaultIndex: []
},
}
},
onLoad(event) {
this.VEHICLE_ID = event.VEHICLE_ID
if (event.VEHICLE_ID) {
uni.setNavigationBarTitle({
title: "重新申请",
});
}
},
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
methods: {
fnSingleChoiceClick(event) {
this.picker.type = event
if (event === 'LICENCE_TYPE') {
this.picker.columns = [this.VEHICLE_LICENSE_PLATE_TYPE_LIST]
}
if (event === 'VEHICLE_TYPE') {
this.picker.columns = [this.VEHICLE_TYPE_LIST]
}
this.picker.show = true
},
fnSingleChoiceConfirm(event) {
if (this.picker.type === 'LICENCE_TYPE') {
this.form.LICENCE_TYPE = event.value[0].id
this.form.LICENCE_TYPE_NAME = event.value[0].name
}
if (this.picker.type === 'VEHICLE_TYPE') {
this.form.VEHICLE_TYPE = event.value[0].id
this.form.VEHICLE_TYPE_NAME = event.value[0].name
}
this.fnSingleChoiceCancel()
},
fnSingleChoiceCancel() {
this.picker.show = false
},
async fnSubmit() {
try {
await this.$refs.formRef.validate()
const params = {
...this.form,
DEPARTMENT_ID: this.userInfo.DEPARTMENT_ID,
USER_ID: this.userInfo.USER_ID,
}
console.log(params)
} catch {
uni.$u.toast('请补全必填项')
}
}
},
}
</script>
<style scoped lang="scss">
</style>

View File

@ -0,0 +1,165 @@
<template>
<view class="content">
<view class="search card">
<u--input
prefixIcon="search"
placeholder="请输入关键字"
border="surround"
v-model="keyword"
clearable
shape="circle"
></u--input>
<view class="bth-mini ml-10">
<u-button type="success" text="确定" @click="resetList"></u-button>
</view>
</view>
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
<u-list-item v-for="(item, index) in list" :key="index">
<view>
<view class="flex-between main-title">
<text>车牌号{{ item.LICENCE_NO }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>车牌类型{{ VEHICLE_LICENSE_PLATE_TYPE_MAP[item.LICENCE_TYPE] }}</text>
<text>车辆类型{{ VEHICLE_TYPE_MAP[item.VEHICLE_TYPE] }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>车辆所属部门{{ item.DEPT_NAME }}</text>
<text>车辆责任人{{ item.U_NAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>访问起始时间{{ item.VISIT_START_TIME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>访问结束时间{{ item.VISIT_END_TIME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>审核状态{{ AUDIT_STATUS_MAP[item.IS_AUDIT] }}</text>
</view>
<view class="mt-10 see_btn">
<view class="wrap">
<u-button type="primary" text="查看" size="mini"
@click="fnNavigatorView(item.VEHICLE_ID)"></u-button>
</view>
<view class="wrap ml-10">
<u-button type="primary" text="重新申请" size="mini"
@click="fnNavigatorView(item.VEHICLE_ID)"></u-button>
</view>
</view>
</view>
</u-list-item>
</u-list>
<empty v-else></empty>
<fab-button @click="fnNavigatorAdd('')"/>
</view>
</template>
<script>
import FabButton from '@/components/fab_button/index.vue'
export default {
components: {
FabButton,
},
data() {
return {
VEHICLE_LICENSE_PLATE_TYPE_MAP: {
0: "白牌",
1: "蓝牌",
2: "黄牌",
3: "绿牌",
4: "黑牌",
},
VEHICLE_TYPE_MAP: {
0: "货车",
1: "轿车",
2: "大巴客车",
},
AUDIT_STATUS_MAP: {
1: "待审核",
2: "已审核",
3: "审核驳回",
},
keyword: '',
pageSize: 10,
currentPage: 1,
totalPage: 0,
list: [],
}
},
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
onShow() {
// this.resetList()
},
methods: {
async getData() {
const resData = {}
this.list = [...this.list, ...resData.varList];
this.totalPage = resData.page.totalPage;
},
resetList() {
this.pageSize = 10
this.currentPage = 1
this.list = []
this.getData()
},
fnNavigatorView(VEHICLE_ID) {
uni.$u.route({
url: '/pages/door_access_control/vehicle_info/view',
params: {
VEHICLE_ID,
}
})
},
fnNavigatorAdd(VEHICLE_ID) {
uni.$u.route({
url: '/pages/door_access_control/vehicle_info/add',
params: {
VEHICLE_ID,
}
})
},
scrolltolower() {
this.currentPage++;
if (this.totalPage >= this.currentPage) this.getData();
},
}
}
</script>
<style scoped lang="scss">
.ml-10 {
margin-left: 10rpx;
}
.search {
display: flex;
.ml-10 {
margin-left: 10rpx;
}
.bth-mini {
width: 100rpx;
}
}
.see_btn {
display: flex;
justify-content: flex-end;
.wrap {
//width: 200rpx;
margin: 0 10rpx;
}
}
</style>

View File

@ -0,0 +1,45 @@
<template>
<view class="content">
<view class="card">
<u-cell-group :border="false">
<u-cell title="车牌号" :value="info.LICENCE_NO"></u-cell>
<u-cell title="车牌类型" :value="VEHICLE_LICENSE_PLATE_TYPE_MAP[info.LICENCE_TYPE]"></u-cell>
<u-cell title="车辆类型" :value="VEHICLE_TYPE_MAP[info.VEHICLE_TYPE]"></u-cell>
<u-cell title="范围" :value="VEHICLE_PORT_MAP[info.portId]"></u-cell>
<u-cell title="车辆所属部门" :value="info.DEPT_NAME"></u-cell>
<u-cell title="车辆归属人" :value="info.U_NAME"></u-cell>
</u-cell-group>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {},
VEHICLE_LICENSE_PLATE_TYPE_MAP: {
0: "白牌",
1: "蓝牌",
2: "黄牌",
3: "绿牌",
4: "黑牌",
},
VEHICLE_TYPE_MAP: {
0: "货车",
1: "轿车",
2: "大巴客车",
},
VEHICLE_PORT_MAP: {
0: "全部",
1: "东港区",
2: "西港区",
}
}
},
}
</script>
<style scoped lang="scss">
</style>

View File

@ -94,7 +94,12 @@
img: require('../../static/icon-apps/app_icons9.png'), img: require('../../static/icon-apps/app_icons9.png'),
title: '隐患整改', title: '隐患整改',
url: '/pages/hidden_rectification/index' url: '/pages/hidden_rectification/index'
} },
{
img: require('../../static/icon-apps/home-door.png'),
title: '口门门禁管理',
url: '/pages/door_access_control/index'
},
], ],
classInfo: null, classInfo: null,
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB