123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="Cache-Control" content="no-siteapp" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/easyui/themes/gray/easyui.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/easyui/themes/icon.css" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/easyui/jquery.easyui.min.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/easyui/locale/easyui-lang-zh_CN.js"></script>
- <style type="text/css">
- .panel-header, .panel-body{border-color:#FCFCFC}
- .layout-split-west{border-right:none}
- </style>
- <script type="text/javascript">
- var $easy = $.noConflict(true);
- $easy(function(){
- $easy('#pageright').panel({
- onResize:function(width, height){
- // $("#jqGrid").setGridWidth(width-4);
- }
- });
- })
- </script>
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" >
- <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
- <script type="text/javascript">
- //var currentOrgID = '${currentOrgID!}';
- var OrgTree = '${selfReport!}';
- var setting = {
- view: {
- dblClickExpand: false,
- showLine: false,
- selectedMulti: false
- },
- data: {
- simpleData: {
- enable:true,
- idKey: "id",
- pIdKey: "pId",
- rootPId: "-1"
- }
- },
- callback: {
- onClick: zTreeClick,
- beforeCollapse: function (treeId, treeNode) {return (treeNode.collapse !== false);},//禁止折叠,节点上需要“open:true,collapse:false”属性支持
- beforeExpand: function (treeId, treeNode) {return (treeNode.expand !== false);}//禁止展开,节点上需要“open:false,expand:false”属性支持
- }
- };
-
- //创建树型菜单
- function createTree(OrgTree){
- var zNodes = [{id:"0",pId:"-1",name:"自定义报表",url:'${ctx}/myconsole/complaint/report/setupTableAdd?TID=0',target:'contentFrame',open:true}];
- if(OrgTree == ""){
- return false;
- }
- var jsonorgtree = JSON.parse(OrgTree);
- jsonorgtree.forEach(function(item,index){
- var strTType = item.ttype;
- var strURL="";
- strUpperID = item.upperid;
- if (strTType=="table") {
- //输出此表的“维度、指标”分类
- strURL="${ctx}/myconsole/complaint/report/setfieldAdd?TID="+item.tid;
- var ttid=item.tid+"_field";
- zNodes.push({id:ttid,pId:item.tid,name:"维度数据",url:strURL,target:'contentFrame'});
- //输出此表的“指标”分类
- strURL="${ctx}/myconsole/complaint/report/settargetAdd?TID="+item.tid;
- ttid=item.tid+"_target";
- zNodes.push({id:ttid,pId:item.tid,name:"指标数据",url:strURL,target:'contentFrame'});
- strURL="${ctx}/myconsole/complaint/report/setupTableUpdate?TID="+item.tid;
- } else if (strTType=="target") {
- strURL="${ctx}/myconsole/complaint/report/settargetUpdate?TID="+item.tid;
- //strIcon=",icon:'../../ztree/style/charts.png'";
- strUpperID = item.upperid + "_target";
- } else {
- strURL="${ctx}/myconsole/complaint/report/setfieldUpdate?TID="+item.tid;
- //strIcon=",icon:'../../ztree/style/field.gif'";
- strUpperID = item.upperid + "_field";
- }
- zNodes.push({id:item.tid,pId:strUpperID,name:item.tname,url:strURL,target:'contentFrame'});
- })
- return zNodes;
- }
-
- //ztree的点击回调函数
- function zTreeClick(event, treeId, treeNode) {
- $('#contentFrame').attr('src','${ctx}/myconsole/'+treeNode.url);
- }
-
- $(document).ready(function(){
- var ztreeNode = $.fn.zTree.init($("#treeDemo"), setting,createTree(OrgTree));
- //DOM加载完成后,加载jqgrid
- })
-
- </script>
- <title>我的桌面</title>
- </head>
- <body>
- <div class="easyui-layout" data-options="fit:true">
- <div region="west" split="true" style="width:250px;height:100%;background-color:#f5f5f5">
- <ul id="treeDemo" class="ztree">
- </ul>
- </div>
- <div region="center" id="pageright">
- <div class="page-container">
- <iframe id="contentFrame" name="contentFrame" scrolling="no" frameborder="0" style="width:100%; height:750px;" src=""></iframe>
- </div>
- </div>
- </div>
- </body>
- </html>
- <script>
- function setGrid(OrgID,OrgName) {
- $("#jqGrid").jqGrid('setGridParam', {
- datatype : 'json',
- postData : {OrgID:currentOrgID}
- }).jqGrid('setCaption', OrgName).trigger("reloadGrid");
- }
-
-
- </script>
|