AudioHTML/filter.html

456 lines
21 KiB
HTML
Raw Normal View History

2023-11-03 00:47:21 +08:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
<link href="css/roundslider.min.css" rel="stylesheet">
<script src="js/jquery-3.7.1.js"></script>
<script src="js/roundslider.min.js"></script>
</head>
<body class="h-100 text-center text-bg-dark content-warp">
<div class="d-flex w-100 h-100 mx-auto flex-column">
<header class="mb-auto pb-5">
<div class="dotblock d-flex justify-content-between px-5 py-4">
<div class="fs-3">GEAZAN</div>
<div></div>
</div>
2023-11-15 18:43:40 +08:00
<div class="fw-bold border-black nav-bar" style="position:relative;">
<div class="d-flex nav justify-content-center">
<div class="">
<a href="home.html">HOME</a>
</div>
<div class="active"><a href="filter.html">FILTER</a></div>
2023-11-30 11:04:26 +08:00
<div class=""><a href="fs.html">FS</a></div>
2023-11-15 18:43:40 +08:00
<div class=""><a href="eq.html">EQ</a></div>
<div class=""><a href="ducking.html">DUCKING</a></div>
<div class=""><a href="network.html">NETWORK</a></div>
<div class="">
<a href="security.html">SECURITY</a>
</div>
<div class=""><a href="control.html">CONTROL</a></div>
<div class="last "><a href="system.html">SYSTEM</a></div>
2023-11-03 00:47:21 +08:00
</div>
2023-11-15 18:43:40 +08:00
<div class="d-flex float-end ps-5 align-items-center" style="position:absolute; right: 10px;top: 3px;">
2023-11-18 19:32:57 +08:00
<button class="btn btn-dark border-black" id="blink">
2023-11-15 18:43:40 +08:00
<svg t="1699500251819" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="4301" xmlns:xlink="http://www.w3.org/1999/xlink"
width="20" height="20">
<path
d="M513.3 239.9c-73.5 0-142.6 28.6-194.6 80.6-52 52-80.6 121.1-80.6 194.6s28.6 142.6 80.6 194.6c52 52 121.1 80.6 194.6 80.6s142.6-28.6 194.6-80.6c52-52 80.6-121.1 80.6-194.6s-28.6-142.6-80.6-194.6c-52-52-121.1-80.6-194.6-80.6z m0 482.3c-114.2 0-207.2-92.9-207.2-207.2S399 307.8 513.3 307.8c114.2 0 207.2 92.9 207.2 207.2s-92.9 207.2-207.2 207.2zM637.9 803.6H388.7c-18.8 0-34 15.2-34 34s15.2 34 34 34h249.2c18.8 0 34-15.2 34-34s-15.2-34-34-34zM588.1 885H438.6c-18.8 0-34 15.2-34 34s15.2 34 34 34h149.5c18.8 0 34-15.2 34-34s-15.2-34-34-34zM513.3 227.5c18.8 0 34-15.2 34-34V97c0-18.8-15.2-34-34-34s-34 15.2-34 34v96.5c0 18.7 15.2 34 34 34zM701.3 276.9c5.9 4.2 12.7 6.2 19.5 6.2 10.7 0 21.3-5.1 27.9-14.5l55.3-79c10.8-15.4 7-36.6-8.3-47.4-15.4-10.8-36.6-7-47.4 8.3l-55.3 79c-10.8 15.4-7.1 36.6 8.3 47.4zM938 357.6c-6.6-17.6-26.2-26.5-43.8-19.9l-90.4 33.8c-17.6 6.6-26.5 26.2-19.9 43.8 5.1 13.7 18.1 22.1 31.9 22.1 4 0 8-0.7 11.9-2.2l90.4-33.8c17.6-6.6 26.5-26.2 19.9-43.8zM283.4 252.5c6.6 9.4 17.2 14.5 27.9 14.5 6.7 0 13.5-2 19.5-6.2 15.4-10.8 19.1-32 8.3-47.4l-55.3-79c-10.8-15.4-32-19.1-47.4-8.3-15.4 10.8-19.1 32-8.3 47.4l55.3 79zM248.1 399.1c6.6-17.6-2.4-37.2-19.9-43.8l-90.4-33.8c-17.6-6.6-37.2 2.4-43.8 19.9-6.6 17.6 2.4 37.2 19.9 43.8l90.4 33.8c3.9 1.5 7.9 2.2 11.9 2.2 13.8 0 26.8-8.4 31.9-22.1z"
fill="#ffffff" p-id="4302" data-spm-anchor-id="a313x.search_index.0.i3.5b953a811enFNb"
class="selected"></path>
</svg>
</button>
2023-12-05 18:31:22 +08:00
<button class="btn btn-dark border-black ms-2" id="logout">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-box-arrow-right" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0z"/>
<path fill-rule="evenodd" d="M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z"/>
</svg>
</button>
2023-11-03 00:47:21 +08:00
</div>
</div>
</header>
<main class="px-3 d-flex justify-content-center">
<div class="content-container">
<div class="d-flex">
<div class="me-3"
style="border-left: 2px solid #000;border-right: 2px solid #000;border-bottom: 2px solid #000;">
<div class="divider">
2023-11-08 19:15:11 +08:00
<div class="divider-text"><span class="fw-bold">Mic1 HPF</span></div>
2023-11-03 00:47:21 +08:00
</div>
<div class="p-3 d-flex justify-content-center">
<div style="width: 200px;">
<div class="d-flex justify-content-center align-items-center" style="height: 30px;">
<div class="d-flex redio-switche">
2023-11-10 11:53:14 +08:00
<input type="radio" class="btn-check" name="mic1" id="mic1-on" value="enable">
2023-11-09 10:24:26 +08:00
<label class="btn btn-sm redio-btn on-btn" for="mic1-on">ENABLE</label>
2023-11-03 00:47:21 +08:00
2023-11-10 11:53:14 +08:00
<input type="radio" class="btn-check" name="mic1" id="mic1-off" value="disable">
2023-11-09 10:24:26 +08:00
<label class="btn btn-sm redio-btn off-btn" for="mic1-off">DISABLE</label>
2023-11-03 00:47:21 +08:00
</div>
</div>
<div class="mt-3">
<label style="font-size:14px; color: #888;" class="me-2">Type</label>
2023-11-09 10:24:26 +08:00
<select class="select" id="mic1-type">
<option value="Bessel">Bessel</option>
<option value="Butterworth">Butterworth</option>
<option value="Linkwitz-riley">Linkwitz-riley</option>
2023-11-03 00:47:21 +08:00
</select>
</div>
<div class="row _slider_customizations cus_handle mb-4">
<div class="block mt-4">
<div class="cell d-flex justify-content-center">
<div style="top: 100px; right: -20; width: 50px; position:relative;color: #888;"
class="text-end">20</div>
<div id="handle1" class="roundSlider"></div>
<div
style="top: 100px; left: -10px; width: 50px; position:relative;color: #888;">
2023-11-09 10:24:26 +08:00
20000
2023-11-03 00:47:21 +08:00
</div>
</div>
</div>
</div>
2023-11-09 17:25:00 +08:00
<div class="slider-value-box input-group justify-content-center mt-3">
<div>
2023-11-10 11:53:14 +08:00
<input class="slider-value text-center" id="handle1-value" type="number"
style="width: 40px;" value="200" />
2023-11-09 17:25:00 +08:00
</div>
<span
style="font-size: 12px; color: #555; padding-left: 6px; padding-top: 5px;">Hz</span>
2023-11-03 00:47:21 +08:00
</div>
<div class="mt-1" style="color: #888;">
2023-11-09 10:24:26 +08:00
<!-- HPF(Hz) -->
2023-11-03 00:47:21 +08:00
</div>
</div>
</div>
</div>
<div class="me-3"
style="border-left: 2px solid #000;border-right: 2px solid #000;border-bottom: 2px solid #000;">
<div class="divider">
2023-11-08 19:15:11 +08:00
<div class="divider-text"><span class="fw-bold">Mic2 HPF</span></div>
2023-11-03 00:47:21 +08:00
</div>
<div class="p-3 d-flex justify-content-center">
<div style="width: 200px;">
<div class="d-flex justify-content-center align-items-center" style="height: 30px;">
<div class="d-flex redio-switche">
2023-11-10 11:53:14 +08:00
<input type="radio" class="btn-check" name="mic2" id="mic2-on" value="enable">
2023-11-09 10:24:26 +08:00
<label class="btn btn-sm redio-btn on-btn" for="mic2-on">ENABLE</label>
2023-11-03 00:47:21 +08:00
2023-11-10 11:53:14 +08:00
<input type="radio" class="btn-check" name="mic2" id="mic2-off" value="disable">
2023-11-09 10:24:26 +08:00
<label class="btn btn-sm redio-btn off-btn" for="mic2-off">DISABLE</label>
2023-11-03 00:47:21 +08:00
</div>
</div>
<div class="mt-3">
<label style="font-size:14px; color: #888;" class="me-2">Type</label>
2023-11-09 10:24:26 +08:00
<select class="select" id="mic2-type">
<option value="Bessel">Bessel</option>
<option value="Butterworth">Butterworth</option>
<option value="Linkwitz-riley">Linkwitz-riley</option>
2023-11-03 00:47:21 +08:00
</select>
</div>
<div class="row _slider_customizations cus_handle mb-4">
<div class="block mt-4">
<div class="cell d-flex justify-content-center">
2023-11-09 10:24:26 +08:00
<div style="top: 100px; right: -20; width: 50px; position:relative;color: #888;"
class="text-end">20</div>
2023-11-03 00:47:21 +08:00
<div id="handle2" class="roundSlider"></div>
2023-11-09 10:24:26 +08:00
<div
style="top: 100px; left: -10px; width: 50px; position:relative;color: #888;">
20000
</div>
2023-11-03 00:47:21 +08:00
</div>
</div>
</div>
2023-11-09 17:25:00 +08:00
<div class="slider-value-box input-group justify-content-center mt-3">
<div>
2023-11-10 11:53:14 +08:00
<input class="slider-value text-center" id="handle2-value" type="number"
style="width: 40px;" value="200" />
2023-11-09 17:25:00 +08:00
</div>
<span
style="font-size: 12px; color: #555; padding-left: 6px; padding-top: 5px;">Hz</span>
2023-11-03 00:47:21 +08:00
</div>
<div class="mt-1" style="color: #888;">
2023-11-09 10:24:26 +08:00
<!-- HPF(Hz) -->
2023-11-03 00:47:21 +08:00
</div>
</div>
</div>
</div>
</div>
<div class="row d-flex">
</div>
</div>
</main>
<footer class="mt-auto text-white-50">
<div class="dotblock d-flex justify-content-between px-5 py-4">
<div class="">Geazan</div>
<div>www.geazan.com</div>
</div>
</footer>
</div>
2023-11-10 11:53:14 +08:00
2023-11-19 18:41:22 +08:00
<script>
var data = {}
2023-11-09 10:24:26 +08:00
2023-11-19 18:41:22 +08:00
document.addEventListener("DOMContentLoaded", function () {
//初始化配置
loadData()
})
$(document).ready(function () {
$("input[name='mic1']").on('change', function () {
let $value = $("input[name='mic1']:checked").val()
2023-11-21 18:28:46 +08:00
console.log($value)
2023-11-21 18:18:32 +08:00
let url = "http://192.168.0.116/cgi-bin/test.cgi"
2023-11-19 18:41:22 +08:00
let postData = {
2023-11-21 18:31:18 +08:00
action: 'filter_set',
2023-11-19 18:41:22 +08:00
subaction: 'mic1',
state: $value,
module: 'mic1'
2023-11-15 18:43:40 +08:00
}
2023-11-19 18:41:22 +08:00
$.ajax({
type: 'POST',
url: url,
data: postData,
dataType: "json",
2023-11-23 10:23:31 +08:00
//contentType: "application/json; charset=utf-8",
2023-11-19 18:41:22 +08:00
success: function (res) {
2023-11-21 22:20:24 +08:00
let resData = res
2023-11-21 18:35:48 +08:00
if (resData.success) {
data.mic1 = resData.content.mic1
2023-11-19 18:41:22 +08:00
bindData()
}
else {
2023-11-21 18:35:48 +08:00
alert(resData.message)
2023-11-19 18:41:22 +08:00
}
},
error: function (res) {
}
})
2023-11-15 18:43:40 +08:00
2023-11-19 18:41:22 +08:00
})
2023-11-09 10:24:26 +08:00
2023-11-19 18:41:22 +08:00
$("input[name='mic2']").on('change', function () {
let $value = $("input[name='mic2']:checked").val()
// alert($value)
2023-11-21 18:18:32 +08:00
let url = "http://192.168.0.116/cgi-bin/test.cgi"
2023-11-19 18:41:22 +08:00
let postData = {
2023-11-21 18:31:18 +08:00
action: 'filter_set',
2023-11-19 18:41:22 +08:00
subaction: 'mic2',
state: $value,
module: 'mic2'
}
$.ajax({
type: 'POST',
url: url,
data: postData,
dataType: "json",
2023-11-23 10:23:31 +08:00
//contentType: "application/json; charset=utf-8",
2023-11-19 18:41:22 +08:00
success: function (res) {
2023-11-21 22:20:24 +08:00
let resData = res
2023-11-21 18:35:48 +08:00
if (resData.success) {
data.mic2 = resData.content.mic2
2023-11-19 18:41:22 +08:00
bindData()
}
else {
2023-11-21 18:35:48 +08:00
alert(resData.message)
2023-11-19 18:41:22 +08:00
}
},
error: function (res) {
2023-11-15 18:43:40 +08:00
}
2023-11-19 18:41:22 +08:00
})
})
$("#mic1-type").on('change', function () {
// alert($("#mic1-type").val())
2023-11-21 18:18:32 +08:00
let url = "http://192.168.0.116/cgi-bin/test.cgi"
2023-11-19 18:41:22 +08:00
let postData = {
2023-11-21 18:31:18 +08:00
action: 'filter_set',
2023-11-19 18:41:22 +08:00
subaction: 'mic1',
type: $("#mic1-type").val(),
module: 'mic1'
}
$.ajax({
type: 'POST',
url: url,
data: postData,
dataType: "json",
2023-11-23 10:23:31 +08:00
//contentType: "application/json; charset=utf-8",
2023-11-19 18:41:22 +08:00
success: function (res) {
2023-11-21 22:20:24 +08:00
let resData = res
2023-11-21 18:35:48 +08:00
if (resData.success) {
data.mic1 = resData.content.mic1
2023-11-19 18:41:22 +08:00
bindData()
}
else {
2023-11-21 18:35:48 +08:00
alert(resData.message)
2023-11-19 18:41:22 +08:00
}
},
error: function (res) {
2023-11-15 18:43:40 +08:00
}
2023-11-19 18:41:22 +08:00
})
})
$("#mic2-type").on('change', function () {
// alert($("#mic2-type").val())
2023-11-21 18:18:32 +08:00
let url = "http://192.168.0.116/cgi-bin/test.cgi"
2023-11-19 18:41:22 +08:00
let postData = {
2023-11-21 18:31:18 +08:00
action: 'filter_set',
2023-11-19 18:41:22 +08:00
subaction: 'mic2',
type: $("#mic2-type").val(),
module: 'mic2'
2023-11-15 18:43:40 +08:00
}
2023-11-19 18:41:22 +08:00
$.ajax({
type: 'POST',
url: url,
data: postData,
dataType: "json",
2023-11-23 10:23:31 +08:00
//contentType: "application/json; charset=utf-8",
2023-11-19 18:41:22 +08:00
success: function (res) {
2023-11-21 22:20:24 +08:00
let resData = res
2023-11-21 18:35:48 +08:00
if (resData.success) {
data.mic2 = resData.content.mic2
2023-11-19 18:41:22 +08:00
bindData()
}
else {
2023-11-21 18:35:48 +08:00
alert(resData.message)
2023-11-19 18:41:22 +08:00
}
},
error: function (res) {
}
})
2023-11-15 18:43:40 +08:00
})
2023-11-23 14:09:17 +08:00
$("#handle1-value").change(function () {
changeInputValue('mic1', $("#handle1-value").val())
})
$("#handle2-value").change(function () {
changeInputValue('mic2', $("#handle2-value").val())
})
2023-11-09 10:24:26 +08:00
})
2023-11-19 18:41:22 +08:00
function changeInputValue(module, number) {
2023-11-21 18:18:32 +08:00
let url = "http://192.168.0.116/cgi-bin/test.cgi"
2023-11-15 18:43:40 +08:00
let postData = {
2023-11-21 18:31:18 +08:00
action: 'filter_set',
2023-11-19 18:41:22 +08:00
subaction: module,
2023-11-23 22:05:43 +08:00
value: number,
2023-11-19 18:41:22 +08:00
module: module
2023-11-15 18:43:40 +08:00
}
$.ajax({
type: 'POST',
url: url,
data: postData,
dataType: "json",
2023-11-23 10:23:31 +08:00
//contentType: "application/json; charset=utf-8",
2023-11-15 18:43:40 +08:00
success: function (res) {
2023-11-21 22:20:24 +08:00
let resData = res
2023-11-21 18:35:48 +08:00
if (resData.success) {
2023-11-19 18:41:22 +08:00
if (module == 'mic1') {
2023-11-21 18:35:48 +08:00
data.mic1 = resData.content.mic1
2023-11-19 18:41:22 +08:00
}
else {
2023-11-21 18:35:48 +08:00
data.mic2 = resData.content.mic2
2023-11-19 18:41:22 +08:00
}
2023-11-23 22:05:43 +08:00
bindData()
2023-11-15 18:43:40 +08:00
}
else {
2023-11-21 18:35:48 +08:00
alert(resData.message)
2023-11-15 18:43:40 +08:00
}
},
error: function (res) {
}
})
2023-11-19 18:41:22 +08:00
}
2023-11-09 10:24:26 +08:00
2023-11-19 18:41:22 +08:00
function loadData() {
2023-11-21 16:45:07 +08:00
let url = "http://192.168.0.116/cgi-bin/test.cgi?action=filter_get"
2023-11-15 18:43:40 +08:00
$.ajax({
2023-11-19 18:41:22 +08:00
type: "GET",
2023-11-15 18:43:40 +08:00
url: url,
success: function (res) {
2023-11-21 22:20:24 +08:00
let resData = res
2023-11-22 10:15:36 +08:00
console.log('获取成功', typeof (resData), resData,)
2023-11-21 18:35:48 +08:00
if (resData.success) {
data = resData.content
2023-11-22 10:15:36 +08:00
2023-11-15 18:43:40 +08:00
bindData()
}
else {
2023-11-19 18:41:22 +08:00
2023-11-15 18:43:40 +08:00
}
},
2023-11-19 18:41:22 +08:00
error: function () {
data = {
mic1: {
type: "Bessel",
value: 600,
state: "enable"
},
mic2: {
type: "Linkwitz-riley",
value: 200,
state: "enable"
}
}
bindData()
2023-11-15 18:43:40 +08:00
}
})
2023-11-09 10:24:26 +08:00
2023-11-19 18:41:22 +08:00
}
2023-11-15 18:43:40 +08:00
2023-11-19 18:41:22 +08:00
function bindData() {
$("input[name='mic1']").val([`${data.mic1.state}`])
$("input[name='mic2']").val([`${data.mic2.state}`])
$("#mic1-type").val([`${data.mic1.type}`])
$("#mic2-type").val([`${data.mic2.type}`])
$("#handle1").roundSlider("option", "value", `${data.mic1.value}`);
$("#handle1-value").val(`${data.mic1.value}`);
$("#handle2").roundSlider("option", "value", `${data.mic2.value}`);
$("#handle2-value").val(`${data.mic2.value}`);
2023-11-21 18:28:46 +08:00
let $value = $("input[name='mic1']:checked").val()
2023-11-21 18:31:18 +08:00
console.log($value)
2023-11-15 18:43:40 +08:00
}
2023-11-19 18:41:22 +08:00
$("#handle1").roundSlider({
sliderType: "min-range",
editableTooltip: false,
radius: 60,
width: 10,
value: 200,
min: 20,
max: 20000,
step: 1,
handleSize: 0,
handleShape: "square",
circleShape: "pie",
startAngle: 315,
mouseScrollAction: true,
2023-11-15 18:43:40 +08:00
2023-11-19 18:41:22 +08:00
drag: function (args) {
$("#handle1-value").val(`${args.value}`);
2023-11-15 18:43:40 +08:00
},
2023-11-19 18:41:22 +08:00
change: function (args) {
$("#handle1-value").val(`${args.value}`);
changeInputValue('mic1', args.value)
2023-11-10 11:53:14 +08:00
}
2023-11-19 18:41:22 +08:00
});
2023-11-10 11:53:14 +08:00
2023-11-03 00:47:21 +08:00
2023-11-19 18:41:22 +08:00
$("#handle2").roundSlider({
sliderType: "min-range",
editableTooltip: false,
radius: 60,
width: 10,
value: 200,
min: 20,
max: 20000,
handleSize: 0,
handleShape: "square",
circleShape: "pie",
startAngle: 315,
mouseScrollAction: true,
2023-11-03 00:47:21 +08:00
2023-11-19 18:41:22 +08:00
drag: function (args) {
$("#handle2-value").val(`${args.value}`);
},
change: function (args) {
$("#handle2-value").val(`${args.value}`);
changeInputValue('mic2', args.value)
}
});
</script>
<script src="js/main.js"></script>
</body>
2023-11-03 00:47:21 +08:00
</html>