component-list.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?php
  2. session_start();
  3. if (!isset($_SESSION['loggedin'])) {
  4. header('Location: pages-signin.html');
  5. exit;
  6. }
  7. ?>
  8. <!doctype html>
  9. <html class="fixed">
  10. <head>
  11. <?php include("bim-support-header.html"); ?>
  12. <script src="./script/js/global.js"></script>
  13. <script type="application/javascript">
  14. var rvtName = [];
  15. var categoryTable = [];
  16. var year = [];
  17. var type = "";
  18. var userName = '<?php echo $_SESSION['name']; ?>';
  19. var searchURL = window.location.search;
  20. searchURL = searchURL.substring(1, searchURL.length);
  21. type = searchURL.split("&")[0].split("=")[1];
  22. if (type === undefined) {
  23. window.location.href = "?type=CA";
  24. type = 'CA';
  25. }
  26. var $grid;
  27. pageHeader = "元件庫";
  28. </script>
  29. </head>
  30. <body>
  31. <canvas id="c"></canvas>
  32. <section class="body">
  33. <!-- start: header -->
  34. <header-menu></header-menu>
  35. <!-- end: header -->
  36. <div class="inner-wrapper">
  37. <!-- start: sidebar -->
  38. <side-bar></side-bar>
  39. <!-- end: sidebar -->
  40. <section role="main" class="content-body">
  41. <header class="page-header">
  42. <h2>{{pageHeader}}</h2>
  43. </header>
  44. <!-- start: page -->
  45. <section class="content-with-menu content-with-menu-has-toolbar media-gallery">
  46. <div class="content-with-menu-container">
  47. <inner-menu>
  48. <template v-slot:inner-upload>
  49. <upload-component></upload-component>
  50. <hr class="separator" />
  51. </template>
  52. <template v-slot:inner-equipment>
  53. <equipment-list></equipment-list>
  54. </template>
  55. </inner-menu>
  56. <div class="inner-body mg-main">
  57. <div class="inner-toolbar">
  58. <ul>
  59. <search-bar></search-bar>
  60. <filter-bar></filter-bar>
  61. </ul>
  62. </div>
  63. <filter-content></filter-content>
  64. <div class="row mg-files" data-sort-destination data-sort-id="media-gallery" id="content">
  65. </div>
  66. </div>
  67. </div>
  68. </section>
  69. <!-- end: page -->
  70. </section>
  71. </div>
  72. </section>
  73. <script>
  74. /*Vue */
  75. vm.mount('.body');
  76. </script>
  77. <?php include("bim-support-body.html"); ?>
  78. <script type="application/javascript">
  79. $(function() {
  80. $.ajax({
  81. url: "./script/php/equipment_group.php",
  82. type: "GET",
  83. data: {
  84. type: type
  85. },
  86. contentType: "application/json",
  87. dataType: "json"
  88. }).done(function(data) {
  89. year = data['year'];
  90. rvtName = data['rvtName'];
  91. categoryTable = data['categoryTable'];
  92. for (var i = 0; i < data["categoryList"].length; i++) {
  93. $("#filters").append('<li><a class="button" data-filter=".' + i + '">' + data['categoryList'][i] + '</a></li>');
  94. }
  95. initThreeJS();
  96. $grid = $("#content").isotope({
  97. itemSelector: ".isotope-item",
  98. layoutMode: 'fitRows'
  99. })
  100. setTimeout(() => {$grid.isotope()}, 100);
  101. }).error(function(error) {
  102. console.log(error);
  103. });
  104. $.ajax({
  105. url: "./script/php/equipment_revitVersion.php",
  106. type: "GET",
  107. data: {
  108. type: type
  109. },
  110. contentType: "application/json",
  111. dataType: "json"
  112. }).done(function(data) {
  113. for (var i = 0; i < data.length; i++) {
  114. $("#revitVersion").append('<label><input type="checkbox" value=".' + data[i] + '" /> ' + data[i] + '</label> ');
  115. }
  116. }).error(function(error) {
  117. console.log(error);
  118. });
  119. });
  120. </script>
  121. <script>
  122. //$grid.isotope({});
  123. </script>
  124. <script src="script/js/3Dpic.js" type="module"></script>
  125. </body>
  126. </html>