diff --git a/src/pages/GlobalModalServices/index.tsx b/src/pages/GlobalModalServices/index.tsx
index 99a7ce440de99ca1713588508cca346cfef2a4ea..c54f41d9d05a557b0c56dd70824b8d1b471dd6a8 100644
--- a/src/pages/GlobalModalServices/index.tsx
+++ b/src/pages/GlobalModalServices/index.tsx
@@ -15,7 +15,7 @@ import styles from './index.less';
import Registry, { ModalKey } from './registry';
import type {
GlobalModalConfig,
- GlobalModalPrideAction,
+ GlobalModalServicesModalMethods,
ModalStackType,
} from './type';
@@ -32,7 +32,7 @@ const getModalElement = (modalKey: ModalKey) => {
/** @module 全居弹窗服务 */
const GlobalModalServices: React.ForwardRefRenderFunction<
- GlobalModalPrideAction,
+ GlobalModalServicesModalMethods,
any
> = (_, ref) => {
const [modalStack, setModalStack] = useState<
diff --git a/src/pages/Common/Event/AnalysisCompletionRate/LineBarCharts/index.tsx b/src/pages/GlobalModalServices/modals/AnalysisCompletionRate/LineBarCharts/index.tsx
similarity index 100%
rename from src/pages/Common/Event/AnalysisCompletionRate/LineBarCharts/index.tsx
rename to src/pages/GlobalModalServices/modals/AnalysisCompletionRate/LineBarCharts/index.tsx
diff --git a/src/pages/Common/Event/AnalysisCompletionRate/index.less b/src/pages/GlobalModalServices/modals/AnalysisCompletionRate/index.less
similarity index 100%
rename from src/pages/Common/Event/AnalysisCompletionRate/index.less
rename to src/pages/GlobalModalServices/modals/AnalysisCompletionRate/index.less
diff --git a/src/pages/Common/Event/AnalysisCompletionRate/index.tsx b/src/pages/GlobalModalServices/modals/AnalysisCompletionRate/index.tsx
similarity index 100%
rename from src/pages/Common/Event/AnalysisCompletionRate/index.tsx
rename to src/pages/GlobalModalServices/modals/AnalysisCompletionRate/index.tsx
diff --git a/src/pages/Common/Event/CollectionEvent/LineCharts/index.tsx b/src/pages/GlobalModalServices/modals/CollectionEvent/LineCharts/index.tsx
similarity index 100%
rename from src/pages/Common/Event/CollectionEvent/LineCharts/index.tsx
rename to src/pages/GlobalModalServices/modals/CollectionEvent/LineCharts/index.tsx
diff --git a/src/pages/Common/Event/CollectionEvent/index.less b/src/pages/GlobalModalServices/modals/CollectionEvent/index.less
similarity index 100%
rename from src/pages/Common/Event/CollectionEvent/index.less
rename to src/pages/GlobalModalServices/modals/CollectionEvent/index.less
diff --git a/src/pages/Common/Event/CollectionEvent/index.tsx b/src/pages/GlobalModalServices/modals/CollectionEvent/index.tsx
similarity index 86%
rename from src/pages/Common/Event/CollectionEvent/index.tsx
rename to src/pages/GlobalModalServices/modals/CollectionEvent/index.tsx
index 1d7d6f9cab5dcade1df4f83dc0b8746af0f5c6a3..6f2866107df8478d861d12640af1331963212977 100644
--- a/src/pages/Common/Event/CollectionEvent/index.tsx
+++ b/src/pages/GlobalModalServices/modals/CollectionEvent/index.tsx
@@ -1,40 +1,32 @@
-import Modal from '@/components/HncyModal';
import Tabs from '@/components/Tabs';
import ToggleView from '@/components/ToggleView';
import BaseCard from '@/pages/Common/components/BaseCard';
import EventPicList from '@/pages/Common/components/EventPicList';
import ListView from '@/pages/Common/components/ListView';
import ProcessCard from '@/pages/Common/components/ProcessCard';
-import EventDetail from '@/pages/GlobalModalServices/modals/EventDetail';
import services from '@/services';
import { Flex, Space } from 'antd';
import { useEffect, useRef, useState } from 'react';
+import { ChildrenModalMethods } from '../../type';
import styles from './index.less';
import LineCharts from './LineCharts';
-const CitizenComplaint = ({ collectionMode }: { collectionMode: string }) => {
- // 事件详情弹窗
- const [detailModalOpt, setDetailModalOpt] = useState<{
- open: boolean;
- title: string;
- eventId: string;
- }>({
- open: false,
- title: '',
- eventId: '',
- });
+const CitizenComplaint = ({
+ collectionMode,
+ modalDispatch,
+}: {
+ collectionMode: string;
+ modalDispatch: ChildrenModalMethods;
+}) => {
// 视图
- // const [viewType, setViewType] = useState<'list' | 'pic'>('pic'); //展示
const viewType = useRef<'list' | 'pic'>('pic');
-
const fetchParams = useRef({
page: 1,
count: 10,
caseStatus: '',
collectionModel: collectionMode,
});
-
// tabs内容
const defalutTabItems = [
{
@@ -279,11 +271,15 @@ const CitizenComplaint = ({ collectionMode }: { collectionMode: string }) => {
getEventsList();
}}
handleDetail={(details) => {
- setDetailModalOpt({
- open: true,
- title: '事件详情',
- eventId: details.eventId,
- });
+ modalDispatch.push(
+ 'EventDetail',
+ {
+ props: {
+ eventId: details.eventId,
+ },
+ },
+ 1,
+ );
}}
/>
) : (
@@ -295,26 +291,19 @@ const CitizenComplaint = ({ collectionMode }: { collectionMode: string }) => {
getEventsList();
}}
handleDetail={(details) => {
- setDetailModalOpt({
- open: true,
- title: '事件详情',
- eventId: details.eventId,
- });
+ modalDispatch.push(
+ 'EventDetail',
+ {
+ props: {
+ eventId: details.eventId,
+ },
+ },
+ 1,
+ );
}}
/>
)}
-
- setDetailModalOpt({ open: false, title: '', eventId: '' })
- }
- width={'fit-content'}
- height={950}
- >
-
-
);
};
diff --git a/src/pages/Common/Event/DifficultEvents/CountyProblem/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/CountyProblem/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/CountyProblem/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/CountyProblem/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/CountyProblem/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/CountyProblem/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/CountyProblem/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/CountyProblem/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/DisposeProblem/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/DisposeProblem/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/DisposeProblem/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/DisposeProblem/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/DisposeProblem/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/DisposeProblem/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/DisposeProblem/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/DisposeProblem/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/ExceedTimeCard/OutTimeItem/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/ExceedTimeCard/OutTimeItem/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ExceedTimeCard/OutTimeItem/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ExceedTimeCard/OutTimeItem/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/ExceedTimeCard/OutTimeItem/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/ExceedTimeCard/OutTimeItem/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ExceedTimeCard/OutTimeItem/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ExceedTimeCard/OutTimeItem/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/ExceedTimeCard/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/ExceedTimeCard/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ExceedTimeCard/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ExceedTimeCard/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/ExceedTimeCard/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/ExceedTimeCard/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ExceedTimeCard/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ExceedTimeCard/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/PieChart/Chart.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/PieChart/Chart.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/PieChart/Chart.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/PieChart/Chart.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/PieChart/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/PieChart/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/PieChart/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/PieChart/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/PieChart/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/PieChart/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/PieChart/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/PieChart/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/ProblemRank/TopSearch/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/ProblemRank/TopSearch/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ProblemRank/TopSearch/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ProblemRank/TopSearch/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/ProblemRank/TopSearch/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/ProblemRank/TopSearch/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ProblemRank/TopSearch/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ProblemRank/TopSearch/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/ProblemRank/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/ProblemRank/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ProblemRank/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ProblemRank/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/ProblemRank/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/ProblemRank/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ProblemRank/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ProblemRank/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/ProblemTendencyCard/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/ProblemTendencyCard/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ProblemTendencyCard/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ProblemTendencyCard/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/ProblemTendencyCard/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/ProblemTendencyCard/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/ProblemTendencyCard/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/ProblemTendencyCard/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/StatisticsCard/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/StatisticsCard/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/StatisticsCard/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/StatisticsCard/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/StatisticsCard/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/StatisticsCard/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/StatisticsCard/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/StatisticsCard/index.tsx
diff --git a/src/pages/Common/Event/DifficultEvents/index.less b/src/pages/GlobalModalServices/modals/DifficultEvents/index.less
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/index.less
rename to src/pages/GlobalModalServices/modals/DifficultEvents/index.less
diff --git a/src/pages/Common/Event/DifficultEvents/index.tsx b/src/pages/GlobalModalServices/modals/DifficultEvents/index.tsx
similarity index 100%
rename from src/pages/Common/Event/DifficultEvents/index.tsx
rename to src/pages/GlobalModalServices/modals/DifficultEvents/index.tsx
diff --git a/src/pages/Common/Event/ToDisposed/AnalysisItem/index.less b/src/pages/GlobalModalServices/modals/ToDisposed/AnalysisItem/index.less
similarity index 100%
rename from src/pages/Common/Event/ToDisposed/AnalysisItem/index.less
rename to src/pages/GlobalModalServices/modals/ToDisposed/AnalysisItem/index.less
diff --git a/src/pages/Common/Event/ToDisposed/AnalysisItem/index.tsx b/src/pages/GlobalModalServices/modals/ToDisposed/AnalysisItem/index.tsx
similarity index 100%
rename from src/pages/Common/Event/ToDisposed/AnalysisItem/index.tsx
rename to src/pages/GlobalModalServices/modals/ToDisposed/AnalysisItem/index.tsx
diff --git a/src/pages/Common/Event/ToDisposed/PieCharts/index.tsx b/src/pages/GlobalModalServices/modals/ToDisposed/PieCharts/index.tsx
similarity index 100%
rename from src/pages/Common/Event/ToDisposed/PieCharts/index.tsx
rename to src/pages/GlobalModalServices/modals/ToDisposed/PieCharts/index.tsx
diff --git a/src/pages/Common/Event/ToDisposed/index.less b/src/pages/GlobalModalServices/modals/ToDisposed/index.less
similarity index 100%
rename from src/pages/Common/Event/ToDisposed/index.less
rename to src/pages/GlobalModalServices/modals/ToDisposed/index.less
diff --git a/src/pages/Common/Event/ToDisposed/index.tsx b/src/pages/GlobalModalServices/modals/ToDisposed/index.tsx
similarity index 89%
rename from src/pages/Common/Event/ToDisposed/index.tsx
rename to src/pages/GlobalModalServices/modals/ToDisposed/index.tsx
index 1133529178a54b5bc061a147f099bc2ce50c6dc1..81a6d2c42ad452202b1dee7904ce23436f0492e7 100644
--- a/src/pages/Common/Event/ToDisposed/index.tsx
+++ b/src/pages/GlobalModalServices/modals/ToDisposed/index.tsx
@@ -1,15 +1,14 @@
-import Modal from '@/components/HncyModal';
import Tabs from '@/components/Tabs';
import ToggleView from '@/components/ToggleView';
import { eventList } from '@/mock/event';
import BaseCard from '@/pages/Common/components/BaseCard';
import EventPicList from '@/pages/Common/components/EventPicList';
import ListView from '@/pages/Common/components/ListView';
-import EventDetail from '@/pages/GlobalModalServices/modals/EventDetail';
import services from '@/services';
import { SearchOutlined } from '@ant-design/icons';
import { Flex, Input, Space } from 'antd';
import { useEffect, useRef, useState } from 'react';
+import { ChildrenModalMethods } from '../../type';
import AnalysisItem from './AnalysisItem';
import styles from './index.less';
import PieCharts from './PieCharts';
@@ -19,18 +18,11 @@ import PieCharts from './PieCharts';
* @description 待处置事件
*/
-const ToDisposed = () => {
- // 事件详情弹窗
- const [detailModalOpt, setDetailModalOpt] = useState<{
- open: boolean;
- title: string;
- eventId: string;
- }>({
- open: false,
- title: '',
- eventId: '',
- });
-
+const ToDisposed = ({
+ modalDispatch,
+}: {
+ modalDispatch: ChildrenModalMethods;
+}) => {
// 视图
// const [viewType, setViewType] = useState<'list' | 'pic'>('pic'); //展示
const viewType = useRef<'list' | 'pic'>('pic');
@@ -280,11 +272,16 @@ const ToDisposed = () => {
getEventsList();
}}
handleDetail={(details) => {
- setDetailModalOpt({
- open: true,
- title: '事件详情',
- eventId: details.eventId,
- });
+ modalDispatch.push(
+ 'EventDetail',
+ {
+ w: 'fit-content',
+ props: {
+ eventId: details.eventId,
+ },
+ },
+ 1,
+ );
}}
/>
) : (
@@ -296,26 +293,20 @@ const ToDisposed = () => {
getEventsList();
}}
handleDetail={(details) => {
- setDetailModalOpt({
- open: true,
- title: '事件详情',
- eventId: details.eventId,
- });
+ modalDispatch.push(
+ 'EventDetail',
+ {
+ w: 'fit-content',
+ props: {
+ eventId: details.eventId,
+ },
+ },
+ 1,
+ );
}}
/>
)}
-
- setDetailModalOpt({ open: false, title: '', eventId: '' })
- }
- width={1160}
- height={950}
- >
-
-
);
};
diff --git a/src/pages/GlobalModalServices/provider.tsx b/src/pages/GlobalModalServices/provider.tsx
index 1066822b4099169a07e977be20ecc4a49a18f1bd..2f161565f367b95240d261da06bf746b8ab99a7e 100644
--- a/src/pages/GlobalModalServices/provider.tsx
+++ b/src/pages/GlobalModalServices/provider.tsx
@@ -1,10 +1,10 @@
import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';
import GlobalModalServices from '.';
-import type { GlobalModalPrideAction } from './type';
+import type { GlobalModalServicesModalMethods } from './type';
const GlobalModalContext = React.createContext(
{} as {
- dispatch: GlobalModalPrideAction;
+ dispatch: GlobalModalServicesModalMethods;
},
);
@@ -13,8 +13,8 @@ export const useGlobalModalServices = () =>
/** 全局弹窗服务提供者 */
const GlobalModalServicesProvider: React.FC = (props) => {
- const [dispatch, setDispatch] = useState();
- const ref = useRef(null);
+ const [dispatch, setDispatch] = useState();
+ const ref = useRef(null);
useEffect(() => {
if (ref.current && !dispatch) {
diff --git a/src/pages/GlobalModalServices/registry.tsx b/src/pages/GlobalModalServices/registry.tsx
index 21c3308e304f45b47b582d8fd51f26a613f5e35a..e76eca1dcb6da0374a46b596d9de01f875a59f81 100644
--- a/src/pages/GlobalModalServices/registry.tsx
+++ b/src/pages/GlobalModalServices/registry.tsx
@@ -1,15 +1,17 @@
-import Category from './modals/Category';
-import CgftEvent from './modals/CgftEvent';
-//@ts-nocheck
import AdministPunish from './modals/AdministPunish';
import AdministPunishDetails from './modals/AdministPunish/AdministPunishDetails';
import AdministPunishList from './modals/AdministPunish/AdministPunishList';
+import AnalysisCompletionRate from './modals/AnalysisCompletionRate';
import AreaSynergy from './modals/AreaSynergy';
import AreaSynergyDetails from './modals/AreaSynergy/AreaSynergyDetails';
import AreaSynergyList from './modals/AreaSynergy/AreaSynergyList';
+import Category from './modals/Category';
+import CgftEvent from './modals/CgftEvent';
+import CollectionEvent from './modals/CollectionEvent';
import DataActivity from './modals/DataActivity';
import DataBase from './modals/DataBase';
import DataGovernance from './modals/DataGovernance';
+import DifficultEvents from './modals/DifficultEvents';
import DistrictIndex from './modals/DistrictIndex';
import DyaPatrol from './modals/DyaPatrol';
import DyaPatrolDetails from './modals/DyaPatrol/DyaPatrolDetails';
@@ -24,6 +26,7 @@ import SanitationDisp from './modals/SanitationDisp';
import SanitationEvent from './modals/SanitationEvent';
import SanitationResource from './modals/SanitationResource';
import SignModel from './modals/SignModel';
+import ToDisposed from './modals/ToDisposed';
import UrbanOperation from './modals/UrbanOperation';
import { ModalMapping } from './type';
@@ -105,6 +108,32 @@ export default class Registry {
},
modal: OtherEvent,
},
+ /**
+ * 待处置
+ * @module overview
+ * @see
+ */
+ ToDisposed: {
+ defaultConfig: {
+ w: 1772,
+ h: 846,
+ },
+ defaultProps: {},
+ modal: ToDisposed,
+ },
+ /**
+ * 完成率
+ * @module overview
+ * @see
+ */
+ CompletionRate: {
+ defaultConfig: {
+ w: 1772,
+ h: 846,
+ },
+ defaultProps: {},
+ modal: AnalysisCompletionRate,
+ },
/**
* 整体情况
* @module overview
@@ -118,6 +147,32 @@ export default class Registry {
defaultProps: {},
modal: GeneralSituation,
},
+ /**
+ * 整体情况
+ * @module overview
+ * @see
+ */
+ CollectionEvent: {
+ defaultConfig: {
+ w: 1772,
+ h: 846,
+ },
+ defaultProps: {},
+ modal: CollectionEvent,
+ },
+ /**
+ * 疑难问题
+ * @module overview
+ * @see
+ */
+ DifficultEvents: {
+ defaultConfig: {
+ w: 2000,
+ h: 846,
+ },
+ defaultProps: {},
+ modal: DifficultEvents,
+ },
/**
* EventDetail
diff --git a/src/pages/GlobalModalServices/type.ts b/src/pages/GlobalModalServices/type.ts
index 36a83637b06616f2ec28a72f35f092b449f8c02b..2c845de492a053933cf436217fa0ee4b40d3d40a 100644
--- a/src/pages/GlobalModalServices/type.ts
+++ b/src/pages/GlobalModalServices/type.ts
@@ -62,15 +62,23 @@ export type GlobalModalServicesModalMethods = {
* */
clear: () => void;
/** 设置弹窗基础信息 */
- setOptionsById: (modalId: string, config: GlobalModalConfig) => void;
- /** 设置弹窗参数 */
+ setOptionsById?: (modalId: string, config: GlobalModalConfig) => void;
+ /**
+ * 设置弹窗参数
+ * 仅限定 弹窗内调用
+ * */
setOptions?(options: Partial): void;
};
-export interface GlobalModalPrideAction
- extends GlobalModalServicesModalMethods {
+export interface ChildrenModalMethods extends GlobalModalServicesModalMethods {
+ /**
+ * 设置弹窗参数
+ * 仅限定 弹窗内调用
+ * */
+ setOptions?(options: Partial): void;
+
/**
- * 返回上一页
+ * 返回上一页,仅限同一维度调用
* @param thread 弹窗层级
* */
goBack(thread: number): void;
diff --git a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/HighFrequencyType/index.tsx b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/HighFrequencyType/index.tsx
index a553f9b42516e415f354f98478c59c46cf86bac9..ee1f6a2ccea25d57cf9372e28cd816865118ba64 100644
--- a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/HighFrequencyType/index.tsx
+++ b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/HighFrequencyType/index.tsx
@@ -8,21 +8,6 @@ const HighFrequencyType: React.FC<{
}> = ({ categoryStatistics = [], onTabChange }) => {
const [activeTab, setActiveTab] = useState('mainClass');
- const tabItems = [
- {
- key: 'mainClass',
- label: '大类',
- },
- {
- key: 'subClass',
- label: '小类',
- },
- {
- key: 'subdivisionClass',
- label: '细类',
- },
- ];
-
const handleTabChange = (key: string) => {
setActiveTab(key);
onTabChange?.(key);
diff --git a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/PeopleComplaint/index.css b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/PeopleComplaint/index.css
deleted file mode 100644
index b563f6419c79e3e89efd00f41b8760929a9fa595..0000000000000000000000000000000000000000
--- a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/PeopleComplaint/index.css
+++ /dev/null
@@ -1,56 +0,0 @@
-.container {
- width: 100%;
- height: 100%;
- margin-top: 10px;
-}
-.container .statisticsRow {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
-}
-.container .statisticsRow .statisticItem {
- display: flex;
- align-items: center;
- gap: 4px;
- transition: all 0.3s;
-}
-.container .statisticsRow .statisticItem:hover {
- opacity: 0.8;
-}
-.container .statisticsRow .statisticItem .label {
- color: #BCCEE9;
- font-family: '微软雅黑';
- font-size: 16px;
- font-weight: 700;
- line-height: 21px;
-}
-.container .statisticsRow .statisticItem :global .ant-statistic {
- display: inline-block;
-}
-.container .statisticsRow .statisticItem :global .ant-statistic .ant-statistic-content .ant-statistic-content-value {
- background: linear-gradient(180deg, #AAFFF6 0%, #25BBFF 100%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- font-family: 'D-DIN';
- font-size: 26px;
- font-weight: 700;
-}
-.container .statisticsRow .statisticItem .unit {
- color: #BCCEE9;
- font-family: '微软雅黑';
- font-size: 16px;
- font-weight: 400;
-}
-.container .gridContainer {
- display: grid;
- grid-template-columns: 590px 460px;
- gap: 20px;
- margin-top: 20px;
- justify-content: space-between;
-}
-.container .gridContainer .leftColumn {
- display: flex;
- flex-direction: column;
- gap: 20px;
-}
diff --git a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/Problem/index.tsx b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/Problem/index.tsx
index 515b2d284dca83316f687c00f7caf9be14be3a23..0c47074fca0999e6fef76908008dd7e0b23ddf75 100644
--- a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/Problem/index.tsx
+++ b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/Problem/index.tsx
@@ -1,9 +1,5 @@
import bottom from '@/assets/images/urbanSituation/bottom.png';
import upIcon from '@/assets/images/urbanSituation/up.png';
-import AnalysisCompletionRate from '@/pages/Common/Event/AnalysisCompletionRate';
-import CollectionEvent from '@/pages/Common/Event/CollectionEvent';
-import DifficultEvents from '@/pages/Common/Event/DifficultEvents';
-import ToDisposed from '@/pages/Common/Event/ToDisposed';
import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider';
import services from '@/services';
import { formatNumber } from '@/utils/ui';
@@ -14,7 +10,7 @@ import CountUp from 'react-countup';
import styles from './index.less';
// import PeopleComplaint111 from '../PeopleComplaint';
-const formatter: StatisticProps['formatter'] = (value) => {
+const formatter: StatisticProps['formatter'] = (value: any) => {
return (
{
const [statisticsData, setStatisticsData] = useState({});
const { dispatch } = useGlobalModalServices();
- // 渲染弹窗内容
- const renderModal = useMemo(() => {
- const comp: any = {
- // CgftEvent: ,
- // urbanOperation: ,
- // otherEvent: ,
- collectionEvent: (
-
- ),
- toDisposed: ,
- completionRate: ,
- difficultEvents: ,
- // generalSituation: ,
- };
- return comp[modalOpt?.type] || <>>;
- }, [modalOpt]);
const groupCard = useMemo(() => {
return {
@@ -117,7 +97,7 @@ const Problem: React.FC = memo(() => {
value: formatNumber(statisticsData.disposalNum)?.num,
// unit: '件',
modalConf: {
- type: 'toDisposed',
+ type: 'ToDisposed',
title: '待处置事件',
},
unit: formatNumber(statisticsData.disposalNum)?.unit,
@@ -127,7 +107,7 @@ const Problem: React.FC = memo(() => {
value: statisticsData.completionRate?.toFixed(2),
unit: '%',
modalConf: {
- type: 'completionRate',
+ type: 'CompletionRate',
title: '处置完成率',
},
},
@@ -137,7 +117,7 @@ const Problem: React.FC = memo(() => {
value: formatNumber(statisticsData.problemNum)?.num,
// unit: '件',
modalConf: {
- type: 'difficultEvents',
+ type: 'DifficultEvents',
title: '疑难案件',
width: 2000,
},
@@ -149,7 +129,7 @@ const Problem: React.FC = memo(() => {
value: formatNumber(statisticsData.outsideProblemNum)?.num,
// unit: '件',
modalConf: {
- type: 'difficultEvents',
+ type: 'DifficultEvents',
title: '疑难案件',
width: 2000,
},
@@ -162,7 +142,7 @@ const Problem: React.FC = memo(() => {
value: statisticsData.smtsNum,
//value: formatNumber(statisticsData.smtsNum)?.num,
modalConf: {
- type: 'collectionEvent',
+ type: 'CollectionEvent',
title: '市民投诉事件',
collectionMode: '0',
},
@@ -174,7 +154,7 @@ const Problem: React.FC = memo(() => {
//value: formatNumber(statisticsData.wlgzNum)?.num,
unit: formatNumber(statisticsData.wlgzNum)?.unit,
modalConf: {
- type: 'collectionEvent',
+ type: 'CollectionEvent',
title: '智能感知事件',
collectionMode: '2',
},
@@ -185,7 +165,7 @@ const Problem: React.FC = memo(() => {
//value: formatNumber(statisticsData.rgxcNum)?.num,
unit: formatNumber(statisticsData.rgxcNum)?.unit,
modalConf: {
- type: 'collectionEvent',
+ type: 'CollectionEvent',
title: '监督员上报事件',
collectionMode: '1',
},
@@ -197,7 +177,7 @@ const Problem: React.FC = memo(() => {
//value: formatNumber(statisticsData.otherNum)?.num,
unit: formatNumber(statisticsData.otherNum)?.unit,
modalConf: {
- type: 'collectionEvent',
+ type: 'CollectionEvent',
title: '行走成都事件',
collectionMode: '4',
},
@@ -278,8 +258,12 @@ const Problem: React.FC = memo(() => {
key={item.name}
style={{ cursor: 'pointer', textAlign: 'center' }}
onClick={() => {
- if (item.modalConf.type === 'difficultEvents') return;
- setModalOpt({ open: true, ...item.modalConf });
+ dispatch.push(item.modalConf.type as any, {
+ title: item.name,
+ props: {
+ ...item.modalConf,
+ },
+ });
}}
>
@@ -310,7 +294,12 @@ const Problem: React.FC = memo(() => {
className={styles.numCard}
style={{ justifyContent: 'center' }}
onClick={() => {
- setModalOpt({ open: true, ...item.modalConf });
+ dispatch.push(item.modalConf.type as any, {
+ title: item.name,
+ props: {
+ ...item.modalConf,
+ },
+ });
}}
>
diff --git a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/ProblemNew/index.tsx b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/ProblemNew/index.tsx
index add0d75be4a98420f81b1f91f15151c9b9d5f5e7..1eb8a6cf6fe2bf64569af2512c3277c9691e6f2c 100644
--- a/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/ProblemNew/index.tsx
+++ b/src/pages/NewHome/NewLeftSidebar/UrbanManagementIssues/ProblemNew/index.tsx
@@ -1,9 +1,9 @@
import upIcon from '@/assets/images/urbanSituation/up.png';
import Modal from '@/components/HncyModal';
-import ToDisposed from '@/pages/Common/Event/ToDisposed';
import CgftEvent from '@/pages/GlobalModalServices/modals/CgftEvent';
import GeneralSituation from '@/pages/GlobalModalServices/modals/GeneralSituation';
import OtherEvent from '@/pages/GlobalModalServices/modals/OtherEvent';
+import ToDisposed from '@/pages/GlobalModalServices/modals/ToDisposed';
import UrbanOperation from '@/pages/GlobalModalServices/modals/UrbanOperation';
import services from '@/services';
import type { StatisticProps } from 'antd';
diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx b/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx
index 15b67a44b61d3260619c9da5b6cd62e4e9b9c185..540be017d41bcf9be2d7afa3ec4308b2b463e172 100644
--- a/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx
+++ b/src/pages/SecurityServiceOverview/components/MapCantainer/DistrictMap/index.tsx
@@ -9,7 +9,6 @@ import risk4 from '@/assets/images/urbanSituation/risk4.svg';
import CooglMap from '@/components/CooglMap';
import Modal from '@/components/HncyModal';
-import EventDetail from '@/pages/GlobalModalServices/modals/EventDetail';
import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider';
import services from '@/services';
import { smoothScrollTo } from '@/utils';
@@ -72,7 +71,7 @@ export const colorConfig: Record<
const DistrictMap: React.FC = () => {
const { initialState } = useModel('@@initialState');
const { areaId } = initialState;
-
+ const { dispatch } = useGlobalModalServices();
const [playingStatus, setPlayingStatus] = useState(true);
//区域选择
const [selected, setSelected] = useState();
@@ -93,12 +92,7 @@ const DistrictMap: React.FC = () => {
const { indexs } = useModel('regionalIndex', (store) => ({
indexs: store.indexs,
}));
- // 事件详情弹窗
- const [modalOpt, setModalOpt] = useState({
- open: false,
- title: '',
- eventId: '',
- });
+
// 预警事件详情弹窗
const [detailModalOpt, setDetailModalOpt] = useState({
open: false,
@@ -109,7 +103,6 @@ const DistrictMap: React.FC = () => {
const [leftTabKey, setLeftTabKey] = useState('1');
const [data, setData] = useState([]);
const [eventData, setEventData] = useState([]);
- const { dispatch } = useGlobalModalServices();
useEffect(() => {
services.Physicalsign.getObjectPolygon({
@@ -286,7 +279,7 @@ const DistrictMap: React.FC = () => {
) : (
)}
@@ -318,7 +311,13 @@ const DistrictMap: React.FC = () => {
setPlayingStatus(true);
}}
onClick={() => {
- setModalOpt({ open: true, title: '事件详情', ...item });
+ dispatch.push('EventDetail', {
+ title: '事件详情',
+ w: 'fit-content',
+ props: {
+ eventId: item?.eventId,
+ },
+ });
}}
>
{
/>
)}
-
- {/**事件详情 */}
- setModalOpt({ open: false, title: '', eventId: '' })}
- width={'fit-content'}
- height={950}
- >
-
-
);
};
diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/EmphasisAreaMap/index.tsx b/src/pages/SecurityServiceOverview/components/MapCantainer/EmphasisAreaMap/index.tsx
index 7380a0b293a9ec229cd93ef6e6ba58f1fff19f08..b25741ee46608198e8dd5db3fc9cbc01cb70899e 100644
--- a/src/pages/SecurityServiceOverview/components/MapCantainer/EmphasisAreaMap/index.tsx
+++ b/src/pages/SecurityServiceOverview/components/MapCantainer/EmphasisAreaMap/index.tsx
@@ -1,6 +1,5 @@
import CooglMap from '@/components/CooglMap';
import Modal from '@/components/HncyModal';
-import EventDetail from '@/pages/GlobalModalServices/modals/EventDetail';
import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider';
import services from '@/services';
import { cqiDisplay, getColorByIndex, getCqiStatusStyle } from '@/utils/ui';
@@ -13,18 +12,7 @@ import RiskIssue from '../RiskIssue';
import styles from './index.less';
import PopoverCardArea from './PopoverCardArea';
const EmphasisAreaMap: React.FC = () => {
- // 事件详情弹窗
- const [modalOpt, setModalOpt] = useState({
- open: false,
- title: '',
- eventId: '',
- });
const [checkedKeys, setCheckedKeys] = useState([
- // '安全风险',
- // '红色预警',
- // '橙色预警',
- // '黄色预警',
- // '一般预警',
'城市问题',
'其他问题',
'突出问题',
@@ -52,10 +40,6 @@ const EmphasisAreaMap: React.FC = () => {
const [areaList, setAreaList] = useState([]);
const [allAreaMapData, setAllAreaMapData] = useState([]);
- // const p1 = [103.74243115816007, 30.79721665183887];
-
- // const p2 = [104.48437948789275, 30.807638945537175];
-
/**
* @description 设置地图视野
*/
@@ -235,7 +219,7 @@ const EmphasisAreaMap: React.FC = () => {
) : (
)}
@@ -373,8 +357,6 @@ const EmphasisAreaMap: React.FC = () => {
eventId={detailModalOpt?.eventId}
detail={detailModalOpt}
onChangeOpt={(val) => {
- // console.log(val);
-
setDetailModalOpt({
...detailModalOpt,
position: val?.position,
@@ -385,16 +367,6 @@ const EmphasisAreaMap: React.FC = () => {
/>
)}
- {/**事件详情 */}
- setModalOpt({ open: false, title: '', eventId: '' })}
- width={'fit-content'}
- height={950}
- >
-
-
);
};
diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/RiskIssue/index.tsx b/src/pages/SecurityServiceOverview/components/MapCantainer/RiskIssue/index.tsx
index fe4c26b1018ddff365692cfc9dca8d6c9b8b88a8..a210aa71acccd6b57c22776166b232c71159fb9e 100644
--- a/src/pages/SecurityServiceOverview/components/MapCantainer/RiskIssue/index.tsx
+++ b/src/pages/SecurityServiceOverview/components/MapCantainer/RiskIssue/index.tsx
@@ -1,4 +1,5 @@
import CooglMap from '@/components/CooglMap';
+import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider';
import services from '@/services';
import { useRequest } from 'ahooks';
import { memo, useEffect, useState } from 'react';
@@ -9,13 +10,14 @@ import styles from './index.less';
const RiskIssue = ({
checkedKeys,
setDetailModalOpt,
- setModalOpt,
-}: {
+}: // setModalOpt,
+{
checkedKeys: any[];
- setModalOpt: (val: any) => void;
- setDetailModalOpt:(val:any)=>void
+ // setModalOpt: (val: any) => void;
+ setDetailModalOpt: (val: any) => void;
}) => {
-
+ const { dispatch } = useGlobalModalServices();
+
const [eventData, setEventData] = useState([]);
//风险
const [fxSelectd, setFxSelectd] = useState();
@@ -33,7 +35,7 @@ const RiskIssue = ({
}),
);
console.log(earlyData);
-
+
useEffect(() => {
//最新事件
services.CityProblemApi.getUpToDateEvent({
@@ -138,10 +140,12 @@ const RiskIssue = ({
top: -50,
}}
onDetail={(e) => {
- setModalOpt({
- open: true,
+ dispatch.push('EventDetail', {
title: '事件详情',
- ...kontSelectd,
+ w: 'fit-content',
+ props: {
+ eventId: kontSelectd?.eventId,
+ },
});
}}
onClose={(e) => {
diff --git a/src/pages/UrbanSituation/Problem/index.tsx b/src/pages/UrbanSituation/Problem/index.tsx
index ce96d22db4e5adba2d888b1ead2cfb5f95b0843b..10884700de15fd676db8db3047d172e54f627e46 100644
--- a/src/pages/UrbanSituation/Problem/index.tsx
+++ b/src/pages/UrbanSituation/Problem/index.tsx
@@ -1,13 +1,13 @@
import bottom from '@/assets/images/urbanSituation/bottom.png';
import upIcon from '@/assets/images/urbanSituation/up.png';
import Modal from '@/components/HncyModal';
-import AnalysisCompletionRate from '@/pages/Common/Event/AnalysisCompletionRate';
-import CollectionEvent from '@/pages/Common/Event/CollectionEvent';
-import DifficultEvents from '@/pages/Common/Event/DifficultEvents';
-import ToDisposed from '@/pages/Common/Event/ToDisposed';
+import AnalysisCompletionRate from '@/pages/GlobalModalServices/modals/AnalysisCompletionRate';
import CgftEvent from '@/pages/GlobalModalServices/modals/CgftEvent';
+import CollectionEvent from '@/pages/GlobalModalServices/modals/CollectionEvent';
+import DifficultEvents from '@/pages/GlobalModalServices/modals/DifficultEvents';
import GeneralSituation from '@/pages/GlobalModalServices/modals/GeneralSituation';
import OtherEvent from '@/pages/GlobalModalServices/modals/OtherEvent';
+import ToDisposed from '@/pages/GlobalModalServices/modals/ToDisposed';
import UrbanOperation from '@/pages/GlobalModalServices/modals/UrbanOperation';
import services from '@/services';
import type { StatisticProps } from 'antd';