From 8bda79880ff7bf429c24dea69119be5a595302eb Mon Sep 17 00:00:00 2001 From: fandaiyang <1147379969@qq.com> Date: Mon, 13 Jan 2025 16:56:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BD=93=E5=BE=81=E4=B8=8B=E9=92=BB?= =?UTF-8?q?=E3=80=81=E8=BF=90=E8=A1=8C=E6=80=81=E5=8A=BF=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TraceSourceOfLostPoints/index.tsx | 72 ++++---- .../modals/InfluenceSignNew/index.less | 104 ++++++++++++ .../modals/InfluenceSignNew/index.tsx | 158 ++++++++++++++++++ .../UrbanOperation/LineCharts/index.tsx | 6 + src/pages/GlobalModalServices/registry.tsx | 14 ++ .../OperatingSituation/LineCharts/index.tsx | 19 +-- .../OperatingSituation/index.less | 23 ++- .../OperatingSituation/index.tsx | 67 ++++---- .../MapCantainer/EmphasisAreaMap/index.tsx | 5 +- src/services/Physicalsign.ts | 11 ++ 10 files changed, 399 insertions(+), 80 deletions(-) create mode 100644 src/pages/GlobalModalServices/modals/InfluenceSignNew/index.less create mode 100644 src/pages/GlobalModalServices/modals/InfluenceSignNew/index.tsx diff --git a/src/pages/GlobalModalServices/modals/Category/TraceSourceOfLostPoints/index.tsx b/src/pages/GlobalModalServices/modals/Category/TraceSourceOfLostPoints/index.tsx index c28c0ae5..3840a8e0 100644 --- a/src/pages/GlobalModalServices/modals/Category/TraceSourceOfLostPoints/index.tsx +++ b/src/pages/GlobalModalServices/modals/Category/TraceSourceOfLostPoints/index.tsx @@ -26,7 +26,7 @@ const TraceSourceOfLostPoints: React.FC = ( let newData: any = []; data?.forEach((item) => { item['value'] = item?.lostScore > 0 ? `-${item?.lostScore}` : ''; - item['collapsed'] = false; + item['collapsed'] = true; newData.push(item); if (item.children && item.children.length) { item.children = deepData(item.children); @@ -37,6 +37,7 @@ const TraceSourceOfLostPoints: React.FC = ( const handleDataCollapsed = (data: any) => { data?.forEach((item: any) => { + item.collapsed = false if (item.children && item.children.length) { item.children.forEach((v: any) => { v.collapsed = true; @@ -147,45 +148,52 @@ const TraceSourceOfLostPoints: React.FC = ( const onChartClick = (params: any) => { const { data } = params; - data.collapsed = false + // data.collapsed = false console.log(data) if (data.lastFlag === '1' && showLostPoints) { - console.log('点击了lastFlag节点'); - services.Physicalsign.getlistTopNItems({ - indexType: data.indexType, - physicalSignType: 1, - objectId: areaId, - indexId: data.id, - n: 100, - }).then((res) => { - if (res.code === 200) { - const resdata: any = res.data; - if (resdata?.length) { - data.children = resdata?.map((v: any) => { - return { - ...v, - name: v.conditionName, - collapsed: false, - value: v.deduction > 0 ? `-${v.deduction}` : '' - } - }) - console.log(data) - const series = echartsRef.current?.getEchartsInstance()?._model.option.series - console.log(series) - // 更新 - echartsRef.current?.getEchartsInstance().setOption({ series: series }) - } - } - }); - } - if (data?.conditionId) { + console.log('点击了lastFlag2节点'); console.log('jump InfluenceSign') - dispatch.push('InfluenceSign', { + dispatch.push('InfluenceSignNew', { + title: `${data.name}问题`, props: { data: data, }, }); + // services.Physicalsign.getlistTopNItems({ + // indexType: data.indexType, + // physicalSignType: 1, + // objectId: areaId, + // indexId: data.id, + // n: 100, + // }).then((res) => { + // if (res.code === 200) { + // const resdata: any = res.data; + // if (resdata?.length) { + // data.children = resdata?.map((v: any) => { + // return { + // ...v, + // name: v.conditionName, + // collapsed: false, + // value: v.deduction > 0 ? `-${v.deduction}` : '' + // } + // }) + // console.log(data) + // const series = echartsRef.current?.getEchartsInstance()?._model.option.series + // console.log(series) + // // 更新 + // echartsRef.current?.getEchartsInstance().setOption({ series: series }) + // } + // } + // }); } + // if (data?.conditionId) { + // console.log('jump InfluenceSign') + // dispatch.push('InfluenceSign', { + // props: { + // data: data, + // }, + // }); + // } }; return ( diff --git a/src/pages/GlobalModalServices/modals/InfluenceSignNew/index.less b/src/pages/GlobalModalServices/modals/InfluenceSignNew/index.less new file mode 100644 index 00000000..145bfc89 --- /dev/null +++ b/src/pages/GlobalModalServices/modals/InfluenceSignNew/index.less @@ -0,0 +1,104 @@ +.itemContainer { + width: 100%; + height: 107px; + border-radius: 20px; + background: rgba(57, 122, 183, 0.2); + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; + margin-bottom: 15px; + cursor: pointer; + + .left { + display: flex; + align-items: center; + + .imgContent { + width: 81px; + height: 81px; + border-radius: 16px; + + .tag { + width: 52px; + height: 24px; + background: #fcb129; + border-radius: 12px; + color: white; + // font-style: italic; + text-align: center; + margin-top: 6px; + margin-left: 7px; + } + } + + .titleContent { + margin-left: 16px; + height: 55px; + + display: flex; + flex-direction: column; + justify-content: space-between; + + .title { + font-family: PingFang SC; + font-weight: 800; + font-size: 20px; + color: #fff; + line-height: 10px; + } + + .address { + font-family: PingFang SC; + font-weight: 500; + font-size: 16px; + color: #caecff; + line-height: 10px; + } + } + } + + .right { + width: 448px; + height: 75px; + border-radius: 50px; + background: rgb(32, 78, 121); + display: flex; + padding: 0 10px; + + .item { + width: 109px; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-radius: 20px; + color: #caecff; + + .count { + background: linear-gradient( + 180deg, + rgb(170, 255, 246), + rgb(37, 187, 255) + ); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + font-family: D-DIN; + font-size: 22px; + font-weight: 700; + + span { + font-family: PingFang SC; + font-weight: 500; + } + } + + .name { + font-family: PingFang SC; + font-weight: 500; + } + } + } +} \ No newline at end of file diff --git a/src/pages/GlobalModalServices/modals/InfluenceSignNew/index.tsx b/src/pages/GlobalModalServices/modals/InfluenceSignNew/index.tsx new file mode 100644 index 00000000..7a699598 --- /dev/null +++ b/src/pages/GlobalModalServices/modals/InfluenceSignNew/index.tsx @@ -0,0 +1,158 @@ +import EventPicList from '@/pages/Common/components/EventPicList'; +import services from '@/services'; +import { useModel } from '@umijs/max'; +import { Divider, Space } from 'antd'; +import { useEffect, useRef, useState } from 'react'; +import { ChildrenModalMethods } from '../../type'; +import styles from './index.less'; + +/** + * + * @description 影响指标 + */ + +const InfluenceSignNew = (props: { + data: any; + modalDispatch: ChildrenModalMethods; +}) => { + const { initialState } = useModel('@@initialState'); + const { areaId } = initialState; + const { data, modalDispatch } = props; + + const params = { + page: 1, + count: 10, + objectId: areaId, + // conditionId: data?.conditionId, + indexId: data?.id, + finished: false, + }; + + const fetchParams = useRef(params); + + //事件列表 + const [listData, setListData] = useState({ + items: [], + loading: true, + total: 0, + page: 1, + hasNext: false, + }); + + const getListData = async () => { + + const res = await services.Physicalsign.getPhysicalsignindexPageCaseInfoVO( + params, + ); + if (res.code === 200) { + let items = res.data.items.map((item: any) => ({ + ...item, + standardEventTitle: item?.conditionName, + caseStatusText: item?.eventStatusText, + collectionModeName: item?.sourceText, + address: item?.eventAddress, + reportTime: item?.eventCreateTime, + disposePicPath: item?.eventImageUrl, + })); + let result = { + ...res.data, + items: + fetchParams.current.page === 1 + ? items + : [...listData.items, ...items], + }; + setListData(result); + } + }; + + useEffect(() => { + getListData(); + }, []); + + return ( +
+ {/*
+
+
+
{data?.conditionName}
+
{data?.fullName}
+
+
+
+
+ +
+ {data?.percentage} +
+ % +
+
影响占比
+
+ +
+ +
+ {data?.count} +
+ +
+
问题数量
+
+ +
+
+ {' '} + {data?.deduction} +
+
体征扣分
+
+ +
+
+ {data?.weight} +
+
指标权重
+
+
+
*/} + + { + fetchParams.current.page = page; + getListData(); + }} + handleDetail={(details) => { + modalDispatch.push( + 'EventDetail', + { + w: 'fit-content', + props: { + eventId: details.eventId, + }, + }, + 1, + ); + }} + /> +
+ ); +}; + +export default InfluenceSignNew; diff --git a/src/pages/GlobalModalServices/modals/UrbanOperation/LineCharts/index.tsx b/src/pages/GlobalModalServices/modals/UrbanOperation/LineCharts/index.tsx index 7e8cd864..7b408b4b 100644 --- a/src/pages/GlobalModalServices/modals/UrbanOperation/LineCharts/index.tsx +++ b/src/pages/GlobalModalServices/modals/UrbanOperation/LineCharts/index.tsx @@ -8,6 +8,11 @@ const LineCharts = ({ data }: { data: any[] }) => { return { tooltip: { trigger: 'axis', + borderWidth: '0', + backgroundColor: 'rgba(73,81,92,.95)', //背景颜色 + textStyle: { + color: '#fff', //字体颜色 + }, }, xAxis: { type: 'category', @@ -37,6 +42,7 @@ const LineCharts = ({ data }: { data: any[] }) => { data: chartData, symbol: "none", type: 'line', + smooth: true, lineStyle: { color: "#57EFE5", }, diff --git a/src/pages/GlobalModalServices/registry.tsx b/src/pages/GlobalModalServices/registry.tsx index 30e3cdb5..b88c35a6 100644 --- a/src/pages/GlobalModalServices/registry.tsx +++ b/src/pages/GlobalModalServices/registry.tsx @@ -25,6 +25,7 @@ import EventDetail from './modals/EventDetail'; import GeneralSituation from './modals/GeneralSituation'; import IndustrySystem from './modals/IndustrySystem'; import InfluenceSign from './modals/InfluenceSign'; +import InfluenceSignNew from './modals/InfluenceSignNew'; import KeyArea from './modals/KeyArea'; import KeyAreaDetail from './modals/KeyAreaDetail'; import LightingFaultDisposal from './modals/LightingFaultDisposal'; @@ -73,6 +74,19 @@ export default class Registry { defaultProps: {}, modal: InfluenceSign, }, + /** + * 行业指数弹窗(new) + * @module DistrictIndex + * @see DistrictIndex.RightBox + */ + InfluenceSignNew: { + defaultConfig: { + w: 1470, + h: 846, + }, + defaultProps: {}, + modal: InfluenceSignNew, + }, /** * 体征模型 * @module overview diff --git a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/LineCharts/index.tsx b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/LineCharts/index.tsx index fa2c259e..e9297281 100644 --- a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/LineCharts/index.tsx +++ b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/LineCharts/index.tsx @@ -18,12 +18,10 @@ const LineCharts = ({ data, style }: { data: any[]; style: CSSProperties }) => { }, tooltip: { trigger: 'axis', - axisPointer: { - type: 'line', - lineStyle: { - color: 'rgba(255,255,255,.5)', - width: 2, - }, + borderWidth: '0', + backgroundColor: 'rgba(73,81,92,.95)', //背景颜色 + textStyle: { + color: '#fff', //字体颜色 }, }, yAxis: { @@ -31,10 +29,10 @@ const LineCharts = ({ data, style }: { data: any[]; style: CSSProperties }) => { show: false, }, grid: { - left: 0, // 左边距 - right: 0, // 右边距 - top: 0, // 上边距 - bottom: 0, // 下边距 + left: '2%', // 左边距 + right: '2%', // 右边距 + top: '5%', // 上边距 + bottom: '5%', // 下边距 }, series: [ { @@ -43,6 +41,7 @@ const LineCharts = ({ data, style }: { data: any[]; style: CSSProperties }) => { smooth: true, type: 'line', lineStyle: { + width: 2, color: '#57EFE5', }, diff --git a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.less b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.less index 8ded8d6b..7414dee1 100644 --- a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.less +++ b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.less @@ -42,21 +42,30 @@ .content { display: flex; - justify-content: space-between; + // justify-content: space-between; padding: 0 20px; margin-top: 32px; + .upIcon { + width: 24px; + height: 58px; + transform: rotate(90deg); + margin-left: 20px; + } + .platform { - width: 488px; + // width: 488px; + flex: 1; .platItem { + width: calc(100% - 64px); height: 84px; background: rgba(67, 112, 180, 0.313); border-radius: 10px; display: flex; align-items: center; justify-content: space-between; - margin-bottom: 13px; + // margin-bottom: 13px; padding: 0 25px; .title { @@ -66,8 +75,12 @@ } .countWarp { + width: 130px; display: flex; align-items: center; + cursor: pointer; + text-align: right; + justify-content: flex-end; .unit { font-size: 14px; @@ -205,8 +218,8 @@ align-items: center; .dot { - width: 8px; - height: 8px; + width: 12px; + height: 12px; } diff --git a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx index b5e346a8..c4a16137 100644 --- a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx +++ b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx @@ -2,13 +2,14 @@ import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider'; import services from '@/services'; import { convertUnits, formatNumber } from '@/utils/ui'; import { useRequest } from 'ahooks'; -import { Progress, Statistic, StatisticProps } from 'antd'; +import { Flex, Progress, 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 ( { getDifficultData(); }, []); - const getSearchTime = (searchParams:any) => { + const getSearchTime = (searchParams: any) => { const { type, time } = searchParams - if(type === '3') { + if (type === '3') { return dayjs(time).format('YYYY-MM-DD') - } else if(type === '2') { + } else if (type === '2') { return dayjs(time).format('YYYY-MM') - } else if(type === '1') { + } else if (type === '1') { return dayjs(time).format('YYYY') } } @@ -295,37 +296,41 @@ const OperatingSituation = () => {
-
+ {platformList?.map((item) => { return ( -
{ - item?.onClick?.(); - }} - > -
{item?.name}
- + +
{ + item?.onClick?.(); + }} + > +
{item?.name}
+ -
- {commonStatistic(convertUnits(item.value)?.num, 30)} - - {convertUnits(item.value)?.unit} - +
+ + {commonStatistic(convertUnits(item.value)?.num, 30)} + + + {convertUnits(item.value)?.unit} + +
-
+ +
); })} -
- + {/* + /> */}
城市管理综合问题总数
@@ -483,17 +488,17 @@ const OperatingSituation = () => { (DEDataSource?.cityManageEventTotal / (DEDataSource?.total ?? 0)) * 100, - strokeColor: 'rgb(255, 198, 20)', + strokeColor: '#8BD3FF', }} showInfo={false} - strokeColor="rgb(255, 95, 95)" + strokeColor="#CCFFB1" />
城市管理类 {commonStatistic( @@ -507,7 +512,7 @@ const OperatingSituation = () => {
其它 {commonStatistic( diff --git a/src/pages/SecurityServiceOverview/components/MapCantainer/EmphasisAreaMap/index.tsx b/src/pages/SecurityServiceOverview/components/MapCantainer/EmphasisAreaMap/index.tsx index c6f83fdf..464b8833 100644 --- a/src/pages/SecurityServiceOverview/components/MapCantainer/EmphasisAreaMap/index.tsx +++ b/src/pages/SecurityServiceOverview/components/MapCantainer/EmphasisAreaMap/index.tsx @@ -182,11 +182,12 @@ const EmphasisAreaMap: React.FC = () => { top: -50, }} onDetail={(e) => { + console.log('areaSelectd', areaSelectd) dispatch.push('KeyAreaDetail', { title: areaSelectd.objectName, props: { - objectId: areaSelectd?.objectId, - cqi: areaSelectd?.qualitySign, + objectId: areaSelectd?.currentIndex?.objectId, + cqi: areaSelectd?.currentIndex?.cqi, }, }); }} diff --git a/src/services/Physicalsign.ts b/src/services/Physicalsign.ts index 19316aa1..3dd3c76f 100644 --- a/src/services/Physicalsign.ts +++ b/src/services/Physicalsign.ts @@ -170,6 +170,17 @@ export async function getIndexSystem( }); } +/** + * @description 指标体系查询, + */ +export async function getExpendIndexSystem( + params: any, +): Promise> { + return request(urlProxyApis(`/physicalSignIndex/getExpendIndexSystem`), { + params, + }); +} + /** * @description 具体问题列表 */ -- GitLab