Compare commits
4 Commits
0089ee22fe
...
2c6d12f71f
| Author | SHA1 | Date |
|---|---|---|
|
|
2c6d12f71f | |
|
|
db8be67cbc | |
|
|
946f67bf1a | |
|
|
b7bb28a954 |
|
|
@ -18,16 +18,22 @@ export const WeatherSet24h = new CachePromise(
|
|||
if (!latest) {
|
||||
return 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)
|
||||
return fetch(`${process.env.PUBLIC_URL}/data2/shqxResGrblayerset.json`)
|
||||
.then((response) => response.json())
|
||||
.then(( data ) => {
|
||||
return data
|
||||
})
|
||||
.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
|
||||
);
|
||||
|
|
@ -46,14 +52,26 @@ export const WeatherRadar = new CachePromise(
|
|||
return 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 }) => data)
|
||||
|
||||
return fetch(`${process.env.PUBLIC_URL}/data2/shqxResRadarlayer.json`)
|
||||
.then((response) => response.json())
|
||||
.then(( data ) => {
|
||||
return data
|
||||
})
|
||||
.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
|
||||
);
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ function DrpReal({ style }) {
|
|||
}, [skData, skType, sort, sort1])
|
||||
|
||||
const skTypeObj = [
|
||||
{ type: '1', name: '大型水库', num1: 3, num2: 7.9316,icon:'大型水库.png' },//8.735
|
||||
{ type: '2', name: '中型水库', num1: 7, num2: 1.627,icon:'中.png' },
|
||||
{ type: '3', name: '小(1)型水库', num1: 44, num2: 1.627 ,icon:'小1.png'},
|
||||
{ type: '4', name: '小(2)型水库', num1: 207, num2: 8.735 ,icon:'小1.png'},
|
||||
{ type: '1', name: '大型水库', num1: 3, num2: 7.93,num3:8.73,icon:'大型水库.png' },//8.735
|
||||
{ type: '2', name: '中型水库', num1: 7, num2: 0.51,num3:1.62,icon:'中.png' },
|
||||
{ type: '3', name: '小(1)型水库', num1: 44, num2: 31.54,num3:52.61 ,icon:'小1.png'},
|
||||
{ type: '4', name: '小(2)型水库', num1: 207, num2: 10.11,num3:16.91 ,icon:'小1.png'},
|
||||
]
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -136,7 +136,7 @@ function DrpReal({ style }) {
|
|||
{
|
||||
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>
|
||||
<TableContainer style={{ maxHeight: 'calc( 100vh - 28.2rem )' }}>
|
||||
<Table size="small" stickyHeader>
|
||||
|
|
|
|||
Loading…
Reference in New Issue