diff --git a/src/pages/GlobalModalServices/modals/UrbanOperation/index.less b/src/pages/GlobalModalServices/modals/UrbanOperation/index.less index 49ad1c656a8f17c524a042d21fccd723b39ccdeb..9e563acd61e99c03d7b4381f92448be3e909d985 100644 --- a/src/pages/GlobalModalServices/modals/UrbanOperation/index.less +++ b/src/pages/GlobalModalServices/modals/UrbanOperation/index.less @@ -30,22 +30,26 @@ width: calc(100% - 440px); } - .searchBox { - position: absolute; - top: -75px; - left: 300px; - - :global { - .ant-select-selector { - background: transparent !important; - border: none !important; + +} + +.searchBox { + + // top: -35px; + // left: 300px; + // z-index: 9999; + margin-left: 30px; + + :global { + .ant-select-selector { + background: transparent !important; + border: none !important; + color: #fff; + font-size: 20px; + + .ant-select-selection-placeholder { color: #fff; font-size: 20px; - - .ant-select-selection-placeholder { - color: #fff; - font-size: 20px; - } } } } diff --git a/src/pages/GlobalModalServices/modals/UrbanOperation/index.tsx b/src/pages/GlobalModalServices/modals/UrbanOperation/index.tsx index fb9eeb9e281707387190b42ddc98c358749bb3c4..e5acd5809ddb69b6461d4dd36adb493163eaa4fe 100644 --- a/src/pages/GlobalModalServices/modals/UrbanOperation/index.tsx +++ b/src/pages/GlobalModalServices/modals/UrbanOperation/index.tsx @@ -73,10 +73,10 @@ const UrbanOperation = ({ const [areaStatistics, setAreaStatistics] = useState([]); // 获取左侧顶部事件相关统计 - const getCityStatistics = (value?: string) => { + const getCityStatistics = () => { const params = { sourceSystemCodeY: fetchParams.current.sourceSystemCodeY, - sourceSystemCode, + sourceSystemCode: fetchParams.current.sourceSystemCode, type: datetType, time, }; @@ -95,7 +95,7 @@ const UrbanOperation = ({ category: category, top: 3, sourceSystemCodeY: fetchParams.current.sourceSystemCodeY, - sourceSystemCode, + sourceSystemCode: fetchParams.current.sourceSystemCode, type: datetType, time, }; @@ -111,12 +111,12 @@ const UrbanOperation = ({ }; // 高发类别统计 - const getAreaAnalysis = (value?: string) => { + const getAreaAnalysis = () => { const params = { region: 'district', top: 3, sourceSystemCodeY: fetchParams.current.sourceSystemCodeY, - sourceSystemCode, + sourceSystemCode: fetchParams.current.sourceSystemCode, type: datetType, time, }; @@ -148,7 +148,14 @@ const UrbanOperation = ({ }, ); }; - + const { data: lineDataV1, run: getLineData } = useRequest(() => + services.CityProblemApi.getSourceSystemTrend({ + sourceSystemCodeY: fetchParams.current.sourceSystemCodeY, + sourceSystemCode: fetchParams.current.sourceSystemCode, + type: datetType, + time, + }), + ); const changeListTab = (value: string) => { fetchParams.current.caseStatus = value; fetchParams.current.page = 1; @@ -172,29 +179,29 @@ const UrbanOperation = ({ const options = Object.entries(data?.all).map((item) => { return { label: item[1], value: item[0] }; }); - setCaseSourceOptions([ - { label: '全部来源', value: 'all' }, - ...options, - ]); + setCaseSourceOptions([{ label: '全部来源', value: 'all' }, ...options]); } if (sourceType && sourceType === 'wnywxt') { const options = data?.wnywxt?.map((item) => ({ ...item, label: item?.name, })); - setCaseSourceOptions([ - { label: '全部来源', value: 'all' }, - ...options, - ]); + setCaseSourceOptions([{ label: '全部来源', value: 'all' }, ...options]); } }, }); const onChangeCaseSource = (value: string) => { console.log(value); - + // setSourceSystemCode(value); - fetchParams.current.sourceSystemCodeY = value=='all'?undefined:value; + if (sourceType === 'all') { + fetchParams.current.sourceSystemCode = value == 'all' ? undefined : value; + } else { + fetchParams.current.sourceSystemCodeY = + value == 'all' ? undefined : value; + } + fetchParams.current.caseStatus = ''; fetchParams.current.eventType = ''; fetchParams.current.page = 1; @@ -205,10 +212,11 @@ const UrbanOperation = ({ page: 1, hasNext: false, }); - getCityStatistics(value); + getCityStatistics(); getCategoryAnalysis(); - getAreaAnalysis(value); + getAreaAnalysis(); getEventsList(); + getLineData() }; useEffect(() => { getCityStatistics(); @@ -216,10 +224,30 @@ const UrbanOperation = ({ getAreaAnalysis(); getEventsList(); }, []); - + useEffect(() => { + if (showSourceSelect) { + modalDispatch.setOptions({ + headerLeft: () => { + return ( +
+
- )} + )} */}
{/* */} - + ({...item,name:item.time})) || []}>
diff --git a/src/services/CityProblem.ts b/src/services/CityProblem.ts index 0c9be9417c49039be845ba5c1da15a10ea0555f9..a3433ec7c386b14547320b84393bf6298dda8214 100644 --- a/src/services/CityProblem.ts +++ b/src/services/CityProblem.ts @@ -196,7 +196,19 @@ export async function getAreaDistribAnalysisApi(params: any) { }, ); } - +/** + * + * @description 趋势图 + */ +export async function getSourceSystemTrend(params: any) { + return request>( + urlProxyApis('/comprehensiveDiscovery/sourceSystemTrend'), + { + method: 'post', + params + }, + ); +} /** * * @description 重要事件统计