123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>单仓档案管理系统</title>
- <link rel="stylesheet" type="text/css" href="/themes/metro-green/easyui.css">
- <link rel="stylesheet" type="text/css" href="/themes/icon.css">
- <link rel="stylesheet" href="/src/lib/flexslider/flexslider.css">
- <link rel="stylesheet" href="/themes/oneIndex.css">
- <link rel="stylesheet" href="/themes/reset_default.css">
- <link rel="stylesheet" href="/themes/rj/modle_index.css">
- <link rel="stylesheet" href="/themes/mt.css">
- <script src="/src/lib/jquery.min.js"></script>
- <script src="/src/config.js"></script>
- <script src="/src/funs.js"></script>
- <script src="/src/echarts.min.js"></script>
- <script type="text/javascript" src="/src/base.js"></script>
- <script type="text/javascript" src="/src/page.js"></script>
- <script type="text/javascript" src="/src/lib/jquery.easyui.min.js"></script>
- <script type="text/javascript" src="/src/lib/cookie.js"></script>
- <script type="text/javascript" src="/src/lib/jquery.ajaxfileupload.js"></script>
- <script type="text/javascript" src="/locale/easyui-lang-zh_CN.js"></script>
- <script type="text/javascript" src="/src/lib/flexslider/jquery.flexslider-min.js"></script>
- <!-- <script type="text/javascript" src="/plugins/jquery.uploadify.min.js"></script> -->
- <!-- <script type="text/javascript" src="/src/rj/template-native.js"></script> -->
- <script type="text/javascript" src="/src/mt.js"></script>
- <script src="/src/lib/jquery-editable-select.min.js"></script>
- <link href="/src/lib/jquery-editable-select.min.css" rel="stylesheet">
- <script src="/src/qrcode/jquery.qrcode.min.js" type="text/javascript"></script>
- <script src="/src/qrcode/qrcode.js" type="text/javascript"></script>
- <script src="/src/qrcode/jquery.jqprint-0.3.js" type="text/javascript"></script>
- <!-- <script type="text/javascript" src="/src/lib/echarts.common.min.js"></script> -->
- <script type="text/javascript" src="/src/stat.js"></script>
- <script type="text/javascript" src="/src/mustache.min.js"></script>
- <script type="text/javascript">
- window.modules={};
- window.treemap={};
- window.renderHtml = function(e){
- //debugger
- $(".username").html(e.realname);
- document.realname=e.realname;
- document.grainId = e.grainId;
- document.userId = e.id;
- document.getElementById('avator-img').src = e.avator;
- window.modules=e.modules;
- window.treemap=e.treemap;
- $.each( e.modules, function(index, content)
- {
- if(content.moduleId==13){
- content.moduleUrl=content.childenList[0].moduleUrl.substring(1,content.childenList[0].moduleUrl.length);
- return;
- }
- });
- var template="<li data-page=\"base\" id=\"home-item\"><a href=\"/{{defaultHome}}\">首页</a></li>" +
- "<!--<li data-page=\"base\" id=\"icontrol-item\"><a href=\"/pages/intelligentControl/index.html\">智能控制</a></li>-->{{#modules}}<li id=\"hea{{moduleEnname}}\" data-page=\"{{moduleEnname}}\"><a href=\"/{{moduleUrl}}\">{{moduleName}}</a></li>{{/modules}}";
- var views = Mustache.render(template, e);
- $("#head-nav-ul").html(views);
- $("#cansgl").attr("href",$("#heabasedata > a").attr("href"));
- $("#head-nav-ul").children().on('click', function(){
- sessionStorage.setItem('num', 0)
- });
- };
- $(function(){
- if(window.sessionStorage){
- var modules=JSON.parse(window.sessionStorage.getItem("modules"));
- if(modules){
- renderHtml(modules);
- }
- }
- $.ajax({
- type: 'get',
- dataType: 'json',
- url: config.baseUrl + "/sys/getUserInfo",
- success: function(e){
- if (e.code !== "0") {
- alert(e.msg);
- }else{
- window.localStorage.setItem("realname",e.realname);
- window.localStorage.setItem("cruuentGrainId",e.grainId); //重要修改
- if(window.sessionStorage){
- window.sessionStorage.setItem("modules",JSON.stringify(e));
- renderHtml(e);
- window.defaultHome=e.defaultHome;
- }
- }
- },
- error: function(e) {
- console.log(e);
- }
- });
- });
- /**
- * @author yukaizhao
- */
- $.extend($.fn.validatebox.defaults.rules, {
- /*必须和某个字段相等*/
- equalTo: {
- validator:function(value,param){
- return $(param[0]).val() == value;
- },
- message:'字段不匹配'
- },
- isNameExsit: {
- validator: function (value) {
- var flag = true;
- $.ajax({
- type: "post",
- dataType: 'json',
- async: false,
- url: "/sys/user/checkNameIsExsit?name="+value,
- success: function(data){//在验证函数里加载数据,加载过来后判断输入的值
- if(data.code==0){
- if(data.count!=0){
- flag= false;
- }
- }
- return true;
- }
- });
- return flag;
- },
- message: '用户名重复'
- }
- });
- $(function(){
- function getCookie( name ) {
- if (document.cookie.length > 0) {
- c_start = document.cookie.indexOf(name + "=")
- if (c_start != -1) {
- c_start = c_start + name.length + 1
- c_end = document.cookie.indexOf(";", c_start)
- if (c_end == -1) c_end = document.cookie.length
- return unescape(document.cookie.substring(c_start, c_end))
- } else {
- return false;
- }
- }
- return false;
- }
- function delCookie( name ) {
- var exp = new Date();
- exp.setTime(exp.getTime() - 1);
- var cval = getCookie(name);
- if (cval != null)
- document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString() + ";path=/";
- }
- function setCookie(name, value) {
- var Days = 30;
- var exp = new Date();
- exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
- document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/";
- }
- var flag = getCookie( 'status' );
- if( flag == false ) return;
- // debugger;
- base.ajaxFunc('get', '/sys/promptBoxInfo', {}, function(e){
- delCookie( 'status' );
- if( e.data ) {
- var msg = "",
- flag = true;
- for( var i in e.data ) {
- msg += e.data[i] + '<br />';
- flag = false;
- }
- if( flag ) return;
- var $html = $('<div class="PromptDiv"><div class="PromptDiv-title"><span class="close-span">×</span>提示消息</div><div class="PromptDiv-content">' + msg + '</div></div>');
- $('body').append($html);
- $html.slideDown(600);
- $('.close-span').off().on('click',function(e){
- e.preventDefault();
- $html.slideUp(600);
- })
- }
- })
- });
- </script>
- </head>
- <body>
- <div class="tool-wrap">
- <div class="tool">
- <span><a class="collection" style="cursor: pointer;">收藏</a></span>
- <span class="emp-item" style="position: relative;">
- <span class="emp-name"><a href="#"></a></span>
- <div class="albumn username-div">
- <!--
- <a class="to-do" href="/pages/toDo/index.html">代办事项<i>1</i></a>
- |-->
- <img id="avator-img" src="">
- <!-- /img/albumn.png -->
- <a href="/updateuserInfo.html" id="username" class="username"></a>
- |
- <a href="/password.html">修改密码</a>
- |
- <a href="/sys/logout">退出</a>
- <!-- <span class="albumn-arrow"></span>
- <div class="logout-div">
- <a href="/sys/logout">退出</a>
- </div> -->
- </div>
- </span>
- </div>
- </div>
- <div class="logo-wrap">
- <div class="logo">
- <img src="/img/logo.png" alt="logo">
- </div>
- </div>
- <div class="nav-wrap">
- <div class="nav" >
- <ul id="head-nav-ul">
- </ul>
- </div>
- </div>
|