Compare commits
22 Commits
aac8f5a645
...
89bea05d49
Author | SHA1 | Date |
---|---|---|
|
89bea05d49 | |
|
67273abd4c | |
|
cfe4328551 | |
|
9639d56b14 | |
|
3aa8475037 | |
|
fcfdad284c | |
|
52a4574be2 | |
|
de28a2d94c | |
|
9c42d4c8df | |
|
6a170d40c0 | |
|
d6f0d0eb80 | |
|
fc5c6cc105 | |
|
9dc6aad85e | |
|
246f61f975 | |
|
46fe015fe2 | |
|
16965de330 | |
|
553210c7b3 | |
|
2727a67c2a | |
|
d619e705d0 | |
|
0a0070a4b9 | |
|
eeaf5f96af | |
|
540e78eaea |
15
api/index.js
15
api/index.js
|
@ -1,4 +1,4 @@
|
|||
import {post, upload, uploads,videoApiGet} from "../utils/request";
|
||||
import {post, upload, uploads,videoApiGet,loginRequest} from "@/utils/request";
|
||||
|
||||
export const submitLogin = (params) => post("/sys/login", params) // 登录
|
||||
export const getUserInfo = (params) => post("/sys/user/info/app", params); // 获取用户信息
|
||||
|
@ -155,3 +155,16 @@ export const setRefreshToken = (params) =>
|
|||
|
||||
export const getKeyProjectsView = (params) => post("/app/keyProjects/getOutsourced", params); // 获取重点工程详详细信息
|
||||
export const setKeyProjectsState = (params) => post("/app/keyProjects/updateState", params); // 修改重点工程状态
|
||||
|
||||
export const getVehiclemessagePageList = (params) => post("/vehiclemessage/getPageList", params);
|
||||
export const getVehiclemessageView = (params) => post("/vehiclemessage/showVehicleMessage", params);
|
||||
export const setVehiclemessageSave = (params) => post("/vehiclemessage/addVehicleMessage", params);
|
||||
export const setVehiclemessageUpdate = (params) => post("/vehiclemessage/updateVehicleMessage", params);
|
||||
export const setVehiclemessageDelete = (params) => post("/vehiclemessage/deleteVehicleMessage", params);
|
||||
export const getAuditUserList = (params) => post("/sys/user/audit/user", params);
|
||||
export const goCheckLicenceNo = (params) => post("/vehiclemessage/goCheckLicenceNo", params);
|
||||
export const uploadSmd = (params) => upload("/busImgfiles/upload/smd", params); // 上传图片至smd(不上传到数据库,返回文件地址)
|
||||
|
||||
export const getVehicleTypeList = () => post("/app/dictionaries/getLevels", {loading: false, DICTIONARIES_ID: '20e73033ae1f81f342fa09c451f02fce'}) //获取车辆类型
|
||||
|
||||
export const submitEditUserFace = (params) => loginRequest("/sys/user/submitEditUserFace", params);
|
30
pages.json
30
pages.json
|
@ -808,6 +808,36 @@
|
|||
"style" : {
|
||||
"navigationBarTitleText" : "分公司隐患考评"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/door_access_control/index",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "口门门禁管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/door_access_control/share_office_vehicle_info/index",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "股份公司车辆管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/face/face_authentication",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人脸认证"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/door_access_control/share_office_vehicle_info/add",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "新增"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/door_access_control/share_office_vehicle_info/view",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "查看"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
@ -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/share_office_vehicle_info/index'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fnNavigator(e) {
|
||||
uni.$u.route({
|
||||
url: this.baseList[e].url
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,354 @@
|
|||
<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" input-align="right"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="车辆所属类型" prop="VEHICLE_BELONG_TYPE" borderBottom required
|
||||
@click="fnSingleChoiceClick('VEHICLE_BELONG_TYPE')">
|
||||
<u-input v-model="form.VEHICLE_BELONG_TYPE_NAME" border="none" readonly input-align="right"/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</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>
|
||||
<u-form-item label="审批人" prop="QY_AUDITOR" borderBottom required
|
||||
@click="fnSingleChoiceClick('QY_AUDITOR')">
|
||||
<u-input v-model="form.QY_AUDITOR_NAME" border="none" readonly input-align="right"/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="范围" prop="portId" borderBottom required
|
||||
@click="fnSingleChoiceClick('portId')">
|
||||
<u-input v-model="form.portName" border="none" readonly input-align="right"/>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="车辆所属部门" prop="DEPARTMENT_NAME" borderBottom required>
|
||||
<u-input :value="userInfo.DEPARTMENT_NAME" border="none" readonly input-align="right"/>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="form.VEHICLE_BELONG_TYPE !== '1'" label="车辆归属人" prop="USERNAME" borderBottom required>
|
||||
<u-input :value="userInfo.USERNAME" border="none" readonly input-align="right"/>
|
||||
</u-form-item>
|
||||
<u-form-item label="行驶证照片" prop="drivingImgFiles" borderBottom required labelPosition="top"
|
||||
labelWidth="auto">
|
||||
<u-upload class="mt-10"
|
||||
multiple
|
||||
:fileList="form.drivingImgFiles"
|
||||
:maxCount="2"
|
||||
:preview-full-image="true"
|
||||
@afterRead="fnAfterRead($event, 'drivingImgFiles')"
|
||||
@delete="fnDeletePic($event, 'drivingImgFiles')"
|
||||
></u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="车辆照片" prop="vehicleImgFiles" borderBottom required labelPosition="top"
|
||||
labelWidth="auto">
|
||||
<u-upload class="mt-10"
|
||||
multiple
|
||||
:fileList="form.vehicleImgFiles"
|
||||
:preview-full-image="true"
|
||||
@afterRead="fnAfterRead($event, 'vehicleImgFiles')"
|
||||
@delete="fnDeletePic($event, 'vehicleImgFiles')"
|
||||
></u-upload>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="mt-10">
|
||||
<u-button type="primary" text="提交" @click="$u.debounce(fnSubmit, 1000, true)"/>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker :show="picker.show" :columns="picker.columns" :keyName="picker.key" :key="picker.type"
|
||||
:defaultIndex="picker.defaultIndex" @confirm="fnSingleChoiceConfirm" @cancel="fnSingleChoiceCancel"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAuditUserList,
|
||||
getVehiclemessageView,
|
||||
getVehicleTypeList,
|
||||
goCheckLicenceNo,
|
||||
setVehiclemessageSave,
|
||||
setVehiclemessageUpdate,
|
||||
uploadSmd
|
||||
} from "@/api";
|
||||
|
||||
export default {
|
||||
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: [],
|
||||
VEHICLE_PORT_LIST: [
|
||||
{id: "0", name: "全部"},
|
||||
{id: "1", name: "东港区"},
|
||||
{id: "2", name: "西港区"},
|
||||
],
|
||||
VEHICLE_BELONG_TYPE_LIST: [
|
||||
{ id: "0", name: "员工车辆" },
|
||||
{ id: "1", name: "单位车辆" },
|
||||
],
|
||||
userList: [],
|
||||
form: {
|
||||
OLD_LICENCE_NO: '',
|
||||
LICENCE_TYPE: '',
|
||||
LICENCE_TYPE_NAME: '',
|
||||
LICENCE_NO: '',
|
||||
VEHICLE_TYPE: '',
|
||||
VEHICLE_TYPE_NAME: '',
|
||||
QY_AUDITOR: '',
|
||||
QY_AUDITOR_NAME: '',
|
||||
portId: '',
|
||||
portName: '',
|
||||
drivingImgFiles: [],
|
||||
vehicleImgFiles: [],
|
||||
deleteFileIds: [],
|
||||
VEHICLE_BELONG_TYPE: '',
|
||||
VEHICLE_BELONG_TYPE_NAME: '',
|
||||
},
|
||||
rules: {
|
||||
LICENCE_TYPE: [{type: 'string', required: true, message: '请选择车牌类型', trigger: ['blur', 'change']}],
|
||||
LICENCE_NO: [
|
||||
{type: 'string', required: true, message: '请输入车牌号', trigger: ['blur', 'change']},
|
||||
{
|
||||
pattern: /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/,
|
||||
message: "请输入正确的车牌号",
|
||||
trigger: "blur",
|
||||
}],
|
||||
VEHICLE_TYPE: [{type: 'string', required: true, message: '请选择车辆类型', trigger: ['blur', 'change']}],
|
||||
QY_AUDITOR: [{type: 'string', required: true, message: '请选择审批人', trigger: ['blur', 'change']}],
|
||||
portId: [{type: 'string', required: true, message: '请选择范围', trigger: ['blur', 'change']}],
|
||||
vehicleImgFiles: [{type: 'array', min: 2, required: true, message: '请上传车辆照片(最少2张)', trigger: ['blur', 'change']}],
|
||||
drivingImgFiles: [{type: 'array', min: 2, required: true, message: '请上传行驶证照片正反面照片', trigger: ['blur', 'change']}]
|
||||
},
|
||||
picker: {
|
||||
show: false,
|
||||
columns: [],
|
||||
key: 'name',
|
||||
type: 'picker',
|
||||
defaultIndex: []
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(event) {
|
||||
this.getVehicleTypeList();
|
||||
this.getUserList();
|
||||
this.VEHICLE_ID = event.VEHICLE_ID
|
||||
if (event.VEHICLE_ID) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: "修改",
|
||||
});
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
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]
|
||||
}
|
||||
if (event === 'QY_AUDITOR') {
|
||||
this.picker.columns = [this.userList]
|
||||
}
|
||||
if (event === 'portId') {
|
||||
this.picker.columns = [this.VEHICLE_PORT_LIST]
|
||||
}
|
||||
if (event === 'VEHICLE_BELONG_TYPE') {
|
||||
this.picker.columns = [this.VEHICLE_BELONG_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
|
||||
}
|
||||
if (this.picker.type === 'QY_AUDITOR') {
|
||||
this.form.QY_AUDITOR = event.value[0].userId
|
||||
this.form.QY_AUDITOR_NAME = event.value[0].name
|
||||
}
|
||||
if (this.picker.type === 'portId') {
|
||||
this.form.portId = event.value[0].id
|
||||
this.form.portName = event.value[0].name
|
||||
}
|
||||
if (this.picker.type === 'VEHICLE_BELONG_TYPE') {
|
||||
this.form.VEHICLE_BELONG_TYPE = event.value[0].id
|
||||
this.form.VEHICLE_BELONG_TYPE_NAME = event.value[0].name
|
||||
}
|
||||
this.fnSingleChoiceCancel()
|
||||
},
|
||||
fnSingleChoiceCancel() {
|
||||
this.picker.show = false
|
||||
},
|
||||
async getVehicleTypeList() {
|
||||
const { list } = await getVehicleTypeList();
|
||||
const TYPE_LIST = [];
|
||||
for (let i = 0; i < list.length; i++){
|
||||
TYPE_LIST.push({id: list[i].BIANMA, name: list[i].NAME})
|
||||
}
|
||||
this.VEHICLE_TYPE_LIST = TYPE_LIST;
|
||||
},
|
||||
async getData() {
|
||||
const resData = await getVehiclemessageView({VEHICLE_ID: this.$route.query.VEHICLE_ID});
|
||||
this.form = resData.pd;
|
||||
const matchedItem = this.VEHICLE_LICENSE_PLATE_TYPE_LIST.find(item => item.id === resData.pd.LICENCE_TYPE.toString());
|
||||
if (matchedItem) {
|
||||
this.form.LICENCE_TYPE_NAME = matchedItem.name;
|
||||
this.form.LICENCE_TYPE = resData.pd.LICENCE_TYPE.toString();
|
||||
}
|
||||
const vehicleType = this.VEHICLE_TYPE_LIST.find(item => item.id === resData.pd.VEHICLE_TYPE.toString());
|
||||
if (vehicleType) {
|
||||
this.form.VEHICLE_TYPE_NAME = vehicleType.name;
|
||||
this.form.VEHICLE_TYPE = resData.pd.VEHICLE_TYPE.toString();
|
||||
}
|
||||
const vehiclePort = this.VEHICLE_PORT_LIST.find(item => item.id === resData.pd.portId.toString());
|
||||
if (vehiclePort) {
|
||||
this.form.portName = vehiclePort.name;
|
||||
this.form.portId = resData.pd.portId.toString();
|
||||
}
|
||||
const vehicleOwnership = this.VEHICLE_BELONG_TYPE_LIST.find(item => item.id === resData.pd.VEHICLE_BELONG_TYPE.toString());
|
||||
if (vehicleOwnership) {
|
||||
this.form.VEHICLE_BELONG_TYPE = vehicleOwnership.id;
|
||||
this.form.VEHICLE_BELONG_TYPE_NAME = vehicleOwnership.name;
|
||||
}
|
||||
const auditor = this.userList.find(item => item.userId === resData.pd.QY_AUDITOR);
|
||||
if (auditor) {
|
||||
this.form.QY_AUDITOR_NAME = auditor.name;
|
||||
}
|
||||
for (let i = 0; i < resData.pd.drivingImgs.length; i++) {
|
||||
if (!Array.isArray(this.form.drivingImgFiles)) {
|
||||
this.$set(this.form, "drivingImgFiles", []);
|
||||
}
|
||||
this.form.drivingImgFiles.push({
|
||||
url: this.$store.state.filePath + resData.pd.drivingImgs[i].filepath,
|
||||
...resData.pd.drivingImgs[i],
|
||||
});
|
||||
}
|
||||
for (let i = 0; i < resData.pd.vehicleImgs.length; i++) {
|
||||
if (!Array.isArray(this.form.vehicleImgFiles)) {
|
||||
this.$set(this.form, "vehicleImgFiles", []);
|
||||
}
|
||||
this.form.vehicleImgFiles.push({
|
||||
url: this.$store.state.filePath + resData.pd.vehicleImgs[i].filepath,
|
||||
...resData.pd.vehicleImgs[i],
|
||||
});
|
||||
}
|
||||
},
|
||||
async getUserList() {
|
||||
const resData = await getAuditUserList({corpinfoId: this.userInfo.CORPINFO_ID});
|
||||
this.userList = resData.data;
|
||||
},
|
||||
async fnSubmit() {
|
||||
await this.$refs.formRef.validate()
|
||||
const checkRes = await goCheckLicenceNo({
|
||||
LICENCE_NO: this.form.LICENCE_NO,
|
||||
licenceType: this.form.LICENCE_TYPE,
|
||||
VEHICLE_ID: this.VEHICLE_ID
|
||||
});
|
||||
if (checkRes.exists === '1') {
|
||||
uni.$u.toast('车牌号已存在')
|
||||
return
|
||||
}
|
||||
const vehicleImgs = [];
|
||||
const drivingImgs = [];
|
||||
for (let i = 0; i < this.form.vehicleImgFiles.length; i++) {
|
||||
if (!this.form.vehicleImgFiles[i].imgfilesId) {
|
||||
const { imgUrl } = await uploadSmd({
|
||||
filePath: this.form.vehicleImgFiles[i].url,
|
||||
name: "file",
|
||||
});
|
||||
vehicleImgs.push(imgUrl);
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.form.drivingImgFiles.length; i++) {
|
||||
if (!this.form.drivingImgFiles[i].imgfilesId) {
|
||||
const { imgUrl } = await uploadSmd({
|
||||
filePath: this.form.drivingImgFiles[i].url,
|
||||
name: "file",
|
||||
});
|
||||
drivingImgs.push(imgUrl);
|
||||
}
|
||||
}
|
||||
this.form.OLD_LICENCE_NO = this.form.LICENCE_NO;
|
||||
const params = {
|
||||
...this.form,
|
||||
DEPARTMENT_ID: this.userInfo.DEPARTMENT_ID,
|
||||
USER_ID: this.form.VEHICLE_BELONG_TYPE == 1 ? '' : this.userInfo.USER_ID,
|
||||
USER_NAME: this.form.VEHICLE_BELONG_TYPE == 1 ? '' : this.userInfo.NAME,
|
||||
VEHICLE_DEPARTMENT_ID: this.userInfo.DEPARTMENT_ID,
|
||||
VEHICLE_DEPARTMENT_NAME: this.userInfo.DEPARTMENT_NAME,
|
||||
vehicleImgs: JSON.stringify(vehicleImgs),
|
||||
drivingImgs: JSON.stringify(drivingImgs),
|
||||
deleteFileIds: JSON.stringify(this.form.deleteFileIds),
|
||||
vehicleFiles: null,
|
||||
vehicleImgFiles: null,
|
||||
drivingImgFiles: null,
|
||||
}
|
||||
let resData
|
||||
if(this.VEHICLE_ID){
|
||||
resData = await setVehiclemessageUpdate(params)
|
||||
}else{
|
||||
resData = await setVehiclemessageSave(params);
|
||||
}
|
||||
if (resData.code === '500') {
|
||||
uni.$u.toast(resData.msg)
|
||||
return
|
||||
}
|
||||
uni.navigateBack(); // 返回上一页
|
||||
},
|
||||
fnAfterRead(event, key) {
|
||||
// 统一处理为数组格式 (兼容单文件/多文件上传)
|
||||
const fileList = Array.isArray(event.file) ? event.file : [event.file];
|
||||
// 确保目标字段是响应式数组
|
||||
if (!Array.isArray(this.form[key])) {
|
||||
this.$set(this.form, key, []);
|
||||
}
|
||||
// 批量创建新对象并追加 (浅拷贝)
|
||||
const newFiles = fileList.map(file => ({ ...file }));
|
||||
this.form[key] = [...this.form[key], ...newFiles];
|
||||
},
|
||||
fnDeletePic(event, key) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定删除该图片吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
if (event?.file?.imgfilesId) {
|
||||
this.form.deleteFileIds = this.form.deleteFileIds == null ? [] : this.form.deleteFileIds
|
||||
this.form.deleteFileIds.push(event.file.imgfilesId);
|
||||
}
|
||||
this.form[key].splice(event.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -0,0 +1,199 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="search card">
|
||||
<u--input
|
||||
prefixIcon="search"
|
||||
placeholder="请输入车牌号"
|
||||
border="surround"
|
||||
v-model="LICENCE_NO"
|
||||
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.JG_DEPT_NAME }}</text>
|
||||
<text>车辆归属人:{{ item.JG_USER_NAME ? item.JG_USER_NAME : "单位车辆" }}</text>
|
||||
</view>
|
||||
<view class="flex-between mt-10 subtitle">
|
||||
<text>车辆进/出港状态:{{ item.vehicleArrivalStatus || '出港' }}</text>
|
||||
<view> 审核状态:{{ IS_AUDIT_LIST[item.IS_AUDIT] }} </view>
|
||||
</view>
|
||||
<view class="flex-between mt-10 subtitle">
|
||||
<text>车辆来源:{{ VEHICLE_OWNERSHIP_TYPE_MAP[item.CAR_FROM] }}</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="fnNavigatorAdd(item.VEHICLE_ID)"></u-button>
|
||||
</view>
|
||||
<view class="wrap ml-10">
|
||||
<u-button type="error" text="删除" size="mini"
|
||||
@click="fnDelete(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'
|
||||
import {getVehiclemessagePageList, getVehicleTypeList, setVehiclemessageDelete} from "@/api";
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FabButton,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
VEHICLE_LICENSE_PLATE_TYPE_MAP: {
|
||||
0: "白牌",
|
||||
1: "蓝牌",
|
||||
2: "黄牌",
|
||||
3: "绿牌",
|
||||
4: "黑牌",
|
||||
},
|
||||
VEHICLE_TYPE_MAP: {},
|
||||
VEHICLE_OWNERSHIP_TYPE_MAP: {
|
||||
0: "平台新建",
|
||||
1: "平台新建",
|
||||
2: "平台新建",
|
||||
},
|
||||
IS_AUDIT_LIST: {
|
||||
1: "待审核",
|
||||
2: "审核通过",
|
||||
3: "审核驳回",
|
||||
},
|
||||
LICENCE_NO: '',
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
totalPage: 0,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return this.$store.getters.getUserInfo
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getVehicleTypeList()
|
||||
},
|
||||
onShow() {
|
||||
this.resetList()
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const resData = await getVehiclemessagePageList({ LICENCE_NO: this.LICENCE_NO, type: 1, CAR_FROM: 0, curPage: this.currentPage, limit: this.pageSize});
|
||||
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/share_office_vehicle_info/view',
|
||||
params: {
|
||||
VEHICLE_ID,
|
||||
}
|
||||
})
|
||||
},
|
||||
fnNavigatorAdd(VEHICLE_ID) {
|
||||
uni.$u.route({
|
||||
url: '/pages/door_access_control/share_office_vehicle_info/add',
|
||||
params: {
|
||||
VEHICLE_ID,
|
||||
}
|
||||
})
|
||||
},
|
||||
fnDelete(VEHICLE_ID) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要删除这条记录?',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
await setVehiclemessageDelete({
|
||||
VEHICLE_ID
|
||||
})
|
||||
this.resetList()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
scrolltolower() {
|
||||
this.currentPage++;
|
||||
if (this.totalPage >= this.currentPage) this.getData();
|
||||
},
|
||||
async getVehicleTypeList() {
|
||||
const { list } = await getVehicleTypeList();
|
||||
const TYPE_LIST = [];
|
||||
for (let i = 0; i < list.length; i++){
|
||||
TYPE_LIST.push({id: list[i].BIANMA, name: list[i].NAME})
|
||||
}
|
||||
const TYPE_MAP = new Map(TYPE_LIST.map(item => [item.id, item.name]));
|
||||
// 如果你需要将 Map 转换为普通对象
|
||||
const TYPE_OBJECT_MAP = Object.fromEntries(TYPE_MAP);
|
||||
this.VEHICLE_TYPE_MAP = TYPE_OBJECT_MAP;
|
||||
console.log(this.VEHICLE_TYPE_MAP);
|
||||
},
|
||||
}
|
||||
}
|
||||
</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>
|
|
@ -0,0 +1,157 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="card">
|
||||
<u-cell-group :border="false">
|
||||
<u-cell>
|
||||
<view slot="title" class="title">车牌号</view>
|
||||
<view slot="label" class="mt-10">{{ info.LICENCE_NO }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">车牌类型</view>
|
||||
<view slot="label" class="mt-10">{{ VEHICLE_LICENSE_PLATE_TYPE_MAP[info.LICENCE_TYPE] }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">车辆类型</view>
|
||||
<view slot="label" class="mt-10">{{ VEHICLE_TYPE_MAP[info.VEHICLE_TYPE] }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">车辆归属类型</view>
|
||||
<view slot="label" class="mt-10">{{ VEHICLE_BELONG_TYPE_LIST[info.VEHICLE_BELONG_TYPE] }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">审批人</view>
|
||||
<view slot="label" class="mt-10">{{ info.QY_AUDITOR_NAME }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">范围</view>
|
||||
<view slot="label" class="mt-10">{{ VEHICLE_PORT_MAP[info.portId] }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">车辆所属部门</view>
|
||||
<view slot="label" class="mt-10">{{ info.DEPT_NAME }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">车辆归属人</view>
|
||||
<view slot="label" class="mt-10">{{ info.USER_NAME }}</view>
|
||||
</u-cell>
|
||||
<template v-if="info.IS_AUDIT === '2' || info.IS_AUDIT === '3'">
|
||||
<u-cell>
|
||||
<view slot="title" class="title">审核状态</view>
|
||||
<view slot="label" class="mt-10">{{ IS_AUDIT_LIST[info.IS_AUDIT] }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">企业审核人</view>
|
||||
<view slot="label" class="mt-10">{{ info.QY_AUDITOR_NAME }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">企业审核时间</view>
|
||||
<view slot="label" class="mt-10">{{ info.QY_AUDIT_DATE }}</view>
|
||||
</u-cell>
|
||||
<u-cell>
|
||||
<view slot="title" class="title">打回原因</view>
|
||||
<view slot="label" class="mt-10">{{ info.QY_REMARK }}</view>
|
||||
</u-cell>
|
||||
</template>
|
||||
<u-cell v-if="info.drivingImgs && info.drivingImgs.length > 0">
|
||||
<view slot="title" class="title">行驶证照片:</view>
|
||||
<view slot="label" class="mt-10">
|
||||
<view style="display: flex;flex-wrap: wrap">
|
||||
<view v-for="(item, index) in info.drivingImgs" :key="index" class="ml-10 mt-10">
|
||||
<u--image :showLoading="true" :src="item.FILEPATH" width="80px" height="80px"
|
||||
@click="previewImage(item.FILEPATH, info.drivingImgs)"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-cell>
|
||||
<u-cell v-if="info.vehicleImgs && info.vehicleImgs.length > 0" >
|
||||
<view slot="title" class="title">车辆照片:</view>
|
||||
<view slot="label" class="mt-10">
|
||||
<view style="display: flex;flex-wrap: wrap">
|
||||
<view v-for="(item, index) in info.vehicleImgs" :key="index" class="ml-10 mt-10">
|
||||
<u--image :showLoading="true" :src="item.FILEPATH" width="80px" height="80px"
|
||||
@click="previewImage(item.FILEPATH, info.vehicleImgs)"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getVehiclemessageView, getVehicleTypeList} from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
VEHICLE_LICENSE_PLATE_TYPE_MAP: {
|
||||
0: "白牌",
|
||||
1: "蓝牌",
|
||||
2: "黄牌",
|
||||
3: "绿牌",
|
||||
4: "黑牌",
|
||||
},
|
||||
VEHICLE_TYPE_MAP: {},
|
||||
VEHICLE_PORT_MAP: {
|
||||
0: "全部",
|
||||
1: "东港区",
|
||||
2: "西港区",
|
||||
},
|
||||
IS_AUDIT_LIST: {
|
||||
1: "待审核",
|
||||
2: "审核通过",
|
||||
3: "审核驳回",
|
||||
},
|
||||
VEHICLE_BELONG_TYPE_LIST: {
|
||||
"0" : "员工车辆",
|
||||
"1" : "单位车辆",
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getVehicleTypeList()
|
||||
},
|
||||
onShow() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const resData = await getVehiclemessageView({VEHICLE_ID: this.$route.query.VEHICLE_ID });
|
||||
this.info = resData.pd;
|
||||
this.info.portId = parseInt(resData.pd.portId);
|
||||
this.info.LICENCE_TYPE = parseInt(resData.pd.LICENCE_TYPE);
|
||||
for (let i = 0; i < resData.pd.drivingImgs?.length; i++) {
|
||||
this.info.drivingImgs[i].FILEPATH = this.$store.state.filePath + resData.pd.drivingImgs[i].filepath;
|
||||
}
|
||||
for (let i = 0; i < resData.pd.vehicleImgs?.length; i++) {
|
||||
this.info.vehicleImgs[i].FILEPATH = this.$store.state.filePath + resData.pd.vehicleImgs[i].filepath;
|
||||
}
|
||||
},
|
||||
async getVehicleTypeList() {
|
||||
const { list } = await getVehicleTypeList();
|
||||
const TYPE_LIST = [];
|
||||
for (let i = 0; i < list.length; i++){
|
||||
TYPE_LIST.push({id: list[i].BIANMA, name: list[i].NAME})
|
||||
}
|
||||
const TYPE_MAP = new Map(TYPE_LIST.map(item => [item.id, item.name]));
|
||||
// 如果你需要将 Map 转换为普通对象
|
||||
const TYPE_OBJECT_MAP = Object.fromEntries(TYPE_MAP);
|
||||
this.VEHICLE_TYPE_MAP = TYPE_OBJECT_MAP;
|
||||
console.log(this.VEHICLE_TYPE_MAP);
|
||||
},
|
||||
previewImage(src, srcArr) {
|
||||
const urls = srcArr.map((item) => item.FILEPATH);
|
||||
uni.previewImage({
|
||||
urls,
|
||||
current: src,
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -187,6 +187,11 @@
|
|||
img: require('../../static/icon-apps/home-znx.png'),
|
||||
title: '分公司隐患考评',
|
||||
url: '/pages/hidden-danger-review/index/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/home-door.png'),
|
||||
title: '口门门禁管理',
|
||||
url: '/pages/door_access_control/index'
|
||||
},
|
||||
],
|
||||
isPromiseUnsigned: false
|
||||
|
|
|
@ -0,0 +1,142 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<view class="fat">
|
||||
<text class="fatt">请将人脸置于方框内</text>
|
||||
</view>
|
||||
<view class="livefater">
|
||||
<view style="width: 700upx; height: 700upx; border-radius: 700upx; overflow: hidden">
|
||||
<live-pusher
|
||||
id="livePusher"
|
||||
ref="livePusher"
|
||||
class="livePusher"
|
||||
url=""
|
||||
mode="SD"
|
||||
:muted="true"
|
||||
:enable-camera="true"
|
||||
:auto-focus="true"
|
||||
:beauty="1"
|
||||
whiteness="2"
|
||||
aspect="1:1" />
|
||||
</view>
|
||||
<cover-image src="/static/images/gaiz.png" class="gaiimg"></cover-image>
|
||||
</view>
|
||||
|
||||
<view style="margin: 0 100upx">
|
||||
<u-button :text="btnTextStr" type="primary" @click="snapshot" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
submitEditUserFace
|
||||
} from '@/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
startPreviewTimer: null, // 开始预览计时器实例
|
||||
btnTextStr: '拍照'
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.context = uni.createLivePusherContext('livePusher', this)
|
||||
this.startPreviewTimer = setInterval(() => {
|
||||
this.startPreview()
|
||||
}, 1000)
|
||||
},
|
||||
onUnload() {
|
||||
this.startPreviewTimer && clearInterval(this.startPreviewTimer)
|
||||
},
|
||||
methods: {
|
||||
snapshot() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.context.snapshot({
|
||||
success: (e) => {
|
||||
this.getMinImage(e.message.tempImagePath)
|
||||
}
|
||||
})
|
||||
},
|
||||
startPreview() {
|
||||
this.context.stopPreview()
|
||||
this.context.startPreview({
|
||||
success: () => {
|
||||
this.startPreviewTimer && clearInterval(this.startPreviewTimer)
|
||||
}
|
||||
})
|
||||
},
|
||||
getMinImage(imgPath) {
|
||||
plus.zip.compressImage({
|
||||
src: imgPath,
|
||||
dst: imgPath,
|
||||
overwrite: true,
|
||||
quality: 40
|
||||
},
|
||||
(zipRes) => {
|
||||
setTimeout(() => {
|
||||
const reader = new plus.io.FileReader()
|
||||
reader.onloadend = async (res) => {
|
||||
const speech = res.target.result
|
||||
// 获取 base 64 图片编码的前缀
|
||||
const USERAVATARPREFIX = speech.substring(0, speech.indexOf(
|
||||
'base64,') + 7)
|
||||
// 获取 base 64 图片的二进制到文本
|
||||
const USERAVATARURL = speech.substring(speech.indexOf('base64,') + 7)
|
||||
try {
|
||||
// 调用 API 提交人脸图片
|
||||
await submitEditUserFace({ USERAVATARPREFIX, USERAVATARURL, userId: this.$store.getters.getUserInfo.USER_ID });
|
||||
uni.hideLoading();
|
||||
uni.$u.toast('上传成功');
|
||||
uni.navigateBack({ delta: 1 });
|
||||
} catch (e) {
|
||||
if (e && e.msg) {
|
||||
uni.$u.toast(e.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(plus.io.convertLocalFileSystemURL(zipRes.target))
|
||||
}, 4000)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.livePusher {
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
}
|
||||
|
||||
.livefater {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 100upx;
|
||||
height: 700upx;
|
||||
}
|
||||
|
||||
.fat {
|
||||
margin: 100upx;
|
||||
}
|
||||
|
||||
.fatt {
|
||||
text-align: center;
|
||||
font-size: 36upx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.gaiimg {
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
margin-top: -700upx;
|
||||
}
|
||||
</style>
|
|
@ -4,7 +4,7 @@
|
|||
<view class="mytop_main">
|
||||
<view class="mytop_main_info">
|
||||
<view class="mytop_main_info_tx">
|
||||
<u-avatar :src="userInfo.USER_SIGN_FILE_PATH || 'account-fill'" size="50"></u-avatar>
|
||||
<u-avatar :src="this.$store.state.filePath + userInfo.USER_SIGN_FILE_PATH || 'account-fill'" size="50"></u-avatar>
|
||||
</view>
|
||||
<view class="mytop_main_test">
|
||||
<view class="mytop_main_test_name">
|
||||
|
@ -61,6 +61,10 @@ export default {
|
|||
img: require('../../../static/images/my_ico1.png'),
|
||||
name:'个人信息',
|
||||
},
|
||||
{
|
||||
img: require('../../../static/images/my_ico2.png'),
|
||||
name: '人脸认证',
|
||||
},
|
||||
{
|
||||
img: require('../../../static/images/my_ico3.png'),
|
||||
name:'问题反馈',
|
||||
|
@ -137,11 +141,17 @@ export default {
|
|||
url: '/pages/mine/promise/promise'
|
||||
})
|
||||
},
|
||||
faceAuthentication() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine/face/face_authentication'
|
||||
})
|
||||
},
|
||||
clickItem(name){
|
||||
if(name === '个人信息') this.goabout()
|
||||
if(name === '问题反馈') this.feedbackclick()
|
||||
if(name === '安全承诺') this.promiseclick()
|
||||
if(name === '修改密码') this.pwdclick()
|
||||
if(name === '人脸认证') this.faceAuthentication()
|
||||
// #ifdef APP-PLUS
|
||||
if(name === '版本更新') this.fnUpdateVersion()
|
||||
// #endif
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
|
@ -226,6 +226,51 @@ function videoApiGet(url, data) {
|
|||
})
|
||||
}
|
||||
|
||||
function loginRequest(url, data = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (data && data.loading !== false) {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true,
|
||||
});
|
||||
}
|
||||
uni.request({
|
||||
url: requestPath + url,
|
||||
data: {
|
||||
...data,
|
||||
},
|
||||
header: {
|
||||
"Content-type": data?.postMethod || "application/json",
|
||||
},
|
||||
method: "POST",
|
||||
success: (res) => {
|
||||
if (data && data.loading !== false) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
if (res.data.result === "success") {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data || "系统开小差了",
|
||||
icon: "none",
|
||||
});
|
||||
reject(res.data);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
if (data && data.loading !== false) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.showToast({
|
||||
title: "网络错误请重试",
|
||||
icon: "none",
|
||||
});
|
||||
reject(err);
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
setInterval(async () => {
|
||||
if (uni.getStorageSync('tokenTime') == null) return;
|
||||
if (dayjs().diff(dayjs(uni.getStorageSync('tokenTime')), "minute") >= 5) {
|
||||
|
@ -234,4 +279,4 @@ setInterval(async () => {
|
|||
}
|
||||
}, 1000 * 60);
|
||||
|
||||
export {post, upload, uploads,setBasePath,videoApiGet}
|
||||
export {post, upload, uploads,setBasePath,videoApiGet,loginRequest}
|
||||
|
|
Loading…
Reference in New Issue