index.php 15.4 KB
<!DOCTYPE html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html>
<head>
    <meta charset="UTF-8">
    <title>SOS信息综合管理系统</title>
    <link rel="stylesheet" type="text/css" href="/assets/common/css/themes/gray/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/assets/common/css/themes/gray/menu.css" />
    <link rel="stylesheet" type="text/css" href="/assets/common/css/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="/assets/web/css/jitnry.css" />
    <script type="text/javascript" src="/assets/common/js/jquery.min.1.9.4.js"></script>
    <script type="text/javascript" src="/assets/common/js/jquery.easyui.min.1.9.4.js"></script>
    <script type="text/javascript" src="/assets/common/js/jquery.cookie.1.4.1.js"></script>
    <!-- 插件调用 --->
    <script type="text/javascript" src="/assets/common/js/datagrid-detailview.js"></script>
    <script type="text/javascript" src="/assets/common/locale/easyui-lang-zh_CN.js"></script>
    <!-- 基础 JS 调用 -->
    <script type="text/javascript" src="/assets/web/js/src/easyui.base.js"></script>
    <script type="text/javascript" src="/assets/web/js/src/common.menu.js"></script>

    <script type="text/javascript">
        var oltTarget, logTarget, logGridTarget;
        var num = 0;
        var iCount;
        var user=   localStorage.getItem("user");

        if(user != 'admin'){
            $('#shouUser').attr("style","display:none;");
        }

        $(function () {
            oltTarget = $("#operation_log_txt");
            logTarget = $("#operation_log");
            logGridTarget = $("#operation_log_grid");

            /* 获得窗口大小 */
            function onResize() {
                logTarget.window({
                    left:$(window).width() - 705,
                    top:$(window).height() - 425,
                    closed:true
                });
            };
            window.onresize = onResize;
            onResize();

            /*
            $(document).unbind('.commoditygrid').bind('mousedown.commoditygrid', function(e){
                var p = $(e.target).closest('table.datagrid-btable,div.combo-panel');
                if (p.length) { return; }
            });
            */


            //	$('#main_tabs').tabs('update', {
            //		tab: $('#main_tabs').tabs('getTab', 0),
            //		options: {
            //			id: 'ClientIndex',
            //			title: '客户管理'
            //		}
            //	});

            //	$('#main_iframe').attr('src','__MODEL__/client/client_list_main');



            //首页默认展示
            $('#main_tabs').tabs('update', {
                tab: $('#main_tabs').tabs('getTab', 0),
                options: {
                    id: 'ClientIndex',
                    title: '人员管理'
                }
            });


            if(user == 'admin'){
                $('#main_iframe').attr('src','__MODEL__/role/index');
            }else{
                $('#main_iframe').attr('src','__MODEL__/Fu_ji_tong/index');
            }





            $.h.index.setOperateInfo(null, false);

            $("<div class=\"datagrid-mask\"></div>").css({
                display: "none",
                position: "absolute",
                width: "100%",
                height: "100%"
            }).appendTo("#Loading");
            $("<div class=\"loading\"></div>").html("<div><img src='/assets/web/img/loading.gif' style='width:80px;height:80px;'></div><div style='font-size:12px;color:#666;'>正在加载主框架数据……</div>").css({
                position: "relative",
                left: $(window).width() / 2 - $(window).width() * 0.1,
                top: $(window).height() / 2 - 100,
                width: $(window).width() * 0.2
            }).appendTo("#Loading").css({display: "block"});
            setTimeout(function () {
                $("#Loading").fadeOut("normal", function () {
                    $(this).remove();
                });
            }, 800)
        });

        $.h.index = {
            refresh : function(e) {
                var objMainTabs = $('#main_tabs');
                var objMainTabsOptions = objMainTabs.tabs('getSelected').panel('options');
                if (objMainTabs.tabs('getTabIndex',objMainTabs.tabs('getSelected')) == 0) {
                    $('#main_iframe').attr('src',$('#main_iframe').attr('src'));
                    return;
                }
                objMainTabs.tabs('update', {
                    tab: objMainTabs.tabs('getSelected'),
                    options: {
                        title: objMainTabsOptions.title,
                        href: objMainTabsOptions.href
                    }
                });
                objMainTabs.tabs('getSelected').panel('refresh');
            },
            onCloseAll : function() {
                var objTabs = $('#main_tabs');
                var mTabs = objTabs.tabs('tabs');
                for (var i = 0; i < mTabs.length; i++) {
                    if (i == 0) continue;
                    objTabs.tabs("close", i);
                }
            },
            sendMainMsg : function(msg) {
                if ($("#main_msg").is(":hidden")) {
                    $('#main_msg').html(msg);
                    var mainMsgWidth = $('#main_msg').width() / 2;
                    $('#main_msg').offset({top:0,left:((document.documentElement.clientWidth || document.body.clientWidth) / 2 - mainMsgWidth)});
                    $('#main_msg').show();
                } else {
                    $('#main_msg').html('');
                    $('#main_msg').offset({top:0,left:0});
                    $('#main_msg').hide();
                }
            },
            /**
             * 如果 info 为 null 并且 b 为 false,只读取数组中第一条记录并显示
             * 如果 info 不是 null 并且 b 为 false,只显示信息,不写入数组中
             * 如果 info 不是 null 并且 b 为 true,显示信息,并写入数组中
             */
            setOperateInfo : function(info, b) {
                if (info == null || b) {
                    var mCookieData = $.cookie('SysOperateInfo');
                    if (!mCookieData) {
                        mCookieData = '[]';
                    }
                    mCookieData = JSON.parse(mCookieData);

                    if (mCookieData.length >= 10) {
                        mCookieData.splice(9, 1);
                    }
                    /* 为 true 时,写入 Cookie */
                    if (b) {
                        info.id = mCookieData.length;
                        mCookieData.unshift(info);
                        $.cookie('SysOperateInfo',JSON.stringify(mCookieData));
                    }
                    if (info == null) {
                        if (mCookieData.length == 0) return;
                        info = mCookieData[0];
                    }

                    if (!logTarget.window('options').closed) {
                        logGridTarget.datagrid('loadData', mCookieData);
                    }
                }

                var strHtml = '<strong>【{R_Module}】【{R_Operate}】:</strong>{R_Content}';
                strHtml = strHtml.replace('{R_Module}',info.module).replace('{R_Operate}',info.operate).replace('{R_Content}',info.content);
                $(oltTarget.children()[0]).html(strHtml);

                clearInterval(iCount);
                if (info.icon == 'hr-warn' || info.icon == 'hr-error') {

                    this.sendMainMsg(strHtml);
                    iCount = window.setInterval(txtTwinkle, 1300);
                }

                if (!$(oltTarget.children()[1]).hasClass(info.icon)) {
                    strHtml = "l-btn-icon " + info.icon;
                    $(oltTarget.children()[1]).attr("class","l-btn-icon " + info.icon);
                }
            }
        };
        function txtTwinkle() {
            num++;
            if (num == 6) {
                num = 0;
                $.h.index.sendMainMsg(null);
                clearInterval(iCount);
            } else {
                setTimeout("oltTarget.css('color','blue')",500);
                setTimeout("oltTarget.css('color','#000')",800);
            }
        }
    </script>
