xinyb
2023-05-30 95fbeede8848a932bedef5db4421629f0688b349
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<%@ page contentType="text/html;charset=utf-8"%>
<%@page import="com.yc.sdk.shopping.util.SettingKey"%>  
<%
//@author hq
//2010-11-25
%>
<%
//得到URL
String URL = SettingKey.getHostUrl(request) ;
%> 
<%@page import="com.yc.service.webmenu.WebMenuIfc"%>
<%@page import="com.yc.service.personalized.CustomHomeGroupIfc"%>
<%@page import="com.yc.utils.SessionKey"%>
<%@page import="com.yc.factory.FactoryBean"%>
<%@page import="com.yc.service.personalized.CustomHomePanelPositionIfc"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Map"%>
<!DOCTYPE html  >
<html>
    <head>
        <base href="<%=URL%>">
        <title>桌面</title>
        <link rel="stylesheet" type="text/css" href="<%=URL %>/style/default/jquery.ui.all.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"style/default/jquery.ui.all.css")%>">
        <script type="text/javascript" src="<%=URL %>/js/jquery-1.4.4.min1.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery-1.4.4.min1.js")%>"></script>
        <script type="text/javascript" src="<%=URL %>/js/jquery.ui.core.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery.ui.core.min.js")%>"></script>
        <script type="text/javascript" src="<%=URL %>/js/jquery.ui.widget.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery.ui.widget.min.js")%>"></script>
        <script type="text/javascript" src="<%=URL %>/js/jquery.ui.mouse.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery.ui.mouse.min.js")%>"></script>
        <script type="text/javascript" src="<%=URL %>/js/jquery.ui.sortable.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery.ui.sortable.min.js")%>"></script>
        <script type="text/javascript" src="<%=URL %>/js/sortable.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/sortable.js")%>"></script>
        <script type="text/javascript" src="<%=URL %>/js/iscroll5.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/iscroll5.js")%>" ></script>
        <!-- <script type="text/javascript" src="<%=URL %>/js/zmjscharts/highcharts.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/zmjscharts/highcharts.js")%>"></script> -->
        <style type="text/css">
    #scroller{
    position:absolute; 
    z-index:1; 
 overflow:auto;/* winphone8和android4+ */
