nvsconfig.js
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//获取div的高度
function getHt(){
var all_height=$(window).height();
var div_height = all_height - $("#headFrames").height()-4 ;
$("#config_control").css("height",div_height+"px");
}
var layer = null;
$(function(){
getHt();
layui.use('layer', function(){
layer = layui.layer;
});
layui.use('form', function(){
var form = layui.form;
var audio = getAlarmPopAudio();
var txt = getAlarmPopText();
var video = getAlarmPopWindow();
var loop = getVideoLoopTimer();
var nettime = getNetTimeout();
var stream = getStreamProtocol();
var player = getStreamPlayer();
form.val('system_config_value', {
"loop_video_time": loop
,"switch_alarm_pop":video
,"switch_alarm_audio":audio
,"switch_alarm_text": txt
});
form.val('net_config_value', {
"message_time_out": nettime
,"stream_media_protocol":stream
,"stream_media_player":player
});
});
});
function handleSystemConfigSave(){
var form = layui.form;
var data = form.val('system_config_value');
setSystemConfig(JSON.stringify(data));
layer.msg('保存成功',{icon: 1, title:'系统参数',time: 2000,skin: 'layer-ext-moon' });
}
function handleNetConfigSave(){
var form = layui.form;
var data = form.val('net_config_value');
setNetConfig(JSON.stringify(data));
layer.msg('保存成功',{icon: 1, title:'网络参数',time: 2000,skin: 'layer-ext-moon' });
}