修改bug

master
853931625@qq.com 2026-07-14 15:11:06 +08:00
parent a628bc0433
commit 62930b5832
28 changed files with 142 additions and 52 deletions

View File

@ -20,7 +20,7 @@ module.exports = {
},
},
// 应用唯一标识符
appIdentifier: "primeport-h5",
appIdentifier: "primeport",
// 应用上下文注入全局变量
contextInject: {
// 应用Key

BIN
primeport.zip Normal file

Binary file not shown.

View File

@ -14,7 +14,7 @@
<% for (const item of $links) { %>
<link type="text/css" rel="stylesheet" href="<%= item %>"></link>
<% } %>
<title>--</title>
<title>临时访客申请</title>
<script>
(function () {
const APP_ENV = {

View File

@ -14,6 +14,9 @@ window.mapLatitude = "39.940504336846665";
dayjs.locale("zh-cn");
setJJBCommonAntdMessage(message);
window.mapLongitude = "119.69457721306945";
window.mapLatitude = "39.940504336846665";
window.mapBaiDuKey = "OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr";
const app = setup();

View File

@ -59,9 +59,10 @@ function List(props) {
fixed: "right",
render: (_, record) => (
<Space>
{(record.currentUserCanAudit === 1 && props.permission("jgd-ent-long-personnel-review-review")) && (
{( props.permission("jgd-ent-long-personnel-review-review")) && (
<Button
type="link"
disabled={record.currentUserCanAudit !== 1}
onClick={() => {
const entrance = ENCLOSED_AREA_BELONGING_END_ENUM.find(item => +item.bianma === record.personBelongType).bianma;
props.history.push(`./review?id=${record.id}&entrance=${entrance}`);

View File

@ -7,6 +7,7 @@ function List(props) {
viewBtn="fgs-lin-shi-che-liang-guan-li-show"
auditInfoBtn="fgs-lin-shi-che-liang-guan-li-auditinfo"
auditBtn="fgs-lin-shi-che-liang-guan-li-audit"
vehicleBelongType={6}
{...props}
/>
);

View File

@ -5,6 +5,7 @@ function List(props) {
<ListPage
viewBtn="fgs-lscl-aduit-record-ck"
auditInfoBtn="fgs-lscl-aduit-record-bh"
vehicleBelongType={6}
{...props}
/>
);

View File

@ -33,9 +33,10 @@ import {
import "../../../index.less";
export const ACCESS_TYPE_ENUM = [
{ label: "车辆", value: "HGKM_MKMJ_CKM" },
{ label: "人员", value: "HGKM_MKMJ_CKM_R" },
{ label: "车辆", value: "CAR_APPLY" },
{ label: "人员", value: "PERSON_APPLY" },
];
export const APPLICATION_GATE_PERSON_TYPE_ENUM = [
{ label: "一级口门", value: "ONE_LEVEL_PERSON_APPLY" },
{ label: "封闭区域口门", value: "TWO_LEVEL_PERSON_APPLY" },
@ -92,12 +93,12 @@ function Apply(props) {
};
const getFirstLevelDoorInfoListAll = async (gateLevelAuthArea) => {
const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1, hgAuthArea: gateLevelAuthArea,mkmjType:mkmjType });
const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1, hgAuthArea: gateLevelAuthArea,mkmjType:mkmjType === "CAR_APPLY" ?"HGKM_MKMJ_CKM":"HGKM_MKMJ_CKM_R" });
setFirstLevelDoorInfoListAll(data);
};
const getTwoLevelDoorInfoListAll = async (gateLevelAuthArea) => {
const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 2, hgAuthArea: gateLevelAuthArea,mkmjType:mkmjType });
const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 2, hgAuthArea: gateLevelAuthArea,mkmjType:mkmjType === "CAR_APPLY" ?"HGKM_MKMJ_CKM":"HGKM_MKMJ_CKM_R" });
setTwoLevelDoorInfoListAll(data);
};
@ -147,7 +148,7 @@ function Apply(props) {
});
return;
}
if (values.tmpApplyType === "HGKM_MKMJ_CKM" && values.vehicleLicensePhoto.length !== 2) {
if (values.tmpApplyType === "CAR_APPLY" && values.vehicleLicensePhoto.length !== 2) {
Toast.show({
icon: "fail",
content: "请上传两张行驶证照片",
@ -312,10 +313,10 @@ function Apply(props) {
getValueProps={value => [value]}
>
<Picker
columns={[tmpApplyType === "HGKM_MKMJ_CKM_R" ? APPLICATION_GATE_PERSON_TYPE_ENUM : APPLICATION_GATE_CAR_TYPE_ENUM]}
columns={[tmpApplyType === "PERSON_APPLY" ? APPLICATION_GATE_PERSON_TYPE_ENUM : APPLICATION_GATE_CAR_TYPE_ENUM]}
onConfirm={(event) => {
if (event[0] === "ONE_LEVEL_CAR_APPLY") {
if (event[0] === "ONE_LEVEL_CAR_APPLY" || event[0] === "ONE_LEVEL_PERSON_APPLY") {
getApprovalUserList();
}
else {
@ -345,7 +346,7 @@ function Apply(props) {
</Form.Item>
)}
{
tmpApplyType === "HGKM_MKMJ_CKM"
tmpApplyType === "CAR_APPLY"
&& (
<>
<Form.Item name="drivingUserName" label="驾驶人姓名" rules={[{ required: true }]}>
@ -477,7 +478,7 @@ function Apply(props) {
)
}
{
tmpApplyType === "HGKM_MKMJ_CKM_R"
tmpApplyType === "PERSON_APPLY"
&& (
<>
<Form.Item name="applyPersonUserName" label="访问人姓名" rules={[{ required: true }]}>

View File

@ -18,11 +18,9 @@ function ApplyList(props) {
});
setInfo(data);
};
useEffect(() => {
getData();
}, []);
return (
<div>
<div style={{ backgroundColor: "#f9f9f9", padding: "10px" }}>
@ -41,7 +39,7 @@ function ApplyList(props) {
</div>
<div>
申请区域
{info.closedAreaName}
{ info.closedAreaName || info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、")}
</div>
<div>
申请口门
@ -72,7 +70,7 @@ function ApplyList(props) {
<div style={{ fontSize: "16px", fontWeight: "bold" }}>临时访客车辆申请</div>
<div>
申请人
{info.drivingUserName}
{info.applyPersonUserName}
</div>
<div>
手机号
@ -80,7 +78,7 @@ function ApplyList(props) {
</div>
<div>
申请区域
{info.closedAreaName}
{ info.closedAreaName || info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、")}
</div>
<div>
申请口门

View File

@ -18,7 +18,7 @@ import {
NS_FIRST_LEVEL_DOOR_INFO,
NS_PERSONNEL_APPLICATION,
} from "~/enumerate/namespace";
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
function Add(props) {
const [form] = FormBuilder.useForm();
const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form);
@ -31,9 +31,20 @@ function Add(props) {
const [xgfProjectListAll, setXgfProjectListAll] = useState([]);
const [approvalUserListAll, setApprovalUserListAll] = useState([]);
const [xgfProjectUser, setXgfProjectUser] = useState([]);
const [userId, setUserId] = useState("");
const { getUserInfo } = useGetUserInfo();
const signatureUrl = useRef("");
const getInfoData = async () => {
const data = await getUserInfo();
setUserId(data.id);
};
useEffect(() => {
getInfoData();
}, []);
const getXgfProjectListAll = async () => {
const { data } = await props["xgfProjectListAll"]({betweenProjectTime :1 });
setXgfProjectListAll(data);
@ -46,7 +57,7 @@ function Add(props) {
const getXgfProjectUserGetPeopleProject = async (id) => {
const { data } = await props["xgfProjectUserGetPeopleProject"]({ id });
setXgfProjectUser(data);
setXgfProjectUser(data || []);
};
const getFirstLevelDoorInfoListAll = async () => {
@ -59,6 +70,19 @@ function Add(props) {
getApprovalUserListAll();
}, []);
useEffect(() => {
if (!userId || xgfProjectUser.length === 0) {
return;
}
const currentUser = xgfProjectUser.find(item => String(item.userId) === String(userId));
if (!currentUser) {
return;
}
setPersonnelList(list => (
list.some(item => String(item.userId) === String(userId)) ? list : [...list, currentUser]
));
}, [userId, xgfProjectUser]);
useEffect(() => {
if (gateLevelAuthArea) {
getFirstLevelDoorInfoListAll();
@ -236,6 +260,7 @@ function Add(props) {
<Button
type="link"
danger
disabled={Boolean(userId) && String(record.userId) === String(userId)}
onClick={() => {
Modal.confirm({
title: "删除确认",
@ -296,6 +321,7 @@ function Add(props) {
<AddPersonnelModal
personnelList={personnelList}
xgfProjectUser={xgfProjectUser}
userId={userId}
onCancel={() => {
setAddPersonnelModalVisible(false);
}}
@ -355,7 +381,7 @@ const AddPersonnelModalComponent = (props) => {
},
preserveSelectedRowKeys: true,
getCheckboxProps: record => ({
disabled: record.trainingState === "0",
disabled: record.trainingState === "0" || (Boolean(props.userId) && String(record.userId) === String(props.userId)),
}),
}}
options={false}

View File

@ -1,6 +1,7 @@
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Descriptions, Divider, Modal, Space } from "antd";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
import PreviewImg from "zy-react-library/components/PreviewImg";
@ -35,7 +36,7 @@ function List(props) {
columns={[
{ title: "姓名", dataIndex: "employeePersonUserName" },
{ title: "部门", dataIndex: "personDepartmentName" },
{ title: "是否培训", dataIndex: "trainingState", render: (_, record) => getLabelName({ list: TRAINING_STATE_ENUM, status: record.trainingState }) },
// { title: "是否培训", dataIndex: "trainingState", render: (_, record) => getLabelName({ list: TRAINING_STATE_ENUM, status: record.trainingState }) },
{ title: "涉及项目", dataIndex: "projectName" },
// { title: "口门权限范围", dataIndex: "todo5" },
{
@ -125,7 +126,7 @@ const InfoModalComponent = (props) => {
{ label: "人脸照片", children: (<PreviewImg files={[{
filePath: info.userFaceUrl,
}]} />) },
{ label: "申请时间", children: info.createTime },
{ label: "申请时间", children: info.createTime ? dayjs(info.createTime).format("YYYY-MM-DD HH:mm:ss") : "" },
{ label: "审核人", children: info.auditUserName },
{ label: "审核时间", children: info.auditTime },
]}

View File

@ -318,7 +318,7 @@ const SelectEntourageModalComponent = (props) => {
}
else {
let personBelongType = 1;
if (props.entrance === "enterprise")F
if (props.entrance === "enterprise")
personBelongType = 2;
return { personBelongType };
}

View File

@ -269,7 +269,7 @@ function List(props) {
onClose={() => setMapModalVisible(false)}
longitude={location.longitude}
latitude={location.latitude}
type="cesium"
onConfirm={(longitude, latitude) => {
onSavePosition(longitude, latitude);
}}

View File

@ -234,7 +234,7 @@ const AddModalComponent = (props) => {
},
{ name: "passageTypeName", label: "通道类型名称", onlyForLabel: true },
{ name: "passageStatus", label: "通道状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: CHANNEL_STATUS_ENUM },
{ key: "map", customizeRender: true, render: <Map type="cesium" /> },
{ key: "map", customizeRender: true, render: <Map /> },
]}
/>
</Modal>

View File

@ -262,7 +262,7 @@ function AddModalComponent(props) {
},
{ name: "mkmjTypeName", label: "口门类型名称", onlyForLabel: true },
{ name: "remarks", label: "口门位置" },
{ key: "map", customizeRender: true, render: <Map type="cesium" /> },
{ key: "map", customizeRender: true, render: <Map /> },
{ name: "mkmjStatus", label: "口门状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_STATUS_ENUM },
]}
/>

View File

@ -14,9 +14,8 @@ function List(props) {
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
form,
params: { employeeVehicleUserId: query.id, vehicleBelongType: 3 },
params: { employeeVehicleUserId: query.id, vehicleBelongType: props.vehicleBelongType?props.vehicleBelongType:3 },
});
return (
<Page headerTitle="车辆管理">
<Search

View File

@ -1,7 +1,13 @@
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockVehicles/List";
function List(props) {
return <ListPage type="view" {...props} />;
return <ListPage
type="view"
vehicleBelongType="4"
vehicleRecordsBtn="jgd-fgsrycl-dwclxq-inout"
viewBtn="jgd-fgsrycl-dwclxq-show"
{...props} />;
}
export default List;

View File

@ -60,6 +60,18 @@ function Add(props) {
getApprovalUserListAll(data.vehicleCorpId);
}
else {
if (query.employeeVehicleUserId) {
form.setFieldsValue({
employeeVehicleUserId: query.employeeVehicleUserId,
employeeVehicleUserName: query.employeeVehicleUserName,
vehicleDepartmentName: query.vehicleDepartmentName,
vehicleDepartmentId: query.vehicleDepartmentId,
vehicleCorpId: query.vehicleCorpId,
vehicleCorpName: query.vehicleCorpName,
});
getApprovalUserListAll(query.vehicleCorpId);
return;
}
const userInfo = await getUserInfo();
form.setFieldsValue({
employeeVehicleUserId: userInfo.id,

View File

@ -44,14 +44,14 @@ function List(props) {
<div style={{ width: 300 }}>
<DepartmentLeftTree
onGetNodePaths={(event) => {
const departmentId = event.at(-1).departmentId;
const departmentId = event.at(-1).id;
setUrlState({
departmentId,
backDepartmentIds: [...urlState.backDepartmentIds, urlState.departmentId],
backDepartmentIds: [...urlState.backDepartmentIds, urlState.id],
});
}}
searchType="inType"
params={{ inType: [5] }}
isNeedCorpInfoId={true}
params={{ eqCorpinfoId: query.id }}
/>
</div>
<div style={{

View File

@ -1,7 +1,7 @@
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/BranchPersonnelAndVehicles/PersonnelAndVehicle/VehicleManagement/List";
function List(props) {
return (<ListPage {...props} />);
return (<ListPage vehicleBelongType={8} {...props} />);
}
export default List;

View File

@ -5,13 +5,8 @@ import Search from "zy-react-library/components/Search";
import Table from "zy-react-library/components/Table";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
const STATUS_ENUM = [
{ bianme: "1", name: "开启" },
{ bianme: "2", name: "关闭" },
];
function List(props) {
const query = useGetUrlQuery();
@ -33,15 +28,23 @@ function List(props) {
/>
<Table
columns={[
{ title: "车辆类型", dataIndex: "vehicleBelongType" },
{ title: "车辆类型", dataIndex: "vehicleTypeName" },
{ title: "车牌类型", dataIndex: "licenceTypeName" },
{ title: "车牌号", dataIndex: "licenceNo" },
{ title: "驾驶人姓名", dataIndex: "employeeVehicleUserName" },
{ title: "驾驶人手机号", dataIndex: "todo5" },
{ title: "驾驶人手机号", dataIndex: "lsUserPhone" },
{
title: "口门权限",
dataIndex: "mkmjPermission",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.mkmjPermission }),
dataIndex: "gateLevelAuthArea",
render:(_,record) =>{
const authorizationArea = typeof record.gateLevelAuthArea === "string"
? JSON.parse(record.gateLevelAuthArea)
: record.gateLevelAuthArea;
console.log(Array.isArray(authorizationArea?.area));
return Array.isArray(authorizationArea?.area)
? authorizationArea.area.map(item => item.value).filter(Boolean).join("\u3001") || "-"
: "-";
} ,
},
{
title: "操作",

View File

@ -129,7 +129,15 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./vehicleManagement/list?id=${record.userId}`);
const params = new URLSearchParams({
id: record.userId || "",
userName: record.userName || "",
departmentId: record.departmentId || "",
departmentName: record.departmentName || "",
corpinfoId: record.corpinfoId || "",
corpName: record.corpName || "",
}).toString();
props.history.push(`./vehicleManagement/list?${params}`);
}}
>
车辆管理
@ -162,6 +170,17 @@ function List(props) {
const AuthorizationModalVisibleComponent = (props) => {
const [form] = FormBuilder.useForm();
let authorizationArea = [];
try {
const gateLevelAuthArea = typeof props.info.gateLevelAuthArea === "string"
? JSON.parse(props.info.gateLevelAuthArea)
: props.info.gateLevelAuthArea;
authorizationArea = Array.isArray(gateLevelAuthArea?.area) ? gateLevelAuthArea.area : [];
}
catch {
authorizationArea = [];
}
const onSubmit = async (values) => {
const { userId, corpinfoId, corpName, departmentId, departmentName, userName, userFaceUrl, userPhone, userCard } = props.info;
@ -204,7 +223,9 @@ const AuthorizationModalVisibleComponent = (props) => {
span={24}
labelCol={{ span: 8 }}
values={{
mkmjPermission: "1",
mkmjPermission: String(props.info.mkmjPermission || 1),
gateLevelAuthArea: authorizationArea[0]?.bianma,
area: authorizationArea,
}}
options={[
{
@ -220,7 +241,7 @@ const AuthorizationModalVisibleComponent = (props) => {
<DictionarySelect
dictValue="HG_AUTH_AREA"
onGetOption={(option) => {
const area = [{ value: option.dictLabel, bianma: option.dictValue }];
const area = option ? [{ value: option.dictLabel, bianma: option.dictValue }] : [];
form.setFieldValue("area", area);
}}
/>

View File

@ -62,6 +62,18 @@ function List(props) {
message.warning("最多添加两辆车");
return;
}
if (query.userName) {
const params = new URLSearchParams({
employeeVehicleUserId: query.id || "",
employeeVehicleUserName: query.userName || "",
vehicleDepartmentId: query.departmentId || "",
vehicleDepartmentName: query.departmentName || "",
vehicleCorpId: query.corpinfoId || "",
vehicleCorpName: query.corpName || "",
}).toString();
props.history.push(`./add?${params}`);
return;
}
props.history.push("./add");
}}
>

View File

@ -60,6 +60,8 @@ function List(props) {
backDepartmentIds: [...urlState.backDepartmentIds, urlState.departmentId],
});
}}
isNeedCorpInfoId={true}
params={{ eqCorpinfoId: query.id }}
/>
</div>
<div style={{
@ -103,16 +105,19 @@ function List(props) {
</Button>
)}
{
urlState.departmentId !== "" && (
(urlState.departmentId !== "" || props.type === "view") && (
<Button
icon={<BackIcon />}
onClick={() => {
if (urlState.departmentId === "") {
props.history.goBack();
return;
}
setUrlState({
departmentId: urlState.backDepartmentIds.at(-1),
backDepartmentIds: urlState.backDepartmentIds.slice(0, -1),
});
}}
ghost
>
返回
</Button>

View File

@ -51,7 +51,7 @@ function List(props) {
// },
// { name: "employeeVehicleUserName", label: "车辆所属人" },
{ name: "licenceNo", label: "车牌号" },
{ name: "licenceType", label: "车牌类型", render: (<DictionarySelect dictValue="LICENCE_TYPE" />) },
{ name: "licenceType", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) },
{ name: "vehicleType", label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" />) },
]}
form={form}

View File

@ -46,7 +46,7 @@ function ShareVehicles(props) {
<Table
columns={[
{
dataIndex: "vehicleBelongType",
dataIndex: "vehicleTypeName",
title: "车辆所属类型",
render: (_, record) => getLabelName({ list: VEHICLE_TYPE_ENUM, status: record.vehicleBelongType }),
},

View File

@ -29,9 +29,8 @@ function List(props) {
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["vehicleAuditList"], {
form,
params: { processOrRecord: !props.isRecords ? 1 : 2 },
params: { processOrRecord: !props.isRecords ? 1 : 2,vehicleBelongType: props.vehicleBelongType ? props.vehicleBelongType :""},
});
const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1 });
setFirstLevelDoorInfoListAll(data);

View File

@ -6,6 +6,7 @@ function List(props) {
viewBtn="jgd-entry-temp-vehicle-records-show"
auditInfoBtn="jgd-entry-temp-vehicle-records-audit-info"
isRecords={true}
vehicleBelongType={props.vehicleBelongType}
{...props}
/>
);