Ext.onReady(function(){
//定义头部组件 var header = new Ext.Panel({ region:'north', //frame:true, height:132, split: true, minSize: 132, maxSize: 132, collapseMode: 'mini', autoEl:{ tag:'div', html:'<div style="height:132px;"><iframe src="/dyzc/flash/header.html" width="100%" height="132px" frameborder="0" scrolling="no"></iframe></div><div style="position:absolute;top:110px;left:50px; color:#FFFFFF;"><font size=3 id="user">欢迎当前用户:</font></div><div id="timer"></div><div id="exit"><font style=margin-left:20px;">退出系统</font></div>' } }); //定义左侧导航栏 var nav = new Ext.Panel({ region:'west', //title:' ', width:200, split: true, minSize: 200, maxSize: 200, bodyCfg:{ cls:'body' }, scollapsible:true, collapseMode: 'mini', //collapsible: true, items:[ //系统管理 new Ext.Panel({ title:'<b style="cursor:pointer; display:block;">系统管理</b>', id:'nav009', autiHeight:true, collapsible: true, titleCollapse:true, headerCfg:{ cls:'nav010Header' }, bodyCfg:{ cls:'alpha' }, html:'<a id="Nav09001" class="arrow" href="#"><span style="margin-left:15px;">部门管理</span></a><div style="height:10px"></div><a id="Nav09001Q" class="arrow" href="#"><span style="margin-left:15px;">部门管理QH</span></a><div style="height:10px"></div><a id="Nav09002" class="arrow" href="#"><span style="margin-left:15px;">用户管理</span></a><div style="height:10px"></div><a id="Nav09002Q" class="arrow" href="#"><span style="margin-left:15px;">用户管理QH</span></a><div style="height:10px"></div><a id="Nav09003" class="arrow" href="#"><span style="margin-left:15px;">岗位管理</span></a><div style="height:10px"></div><a id="Nav09004" class="arrow" href="#"><span style="margin-left:15px;">菜单管理</span></a><div style="height:10px"></div><a id="Nav09005" class="arrow" href="#"><span style="margin-left:15px;">权限管理</span></a><div style="height:10px"></div><a id="Nav09005Q" class="arrow" href="#"><span style="margin-left:15px;">权限管理QH</span></a><div style="height:10px"></div><a id="Nav09006Q" class="arrow" href="#"><span style="margin-left:15px;">角色管理QH</span></a><div style="height:10px"></div><a id="Nav09006" class="arrow" href="#"><span style="margin-left:15px;">角色管理</span></a><div style="height:10px"></div><a id="Nav09007" class="arrow" href="#"><span style="margin-left:15px;">操作日志</span></a><div style="height:10px"></div><a id="Nav09008" class="arrow" href="#"><span style="margin-left:15px;">数据库管理</span></a><div style="height:10px"></div><a id="Nav09009" class="arrow" href="#"><span style="margin-left:15px;">修改密码</span></a><div style="height:10px"></div><a id="Nav09010" class="arrow" href="#"><span style="margin-left:15px;">操作日志(T)</span></a><div style="height:10px"></div><a id="Nav09012" class="arrow" href="#"><span style="margin-left:15px;">岗位日志(T)</span></a><div style="height:10px"></div><a id="Nav09013" class="arrow" href="#"><span style="margin-left:15px;">菜单管理(T)</span></a><div style="height:10px"></div>' }) ] }); //定义右下内容部分 var content = new Ext.Panel({ region:'center', id:'content', html:'<iframe id="mainIframe" src="/dyzc/system/navigation.html" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>', bodyStyle:'background:url(../resources/images/zairu.jpg) #FFFFFF center center fixed no-repeat;' }); //定义Viewport视图 new Ext.Viewport({ layout:'border', items:[{ region:'north', border:false, bodyBorder:false, contentEl:'header', height:132, split: true, minSize: 132, maxSize: 132, collapseMode: 'mini' },nav,content] }); //退出系统 var exit = Ext.get("exit"); exit.addClass('exit01'); exit.on({ 'mouseover':function(){exit.replaceClass('exit01','exit02');}, 'mouseout':function(){exit.replaceClass('exit02','exit01');}, scope:this }); exit.on('click',function(){ Ext.MessageBox.confirm('提示信息','你确定要退出系统吗?',function(btn){ if(btn=='yes'){ Ext.Ajax.request({ url : 'loginOut.action', // 请求地址 // 成功时回调 success : function(response, options) { var responseArray = response.responseText; if (responseArray == 'success') { location.replace('login.html'); } else { Ext.Msg.alert('操作失败'); } } }); } }); }); Ext.Ajax.request({ url : 'getLoginName.action', // 请求地址 // 成功时回调 success : function(response, options) { var responseArray = response.responseText; var tem = responseArray.split(","); var tem1 = tem[0]; var tem2 = tem[1]; document.getElementById("user").innerHTML += tem1; var n = 9; var winTip = new Ext.Window({ resizable:false, layout: 'fit', shadow:false, width: 240, title: '温馨提示<font size="2" color="#FFFFFF">(点击查看详情)</font>', height: 160, hideBorders:true, //bodyStyle:'padding-top:25px; padding-left:10px;', //modal:true, pageX:1500, pageY:800, constrain:true, closeAction: 'hide', html:'<div id="renwu" style="cursor:pointer; height:120px; background: url(/dyzc/resources/images/tipBk.gif) no-repeat center scroll !important; line-height:100px;">欢迎:<font color="#537DB0">'+tem1+'</font>,你有<font color="red">'+tem2+'</font>条待办任务!</div>' }) winTip.show(); Ext.get('renwu').on({ 'click':function(t){ winTip.hide(); Ext.getCmp('content').update('<iframe src="/dyzc/task/tasklist.html" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>'); }, 'mouseover':function(t){Ext.get(t.target.id).addClass('tipClass')}, 'mouseout':function(t){Ext.get(t.target.id).removeClass('tipClass')}, scope:this }); } }); //NavOnClick开始 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> var content = Ext.getCmp('content'); //部门管理 Ext.get('Nav09001').on('click',function(){ content.update('<iframe src="/dyzc/queryDepartInfo.action" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>'); }); //部门管理QH
Ext.get('Nav09001Q').on('click',function(){ content.update('<iframe src="/dyzc/admin/depart/listqh.html" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>'); }); //用户管理 Ext.get('Nav09002').on('click',function(){ content.update('<iframe src="/dyzc/queryUserInfo.action" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>'); }); Ext.getCmp('nav001').collapse(); Ext.getCmp('nav002').collapse(); Ext.getCmp('nav003').collapse(); Ext.getCmp('nav004').collapse(); Ext.getCmp('nav005').collapse(); Ext.getCmp('nav006').collapse(); Ext.getCmp('nav007').collapse(); Ext.getCmp('nav008').collapse(); Ext.getCmp('nav009').collapse(); }); |
|