</head>
<body>
<div id='Loading' style="position:absolute;z-index:1000;top:0px;left:0px;width:100%;height:100%;background-color:#fff;text-align:center;"></div>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north',border:false" style="display:flex;justify-content:space-between;height:60px;line-height:60px;overflow:hidden;background-image:linear-gradient(90deg, #dee, #fff);">
        <div style="display:flex;align-items:center;">
            <div slot="header-logo" style="float:left;width:180px;">
                <img src="/assets/web/img/Logo.png" style="margin-left: 20px;height: 30px;">
            </div>
        </div>
        <div style="display:flex;align-items:center;margin-right:5px;">
            <a href="/web/index/loginout" class="easyui-menubutton">退出</a>
        </div>
        <div id="main_msg" style="display:none;position:absolute;top:0;left:50%;transform:translate(-50%,0);height:40px;line-height:30px;font-size:14px;color:#fff;padding:5px 20px;border-radius:0 0 .5em .5em;background-color:rgba(0,0,0,0.5)">~~这是一条提示消息~~</div>
    </div>
    <div data-options="region:'west',split:true,hideCollapsedContent:false,collapsed:false,title:'菜单',dataType:'json'" style="width:180px;min-width:160px;">
        <div class="easyui-menu" data-options="inline:true,fit:true,itemHeight:40" style="border:0px;">
            <!--                        <div data-options="iconCls:'icon-cancel'">-->
            <!--            				<span>客户管理</span>-->
            <!--                            <div style="width:180px;">-->
            <!--                                <div data-options="iconCls:'icon-clear'"><b>客户管理</b></div>-->
            <!--                                <div data-options="iconCls:'icon-edit'">客户导入</div>-->
            <!--                                <div data-options="iconCls:'icon-remove'">客户调配</div>-->
            <!--                                <div data-options="iconCls:'icon-save'">数据处理</div>-->
            <!--            					<div class="menu-sep"></div>-->
            <!--            					<div data-options="iconCls:'icon-cut'">招聘管理</div>-->
            <!--            					<div data-options="iconCls:'icon-ok'">下发回收</div>-->
            <!--            					<div data-options="iconCls:'icon-no'">故障报修</div>-->
            <!--                            </div>-->
            <!--            			</div>-->
            <!--                        <div class="menu-selected" data-options="iconCls:'hr-loading'">-->
            <!--                            <span>我的助手</span>-->
            <!--                            <div style="width:180px;">-->
            <!--                                <div><b>我的消息</b></div>-->
            <!--                                <div>消息提醒</div>-->
            <!--                                <div>通话记录</div>-->
            <!--                                <div>未接来电</div>-->
            <!--                                <div>公告管理</div>-->
            <!--                                <div>通讯录</div>-->
            <!--                                <div>个人设置</div>-->
            <!--            					<div>帮助向导</div>-->
            <!--                            </div>-->
            <!--                        </div>-->
            <!---->
            <!--            <div data-options="iconCls:'icon-reload'">-->
            <!--                <span>转盘抽奖</span>-->
            <!--                <div style="width:180px;">-->
            <!--                    <div onclick="$.h.menu.onMenuTurnPrizeManage();"><b>奖项列表</b></div>-->
            <!--                    <div onclick="$.h.menu.onMenuTurnPrizeUserManage();"><b>用户列表</b></div>-->
            <!--                    <div onclick="$.h.menu.onMenuTurnPrizeRuleManage();"><b>规则设置</b></div>-->
            <!--                </div>-->
            <!--            </div>-->
            <!--            <div data-options="iconCls:'icon-reload'">-->
            <!--                <span>抽奖管理</span>-->
            <!--                <div style="width:180px;">-->
            <!--                    <div onclick="$.h.menu.onMenuPrizeManage();"><b>奖项列表</b></div>-->
            <!--                    <div onclick="$.h.menu.onMenuPrizeUserManage();"><b>用户列表</b></div>-->
            <!--                    <div onclick="$.h.menu.onMenuPrizeRuleManage();"><b>规则设置</b></div>-->
            <!--                </div>-->
            <!--            </div>-->
            <!--            <div data-options="iconCls:'icon-reload'">-->
            <!--                <span>产品管理</span>-->
            <!--                <div style="width:180px;">-->
            <!--                    <div onclick="$.h.menu.onMenuProductManage();"><b>产品列表</b></div>-->
            <!--                    <div onclick="$.h.menu.onMenuProductOrderManage();"><b>订单列表</b></div>-->
            <!--                </div>-->
            <!--            </div>-->
            <!--            <div data-options="iconCls:'icon-reload'">-->
            <!--                <span>获客管理</span>-->
            <!--                <div style="width:180px;">-->
            <!--                    <div onclick="$.h.menu.onMenuFuJiTongManage();"><b>客户列表</b></div>-->
            <!--                </div>-->
            <!--            </div>-->




            <div data-options="iconCls:'icon-reload'" id="shouUser">
                <span>管理员</span>
                <div style="width:180px;">
                    <div onclick="$.h.menu.onMenuRoleManage();"><b>人员管理</b></div>
                    <div onclick="$.h.menu.onMenuMechanismManage();"><b>机构管理</b></div>
                </div>
            </div>
            <div data-options="iconCls:'icon-reload'">
                <span>二级菜单</span>
                <div style="width:180px;">
                    <div onclick="$.h.menu.onMenuPersonnelManage();"><b>人员管理</b></div>
                    <div onclick="$.h.menu.onMenuDepartmentManage();"><b>部门管理</b></div>
                </div>
            </div>
        </div>
    </div>
    <div data-options="region:'center',border:false" style="overflow:hidden;">
        <div id="main_tabs" class="easyui-tabs" data-options="fit:true,border:true,tools:'#tab-tools',tabWidth:120">
            <div style="overflow:hidden;padding:4px;">
                <iframe id="main_iframe" style="width:100%;height:100%;border:0px;overflow:hidden;"></iframe>
            </div>
        </div>
        <div id="tab-tools" style="border-right:0px;">
            <a class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-clear',onClick:$.h.index.onCloseAll" title="关闭所有"></a>
            <a class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload',onClick:$.h.index.refresh" title="刷新当前"></a>
        </div>
    </div>
    <div data-options="region:'east',split:true,hideCollapsedContent:false,collapsed:true,title:'快捷',dataType:'json',href:'/web/index/quick_menu'" style="width:100px;min-width:100px;"></div>
</div>

</body>

</html>