-webkit-overflow-scrolling: touch; /* ios5+ */
    width:100%;
    height:100%;
}
        body{overflow: hidden; font-family:'Verdana','宋体';}
        .hidden{display: none;}
        .column {margin:0px;margin-left:2px;padding:0px;min-width:150px;width:150px;font-size:12px;padding-bottom:200px;
            height:20px;line-height:20px;vertical-align: top;display: inline-block;
        }
        .item {padding-bottom:4px;margin-top:4px;}
        .item-header { margin: 0.3em; padding-bottom: 4px;padding-top:3px;padding-top:3px;overflow-x:hidden; padding-left: 0.2em;margin-bottom: 0px;line-height: 20px;vertical-align: middle;}
        .item-header .ui-icon { float: right;}
        .item-content {padding: 0.4em;padding-top:0px;margin:0px;padding-bottom:10px;}
        .ui-sortable-placeholder { border: 1px dotted black; visibility: visible !important; height: 50px !important; }
        .ui-sortable-placeholder * {visibility: hidden; }
        .placeholder{border: 2px dashed #cccccc;display:block;}
        .centerTool{border-bottom:solid 0px;border-left:solid 0px;border-top:solid 0px;border-right:#939293 solid 1px;height:18px;}
        .allowDrag{cursor: move;}
        /**grid style**/
        .item-header span{cursor: pointer;}
        .item-content{overflow: hidden;}
        .content1 ul{list-style: none;margin:0px;padding:0px;clear: both;overflow: hidden;} 
        .content1 li{float: left;white-space: nowrap;line-height: 22px;}
        .ct1-header li{font-weight: bold;}
        .layout-browser{height:30px;border:0px;border-bottom:7px solid #DEEDF7;
        background:url('/style/default/images/layout-browser-hd-bg.gif') #7f99be repeat-x center 50%;
        line-height: 30px;color: #fff;vertical-align:middle;overflow: hidden;}
    </style>
    <script type="text/javascript">
        $(function(){
            isDeskTop();
        });
        function isDeskTop(){
            var t=$(".item[formid]").length;
            if(t==0){
                try{
                    parent.firstDeskTop();
                }catch(e){
                    setTimeout("isDeskTop()",400);
                }
            }
        }
    function postT219001(s1,s2,s3,s4,s5){        
        parent.addTab(s1,s2,s3,s4,s5);
    }        
    </script>
    </head>
    <%
    String userCode = (String)session.getAttribute(SessionKey.HRCODE);
    String isSuperUser = (String)session.getAttribute(SessionKey.SUPPER_USER);
 
    try{
        com.yc.multiData.SpObserver.setDBtoInstance("_"+session.getAttribute(SessionKey.DATA_BASE_ID));
    CustomHomeGroupIfc groupIfc = (CustomHomeGroupIfc)FactoryBean.getBean("CustomHomeGroupImpl");
    CustomHomePanelPositionIfc positionIfc = (CustomHomePanelPositionIfc)FactoryBean.getBean("CustomHomePanelPositionImpl");
    List<Map<String,Object>> groups = groupIfc.getGroups(userCode);
    if(groups.size()==0){
        groupIfc.addGroup(userCode,300,0);
        groupIfc.addGroup(userCode,300,1);
        groups = groupIfc.getGroups(userCode);
    }
    List<Map<String,Object>> positions = positionIfc.getDisplayPanelPosition(userCode);
    boolean isNoChgId=true;//有排序桌面信息(positions有数据) 但是没有分组的chgId值对应的情况。 xin 2023-5-30 16:38:09
%>
    <body style="margin: 0px;padding:0px;">
                    <div id="scrollbody">
        <div id="scroller" style="height: 100%!important;">
        <div id=""  style="border:0px;white-space :nowrap;position: absolute;overflow: auto;width: 100%;height: 100%;">
            <%
                            Map<String,Object> temp = null;
                            Map<String,Map<String,Object>> perssion =(Map<String,Map<String,Object>>)session.getAttribute(SessionKey.PERSSION);// 权限集合
                            int gid=0;
                            for(int i=0;i<groups.size();i++){
                                temp = groups.get(i);
                                gid = Integer.parseInt(temp.get("chgid").toString());
                        %>
                            <span class="column" id="group_<%=gid %>" groupid='<%=gid %>' style="width:<%=temp.get("width") %>px;">
                        <%
                            for(int j=0;j<positions.size();j++){
                                temp = positions.get(j);
                                if(gid==Integer.parseInt(temp.get("chgid").toString()) && (perssion.get(temp.get("formid").toString())!=null || "1".equals(session.getAttribute(SessionKey.SUPPER_USER)))){
                                    isNoChgId=false;
                        %>                    
                                <div class="item drag" formid="<%=temp.get("formid") %>" formtype="<%=temp.get("formtype") %>" pid="<%=temp.get("pid") %>">
                                    <div class="item-header"><font class="allowDrag"><%=temp.get("formname") %></font></div>
                                    <div class="item-content"></div>
                                </div>
                        <%
                            }}
                        %>
                            </span>
                        <%
                            }
                            if(isNoChgId && positions.size()>0){//有排序桌面信息在表但是没有分组表的ChgID值对应 xin 2023-5-30 16:41:56
                                //把这个账号的桌面排序信息都删除了,然后重新设置一次(只针对分组里没有对应的ChgId情况,如果分组里也有Chgid但是是隐藏排序信息情况不处理)
                                positionIfc.deletePanelPosition(userCode);
                            }
    }finally{
        com.yc.multiData.SpObserver.setDBtoInstance();
    }
                        %>
        </div>
        </div>
</div>
    </body>
</html>