bug fixes
This commit is contained in:
parent
a95a6d99e4
commit
33668b7906
@ -268,6 +268,8 @@ for (let radioButton of radioButtons) {
|
||||
|
||||
console.log(data.DATA);
|
||||
|
||||
console.log(decodeCHValue(data.DATA.MCMS.M));
|
||||
|
||||
clearServerContainer();
|
||||
|
||||
data.DATA.MCMS.SP.forEach((data) => {
|
||||
@ -386,12 +388,13 @@ for (let radioButton of radioButtons) {
|
||||
const selectedData = camerasData[selectedIndex];
|
||||
|
||||
document.getElementById("cameras-quality").value = selectedData.QLT;
|
||||
document.getElementById("cameras-bitrate").value = selectedData.BR;
|
||||
document.getElementById("cameras-bitrate").value = selectedData.BRM;
|
||||
document.getElementById("cameras-video").value = selectedData.RST;
|
||||
document.getElementById("cameras-alert").value = selectedData.ALT;
|
||||
document.getElementById("cameras-ven").value = selectedData.VEN;
|
||||
document.getElementById("cameras-aen").value = selectedData.AEN;
|
||||
document.getElementById("cameras-framerate").value = selectedData.FR;
|
||||
document.getElementById("cameras-encode").value = selectedData.ECT;
|
||||
}
|
||||
|
||||
document.getElementById("cameras-id").addEventListener("change", function () {
|
||||
@ -445,12 +448,13 @@ function updateCamerasInArray() {
|
||||
|
||||
|
||||
selectedDataRow.QLT = parseInt(document.getElementById("cameras-quality").value);
|
||||
selectedDataRow.BR = parseInt(document.getElementById("cameras-bitrate").value);
|
||||
selectedDataRow.BRM = parseInt(document.getElementById("cameras-bitrate").value);
|
||||
selectedDataRow.RST = parseInt(document.getElementById("cameras-video").value);
|
||||
selectedDataRow.ALT = parseInt(document.getElementById("cameras-alert").value);
|
||||
selectedDataRow.VEN = parseInt(document.getElementById("cameras-ven").value);
|
||||
selectedDataRow.AEN = parseInt(document.getElementById("cameras-aen").value);
|
||||
selectedDataRow.FR = parseInt(document.getElementById("cameras-framerate").value);
|
||||
selectedDataRow.ECT = parseInt(document.getElementById("cameras-encode").value);
|
||||
|
||||
camerasData[selectedIndex] = selectedDataRow;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@
|
||||
|
||||
<div class="parameters-inputs">
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-serial">Серийный номер<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-serial">Серийный номер</label>
|
||||
<input name="serialNumber" type="text" id="parameters-serial" placeholder="Серийный номер устройства" required readonly>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
@ -182,7 +182,7 @@
|
||||
<input name="deviceNumber" type="text" id="parameters-number" placeholder="Номерной знак устройства">
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-plate">Государственный номер<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-plate">Государственный номер</label>
|
||||
<input name="plateNumber" type="text" id="parameters-plate" placeholder="Государственный номер ТС" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
@ -190,11 +190,11 @@
|
||||
<input name="vinNumber" type="text" id="parameters-vin" placeholder="VIN номер устройства">
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-channels">Количество каналов<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-channels">Количество каналов</label>
|
||||
<input name="channelsAmount" type="text" id="parameters-channels" placeholder="Кол-во каналов устройства" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-plateColor">Цвет номерного знака<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-plateColor">Цвет номерного знака</label>
|
||||
<select name="plateColor" id="parameters-plateColor">
|
||||
<option value="white">Белый</option>
|
||||
<option value="blue">Синий</option>
|
||||
@ -203,15 +203,15 @@
|
||||
</div>
|
||||
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-ip">IP-адрес<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-ip">IP-адрес</label>
|
||||
<input name="IPAddress" type="text" id="parameters-ip" placeholder="IP-адрес сервера" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-port">Порт<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-port">Порт</label>
|
||||
<input name="serverPort" type="text" id="parameters-port" placeholder="Порт сервера" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-group">Группа<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-group">Группа</label>
|
||||
<select name="deviceGroup" id="parameters-group">
|
||||
<option value="0">Другое</option>
|
||||
{{#each GroupsList}}
|
||||
@ -220,7 +220,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-protocol">Протокол<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-protocol">Протокол</label>
|
||||
<select name="connectionProtocol" id="parameters-protocol">
|
||||
<option value="N9M">N9M</option>
|
||||
</select>
|
||||
@ -244,19 +244,19 @@
|
||||
|
||||
<div class="parameters-inputs">
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-sim">Номер SIM-карты<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-sim">Номер SIM-карты</label>
|
||||
<input name="sumNumber" type="text" id="parameters-sim" placeholder="Номер SIM-карты" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-sim-imei">IMEI<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-sim-imei">IMEI</label>
|
||||
<input name="simIMEI" type="text" id="parameters-sim-imei" placeholder="IMEI SIM-карты" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-sim-imsi">IMSI<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-sim-imsi">IMSI</label>
|
||||
<input name="simIMSI" type="text" id="parameters-sim-imsi" placeholder="IMSI SIM-карты" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-sim-module">Тип сетевого модуля<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-sim-module">Тип сетевого модуля</label>
|
||||
<select name="simModule" id="parameters-sim-module">
|
||||
<option value="GPRS">GPRS</option>
|
||||
<option value="CDMA">CDMA</option>
|
||||
@ -286,7 +286,7 @@
|
||||
|
||||
<div class="parameters-inputs">
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-trasnsport-type">Тип автомобиля<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-trasnsport-type">Тип автомобиля</label>
|
||||
<select name="transportType" id="parameters-trasnsport-type" onchange="truncateText(this)">
|
||||
<option value="1">Пассажирский подвижной состав</option>
|
||||
<option value="2">Большой автобус</option>
|
||||
@ -314,23 +314,23 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-trasnsport-factory">Номер завода<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-trasnsport-factory">Номер завода</label>
|
||||
<input name="transportFactory" type="text" id="parameters-trasnsport-factory" placeholder="Номер завода ТС" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-transport-strength">Несущая способность<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-transport-strength">Несущая способность</label>
|
||||
<input name="transportStrength" type="text" id="parameters-transport-strength" placeholder="Несущая способность (тонны)" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-transport-engine">Номер двигателя<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-transport-engine">Номер двигателя</label>
|
||||
<input name="transportEngine" type="text" id="parameters-transport-engine" placeholder="Номер двигателя ТС" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-transport-stanina">Номер станины<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-transport-stanina">Номер станины</label>
|
||||
<input name="transportStanina" type="text" id="parameters-transport-stanina" placeholder="Номер станины ТС" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-trasnsport-fuel">Тип топливного масла<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-trasnsport-fuel">Тип топливного масла</label>
|
||||
<select name="transportFuel" id="parameters-trasnsport-fuel">
|
||||
<option value="gasoline">Бензин</option>
|
||||
<option value="diesel">Дизельное топливо</option>
|
||||
@ -342,13 +342,13 @@
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<div class="parameters-transport-certificate">
|
||||
<label for="parameters-transport-certificate">Свид-ство о дорожной перевозке<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-transport-certificate">Свид-ство о дорожной перевозке</label>
|
||||
<input name="transportCertificate" type="text" id="parameters-transport-certificate" placeholder="Номер свидетельства" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<div class="pparameters-trasnsport-category">
|
||||
<label for="parameters-trasnsport-category">Техническая категория<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-trasnsport-category">Техническая категория</label>
|
||||
<select name="transportCategory" id="parameters-trasnsport-category">
|
||||
<option value="1">Категория 1</option>
|
||||
<option value="2">Категория 2</option>
|
||||
@ -358,19 +358,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-transport-expire">Срок действия<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-transport-expire">Срок действия</label>
|
||||
<input name="transportExpire" type="date" id="parameters-transport-expire" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-transport-consumption">Расход топлива на 100 км<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-transport-consumption">Расход топлива на 100 км</label>
|
||||
<input name="transportConsumption" type="text" id="parameters-transport-consumption" placeholder="Расход топлива в литрах" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-transport-province">Провинция<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-transport-province">Провинция</label>
|
||||
<input name="transportProvince" type="text" id="parameters-transport-province" placeholder="Провинция" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-transport-city">Город<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-transport-city">Город</label>
|
||||
<input name="transportCity" type="text" id="parameters-transport-city" placeholder="Город" required>
|
||||
</div>
|
||||
|
||||
@ -391,27 +391,27 @@
|
||||
|
||||
<div class="parameters-inputs">
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-equipment-name">Имя устройства<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-equipment-name">Имя устройства</label>
|
||||
<input name="equipmentName" type="text" id="parameters-equipment-name" placeholder="Имя пользовательского устройства" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-equipment-password">Пароль устройства<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-equipment-password">Пароль устройства</label>
|
||||
<input name="equipmentPassword" type="text" id="parameters-equipment-password" placeholder="Пароль устройства" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-equipment-number">Номер партии<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-equipment-number">Номер партии</label>
|
||||
<input name="equipmentNumber" type="text" id="parameters-equipment-number" placeholder="Заводской номер партии" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-equipment-released">Дата выпуска<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-equipment-released">Дата выпуска</label>
|
||||
<input name="equipmentReleased" type="date" id="parameters-equipment-released" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-device-installer">Установщик<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-device-installer">Установщик</label>
|
||||
<input name="equipmentInstaller" type="text" id="parameters-device-installer" placeholder="ФИО установщика" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="parameters-equipment-installed">Дата монтажа<span style="color: rgba(255, 69, 58, 1);">*</span></label>
|
||||
<label for="parameters-equipment-installed">Дата монтажа</label>
|
||||
<input name="equipmentInstalled" type="date" id="parameters-equipment-installed" required>
|
||||
</div>
|
||||
|
||||
|
@ -537,7 +537,7 @@
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="system-ai-et1">Длительность тревоги</label>
|
||||
<input name="AI-ET1" type="text" id="system-ai-et1" placeholder="В секундах" required>
|
||||
<input name="AI-ET1" type="text" id="system-ai-et1" placeholder="0 - 60 секунд" required>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="system-ai-ss-en1">Снимки сразу после тревог</label>
|
||||
@ -548,7 +548,7 @@
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="system-ai-ar-d1">Запись после тревоги</label>
|
||||
<input name="AI-ar-d1" type="text" id="system-ai-ar-d1" placeholder="В секундах" required>
|
||||
<input name="AI-ar-d1" type="text" id="system-ai-ar-d1" placeholder="0 - 60 секунд" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -617,36 +617,48 @@
|
||||
<div class="parameters-input">
|
||||
<label for="cameras-quality">Качество видео</label>
|
||||
<select name="QLT" id="cameras-quality">
|
||||
<option value="1">Максимальное</option>
|
||||
<option value="2">Скорее максимальное</option>
|
||||
<option value="3">Скорее минимальное</option>
|
||||
<option value="4">Минимальное</option>
|
||||
<option value="1">1 (Наилучшее)</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="cameras-bitrate">Максимальный битрейт</label>
|
||||
<input name="BR" type="text" id="cameras-bitrate" placeholder="Максимальный битрейт видео">
|
||||
<label for="cameras-bitrate">Битрейт</label>
|
||||
<select name="BRM" id="cameras-bitrate">
|
||||
<option value="0">CBR</option>
|
||||
<option value="1">VBR</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="cameras-video">Разрешение видео</label>
|
||||
<select name="RST" id="cameras-video">
|
||||
<option value="0">352 x 288</option>
|
||||
<option value="1">352 x 576</option>
|
||||
<option value="2">704 x 576</option>
|
||||
<option value="3">176 x 144</option>
|
||||
<option value="4">320 × 240</option>
|
||||
<option value="5">640 × 480</option>
|
||||
<option value="6">1280 x 720</option>
|
||||
<option value="7">1920 × 1080</option>
|
||||
<option value="0">CIF</option>
|
||||
<option value="1">HD1</option>
|
||||
<option value="2">D1</option>
|
||||
<option value="6">720P</option>
|
||||
<option value="7">1080P</option>
|
||||
<option value="11">WCIF</option>
|
||||
<option value="12">WHD1</option>
|
||||
<option value="13">WD1</option>
|
||||
<option value="14">960P</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
<label for="cameras-alert">Качество видео при предупреждении</label>
|
||||
<select name="ALT" id="cameras-alert">
|
||||
<option value="1">Максимальное</option>
|
||||
<option value="2">Скорее максимальное</option>
|
||||
<option value="3">Скорее минимальное</option>
|
||||
<option value="4">Минимальное</option>
|
||||
<option value="1">1 (Наилучшее)</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="parameters-input">
|
||||
@ -666,7 +678,15 @@
|
||||
|
||||
<div class="parameters-input">
|
||||
<label for="cameras-framerate">Фреймрейт</label>
|
||||
<input name="FR" type="text" id="cameras-framerate" placeholder="Фреймрейт видео">
|
||||
<input name="FR" type="text" id="cameras-framerate" placeholder="От 1 до 25">
|
||||
</div>
|
||||
|
||||
<div class="parameters-input">
|
||||
<label for="cameras-encode">Кодировка</label>
|
||||
<select name="ECT" id="cameras-encode">
|
||||
<option value="0">H264</option>
|
||||
<option value="1">H265</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
@ -679,6 +699,104 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var bitrateField = document.getElementById('cameras-framerate');
|
||||
|
||||
bitrateField.addEventListener('blur', function() {
|
||||
var currentValue = parseInt(bitrateField.value);
|
||||
|
||||
if (isNaN(currentValue) || currentValue < 1) {
|
||||
bitrateField.value = 1;
|
||||
} else if (currentValue > 25) {
|
||||
bitrateField.value = 25;
|
||||
}
|
||||
});
|
||||
|
||||
var minSpeedField = document.getElementById('system-ai-fgms1');
|
||||
|
||||
minSpeedField.addEventListener('blur', function() {
|
||||
var currentValue = parseInt(minSpeedField.value);
|
||||
|
||||
if (isNaN(currentValue) || currentValue < 0) {
|
||||
minSpeedField.value = 0;
|
||||
} else if (currentValue > 50) {
|
||||
minSpeedField.value = 50;
|
||||
}
|
||||
});
|
||||
|
||||
var maxSpeedField = document.getElementById('system-ai-sgms1');
|
||||
|
||||
maxSpeedField.addEventListener('blur', function() {
|
||||
var currentValue = parseInt(maxSpeedField.value);
|
||||
|
||||
if (isNaN(currentValue) || currentValue < 0) {
|
||||
maxSpeedField.value = 0;
|
||||
} else if (currentValue > 50) {
|
||||
maxSpeedField.value = 50;
|
||||
}
|
||||
});
|
||||
|
||||
var recogniseDurationField = document.getElementById('system-ai-udt1');
|
||||
|
||||
recogniseDurationField.addEventListener('blur', function() {
|
||||
var currentValue = parseInt(recogniseDurationField.value);
|
||||
|
||||
if (isNaN(currentValue) || currentValue < 0) {
|
||||
recogniseDurationField.value = 0;
|
||||
} else if (currentValue > 60) {
|
||||
recogniseDurationField.value = 60;
|
||||
}
|
||||
});
|
||||
|
||||
var durationField = document.getElementById('system-ai-vt1');
|
||||
|
||||
durationField.addEventListener('blur', function() {
|
||||
var currentValue = parseInt(durationField.value);
|
||||
|
||||
if (isNaN(currentValue) || currentValue < 0) {
|
||||
durationField.value = 0;
|
||||
} else if (currentValue > 600) {
|
||||
durationField.value = 600;
|
||||
}
|
||||
});
|
||||
|
||||
var effectiveTimeField = document.getElementById('system-ai-sdt1');
|
||||
|
||||
effectiveTimeField.addEventListener('blur', function() {
|
||||
var currentValue = parseInt(effectiveTimeField.value);
|
||||
|
||||
if (isNaN(currentValue) || currentValue < 0) {
|
||||
effectiveTimeField.value = 0;
|
||||
} else if (currentValue > 10) {
|
||||
effectiveTimeField.value = 10;
|
||||
}
|
||||
});
|
||||
|
||||
var alarmDurationField = document.getElementById('system-ai-et1');
|
||||
|
||||
alarmDurationField.addEventListener('blur', function() {
|
||||
var currentValue = parseInt(alarmDurationField.value);
|
||||
|
||||
if (isNaN(currentValue) || currentValue < 0) {
|
||||
alarmDurationField.value = 0;
|
||||
} else if (currentValue > 60) {
|
||||
alarmDurationField.value = 60;
|
||||
}
|
||||
});
|
||||
|
||||
var afterAlarmDurationField = document.getElementById('system-ai-ar-d1');
|
||||
|
||||
afterAlarmDurationField.addEventListener('blur', function() {
|
||||
var currentValue = parseInt(afterAlarmDurationField.value);
|
||||
|
||||
if (isNaN(currentValue) || currentValue < 0) {
|
||||
afterAlarmDurationField.value = 0;
|
||||
} else if (currentValue > 60) {
|
||||
afterAlarmDurationField.value = 60;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const checkboxContainer = document.getElementById('checkboxContainer');
|
||||
|
Loading…
Reference in New Issue
Block a user