监管端 封闭区域 车辆人员进出记录接口调试
parent
ab9bd73f72
commit
2f800ef908
|
|
@ -7,12 +7,12 @@ export const enclosedPersonnelAndVehicleStatisticsList = declareRequest(
|
|||
export const enclosedPersonnelAndVehicleStatisticsVehicleEntryAndExitRecordsList
|
||||
= declareRequest(
|
||||
"enclosedPersonnelAndVehicleStatisticsLoading",
|
||||
`Post > @/primeport/dahuaVehicleAccessRecord/list`,
|
||||
`Post > @/primeport/closedArea/vehicleInOutRecord`,
|
||||
);
|
||||
export const enclosedPersonnelAndVehicleStatisticsPersonnelEntryAndExitRecordsList
|
||||
= declareRequest(
|
||||
"enclosedPersonnelAndVehicleStatisticsLoading",
|
||||
`Post > @/primeport/`,
|
||||
`Post > @/primeport/closedArea/personInOutRecord`,
|
||||
);
|
||||
export const eVehicleArrivalDepartureInfoList
|
||||
= declareRequest(
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const NeedToKnowModal = (props) => {
|
|||
return (
|
||||
<Modal
|
||||
open
|
||||
title="安全进港须知"
|
||||
title={props.title || "安全进港须知"}
|
||||
width={800}
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ console.log(urlState.parentId)
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./vehicleEntryAndExitRecords?licenceNo=${record.licenceNo}`);
|
||||
props.history.push(`./vehicleEntryAndExitRecords?closedAreaId=${record.id}`);
|
||||
}}
|
||||
>
|
||||
车辆进出记录
|
||||
|
|
@ -104,7 +104,7 @@ console.log(urlState.parentId)
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./personnelEntryAndExitRecords??userCard=${record.userCard}`);
|
||||
props.history.push(`./personnelEntryAndExitRecords??closedAreaId=${record.id}`);
|
||||
}}
|
||||
>
|
||||
人员进出记录
|
||||
|
|
|
|||
|
|
@ -15,32 +15,47 @@ function PersonnelEntryAndExitRecords(props) {
|
|||
|
||||
const { tableProps, getData } = useTable(props["enclosedPersonnelAndVehicleStatisticsPersonnelEntryAndExitRecordsList"], {
|
||||
form,
|
||||
params: { id: query.id },
|
||||
params: { closedAreaId: query.closedAreaId },
|
||||
transform: values => ({
|
||||
startTime: values.time?.[0] ? `${values.timeRange?.[0]} 00:00:00` : undefined,
|
||||
endTime: values.time?.[1] ? `${values.timeRange?.[1]} 23:59:59` : undefined,
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
return (
|
||||
<Page headerTitle="人员进出记录">
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo1", label: "人员姓名" },
|
||||
{ name: "todo2", label: "时间范围", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
||||
{ name: "todo3", label: "人员类别", render: FORM_ITEM_RENDER_ENUM.SELECT },
|
||||
{ name: "personName", label: "人员姓名" },
|
||||
{ name: "timeRange", label: "时间范围", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
options={false}
|
||||
columns={[
|
||||
{ title: "姓名", dataIndex: "todo1" },
|
||||
{ title: "手机号", dataIndex: "todo2" },
|
||||
{ title: "姓名", dataIndex: "personName" },
|
||||
{ title: "身份证号", dataIndex: "certificateNo", render: (_, record) => record.certificateNo ? atob(record.certificateNo) : "", },
|
||||
{ title: "手机号", dataIndex: "phoneNo" },
|
||||
{
|
||||
title: "人员类别",
|
||||
dataIndex: "todo3",
|
||||
render: (_, record) => getLabelName({ list: CATEGORY_ENUM, status: record.todo3 }),
|
||||
title: "门禁名称",
|
||||
dataIndex: "doorName",
|
||||
},
|
||||
{ title: "口门名称", dataIndex: "todo4" },
|
||||
{ title: "记录时间", dataIndex: "todo5" },
|
||||
{ title: "出入动作", dataIndex: "todo6" },
|
||||
{
|
||||
title: "门禁点所属区域编码",
|
||||
dataIndex: "doorRegionIndexCode",
|
||||
},
|
||||
{ title: "进出方向", dataIndex: "enterOrExit",render:(_, record) => (
|
||||
record.enterOrExit === 1 ?"进":record.enterOrExit === 2 ?"出":""
|
||||
) },
|
||||
{
|
||||
title: "卡号",
|
||||
dataIndex: "cardNo",
|
||||
},
|
||||
{ title: "通行时间", dataIndex: "eventTime" },
|
||||
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -21,17 +21,17 @@ function VehicleEntryAndExitRecords(props) {
|
|||
|
||||
const { tableProps, getData } = useTable(props["enclosedPersonnelAndVehicleStatisticsVehicleEntryAndExitRecordsList"], {
|
||||
form,
|
||||
params: { id: query.id },
|
||||
params: { closedAreaId: query.closedAreaId },
|
||||
transform: values => ({
|
||||
startVehicleArrivalTime: values.time?.[0] ? `${values.vehicleArrivalTime?.[0]} 00:00:00` : undefined,
|
||||
endVehicleArrivalTime: values.time?.[1] ? `${values.vehicleArrivalTime?.[1]} 23:59:59` : undefined,
|
||||
startVehicleDepartureTime: values.time?.[0] ? `${values.vehicleDepartureTime?.[0]} 00:00:00` : undefined,
|
||||
endVehicleDepartureTime: values.time?.[1] ? `${values.vehicleDepartureTime?.[1]} 23:59:59` : undefined,
|
||||
arrivalStartTime: values.vehicleArrivalTime?.[0] ? `${values.vehicleArrivalTime?.[0]} 00:00:00` : undefined,
|
||||
arrivalEndTime: values.vehicleArrivalTime?.[1] ? `${values.vehicleArrivalTime?.[1]} 23:59:59` : undefined,
|
||||
departureStartTime: values.vehicleDepartureTime?.[0] ? `${values.vehicleDepartureTime?.[0]} 00:00:00` : undefined,
|
||||
departureEndTime: values.vehicleDepartureTime?.[1] ? `${values.vehicleDepartureTime?.[1]} 23:59:59` : undefined,
|
||||
}),
|
||||
});
|
||||
|
||||
return (
|
||||
<Page headerTitle="车辆进出记录1">
|
||||
<Page headerTitle="车辆进出记录">
|
||||
<Search
|
||||
options={[
|
||||
{ name: "vehiclePlateNumber", label: "车牌号" },
|
||||
|
|
@ -43,16 +43,18 @@ function VehicleEntryAndExitRecords(props) {
|
|||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
options={false}
|
||||
columns={[
|
||||
{ title: "车辆类型", dataIndex: "carTypeName" },
|
||||
{ title: "进场车牌号", dataIndex: "carNum" },
|
||||
{ title: "出场车牌号", dataIndex: "exitCarNum" },
|
||||
{ title: "停车场名称", dataIndex: "parkingLotName" },
|
||||
{ title: "进场通道名称", dataIndex: "enterSluiceChannelName" },
|
||||
{ title: "进场通道名称", dataIndex: "exitSluiceChannelName" },
|
||||
{ title: "进场时间", dataIndex: "enterTime" },
|
||||
{ title: "出场时间", dataIndex: "exitTime" },
|
||||
{ title: "出入动作", dataIndex: "todo8" },
|
||||
{ title: "车牌号", dataIndex: "plateNo" },
|
||||
{ title: "车辆类型", dataIndex: "carTypeName" },
|
||||
{ title: "通道名称", dataIndex: "laneName" },
|
||||
{ title: "停车场名称", dataIndex: "parkName" },
|
||||
{ title: "出入口名称", dataIndex: "entranceName" },
|
||||
{ title: "进出方向", dataIndex: "enterOrExit",render:(_, record) => (
|
||||
record.enterOrExit === 1 ?"进":record.enterOrExit === 2 ?"出":""
|
||||
) },
|
||||
{ title: "通行时间", dataIndex: "eventTime" },
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ function List(props) {
|
|||
type="link"
|
||||
onClick={() => {
|
||||
// TODO
|
||||
props.history.push(`./personnelRecords?userCard=${record.id}`);
|
||||
props.history.push(`./personnelRecords?userCard=${record.userId}`);
|
||||
}}
|
||||
>
|
||||
人员进出记录
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
|
|
@ -10,6 +10,7 @@ import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
|||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||
import { ID_NUMBER, PHONE } from "zy-react-library/regular";
|
||||
import { getLabelName, validatorEndTime, validatorTimeGECurrentDay } from "zy-react-library/utils";
|
||||
import NeedToKnowModal from "~/components/NeedToKnowModal";
|
||||
import { NS_APPROVER_USER, NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_PERSONNEL } from "~/enumerate/namespace";
|
||||
|
||||
|
||||
|
|
@ -21,6 +22,9 @@ function Add(props) {
|
|||
|
||||
const [approvalUserListAll, setApprovalUserListAll] = useState([]);
|
||||
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
|
||||
const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false);
|
||||
|
||||
const signatureUrl = useRef("");
|
||||
|
||||
const getApprovalUserListAll = async () => {
|
||||
const { data } = await props["approvalUserListAll"]();
|
||||
|
|
@ -42,6 +46,15 @@ function Add(props) {
|
|||
}, [gateLevelAuthArea]);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
if (!values.informSignFile) {
|
||||
message.warning("请在《安全协议》中签字");
|
||||
return;
|
||||
}
|
||||
const { id: informSignId } = await uploadFile({
|
||||
files: [{ originFileObj: values.informSignFile }],
|
||||
single: false,
|
||||
params: { foreignKey: "", type: UPLOAD_FILE_TYPE_ENUM[611] },
|
||||
});
|
||||
const { filePath: userFaceUrl } = await uploadFile({
|
||||
files: values.userFace,
|
||||
params: { type: UPLOAD_FILE_TYPE_ENUM[608] },
|
||||
|
|
@ -50,6 +63,7 @@ function Add(props) {
|
|||
const { success } = await props["temporaryPersonnelAdd"]({
|
||||
...values,
|
||||
personBelongType: 4,
|
||||
informSignId,
|
||||
personApplyList: [
|
||||
{ userFaceUrl,
|
||||
employeePersonUserName: values.employeePersonUserName ,
|
||||
|
|
@ -172,7 +186,7 @@ function Add(props) {
|
|||
label: " ",
|
||||
span: 24,
|
||||
required: false,
|
||||
rules: [{ required: true, message: "请勾选" }],
|
||||
rules: [{ required: true, message: "请勾选《安全协议》" }],
|
||||
formItemProps: {
|
||||
colon: false,
|
||||
required: false,
|
||||
|
|
@ -186,13 +200,38 @@ function Add(props) {
|
|||
name: (
|
||||
<>
|
||||
我已阅读并同意
|
||||
<Button type="link" style={{ padding: 0 }}>《安全协议》</Button>
|
||||
<Button
|
||||
type="link"
|
||||
style={{ padding: 0 }}
|
||||
onClick={() => {
|
||||
setNeedToKnowModalVisible(true);
|
||||
}}
|
||||
>
|
||||
《安全协议》
|
||||
</Button>
|
||||
</>
|
||||
),
|
||||
}],
|
||||
},
|
||||
{ name: "informSignFile", label: "签字", onlyForLabel: true },
|
||||
]}
|
||||
/>
|
||||
{
|
||||
needToKnowModalVisible && (
|
||||
<NeedToKnowModal
|
||||
title="安全协议"
|
||||
signatureUrl={signatureUrl.current}
|
||||
onCancel={() => {
|
||||
setNeedToKnowModalVisible(false);
|
||||
}}
|
||||
onOk={(values) => {
|
||||
form.setFieldValue("informSignFile", values.file);
|
||||
signatureUrl.current = values.base64;
|
||||
setNeedToKnowModalVisible(false);
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
|
|
@ -10,6 +10,7 @@ import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
|||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||
import { ID_NUMBER, LICENSE_PLATE_NUMBER, PHONE } from "zy-react-library/regular";
|
||||
import { getLabelName, validatorEndTime, validatorTimeGECurrentDay } from "zy-react-library/utils";
|
||||
import NeedToKnowModal from "~/components/NeedToKnowModal";
|
||||
import {
|
||||
NS_APPROVER_USER,
|
||||
NS_FIRST_LEVEL_DOOR_INFO,
|
||||
|
|
@ -26,6 +27,9 @@ function Add(props) {
|
|||
|
||||
const [approvalUserListAll, setApprovalUserListAll] = useState([]);
|
||||
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
|
||||
const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false);
|
||||
|
||||
const signatureUrl = useRef("");
|
||||
|
||||
const getApprovalUserListAll = async () => {
|
||||
const { data } = await props["approvalUserListAll"]();
|
||||
|
|
@ -47,10 +51,19 @@ function Add(props) {
|
|||
}, [gateLevelAuthArea]);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
if (!values.informSignFile) {
|
||||
message.warning("请在《安全协议》中签字");
|
||||
return;
|
||||
}
|
||||
if (values.drivingLicenseFile.length !== 2) {
|
||||
message.error("请上传两张驾驶证");
|
||||
return;
|
||||
}
|
||||
const { id: informSignId } = await uploadFile({
|
||||
files: [{ originFileObj: values.informSignFile }],
|
||||
single: false,
|
||||
params: { foreignKey: "", type: UPLOAD_FILE_TYPE_ENUM[606] },
|
||||
});
|
||||
const { id: drivingLicenseId } = await uploadFile({
|
||||
single: false,
|
||||
files: values.drivingLicenseFile,
|
||||
|
|
@ -66,6 +79,7 @@ function Add(props) {
|
|||
...values,
|
||||
drivingLicenseId,
|
||||
attachmentId,
|
||||
informSignId,
|
||||
lsUserIdcard: btoa(values.lsUserIdcard),
|
||||
gateLevelAuthArea: JSON.stringify({ area: values.area }),
|
||||
vehicleBelongType:6
|
||||
|
|
@ -252,7 +266,7 @@ function Add(props) {
|
|||
label: " ",
|
||||
span: 24,
|
||||
required: false,
|
||||
rules: [{ required: true, message: "请勾选" }],
|
||||
rules: [{ required: true, message: "请勾选《安全协议》" }],
|
||||
formItemProps: { colon: false, required: false, style: { textAlign: "center" } },
|
||||
render: FORM_ITEM_RENDER_ENUM.CHECKBOX,
|
||||
items: [{
|
||||
|
|
@ -260,13 +274,38 @@ function Add(props) {
|
|||
name: (
|
||||
<>
|
||||
我已阅读并同意
|
||||
<Button type="link" style={{ padding: 0 }}>《安全协议》</Button>
|
||||
<Button
|
||||
type="link"
|
||||
style={{ padding: 0 }}
|
||||
onClick={() => {
|
||||
setNeedToKnowModalVisible(true);
|
||||
}}
|
||||
>
|
||||
《安全协议》
|
||||
</Button>
|
||||
</>
|
||||
),
|
||||
}],
|
||||
},
|
||||
{ name: "informSignFile", label: "签字", onlyForLabel: true },
|
||||
]}
|
||||
/>
|
||||
{
|
||||
needToKnowModalVisible && (
|
||||
<NeedToKnowModal
|
||||
title="安全协议"
|
||||
signatureUrl={signatureUrl.current}
|
||||
onCancel={() => {
|
||||
setNeedToKnowModalVisible(false);
|
||||
}}
|
||||
onOk={(values) => {
|
||||
form.setFieldValue("informSignFile", values.file);
|
||||
signatureUrl.current = values.base64;
|
||||
setNeedToKnowModalVisible(false);
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue