AttentionMain.jsp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. String path = request.getContextPath();
  5. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6. %>
  7. <!DOCTYPE html>
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  12. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  13. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  14. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  15. <script type="text/javascript" src="<%=basePath %>jsps/oa/attention/AttentionManage.js"></script>
  16. <script type="text/javascript" src="<%=basePath %>resource/ux/RowExpander.js"></script>
  17. <script type="text/javascript" src="<%=basePath %>app/util/BaseUtil.js"></script>
  18. <script type="text/javascript" src="<%=basePath %>resource/ux/grid/GridHeaderFilters.js"></script>
  19. <script type="text/javascript">
  20. Ext.Loader.setConfig({
  21. enabled: true
  22. });//开启动态加载
  23. var caller = 'AttentionManage';
  24. var condition='1=1 ';
  25. var page = 1;
  26. var value = 0;
  27. var total = 0;
  28. var dataCount = 0;//结果总数
  29. var msg = '';
  30. var height = window.innerHeight;
  31. var pageSize = parseInt(height*0.7/21);
  32. var formCondition = '';
  33. var emid=<%=session.getAttribute("em_id")%>;
  34. var gridCondition = '1=1';
  35. Ext.application({
  36. name: 'erp',//为应用程序起一个名字,相当于命名空间
  37. appFolder: basePath+'app',//app文件夹所在路径
  38. controllers: [//声明所用到的控制层
  39. 'oa.attention.AttentionMain'
  40. ],
  41. launch: function() {
  42. Ext.create('erp.view.oa.attention.AttentionMain');//创建视图
  43. }
  44. });
  45. function openUrl(value, keyField, url, title) {
  46. url = url + '?attentedemid=' + value;
  47. var panel = Ext.getCmp(keyField + "=" + value);
  48. var main = parent.Ext.getCmp("content-panel");
  49. if (!panel) {
  50. if (title.toString().length > 4) {
  51. title = title.toString().substring(title.toString().length - 4);
  52. }
  53. panel = {
  54. title : title,
  55. tag : 'iframe',
  56. tabConfig : {
  57. tooltip : title + '(' + keyField + "=" + value + ')'
  58. },
  59. frame : true,
  60. border : false,
  61. layout : 'fit',
  62. iconCls : 'x-tree-icon-tab-tab',
  63. html : '<iframe id="iframe_maindetail_'+ keyField+ "_"+ value+ '" src="'+ basePath+ url+ '" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>',
  64. closable : true,
  65. listeners : {
  66. close : function() {
  67. main.setActiveTab(main.getActiveTab().id);
  68. }
  69. }
  70. };
  71. openTab(panel, keyField + "=" + value);
  72. } else {
  73. main.setActiveTab(panel);
  74. }
  75. }
  76. function openTab(panel, id) {
  77. var o = (typeof panel == "string" ? panel : id || panel.id);
  78. var main = parent.Ext.getCmp("content-panel");
  79. /*var tab = main.getComponent(o); */
  80. if (!main) {
  81. main = parent.parent.Ext.getCmp("content-panel");
  82. }
  83. var tab = main.getComponent(o);
  84. if (tab) {
  85. main.setActiveTab(tab);
  86. } else if (typeof panel != "string") {
  87. panel.id = o;
  88. var p = main.add(panel);
  89. main.setActiveTab(p);
  90. }
  91. }
  92. </script>
  93. </head>
  94. <body >
  95. <div id='mygrid'></div>
  96. <div id='employeedata'></div>
  97. <div id='details'></div>
  98. </body>
  99. </html>