修改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(
"firefightingEquipmentLoading",
"Get > /emergencyRescue",
"Post > @/fireCheck/fireDevice/mainList",
);
export const fireAreaListAll = declareRequest(
"firefightingEquipmentLoading",

View File

@ -14,7 +14,7 @@ function View(props) {
if (!props.id && !query.id)
return;
const { data } = await props["expertEmergencyRescueTeamInfo"]({ id: query.id || query.id });
const { data } = await props["expertEmergencyRescueTeamInfo"]({ id: props.id || query.id });
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 { getLabelName } from "zy-react-library/utils";
import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION, NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
import { UseDecodeIdCard } from "~/utils";
function Add(props) {
const query = useGetUrlQuery();
@ -40,6 +41,11 @@ function Add(props) {
getEnterpriseEmergencyOrganizationList();
(async () => {
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);
const genderDictionary = await getDictionary({ dictValue: "sys_sex_enum" });
setGenderDictionary(genderDictionary);
@ -47,6 +53,7 @@ function Add(props) {
}, []);
const onSubmit = async (values) => {
values.idCardNo = btoa(values.idCardNo);
const { success } = await props[query.id ? "enterpriseEmergencyPersonnelUpdate" : "enterpriseEmergencyPersonnelAdd"]({
...values,
id: query.id,
@ -60,6 +67,7 @@ function Add(props) {
return (
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
<FormBuilder
loading={props.enterpriseEmergencyPersonnel.enterpriseEmergencyPersonnelLoading}
options={[
{
@ -90,8 +98,11 @@ function Add(props) {
params={{ corpinfoId: userInfo.corpinfoId }}
onGetOption={(option) => {
const genderItem = genderDictionary.find(item => item.dictLabel === option.sex);
console.log(option);
form.setFieldValue("genderName", genderItem?.dictLabel || "未知");
form.setFieldValue("gender", genderItem?.dictValue || "UNKNOWN");
form.setFieldValue("idCardNo", UseDecodeIdCard(option?.userIdCard));
form.setFieldValue("contactPhone", option?.phone);
}}
onGetLabel={(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 useTable from "zy-react-library/hooks/useTable";
import { NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
import { UseDecodeIdCard } from "~/utils";
function List(props) {
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
@ -103,7 +104,7 @@ function List(props) {
{ title: "性别", dataIndex: "genderName" },
{ title: "行政职务", dataIndex: "administrativePosition" },
{ title: "行政级别", dataIndex: "administrativeLevel" },
{ title: "身份证号", dataIndex: "idCardNo" },
{ title: "身份证号", dataIndex: "idCardNo", render: (_, record) => (UseDecodeIdCard(record?.idCardNo)) },
{ title: "联系电话", dataIndex: "contactPhone" },
{
title: "操作",

View File

@ -88,7 +88,7 @@ const MarkModal = (props) => {
const info = props.info || {};
const id = info.id;
const type = props.type;
console.log(info);
return (
<Modal
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_CLICK);
const screenSpaceEventHandler = new window.Cesium.ScreenSpaceEventHandler(mapInstanceRef.current.scene.canvas);
console.log(screenSpaceEventHandler);
screenSpaceEventHandler.setInputAction((movement) => {
const pick = mapInstanceRef.current.scene.pick(movement.position);
if (window.Cesium.defined(pick) && pick.id?.id && pick.id?.monitorItems) {

View File

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

View File

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

View File

@ -63,7 +63,7 @@ function Add(props) {
required: false,
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}
onFinish={onSubmit}

View File

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

View File

@ -117,7 +117,7 @@ function List(props) {
<Button
type="link"
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
type="link"
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
type="link"
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"], {
form,
params: { likeWarehouseId: query.id },
params: { likeWarehouseId: query.id, corpId: query.corpinfoId },
});
const onDelete = (record) => {

View File

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

View File

@ -119,7 +119,7 @@ function List(props) {
<Button
type="link"
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 { tableProps: organizationTableProps } = useTable(props["emergencyExerciseOrganizationList"], {
params: { likeDrillId: query.id },
params: { likeDrillId: query.id, corpId: query.corpId },
useStorageQueryCriteria: false,
});
const { tableProps: organizationPersonnelTableProps } = useTable(props["emergencyExerciseOrganizationPersonnelList"], {
@ -27,7 +27,7 @@ function View(props) {
useStorageQueryCriteria: false,
});
const { tableProps: contentTableProps } = useTable(props["emergencyExerciseContentList"], {
params: { likeDrillId: query.id },
params: { likeDrillId: query.id, corpId: query.corpId },
useStorageQueryCriteria: false,
});
const { tableProps: scenarioTableProps } = useTable(props["emergencyExerciseScenarioList"], {

View File

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

View File

@ -37,7 +37,7 @@ function OrganizationStructure(props) {
const { getUserInfo } = useGetUserInfo();
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,
manual: true,
});

View File

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

View File

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

View File

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

View File

@ -115,7 +115,7 @@ function Add(props) {
{
key: "gradeResponse",
label: "分级响应",
children: (<GradeResponse planId={urlState.planId} />),
children: (<GradeResponse planId={urlState.planId} />),
disabled: subordinateTabDisabled,
},
{

View File

@ -84,7 +84,7 @@ function List(props) {
<Button
type="link"
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",
label: "分级响应",
children: (<GradeResponse planId={query.id} />),
children: (<GradeResponse planId={query.id} corpId={query.corpId} />),
},
{
key: "organizationStructure",
label: "组织结构",
children: (<OrganizationStructure planId={query.id} />),
children: (<OrganizationStructure planId={query.id} corpId={query.corpId} />),
},
{
key: "planResources",
label: "预案资源",
children: (<PlanResources planId={query.id} />),
children: (<PlanResources planId={query.id} corpId={query.corpId} />),
},
{
key: "planInstructions",
label: "预案指令",
children: (<PlanInstructions planId={query.id} />),
children: (<PlanInstructions planId={query.id} corpId={query.corpId} />),
},
{
key: "planText",
label: "预案文案",
children: (<PlanText info={basicInfo} />),
children: (<PlanText info={basicInfo} corpId={query.corpId} />),
},
{
key: "planAttachments",
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) {
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) {
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) {
return (<ViewPage {...props} />);

View File

@ -33,3 +33,20 @@ export function permissionButtonByStatistics({ permission, history, text, url })
: <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
};