merge carlos and fixed table
This commit is contained in:
Generated
+1031
-120
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -19,12 +19,12 @@
|
||||
"leaflet.heat": "^0.2.0",
|
||||
"next": "^16.0.7",
|
||||
"react": "19.2.0",
|
||||
"react-dom": "19.2.0", "react-hot-toast": "^2.6.0",
|
||||
|
||||
"react-dom": "19.2.0",
|
||||
"react-hot-toast": "^2.6.0",
|
||||
"react-leaflet": "^5.0.0",
|
||||
"react-select": "^5.10.2",
|
||||
"recharts": "^3.8.0"
|
||||
},
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
@@ -38,4 +38,4 @@
|
||||
"sass": "^1.94.0",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import DownloadReporteXLSX from "@/components/Dowload/Reporte";
|
||||
import Reporte from "@/components/reporteGraficas/reporte";
|
||||
|
||||
import "../../styles/layout/reporte.scss";
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function Login() {
|
||||
if (tipo === 2) {
|
||||
router.push("/escaner");
|
||||
} else if (tipo === 1) {
|
||||
router.push("/equipoComputo");
|
||||
router.push("/reportesGraficas");
|
||||
} else {
|
||||
toast.error("Tipo de usuario no válido");
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ export default function DownloadTable({ filtros,count }: Props) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const handleDownload = async () => {
|
||||
if(!filtros.length){return}
|
||||
setLoading(true);
|
||||
|
||||
const token = Cookies.get("token");
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { MapContainer, ImageOverlay, useMap } from "react-leaflet";
|
||||
import L from "leaflet";
|
||||
import "leaflet/dist/leaflet.css";
|
||||
import "leaflet.heat";
|
||||
import { useEffect } from "react";
|
||||
|
||||
function HeatLayer() {
|
||||
const map = useMap();
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
const puntos = [
|
||||
[200,300,3.5],
|
||||
[210,310,4.0],
|
||||
[220,320,5.2],
|
||||
[230,330,6.5],
|
||||
[240,340,7.0],
|
||||
[250,350,8.0],
|
||||
[260,360,6.8],
|
||||
[270,370,7.5],
|
||||
|
||||
[400,500,4.5],
|
||||
[410,510,6.0],
|
||||
[420,520,8.0],
|
||||
[430,530,7.2],
|
||||
[440,540,6.5],
|
||||
[450,550,5.8],
|
||||
[460,560,7.1],
|
||||
|
||||
[600,300,4.2],
|
||||
[610,310,5.4],
|
||||
[620,320,6.6],
|
||||
[630,330,7.8],
|
||||
[640,340,8.5],
|
||||
[650,350,7.2],
|
||||
[660,360,6.1],
|
||||
[670,370,5.3],
|
||||
|
||||
[700,200,6.5],
|
||||
[720,220,7.8],
|
||||
[740,240,8.9],
|
||||
[760,260,9.5],
|
||||
[780,280,8.7],
|
||||
[800,300,7.6],
|
||||
[820,320,6.4]
|
||||
];
|
||||
|
||||
const heat = L.heatLayer(puntos, {
|
||||
radius: 50,
|
||||
blur: 30,
|
||||
maxZoom: 2,
|
||||
|
||||
gradient: {
|
||||
0.2: "blue",
|
||||
0.4: "cyan",
|
||||
0.6: "yellow",
|
||||
0.8: "orange",
|
||||
1.0: "red"
|
||||
}
|
||||
});
|
||||
|
||||
heat.addTo(map);
|
||||
|
||||
return () => {
|
||||
map.removeLayer(heat);
|
||||
};
|
||||
|
||||
}, [map]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export default function MapaFES({ cerrar }) {
|
||||
|
||||
const bounds = [
|
||||
[0,0],
|
||||
[1000,1000]
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
<div style={{
|
||||
position:"fixed",
|
||||
top:0,
|
||||
left:0,
|
||||
width:"100%",
|
||||
height:"100%",
|
||||
background:"#000000cc",
|
||||
zIndex:999
|
||||
}}>
|
||||
|
||||
<button
|
||||
onClick={cerrar}
|
||||
style={{
|
||||
position:"absolute",
|
||||
top:20,
|
||||
right:20,
|
||||
zIndex:1000,
|
||||
padding:"20px 40px",
|
||||
background:"red",
|
||||
color:"white",
|
||||
border:"none",
|
||||
cursor:"pointer"
|
||||
}}
|
||||
>
|
||||
Cerrar
|
||||
</button>
|
||||
|
||||
<MapContainer
|
||||
crs={L.CRS.Simple}
|
||||
bounds={bounds}
|
||||
style={{ height:"100%", width:"100%" }}
|
||||
>
|
||||
|
||||
<ImageOverlay
|
||||
url="/plano_fes_acatlan.png"
|
||||
bounds={bounds}
|
||||
/>
|
||||
|
||||
<HeatLayer/>
|
||||
|
||||
</MapContainer>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user