safesite/safesite/templates/index.html

261 lines
12 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ctc安全生产管理系统</title>
<link rel="icon" href="/media/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/css/loading.css">
<link rel="stylesheet" type="text/css" href="/static/safesite/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/static/safesite/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/css/mystyle.css" />
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/static/safesite/mystatic/openlayer/ol.css">
<script type="text/javascript" src="/static/safesite/easyui/jquery.min.js"></script>
<script type="text/javascript" src="/static/safesite/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.serializejson.min.js"></script>
<script type="text/javascript" src="/static/safesite/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/echarts.min.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/chart.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/util.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/loading.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/layer/layer.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/datagrid-export.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery-qrcode-0.17.0.min.js"></script>
<script src="https://cdn.bootcss.com/ckeditor/4.8.0/ckeditor.js"></script>
<script type="text/javascript" src="/static/safesite/mystatic/openlayer/ol.js"></script>
<script src="https://cdn.bootcss.com/jquery.form/4.2.1/jquery.form.min.js"></script>
<style type="text/css">
.easyui-linkbutton:hover
{
background: #1148a0;
color: #0E2D5F;
}
.loading {
position: absolute;
z-index: 1000;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background: white;
text-align: left;
padding: 5px 10px
}
.northDiv {
overflow: hidden;
height: 80px;
background-color: #013162;
background-image: url("/static/safesite/mystatic/images/indexbj1.png");
background-repeat: no-repeat;
font-family: Verdana, ,
}
.divMune {
height: 35px;
background-color: #f9f9f9;
text-align: center;
color: #0E2D5F;
font-size: 16px;
font-weight: bold;
line-height: 35px;
cursor: pointer;
}
</style>
</head>
<body id="layoutbody" class="easyui-layout">
<div id='Loading' class="loading">
<font>加载中···</font>
</div>
<div id='main' href="mainhtml" data-options="region:'center',border:false" title="主页" style="overflow-x:hidden;">
</div>
<div region="north" class="northDiv">
<div style="float:right;width:7%;margin-left:10px">
<img src="/static/safesite/mystatic/images/head.png" style="float: right;width:50px;height:50px;text-align: center;margin-top: 10px;margin-right: 10px;"
id="headimg" />
</div>
<div style="width:30%;float:right">
<div style="margin-top: 10px;text-align: center;position: fixed;width: 500px;height: 70px;right: 20px;">
<span style=" padding-right:20px;font-size: 18px;color:#F5EBEB" class="head">
{{ username }} 欢迎您!
</span>
</div>
<div style="text-align: center;position: fixed;width: 500px;height: 70px;top: 40px;right: 60px;">
<a style="color: #eee5e7;cursor: pointer;" class="easyui-linkbutton" iconCls="fa-sign-out" plain=true
onclick="logout()">安全退出</a>
<a style="color: #eee5e7;cursor: pointer;" id="bindwx" class="easyui-linkbutton" iconCls="fa-weixin" plain=true
onclick="bindwx()">绑定微信</a>
<a style="color: #eee5e7;cursor: pointer;" class="easyui-linkbutton" iconCls="fa-key" plain=true
onclick="javascript:$('#pwdg').dialog({border:false})">修改密码</a>
<a id='setupb' class="easyui-linkbutton" iconCls="fa-cogs" plain=true style="display:none;color: #eee5e7;cursor: pointer;"
onclick="setup()">预警设置</a>
<a style="color: #eee5e7;cursor: pointer;" href="datashow" target="_blank" class="easyui-linkbutton" iconCls="fa-desktop" plain=true>数据大屏</a>
</div>
</div>
<div style="width:50%;height:100%">
<input id="userindex" userid="{{userid}}" openid="{{openid}}" nickname="{{nickname}}"
headimgurl="{{headimgurl}}" menus="{{menus}}" style="display:none;" />
<button style="margin: 15px;background-color: transparent;border: 0;color: white;cursor: pointer;" onclick="javascript:$('#main').panel({href:'mainhtml',title:'主页'})"><span style="font-size:24px">{{companyname}}</span><br/><span style="font-size:20px">安全生产管理系统</span></button>
</div>
</div>
<div id="menuTreediv" data-options="region:'west'" style="width: 150px; background-color: #ffffff;">
<div class="divMune">
<img src="/static/safesite/mystatic/images/fanhuiBut.png" style="float: right;width:20px;height:20px;text-align: center;margin-top: 10px;margin-right: 10px;"
id="headimg" />
<a onclick="javascript:$('#main').panel({href:'mainhtml',title:'主页'})">返回主页</a>
</div>
<div id="menuTree" style="width:100%;text-align: right; background-color: rgb(25, 53, 58);"></div>
</div>
<div id="wxdg" title="绑定微信" style="width:600px;height:400px;padding: 10px;display:none"
data-options="modal:true,border:false">
<p style="color:red;">如需接受微信通知,请按以下步骤操作</p>
<ul class='imgul' style="margin-top:10px;">
<li>
<p>1.扫码关注ctc公众号</p>
<img src="/static/safesite/mystatic/images/ctcgzh.jpg" width="220" height="220"
style="margin-top:10px;" />
</li>
<li>
<p>2.扫码绑定系统账户</p>
<img src="/static/safesite/mystatic/images/bwlogin.jpg" width="220" height="220"
style="margin-top:10px;" />
<!-- <div id="qrcode" style="margin-top:10px;"></div>
<script>
$('#qrcode').qrcode({
width: 220, height: 220,
text: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4d75244c1b980b5b&redirect_uri=https%3a%2f%2fsafeyun.ctcshe.com%2fbwlogin&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect" });
</script> -->
</li>
</ul>
</div>
<div id='pwdg' title='修改密码' style="width:500px;height:250px;display:none" data-options="modal:true">
<form method="post" style="margin-top:10px">
<div style="margin-bottom:5px;">
<input id="oldpwd" class="easyui-textbox" name="oldpwd" type="password" style="width:100%;"
data-options="label:'旧密码'" /></div>
<div style="margin-bottom:5px;">
<input id="newpwd" class="easyui-textbox" name="newpwd" type="password" style="width:100%;"
data-options="label:'新密码'" /></div>
<div style="margin-bottom:5px;">
<input id="newpwd2" class="easyui-textbox" name="newpwd2" type="password" style="width:100%;"
data-options="label:'确认新密码'" /></div>
</form>
<div style="text-align: center">
<a id="btnpwc" class="easyui-linkbutton" iconCls="icon-ok" onclick="btnpwc()">保存</a>
<a class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#pwdg').dialog('close')">取消</a>
</div>
</div>
<div id="dd" style="overflow: hidden;"></div>
<div id="userdd" style="overflow: hidden;"></div>
<div id="questiondd" style="overflow: hidden;"></div>
<input type="hidden" id="in" show="" total="" target="" />
<!-- <button type="hidden" id="getb" onclick="test()" /> -->
<script>
var openid = $('#userindex').attr('openid');
var nickname = $('#userindex').attr('nickname');
var headimgurl = $('#userindex').attr('headimgurl');
var issuper = {{ issuper }};
if (issuper == 1) { $('#setupb').show() }
if (openid == 0 && issuper != 1) { $('#wxdg').dialog(); } else { $('#bindwx').text('解绑微信'); };
if (headimgurl != 0) { $('#headimg').attr('src', headimgurl); }
function logout() {
$.messager.confirm('系统提示', '您确定要退出本次登录吗?', function (r) {
if (r) {
location.href = 'logout';
}
});
}
function bindwx() {
if (openid == 0) {
$('#wxdg').dialog('open');
} else {
var str = '你已绑定昵称为' + nickname + '的微信号,确定解绑吗?'
$.messager.confirm('绑定微信', str, function (r) {
if (r) {
$.get("unbindwechat",
function (data) {
$.messager.alert('绑定信息', '解绑成功!', '', function () {
location.reload(true);
});
});
}
});
}
}
function btnpwc() {
var v = $("#oldpwd").val();
var v1 = $("#newpwd").val();
var v2 = $("#newpwd2").val();
if (v1 == v2) {
$.post(
"changepwd",
{ "oldpassword": v, "newpassword": v1 },
function (data) {
if (data.code == 1) {
//修改成功,关闭修改密码窗口
$("#pwdg").dialog("close");
location.reload();
} else {
//修改密码失败,弹出提示
$.messager.alert("提示信息", "密码修改失败!旧密码错误", "error");
}
},
"json"
);
} else {
//两次输入不一致,弹出错误提示
$.messager.alert("提示信息", "两次密码输入不一致!", "warning");
}
}
function setup() {
opendg('预警相关设置','setup?a=setuph')
}
/*
* 关闭遮罩层
*/
function closemask() {
$("#Loading").fadeOut("normal", function () {
$(this).remove();
});
}
var pc;
$.parser.onComplete = function () {
if (pc) {
clearTimeout(pc);
}
pc = setTimeout(closemask, 10);
}
$.get('menutree', function (data) {
var data = convertmenu(data)
data[0]['state'] = 'open'
$('#menuTree').sidemenu({
data: data,
border: false,
multiple: false,
onSelect: function (node) {
$("#main").attr('value', 'listall');
$("#main").panel({ href: node.attributes, title: node.text });
},
});
})
$.get('api/rights?a=have',function(res){
localStorage.setItem('data',JSON.stringify(res));
})
</script>
</body>
</html>