master
g 3 years ago
parent 1fc1f0eb72
commit 5653893945

@ -23,46 +23,46 @@ const pointsSizes = mapstyle.layers.find(layer => layer.id == "Объекты").
const initialFilters = [ const initialFilters = [
{ {
id: "tech_name", id: "id_tech",
name: "ВИЭ-технология", name: "ВИЭ-технология",
options: [ options: [
{ {
"value": "СЭС", "value": 1,
"label": "СЭС", "label": "СЭС",
"checked": true "checked": true
}, },
{ {
"value": "ВЭС", "value": 2,
"label": "ВЭС", "label": "ВЭС",
"checked": true "checked": true
}, },
{ {
"value": "мГЭС", "value": 3,
"label": "мГЭС", "label": "мГЭС",
"checked": true "checked": true
}, },
{ {
"value": "БиоЭС (биомасса)", "value": 4,
"label": "БиоЭС (биомасса)", "label": "БиоЭС (биомасса)",
"checked": true "checked": true
}, },
{ {
"value": "БиоЭС (биогаз)", "value": 5,
"label": "БиоЭС (биогаз)", "label": "БиоЭС (биогаз)",
"checked": true "checked": true
}, },
{ {
"value": "БиоЭС (свалочный газ)", "value": 6,
"label": "БиоЭС (свалочный газ)", "label": "БиоЭС (свалочный газ)",
"checked": true "checked": true
}, },
{ {
"value": "ПЭС", "value": 8,
"label": "ПЭС", "label": "ПЭС",
"checked": true "checked": true
}, },
{ {
"value": "ГеоЭС", "value": 9,
"label": "ГеоЭС", "label": "ГеоЭС",
"checked": true "checked": true
} }
@ -500,41 +500,41 @@ const initialFilters = [
] ]
}, },
{ {
"id": "support_name", "id": "id_support",
"name": "Форма поддержки", "name": "Форма поддержки",
"options": [ "options": [
{ {
"value": "ДПМ ВИЭ 1.0 (оптовый рынок)", "value": 1,
"label": "ДПМ ВИЭ 1.0 (оптовый рынок)", "label": "ДПМ ВИЭ 1.0 (оптовый рынок)",
"checked": true "checked": true
}, },
{ {
"value": "ДПМ ВИЭ 2.0 (оптовый рынок)", "value": 2,
"label": "ДПМ ВИЭ 2.0 (оптовый рынок)", "label": "ДПМ ВИЭ 2.0 (оптовый рынок)",
"checked": true "checked": true
}, },
{ {
"value": "Розничный рынок (с поддержкой)", "value": 3,
"label": "Розничный рынок (с поддержкой)", "label": "Розничный рынок (с поддержкой)",
"checked": true "checked": true
}, },
{ {
"value": "Розничный рынок (без поддержки)", "value": 4,
"label": "Розничный рынок (без поддержки)", "label": "Розничный рынок (без поддержки)",
"checked": true "checked": true
}, },
{ {
"value": "Оптовый рынок (без поддержки)", "value": 5,
"label": "Оптовый рынок (без поддержки)", "label": "Оптовый рынок (без поддержки)",
"checked": true "checked": true
}, },
{ {
"value": "Собственная генерация промышленности", "value": 6,
"label": "Собственная генерация промышленности", "label": "Собственная генерация промышленности",
"checked": true "checked": true
}, },
{ {
"value": "ВИЭ в изолированнных энергосистемах", "value": 7,
"label": "ВИЭ в изолированнных энергосистемах", "label": "ВИЭ в изолированнных энергосистемах",
"checked": true "checked": true
} }
@ -596,7 +596,7 @@ const initialFilters = [
"name": "Год ввода в эксплуатацию", "name": "Год ввода в эксплуатацию",
"options": [ "options": [
{ {
"value": "1905-2010", "value": "1905-2009",
"label": "1905-2009", "label": "1905-2009",
"checked": true "checked": true
}, },
@ -664,6 +664,11 @@ const initialFilters = [
"value": "2022", "value": "2022",
"label": "2022", "label": "2022",
"checked": true "checked": true
},
{
"value": "2023",
"label": "2023",
"checked": true
} }
] ]
} }
@ -681,7 +686,7 @@ export default function Points({ mapOptions, onMapOptionClick }) {
const [filters, setFilters] = useState(initialFilters); const [filters, setFilters] = useState(initialFilters);
const generatePopup = (info) => { const generatePopup = (info) => {
// console.log(info) console.log(info)
return ( return (
<div> <div>
<img src={`/photos/${info.id_rreda_parc}.jpg`} className="mb-4 rounded" /> <img src={`/photos/${info.id_rreda_parc}.jpg`} className="mb-4 rounded" />
@ -754,7 +759,7 @@ export default function Points({ mapOptions, onMapOptionClick }) {
Владелец объекта Владелец объекта
</th> </th>
<td className="px-2 py-4"> <td className="px-2 py-4">
{info.current_owner_name ? `${info.current_owner_name} ${info.main_owner_company != info.current_owner_name && <span>({info.main_owner_company})</span>}` : info.main_owner_company} {info.current_owner_name && info.main_owner_company != info.current_owner_name ? `${info.current_owner_name} (${info.main_owner_company})` : info.main_owner_company}
</td> </td>
</tr> </tr>
} }

@ -132,7 +132,7 @@ const initialFilterFilters = [
{ {
"value": 2014, "value": 2014,
"label": 2014, "label": 2014,
"checked": true "checked": false
}, },
{ {
"value": 2015, "value": 2015,
@ -662,9 +662,9 @@ export default function Regions({ mapOptions, onMapOptionClick }) {
<div className="h-[65vh]"> <div className="h-[65vh]">
<Map <Map
initialViewState={{ initialViewState={{
latitude: 55, latitude: mapstyle.center[0],
longitude: 100, longitude: mapstyle.center[1],
zoom: 2, zoom: mapstyle.zoom,
}} }}
ref={mapRef} ref={mapRef}
mapboxAccessToken={MAPBOX_TOKEN} mapboxAccessToken={MAPBOX_TOKEN}

Loading…
Cancel
Save