修改BUG

master
853931625@qq.com 2026-06-02 14:06:14 +08:00
parent 823701f97c
commit de13be436e
5 changed files with 33 additions and 24 deletions

View File

@ -2,7 +2,7 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const firefightingEquipmentList = declareRequest(
"firefightingEquipmentLoading",
"Post > @/emergencyRescue",
"Post > @/fireCheck/fireDevice/mainList",
);
export const firefightingEquipmentListAll = declareRequest(
"firefightingEquipmentLoading",

View File

@ -85,7 +85,9 @@ function Add(props) {
label: "用户",
render: (
<PersonnelSelect
params={{ departmentId: userInfo.departmentId }}
isNeedDepartmentId={false}
isNeedCorpInfoId={true}
params={{ corpinfoId: userInfo.corpinfoId }}
onGetOption={(option) => {
const genderItem = genderDictionary.find(item => item.dictLabel === option.sex);
form.setFieldValue("genderName", genderItem?.dictLabel || "未知");

View File

@ -1,5 +1,6 @@
import { useRef } from "react";
import CesiumMap from "zy-react-library/components/Map/CesiumMap";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { dynamicLoadCss, dynamicLoadJs } from "zy-react-library/utils";
import {
addMergedEntityCollection,
@ -15,7 +16,8 @@ import defaultBillboardImage from "./images/h.png";
export const useCesiumMap = (mackClickEvent) => {
const mapInstanceRef = useRef(null);
const query = useGetUrlQuery();
console.log("query", query);
const loadCesiumMap = async () => {
if (!window.Cesium) {
if (window?.base?.loadDynamicResource) {
@ -92,8 +94,8 @@ export const useCesiumMap = (mackClickEvent) => {
const { init } = new CesiumMap();
const { viewer } = init();
mapInstanceRef.current = viewer;
flyTo({ longitude: window.mapLongitude, latitude: window.mapLatitude, height: 2000 });
addMarkPoint([{ longitude: window.mapLongitude, latitude: window.mapLatitude }], { mapType: "default", modalTitle: "事件" });
flyTo({ longitude: query.longitude || window.mapLongitude, latitude: query.latitude || window.mapLatitude, height: 2000 });
addMarkPoint([{ longitude: query.longitude || window.mapLongitude, latitude: query.latitude || window.mapLatitude }], { mapType: "default", modalTitle: "事件" });
registerClickEvent();
return viewer;
};
@ -125,7 +127,7 @@ export const useCesiumMap = (mackClickEvent) => {
},
});
flyTo({ longitude: window.mapLongitude, latitude: window.mapLatitude, height: radius * 3 });
flyTo({ longitude: query.longitude || window.mapLongitude, latitude: query.latitude || window.mapLatitude, height: radius * 3 });
};
return {

View File

@ -76,6 +76,8 @@ function List(props) {
eventType: record.eventType || "",
occurrenceTime: record.occurrenceTime || "",
locationAddress: record.locationAddress || "",
latitude: record.latitude || "",
longitude: record.longitude || "",
});
props.history.push(`./command?${params.toString()}`);
}

View File

@ -5,6 +5,7 @@ import Search from "zy-react-library/components/Search";
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { NS_FIREFIGHTING_EQUIPMENT } from "~/enumerate/namespace";
@ -12,13 +13,15 @@ function List(props) {
const [form] = Search.useForm();
const [fireArea, setFireArea] = useState([]);
const query = useGetUrlQuery();
const { tableProps, getData } = useTable(props["firefightingEquipmentList"], {
form,
params: { corpinfoId: query.corpinfoId },
});
console.log(query);
const getFireArea = async () => {
const { data } = await props["fireAreaListAll"]();
const { data } = await props["fireAreaListAll"]({ corpinfoId: query.corpinfoId });
setFireArea(data);
};
@ -30,36 +33,36 @@ function List(props) {
<Page isShowAllAction={props.headerTitle || false} headerTitle={props.headerTitle}>
<Search
options={[
{ name: "todo", label: "消防器材类型", render: (<DictionarySelect dictValue="fire_device_type" />) },
{ name: "fireDeviceType", label: "消防器材类型", render: (<DictionarySelect dictValue="fire_device_type" />) },
{
name: "todo",
name: "fireRegionId",
label: "消防区域",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: fireArea,
itemsField: {
labelKey: "fireRegionName",
valueKey: "id",
valueKey: "fireRegionId",
},
},
{ name: "todo", label: "消防点位" },
{ name: "todo", label: "器材编号" },
{ name: "firePointName", label: "消防点位" },
{ name: "fireDeviceCode", label: "器材编号" },
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "器材类型", dataIndex: "todo" },
{ title: "器材编号", dataIndex: "todo" },
{ title: "消防区域名称", dataIndex: "todo" },
{ title: "消防点位名称", dataIndex: "todo" },
{ title: "消防区域编码", dataIndex: "todo" },
{ title: "消防点位编码", dataIndex: "todo" },
{ title: "有效期开始时间", dataIndex: "todo" },
{ title: "有效期结束时间", dataIndex: "todo" },
{ title: "存放地点", dataIndex: "todo" },
{ title: "负责部门", dataIndex: "todo" },
{ title: "负责人", dataIndex: "todo" },
{ title: "器材类型", dataIndex: "fireDeviceTypeName" },
{ title: "器材编号", dataIndex: "fireDeviceCode" },
{ title: "消防区域名称", dataIndex: "fireRegionName" },
{ title: "消防点位名称", dataIndex: "firePointName" },
{ title: "消防区域编码", dataIndex: "fireRegionCode" },
{ title: "消防点位编码", dataIndex: "firePointCode" },
{ title: "有效期开始时间", dataIndex: "validityStartTime" },
{ title: "有效期结束时间", dataIndex: "validityEndTime" },
{ title: "存放地点", dataIndex: "storageLocation" },
{ title: "负责部门", dataIndex: "departmentName" },
{ title: "负责人", dataIndex: "userName" },
]}
{...tableProps}
/>