diff --git a/src/assets/images/evtIc2.png b/src/assets/images/evtIc2.png index 9e2a73c625fa4b18ba94164def00bf20991f62ee..d6f71afaf135b747c6c94ba106733543eb6a4f9b 100644 Binary files a/src/assets/images/evtIc2.png and b/src/assets/images/evtIc2.png differ diff --git a/src/layouts/Header/index.tsx b/src/layouts/Header/index.tsx index 0de458f094a9ce45ace7c9fd5eb80b41dd2bdacb..6c76a5293e7206df5392e16b771fdf0ea5916592 100644 --- a/src/layouts/Header/index.tsx +++ b/src/layouts/Header/index.tsx @@ -62,6 +62,7 @@ const Header = memo(() => { } + arrow={false} overlayInnerStyle={{ backgroundColor: 'rgba(8, 24, 63, 0.9)', border: '1px solid rgb(19, 101, 150)', @@ -131,6 +132,7 @@ const Header = memo(() => { } + arrow={false} overlayInnerStyle={{ backgroundColor: 'rgba(8, 24, 63, 0.9)', border: '1px solid rgb(19, 101, 150)', @@ -200,6 +202,7 @@ const Header = memo(() => { } + arrow={false} overlayInnerStyle={{ backgroundColor: 'rgba(8, 24, 63, 0.9)', border: '1px solid rgb(19, 101, 150)', diff --git a/src/pages/GlobalModalServices/components/TimeLineCharts/index.tsx b/src/pages/GlobalModalServices/components/TimeLineCharts/index.tsx index d13c6dc00c89fa742bb1698c303d25c1e44b36ad..c3834eb7a1d44bbfcc29bdcc4218a9f3df15bf1d 100644 --- a/src/pages/GlobalModalServices/components/TimeLineCharts/index.tsx +++ b/src/pages/GlobalModalServices/components/TimeLineCharts/index.tsx @@ -21,6 +21,11 @@ const LineCharts = ({ data,style }: { data: any[],style:CSSProperties }) => { }, tooltip: { trigger: 'axis', + borderWidth: '0', + backgroundColor: 'rgba(73,81,92,.95)', //背景颜色 + textStyle: { + color: '#fff', //字体颜色 + }, // backgroundColor: '#46515d', // axisPointer: { // type: 'line', @@ -38,7 +43,7 @@ const LineCharts = ({ data,style }: { data: any[],style:CSSProperties }) => { left: '0', // 左边距 right: '0', // 右边距 top: '0', // 上边距 - bottom: '0' // 下边距 + bottom: '35%' // 下边距 }, series: [ { diff --git a/src/pages/GlobalModalServices/modals/AdministPunish/NumTop5/index.tsx b/src/pages/GlobalModalServices/modals/AdministPunish/NumTop5/index.tsx index 514b71b95add5d5174dd5eaaf70aaf0d9ccfb9a3..cff523db2f1d7cbfe9a5b3bfc0e679ec0250fd1d 100644 --- a/src/pages/GlobalModalServices/modals/AdministPunish/NumTop5/index.tsx +++ b/src/pages/GlobalModalServices/modals/AdministPunish/NumTop5/index.tsx @@ -40,8 +40,9 @@ export const jqxc = [ const Top5: React.FC<{ modalDispatch: ChildrenModalMethods; searchTime: any; + total:number }> = memo((props) => { - const { modalDispatch, searchTime } = props; + const { modalDispatch, searchTime ,total} = props; const [areaKey, setAreaKey] = useState('all'); //办案数量top5 @@ -81,13 +82,13 @@ const Top5: React.FC<{ return list?.map((item: any) => ({ name: item?.gridName, num: item?.num, - percent: ( + percent:total? ( (item?.num / - list?.reduce((acc: any, it: any) => acc + (it?.num || 0), 0)) * + total) * 100 - ).toFixed(2), + ).toFixed(2):0, })); - }, [qysl, areaKey]); + }, [qysl, areaKey,total]); return ( diff --git a/src/pages/GlobalModalServices/modals/AdministPunish/Top5/index.tsx b/src/pages/GlobalModalServices/modals/AdministPunish/Top5/index.tsx index d8fd77c12d58ba9c8fddca32dd2fd878baa12673..3c0fced5ca74ed72f0a82583422f244b119a6e2a 100644 --- a/src/pages/GlobalModalServices/modals/AdministPunish/Top5/index.tsx +++ b/src/pages/GlobalModalServices/modals/AdministPunish/Top5/index.tsx @@ -10,8 +10,9 @@ import styles from './index.less'; const Top5: React.FC<{ modalDispatch: ChildrenModalMethods; searchTime: any; + total: number; }> = memo((props) => { - const { modalDispatch, searchTime } = props; + const { modalDispatch, searchTime, total } = props; const { data: wfxwsl } = useRequest( () => @@ -32,13 +33,9 @@ const Top5: React.FC<{ return list?.map((item: any) => ({ name: item?.wfxwlx, num: item?.num, - percent: ( - (item?.num / - list?.reduce((acc: any, it: any) => acc + (it?.num || 0), 0)) * - 100 - ).toFixed(2), + percent: total?((item?.num / total) * 100).toFixed(2):0, })); - }, [wfxwsl]); + }, [wfxwsl, total]); return ( diff --git a/src/pages/GlobalModalServices/modals/AdministPunish/Trend/index.tsx b/src/pages/GlobalModalServices/modals/AdministPunish/Trend/index.tsx index 096c21ad3df2664542c39d9afdaae56364f788e4..9765bedd88d442225e69278f6923c1f0b0540be4 100644 --- a/src/pages/GlobalModalServices/modals/AdministPunish/Trend/index.tsx +++ b/src/pages/GlobalModalServices/modals/AdministPunish/Trend/index.tsx @@ -31,11 +31,11 @@ const Trend: React.FC<{ ready: searchTime.key === 'year', }, ); - //处罚趋势 +//处罚趋势子定义--月 const { data: cfqsMonth } = useRequest( () => services.DataBase.getSjdzInfoData({ - typeCode: 'zzcc-xzcf-aysllb', + typeCode: 'zzcc-xzcf-arsllb', params: { ...searchTime, }, @@ -47,9 +47,11 @@ const Trend: React.FC<{ }), { refreshDeps: [searchTime], + ready: searchTime.key !== 'year', }, ); + const qsList = useMemo(() => { if (searchTime.key === 'year') { return cfqsYear?.map((item: any) => ({ @@ -58,7 +60,7 @@ const Trend: React.FC<{ })); } return cfqsMonth?.map((item: any) => ({ - name: item?.month, + name: item?.day, value: item?.num, })); }, [cfqsYear, cfqsMonth, searchTime]); diff --git a/src/pages/GlobalModalServices/modals/AdministPunish/index.tsx b/src/pages/GlobalModalServices/modals/AdministPunish/index.tsx index 16f284b4e96871d43439dfc690a1b09991ad4367..1ed2d9107e8fab234eed8983ad6313395284ca4e 100644 --- a/src/pages/GlobalModalServices/modals/AdministPunish/index.tsx +++ b/src/pages/GlobalModalServices/modals/AdministPunish/index.tsx @@ -1,24 +1,19 @@ -import { Flex, Progress, Space, Statistic, Tabs } from 'antd'; +import { Flex } from 'antd'; import dayjs from 'dayjs'; import { memo, useEffect, useMemo, useState } from 'react'; -import EmptySpace from '@/components/EmptySpace'; import TopSarch from '../../components/TopSarch'; -import { ChildrenModalMethods } from '../../type'; -import BaseCard from '../../components/BaseCard'; -import styles from './index.less'; import PieChart from '@/components/PieChart'; -import { useRequest } from 'ahooks'; import services from '@/services'; -import { convertUnits, formatNumber } from '@/utils/ui'; -import LineCharts from '../../components/IndLineCharts'; +import { useRequest } from 'ahooks'; +import BaseCard from '../../components/BaseCard'; +import styles from './index.less'; import Info from './Info'; import Trend from './Trend'; -import Top5 from './NumTop5'; + import NumTop5 from './NumTop5'; -import { useGlobalModalServices } from '../../provider'; -import CountUp from 'react-countup'; +import Top5 from './Top5'; /**中心城区 */ export const zxcq = [ '新都区', @@ -47,61 +42,16 @@ export const jqxc = [ '大邑县', '蒲江县', ]; -const commonStatistic = ( - value: number | string, - fontSize: number | string = 30, -) => { - return ( - ( - - )} - /> - ); -}; + /**行政处罚modal */ const AdministPunish = (props: any) => { - const { dispatch } = useGlobalModalServices(); - const {modalDispatch}=props - const [areaKey, setAreaKey] = useState('all'); + const { modalDispatch } = props; + const [searchTime, setSearchTime] = useState({ key: 'month', startTime: dayjs().startOf('month').format('YYYY-MM-DD'), endTime: dayjs().endOf('month').format('YYYY-MM-DD'), }); - const commonValueStyle = { - background: 'linear-gradient(180deg, #AAFFF6 0%, #25BBFF 100%)', - WebkitBackgroundClip: 'text', - WebkitTextFillColor: 'transparent', - fontFamily: 'D-DIN', - fontSize: '36px', - fontWeight: 700, - lineHeight: 1.1, - }; - - const commonLabelStyle = { - color: '#BCCEE9', - // fontFamily: '微软雅黑', - fontSize: '20px', - fontWeight: 400, - lineHeight: 1.1, - }; - - const commonUnitStyle = { - color: 'rgb(188, 206, 233)', - // fontFamily: '微软雅黑', - fontSize: '14px', - fontWeight: 400, - lineHeight: 1.1, - }; - //总体统计 const { data: fkjezs } = useRequest( @@ -130,119 +80,26 @@ const AdministPunish = (props: any) => { }, ]; }, [fkjezs]); - //处罚趋势年 - const { data: cfqsYear } = useRequest( - () => - services.DataBase.getSjdzInfoData({ - typeCode: 'zzcc-xzcf-aysllb', - params: { - ...searchTime, - }, - }), - { - refreshDeps: [searchTime], - ready: searchTime.key === 'year', - }, - ); - //处罚趋势子定义--月 - const { data: cfqsMonth } = useRequest( - () => - services.DataBase.getSjdzInfoData({ - typeCode: 'zzcc-xzcf-arsllb', - params: { - ...searchTime, - }, - }), - { - refreshDeps: [searchTime], - ready: searchTime.key !== 'year', - }, - ); - const qsList = useMemo(() => { - - if (searchTime.key !== 'year') { - return cfqsMonth?.data?.data?.records?.map((item) => ({ - name: item?.day, - value: item?.num, - })); - - } else { - return cfqsYear?.data?.data?.records?.map((item) => ({ - name: item?.month, - value: item?.num, - })); - } - }, [cfqsYear, cfqsMonth, searchTime]); - - //办案数量top5 - const { data: qysl } = useRequest( - () => - services.DataBase.getSjdzInfoData({ - typeCode: 'zzcc-xzcf-qysl', - params: { - ...searchTime, - }, - }), - { - refreshDeps: [searchTime], - }, - ); - const baList = useMemo(() => { - let list; - if (areaKey === 'all') { - list = qysl?.data?.data?.records?.slice(0, 5); - } - if (areaKey === 'zx') { - list = qysl?.data?.data?.records - ?.filter((item) => zxcq.includes(item?.gridName)) - ?.slice(0, 5); - } - if (areaKey === 'xc') { - list = qysl?.data?.data?.records - ?.filter((item) => csxq.includes(item?.gridName)) - ?.slice(0, 5); - } - if (areaKey === 'jq') { - list = qysl?.data?.data?.records - ?.filter((item) => jqxc.includes(item?.gridName)) - ?.slice(0, 5); - } - return list?.map((item) => ({ - ...item, - percent: ( - (item?.num /fkjezs?.data?.data?.records?.[0].cfsl) * - 100 - ).toFixed(2), - })); - }, [qysl, areaKey,fkjezs]); - - //违法行为类别top5 - const { data: wfxwsl } = useRequest( + //总体统计 + const { data } = useRequest( () => services.DataBase.getSjdzInfoData({ - typeCode: 'zzcc-xzcf-wfxwsl', + typeCode: 'zzcc-xzcf-fkjezs', params: { ...searchTime, }, + }).then((res) => { + if (res.code === 200) { + return res.data.data.records[0]; + } + throw new Error('获取数据失败'); }), { refreshDeps: [searchTime], }, ); - const wfList = useMemo(() => { - const list = wfxwsl?.data?.data?.records?.slice(0, 5); - console.log(list); - return list?.map((item) => ({ - ...item, - percent: ( - (item?.num /fkjezs?.data?.data?.records?.[0].cfsl) * - 100 - ).toFixed(2), - })); - }, [wfxwsl,fkjezs]); - useEffect(() => { modalDispatch.setOptions({ headerLeft: () => { @@ -268,292 +125,31 @@ const AdministPunish = (props: any) => { }, []); return (
-
-
-
总体情况
-
-
{ - dispatch.push('AdministPunishList', { - // headerLeft: () => { - // return ( - //
- // 备注:简易程序的案件不在此列表 - //
- // ); - // }, - props: { - searchTime, - }, - }); - }} - > -
- - 行政处罚件数 -
-
-
- {commonStatistic( - convertUnits(fkjezs?.data?.data?.records?.[0].cfsl)?.num, - )} - - - {convertUnits(fkjezs?.data?.data?.records?.[0].cfsl)?.unit} - -
- - {/*
- 环比 - - - - - 0.25 - % -
*/} -
-
-
{ - dispatch.push('AdministPunishList', { - props: { - searchTime, - }, - }); - }} - > -
- - 罚款金额 -
-
-
- {commonStatistic( - convertUnits(fkjezs?.data?.data?.records?.[0].fkze)?.num, - )} - - - { - formatNumber(fkjezs?.data?.data?.records?.[0].fkze, { - one: '元', - myriad: '万元', - })?.unit - } - -
- - {/*
- 环比 - - - - - 0.25 - % -
*/} -
-
-
-
-
-
行政处罚趋势
-
单位:件
- {qsList?.length ? ( -
- -
- ) : ( - - )} -
-
-
-
-
违法行为类型TOP5
- {wfList?.length?
- {wfList?.map((item, index) => { - return ( -
{ - dispatch.push('AdministPunishList', { - title: `${item?.wfxwlx}行政处罚列表`, - - props: { - searchTime, - wfxw: item?.wfxwlx, - }, - }); - }} - > - -
- {item?.wfxwlx} -
- -
- {item?.num} - -
-
- {Number(item?.percent ?? 0)} - % -
-
-
- - -
- ); - })} -
:} -
- -
-
办案数量TOP5
- { - setAreaKey(e); - }} - itemkey={'key'} - items={[ - { - key: 'all', - label: '全部', - }, - - { - key: 'xc', - label: '城市新区', - }, - { - key: 'zx', - label: '中心城区', - }, - { - key: 'jq', - label: '县市新城', - }, - ]} - /> - { baList?.length?
- {baList?.map((item, index) => { - return ( -
{ - dispatch.push('AdministPunishList', { - title: `${item?.gridName}行政处罚列表`, - - props: { - searchTime, - ssqy: item?.gridName, - }, - }); - }} - > - -
{item?.gridName}
- -
- {item?.num} - -
-
- {Number(item?.percent ?? 0)} - % -
-
-
- - -
- ); - })} -
:} -
- -
-
程序类型
- - {/* */} -
-
- + - +
diff --git a/src/pages/GlobalModalServices/modals/DyaPatrol/DyaPatrolList/index.tsx b/src/pages/GlobalModalServices/modals/DyaPatrol/DyaPatrolList/index.tsx index d6fb92633ca416b9f33f6fdd3c6d31f03678b640..8343b0c1efa295801534f90b962a08f49d82df00 100644 --- a/src/pages/GlobalModalServices/modals/DyaPatrol/DyaPatrolList/index.tsx +++ b/src/pages/GlobalModalServices/modals/DyaPatrol/DyaPatrolList/index.tsx @@ -24,7 +24,7 @@ const DyaPatrolList = (props:any) => { ...props?.search, ssqy:props?.ssqy, bm:props?.bm, - // ...props?.searchTime, + ...props?.searchTime, }, }), @@ -109,7 +109,7 @@ const DyaPatrolList = (props:any) => { // dataSource={tableData?.data?.data?.records} dataSource={data?.data?.data?.records?.[0]?.list || []} columns={columns} - scroll={{ x: 1050, y: 550 }} + scroll={{ x: 1050, y: 600 }} pagination={{ // total: tableData?.data?.data?.page?.total, total: data?.data?.data?.records?.[0]?.page?.total, diff --git a/src/pages/GlobalModalServices/modals/DyaPatrol/index.tsx b/src/pages/GlobalModalServices/modals/DyaPatrol/index.tsx index b527eb986b0f29b97382e8bbcaadf2e489f048fd..c0e6e8b295f1ac60ec889dbee19a2f5cd859ad16 100644 --- a/src/pages/GlobalModalServices/modals/DyaPatrol/index.tsx +++ b/src/pages/GlobalModalServices/modals/DyaPatrol/index.tsx @@ -257,7 +257,7 @@ const DyaPatrol = (props: any) => { }, { key: '2', - label: '部门排行榜TOP5', + label: '中队排行榜TOP5', }, ]; @@ -283,9 +283,12 @@ const DyaPatrol = (props: any) => { onClick={() => { dispatch.push('DyaPatrolList', { title: '巡查处置列表', - props: {}, + props: { + searchTime + }, }); }} + style={{cursor:'pointer'}} >
@@ -363,6 +366,7 @@ const DyaPatrol = (props: any) => { title: '巡查处置列表', props: { search:param, + searchTime }, }); }} @@ -405,7 +409,7 @@ const DyaPatrol = (props: any) => { name: item?.sj ? item?.sj + '时' : '', value: item?.num, }))} - style={{ width: 525, height: 60 }} + style={{ width: 525, height: 80 }} /> ) : ( @@ -509,7 +513,8 @@ const DyaPatrol = (props: any) => { dispatch.push('DyaPatrolList', { title: '巡查处置列表', props: { - ssqy:record?.ssqy + ssqy:record?.ssqy, + searchTime }, }); }, // 点击行时触发 @@ -578,7 +583,8 @@ const DyaPatrol = (props: any) => { dispatch.push('DyaPatrolList', { title: '巡查处置列表', props: { - bm:record?.bm + bm:record?.bm, + searchTime }, }); }, // 点击行时触发 diff --git a/src/pages/GlobalModalServices/modals/PipelinePassage/Overview/index.tsx b/src/pages/GlobalModalServices/modals/PipelinePassage/Overview/index.tsx index 5b195076272a87d81cff8c187eed450c288f07b4..967155703665af4250758e5e474abd4cafe1bb52 100644 --- a/src/pages/GlobalModalServices/modals/PipelinePassage/Overview/index.tsx +++ b/src/pages/GlobalModalServices/modals/PipelinePassage/Overview/index.tsx @@ -7,6 +7,8 @@ import React, { memo, useLayoutEffect, useMemo, useRef, useState } from 'react'; import BaseCard from '../../../components/BaseCard'; import styles from './index.less'; import option, { pieOption } from './option'; +import { useRequest } from 'ahooks'; +import services from '@/services'; /** @name 全市已移交纳入管理综合管廊概况 */ const Overview: React.FC = memo(() => { const [activeTab, setActiveTab] = useState('1'); @@ -38,25 +40,65 @@ const Overview: React.FC = memo(() => { '#FF9B5D', ]; + // 管廊概况 + const { data: glslData } = useRequest( + () => + services.DataBase.getSjdzInfoData({ + typeCode: 'hygl-glsl', + }).then((res) => { + if (res.code === 200) { + return res?.data?.data?.records[0] || {}; + } + throw new Error('获取数据失败'); + }) + ); + + // 区域分布 + const { data: aqyglslData } = useRequest( + () => + services.DataBase.getSjdzInfoData({ + typeCode: 'hygl-aqyglsl', + }).then((res) => { + if (res.code === 200) { + return res?.data?.data?.records || []; + } + throw new Error('获取数据失败'); + }) + ); + + // 类型分布 + const { data: alxglzsData } = useRequest( + () => + services.DataBase.getSjdzInfoData({ + typeCode: 'hygl-alxglzs', + }).then((res) => { + if (res.code === 200) { + return res?.data?.data?.records || []; + } + throw new Error('获取数据失败'); + }) + ); + + const INFO = useMemo(() => { return [ { name: '管廊条数', - value: 49, + value: glslData?.num, unit: '条', }, { name: '管廊长度', - value: 148.60, - unit: '公里', + value: glslData?.cd, + unit: glslData?.dw, }, { name: '舱室总长度', - value: 347.88, - unit: '公里', + value: glslData?.cszcd, + unit: glslData?.dw, }, ]; - }, []); + }, [glslData]); const tabItems = useMemo( () => [ @@ -78,30 +120,24 @@ const Overview: React.FC = memo(() => { const BarOption = useMemo(() => { const temp = cloneDeep(option) as any; - const xAxis = [ - '高新区', - '青羊区', - '武侯区', - '成华区', - '新都区', - '双流区', - '郫都区', - '简阳市', - '金堂县', - '龙泉驿区', - ]; - const yAxis = [2.80, 7.29, 9.34, 2.18, 0.81, 49.58, 9.33, 17.77, 11.62, 37.85]; + const xAxis = aqyglslData?.map(v => v.qymc); + const yAxis = aqyglslData?.map(v => v.num);; temp.xAxis[0].data = xAxis; temp.series[0].data = yAxis; return temp; - }, []); + }, [aqyglslData]); const PieOption = useMemo(() => { const temp = cloneDeep(pieOption) as any; temp.color = colors; - temp.series[0].data = pieData; + temp.series[0].data = alxglzsData?.map(v => { + return { + value: v.cd, + name: v.lx + }; + }) || []; return temp; - }, []); + }, [alxglzsData]); return ( @@ -113,6 +149,7 @@ const Overview: React.FC = memo(() => { unit={item.unit} name={item.name} key={item.name} + decimals={Number.isInteger(item.value) ? 0 : 2} /> ); })} @@ -166,18 +203,18 @@ const Overview: React.FC = memo(() => {
- {pieData.map((item, index) => { + {alxglzsData.map((item, index) => { return (
-
{item.name}
+
{item.lx}
{/*
{item.value} 条
*/}
- {item.count} + {item.num} - {item.value} - 公里 + {item.cd} + {item.dw}
diff --git a/src/pages/GlobalModalServices/modals/PipelinePassage/PipeGalleryMaintenanceStatus/index.tsx b/src/pages/GlobalModalServices/modals/PipelinePassage/PipeGalleryMaintenanceStatus/index.tsx index 46d00f112d42bbaea54f64843e0829e68086f121..ce41d0aa9c055ca5f2ddd05de2aa9ab219e39dc3 100644 --- a/src/pages/GlobalModalServices/modals/PipelinePassage/PipeGalleryMaintenanceStatus/index.tsx +++ b/src/pages/GlobalModalServices/modals/PipelinePassage/PipeGalleryMaintenanceStatus/index.tsx @@ -44,7 +44,9 @@ const PipeGalleryMaintenanceStatus: React.FC = () => { ]; // const yAxis = [1652, 1652, 1652, 1652, 1652, 1652, 1652]; temp.xAxis[0].data = xAxis; - + temp.grid = { + bottom: '5%' + } const lineSeries = [ { name: '本体维护保养', diff --git a/src/pages/GlobalModalServices/modals/SanitationDisp/TimeLineCharts/index.tsx b/src/pages/GlobalModalServices/modals/SanitationDisp/TimeLineCharts/index.tsx index 05e9fabcf37b7d993745921e4c06940ffd7d6907..a8a3ae2aa0e1c4fef073f1c2e6b754f579a7ab3f 100644 --- a/src/pages/GlobalModalServices/modals/SanitationDisp/TimeLineCharts/index.tsx +++ b/src/pages/GlobalModalServices/modals/SanitationDisp/TimeLineCharts/index.tsx @@ -32,10 +32,10 @@ const LineCharts = ({ data,style }: { data: any[],style:CSSProperties }) => { show: false, }, grid: { - left: 20, // 左边距 - right: '0', // 右边距 + left: '4%', // 左边距 + right: '3%', // 右边距 top: '0', // 上边距 - bottom: 20 // 下边距 + bottom: '15%' // 下边距 }, series: [ { diff --git a/src/pages/GlobalModalServices/modals/SanitationDisp/index.tsx b/src/pages/GlobalModalServices/modals/SanitationDisp/index.tsx index 6fec3aeb0c5b717552dfa2474f72cfe315edaee0..1cd26981a3158eb5dd26cf6f2e602e0cbc89cf3a 100644 --- a/src/pages/GlobalModalServices/modals/SanitationDisp/index.tsx +++ b/src/pages/GlobalModalServices/modals/SanitationDisp/index.tsx @@ -273,6 +273,7 @@ const SanitationDisp = (props: any) => { props: { searchTime, industry: industry, + highIncidenceTypeId:item?.id }, }); }} @@ -388,6 +389,7 @@ const SanitationDisp = (props: any) => { props: { searchTime, industry: industry, + objectId:item?.id }, }); }} diff --git a/src/pages/GlobalModalServices/modals/SanitationEvent/index.tsx b/src/pages/GlobalModalServices/modals/SanitationEvent/index.tsx index 16857edef5a4c797ad0fddf87415afa111f2202b..51b1daabee6884561e4dcb1d7c1003add041ce9d 100644 --- a/src/pages/GlobalModalServices/modals/SanitationEvent/index.tsx +++ b/src/pages/GlobalModalServices/modals/SanitationEvent/index.tsx @@ -11,7 +11,14 @@ import { useGlobalModalServices } from '../../provider'; import styles from './index.less'; const CgftEvent = (props: any) => { - const { searchTime, status, dueStatus, industry } = props; + const { + searchTime, + status, + dueStatus, + industry, + objectId, + highIncidenceTypeId, + } = props; const { initialState } = useModel('@@initialState'); const { areaId } = initialState; const { dispatch } = useGlobalModalServices(); @@ -31,11 +38,12 @@ const CgftEvent = (props: any) => { page: 1, count: 10, industry: industry || '02', - objectId: areaId, + objectId: objectId || areaId, + highIncidenceTypeId: highIncidenceTypeId, }); console.log(industry); - - const { data } = useRequest( + + useRequest( () => services.Physicalsign.getNormalEventList({ ...fetchParams, @@ -57,13 +65,36 @@ const CgftEvent = (props: any) => { }, }, ); + // useRequest( + // () => + // services.Physicalsign.getHighIncidenceTypeRoadEventList({ + // ...fetchParams, + // ...searchTime, + // eventStatus, + // overdueStatus, + // industry: industry || '02', + // }), + // { + // refreshDeps: [fetchParams, eventStatus, overdueStatus], + // onSuccess: (res) => { + // const data = res?.data?.items; + // const list = [...listData?.items, ...data]; + + // setListData({ + // hasNext: res?.data?.hasNext, + // items: list, + // }); + // }, + // }, + // ); + const { data: count } = useRequest( () => services.Physicalsign.getOverdueStatusCount({ ...searchTime, eventStatus: '处置中', industry: industry || '02', - objectId: areaId, + objectId: objectId || areaId, }), { refreshDeps: [eventStatus], diff --git a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.less b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.less index 7414dee1932617d7024ecbe2a85ed54bcc76b1cf..44e063629ec9d12bd541cdea33d8d1f174e058ba 100644 --- a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.less +++ b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.less @@ -33,6 +33,7 @@ .ant-picker-outlined { // background: transparent !important; } + .ant-picker-cell-inner { background: #326FA7 !important; } @@ -51,7 +52,7 @@ height: 58px; transform: rotate(90deg); margin-left: 20px; - } + } .platform { // width: 488px; @@ -236,6 +237,24 @@ } } } + + .cityIssue { + margin-top: 40px; + padding-left: 21px; + background-color: rgba(71, 101, 165, 0.307); + height: 72px; + border-radius: 10px; + display: flex; + align-items: center; + .label{ +width: 55%; +font-size: 20px; + } + .numWarp{ + display: flex; + align-items: center; + } + } } } diff --git a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx index c4a161373209739abf8d467a9f0b85f3d36fd6e5..1b4c8cd40bcf3f84feb933ead76646eb44217566 100644 --- a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx +++ b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx @@ -1,15 +1,15 @@ +import upIcon from '@/assets/images/urbanSituation/up.png'; import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider'; import services from '@/services'; import { convertUnits, formatNumber } from '@/utils/ui'; import { useRequest } from 'ahooks'; -import { Flex, Progress, Statistic, StatisticProps } from 'antd'; +import { Flex, Statistic, StatisticProps } from 'antd'; import dayjs from 'dayjs'; import { useEffect, useMemo, useState } from 'react'; import CountUp from 'react-countup'; import DateSelect from './DateSelect'; import styles from './index.less'; import LineCharts from './LineCharts'; -import upIcon from '@/assets/images/urbanSituation/up.png'; const formatter: StatisticProps['formatter'] = (value: any) => { return ( { }, []); const getSearchTime = (searchParams: any) => { - const { type, time } = searchParams + const { type, time } = searchParams; if (type === '3') { - return dayjs(time).format('YYYY-MM-DD') + return dayjs(time).format('YYYY-MM-DD'); } else if (type === '2') { - return dayjs(time).format('YYYY-MM') + return dayjs(time).format('YYYY-MM'); } else if (type === '1') { - return dayjs(time).format('YYYY') + return dayjs(time).format('YYYY'); } - } + }; const platformList = useMemo(() => { //市运行平台 @@ -139,7 +139,7 @@ const OperatingSituation = () => { name: item.time, })), onClick: () => { - console.log(getSearchTime(searchParams)) + console.log(getSearchTime(searchParams)); dispatch?.push('UrbanOperation' as any, { title: '12345市民投诉', @@ -296,10 +296,10 @@ const OperatingSituation = () => {
- + {platformList?.map((item) => { return ( - +
{ @@ -333,7 +333,7 @@ const OperatingSituation = () => { /> */}
-
城市管理综合问题总数
+
城市管理类问题总数
{ }), ) || [] } - style={{ width: '100%', height: 64 }} + style={{ width: '100%', height: 104 }} />
@@ -409,7 +409,7 @@ const OperatingSituation = () => { }} > @@ -419,10 +419,10 @@ const OperatingSituation = () => { convertUnits(data?.data?.disposing?.value)?.num, )} - {convertUnits(data?.data?.disposing?.value)?.unit} + {convertUnits(data?.data?.need?.value)?.unit}
-
处置中
+
应处置
@@ -438,12 +438,12 @@ const OperatingSituation = () => { {convertUnits(data?.data?.close?.value)?.unit}
-
已结案
+
已处置
@@ -452,16 +452,16 @@ const OperatingSituation = () => { %
-
结案率
+
处置率
-
+ {/*
疑难问题
{
+
*/} +
+
城市管理类疑难问题
+
+ {commonStatistic( + convertUnits(DEDataSource?.cityManageEventTotal)?.num, + 30, + )} + + {convertUnits(DEDataSource?.cityManageEventTotal)?.unit} + +
diff --git a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/Advertisement/index.tsx b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/Advertisement/index.tsx index c0b1a58525f3639e8ff3484d3d04405488516286..4c0e6f15d9dca54bffd599b75cbd806d81208a36 100644 --- a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/Advertisement/index.tsx +++ b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/Advertisement/index.tsx @@ -49,7 +49,7 @@ const Advertisement: React.FC = () => { const getData = () => { const params = { industry: '01', - dateType: 'today', + dateType: 'monthly', objectId: areaId, }; services.Physicalsign.getNormalEventCountApi(params).then((res: any) => { @@ -117,13 +117,13 @@ const Advertisement: React.FC = () => {
diff --git a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/CityLighting/index.tsx b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/CityLighting/index.tsx index 720903b0774824fe7f274e70fd17157190f41d1d..b5caa9ae0bf413d25442aff38c9f8675fd4dc8bc 100644 --- a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/CityLighting/index.tsx +++ b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/CityLighting/index.tsx @@ -104,6 +104,13 @@ const CityLighting: React.FC = () => { value={dataSource?.yesterdayLightRate} name="昨日亮灯率" unit="%" + onClick={() => { + dispatch.push('UrbanLighting', { + props: { + metaData: dataSource, + }, + }); + }} valueStyle={commonValueStyle} labelStyle={commonLabelStyle} unitStyle={commonUnitStyle} diff --git a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/MunicipalFacilities/index.tsx b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/MunicipalFacilities/index.tsx index 2dc60ab19a5dc1b362f92938bfb31ebadbac940c..6cd0749bf118883be97140b73337dda6641ea4eb 100644 --- a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/MunicipalFacilities/index.tsx +++ b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/MunicipalFacilities/index.tsx @@ -7,6 +7,8 @@ import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider'; import { Flex } from 'antd'; import React from 'react'; import styles from './index.less'; +import { useRequest } from 'ahooks'; +import services from '@/services'; const MunicipalFacilities: React.FC = () => { const { dispatch } = useGlobalModalServices(); @@ -54,6 +56,20 @@ const MunicipalFacilities: React.FC = () => { }); }; + // 管廊数据 + const { data: glzsData } = useRequest( + () => + services.DataBase.getSjdzInfoData({ + typeCode: 'hygl-glzs', + }).then((res) => { + if (res.code === 200) { + return res?.data?.data?.records[0] || {}; + } + throw new Error('获取数据失败'); + }) + ); + + return (
{/* 城市道桥区域 */} @@ -120,7 +136,7 @@ const MunicipalFacilities: React.FC = () => { { }} /> { const { dispatch } = useGlobalModalServices(); - + const cards = useMemo( () => [ { @@ -47,7 +47,7 @@ const IndustryOperationV4: React.FC = () => { ], }, { - title: '市容广招', + title: '市容广告', children: , popverSystem: [ { @@ -55,7 +55,7 @@ const IndustryOperationV4: React.FC = () => { url: 'http://171.221.172.80:6888/eUrbanMIS/main.htm', }, ], - }, + }, { title: '市政设施', children: , @@ -107,33 +107,33 @@ const IndustryOperationV4: React.FC = () => {
- - - {cards.slice(0, 3).map((card) => ( - - {card.children} - - ))} - - - {cards.slice(3).map((card) => ( - - {card.children} - - ))} - + + + {cards.slice(0, 3).map((card) => ( + + {card.children} + + ))} + + + {cards.slice(3).map((card) => ( + + {card.children} + + ))} +
); }; -export default IndustryOperationV4; \ No newline at end of file +export default IndustryOperationV4; diff --git a/src/services/Physicalsign.ts b/src/services/Physicalsign.ts index 3dd3c76fe75314574a6a130931a9e7d095ccce3a..ea7c52d0466124e92971524bd0e0184d555063e7 100644 --- a/src/services/Physicalsign.ts +++ b/src/services/Physicalsign.ts @@ -496,6 +496,13 @@ export async function getNormalEventList(params: any): Promise { params, }); } + +export async function getHighIncidenceTypeRoadEventList(params: any): Promise { + return request(urlProxyApis(`/normalEvent/getHighIncidenceTypeRoadEventList`), { + method: 'GET', + params, + }); +} //normalEvent/getOverdueStatusCount?objectId=&industry=&dateType=&startTime=&endTime=&eventStatus= export async function getOverdueStatusCount(params: any): Promise { return request(urlProxyApis(`/normalEvent/getOverdueStatusCount`), {