storage.html
4.78 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link href="../../css/frame.css" rel="stylesheet" />
<link href="../../scripts/easyui/themes/default/easyui.css" rel="stylesheet" />
<link href="../../scripts/easyui/themes/icon.css" rel="stylesheet" />
<style type="text/css">
#storageForm {
padding: 8px;
}
.tdTitle {
width: 120px;
}
</style>
</head>
<body>
<form id="storageForm">
<table class="settingsContainer">
<tr>
<td class="tdTitle">结果存储路径</td>
<td class="tdContent">
<input type="text" name="980" id="980" class="settingParameter"/>
</td>
<td class="tdContent">
<a href="#" name="checkBtn" class="settingBtn" id="btnCheckResultPath">选择</a>
</td>
</tr>
<!-- <tr> -->
<!-- <td class="tdTitle">录像存储路径</td> -->
<!-- <td class="tdContent"> -->
<!-- <input type="text" name="981" id="981" class="settingParameter"/> -->
<!-- </td> -->
<!-- <td class="tdContent"> -->
<!-- <a href="#" name="checkBtn" class="settingBtn" id="btnCheckVideoPath">选择</a> -->
<!-- </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td class="tdTitle">短时录像存储路径</td> -->
<!-- <td class="tdContent"> -->
<!-- <input type="text" name="982" id="982" class="settingParameter"/> -->
<!-- </td> -->
<!-- <td class="tdContent"> -->
<!-- <a href="#" name="checkBtn" class="settingBtn" id="btnCheckShortVideoPath">选择</a> -->
<!-- </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td class="tdTitle">Log存储路径</td> -->
<!-- <td class="tdContent"> -->
<!-- <input type="text" name="983" id="983" class="settingParameter"/> -->
<!-- </td> -->
<!-- <td class="tdContent"> -->
<!-- <a href="#" name="checkBtn" class="settingBtn" id="btnCheckLogPath">选择</a> -->
<!-- </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td colspan="2"> -->
<!-- <a href="#" class="settingBtn checkbtn" id="btnSave">保存</a> -->
<!-- </td> -->
<!-- </tr> -->
</table>
</form>
<object id="infoOcxObj" classid="clsid:09614DB3-38D7-4C11-8C02-4D1BA8675153" style="height:0;width:0;"></object>
<script src="../../scripts/easyui/jquery.min.js"></script>
<script src="../../scripts/easyui/jquery.easyui.min.js"></script>
<script src="../../scripts/easyui/locale/easyui-lang-zh_CN.js"></script>
<script src="../../scripts/utilities.js"></script>
<script type="text/javascript">
var parameterAdaptor = new ParameterAdaptor();
var defaultresultpath = "C:\\temp\\S2_savedPic";
$().ready(function() {
//loadStorageInfo();
$("#btnSave").click(saveParametersToServer);
initPath();
btnBindClick();
});
function initPath(){
$("#980").val(infoOcxObj.GetRootPath()?infoOcxObj.GetRootPath():defaultresultpath);
}
function btnBindClick(){
$(".tdContent").bind("click",function(event){
if(event.target.name == "checkBtn"){
switch(event.target.id){
case "btnCheckResultPath":
var result = infoOcxObj.SetRootPath("");
if (!result) {
$.messager.alert("错误", "设置图片保存路径出错!", "error");
}else{
$("#980").val(infoOcxObj.GetRootPath());
}
break;
case "btnCheckVideoPath":
break;
case "btnCheckShortVideoPath":
break;
case "btnCheckLogPath":
break;
default:
break;
}
}
});
}
//加载存储设置
function loadStorageInfo() {
var keys = ["980", "981", "982", "983"];
parameterAdaptor.getParameters(keys, function(data) {
$("#storageForm").form("load", data);
});
}
function saveParametersToServer() {
var formObj = $("#storageForm");
parameterAdaptor.saveParameters(formObj);
}
</script>
</body>
</html>