408 lines
18 KiB
HTML
408 lines
18 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/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 type="text/javascript" src="/static/safesite/mystatic/ckeditor/ckeditor.js"></script>
|
||
<!-- <script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script> -->
|
||
<script type="text/javascript" src="/static/safesite/mystatic/openlayer/ol.js"></script>
|
||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.form.min.js"></script>
|
||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.cookie.js"></script>
|
||
<script type="text/javascript" src="/static/safesite/mystatic/js/util.js"></script>
|
||
<script type="text/javascript" src="/static/safesite/easyui/datagrid-scrollview.js"></script>
|
||
<script type="text/javascript" src="/static/safesite/mystatic/js/FileSaver.js"></script>
|
||
<script type="text/javascript" src="/static/safesite/mystatic/js/jquery.wordexport.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="tt" region="center" class="easyui-tabs">
|
||
<div title="主页" href="/mainhtml" id="main">
|
||
</div>
|
||
</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">
|
||
{{ user.username }} 欢迎您!
|
||
</span>
|
||
</div>
|
||
<div style="text-align: center;position: fixed;width: auto;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>
|
||
<a style="color: #eee5e7;cursor: pointer;" href="html/datashow2" target="_blank"
|
||
class="easyui-linkbutton" iconCls="fa-desktop" plain=true>数据大屏2</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:$('#tt').tabs('select',0)"><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%2fcbma.ctc-gz.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:10px;">
|
||
<div style="margin-bottom:5px;">
|
||
<input id="oldpwd" class="easyui-passwordbox" name="oldpwd" type="password"
|
||
data-options="label:'旧密码',required:true" style="width:90%" />
|
||
</div>
|
||
<div style="margin-bottom:5px;">
|
||
<input id="newpwd" class="easyui-passwordbox validatebox" name="newpwd"
|
||
data-options="label:'新密码',validType:'Password',required:true" style="width:90%" />
|
||
</div>
|
||
<div style="margin-bottom:5px;">
|
||
<input id="newpwd2" class="easyui-passwordbox validatebox" name="newpwd2"
|
||
data-options="label:'确认新密码',validType:'Password',required:true" style="width:90%" />
|
||
</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="" show2="" />
|
||
<!-- <button type="hidden" id="getb" onclick="test()" /> -->
|
||
|
||
<!-- tab页的右键菜单 -->
|
||
<div id="home-tabs-menu" class="easyui-menu">
|
||
<div data-options="name:1">关闭</div>
|
||
<div data-options="name:2">关闭其他</div>
|
||
<div data-options="name:3">关闭所有</div>
|
||
</div>
|
||
<script>
|
||
$(document).ready(function () {
|
||
|
||
$('#tt').tabs({
|
||
border: false,
|
||
onSelect: function (title) {
|
||
var allTabs = $('#tt').tabs('tabs');
|
||
var selectTab = $('#tt').tabs('getSelected');
|
||
for (var i = 0; i < allTabs.length; i++) {
|
||
if(allTabs[i]){
|
||
if (allTabs[i].panel('options').title != selectTab.panel('options').title) {
|
||
$('#tt').tabs('update', {
|
||
tab: allTabs[i],
|
||
options: {
|
||
content: 'Tab Body'
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
}
|
||
//selectTab.panel('refresh')
|
||
// console.log(allTabs[0].panel('options').content)
|
||
},
|
||
onContextMenu: function(e, title, index){
|
||
//该方法通知浏览器不要执行与此事件关联的默认动作
|
||
//即屏蔽了浏览器在tab页上的鼠标右键事件
|
||
e.preventDefault();
|
||
var mm = $("#home-tabs-menu");
|
||
//显示右键菜单
|
||
mm.menu("show",{
|
||
top: e.pageY,
|
||
left: e.pageX
|
||
}).data("tabTitle",title);
|
||
//为右键菜单选项绑定事件
|
||
mm.menu({
|
||
onClick: function(item){
|
||
closeTab(this, item.name);
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
|
||
});
|
||
$.messager.show({
|
||
title: '提示',
|
||
msg: '每晚10点-11点为维护时间,请尽量不在此时间使用',
|
||
timeout: 5000,
|
||
showType: 'slide'
|
||
});
|
||
var openid = $('#userindex').attr('openid');
|
||
var nickname = $('#userindex').attr('nickname');
|
||
var headimgurl = $('#userindex').attr('headimgurl');
|
||
var issuper = {{ issuper }};
|
||
if (issuper == 1) { $('#setupb').show(); $('#bindwx').hide() }
|
||
if ((openid == 0 || openid == 'None') && issuper != 1) {
|
||
// $('#wxdg').dialog();
|
||
} else { $('#bindwx').text('解绑微信'); };
|
||
if (headimgurl != 0 && headimgurl != 'None' && issuper != 1) { $('#headimg').attr('src', headimgurl); }
|
||
function logout() {
|
||
$.messager.confirm('系统提示', '您确定要退出本次登录吗?', function (r) {
|
||
if (r) {
|
||
location.href = 'logout';
|
||
}
|
||
});
|
||
}
|
||
var pwstr = {{ pwstr }};
|
||
if (pwstr == 0) {
|
||
$.messager.alert('', '您的密码复杂度太低,请修改!', 'warning', function () {
|
||
$('#pwdg').dialog()
|
||
});
|
||
}
|
||
|
||
function bindwx() {
|
||
if (openid == 0 || openid == 'None') {
|
||
$('#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();
|
||
var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z]).{8,30}');
|
||
if (!regex.test(v1) || !regex.test(v2)) {
|
||
$.messager.alert("提示信息", "您的密码复杂度太低(密码中必须包含字母、数字)", "error");
|
||
}
|
||
else 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 });
|
||
let title = node.text
|
||
if ($('#tt').tabs('tabs').length > 10) {
|
||
alert('标签页过多,请先关闭')
|
||
return
|
||
}
|
||
if ($('#tt').tabs('exists', title)) {
|
||
$('#tt').tabs('select', title);
|
||
//var tab2 = $('#tt').tabs('getSelected');
|
||
// var url = $(tab2.panel('options')).attr('href');
|
||
//tab2.panel('refresh');
|
||
} else {
|
||
$('#tt').tabs('add', {
|
||
title: title,
|
||
href: node.attributes,
|
||
closable: true,
|
||
// tools: [{
|
||
// iconCls: 'icon-mini-refresh',
|
||
// handler: function () {
|
||
// var tab = $('#tt').tabs('getSelected'); // get selected panel
|
||
// tab.panel('refresh');
|
||
// }
|
||
// }]
|
||
});
|
||
}
|
||
},
|
||
});
|
||
})
|
||
$.get('api/rights?a=have', function (res) {
|
||
localStorage.setItem('data', JSON.stringify(res));
|
||
})
|
||
|
||
function closeTab(menu, type){
|
||
var allTabs = $("#tt").tabs("tabs");
|
||
var allTabTitle = [];
|
||
$.each(allTabs, function(i, n){
|
||
var opt = $(n).panel("options");
|
||
if(opt.closable){
|
||
allTabTitle.push(opt.title);
|
||
}
|
||
});
|
||
var curTabTitle = $(menu).data("tabTitle");
|
||
switch(type){
|
||
case 1:
|
||
//关闭当前
|
||
$("#tt").tabs("close", curTabTitle);
|
||
return false;
|
||
break;
|
||
case 2:
|
||
//关闭其他
|
||
for(var i = 0; i < allTabTitle.length; i++){
|
||
if(curTabTitle != allTabTitle[i] && curTabTitle != '主页'){
|
||
$("#tt").tabs("close",allTabTitle[i]);
|
||
}
|
||
}
|
||
$("#tt").tabs("select",curTabTitle);
|
||
break;
|
||
case 3:
|
||
//关闭所有
|
||
for(var i = 0; i < allTabTitle.length; i++){
|
||
if(curTabTitle != '主页'){
|
||
$("#tt").tabs("close",allTabTitle[i]);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
</script>
|
||
|
||
</body>
|
||
|
||
</html> |