update : 22.07.2025 11:07:29,52
This commit is contained in:
parent
4aa3ba6c3c
commit
558d4c1c8d
18
apps/gto/migrations/0028_alter_modeltypeicons_model.py
Normal file
18
apps/gto/migrations/0028_alter_modeltypeicons_model.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.25 on 2025-07-22 02:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('gto', '0027_auto_20250721_2141'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='modeltypeicons',
|
||||
name='model',
|
||||
field=models.CharField(max_length=128, verbose_name='Модель'),
|
||||
),
|
||||
]
|
||||
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button id="saveButton" type="submit" class="btn bg-gradient-primary">Сохранить</button>
|
||||
<a href="{% url 'management:manage_channel' %}" type="button" class="btn btn-default float-right">Отмена</a>
|
||||
<a href="/management/pla/" type="button" class="btn btn-default float-right">Отмена</a>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</div>
|
||||
|
||||
@ -40,9 +40,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a>
|
||||
</li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item">Параметры системы </li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы</a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item">Параметры системы</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -89,6 +89,39 @@
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content text-sm">
|
||||
<form action="./?module=settings&cmd=file_save" method="post" class="form-horizontal"
|
||||
enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header text-sm">
|
||||
<h5 class="card-title">Интерактивная карта</h5>
|
||||
</div> <!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<div class="d-flex gap-3">
|
||||
<a href="{% url 'management:manage_orthomosaic' %}" class="btn bg-gradient-primary">Ортофотопланы</a>
|
||||
<a href="{% url 'management:manage_map' %}"
|
||||
class="btn bg-gradient-primary">Карты</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<a href="{% url 'management:manage_danger_zone' %}" class="btn bg-gradient-primary">Опасные
|
||||
зоны</a>
|
||||
</div>
|
||||
</div> <!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<button id="btnok" type="submit" class="btn bg-gradient-primary">Сохранить</button>
|
||||
</div>
|
||||
</div> <!-- /.card -->
|
||||
</div> <!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</form>
|
||||
</section>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a>
|
||||
<li class="breadcrumb-item"><a href="/management/wkloaction/">Главная</a></li>
|
||||
<li class="breadcrumb-item active">Местоположение персонала</li>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -113,7 +113,7 @@
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button id="saveButton" type="submit" class="btn bg-gradient-primary">Сохранить</button>
|
||||
<a href="{% url 'management:manage_icons' %}" type="button" class="btn btn-default float-right">Отмена</a>
|
||||
<a href="/management/wkloaction/" type="button" class="btn btn-default float-right">Отмена</a>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</div>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="/management/wkloaction/">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/wkloaction/">Главная</a></li>
|
||||
<li class="breadcrumb-item active">Местоположение персонала</li>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
@ -1,87 +0,0 @@
|
||||
{% extends "default.html" %}
|
||||
{% load static %}
|
||||
{% load mysettings %}
|
||||
|
||||
|
||||
{% block header_link %}
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet"
|
||||
href="{% static 'lte/plugins/select2/css/select2.min.css' %}?ver={% settings_value 'APP_VER' %}">
|
||||
<link rel="stylesheet"
|
||||
href="{% static 'lte/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css' %}?ver={% settings_value 'APP_VER' %}">
|
||||
<!-- iCheck for checkboxes and radio inputs -->
|
||||
<link rel="stylesheet"
|
||||
href="{% static 'lte/plugins/icheck-bootstrap/icheck-bootstrap.min.css' %}?ver={% settings_value 'APP_VER' %}">
|
||||
<style>
|
||||
.file-upload-label {
|
||||
cursor: pointer;
|
||||
border: 1px solid #ced4da;
|
||||
padding: .375rem .75rem;
|
||||
border-radius: .25rem;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock header_link %}
|
||||
{% block content %}
|
||||
<section class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h4>Удаление изображения</h4>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="/management/">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/">Параметры системы</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.container-fluid -->
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<form autocomplete="off" method="post" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<!-- /.col -->
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Удаление изображения</div>
|
||||
<div class="card-body">
|
||||
<p>Вы уверены, что хотите удалить изображение: {{ object.name }}?</p>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<button id="btnok" type="submit" class="btn bg-gradient-danger">Удалить</button>
|
||||
<a href="/management/" type="button" class="btn btn-default float-right">Отмена</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% block script_footer %}
|
||||
<script>
|
||||
const inputArr = document.querySelectorAll('.show-name')
|
||||
for (let arr of inputArr) {
|
||||
arr.addEventListener('change', function (event) {
|
||||
const fileNameDisplay = document.getElementById('file-name');
|
||||
const file = event.target.files[0];
|
||||
|
||||
if (file) {
|
||||
fileNameDisplay.style.display = 'block';
|
||||
fileNameDisplay.innerHTML = `Сейчас выбран: <a href="#" download="${file.name}">${file.name}</a>`;
|
||||
} else {
|
||||
fileNameDisplay.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock script_footer %}
|
||||
|
||||
@ -40,9 +40,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a>
|
||||
</li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item">Параметры системы </li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item">Параметры системы </li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item">Параметры системы </li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item">Параметры системы </li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -95,10 +95,6 @@
|
||||
autofocus="" id="id_wtoken">{{ platoken }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<a href="{% url 'management:manage_channel' %}" class="btn bg-gradient-primary">Управление
|
||||
каналами</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id='id_asterisk_panel'>
|
||||
<div class="form-group row">
|
||||
@ -133,11 +129,15 @@
|
||||
<section id='id_radius_chanel' class="content">
|
||||
<form autocomplete="off" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="card">
|
||||
<div class="card-header text-sm">
|
||||
<h5 class="card-title">Управление каналами</h5>
|
||||
</div> <!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row p-0">
|
||||
<!-- /.col -->
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="col-12 p-0">
|
||||
<div class="card p-0">
|
||||
<div class="card-header">
|
||||
<a href="{% url 'management:add_channel' %}" class="btn btn-primary">Добавить</a>
|
||||
</div>
|
||||
@ -145,28 +145,62 @@
|
||||
<table class="table table-bordered table-hover table-head-fixed text-nowrap">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-1"></th>
|
||||
<th></th>
|
||||
<th>Наименование</th>
|
||||
<th>Идентификатор</th>
|
||||
<th class="col-1"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for channel in catalog %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ channel.id }}
|
||||
</td>
|
||||
<tr id="tr_{{channel.id}}">
|
||||
<td style="width:10px;cursor: pointer;">
|
||||
<form>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" value="{{ channel.id }}" name="id">
|
||||
<a class="action-form"
|
||||
data-target="#large_{{ channel.id }}"
|
||||
data-toggle="modal" style="color:red;"
|
||||
title='Удалить "{{ channel.name }}"'><i
|
||||
class="far fa-trash-alt"></i></a>
|
||||
<div class="modal fade" id="large_{{ channel.id }}" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-danger">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">
|
||||
Внимание</h4>
|
||||
<button type="button" class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body truncate_auto">
|
||||
<p>Вы действительно хотите удалить:
|
||||
"{{ channel.name }}" ?</p>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button"
|
||||
class="btn btn-outline-light"
|
||||
data-dismiss="modal">Отмена
|
||||
</button>
|
||||
<a class="btn btn-outline-light action-form"
|
||||
onclick="delete_pla_chanel({{ channel.id }})">
|
||||
Удалить </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'management:edit_channel' channel.id %}">{{ channel.name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ channel.uid }}
|
||||
<a href="{% url 'management:edit_channel' channel.id %}">{{ channel.uid }}</a>
|
||||
|
||||
</td>
|
||||
<td><a href="{% url 'management:remove_channel' channel.id %}"
|
||||
class="btn btn-danger btn-block btn-sm"><i class="fa fa-trash"></i>
|
||||
Удалить</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@ -177,8 +211,9 @@
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<div>
|
||||
<!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
<div>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
@ -40,9 +40,9 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:manage_schedules' %}">Управление загрузкой данных</a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Параметры системы </a></li>
|
||||
<li class="breadcrumb-item">Управление загрузкой данных</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item">Параметры системы</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -23,11 +23,11 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Параметры системы </a>
|
||||
</li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:manage_schedules' %}">Управление
|
||||
загрузкой данных</a></li>
|
||||
<li class="breadcrumb-item">Управление
|
||||
загрузкой данных</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{% url 'mainindex' %}">Главная</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'management:main_index' %}">Параметры системы </a></li>
|
||||
<li class="breadcrumb-item"><a href="/management/general/">Главная</a></li>
|
||||
<li class="breadcrumb-item active">Параметры системы </li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -103,10 +103,7 @@
|
||||
autofocus="" id="id_wtoken">{{ wtoken }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<a href="{% url 'management:manage_icons' %}" class="btn bg-gradient-primary">Изображения</a>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div> <!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<button id="id_wklocation_btn_save" type="submit" class="btn bg-gradient-primary">Сохранить</button>
|
||||
@ -115,7 +112,95 @@
|
||||
</div> <!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</section>
|
||||
<section id='id_wklocation_icon' class="content">
|
||||
<form autocomplete="off" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-header text-sm">
|
||||
<h5 class="card-title">Изображения</h5>
|
||||
</div> <!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row p-0">
|
||||
<!-- /.col -->
|
||||
<div class="col-12 p-0">
|
||||
<div class="card p-0">
|
||||
<div class="card-header">
|
||||
<a href="/management/wkloaction/icons/create/" class="btn btn-primary">Добавить</a>
|
||||
</div>
|
||||
<div class="card-body table-responsive p-0">
|
||||
<table class="table table-bordered table-hover table-head-fixed text-nowrap">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th></th>
|
||||
<th>Наименование</th>
|
||||
<th>Предпросмотр</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for icon in catalog %}
|
||||
<tr id="tr_{{icon.id}}">
|
||||
<td style="width:10px;cursor: pointer;">
|
||||
<form>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" value="{{ icon.id }}" name="id">
|
||||
<a class="action-form"
|
||||
data-target="#large_{{ icon.id }}"
|
||||
data-toggle="modal" style="color:red;"
|
||||
title='Удалить "{{ icon.name }}"'><i
|
||||
class="far fa-trash-alt"></i></a>
|
||||
<div class="modal fade" id="large_{{ icon.id }}" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-danger">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">
|
||||
Внимание</h4>
|
||||
<button type="button" class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body truncate_auto">
|
||||
<p>Вы действительно хотите удалить:
|
||||
"{{ icon.name }}" ?</p>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button"
|
||||
class="btn btn-outline-light"
|
||||
data-dismiss="modal">Отмена
|
||||
</button>
|
||||
<a class="btn btn-outline-light action-form"
|
||||
onclick="delete_wklocation_icon({{ icon.id }})">
|
||||
Удалить </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/management/wkloaction/icons/{{icon.id}}/edit/">{{ icon.name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<img src="{{ icon.image.url }}" alt=""style="width: 100px; height: 100px;">
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- /.card-body -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<div>
|
||||
<!-- /.row -->
|
||||
<div>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
@ -46,6 +46,12 @@ urlpatterns = [
|
||||
path("wkloaction/", views_wklocation.main, name="main"),
|
||||
path("wkloaction/save/", views_wklocation.save, name="save"),
|
||||
|
||||
path("wkloaction/icons/", views_icon.manage_icon, name="manage_icons"),
|
||||
path("wkloaction/icons/create/", views_icon.add_icon, name="add_icon"),
|
||||
path("wkloaction/icons/<int:pk>/edit/", views_icon.edit_icon, name="edit_icon"),
|
||||
path("wkloaction/icons/<int:pk>/remove/", views_icon.remove_icon, name="remove_icon"),
|
||||
|
||||
|
||||
#Пользователи
|
||||
path("users/", views_user.main, name="main"),
|
||||
path("users/get_user/", views_user.get_user, name="get_user"),
|
||||
@ -54,9 +60,7 @@ urlpatterns = [
|
||||
path("users/delete/", views_user.user_delete, name="user_delete"),
|
||||
|
||||
path("user/add/", views_user.user_add, name="user_add"),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
path("user/", views_user.user_edit, name="user_edit"),
|
||||
|
||||
@ -64,10 +68,7 @@ urlpatterns = [
|
||||
|
||||
path("user/password/", views_user.user_password_edit, name="user_password_edit"),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
path("orthomosaic/", views_ortho.manage_orthomosaic, name="manage_orthomosaic"),
|
||||
path("orthomosaic/create/", views_ortho.add_orthomosaic, name="add_orthomosaic"),
|
||||
path("orthomosaic/<int:pk>/edit/", views_ortho.edit_orthomosaic, name="edit_orthomosaic"),
|
||||
@ -78,10 +79,6 @@ urlpatterns = [
|
||||
path("map/<int:pk>/edit/", views_map.edit_map, name="edit_map"),
|
||||
path("map/<int:pk>/remove/", views_map.remove_map, name="remove_map"),
|
||||
|
||||
path("icons/", views_icon.manage_icon, name="manage_icons"),
|
||||
path("icons/create/", views_icon.add_icon, name="add_icon"),
|
||||
path("icons/<int:pk>/edit/", views_icon.edit_icon, name="edit_icon"),
|
||||
path("icons/<int:pk>/remove/", views_icon.remove_icon, name="remove_icon"),
|
||||
|
||||
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ def add_channel(request):
|
||||
form = ChannelForm(request.POST)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("management:manage_channel")
|
||||
return redirect("/management/pla/")
|
||||
else:
|
||||
context["form"] = form
|
||||
return render(request, "channel/form_channel.html", context)
|
||||
@ -58,7 +58,7 @@ def edit_channel(request, pk):
|
||||
form = ChannelForm(request.POST, instance=obj)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("management:manage_channel")
|
||||
return redirect("/management/pla/")
|
||||
except Exception:
|
||||
logging.error(traceback.format_exc())
|
||||
|
||||
@ -73,9 +73,15 @@ def remove_channel(request, pk):
|
||||
context["object"] = obj
|
||||
return render(request, "channel/remove_channel.html", context)
|
||||
if request.method == "POST":
|
||||
data =dict()
|
||||
obj = get_object_or_404(PlaChannel, id=pk)
|
||||
data.update(name=obj.name)
|
||||
obj.delete()
|
||||
return redirect("management:manage_channel")
|
||||
data.update(status='ok')
|
||||
return generalmodule.ReturnJson(200, data)
|
||||
|
||||
except Exception:
|
||||
logging.error(traceback.format_exc())
|
||||
return redirect("management:manage_channel")
|
||||
data =dict()
|
||||
data.update(status='error')
|
||||
return generalmodule.ReturnJson(200, data)
|
||||
|
||||
@ -35,7 +35,7 @@ def add_icon(request):
|
||||
form = IconForm(request.POST, request.FILES)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("management:manage_icons")
|
||||
return redirect("/management/wkloaction/")
|
||||
else:
|
||||
context["form"] = form
|
||||
return render(request, "icons/form_icon.html", context)
|
||||
@ -58,7 +58,7 @@ def edit_icon(request, pk):
|
||||
form = IconForm(request.POST, request.FILES, instance=obj)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("management:manage_icons")
|
||||
return redirect("/management/wkloaction/")
|
||||
except Exception:
|
||||
logging.error(traceback.format_exc())
|
||||
|
||||
@ -67,15 +67,16 @@ def edit_icon(request, pk):
|
||||
@never_cache
|
||||
def remove_icon(request, pk):
|
||||
try:
|
||||
if request.method == "GET":
|
||||
obj = get_object_or_404(Icons, id=pk)
|
||||
context = generalmodule.get_context_template()
|
||||
context["object"] = obj
|
||||
return render(request, "icons/remove_icon.html", context)
|
||||
if request.method == "POST":
|
||||
data =dict()
|
||||
obj = get_object_or_404(Icons, id=pk)
|
||||
data.update(name=obj.name)
|
||||
obj.delete()
|
||||
return redirect("management:manage_icons")
|
||||
data.update(status='ok')
|
||||
return generalmodule.ReturnJson(200, data)
|
||||
|
||||
except Exception:
|
||||
logging.error(traceback.format_exc())
|
||||
return redirect("management:manage_icons")
|
||||
data =dict()
|
||||
data.update(status='error')
|
||||
return generalmodule.ReturnJson(200, data)
|
||||
|
||||
@ -6,6 +6,9 @@ from django.views.decorators.cache import never_cache
|
||||
|
||||
from apps.general.models.model_settings import Settings
|
||||
|
||||
from apps.management.forms.channel import ChannelForm
|
||||
from apps.pla.models.model_channel import PlaChannel
|
||||
|
||||
from apps.util import generalmodule
|
||||
from sabron.util import logging
|
||||
|
||||
@ -34,9 +37,9 @@ def save(request):
|
||||
@never_cache
|
||||
def main(request):
|
||||
try:
|
||||
get_param = request.GET.dict()
|
||||
if request.method == "GET":
|
||||
context = generalmodule.get_context_template()
|
||||
context = generalmodule.get_context_template()
|
||||
channels = PlaChannel.objects.all()
|
||||
context["catalog"] = channels
|
||||
return render(request, "pla/pla_main.html", context)
|
||||
except Exception:
|
||||
logging.error(traceback.format_exc())
|
||||
|
||||
@ -6,6 +6,9 @@ from django.views.decorators.cache import never_cache
|
||||
|
||||
from apps.general.models.model_settings import Settings
|
||||
|
||||
from apps.main.models.model_icons import Icons
|
||||
from apps.management.forms.icon import IconForm
|
||||
|
||||
from apps.util import generalmodule
|
||||
from sabron.util import logging
|
||||
|
||||
@ -34,9 +37,9 @@ def save(request):
|
||||
@never_cache
|
||||
def main(request):
|
||||
try:
|
||||
get_param = request.GET.dict()
|
||||
if request.method == "GET":
|
||||
context = generalmodule.get_context_template()
|
||||
context = generalmodule.get_context_template()
|
||||
icons = Icons.objects.all()
|
||||
context["catalog"] = icons
|
||||
return render(request, "wklocation/wklocation_main.html", context)
|
||||
except Exception:
|
||||
logging.error(traceback.format_exc())
|
||||
|
||||
@ -133,11 +133,6 @@ def load_usgs(**kwargs):
|
||||
)
|
||||
|
||||
except Exception as err:
|
||||
eventsmodule.write_events(
|
||||
level_event = settings.EVENT_LEVEL_ERROR,
|
||||
section = settings.EVENT_SECTION_OTHERS,
|
||||
text_event = f'Ошибка синхронизации с системой "usgs"'
|
||||
)
|
||||
logging.error(traceback.format_exc())
|
||||
|
||||
|
||||
@ -294,16 +289,7 @@ def load_gsras(**kwargs):
|
||||
|
||||
|
||||
except Exception as err:
|
||||
eventsmodule.write_events(
|
||||
level_event = settings.EVENT_LEVEL_ERROR,
|
||||
section = settings.EVENT_SECTION_OTHERS,
|
||||
text_event = f'Ошибка синхронизации с системой "gsras"'
|
||||
)
|
||||
logging.error(traceback.format_exc())
|
||||
logging.error(cols)
|
||||
logging.error(
|
||||
"*************************************************************************"
|
||||
)
|
||||
|
||||
|
||||
def load_sigi(**kwargs):
|
||||
@ -356,7 +342,7 @@ def load_sigi(**kwargs):
|
||||
eventsmodule.write_events(
|
||||
level_event = settings.EVENT_LEVEL_WARNING,
|
||||
section = settings.EVENT_SECTION_OTHERS,
|
||||
text_event = f'Землятрясение в точке "{info}" , источник SIGI'
|
||||
text_event = f'Землятрясение в точке "{info}" , источник СИГИ'
|
||||
)
|
||||
|
||||
else:
|
||||
@ -369,7 +355,7 @@ def load_sigi(**kwargs):
|
||||
eventsmodule.write_events(
|
||||
level_event = settings.EVENT_LEVEL_ERROR,
|
||||
section = settings.EVENT_SECTION_OTHERS,
|
||||
text_event = f'Ошибка синхронизации с системой "SIGI"'
|
||||
text_event = f'Ошибка синхронизации с системой "СИГИ"'
|
||||
)
|
||||
logging.error(traceback.format_exc())
|
||||
logging.error(data)
|
||||
|
||||
@ -55,6 +55,32 @@ async function ClickPlaSave() {
|
||||
|
||||
}
|
||||
|
||||
async function delete_pla_chanel(id) {
|
||||
var Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
timer: 2000
|
||||
});
|
||||
formdata = new FormData(id_form_pla)
|
||||
const csrftoken = getCookie('csrftoken');
|
||||
let response = await fetch('/management/pla/channels/'+id+'/remove/', {
|
||||
method: 'POST',
|
||||
body: formdata,
|
||||
headers: {"X-CSRFToken": csrftoken},
|
||||
});
|
||||
|
||||
let result = await response.json();
|
||||
if (result.status=='ok'){
|
||||
$('#large_'+id).modal('hide')
|
||||
$('#tr_'+id).remove()
|
||||
$('.modal-backdrop').remove()
|
||||
toastr.success('Запись "'+result.name+'" удалена.')
|
||||
}else{
|
||||
toastr.error('Ошибка удаления.')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Событие после загрузки страницы
|
||||
document.addEventListener("DOMContentLoaded", async () => {
|
||||
|
||||
@ -27,6 +27,32 @@ async function ClickWkLocationSave() {
|
||||
|
||||
}
|
||||
|
||||
async function delete_wklocation_icon(id) {
|
||||
var Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
timer: 2000
|
||||
});
|
||||
formdata = new FormData()
|
||||
const csrftoken = getCookie('csrftoken');
|
||||
let response = await fetch('/management/wkloaction/icons/'+id+'/remove/', {
|
||||
method: 'POST',
|
||||
body: formdata,
|
||||
headers: {"X-CSRFToken": csrftoken},
|
||||
});
|
||||
|
||||
let result = await response.json();
|
||||
if (result.status=='ok'){
|
||||
$('#large_'+id).modal('hide')
|
||||
$('#tr_'+id).remove()
|
||||
$('.modal-backdrop').remove()
|
||||
toastr.success('Запись "'+result.name+'" удалена.')
|
||||
}else{
|
||||
toastr.error('Ошибка удаления.')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Событие после загрузки страницы
|
||||
document.addEventListener("DOMContentLoaded", async () => {
|
||||
|
||||
@ -238,21 +238,21 @@
|
||||
<a href="/management/general/" class="nav-link"><i class="fas fa-minus nav-icon"></i><p>Общие параметры</p></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/management/geoproc/" class="nav-link"><i class="fas fa-minus nav-icon"></i><p>Геомеханические процессы V</p></a>
|
||||
<a href="/management/geoproc/" class="nav-link"><i class="fas fa-minus nav-icon"></i><p>Геомеханические процессы</p></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/management/seismicproc/" class="nav-link"><i class="fas fa-minus nav-icon"></i></i><p>Сейсмические процессы V</p></a>
|
||||
<a href="/management/seismicproc/" class="nav-link"><i class="fas fa-minus nav-icon"></i></i><p>Сейсмические процессы</p></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/management/gto/" class="nav-link"><i class="fas fa-minus nav-icon"></i><p>Горнотранспортное оборудование</p></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/management/pla/" class="nav-link"><i class="fas fa-minus nav-icon"></i><p>Система оповещения </p></a></li>
|
||||
<a href="/management/pla/" class="nav-link"><i class="fas fa-minus nav-icon"></i><p>Система оповещения</p></a></li>
|
||||
<li class="nav-item">
|
||||
<a href="/management/wkloaction/" class="nav-link nav-item" ><i class="fas fa-minus nav-icon"></i><p>Местоположение персонала </p></a>
|
||||
<a href="/management/wkloaction/" class="nav-link nav-item" ><i class="fas fa-minus nav-icon"></i><p>Местоположение персонала</p></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/management/users/" class="nav-link"><i class="fas fa-minus nav-icon"></i><p>Пользователи V</p></a>
|
||||
<a href="/management/users/" class="nav-link"><i class="fas fa-minus nav-icon"></i><p>Пользователи</p></a>
|
||||
</li>
|
||||
<li class="nav-header"></li>
|
||||
<li class="nav-header"></li>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user