index.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!--#include file="/inc/header.html"-->
  2. <script type="text/javascript">
  3. window.renderHeader = function(e) {
  4. var template = "{{#childenList}}<li class=\"bif-nav-item\" data-type=\"{{moduleType}}\">{{moduleName}}</li>{{/childenList}}";
  5. var views = Mustache.render(template, e);
  6. views = '<li class="bif-nav-item" data-type="0">粮情检测</li><li class="bif-nav-item" data-type="1">气体检测</li><li class="bif-nav-item" data-type="2">气象监测</li><li class="bif-nav-item" data-type="3">作业管理</li>';
  7. $("#bif-nav-ul").html(views);
  8. $(".tree-breadcrumb #nav-item-a").html($("#bif-nav-ul li:first-child").html());
  9. $("#bif-nav-ul li:first-child").addClass("active");
  10. intelligentControl.equipmentDeviceTree(e.childenList);
  11. };
  12. $(function() {
  13. var modules = JSON.parse(window.sessionStorage.getItem("modules"));
  14. if(window.treemap) {
  15. renderHeader(window.treemap[10]); //器材设备管理ID 10
  16. } else if(modules) {
  17. renderHeader(modules.treemap[10]);
  18. }
  19. })
  20. var getGrainData = {};
  21. $.ajax({
  22. type: "get",
  23. dataType: 'json',
  24. async: false,
  25. url: config.baseUrl + config.organization.getAllGrainList,
  26. success: function(e) {
  27. getGrainData = e.data.data;
  28. },
  29. error: function(e) {
  30. console.log(e);
  31. }
  32. });
  33. </script>
  34. <div class="con-wrap">
  35. <div class="tree-breadcrumb">
  36. <span class="nav-prov">首页</span>&gt;
  37. <span class="nav-prov"><a href="/pages/intelligentControl/index.html">智能控制</a></span>&gt;
  38. <span class="nav-item"><a href="javascript:;" id="nav-item-a"></a></span>
  39. </div>
  40. <div class="bif-nav">
  41. <ul id="bif-nav-ul">
  42. </ul>
  43. </div>
  44. <div id="con-main">
  45. <div id="con-map" class="main3">
  46. </div>
  47. </div>
  48. </div>
  49. <style>
  50. #con-map {
  51. height: 572px;
  52. min-height: 400px;
  53. }
  54. #con-main {
  55. min-height: 555px;
  56. }
  57. .bif-nav-item {
  58. width: 150px;
  59. text-align: center;
  60. }
  61. </style>
  62. <script type="text/javascript" src="/src/intelligentControl/index.js"></script>
  63. </body>
  64. </html>