123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525 |
- <%@page language="java" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
- <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link href="/nwyj/scripts/qui/system/layout_flat/skin/style.css" rel="stylesheet" type="text/css" id="skin" skinPath="/nwyj/scripts/qui/" scrollerY="false" scrollerX="false"/>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/popup/drag.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/popup/messager.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/jquery/plugins/jquery.extension.util.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/system/loading/loading.js"></script>
- <link href="/nwyj/scripts/freamwork/com/sinosoft/system/loading/loading.css" rel="stylesheet" type="text/css"/>
- <style>
- html, body{
- width:100%;
- height: 100%;
- }
- body{ position: relative;}
- .contonter{
- width: 100%;
- height: 100%;
- }
- .tab_cont{
- padding-top:10px;
- float:left;
- border-right:1px solid #b1b0b0;
- height:100%;
- width:23.8%;
- }
- .tab_numb{
- color: #0255c7;
- font-size: 14px;
- font-family: "微软雅黑";
- font-weight:lighter;
- }
-
- .tab_list{
- font-weight:bold;
- color: #313030;
- font-size: 14px;
- font-family: "微软雅黑";
- padding: 5px 0 5px 10px;
- }
- .tab_list:hover{
- cursor: pointer;
- background-color: #e8edf4;
- }
- .tab_list_after{
- background-color: #e8edf4;
- }
- .mod_cont{
- float:left;
- margin:5px;
- width: 74.5%;
- height: 100%;
- }
- .mod_cont ul{
- list-style-type: none;
- margin: 0px;
- padding:0px;
- }
- .mod_cont li{
- width:118px;
- height:118px;
- margin:10px 5px;
- text-align:center;
- display:inline-block;
- border: 1px solid #b1b0b0;
- }
- .text_img {
- margin-top:15px;
- height: 60px;
- width: 60px;
- }
- .text_div{
- white-space: nowrap;
- width: 118px;
- overflow: hidden;
- text-overflow: ellipsis;
-
- height:30px;
- line-height:30px;
- border-bottom:1px solid #b1b0b0;
- font-size: 14px;
- }
- .mod_list{
- position: relative;
- }
-
- .module_list_cursor{
- cursor:pointer;
-
- }
-
- .selet_menu{
- border-color: red !important;
- }
-
- .check_select2 {
-
- border: 0px none;
- background-image: url("/nwyj/images/index/module_img/sel_img_2.png");
- background-repeat: no-repeat;
- background-position: 95% 95%;
- padding: 0px 0px 0px 0px;
- display: inline-block;
- white-space: nowrap;
- word-break: keep-all;
- word-wrap: normal;
- background-size: 18px 14px;
- }
- .check_select1 {
-
- border: 0px none;
- background-image: url("/nwyj/images/index/module_img/sel_img_1.png");
- background-repeat: no-repeat;
- background-position: 95% 95%;
- padding: 0px 0px 0px 0px;
- display: inline-block;
- white-space: nowrap;
- word-break: keep-all;
- word-wrap: normal;
- background-size: 18px 14px;
- }
- .search_mod{
- position: relative;
- margin:5px 5px 5px 15px;
- height: 8%;
- }
- .search_img{
- position: absolute;
- top: 4px;
- left: 8px;
- }
- .search_input{
- width:200px;
- padding-left:30px;
-
- }
-
- .mod_cont_ul{
- height: 87%;
- overflow: auto;
- width: 100%;
- }
-
- </style>
- <script type="text/javascript">
-
- var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- var roleids = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
- var corp_id = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
-
- //保存当前选中的模块
- var moduleDataList = [];
- //var moduleNew = [];
- //储存原有模块
- var moduleDataBefore = [];
- /*
- var allModule = [{
- ul_id:"left_list",
- li_id:"index_left_1",
- img_url:"/nwyj/images/index/module_img/index_left_1.png",
- title_name:"常用菜单管理",
- module_fun:"getWorkMenuData"
- },{
- ul_id:"right_list",
- li_id:"index_right_1",
- img_url:"/nwyj/images/index/module_img/index_right_1.png",
- title_name:"资源分布图",
- module_fun:"getResourceData"
- },{
- ul_id:"left_list",
- li_id:"index_left_2",
- img_url:"/nwyj/images/index/module_img/index_left_2.png",
- title_name:"预警与响应",
- module_fun:"getAlertResponseData"
- },{
- ul_id:"right_list",
- li_id:"index_right_2",
- img_url:"/nwyj/images/index/module_img/index_right_2.png",
- title_name:"值班信息",
- module_fun:"loadDuty"
- },{
- ul_id:"left_list",
- li_id:"index_left_3",
- img_url:"/nwyj/images/index/module_img/index_left_3.png",
- title_name:"集成URL",
- module_fun:"getUrlData"
- },{
- ul_id:"right_list",
- li_id:"index_right_4",
- img_url:"/nwyj/images/index/module_img/index_right_4.png",
- title_name:"待办",
- module_fun:"getdaibanData"
- }];
- */
- $(function(){
- $("body").indexLoading().show();
- //设置中间竖线高度
- var contenterHight = $(parent.document.body).height();
- $(".tab_cont").height(contenterHight);
-
- //初始化模块
- //setTimeout(function(){
- getAllModuleData("",0);
- //},1000);
- /* 初始话窗口 */
- //initModuleCont(allModule);
- /* 创建工作台中的菜单 */
- //getWorkMenuData();
- /* 创建所有的菜单列表 */
- //getAllMenuData();
-
- ///监听左边选项tab的点击事件
- $(".tab_list").bind("click",function(){
- $("body").indexLoading().show();
- var $self = $(this);
- $self.addClass("tab_list_after").siblings().removeClass("tab_list_after");
- var value = $self.attr("value");
- getAllModuleData(value,1);
- $self = null;
- value=null;
- });
-
- $("#search_module_btn").bind("click",searchModule);
- $("#search_module_input").keydown(function(event){
- if(event.which == "13")
- $("#search_module_btn").click();
- });
-
- });
-
- //
- function searchModule(){
- $("body").indexLoading().show();
- $(".tab_list").eq(0).addClass("tab_list_after").siblings().removeClass("tab_list_after");
- var searchCond = $("#search_module_input").val();
- if(searchCond==""){
- getAllModuleData("",0);
- }else{
- //debugger;
- $.ajax({
- url : '/nwyj/ws/moduleobj/getSearchModule/',
- type : 'post',
- data : {
- user_id:user_id,
- corp_id:corp_id,
- moduleName:searchCond
- },
- dataType : 'json',
- //async:false,
- success : function(data) {
- //console.log(data);
- data = data.resultData;
- initModuleCont(data,0);
- },
- error : function(e) {
- top.Dialog.alert("访问服务失败!");
- }
- });
- }
- }
-
-
- //获取所有模块的信息
- function getAllModuleData(parent_menu,modType){
- $.ajax({
- url : '/nwyj/ws/moduleobj/getAllModule/',
- type : 'post',
- data : {
- user_id:user_id,
- corp_id:corp_id,
- parent_menu:parent_menu
- },
- dataType : 'json',
- //async:false,
- success : function(data) {
- //alert("--->jinru");
- data = data.resultData;
- initModuleCont(data,modType);
- },
- error : function(e) {
- try{
- top.Dialog.alert("访问服务失败!");
- }catch(e){
- }
- }
- });
- }
-
- //获得当前用户已经拥有的模块信息
- function getDataBefore(){
- $.ajax({
- url : '/nwyj/ws/moduleobj/getModuleByUserId/',
- type : 'post',
- data : {
- user_id:user_id
- },
- dataType : 'json',
- //async:false,
- success : function(data) {
- data = data.resultData;
- for(var i=0;i<data.length;i++){
- $("#"+data[i].li_id).removeClass("check_select2").addClass("check_select1");
- var module = trim(data[i].li_id);
- moduleDataList.push(module);
- moduleDataBefore.push(module);
- module=null;
- }
- },
- error : function(e) {
- try{
- top.Dialog.alert("访问服务失败!");
- }catch(e){
- }
- }
- });
- }
-
- //初始化右边模块内容,并处理其他操作(分初次、以后)
- var isFrist = true;
- function initModuleCont(moduleData,modType){
- var tabNum = 0;
- var tabNum0 = 0;
- var tabNum1 = 0;
- var tabNum2 = 0;
- var tabNum3 = 0;
- var tabNum4 = 0;
- var tabNum5 = 0;
- //console.log(moduleData);
- var $dom = $("#mod_cont").find("ul");
- $dom.empty();
- for(var i=0;i<moduleData.length;i++){
- var data = moduleData[i];
- tabNum++;
- if((data.parent_menu).indexOf("0")>-1){
- tabNum0++;
- }
- if((data.parent_menu).indexOf("1")>-1){
- tabNum1++;
- }
- if((data.parent_menu).indexOf("2")>-1){
- tabNum2++;
- }
- if((data.parent_menu).indexOf("3")>-1){
- tabNum3++;
- }
- if((data.parent_menu).indexOf("4")>-1){
- tabNum4++;
- }
- if((data.parent_menu).indexOf("5")>-1){
- tabNum5++;
- }
- var datalitle = trim(data.title);
- if("index_left_7"==data.li_id){
- datalitle = "公告(左)";
- }
- var $list = $('<li class="mod_list module_list_cursor check_select2" id="'+trim(data.li_id)+'" title="'+trim(data.title)+'"></li>');
- var $text = $('<div class="text_div" >'+datalitle+'</div>');
- var $img = $('<img class="text_img " src="'+trim(data.img_url)+'"/>');
-
- $dom.append($list);
- $list.append($text).append($img);
- $list.data("li_id",trim(data.li_id));
- $list.bind("mouseenter",moveInModule);
- $list.bind("mouseleave",moveOutMoule);
- $list.bind("click",goModuleAdd);
- $list = null;
- $text = null;
- $img = null;
- data = null;
- }
- /*
- if(modType==0){
- }*/
- if(isFrist){
- $("#tabNum").html("("+tabNum+")");
- $("#tabNum0").html("("+tabNum0+")");
- //$("#tabNum1").html("("+tabNum1+")");
- $("#tabNum2").html("("+tabNum2+")");
- //$("#tabNum3").html("("+tabNum3+")");
- $("#tabNum4").html("("+tabNum4+")");
- //$("#tabNum5").html("("+tabNum5+")");
- getDataBefore();
- isFrist = false;
- }else{
- getFlagToData(moduleDataList);
- }
- tabNum = null;
- tabNum0 = null;
- tabNum1 = null;
- tabNum2 = null;
- tabNum3 = null;
- tabNum4 = null;
- tabNum5 = null;
- $dom = null;
- //隐藏加载图标
- $("body").indexLoading().hide();
- }
- //当点击左边选项tab时,根据现在选中的模块数据,初始标记
- function getFlagToData (data){
- for(var i=0;i<data.length;i++){
- var dataMod = data[i];
- $("#"+dataMod).removeClass("check_select2").addClass("check_select1");
- dataMod = null;
- }
- }
- //鼠标移除模块的监听方法
- function moveOutMoule(){
- var $self = $(this);
- if($self.hasClass("module_list_cursor")){
- $self.removeClass("module_list_cursor");
- }
- $self = null;
- }
- //鼠标进入模块的监听方法
- function moveInModule(){
- var $self = $(this);
- $self.addClass("module_list_cursor");
- $self = null;
- }
- //储存需要删除的模块
- var delectModules = [];
- //点击每个模块的事件(删除、添加)
- function goModuleAdd(){
- var $self = $(this);
- var module_fun = $self.data("module_fun");
- var li_id = $self.data("li_id");
- var module = trim(li_id);
- if($self.hasClass("check_select1")){//删除
- var list = [];
-
- $self.removeClass("check_select1").addClass("check_select2");
- for(var i=0;i<moduleDataList.length;i++){
- if(module!=moduleDataList[i]){
- list.push(moduleDataList[i]);
- }
- }
- for(var j=0;j<moduleDataBefore.length;j++){
- if(module==moduleDataBefore[j]){
- delectModules.push(moduleDataBefore[j]);
- }
- }
- moduleDataList=list;
- list=null;
-
- }else{//添加
- $self.removeClass("check_select2").addClass("check_select1");
- moduleDataList.push(module);
- var list1 = [];
- for(var k=0;k<delectModules.length;k++){
- if(module!=delectModules[k]){
- list1.push(delectModules[k]);
- }
- }
- delectModules=list1
- list1=null;
- }
- module =null;
- li_id=null;
- $self = null;
- title = null;
- }
-
- //父窗口调用,并取数据的方法
- function getDateToParent(){
- var data = {
- current:moduleDataList,
- before:delectModules
- };
- return data;
- data=null;
- }
-
- //删除左右两端的空格
- function trim(str){
- if(str!=null){
- return str.replace(/(^\s*)|(\s*$)/g, "");
- }
- return str;
- }
-
-
- </script>
- </head>
- <body>
- <div class="contonter" >
- <div class="tab_cont">
- <div class="tab_list tab_list_after" value="">全部<span class="tab_numb" id="tabNum">--</span></div>
- <div class="tab_list " value="0">系统管理<span class="tab_numb" id="tabNum0">--</span></div>
- <!-- <div class="tab_list " value="1">日常管理<span class="tab_numb" id="tabNum1">--</span></div> -->
- <div class="tab_list " value="2">应急处置<span class="tab_numb" id="tabNum2">--</span></div>
- <!-- <div class="tab_list " value="3">保供电<span class="tab_numb" id="tabNum3">--</span></div> -->
- <div class="tab_list " value="4">驾驶舱<span class="tab_numb" id="tabNum4">--</span></div>
- <!-- <div class="tab_list " value="5">待办<span class="tab_numb" id="tabNum5">--</span></div> -->
- </div>
- <div class="mod_cont" id="mod_cont">
- <div class="search_mod" id="searchinput" >
- <a href="javascript:;" class="search_img" id="search_module_btn"><img src="/nwyj/images/index/search_img.png"/></a>
- <input watermark="应用模块" type="text" class="search_input" id="search_module_input">
- </div>
- <ul class="mod_cont_ul" >
-
- </ul>
-
- </div>
- </div>
- </body>
- </html>
|