AttentionManage.jsp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 %>app/util/BaseUtil.js"></script>
  17. <script type="text/javascript">
  18. Ext.Loader.setConfig({
  19. enabled: true
  20. });//开启动态加载
  21. var caller = 'AttentionManage';
  22. var condition='1=1 ';
  23. var formCondition = '';
  24. var emid=<%=session.getAttribute("em_id")%>;
  25. var gridCondition = '1=1';
  26. Ext.application({
  27. name: 'erp',//为应用程序起一个名字,相当于命名空间
  28. appFolder: basePath+'app',//app文件夹所在路径
  29. controllers: [//声明所用到的控制层
  30. 'oa.attention.AttentionManage'
  31. ],
  32. launch: function() {
  33. Ext.create('erp.view.oa.attention.AttentionManage');//创建视图
  34. }
  35. });
  36. function openUrl(value, keyField, url, title) {
  37. url = url + '?attentedemid=' + value;
  38. var panel = Ext.getCmp(keyField + "=" + value);
  39. var main = parent.Ext.getCmp("content-panel");
  40. if (!panel) {
  41. if (title.toString().length > 4) {
  42. title = title.toString().substring(title.toString().length - 4);
  43. }
  44. panel = {
  45. title : title,
  46. tag : 'iframe',
  47. tabConfig : {
  48. tooltip : title + '(' + keyField + "=" + value + ')'
  49. },
  50. frame : true,
  51. border : false,
  52. layout : 'fit',
  53. iconCls : 'x-tree-icon-tab-tab',
  54. html : '<iframe id="iframe_maindetail_'+ keyField+ "_"+ value+ '" src="'+ basePath+ url+ '" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>',
  55. closable : true,
  56. listeners : {
  57. close : function() {
  58. main.setActiveTab(main.getActiveTab().id);
  59. }
  60. }
  61. };
  62. openTab(panel, keyField + "=" + value);
  63. } else {
  64. main.setActiveTab(panel);
  65. }
  66. }
  67. function openTab(panel, id) {
  68. var o = (typeof panel == "string" ? panel : id || panel.id);
  69. var main = parent.Ext.getCmp("content-panel");
  70. /*var tab = main.getComponent(o); */
  71. if (!main) {
  72. main = parent.parent.Ext.getCmp("content-panel");
  73. }
  74. var tab = main.getComponent(o);
  75. if (tab) {
  76. main.setActiveTab(tab);
  77. } else if (typeof panel != "string") {
  78. panel.id = o;
  79. var p = main.add(panel);
  80. main.setActiveTab(p);
  81. }
  82. }
  83. </script>
  84. </head>
  85. <body >
  86. </body>
  87. </html>