123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>系统信息列表</title>
- <script type="text/javascript" src="${ctx}/qui/libs/js/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/qui/libs/js/framework.js"></script>
- <link href="${ctx}/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" id="skin" prePath="${ctx}/qui/"/>
- <link rel="stylesheet" type="text/css" id="customSkin"/>
- <script src="${ctx}/qui/libs/js/table/quiGrid.js" type="text/javascript"></script>
- <script type="text/javascript" src="${ctx}/qui/libs/js/table/treeTable.js"></script>
- <script type="text/javascript">
- var g;
- function initComplete(){
- g = $("#maingrid").quiGrid({
- columns: [
- { display: '资源名称', name: 'resourceName', id:'resourceId', width:"25%", align: 'left' },
- { display: '资源标识', name: 'resourceEcode',width:"15%", align: 'center' },
- { display: '资源URL', name: 'urlPath', width:"25%", align: 'left' },
- { display: '状态', name: 'state',width:"7%", type: 'int', align: 'center' ,
- render : function(rowdata, rowindex, value, column){
- if(0==value)
- return "<font color=red>禁用</font>";
- if(1==value)
- return "<font color=green>启用</font>";
- }
- },
- { display: '资源排序', name: 'sort', width:"7%" , align: 'center' },
- { display: '资源类型', name: 'etype',width: "7%", type: 'String', align: 'center' ,
- render : function(rowdata, rowindex, value, column){
- if("menu"==value)
- return "菜单";
- if("button"==value)
- return "按钮";
- }
- },
- { display: '操作', isAllowHide: false, align: 'left', width:"10%",render: function (rowdata, rowindex, value, column){
- return '<div class="padding_top4 padding_left5">'
- <@pop_perm url="/resource/update.do">
- + '<span class="hand" title="修改" onclick="onEdit(' + rowdata.resourceId + ')">修改</span>'
- </@pop_perm>
- <@pop_perm url="/resource/delete.do">
- + ' <span class="hand" title="删除" onclick="onDelete(' + rowdata.lft +','+rowdata.rgt+')">删除</span>'
- </@pop_perm>
- + '</div>';}
- }
- ],
- height: '100%', width:"100%",checkbox:false,rownumbers:true,usePager: false,url:'${ctx}/resource/listPage.do?Q_parent_S_NULL=null&pageSize=500',tree: { columnId: 'resourceId' },
- toolbar:{
- items:[
- <@pop_perm url="/resource/create.do">
- {text:'新增',click:addUnit,iconClass:'icon_add'},
- {line:true}
- </@pop_perm>
- ]
- }
- });
- }
-
- function addUnit(){
- top.Dialog.open({
- URL:"${ctx}/resource/create.do",
- Title:"添加资源信息",Width:500,Height:400});
- }
-
- function onEdit(rowId){
- top.Dialog.open({
- URL:"${ctx}/resource/update.do?resId="+rowId,
- Title:"修改资源信息",Width:500,Height:400});
- }
-
- function onDelete(lft,rgt){
- top.Dialog.confirm("删除该资源时会把该资源下所有子资源一起删除,确定要删除该记录吗?",function(){
-
- jQuery.post("${ctx}/resource/delete.do?lft="+lft+"&rgt="+rgt,
- {},
- function(responseText){
- if(responseText.status=="y"){
- top.Dialog.alert(responseText.info);
- refresh();
- }else{
- top.Dialog.alert(responseText.info);
- }
-
- },
- "json");
- });
- }
-
-
- function refresh(){
- g.loadData();
- }
- </script>
- </head>
- <body>
- <div class="padding_right5">
- <div id="maingrid"></div>
- </div>
- </body>
- </html>
|