<!DOCTYPE html>
|
<html>
|
<head>
|
<script src="/static/js/easyui/jquery.min.js" type="text/javascript"></script>
|
<script src="/static/js/easyui/jquery.easyui.min.js" type="text/javascript"></script>
|
<link href="/static/js/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
|
<link href="/static/js/easyui/themes/icon.css" rel="stylesheet" type="text/css" />
|
<script src="/static/js/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
|
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
|
<title>修改</title>
|
</head>
|
<style type="text/css">
|
.button {
|
width: 140px;
|
line-height: 38px;
|
text-align: center;
|
font-weight: bold;
|
color: #fff;
|
text-shadow: 1px 1px 1px #333;
|
border-radius: 5px;
|
margin: 0 20px 20px 0;
|
position: relative;
|
overflow: hidden;
|
}
|
|
.button.blue {
|
border: 1px solid #1e7db9;
|
box-shadow: 0 1px 2px #8fcaee inset, 0 -1px 0 #497897 inset, 0 -2px 3px #8fcaee inset;
|
background: -webkit-linear-gradient(top, #42a4e0, #2e88c0);
|
background: -moz-linear-gradient(top, #42a4e0, #2e88c0);
|
background: linear-gradient(top, #42a4e0, #2e88c0);
|
}
|
</style>
|
<body style="margin:0" oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onbeforecopy="return false" oncopy=document.selection.empty() onselect=document.selection.empty()>
|
|
<hr style="margin:0px;height:1px;border:0px;background-color:black;color:#D5D5D5;"/>
|
|
<div style="position: absolute;left: 10px;top: 680px; width: 95%">
|
<div style="background-color:#1e7db9;position: absolute;left: 10px;top: -100px; width: 99%;text-align: center"><a href="index.html"><h1 >返回</h1></a></div>
|
<hr style="margin:0px;height:1px;border:0px;background-color:black;color:#D5D5D5;"/>
|
<div style="width:800px;float:left;height:200px;">
|
<br>人数配置:</br>
|
<br><input type="checkbox" name="checkbox1" id="checkbox1">初始值配置 初始时间:<input id="initialTime"
|
class="easyui-timespinner"
|
style="width:150px;height: 120px"> 初始值:<input
|
id="initialPeople" value="" class="easyui-numberspinner" style="width:150px;height: 120px ;"
|
data-options="min:-9999,max:9999,editable:false">人
|
<br><input type="checkbox" name="checkbox2" id="checkbox2">校正值配置 校正值:<input
|
id="correctionPeople" value="" class="easyui-numberspinner" style="width:150px;height: 120px"
|
data-options="min:-9999,max:9999,editable:false">人
|
<br> <button type="button" class="button blue" onclick="saveInfo()">保存
|
</button>
|
</div>
|
|
<div style="width:600px;float:left;height:200px;">
|
<br>
|
<br>统计图设置:
|
<br>
|
<br>
|
<br>统计图起始时间 <input id="countStartTime" class="easyui-timespinner"
|
style="width:150px;height: 120px">
|
<br>
|
<div style="height: 30px"></div>
|
<br> <button type="button" class="button blue" onclick="saveStart()">保存
|
</button>
|
|
</div>
|
|
<!--<div style="border:1px solid ;float:left;height:200px;"></div><!–这个div模拟垂直分割线–>-->
|
<div style="width:400px;float:left;height:200px;">
|
<br>数据清零:
|
<br>
|
<br><span style="background-color: red"> 数据将被清零请谨慎操作!</span>
|
<br>
|
<br><br><br><br><br><br><br>
|
|
|
<br> <button type="button" class="button blue" onclick="reset1()">清零</button>
|
</div>
|
</div>
|
<!--<br>密码修改</br>-->
|
<!--<br> 旧密码:<input type="password" id="old">-->
|
<!--<br> 新密码:<input type="password" id="new">-->
|
<!--<br>确认密码:<input type="password" id="renew">-->
|
<!--<br>-->
|
<!--<br> <button type="button" class="button blue"onclick="savePw()">保存</button>-->
|
</body>
|
<script type="text/javascript">
|
var datavalue = {};
|
$.get("/api-count/getConfig/",
|
function (data) {
|
$('#initialTime').timespinner('setValue', data.initialTime);
|
document.getElementById("checkbox1").checked = ('1' == data.init);
|
document.getElementById("checkbox2").checked = ('1' == data.cor);
|
datavalue.initialTime = data.initialTime;
|
$('#initialPeople').numberspinner('setValue', data.initialPeople);
|
datavalue.initialPeople = data.initialPeople;
|
$('#correctionPeople').numberspinner('setValue', data.correctionPeople);
|
datavalue.correctionPeople = data.correctionPeople;
|
$('#countStartTime').timespinner('setValue', data.countStartTime);
|
});
|
|
function reset1() {
|
$.get("/api-count/reset/", function (data) {
|
$.messager.alert(' ', '<font size="4" color="#666666"><strong> 清除成功!</strong></font>', 'infoSunnyIcon', function () {
|
//alert('点击确定按钮才关闭');//
|
});
|
setTimeout(function () {
|
$(".messager-body").window('close');
|
}, 1500);
|
});
|
}
|
|
function saveStart() {
|
var configStartTime = {};
|
configStartTime.configStartTime = $('#countStartTime').timespinner('getValue');
|
$.post("/api-count/configStartTime/", configStartTime,
|
function (data) {
|
if (data.msg == true) {
|
$.messager.alert(' ', '<font size="4" color="#666666"><strong> 保存成功!</strong></font>', 'infoSunnyIcon', function () {
|
//alert('点击确定按钮才关闭');//
|
});
|
setTimeout(function () {
|
location.reload();
|
}, 1500);
|
}
|
|
}, "json");
|
}
|
|
// function savePw() {
|
// var old =document.getElementById("old").value;
|
// var ne = document.getElementById("new").value;
|
// var renew = document.getElementById("renew").value;
|
// if( ne !=renew){
|
// $.messager.alert(' ','<font size=\"2\" color=\"#666666\"><strong>两次密码输入不一致!请重新输入。</strong></font>','infoSunnyIcon',function(){
|
// //alert('点击确定按钮才关闭');//
|
// });
|
// setTimeout(function(){
|
// $(".messager-body").window('close');
|
// },1000);
|
// document.getElementById("new").value="";
|
// document.getElementById("renew").value="";
|
// return;
|
// }
|
//
|
// var pw={};
|
// pw.old = old;
|
// pw.password=ne;
|
// $.get("/api-count/configPassword/",pw,
|
// function(data){
|
// console.log(data);
|
// if(data.msg==true){
|
// $.messager.alert(' ','<font size=\"2\" color=\"#666666\"><strong>修改成功!</strong></font>','infoSunnyIcon',function(){
|
// //alert('点击确定按钮才关闭');//
|
// });
|
// setTimeout(function(){
|
// $(".messager-body").window('close');
|
// },2000);
|
// document.getElementById("new").value="";
|
// document.getElementById("renew").value="";
|
// document.getElementById("old").value="";
|
// }else {
|
// alert("原密码错误!");
|
// $.messager.alert(' ','<font size=\"2\" color=\"#666666\"><strong>保存成功!</strong></font>','infoSunnyIcon',function(){
|
// //alert('点击确定按钮才关闭');//
|
// });
|
// setTimeout(function(){
|
// $(".messager-body").window('close');
|
// },2000);
|
// document.getElementById("old").value="";
|
// }
|
//
|
//
|
// },"json");
|
// }
|
function saveInfo() {
|
if ($("#checkbox1").get(0).checked) {
|
datavalue.init = 1;
|
datavalue.initialTime = $('#initialTime').timespinner('getValue');//document.getElementById("initialTime").value;
|
datavalue.initialPeople = $('#initialPeople').numberspinner('getValue'); //document.getElementById("initialPeople").value;
|
} else {
|
datavalue.init = 0;
|
}
|
if ($("#checkbox2").get(0).checked) {
|
datavalue.cor = 1;
|
datavalue.correctionPeople = $('#correctionPeople').numberspinner('getValue');//document.getElementById("correctionPeople").value;
|
} else {
|
datavalue.cor = 0;
|
}
|
|
$.post("/api-count/configInfo/", datavalue,
|
function (data) {
|
if (data.msg == true) {
|
$.messager.alert(' ', '<font size="4" color="#666666"><strong> 保存成功!</strong></font>', 'infoSunnyIcon', function () {
|
//alert('点击确定按钮才关闭');//
|
});
|
setTimeout(function () {
|
location.reload();
|
}, 1500);
|
}
|
}, "json");
|
}
|
</script>
|
</html>
|