diff --git a/src/pages/GlobalModalServices/components/BothwayBar/index.tsx b/src/pages/GlobalModalServices/components/BothwayBar/index.tsx index 6f7d15477fa0e298261665263dc95a9dd48f0182..ef07d09a2c7126c6c64a5fcc31580e4e805cd7d3 100644 --- a/src/pages/GlobalModalServices/components/BothwayBar/index.tsx +++ b/src/pages/GlobalModalServices/components/BothwayBar/index.tsx @@ -81,12 +81,27 @@ const BothwayBar = (props: any) => { const option = useMemo(() => { return { + // tooltip: { + // trigger: 'item', + // confine: true, + // formatter: '{b0}: {c0}', + // borderWidth: '0', + // backgroundColor: 'rgba(73,81,92,.95)', //背景颜色 + // textStyle: { + // color: '#fff', //字体颜色 + // }, + // }, tooltip: { show: true, trigger: 'axis', axisPointer: { type: 'shadow', }, + borderWidth: '0', + backgroundColor: 'rgba(73,81,92,.95)', //背景颜色 + textStyle: { + color: '#fff', //字体颜色 + }, }, // legend: { // left: 'center', diff --git a/src/pages/GlobalModalServices/components/IndLineCharts/index.tsx b/src/pages/GlobalModalServices/components/IndLineCharts/index.tsx index 2cae99cea623d878241162f171b34b82f5c71761..6a78945f7ad2f15e3e92f19281b2e028bbd18c88 100644 --- a/src/pages/GlobalModalServices/components/IndLineCharts/index.tsx +++ b/src/pages/GlobalModalServices/components/IndLineCharts/index.tsx @@ -17,6 +17,7 @@ const LineCharts = ({ data, style }: { data: any[]; style: CSSProperties }) => { }, }, tooltip: { + formatter: '{b0}: {c0}', trigger: 'axis', borderWidth: '0', backgroundColor: 'rgba(73,81,92,.95)', //背景颜色 diff --git a/src/pages/GlobalModalServices/components/TimeLineCharts/index.tsx b/src/pages/GlobalModalServices/components/TimeLineCharts/index.tsx index c3834eb7a1d44bbfcc29bdcc4218a9f3df15bf1d..d48c3e4b1aaa8a0cb3b9bb6b0b2d9b2cd4c9c158 100644 --- a/src/pages/GlobalModalServices/components/TimeLineCharts/index.tsx +++ b/src/pages/GlobalModalServices/components/TimeLineCharts/index.tsx @@ -20,6 +20,7 @@ const LineCharts = ({ data,style }: { data: any[],style:CSSProperties }) => { }, }, tooltip: { + formatter: '{b0}: {c0}', trigger: 'axis', borderWidth: '0', backgroundColor: 'rgba(73,81,92,.95)', //背景颜色 diff --git a/src/pages/GlobalModalServices/components/TopSarch/Tabs/index.less b/src/pages/GlobalModalServices/components/TopSarch/Tabs/index.less new file mode 100644 index 0000000000000000000000000000000000000000..f64070dbb99994e881dda48f5a9488457a86d6c0 --- /dev/null +++ b/src/pages/GlobalModalServices/components/TopSarch/Tabs/index.less @@ -0,0 +1,36 @@ +.tabWrap { + width: fit-content; + height: 40px; + border-radius: 25px; + background: rgb(18, 61, 102); + display: flex; + + > div { + min-width: 44px; + padding: 0 18px; + font-weight: 500; + font-size: 16px; + color: #6194C7; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + white-space: nowrap; + font-family: DingTalk JinBuTi; + > span { + line-height: normal; + + } + } + + .active { + border-radius: 25px; + background: linear-gradient( + 180deg, + rgb(28, 192, 255), + rgb(82, 148, 255) 100% + ) !important; + color: #ffffff; + } +} diff --git a/src/pages/GlobalModalServices/components/TopSarch/Tabs/index.tsx b/src/pages/GlobalModalServices/components/TopSarch/Tabs/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..7aab5617c3b9f9018c35ca5eb4283a4b3db13c3b --- /dev/null +++ b/src/pages/GlobalModalServices/components/TopSarch/Tabs/index.tsx @@ -0,0 +1,91 @@ +import { useDebounceFn } from 'ahooks'; +import classNames from 'classnames'; +import { useEffect, useRef, useState } from 'react'; +import styles from './index.less'; + +interface TabsProps { + onChange?: (type: string) => void; + items?: TabItem[]; + defaultValue?: string; + style?: React.CSSProperties; //父元素属性 + itemStyle?: React.CSSProperties; //每个item的属性 + itemkey?: string; //指定 key 值 + active:any, + setActive:(val:any)=>void +} +/** + * @description: tabs组件 + */ +export interface TabItem { + label: string | React.ReactNode; + key?: string; + icon?: string; + [key: string]: any; + +} +const Tabs = (props: TabsProps) => { + const { onChange, items, defaultValue, style, itemStyle, itemkey,active,setActive } = props; + // const [active, setActive] = useState(defaultValue); + const initStatus = useRef(true); + + // useEffect(() => { + // if (initStatus.current) { + // if (items && items.length > 0) { + // let type = itemkey ? items[0][itemkey] : items[0].key; + // setActive(defaultValue || type); + // initStatus.current = false; + // } + // } + // }, [items]); + + const handleChange = async (type: string) => { + if(onChange) { + onChange(type) + } + }; + + //函数防抖 + const { run } = useDebounceFn( + (type: string) => { + handleChange(type); + }, + { + wait: 500, + leading: true, + }, + ); + + return ( +
+ {items?.map((v, index) => ( +
{ + e.stopPropagation(); + let type = itemkey ? v[itemkey] : v.key; + setActive(type); + run(type); + }} + > + {v.icon && ( + + )} + {v.label} +
+ ))} +
+ ); +}; + +export default Tabs; diff --git a/src/pages/GlobalModalServices/components/TopSarch/index.tsx b/src/pages/GlobalModalServices/components/TopSarch/index.tsx index 62b4d3adcfd741fc08724e640261759dbc8a666e..052e3ef955a4cb2c645314c0d47a08dfc75d9752 100644 --- a/src/pages/GlobalModalServices/components/TopSarch/index.tsx +++ b/src/pages/GlobalModalServices/components/TopSarch/index.tsx @@ -1,18 +1,25 @@ -import Tabs from '@/components/Tabs'; import { DatePicker } from 'antd'; import dayjs from 'dayjs'; +import { useState } from 'react'; import styles from './index.less'; +import Tabs from './Tabs'; const { RangePicker } = DatePicker; const TopSarch = ({ onChange, items, + defaultKey, }: { onChange: (val: any) => void; items?: any[]; + defaultKey?: string; }) => { + const [active, setActive] = useState(defaultKey); + const [dateVal, setDateVal] = useState(); return (
{ + setDateVal(null); if (e === 'day') { onChange({ key: 'day', @@ -66,11 +74,15 @@ const TopSarch = ({ />
{ console.log(e); + setDateVal(e); + setActive; if (e?.length) { + setActive('section'); onChange({ - key:'section', + key: 'section', startTime: e[0]?.format('YYYY-MM-DD'), endTime: e[1]?.format('YYYY-MM-DD'), }); diff --git a/src/pages/GlobalModalServices/modals/AdministPunish/Trend/index.tsx b/src/pages/GlobalModalServices/modals/AdministPunish/Trend/index.tsx index 9765bedd88d442225e69278f6923c1f0b0540be4..0faf687efac453c261ad10fb06fdca7c6e45ec7b 100644 --- a/src/pages/GlobalModalServices/modals/AdministPunish/Trend/index.tsx +++ b/src/pages/GlobalModalServices/modals/AdministPunish/Trend/index.tsx @@ -81,7 +81,7 @@ const Trend: React.FC<{ const lineSeries = [ { - name: '功率', + name: '', type: 'line', symbol: 'none', stack: 'Total', diff --git a/src/pages/GlobalModalServices/modals/AdministPunish/index.tsx b/src/pages/GlobalModalServices/modals/AdministPunish/index.tsx index 1ed2d9107e8fab234eed8983ad6313395284ca4e..4ace6eb96a742b628b0aee7b66e6bfc02334aa9d 100644 --- a/src/pages/GlobalModalServices/modals/AdministPunish/index.tsx +++ b/src/pages/GlobalModalServices/modals/AdministPunish/index.tsx @@ -105,6 +105,7 @@ const AdministPunish = (props: any) => { headerLeft: () => { return ( { name: '超期率', isOverdue: '超时', count: - (asjsltj?.data?.data?.records?.find( + ( (asjsltj?.data?.data?.records?.find( (item: any) => item.title === '超时', )?.num / asjsltj?.data?.data?.records?.find( (item: any) => item.title === '总数', )?.num) * - 100, + 100).toFixed(2), unit: '%', }, ]; @@ -180,6 +180,7 @@ const AreaSynergy = (props: any) => { headerLeft: () => { return ( { ssqy:props?.ssqy, bm:props?.bm, ...props?.searchTime, + sbr:props?.sbr, }, }), diff --git a/src/pages/GlobalModalServices/modals/DyaPatrol/index.less b/src/pages/GlobalModalServices/modals/DyaPatrol/index.less index 2a1f70247e432f13c68fd3931b10eb08f6ce5082..2ebde9ec0b67ee3e939ef90309a52a36acc8b082 100644 --- a/src/pages/GlobalModalServices/modals/DyaPatrol/index.less +++ b/src/pages/GlobalModalServices/modals/DyaPatrol/index.less @@ -48,7 +48,7 @@ .scoreType { width: 569px; - height: 377px; + height: 402px; background-color: rgba(57, 122, 183, 0.2); margin-top: 20px; border-radius: 20px; @@ -159,7 +159,7 @@ .areaTop5 { width: 731px; - height: 460px; + height: 480px; background-color: rgba(57, 122, 183, 0.2); border-radius: 20px; padding: 20px; diff --git a/src/pages/GlobalModalServices/modals/DyaPatrol/index.tsx b/src/pages/GlobalModalServices/modals/DyaPatrol/index.tsx index c0e6e8b295f1ac60ec889dbee19a2f5cd859ad16..5ced505af3e0cf0305ca5e029239303ddd570996 100644 --- a/src/pages/GlobalModalServices/modals/DyaPatrol/index.tsx +++ b/src/pages/GlobalModalServices/modals/DyaPatrol/index.tsx @@ -266,6 +266,7 @@ const DyaPatrol = (props: any) => { headerLeft: () => { return ( { console.log(e); setSearchTime(e); @@ -284,11 +285,11 @@ const DyaPatrol = (props: any) => { dispatch.push('DyaPatrolList', { title: '巡查处置列表', props: { - searchTime + searchTime, }, }); }} - style={{cursor:'pointer'}} + style={{ cursor: 'pointer' }} >
@@ -351,7 +352,7 @@ const DyaPatrol = (props: any) => {
{typeTop5list?.length ? ( -
+
{typeTop5list?.map((item, index) => { return (
{ dispatch.push('DyaPatrolList', { title: '巡查处置列表', props: { - search:param, - searchTime + search: param, + searchTime, }, }); }} @@ -428,6 +429,16 @@ const DyaPatrol = (props: any) => { style={{ backgroundImage: `url(${item.bg})`, backgroundSize: '100% 100%', + cursor: 'pointer', + }} + onClick={() => { + dispatch.push('DyaPatrolList', { + title: '巡查处置列表', + props: { + sbr: item.name, + searchTime, + }, + }); }} > @@ -513,14 +524,14 @@ const DyaPatrol = (props: any) => { dispatch.push('DyaPatrolList', { title: '巡查处置列表', props: { - ssqy:record?.ssqy, - searchTime + ssqy: record?.ssqy, + searchTime, }, }); }, // 点击行时触发 }; }} - scroll={{ y: 300 }} + scroll={{ y: 320 }} dataSource={areaTopList || []} columns={[ { @@ -575,7 +586,7 @@ const DyaPatrol = (props: any) => {
{ return { @@ -583,8 +594,8 @@ const DyaPatrol = (props: any) => { dispatch.push('DyaPatrolList', { title: '巡查处置列表', props: { - bm:record?.bm, - searchTime + bm: record?.bm, + searchTime, }, }); }, // 点击行时触发 @@ -633,10 +644,11 @@ const DyaPatrol = (props: any) => { key: 'num', width: 100, ellipsis: true, - render: () => { + render: (num: string) => { return (
- 16 + {num} +
); }, diff --git a/src/pages/GlobalModalServices/modals/SanitationDisp/TopSarch/index.tsx b/src/pages/GlobalModalServices/modals/SanitationDisp/TopSarch/index.tsx index 297cec78fbe88fbce7d0dbc840fdbe5fd3314d4c..5c6c83e95f0dc8c7da50ac4ba038e4fc1e3963c2 100644 --- a/src/pages/GlobalModalServices/modals/SanitationDisp/TopSarch/index.tsx +++ b/src/pages/GlobalModalServices/modals/SanitationDisp/TopSarch/index.tsx @@ -1,12 +1,24 @@ -import Tabs from '@/components/Tabs'; import { DatePicker } from 'antd'; -import dayjs from 'dayjs'; +import { useState } from 'react'; +import Tabs from '../../../components/TopSarch/Tabs'; import styles from './index.less'; const { RangePicker } = DatePicker; -const TopSarch = ({ onChange,items }: { onChange: (val: any) => void ,items?:any[]}) => { +const TopSarch = ({ + onChange, + items, + defaultKey, +}: { + onChange: (val: any) => void; + items?: any[]; + defaultKey: string; +}) => { + const [active, setActive] = useState(defaultKey); + const [dateVal,setDateVal]=useState() return (
void ,items?:any marginLeft: 8, }} onChange={(e) => { + setDateVal(null) if (e === 'today') { onChange({ - dateType:'today', - + dateType: 'today', }); } if (e === 'monthly') { onChange({ - dateType:'monthly', - + dateType: 'monthly', }); } if (e === 'yearly') { onChange({ - dateType:'yearly', - + dateType: 'yearly', }); } }} itemkey={'key'} - items={items||[ - { - key: 'today', - label: '今日', - }, - { - key: 'monthly', - label: '本月', - }, - { - key: 'yearly', - label: '本年', - }, - ]} + items={ + items || [ + { + key: 'today', + label: '今日', + }, + { + key: 'monthly', + label: '本月', + }, + { + key: 'yearly', + label: '本年', + }, + ] + } />
{ console.log(e); - if(e?.length){ + setDateVal(e) + if (e?.length) { + setActive('custom') onChange({ - dateType:'custom', + dateType: 'custom', startTime: e[0].format('YYYY-MM-DD'), endTime: e[1].format('YYYY-MM-DD'), }); } - }} />
diff --git a/src/pages/GlobalModalServices/modals/SanitationDisp/index.tsx b/src/pages/GlobalModalServices/modals/SanitationDisp/index.tsx index 1cd26981a3158eb5dd26cf6f2e602e0cbc89cf3a..b4ac53d9439a99f3a9b5c1638f4814e48485e58a 100644 --- a/src/pages/GlobalModalServices/modals/SanitationDisp/index.tsx +++ b/src/pages/GlobalModalServices/modals/SanitationDisp/index.tsx @@ -145,6 +145,7 @@ const SanitationDisp = (props: any) => { headerLeft: () => { return ( { console.log(e); setSearchTime(e); diff --git a/src/pages/GlobalModalServices/modals/SanitationResource/index.tsx b/src/pages/GlobalModalServices/modals/SanitationResource/index.tsx index e73aae320515171b0785efe339d79e9ca481f762..6d3c509aed2cf4b70104edab9175251299ef600d 100644 --- a/src/pages/GlobalModalServices/modals/SanitationResource/index.tsx +++ b/src/pages/GlobalModalServices/modals/SanitationResource/index.tsx @@ -40,12 +40,25 @@ const SanitationDisp = () => { typeCode: 'zzcc-clzs', }) .then(res => { - // console.log(res); - res.data.data.records[0].types = res.data.data.records[0].types.filter( - (item: any) => item.carGradeName + res.data.data.records[0].types = res.data.data.records[0].types.map( + (item: any) => ({ + ...item, + carGradeName: item.carGradeName || '未知', + }) ); return res; }) + + // (实现2)过滤掉没有carGradeName的项 + // .then(res => { + // // console.log(res); + // res.data.data.records[0].types = res.data.data.records[0].types.filter( + // (item: any) => item.carGradeName + // ); + // return res; + // }) + + // (实现1)对数据进行排序 // .then(res => { // console.log(res); // // 在这里对数据进行排序处理 diff --git a/src/pages/GlobalModalServices/modals/UrbanOperation/index.less b/src/pages/GlobalModalServices/modals/UrbanOperation/index.less index 9e563acd61e99c03d7b4381f92448be3e909d985..becc26c5fafa448e70c2214a89524942b5e2dc8c 100644 --- a/src/pages/GlobalModalServices/modals/UrbanOperation/index.less +++ b/src/pages/GlobalModalServices/modals/UrbanOperation/index.less @@ -18,7 +18,7 @@ -webkit-text-fill-color: transparent; background-clip: text; font-family: D-DIN; - font-size: 42px; + font-size: 30px; font-weight: 700; line-height: normal; margin-right: 5px; diff --git a/src/pages/GlobalModalServices/registry.tsx b/src/pages/GlobalModalServices/registry.tsx index 352dae42027da583ea5793bebec31a4213bdccb8..6b0c091ce2008cb29ca68a36c4f7df80adb2c970 100644 --- a/src/pages/GlobalModalServices/registry.tsx +++ b/src/pages/GlobalModalServices/registry.tsx @@ -335,7 +335,7 @@ export default class Registry { DyaPatrol: { defaultConfig: { w: 1380, - h: 858, + h: 880, title: '巡查处置', }, defaultProps: {}, diff --git a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/LineCharts/index.tsx b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/LineCharts/index.tsx index 62ad2caebeb7be21a82de833e7a5e9efd8834319..622eac1a6986c5e1ff2c7c1f8af663f56ae67ff2 100644 --- a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/LineCharts/index.tsx +++ b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/LineCharts/index.tsx @@ -19,6 +19,7 @@ const LineCharts = ({ data, style }: { data: any[]; style: CSSProperties }) => { tooltip: { trigger: 'axis', borderWidth: '0', + formatter: '{b0}: {c0}', backgroundColor: 'rgba(73,81,92,.95)', //背景颜色 textStyle: { color: '#fff', //字体颜色 diff --git a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx index 1b4c8cd40bcf3f84feb933ead76646eb44217566..28c7071b8b37d9600f250f4d784ad14bf41585e5 100644 --- a/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx +++ b/src/pages/NewHome/NewLeftSidebar/OperatingSituation/index.tsx @@ -403,9 +403,9 @@ const OperatingSituation = () => { className={styles.eventItem} style={{ cursor: 'pointer' }} onClick={() => { - dispatch.push('ToDisposed', { - title: '待处置事件', - }); + // dispatch.push('ToDisposed', { + // title: '待处置事件', + // }); }} > {
{commonStatistic( - convertUnits(data?.data?.disposing?.value)?.num, + convertUnits(data?.data?.need?.value)?.num, )} {convertUnits(data?.data?.need?.value)?.unit}