agent.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>远程诊断系统-后台管理-中世康恺</title>
  5. {include file="../application/manage/view/commons/headers.html" }
  6. <script >
  7. // 编辑窗口
  8. var $superWin;
  9. var $userWin;
  10. var superWinWidth=$(window).width()*0.98;
  11. var superWinHeight=$(window).height()-35;
  12. $(function(){
  13. $superWin = $('#super-window').window({
  14. title: '查看',
  15. width: superWinWidth,height: superWinHeight,
  16. left: ($(window).width() -superWinWidth ) /2 ,
  17. top: ($(window).height() -superWinHeight ) /2 ,
  18. shadow: true,modal: true,
  19. iconCls: 'icon-edit',closed: true,resizable:true,
  20. minimizable: false,maximizable: true,collapsible: false
  21. });
  22. $userWin = $('#super-uwindow').window({
  23. title: '个人信息',
  24. width: 500,height: 350,
  25. left: ($(window).width() -500 ) /2 ,
  26. top: ($(window).height() -350 ) /2 ,
  27. shadow: true,modal: true,
  28. iconCls: 'icon-edit',closed: true,resizable:false,
  29. minimizable: false,maximizable: false,collapsible: false
  30. });
  31. });
  32. $(window).resize(function() {
  33. superWinWidth=$(window).width()*0.98;
  34. $('#super-window').window('resize',{
  35. width: editWinWidth,height: editWinHeight
  36. });
  37. });
  38. // 打开超级窗口
  39. function openSupperWin(title,targetUrl){
  40. $superWin.window({"title":title});
  41. $superWin.window('open');
  42. $('#superFrame').attr('src',targetUrl);
  43. }
  44. $(function(){
  45. var treeData=new Array();
  46. treeData.push({"id":"1","text":"第一个菜单"});
  47. var msgChildTreeData=new Array();
  48. msgChildTreeData.push({"id":"sys_menu","text":"菜单管理","url":"/manage/menu/index","target":"tabindex" });
  49. treeData.push({"id":"sys","text":"系统管理","children":msgChildTreeData});
  50. $('#menutree').tree({
  51. url:"/manage/index/menudata",
  52. onClick:function(menuEl){
  53. if(menuEl.href!=null){
  54. open_panel(menuEl.text,menuEl.href);
  55. }
  56. }
  57. });
  58. });
  59. // 打开一个Tab
  60. function open_panel(tit, url) {
  61. //否则添加或选择到相应tab
  62. if ($('#mainTabs').tabs('exists', tit)) { //如果已存在则选择
  63. $('#mainTabs').tabs('select', tit);
  64. } else {
  65. var url_content = '<iframe id="" width="100%" height="100%" src="' + url + '" frameborder="0" allowtransparency="true" scrolling="no"></iframe>';
  66. var mytab=$('#mainTabs').tabs('add', {
  67. title: tit,
  68. content: url_content,
  69. closable: true,
  70. tools: [{
  71. //添加刷新图标
  72. iconCls: 'icon-mini-refresh',
  73. handler: function() {
  74. var cur_tab = $('#mainTabs').tabs('getSelected');
  75. $('#mainTabs').tabs('update', {
  76. tab: cur_tab, options: { content: url_content }
  77. });
  78. }
  79. }]
  80. });
  81. }
  82. }
  83. function logout(){
  84. $.ajax({
  85. url:"/manage/login/logout",
  86. data:"t="+new Date(),
  87. success:function(rs){
  88. if(rs=="ok"){
  89. document.location="/manage/login/index";
  90. }
  91. },error:function(e,e1,e2){
  92. alert(e2);
  93. }
  94. });
  95. }
  96. // 保存信息
  97. function save(){
  98. var data=$("#myform").serialize();
  99. $.ajax({
  100. url:"/manage/index/saveUserInfo",
  101. data:data,type:"get",
  102. success:function(rs){
  103. if(rs=="ok"){
  104. alert("保存成功!");
  105. }else{
  106. alert("保存失败!");
  107. }
  108. },error:function(e,e1,e2){
  109. alert(e2);
  110. }
  111. });
  112. }
  113. </script>
  114. </head>
  115. <body class="easyui-layout" >
  116. <div data-options="region:'north',split:false,border:false" style="height: 50px; overflow: hidden;" >
  117. <div id="topbar" class="title" style=' background-position:100px 0px;width:100%;height:100%;'>
  118. <div id="topbar-logon" class="right" style="float:right; padding-right:20px;height:50px;margin-top: 10px;">
  119. <a data-options="plain:'true',iconCls:'icon-man' " id="logout" href="#" onclick="$userWin.window('open')" class="easyui-linkbutton" >{$manager["username"]}</a>
  120. <a data-options="plain:'true',iconCls:'icon-remove' " id="logout" href="#" onclick="logout()" class="easyui-linkbutton" >注销</a>
  121. <a data-options="iconCls:'icon-help',menu:'#topbar-menu'" class="easyui-menubutton" >管理</a>
  122. <div id="topbar-menu" style="width: 150px;">
  123. <div onclick="$userWin.window('open')" >修改个人信息</div>
  124. <div class="menu-sep"></div>
  125. <div data-options="iconCls:'icon-help'" onclick="showAbout()">关于</div>
  126. </div>
  127. </div>
  128. <div id="topbar-info" class="left" style="line-height: 50px;width:450px;height: 50px;" >
  129. <img src="/static/images/manage/logo.png" height="45" style="float: left;margin: 2px 0 0 2px;" />
  130. <div style="width: 250px;height: 40px;line-height:40px ;margin: 5px;font-size: 22px;float: left;color: #333;" >(远程诊断系统)</div>
  131. </div>
  132. </div>
  133. </div>
  134. <div data-options="region:'south',split:false,border:true" style="height: 25px;text-align: center;line-height: 25px;" ></div>
  135. <!--
  136. <div data-options="region:'east',split:true" title="East" style="width:100px;"></div>
  137. -->
  138. <div title="功能导航" id="menu" data-options="region:'west',split:false,border:true,icon:'icon-forward'" style="height:100%;width: 180px; overflow: auto;" >
  139. <ul id="menutree" style="padding: 0px; margin: 0px;height:97%;"></ul>
  140. </div>
  141. <div data-options="region:'center',split:false,border:false" >
  142. <div id="mainTabs" data-options="fit:true,border:false" class="easyui-tabs" >
  143. <div title="欢迎使用" style="overflow: hidden;">
  144. <iframe id="tabindex" name="tabindex" src="/manage/index/welcome" style="width: 100%; height: 100%; border: 0;" scrolling="no" ></iframe>
  145. </div>
  146. </div>
  147. </div>
  148. <div id="super-window" class="easyui-window" style="overflow: hidden" ><iframe src="about:blank" id="superFrame" style="width:100%;height:100%" frameborder="0" scrolling="yes" ></iframe></div>
  149. <div id="super-uwindow" class="easyui-window" style="overflow: hidden;display: none" >
  150. <form name="myform" id="myform" action="" method="get" >
  151. <div style="width: 250px;margin:25px 0 0 120px;" >用户名:<input name="username" class="easyui-textbox" id="username" readonly="true" style="width:200px;" value="{$manager.username}" /> </div>
  152. <div style="width: 250px;margin:10px 0 0 120px;" >原密码:<input name="opwd" id="opwd" class="easyui-textbox" type="password" style="width:200px;" value="" /> </div>
  153. <div style="width: 250px;margin:10px 0 0 120px;" >新密码:<input name="upwd" id="upwd" class="easyui-textbox" type="password" style="width:200px;" value="" /> </div>
  154. <div style="width: 250px;margin:10px 0 0 120px;" >手机号:<input name="phone" id="phone" class="easyui-textbox" type="text" style="width:200px;" value="{$manager.phone}" /> </div>
  155. <div style="width: 250px;margin:10px 0 0 120px;" >电子邮:<input name="email" id="email" class="easyui-textbox" type="text" style="width:200px;" value="{$manager.email}" /> </div>
  156. <div style="width: 250px;margin:15px 0 0 168px;" >
  157. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="save()">保存</a>&nbsp;
  158. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="$userWin.window('close')">关闭</a>
  159. </div>
  160. </form>
  161. </div>
  162. <script type="text/javascript">
  163. $(function(){
  164. $('#main_layout').layout();
  165. setHeight();
  166. });
  167. function setHeight(){
  168. var c = $('#main_layout');
  169. var p = c.layout('panel','center'); // get the center panel
  170. var oldHeight = p.panel('panel').outerHeight();
  171. p.panel('resize', {height:'auto'});
  172. var newHeight = p.panel('panel').outerHeight();
  173. alert(newHeight);
  174. c.layout('resize',{
  175. height: (c.height() + newHeight - oldHeight)
  176. });
  177. }
  178. </script>
  179. </body>
  180. </html>