analyse.jsp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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">
  16. Ext.Loader.setConfig({
  17. enabled: true
  18. });//开启动态加载
  19. var store=null;
  20. var columns=null;
  21. var fields=null;
  22. var data=null;
  23. var caller='';
  24. Ext.Ajax.request({//拿到grid的columns
  25. url : basePath + 'plm/resource/Analysegrid.action',
  26. async:false,
  27. params:{
  28. condition:""
  29. },
  30. method : 'post',
  31. callback : function(options,success,response){
  32. var res = new Ext.decode(response.responseText);
  33. if(res.success){
  34. fields=res.fields;
  35. data=res.data
  36. columns=res.columns;
  37. store= Ext.create('Ext.data.Store', {
  38. fields: res.fields,
  39. data:data
  40. });
  41. }else if(res.exceptionInfo){
  42. showError(res.exceptionInfo);return;
  43. }
  44. }
  45. })
  46. Ext.application({
  47. name: 'erp',//为应用程序起一个名字,相当于命名空间
  48. appFolder: basePath+'app',//app文件夹所在路径
  49. controllers: [//声明所用到的控制层
  50. 'plm.resource.Analyse'
  51. ],
  52. launch: function() {
  53. Ext.create('erp.view.plm.resource.Analyse');//创建视图
  54. }
  55. });
  56. </script>
  57. </head>
  58. <body >
  59. </body>
  60. </html>