Compare commits

...

4 Commits

Author SHA1 Message Date
秦子超 2c6d12f71f Merge branch 'qzc-dev' 2025-06-12 15:19:09 +08:00
李神峰 db8be67cbc feat(): 天气预报数据修改 2025-06-12 15:17:12 +08:00
李神峰 946f67bf1a feat(): 增加icon 2025-06-12 14:50:40 +08:00
李神峰 b7bb28a954 feat(): 数据修改 2025-06-12 14:17:03 +08:00
2 changed files with 39 additions and 21 deletions

View File

@ -18,16 +18,22 @@ export const WeatherSet24h = new CachePromise(
if (!latest) { if (!latest) {
return null; return null;
} }
return fetch(`${process.env.PUBLIC_URL}/data2/shqxResGrblayerset.json`)
return httpget(apiurl.yjhis.weather, { .then((response) => response.json())
filename: latest.rainFile, .then(( data ) => {
x1: config.extent[0], return data
y1: config.extent[1], })
x2: config.extent[2],
y2: config.extent[3],
layers: '00.24,00.01,01.01,02.01,03.01,04.01,05.01,06.01,07.01,08.01,09.01,10.01,11.01,12.01,13.01,14.01,15.01,16.01,17.01,18.01,19.01,20.01,21.01,22.01,23.01,24.01'
}).then(({ data }) => data)
.catch(() => null) .catch(() => null)
// return httpget(apiurl.yjhis.weather, {
// filename: latest.rainFile,
// x1: config.extent[0],
// y1: config.extent[1],
// x2: config.extent[2],
// y2: config.extent[3],
// layers: '00.24,00.01,01.01,02.01,03.01,04.01,05.01,06.01,07.01,08.01,09.01,10.01,11.01,12.01,13.01,14.01,15.01,16.01,17.01,18.01,19.01,20.01,21.01,22.01,23.01,24.01'
// }).then(({ data }) => data)
// .catch(() => null)
}, },
1000 * 60 1000 * 60
); );
@ -46,14 +52,26 @@ export const WeatherRadar = new CachePromise(
return null; return null;
} }
return httpget(apiurl.radarhis.weather, {
filename: latest.rainFile, return fetch(`${process.env.PUBLIC_URL}/data2/shqxResRadarlayer.json`)
x1: config.extent[0], .then((response) => response.json())
y1: config.extent[1], .then(( data ) => {
x2: config.extent[2], return data
y2: config.extent[3], })
}).then(({ data }) => data)
.catch(() => null) .catch(() => null)
// return httpget(apiurl.radarhis.weather, {
// filename: latest.rainFile,
// x1: config.extent[0],
// y1: config.extent[1],
// x2: config.extent[2],
// y2: config.extent[3],
// }).then(({ data }) => {
// console.log("133344",data);
// return data
// })
// .catch(() => null)
}, },
1000 * 60 1000 * 60
); );

View File

@ -39,10 +39,10 @@ function DrpReal({ style }) {
}, [skData, skType, sort, sort1]) }, [skData, skType, sort, sort1])
const skTypeObj = [ const skTypeObj = [
{ type: '1', name: '大型水库', num1: 3, num2: 7.9316,icon:'大型水库.png' },//8.735 { type: '1', name: '大型水库', num1: 3, num2: 7.93,num3:8.73,icon:'大型水库.png' },//8.735
{ type: '2', name: '中型水库', num1: 7, num2: 1.627,icon:'中.png' }, { type: '2', name: '中型水库', num1: 7, num2: 0.51,num3:1.62,icon:'中.png' },
{ type: '3', name: '小(1)型水库', num1: 44, num2: 1.627 ,icon:'小1.png'}, { type: '3', name: '小(1)型水库', num1: 44, num2: 31.54,num3:52.61 ,icon:'小1.png'},
{ type: '4', name: '小(2)型水库', num1: 207, num2: 8.735 ,icon:'小1.png'}, { type: '4', name: '小(2)型水库', num1: 207, num2: 10.11,num3:16.91 ,icon:'小1.png'},
] ]
useEffect(() => { useEffect(() => {
@ -136,7 +136,7 @@ function DrpReal({ style }) {
{ {
skTypeObj.map((item) => skTypeObj.map((item) =>
(<> (<>
<CollapsePage type={item.type} name={item.name} num1={item.num1} num2={`${item.num2}/${item.num3}`} skType={skType} setSkType={setSkType} /> <CollapsePage type={item.type} name={item.name} num1={item.num1} num2={`${item.num2}/${item.num3}`} skType={skType} setSkType={setSkType} icon={item.icon} />
<Collapse in={skType === item.type} timeout="auto" unmountOnExit> <Collapse in={skType === item.type} timeout="auto" unmountOnExit>
<TableContainer style={{ maxHeight: 'calc( 100vh - 28.2rem )' }}> <TableContainer style={{ maxHeight: 'calc( 100vh - 28.2rem )' }}>
<Table size="small" stickyHeader> <Table size="small" stickyHeader>