修改BUG
parent
823701f97c
commit
de13be436e
|
|
@ -2,7 +2,7 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
export const firefightingEquipmentList = declareRequest(
|
export const firefightingEquipmentList = declareRequest(
|
||||||
"firefightingEquipmentLoading",
|
"firefightingEquipmentLoading",
|
||||||
"Post > @/emergencyRescue",
|
"Post > @/fireCheck/fireDevice/mainList",
|
||||||
);
|
);
|
||||||
export const firefightingEquipmentListAll = declareRequest(
|
export const firefightingEquipmentListAll = declareRequest(
|
||||||
"firefightingEquipmentLoading",
|
"firefightingEquipmentLoading",
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,9 @@ function Add(props) {
|
||||||
label: "用户",
|
label: "用户",
|
||||||
render: (
|
render: (
|
||||||
<PersonnelSelect
|
<PersonnelSelect
|
||||||
params={{ departmentId: userInfo.departmentId }}
|
isNeedDepartmentId={false}
|
||||||
|
isNeedCorpInfoId={true}
|
||||||
|
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);
|
||||||
form.setFieldValue("genderName", genderItem?.dictLabel || "未知");
|
form.setFieldValue("genderName", genderItem?.dictLabel || "未知");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { useRef } from "react";
|
import { useRef } from "react";
|
||||||
import CesiumMap from "zy-react-library/components/Map/CesiumMap";
|
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 { dynamicLoadCss, dynamicLoadJs } from "zy-react-library/utils";
|
||||||
import {
|
import {
|
||||||
addMergedEntityCollection,
|
addMergedEntityCollection,
|
||||||
|
|
@ -15,7 +16,8 @@ import defaultBillboardImage from "./images/h.png";
|
||||||
|
|
||||||
export const useCesiumMap = (mackClickEvent) => {
|
export const useCesiumMap = (mackClickEvent) => {
|
||||||
const mapInstanceRef = useRef(null);
|
const mapInstanceRef = useRef(null);
|
||||||
|
const query = useGetUrlQuery();
|
||||||
|
console.log("query", query);
|
||||||
const loadCesiumMap = async () => {
|
const loadCesiumMap = async () => {
|
||||||
if (!window.Cesium) {
|
if (!window.Cesium) {
|
||||||
if (window?.base?.loadDynamicResource) {
|
if (window?.base?.loadDynamicResource) {
|
||||||
|
|
@ -92,8 +94,8 @@ export const useCesiumMap = (mackClickEvent) => {
|
||||||
const { init } = new CesiumMap();
|
const { init } = new CesiumMap();
|
||||||
const { viewer } = init();
|
const { viewer } = init();
|
||||||
mapInstanceRef.current = viewer;
|
mapInstanceRef.current = viewer;
|
||||||
flyTo({ longitude: window.mapLongitude, latitude: window.mapLatitude, height: 2000 });
|
flyTo({ longitude: query.longitude || window.mapLongitude, latitude: query.latitude || window.mapLatitude, height: 2000 });
|
||||||
addMarkPoint([{ longitude: window.mapLongitude, latitude: window.mapLatitude }], { mapType: "default", modalTitle: "事件" });
|
addMarkPoint([{ longitude: query.longitude || window.mapLongitude, latitude: query.latitude || window.mapLatitude }], { mapType: "default", modalTitle: "事件" });
|
||||||
registerClickEvent();
|
registerClickEvent();
|
||||||
return viewer;
|
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 {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,8 @@ function List(props) {
|
||||||
eventType: record.eventType || "",
|
eventType: record.eventType || "",
|
||||||
occurrenceTime: record.occurrenceTime || "",
|
occurrenceTime: record.occurrenceTime || "",
|
||||||
locationAddress: record.locationAddress || "",
|
locationAddress: record.locationAddress || "",
|
||||||
|
latitude: record.latitude || "",
|
||||||
|
longitude: record.longitude || "",
|
||||||
});
|
});
|
||||||
props.history.push(`./command?${params.toString()}`);
|
props.history.push(`./command?${params.toString()}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import Search from "zy-react-library/components/Search";
|
||||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
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 useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_FIREFIGHTING_EQUIPMENT } from "~/enumerate/namespace";
|
import { NS_FIREFIGHTING_EQUIPMENT } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
@ -12,13 +13,15 @@ function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
||||||
const [fireArea, setFireArea] = useState([]);
|
const [fireArea, setFireArea] = useState([]);
|
||||||
|
const query = useGetUrlQuery();
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["firefightingEquipmentList"], {
|
const { tableProps, getData } = useTable(props["firefightingEquipmentList"], {
|
||||||
form,
|
form,
|
||||||
|
params: { corpinfoId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
console.log(query);
|
||||||
const getFireArea = async () => {
|
const getFireArea = async () => {
|
||||||
const { data } = await props["fireAreaListAll"]();
|
const { data } = await props["fireAreaListAll"]({ corpinfoId: query.corpinfoId });
|
||||||
setFireArea(data);
|
setFireArea(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -30,36 +33,36 @@ function List(props) {
|
||||||
<Page isShowAllAction={props.headerTitle || false} headerTitle={props.headerTitle}>
|
<Page isShowAllAction={props.headerTitle || false} headerTitle={props.headerTitle}>
|
||||||
<Search
|
<Search
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo", label: "消防器材类型", render: (<DictionarySelect dictValue="fire_device_type" />) },
|
{ name: "fireDeviceType", label: "消防器材类型", render: (<DictionarySelect dictValue="fire_device_type" />) },
|
||||||
{
|
{
|
||||||
name: "todo",
|
name: "fireRegionId",
|
||||||
label: "消防区域",
|
label: "消防区域",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: fireArea,
|
items: fireArea,
|
||||||
itemsField: {
|
itemsField: {
|
||||||
labelKey: "fireRegionName",
|
labelKey: "fireRegionName",
|
||||||
valueKey: "id",
|
valueKey: "fireRegionId",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ name: "todo", label: "消防点位" },
|
{ name: "firePointName", label: "消防点位" },
|
||||||
{ name: "todo", label: "器材编号" },
|
{ name: "fireDeviceCode", label: "器材编号" },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "器材类型", dataIndex: "todo" },
|
{ title: "器材类型", dataIndex: "fireDeviceTypeName" },
|
||||||
{ title: "器材编号", dataIndex: "todo" },
|
{ title: "器材编号", dataIndex: "fireDeviceCode" },
|
||||||
{ title: "消防区域名称", dataIndex: "todo" },
|
{ title: "消防区域名称", dataIndex: "fireRegionName" },
|
||||||
{ title: "消防点位名称", dataIndex: "todo" },
|
{ title: "消防点位名称", dataIndex: "firePointName" },
|
||||||
{ title: "消防区域编码", dataIndex: "todo" },
|
{ title: "消防区域编码", dataIndex: "fireRegionCode" },
|
||||||
{ title: "消防点位编码", dataIndex: "todo" },
|
{ title: "消防点位编码", dataIndex: "firePointCode" },
|
||||||
{ title: "有效期开始时间", dataIndex: "todo" },
|
{ title: "有效期开始时间", dataIndex: "validityStartTime" },
|
||||||
{ title: "有效期结束时间", dataIndex: "todo" },
|
{ title: "有效期结束时间", dataIndex: "validityEndTime" },
|
||||||
{ title: "存放地点", dataIndex: "todo" },
|
{ title: "存放地点", dataIndex: "storageLocation" },
|
||||||
{ title: "负责部门", dataIndex: "todo" },
|
{ title: "负责部门", dataIndex: "departmentName" },
|
||||||
{ title: "负责人", dataIndex: "todo" },
|
{ title: "负责人", dataIndex: "userName" },
|
||||||
]}
|
]}
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue