reportAlgorithm.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>算法管理</title>
  6. <script src="../../js/min-loader-next.js"></script>
  7. </head>
  8. <body class="content">
  9. <div class="order-body" style = "width : 20%; height : 700px; display: inline-table;">
  10. <div id="reportTypeTreeDiv" class="demo-tree-more" style = "margin : 35px"></div>
  11. </div>
  12. <div class="order-body" style="width : 75%; height : 700px; display: inline-table;">
  13. <blockquote class="layui-elem-quote" style = "margin : 20px;width: 90%;height: 50px;">数据算法</blockquote>
  14. <p id = "utilName" style = "margin-left : 20px;">工具表:<a id = "utilName"></a></p>
  15. <div style = "width: 100%; margin : 20px; text-align:left;width: 90%;" class = "layui-upload-drag">
  16. <p>数据算法如下:</p>
  17. <div id = "content"></div>
  18. </div>
  19. </div>
  20. <script>
  21. var pageId = "210003";
  22. // 报告生成事查看算法
  23. var reportTypeId = getQueryString("reportTypeId");
  24. if (!isEmpty(reportTypeId)) {
  25. contentQuery(reportTypeId);
  26. }
  27. layui.use(['tree', 'util'], function(){
  28. var tree = layui.tree
  29. ,layer = layui.layer
  30. ,util = layui.util;
  31. $.request({
  32. action : 'AlgorithmManageAction/reportTypeTree',
  33. data : {
  34. },
  35. success : function(data) {
  36. tree.render({
  37. elem: '#reportTypeTreeDiv'
  38. ,data: data.data
  39. ,accordion: true
  40. ,click: function(obj){
  41. if (!obj.data.children) {
  42. contentQuery(obj.data.id)
  43. }
  44. }
  45. });
  46. },
  47. error : function(data2) {
  48. $.ErrorAlert(data2.MINErrorMessage);
  49. }
  50. });
  51. })
  52. function contentQuery(reportTypeId) {
  53. $.request({
  54. action : 'AlgorithmManageAction/algorithmQuery',
  55. data : {
  56. reportTypeId : reportTypeId
  57. },
  58. success : function(data) {
  59. if (isEmpty(data.utilName)) {
  60. $("#utilName").html("");
  61. } else {
  62. $("#utilName").html(data.utilName);
  63. }
  64. if (isEmpty(data.content)) {
  65. $("#content").html("");
  66. } else {
  67. $("#content").html(data.content);
  68. }
  69. },
  70. error : function(data2) {
  71. $.ErrorAlert(data2.MINErrorMessage);
  72. }
  73. });
  74. }
  75. </script>
  76. </body>
  77. </html>