Statistics.cshtml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. @{
  2. ViewBag.Title = "Statistics";
  3. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  4. }
  5. <div class="easyui-layout" data-options="fit:true,border:false">
  6. <div data-options="region:'west',title:'报表名称',split:true" style="width: 200px">
  7. <ul id="tt"></ul>
  8. </div>
  9. <div data-options="region:'center',border:false">
  10. <div id="tab" class="easyui-tabs" fit="true">
  11. </div>
  12. </div>
  13. </div>
  14. <script>
  15. var channel = ""
  16. $(function () {
  17. $('#tt').tree({
  18. url: "/Problem/GetList",
  19. loadFilter: function (data) {
  20. if (data.d) {
  21. return data.d;
  22. } else {
  23. channel = data[0].渠道id
  24. return data;
  25. }
  26. },
  27. onClick: function (node) {
  28. if (node.url != null) {
  29. addTab(node.text, node.url, node.file)
  30. }
  31. }
  32. });
  33. })
  34. function addTab(title, url, fileName) {
  35. if ($('#tab').tabs('exists', title)) {
  36. $('#tab').tabs('select', title);
  37. } else {
  38. var realURL = url
  39. if (fileName != "") {
  40. var realURL = "/WebForms/WebReportView.aspx?reportName=" + fileName + "&channelid=" + channel
  41. }
  42. var content = '<iframe scrolling="auto" frameborder="0" src="' + realURL +
  43. '" style="width:100%;height:98%;"></iframe>';
  44. $('#tab').tabs('add', {
  45. title: title,
  46. content: content,
  47. closable: true
  48. })
  49. }
  50. }
  51. </script>