sozday-dashbord-dlya-analiza/index.html

324 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">
<title>Анализ причины длительности устранения повреждений</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; }
.container { max-width: 1200px; margin: 0 auto; }
.header { text-align: center; color: white; margin-bottom: 30px; }
.header h1 { font-size: clamp(24px, 4vw, 36px); margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.header p { font-size: 16px; opacity: 0.9; }
.dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .dashboard { grid-template-columns: 1fr; } }
.card { background: white; border-radius: 16px; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.card h2 { font-size: 20px; color: #667eea; margin-bottom: 20px; border-bottom: 2px solid #667eea; padding-bottom: 10px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; color: #333; margin-bottom: 6px; font-size: 14px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: #667eea; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-group { display: flex; align-items: center; gap: 8px; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; }
.btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 12px 24px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; margin-top: 10px; transition: transform 0.2s, box-shadow 0.2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); }
.btn:active { transform: translateY(0); }
.report-section { background: #f8f9fa; border-radius: 12px; padding: 20px; margin-top: 20px; }
.report-section h3 { color: #667eea; margin-bottom: 15px; font-size: 18px; }
.report-item { background: white; padding: 15px; border-radius: 8px; margin-bottom: 12px; border-left: 4px solid #667eea; }
.report-item strong { color: #333; }
.report-item p { color: #555; line-height: 1.6; margin-top: 8px; }
.report-item.error { border-left-color: #f44336; }
.report-item.warning { border-left-color: #ff9800; }
.report-item.success { border-left-color: #4caf50; }
.hidden { display: none; }
.template-preview { background: #f8f9fa; border: 2px dashed #ddd; border-radius: 12px; padding: 20px; margin-top: 20px; text-align: center; }
.template-preview img { max-width: 100%; height: auto; border-radius: 8px; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-left: 8px; }
.status-badge.ok { background: #e8f5e9; color: #2e7d32; }
.status-badge.err { background: #ffebee; color: #c62828; }
.status-badge.warn { background: #fff3e0; color: #ef6c00; }
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>📊 Дашборд анализа причин длительности устранения повреждений</h1>
<p>На основе Регламента УНРСТ (Версия 8)</p>
</div>
<div class="dashboard">
<div class="card">
<h2>📍 Данные об объекте</h2>
<div class="form-group">
<label for="location">Населенный пункт</label>
<input type="text" id="location" placeholder="например: г. Алматы">
</div>
<div class="form-row">
<div class="form-group">
<label for="district">Район</label>
<input type="text" id="district" placeholder="например: Алмалинский">
</div>
<div class="form-group">
<label for="region">Область</label>
<input type="text" id="region" placeholder="например: г. Алматы">
</div>
</div>
<div class="form-group">
<label for="damageType">Тип повреждения</label>
<select id="damageType">
<option value="">Выберите тип</option>
<option value="кабель">Повреждение кабеля</option>
<option value="электропитание">Отключение электропитания</option>
<option value="оборудование">Неисправность оборудования</option>
<option value="оптоволокно">Повреждение оптоволокна</option>
<option value="другое">Другое</option>
</select>
</div>
<div class="form-group">
<label for="damageDesc">Описание повреждения</label>
<textarea id="damageDesc" placeholder="Краткое описание причины повреждения"></textarea>
</div>
</div>
<div class="card">
<h2>🚑 Факторы длительности</h2>
<div class="form-group">
<label>Факторы, влияющие на время устранения:</label>
<div class="checkbox-group">
<input type="checkbox" id="distance">
<label for="distance">Большое расстояние до объекта</label>
</div>
<div class="checkbox-group">
<input type="checkbox" id="weather">
<label for="weather">Неблагоприятные метеоусловия</label>
</div>
<div class="checkbox-group">
<input type="checkbox" id="night">
<label for="night">Ночное время (23:00–06:00)</label>
</div>
<div class="checkbox-group">
<input type="checkbox" id="search">
<label for="search">Поиск места повреждения</label>
</div>
<div class="checkbox-group">
<input type="checkbox" id="earthworks">
<label for="earthworks">Земляные работы</label>
</div>
<div class="checkbox-group">
<input type="checkbox" id="access">
<label for="access">Ожидание доступа к объекту</label>
</div>
<div class="checkbox-group">
<input type="checkbox" id="complaints">
<label for="complaints">Жалобы жильцов (шум ДЭС)</label>
</div>
</div>
<div class="form-group">
<label for="weatherDesc">Метеоусловия (если применимо)</label>
<input type="text" id="weatherDesc" placeholder="например: снегопад, гололед, ливень">
</div>
<div class="form-group">
<label for="distanceKm">Расстояние от базы (км)</label>
<input type="number" id="distanceKm" placeholder="например: 45" step="0.1">
</div>
<div class="form-group">
<label for="duration">Общая длительность устранения (часов)</label>
<input type="number" id="duration" placeholder="например: 33" step="0.5">
</div>
</div>
<div class="card">
<h2>📞 Оповещение руководителей</h2>
<div class="form-group">
<label for="notified">Было ли оповещение руководителей?</label>
<select id="notified">
<option value="yes">Да</option>
<option value="no">Нет</option>
<option value="uod">Только УОД</option>
</select>
</div>
<div id="notifiedDetails">
<div class="form-group">
<label for="notifyDate">Дата оповещения</label>
<input type="date" id="notifyDate">
</div>
<div class="form-group">
<label for="notifyTime">Время оповещения</label>
<input type="time" id="notifyTime">
</div>
<div class="form-group">
<label for="notifyPersons">Оповещенные лица (ФИО, должность)</label>
<textarea id="notifyPersons" placeholder="например: и.о. начальника ЦЭиК Даутов Ш."></textarea>
</div>
</div>
<div class="form-group">
<label for="uodRecord">Запись об информировании УОД</label>
<div class="checkbox-group">
<input type="checkbox" id="uodRecord">
<label for="uodRecord">Есть запись в логах (УОД Опер_Смена)</label>
</div>
</div>
</div>
<div class="card">
<h2>⚠️ Ошибки персонала СОК1 (Т1)</h2>
<div class="form-group">
<label for="soc1Errors">Наличие ошибок</label>
<select id="soc1Errors">
<option value="none">Ошибок нет</option>
<option value="delay">Задержка реакции</option>
<option value="status">Неверный статус шлюза</option>
<option value="late">Запоздалое восстановление</option>
<option value="other">Другое</option>
</select>
</div>
<div class="form-group">
<label for="soc1Desc">Описание ошибок</label>
<textarea id="soc1Desc" placeholder="Опишите ошибки СОК1, если они были"></textarea>
</div>
<div class="form-group">
<label for="lgrpStatus">Статус LGRP шлюза</label>
<input type="text" id="lgrpStatus" placeholder="например: InSv (в работе)">
</div>
<div class="form-group">
<label for="restoreTime">Время восстановления шлюза</label>
<input type="text" id="restoreTime" placeholder="например: 07:24 07.08.2026">
</div>
</div>
</div>
<div class="card" style="margin-top: 20px;">
<h2>📋 Сгенерированный отчет</h2>
<button class="btn" onclick="generateReport()">📄 Сгенерировать отчет</button>
<div id="report" class="report-section hidden">
<h3>Анализ причины длительности устранения повреждений</h3>
<div class="report-item">
<strong>📍 Объект:</strong>
<p id="reportLocation"></p>
</div>
<div class="report-item">
<strong>🔍 Причина длительности устранения:</strong>
<p id="reportReason"></p>
</div>
<div class="report-item">
<strong>📞 Оповещение руководителей:</strong>
<p id="reportNotification"></p>
</div>
<div class="report-item error">
<strong>⚠️ Ошибки СОК1 (Т1):</strong>
<p id="reportSOC1"></p>
</div>
</div>
</div>
<div class="card" style="margin-top: 20px;">
<h2>📸 Шаблон анализа</h2>
<div class="template-preview">
<img src="шаблон%20для%20анализа%20причины%20длительности.png" alt="Шаблон анализа причины длительности">
<p style="margin-top: 10px; color: #666; font-size: 14px;">Используйте этот шаблон как образец для формирования отчета</p>
</div>
</div>
</div>
<script>
function generateReport() {
const location = document.getElementById('location').value || 'не указан';
const district = document.getElementById('district').value || '';
const region = document.getElementById('region').value || '';
const fullLocation = [location, district, region].filter(Boolean).join(', ');
document.getElementById('reportLocation').textContent = fullLocation || 'Данные об объекте не заполнены';
const damageType = document.getElementById('damageType').value;
const damageDesc = document.getElementById('damageDesc').value || 'не указано';
const factors = [];
if (document.getElementById('distance').checked) factors.push('значительное расстояние до объекта');
if (document.getElementById('weather').checked) factors.push('неблагоприятные метеоусловия');
if (document.getElementById('night').checked) factors.push('ночное время проведения работ');
if (document.getElementById('search').checked) factors.push('поиск места повреждения');
if (document.getElementById('earthworks').checked) factors.push('земляные работы');
if (document.getElementById('access').checked) factors.push('ожидание доступа к объекту');
if (document.getElementById('complaints').checked) factors.push('ограничение работы ДЭС из-за жалоб жильцов');
const weatherDesc = document.getElementById('weatherDesc').value;
const distanceKm = document.getElementById('distanceKm').value;
const duration = document.getElementById('duration').value;
let reasonText = damageDesc;
if (factors.length > 0) {
reasonText += '. Продолжительность восстановительных работ связана с: ' + factors.join(', ') + '.';
}
if (weatherDesc) {
reasonText += ' Метеоусловия: ' + weatherDesc + '.';
}
if (distanceKm) {
reasonText += ' Расстояние от базы: ' + distanceKm + ' км.';
}
if (duration) {
reasonText += ' Общее время устранения: ' + duration + ' ч.';
}
document.getElementById('reportReason').textContent = reasonText;
const notified = document.getElementById('notified').value;
const notifyDate = document.getElementById('notifyDate').value;
const notifyTime = document.getElementById('notifyTime').value;
const notifyPersons = document.getElementById('notifyPersons').value;
const uodRecord = document.getElementById('uodRecord').checked;
let notificationText = '';
if (notified === 'yes' && notifyPersons) {
const dateTime = (notifyDate && notifyTime) ? ` ${notifyDate} в ${notifyTime}` : '';
notificationText = `${notifyPersons}${dateTime}.`;
if (uodRecord) {
notificationText += ' Информирован УОД ДЭСД.';
}
} else if (notified === 'uod' || uodRecord) {
notificationText = 'Информирован УОД ДЭСД.';
} else {
notificationText = 'Информация об оповещении руководителей отсутствует.';
}
document.getElementById('reportNotification').textContent = notificationText;
const soc1Errors = document.getElementById('soc1Errors').value;
const soc1Desc = document.getElementById('soc1Desc').value;
const lgrpStatus = document.getElementById('lgrpStatus').value;
const restoreTime = document.getElementById('restoreTime').value;
let soc1Text = '';
if (soc1Errors === 'none') {
soc1Text = 'Ошибок со стороны персонала СОК1 (Т1) не зафиксировано.';
if (lgrpStatus) {
soc1Text += ` Статус шлюза: ${lgrpStatus}.`;
}
if (restoreTime) {
soc1Text += ` Время восстановления: ${restoreTime}.`;
}
} else {
soc1Text = `Выявлены ошибки СОК1 (Т1): ${soc1Desc || soc1Errors}.`;
if (restoreTime) {
soc1Text += ` Шлюз восстановлен в: ${restoreTime}.`;
}
}
document.getElementById('reportSOC1').textContent = soc1Text;
document.getElementById('report').classList.remove('hidden');
document.getElementById('report').scrollIntoView({ behavior: 'smooth' });
}
document.getElementById('notified').addEventListener('change', function() {
const details = document.getElementById('notifiedDetails');
details.classList.toggle('hidden', this.value === 'no');
});
</script>
</body>
</html>