修改bug

master
853931625@qq.com 2026-06-15 15:48:10 +08:00
parent 7eff09c05c
commit 3624f41ed8
27 changed files with 106 additions and 33 deletions

View File

@ -6,7 +6,7 @@ export const firefightingEquipmentList = declareRequest(
); );
export const firefightingEquipmentListAll = declareRequest( export const firefightingEquipmentListAll = declareRequest(
"firefightingEquipmentLoading", "firefightingEquipmentLoading",
"Get > /emergencyRescue", "Post > @/fireCheck/fireDevice/mainList",
); );
export const fireAreaListAll = declareRequest( export const fireAreaListAll = declareRequest(
"firefightingEquipmentLoading", "firefightingEquipmentLoading",

View File

@ -14,7 +14,7 @@ function View(props) {
if (!props.id && !query.id) if (!props.id && !query.id)
return; return;
const { data } = await props["expertEmergencyRescueTeamInfo"]({ id: query.id || query.id }); const { data } = await props["expertEmergencyRescueTeamInfo"]({ id: props.id || query.id });
setInfo(data || {}); setInfo(data || {});
}; };

View File

@ -11,6 +11,7 @@ import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
import { ID_NUMBER, PHONE } from "zy-react-library/regular"; import { ID_NUMBER, PHONE } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils"; import { getLabelName } from "zy-react-library/utils";
import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION, NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace"; import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION, NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
import { UseDecodeIdCard } from "~/utils";
function Add(props) { function Add(props) {
const query = useGetUrlQuery(); const query = useGetUrlQuery();
@ -40,6 +41,11 @@ function Add(props) {
getEnterpriseEmergencyOrganizationList(); getEnterpriseEmergencyOrganizationList();
(async () => { (async () => {
const userInfo = await getUserInfo(); const userInfo = await getUserInfo();
if (!query.id) {
form.setFieldValue("userId", userInfo.id);
form.setFieldValue("idCardNo", UseDecodeIdCard(userInfo.userIdCard));
form.setFieldValue("contactPhone", userInfo.phone);
}
setUserInfo(userInfo); setUserInfo(userInfo);
const genderDictionary = await getDictionary({ dictValue: "sys_sex_enum" }); const genderDictionary = await getDictionary({ dictValue: "sys_sex_enum" });
setGenderDictionary(genderDictionary); setGenderDictionary(genderDictionary);
@ -47,6 +53,7 @@ function Add(props) {
}, []); }, []);
const onSubmit = async (values) => { const onSubmit = async (values) => {
values.idCardNo = btoa(values.idCardNo);
const { success } = await props[query.id ? "enterpriseEmergencyPersonnelUpdate" : "enterpriseEmergencyPersonnelAdd"]({ const { success } = await props[query.id ? "enterpriseEmergencyPersonnelUpdate" : "enterpriseEmergencyPersonnelAdd"]({
...values, ...values,
id: query.id, id: query.id,
@ -60,6 +67,7 @@ function Add(props) {
return ( return (
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}> <Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
<FormBuilder <FormBuilder
loading={props.enterpriseEmergencyPersonnel.enterpriseEmergencyPersonnelLoading} loading={props.enterpriseEmergencyPersonnel.enterpriseEmergencyPersonnelLoading}
options={[ options={[
{ {
@ -90,8 +98,11 @@ function Add(props) {
params={{ corpinfoId: userInfo.corpinfoId }} params={{ corpinfoId: userInfo.corpinfoId }}
onGetOption={(option) => { onGetOption={(option) => {
const genderItem = genderDictionary.find(item => item.dictLabel === option.sex); const genderItem = genderDictionary.find(item => item.dictLabel === option.sex);
console.log(option);
form.setFieldValue("genderName", genderItem?.dictLabel || "未知"); form.setFieldValue("genderName", genderItem?.dictLabel || "未知");
form.setFieldValue("gender", genderItem?.dictValue || "UNKNOWN"); form.setFieldValue("gender", genderItem?.dictValue || "UNKNOWN");
form.setFieldValue("idCardNo", UseDecodeIdCard(option?.userIdCard));
form.setFieldValue("contactPhone", option?.phone);
}} }}
onGetLabel={(label) => { onGetLabel={(label) => {
form.setFieldValue("userName", label); form.setFieldValue("userName", label);

View File

@ -10,6 +10,7 @@ import Table from "zy-react-library/components/Table";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable"; import useTable from "zy-react-library/hooks/useTable";
import { NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace"; import { NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
import { UseDecodeIdCard } from "~/utils";
function List(props) { function List(props) {
const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [selectedRowKeys, setSelectedRowKeys] = useState([]);
@ -103,7 +104,7 @@ function List(props) {
{ title: "性别", dataIndex: "genderName" }, { title: "性别", dataIndex: "genderName" },
{ title: "行政职务", dataIndex: "administrativePosition" }, { title: "行政职务", dataIndex: "administrativePosition" },
{ title: "行政级别", dataIndex: "administrativeLevel" }, { title: "行政级别", dataIndex: "administrativeLevel" },
{ title: "身份证号", dataIndex: "idCardNo" }, { title: "身份证号", dataIndex: "idCardNo", render: (_, record) => (UseDecodeIdCard(record?.idCardNo)) },
{ title: "联系电话", dataIndex: "contactPhone" }, { title: "联系电话", dataIndex: "contactPhone" },
{ {
title: "操作", title: "操作",

View File

@ -88,7 +88,7 @@ const MarkModal = (props) => {
const info = props.info || {}; const info = props.info || {};
const id = info.id; const id = info.id;
const type = props.type; const type = props.type;
console.log(info);
return ( return (
<Modal <Modal
title={props.title} title={props.title}

View File

@ -49,6 +49,7 @@ export const useCesiumMap = (mackClickEvent) => {
mapInstanceRef.current.cesiumWidget.screenSpaceEventHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK); mapInstanceRef.current.cesiumWidget.screenSpaceEventHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
mapInstanceRef.current.cesiumWidget.screenSpaceEventHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_CLICK); mapInstanceRef.current.cesiumWidget.screenSpaceEventHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_CLICK);
const screenSpaceEventHandler = new window.Cesium.ScreenSpaceEventHandler(mapInstanceRef.current.scene.canvas); const screenSpaceEventHandler = new window.Cesium.ScreenSpaceEventHandler(mapInstanceRef.current.scene.canvas);
console.log(screenSpaceEventHandler);
screenSpaceEventHandler.setInputAction((movement) => { screenSpaceEventHandler.setInputAction((movement) => {
const pick = mapInstanceRef.current.scene.pick(movement.position); const pick = mapInstanceRef.current.scene.pick(movement.position);
if (window.Cesium.defined(pick) && pick.id?.id && pick.id?.monitorItems) { if (window.Cesium.defined(pick) && pick.id?.id && pick.id?.monitorItems) {

View File

@ -169,6 +169,7 @@ function MarkOptions(props) {
return; return;
} }
const { data } = await item.action(); const { data } = await item.action();
props.addMarkPoint(data, { props.addMarkPoint(data, {
mapType: item.type, mapType: item.type,
mapIcon: item.icon, mapIcon: item.icon,
@ -179,6 +180,7 @@ function MarkOptions(props) {
}; };
const onClickLast = async (parentIndex, item, index) => { const onClickLast = async (parentIndex, item, index) => {
console.log(parentIndex, item,index);
setList(produce((draft) => { setList(produce((draft) => {
draft[parentIndex].children[index].checked = !draft[parentIndex].children[index].checked; draft[parentIndex].children[index].checked = !draft[parentIndex].children[index].checked;
})); }));
@ -188,6 +190,7 @@ function MarkOptions(props) {
return; return;
} }
const { data } = await item.action(); const { data } = await item.action();
console.log(data);
props.addMarkPoint(data, { props.addMarkPoint(data, {
mapType: item.type, mapType: item.type,
mapIcon: item.icon, mapIcon: item.icon,

View File

@ -179,7 +179,7 @@ const SendCommandModalComponent = (props) => {
const { success } = await props["rescueCommandSendCommand"]({ const { success } = await props["rescueCommandSendCommand"]({
...values, ...values,
rescueId: props.id, rescueId: props.id,
userId: props.info.id, userId: props.info.userId,
}); });
if (success) { if (success) {
message.success("发送成功"); message.success("发送成功");

View File

@ -63,7 +63,7 @@ function Add(props) {
required: false, required: false,
rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }], rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }],
}, },
{ key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) }, { key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" required={false} />) },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -19,7 +19,7 @@ function List(props) {
const { tableProps, getData } = useTable(props["facilitiesEquipmentList"], { const { tableProps, getData } = useTable(props["facilitiesEquipmentList"], {
form, form,
params: { likeWarehouseId: query.id }, params: { likeWarehouseId: query.id, corpId: query.corpinfoId },
}); });
const onDelete = (record) => { const onDelete = (record) => {

View File

@ -117,7 +117,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./facilitiesEquipment/list?id=${record.id}`); props.history.push(`./facilitiesEquipment/list?id=${record.id}&corpinfoId=${query.corpinfoId}`);
}} }}
> >
查看设施设备 查看设施设备
@ -127,7 +127,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./rescueEquipment/list?id=${record.id}`); props.history.push(`./rescueEquipment/list?id=${record.id}&corpinfoId=${query.corpinfoId}`);
}} }}
> >
查看救援装备 查看救援装备
@ -137,7 +137,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./material/list?id=${record.id}`); props.history.push(`./material/list?id=${record.id}&corpinfoId=${query.corpinfoId}`);
}} }}
> >
查看物资 查看物资

View File

@ -19,7 +19,7 @@ function List(props) {
const { tableProps, getData } = useTable(props["materialList"], { const { tableProps, getData } = useTable(props["materialList"], {
form, form,
params: { likeWarehouseId: query.id }, params: { likeWarehouseId: query.id, corpId: query.corpinfoId },
}); });
const onDelete = (record) => { const onDelete = (record) => {

View File

@ -19,7 +19,7 @@ function List(props) {
const { tableProps, getData } = useTable(props["rescueEquipmentList"], { const { tableProps, getData } = useTable(props["rescueEquipmentList"], {
form, form,
params: { likeWarehouseId: query.id }, params: { likeWarehouseId: query.id, corpId: query.corpinfoId },
}); });
const onDelete = (record) => { const onDelete = (record) => {

View File

@ -119,7 +119,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./view?id=${record.id}`); props.history.push(`./view?id=${record.id}&corpId=${query.corpinfoId}`);
}} }}
> >
查看 查看

View File

@ -19,7 +19,7 @@ function View(props) {
const [basicInfo, setBasicInfo] = useState({}); const [basicInfo, setBasicInfo] = useState({});
const { tableProps: organizationTableProps } = useTable(props["emergencyExerciseOrganizationList"], { const { tableProps: organizationTableProps } = useTable(props["emergencyExerciseOrganizationList"], {
params: { likeDrillId: query.id }, params: { likeDrillId: query.id, corpId: query.corpId },
useStorageQueryCriteria: false, useStorageQueryCriteria: false,
}); });
const { tableProps: organizationPersonnelTableProps } = useTable(props["emergencyExerciseOrganizationPersonnelList"], { const { tableProps: organizationPersonnelTableProps } = useTable(props["emergencyExerciseOrganizationPersonnelList"], {
@ -27,7 +27,7 @@ function View(props) {
useStorageQueryCriteria: false, useStorageQueryCriteria: false,
}); });
const { tableProps: contentTableProps } = useTable(props["emergencyExerciseContentList"], { const { tableProps: contentTableProps } = useTable(props["emergencyExerciseContentList"], {
params: { likeDrillId: query.id }, params: { likeDrillId: query.id, corpId: query.corpId },
useStorageQueryCriteria: false, useStorageQueryCriteria: false,
}); });
const { tableProps: scenarioTableProps } = useTable(props["emergencyExerciseScenarioList"], { const { tableProps: scenarioTableProps } = useTable(props["emergencyExerciseScenarioList"], {

View File

@ -13,7 +13,7 @@ function GradeResponse(props) {
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const { tableProps, getData } = useTable(props["enterprisePlanLevelResponseList"], { const { tableProps, getData } = useTable(props["enterprisePlanLevelResponseList"], {
params: { likePlanId: props.planId }, params: { likePlanId: props.planId, corpId: props.corpId },
useStorageQueryCriteria: false, useStorageQueryCriteria: false,
}); });

View File

@ -37,7 +37,7 @@ function OrganizationStructure(props) {
const { getUserInfo } = useGetUserInfo(); const { getUserInfo } = useGetUserInfo();
const { tableProps, getData } = useTable(props["enterprisePlanOrganizationPersonnelList"], { const { tableProps, getData } = useTable(props["enterprisePlanOrganizationPersonnelList"], {
params: { planId: props.planId, organizationId: currentOrganization.id }, params: { planId: props.planId, organizationId: currentOrganization.id, corpId: props.corpId },
useStorageQueryCriteria: false, useStorageQueryCriteria: false,
manual: true, manual: true,
}); });

View File

@ -23,7 +23,7 @@ function PlanAttachments(props) {
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const { tableProps, getData } = useTable(props["enterprisePlanAttachmentList"], { const { tableProps, getData } = useTable(props["enterprisePlanAttachmentList"], {
params: { likePlanId: props.planId }, params: { likePlanId: props.planId, corpId: props.corpId },
useStorageQueryCriteria: false, useStorageQueryCriteria: false,
}); });

View File

@ -19,7 +19,7 @@ function PlanInstructions(props) {
const isEditCommandIdRef = useRef(""); const isEditCommandIdRef = useRef("");
const { tableProps, getData } = useTable(props["enterprisePlanCommandSettingList"], { const { tableProps, getData } = useTable(props["enterprisePlanCommandSettingList"], {
params: { likePlanId: props.planId }, params: { likePlanId: props.planId, corpId: props.corpId },
useStorageQueryCriteria: false, useStorageQueryCriteria: false,
}); });

View File

@ -17,7 +17,7 @@ function GradeResponse(props) {
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const { tableProps, getData } = useTable(props["enterprisePlanResourceList"], { const { tableProps, getData } = useTable(props["enterprisePlanResourceList"], {
params: { likePlanId: props.planId }, params: { likePlanId: props.planId, corpId: props.corpId },
useStorageQueryCriteria: false, useStorageQueryCriteria: false,
}); });

View File

@ -84,7 +84,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./view?id=${record.id}`); props.history.push(`./view?id=${record.id}&corpId=${query.corpinfoId}`);
}} }}
> >
查看 查看

View File

@ -47,32 +47,32 @@ function View(props) {
{ {
key: "gradeResponse", key: "gradeResponse",
label: "分级响应", label: "分级响应",
children: (<GradeResponse planId={query.id} />), children: (<GradeResponse planId={query.id} corpId={query.corpId} />),
}, },
{ {
key: "organizationStructure", key: "organizationStructure",
label: "组织结构", label: "组织结构",
children: (<OrganizationStructure planId={query.id} />), children: (<OrganizationStructure planId={query.id} corpId={query.corpId} />),
}, },
{ {
key: "planResources", key: "planResources",
label: "预案资源", label: "预案资源",
children: (<PlanResources planId={query.id} />), children: (<PlanResources planId={query.id} corpId={query.corpId} />),
}, },
{ {
key: "planInstructions", key: "planInstructions",
label: "预案指令", label: "预案指令",
children: (<PlanInstructions planId={query.id} />), children: (<PlanInstructions planId={query.id} corpId={query.corpId} />),
}, },
{ {
key: "planText", key: "planText",
label: "预案文案", label: "预案文案",
children: (<PlanText info={basicInfo} />), children: (<PlanText info={basicInfo} corpId={query.corpId} />),
}, },
{ {
key: "planAttachments", key: "planAttachments",
label: "预案附件", label: "预案附件",
children: (<PlanAttachments planId={query.id} />), children: (<PlanAttachments planId={query.id} corpId={query.corpId} />),
}, },
]} ]}
/> />

View File

@ -1,4 +1,4 @@
import ViewPage from "~/pages/Container/Enterprise/EmergencyOrganization/EmergencyExpertTeam/ExpertEmergencyRescueExpert/View"; import ViewPage from "~/pages/Container/Enterprise/EmergencyOrganization/ProfessionalGuaranteeOrganization/TransportGuaranteeOrganization/View";
function View(props) { function View(props) {
return (<ViewPage {...props} />); return (<ViewPage {...props} />);

View File

@ -1,7 +1,47 @@
import ListPage from "~/pages/Container/Enterprise/EmergencyRescue/Duty/DutyLog/List"; import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import Page from "zy-react-library/components/Page";
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 { NS_DUTY_LOG } from "~/enumerate/namespace";
function List(props) { function List(props) {
return (<ListPage isRecord headerTitle="值班日志" {...props} />); const [form] = Search.useForm();
const query = useGetUrlQuery();
const { tableProps, getData } = useTable(props["dutyLogList"], {
form,
params: { corpId: query.corpinfoId },
});
return (
<Page headerTitle="值班日志列表">
<Search
options={[
{ name: "likeUnitName", label: "单位名称" },
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "单位名称", dataIndex: "unitName" },
{ title: "开始时间", dataIndex: "startTime" },
{ title: "结束时间", dataIndex: "endTime" },
{ title: "值班人员", dataIndex: "dutyPersonnelName" },
{ title: "接班人员", dataIndex: "reliefPersonnelName" },
{ title: "值班记录", dataIndex: "dutyRecord" },
{ title: "处理情况", dataIndex: "handlingSituation" },
{ title: "交接事宜", dataIndex: "handoverMatters" },
]}
{...tableProps}
/>
</Page>
);
} }
export default List; export default Connect([NS_DUTY_LOG], true)(Permission(List));

View File

@ -1,4 +1,4 @@
import ViewPage from "~/pages/Container/Enterprise/PlanAndDrill/EmergencyExercise/View"; import ViewPage from "~/pages/Container/Enterprise/EmergencyRescue/Duty/DutyLog/View";
function View(props) { function View(props) {
return (<ViewPage {...props} />); return (<ViewPage {...props} />);

View File

@ -33,3 +33,20 @@ export function permissionButtonByStatistics({ permission, history, text, url })
: <span>{text}</span> : <span>{text}</span>
); );
} }
// 身份证解码
export const UseDecodeIdCard = (userIdCard) => {
if (!userIdCard)
return userIdCard;
try {
const decoded = atob(userIdCard);
if (/^\d{17}[\dX]$/.test(decoded)) {
return decoded;
}
}
catch {
console.warn("Not a valid Base64 string, keep as is:", userIdCard);
}
return userIdCard; // fallback
};