gpon-control-kz/index.html

305 lines
17 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GPON Control KZ - Система контроля строительства</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="style.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#1e40af',
secondary: '#0ea5e9',
accent: '#f59e0b',
success: '#10b981',
danger: '#ef4444',
warning: '#f59e0b',
dark: '#1e293b',
light: '#f8fafc'
}
}
}
}
</script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body class="bg-gray-50">
<!-- Навигация -->
<nav class="bg-dark text-white shadow-lg sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-4">
<div class="flex justify-between items-center h-16">
<div class="flex items-center space-x-3">
<svg class="w-8 h-8 text-secondary" fill="currentColor" viewBox="0 0 20 20">
<path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"/>
<path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"/>
</svg>
<span class="text-xl font-bold">GPON Control KZ</span>
</div>
<div class="hidden md:flex space-x-6">
<button onclick="showSection('dashboard')" class="nav-btn active">Главная</button>
<button onclick="showSection('objects')" class="nav-btn">Объекты</button>
<button onclick="showSection('problems')" class="nav-btn">Проблемные</button>
<button onclick="showSection('analytics')" class="nav-btn">Аналитика</button>
</div>
<div class="flex items-center space-x-4">
<button onclick="toggleNotifications()" class="relative">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"/>
</svg>
<span id="notif-badge" class="absolute -top-2 -right-2 bg-danger text-white text-xs rounded-full w-5 h-5 flex items-center justify-center">0</span>
</button>
<div class="text-sm">
<div class="font-semibold">Шорабек Б.</div>
<div class="text-gray-400 text-xs">Руководитель проекта</div>
</div>
</div>
</div>
</div>
</nav>
<!-- Уведомления -->
<div id="notifications" class="fixed right-4 top-20 z-50 hidden">
<div class="bg-white rounded-lg shadow-xl p-4 w-80 max-h-96 overflow-y-auto">
<h3 class="font-bold text-lg mb-3">Уведомления</h3>
<div id="notif-list"></div>
</div>
</div>
<!-- Главная панель -->
<section id="dashboard" class="section">
<div class="max-w-7xl mx-auto px-4 py-8">
<h1 class="text-3xl font-bold text-dark mb-6">Панель управления</h1>
<!-- KPI карточки -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="bg-white rounded-xl shadow-md p-6 border-l-4 border-primary">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Всего объектов</p>
<p id="kpi-total" class="text-3xl font-bold text-dark">0</p>
</div>
<div class="bg-blue-100 p-3 rounded-full">
<svg class="w-8 h-8 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"/>
</svg>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 border-l-4 border-secondary">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">В работе</p>
<p id="kpi-active" class="text-3xl font-bold text-dark">0</p>
</div>
<div class="bg-cyan-100 p-3 rounded-full">
<svg class="w-8 h-8 text-secondary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 border-l-4 border-success">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Завершено</p>
<p id="kpi-completed" class="text-3xl font-bold text-dark">0</p>
</div>
<div class="bg-green-100 p-3 rounded-full">
<svg class="w-8 h-8 text-success" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 border-l-4 border-danger">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Проблемные</p>
<p id="kpi-problems" class="text-3xl font-bold text-dark">0</p>
</div>
<div class="bg-red-100 p-3 rounded-full">
<svg class="w-8 h-8 text-danger" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
</svg>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 border-l-4 border-warning">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Просрочено</p>
<p id="kpi-overdue" class="text-3xl font-bold text-dark">0</p>
</div>
<div class="bg-yellow-100 p-3 rounded-full">
<svg class="w-8 h-8 text-warning" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 border-l-4 border-purple-500">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Портов по плану</p>
<p id="kpi-ports-plan" class="text-3xl font-bold text-dark">0</p>
</div>
<div class="bg-purple-100 p-3 rounded-full">
<svg class="w-8 h-8 text-purple-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"/>
</svg>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 border-l-4 border-green-500">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Портов факт</p>
<p id="kpi-ports-fact" class="text-3xl font-bold text-dark">0</p>
</div>
<div class="bg-green-100 p-3 rounded-full">
<svg class="w-8 h-8 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/>
</svg>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6 border-l-4 border-indigo-500">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">% выполнения</p>
<p id="kpi-percent" class="text-3xl font-bold text-dark">0%</p>
</div>
<div class="bg-indigo-100 p-3 rounded-full">
<svg class="w-8 h-8 text-indigo-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"/>
</svg>
</div>
</div>
</div>
</div>
<!-- Карта и статусы -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Карта -->
<div class="lg:col-span-2 bg-white rounded-xl shadow-md p-6">
<h2 class="text-xl font-bold text-dark mb-4">Карта объектов Казахстана</h2>
<div id="map" class="h-96 rounded-lg"></div>
</div>
<!-- Статусы -->
<div class="bg-white rounded-xl shadow-md p-6">
<h2 class="text-xl font-bold text-dark mb-4">Статусы объектов</h2>
<div id="status-chart-container" class="h-64">
<canvas id="statusChart"></canvas>
</div>
</div>
</div>
</div>
</section>
<!-- Объекты -->
<section id="objects" class="section hidden">
<div class="max-w-7xl mx-auto px-4 py-8">
<h1 class="text-3xl font-bold text-dark mb-6">Все объекты</h1>
<!-- Фильтры -->
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<select id="filter-region" onchange="filterObjects()" class="border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
<option value="">Все регионы</option>
</select>
<select id="filter-city" onchange="filterObjects()" class="border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
<option value="">Все города</option>
</select>
<select id="filter-status" onchange="filterObjects()" class="border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
<option value="">Все статусы</option>
<option value="План">План</option>
<option value="Обследование">Обследование</option>
<option value="СМР">СМР</option>
<option value="Проблема">Проблема</option>
<option value="Готов">Готов</option>
<option value="Сдан">Сдан</option>
</select>
<select id="filter-manager" onchange="filterObjects()" class="border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
<option value="">Все ответственные</option>
</select>
</div>
<div class="mt-4">
<input type="text" id="search-input" oninput="filterObjects()" placeholder="Поиск по адресу или названию..." class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
</div>
</div>
<!-- Список объектов -->
<div id="objects-list" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div>
</div>
</section>
<!-- Проблемные объекты -->
<section id="problems" class="section hidden">
<div class="max-w-7xl mx-auto px-4 py-8">
<h1 class="text-3xl font-bold text-dark mb-6 flex items-center">
<svg class="w-8 h-8 text-danger mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
</svg>
Проблемные объекты
</h1>
<div id="problems-list" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div>
</div>
</section>
<!-- Аналитика -->
<section id="analytics" class="section hidden">
<div class="max-w-7xl mx-auto px-4 py-8">
<h1 class="text-3xl font-bold text-dark mb-6">Аналитика по регионам</h1>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<div class="bg-white rounded-xl shadow-md p-6">
<h3 class="text-lg font-bold mb-4">План vs Факт по регионам</h3>
<canvas id="regionsChart"></canvas>
</div>
<div class="bg-white rounded-xl shadow-md p-6">
<h3 class="text-lg font-bold mb-4">Процент выполнения по регионам</h3>
<canvas id="percentChart"></canvas>
</div>
</div>
<div class="bg-white rounded-xl shadow-md p-6">
<h3 class="text-lg font-bold mb-4">Количество портов по регионам</h3>
<canvas id="portsChart"></canvas>
</div>
</div>
</section>
<!-- Модальное окно объекта -->
<div id="object-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
<div class="bg-white rounded-xl shadow-2xl max-w-2xl w-full max-h-[90vh] overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-start mb-4">
<h2 id="modal-title" class="text-2xl font-bold text-dark"></h2>
<button onclick="closeModal()" class="text-gray-500 hover:text-gray-700">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<div id="modal-content"></div>
</div>
</div>
</div>
<script src="app.js"></script>
</body>
</html>