From d832171325a3f200b04c8f8b5bc9eab951834df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=88=D0=BA=D0=B8=D0=BD=20=D0=A1=D0=B5=D1=80?= =?UTF-8?q?=D0=B3=D0=B5=D0=B9?= Date: Wed, 26 Nov 2025 23:09:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BF=D0=BB=D0=B0=D0=B2=D0=BD=D1=83=D1=8E=20=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=BC=D0=B0=D1=86=D0=B8=D1=8E=20=D0=B4=D0=BB=D1=8F=20=D0=BD?= =?UTF-8?q?=D0=B5=D1=81=D0=BA=D0=BE=D0=BB=D1=8C=D0=BA=D0=B8=D1=85=20=D0=B8?= =?UTF-8?q?=D1=81=D1=82=D0=BE=D1=87=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainapp/multi_sources_playback_map.html | 676 +++++++++++++++ .../templates/mainapp/source_list.html | 23 + dbapp/mainapp/urls.py | 4 + dbapp/mainapp/views/__init__.py | 4 + dbapp/mainapp/views/api.py | 100 +++ dbapp/mainapp/views/map.py | 22 + dbapp/mapsapp/templates/mapsapp/map2d.html | 773 +++++++----------- 7 files changed, 1106 insertions(+), 496 deletions(-) create mode 100644 dbapp/mainapp/templates/mainapp/multi_sources_playback_map.html diff --git a/dbapp/mainapp/templates/mainapp/multi_sources_playback_map.html b/dbapp/mainapp/templates/mainapp/multi_sources_playback_map.html new file mode 100644 index 0000000..0f1ff07 --- /dev/null +++ b/dbapp/mainapp/templates/mainapp/multi_sources_playback_map.html @@ -0,0 +1,676 @@ +{% extends "mainapp/base.html" %} +{% load static %} +{% block title %}Анимация движения объектов{% endblock title %} + +{% block extra_css %} + + + +{% endblock %} + +{% block content %} +
+
+ Загрузка... +
+

Загрузка данных...

+
+ +
+ + +{% endblock content %} + +{% block extra_js %} + + + + +{% endblock extra_js %} diff --git a/dbapp/mainapp/templates/mainapp/source_list.html b/dbapp/mainapp/templates/mainapp/source_list.html index 255af54..401db58 100644 --- a/dbapp/mainapp/templates/mainapp/source_list.html +++ b/dbapp/mainapp/templates/mainapp/source_list.html @@ -1435,6 +1435,26 @@ function showSelectedSourcesOnMap() { window.open(url, '_blank'); } +// Function to show playback animation for selected sources +function showPlaybackAnimation() { + if (!window.selectedSources || window.selectedSources.length === 0) { + alert('Список источников пуст'); + return; + } + + // Check if any source has points + const sourcesWithPoints = window.selectedSources.filter(source => parseInt(source.objitem_count) > 0); + if (sourcesWithPoints.length === 0) { + alert('Выбранные источники не содержат точек ГЛ'); + return; + } + + const selectedIds = window.selectedSources.map(source => source.id); + const url = '{% url "mainapp:multi_sources_playback_map" %}' + '?ids=' + selectedIds.join(','); + + window.open(url, '_blank'); +} + // Function to merge selected sources function mergeSelectedSources() { if (!window.selectedSources || window.selectedSources.length < 2) { @@ -2065,6 +2085,9 @@ function showTransponderModal(transponderId) { + {% if user.customuser.role == 'admin' or user.customuser.role == 'moderator' %} - -
{% endblock content %} +{% block extra_css %} + +{% endblock extra_css %} + {% block extra_js %} -{% endblock extra_js %} \ No newline at end of file +{% endblock extra_js %}