index.php 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043
  1. <?php
  2. include($_SERVER['DOCUMENT_ROOT']."/Authorization/script/php/permission/check_right.php");
  3. ?>
  4. <!doctype html>
  5. <html class="fixed">
  6. <head>
  7. <!-- Basic -->
  8. <meta charset="UTF-8">
  9. <title>設計資料庫查詢系統</title>
  10. <meta name="keywords" content="HTML5 Admin Template" />
  11. <meta name="description" content="JSOFT Admin - Responsive HTML5 Template">
  12. <meta name="author" content="JSOFT.net">
  13. <script src="./assets/vendor/jquery/jquery.js"></script>
  14. <script src="/Common/script/js/user-image.js"></script>
  15. <script src="./assets/vendor/jquery-hoverIntent/jquery.hoverIntent.js"></script>
  16. <!-- Mobile Metas -->
  17. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  18. <!-- Web Fonts -->
  19. <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">
  20. <!-- jstree CSS -->
  21. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.4/themes/default/style.min.css">
  22. <!-- Vendor CSS -->
  23. <link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.css" />
  24. <link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.css" />
  25. <link rel="stylesheet" href="assets/vendor/magnific-popup/magnific-popup.css" />
  26. <link rel="stylesheet" href="assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
  27. <link rel="stylesheet" href="assets/vendor/pnotify/pnotify.custom.css" />
  28. <!-- Specific Page Vendor CSS -->
  29. <link rel="stylesheet" href="assets/vendor/jquery-ui/css/ui-lightness/jquery-ui-1.10.4.custom.css" />
  30. <link rel="stylesheet" href="assets/vendor/bootstrap-multiselect/bootstrap-multiselect.css" />
  31. <link rel="stylesheet" href="assets/vendor/morris/morris.css" />
  32. <link rel="stylesheet" href="assets/vendor/bootstrap-fileupload/bootstrap-fileupload.min.css" />
  33. <!-- Theme CSS -->
  34. <link rel="stylesheet" href="assets/stylesheets/theme.css" />
  35. <!-- Skin CSS -->
  36. <link rel="stylesheet" href="assets/stylesheets/skins/default.css" />
  37. <!-- Theme Custom CSS -->
  38. <link rel="stylesheet" href="assets/stylesheets/theme-custom.css">
  39. <!-- Head Libs -->
  40. <script src="assets/vendor/modernizr/modernizr.js"></script>
  41. <!-- chart.js -->
  42. <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  43. <!-- DataTable -->
  44. <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.25/css/jquery.dataTables.css">
  45. <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.js"></script>
  46. <!-- Icon -->
  47. <link rel="shortcut icon" href="assets/images/favicon.ico" />
  48. <link href="https://js.arcgis.com/4.21/esri/themes/light/main.css" rel="stylesheet">
  49. <link href="./CustomCSS/main.css" rel="stylesheet">
  50. <script src="./script/js/bootstrap.js"></script>
  51. <script src="./script/js/pdfobject.min.js"></script>
  52. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.4/jstree.min.js"></script>
  53. <script src="./script/js/jstreeAJAX.js"></script>
  54. <script src="https://js.arcgis.com/4.21/"></script>
  55. <style>
  56. html.no-overflowscrolling .nano > .nano-content {
  57. overflow: auto;
  58. }
  59. .page-header>ul {
  60. list-style: none;
  61. padding: 0;
  62. margin: 0;
  63. }
  64. .page-header>ul>li {
  65. display: inline-block;
  66. font-size: 25px;
  67. color: #FFFFFF;
  68. }
  69. .page-header>ul>li.right {
  70. float: right;
  71. padding-right: 10px;
  72. }
  73. .input-search {
  74. margin-top: 8px;
  75. }
  76. .page-header li>label {
  77. margin-top: 13px;
  78. border-bottom: 4px solid #0088cc;
  79. height: 41px;
  80. }
  81. .sidebar-left {
  82. box-shadow: 0 0 0;
  83. }
  84. .jstree-default .jstree-icon {
  85. color: #ffe693;
  86. }
  87. .jqsfield {
  88. color: white;
  89. font: 10px arial, san serif;
  90. text-align: left;
  91. }
  92. .jstree-anchor {
  93. width: 250px;
  94. text-overflow: ellipsis;
  95. overflow: hidden;
  96. white-space: nowrap;
  97. }
  98. .jstree-anchor,
  99. .jstree-anchor:link,
  100. .jstree-anchor:visited,
  101. .jstree-anchor:hover,
  102. .jstree-anchor:active {
  103. color: #fff;
  104. }
  105. td,
  106. th {
  107. text-align: center;
  108. }
  109. th {
  110. width: 30%;
  111. }
  112. .nav-main {
  113. padding: 15px;
  114. }
  115. .node-hidden {
  116. display: none;
  117. }
  118. html.fixed .page-header {
  119. left: 349px;
  120. }
  121. html.fixed .content-body {
  122. margin-left: 350px;
  123. }
  124. .sidebar-left {
  125. width: 350px;
  126. }
  127. #datatable-ajax tr:hover {
  128. background-color: #e8e8e8;
  129. }
  130. #viewDiv {
  131. height: 100%;
  132. width: 100%;
  133. }
  134. #zoom {
  135. margin-bottom: 5px;
  136. }
  137. #actions {
  138. padding: 5px;
  139. }
  140. .container {
  141. height: 50%;
  142. width: 100%;
  143. }
  144. #createSlideDiv {
  145. background-color: white;
  146. opacity: 0.9;
  147. color: black;
  148. padding: 6px;
  149. }
  150. #slidesDiv {
  151. background-color: white;
  152. opacity: 0.9;
  153. color: black;
  154. padding: 10px;
  155. visibility: hidden;
  156. bottom: 20px;
  157. overflow-y: auto;
  158. text-align: center;
  159. height: 260px;
  160. }
  161. #slidesDiv .slide {
  162. /* Show cursor as pointer when on a slide */
  163. cursor: pointer;
  164. margin-bottom: 6px;
  165. }
  166. #slidesDiv .slide .title {
  167. /* Center the title text */
  168. text-align: center;
  169. }
  170. /* Draw active slide with a nice border around the thumbnail */
  171. #slidesDiv .slide.active img {
  172. box-shadow: 0px 0px 12px black;
  173. border-style: solid;
  174. border-width: thin;
  175. border-color: black;
  176. }
  177. .pdfobject-container {
  178. height: 730px;
  179. }
  180. #topbar {
  181. background: #fff;
  182. padding: 10px;
  183. }
  184. #datatable-ajax_length {
  185. width: 100%;
  186. }
  187. .multiselect {
  188. width: 200px;
  189. }
  190. .selectBox {
  191. position: relative;
  192. width: 200px;
  193. }
  194. .selectBox select {
  195. width: 100%;
  196. font-weight: bold;
  197. }
  198. .overSelect {
  199. position: absolute;
  200. left: 0;
  201. right: 0;
  202. top: 0;
  203. bottom: 0;
  204. }
  205. .checkboxes {
  206. display: none;
  207. border: 1px #dadada solid;
  208. background-color: white;
  209. z-index: 2;
  210. position: absolute;
  211. width: 200px;
  212. display: none;
  213. }
  214. .checkboxes label {
  215. display: block;
  216. padding-left: 10px;
  217. padding-right: 10px;
  218. padding-top: 5px;
  219. padding-bottom: 5px;
  220. }
  221. .checkboxes label:hover {
  222. background-color: #1e90ff;
  223. color: #ffffff;
  224. }
  225. .multiselect {
  226. display: inline-block;
  227. }
  228. #filter-slide{
  229. width: 100%;
  230. }
  231. </style>
  232. <script>
  233. $(document).ready(function() {
  234. getToken();
  235. });
  236. var token;
  237. function getToken() {
  238. var t;
  239. $.ajax({
  240. url: "./scripts/PHP/access_token.php",
  241. type: "GET",
  242. async: false,
  243. }).done(function(data) {
  244. token = data;
  245. //data = JSON.parse(data);
  246. }).error(function() {
  247. });
  248. }
  249. require([
  250. "esri/config",
  251. "esri/Map",
  252. "esri/WebScene",
  253. "esri/views/SceneView",
  254. "esri/core/urlUtils",
  255. "esri/identity/OAuthInfo",
  256. "esri/identity/IdentityManager",
  257. "esri/widgets/Legend",
  258. "esri/widgets/Home",
  259. "esri/widgets/Fullscreen",
  260. "esri/widgets/Slider",
  261. "esri/widgets/BasemapGallery",
  262. "esri/widgets/LayerList",
  263. "esri/layers/GroupLayer",
  264. "esri/layers/FeatureLayer",
  265. "esri/widgets/FeatureTable",
  266. "esri/tasks/support/Query",
  267. "esri/layers/SceneLayer",
  268. "esri/widgets/Zoom",
  269. "esri/widgets/Compass",
  270. "esri/widgets/NavigationToggle",
  271. "esri/widgets/Slice",
  272. "esri/widgets/Search",
  273. "esri/geometry/Point",
  274. "esri/geometry/Polyline",
  275. "esri/webscene/Slide",
  276. "esri/symbols/WebStyleSymbol",
  277. "esri/widgets/DirectLineMeasurement3D",
  278. "esri/widgets/AreaMeasurement3D",
  279. "esri/Graphic",
  280. "esri/widgets/Search/LocatorSearchSource",
  281. "esri/renderers/UniqueValueRenderer",
  282. "esri/geometry/geometryEngine",
  283. "esri/widgets/Expand",
  284. "esri/layers/GeoJSONLayer",
  285. "esri/PopupTemplate",
  286. "esri/renderers/Renderer",
  287. "esri/geometry/projection"
  288. ], (esriConfig, Map, WebScene, SceneView, urlUtils, OAuthInfo, esriId,
  289. Legend,
  290. Home,
  291. Fullscreen,
  292. Slider,
  293. BasemapGallery,
  294. LayerList,
  295. GroupLayer,
  296. FeatureLayer,
  297. FeatureTable,
  298. Query,
  299. SceneLayer,
  300. Zoom,
  301. Compass,
  302. NavigationToggle,
  303. Slice,
  304. Search,
  305. Point,
  306. Polyline,
  307. Slide,
  308. WebStyleSymbol,
  309. DirectLineMeasurement3D,
  310. AreaMeasurement3D,
  311. Graphic,
  312. LocatorSearchSource,
  313. UniqueValueRenderer,
  314. geometryEngine,
  315. Expand, GeoJsonLayer, PopupTemplate, Renderer, projection) => {
  316. esriConfig.apiKey = token;
  317. let activeWidget = null;
  318. const webscene = new WebScene({
  319. portalItem: {
  320. id: "dea6580d8d4547df9915a822fe7f2b9d"
  321. },
  322. opacity: .75,
  323. showAttribution: false,
  324. });
  325. var featureLayer = new FeatureLayer({
  326. url: "https://services3.arcgis.com/W6g8dmWX0ILAHcNd/arcgis/rest/services/%E5%B7%A5%E7%A8%8B%E8%A8%AD%E8%A8%88%E8%B3%87%E6%96%99%E5%BA%AB/FeatureServer",
  327. outFields: ["*"],
  328. //renderer: poleRenderer,
  329. title: "工程設計資料庫",
  330. elevationInfo: "on-the-ground",
  331. visible: true
  332. });
  333. webscene.add(featureLayer);
  334. const view = new SceneView({
  335. container: "viewDiv",
  336. map: webscene,
  337. popup: {
  338. defaultPopupTemplateEnabled: true,
  339. dockEnabled: true,
  340. dockOptions: {
  341. breakpoint: false,
  342. buttonEnabled: false,
  343. position: "bottom-right",
  344. }
  345. }
  346. });
  347. window.view = view;
  348. view.ui.empty("top-left");
  349. //view.ui.empty("manual");
  350. view.ui.add(
  351. new Expand({
  352. view: view,
  353. content: new BasemapGallery({
  354. view: view
  355. }),
  356. autoCollapse: true,
  357. group: "top-left"
  358. }),
  359. "top-left"
  360. );
  361. view.ui.add(
  362. new Expand({
  363. view: view,
  364. content: new Legend({
  365. view: view
  366. }),
  367. autoCollapse: true,
  368. group: "top-left"
  369. }),
  370. "top-left"
  371. );
  372. view.ui.add(
  373. new Home({
  374. view: view,
  375. group: "top-left"
  376. }),
  377. "top-left"
  378. );
  379. //新增量測工具
  380. view.ui.add("topbar", "bottom-right");
  381. document
  382. .getElementById("distanceButton")
  383. .addEventListener("click", (event) => {
  384. setActiveWidget(null);
  385. if (!event.target.classList.contains("active")) {
  386. setActiveWidget("distance");
  387. } else {
  388. setActiveButton(null);
  389. }
  390. });
  391. document
  392. .getElementById("areaButton")
  393. .addEventListener("click", (event) => {
  394. setActiveWidget(null);
  395. if (!event.target.classList.contains("active")) {
  396. setActiveWidget("area");
  397. } else {
  398. setActiveButton(null);
  399. }
  400. });
  401. document
  402. .getElementById("clear")
  403. .addEventListener("click", (event) => {
  404. setActiveWidget(null);
  405. setActiveButton(null);
  406. });
  407. function setActiveWidget(type) {
  408. switch (type) {
  409. case "distance":
  410. activeWidget = new DirectLineMeasurement3D({
  411. view: view
  412. });
  413. // skip the initial 'new measurement' button
  414. activeWidget.viewModel.start().catch((error) => {
  415. if (promiseUtils.isAbortError(error)) {
  416. return; // don't display abort errors
  417. }
  418. throw error; // throw other errors since they are of interest
  419. });
  420. view.ui.add(activeWidget, "bottom-left");
  421. setActiveButton(document.getElementById("distanceButton"));
  422. break;
  423. case "area":
  424. activeWidget = new AreaMeasurement3D({
  425. view: view
  426. });
  427. // skip the initial 'new measurement' button
  428. activeWidget.viewModel.start().catch((error) => {
  429. if (promiseUtils.isAbortError(error)) {
  430. return; // don't display abort errors
  431. }
  432. throw error; // throw other errors since they are of interest
  433. });
  434. view.ui.add(activeWidget, "bottom-left");
  435. setActiveButton(document.getElementById("areaButton"));
  436. break;
  437. case null:
  438. if (activeWidget) {
  439. view.ui.remove(activeWidget);
  440. activeWidget.destroy();
  441. activeWidget = null;
  442. }
  443. break;
  444. }
  445. }
  446. function setActiveButton(selectedButton) {
  447. // focus the view to activate keyboard shortcuts for sketching
  448. view.focus();
  449. const elements = document.getElementById("topbar").getElementsByClassName("active");
  450. for (let i = 0; i < elements.length; i++) {
  451. elements[i].classList.remove("active");
  452. }
  453. if (selectedButton) {
  454. selectedButton.classList.add("active");
  455. }
  456. }
  457. view.ui.add(
  458. new Fullscreen({
  459. view: view,
  460. group: "top-left"
  461. }),
  462. "top-right"
  463. );
  464. view.ui.add(
  465. new Zoom({
  466. view: view
  467. }),
  468. "top-right"
  469. );
  470. view.ui.add(
  471. new NavigationToggle({
  472. view: view
  473. }),
  474. "top-right"
  475. );
  476. view.ui.add(
  477. new Compass({
  478. view: view
  479. }),
  480. "top-right"
  481. );
  482. $("#measureExpendDiv .esri-widget--button").click(function() {
  483. if (pMeasureExpand.expanded) {
  484. activeMeasureWidget.viewModel.newMeasurement();
  485. } else {
  486. activeMeasureWidget.viewModel.clearMeasurement();
  487. }
  488. });
  489. function zoomToLayer(layer) {
  490. return layer.queryExtent().then((response) => {
  491. view.goTo({
  492. target: response.extent,
  493. tilt: 0,
  494. heading: 0,
  495. }).catch((error) => {
  496. console.error(error);
  497. });
  498. });
  499. }
  500. $('#treeAjaxHTML').on("select_node.jstree", function(e, data) {
  501. if (data.node.text.includes("-")) {
  502. project_id = data.node.text.split("-")[0];
  503. featureLayer.definitionExpression = "計畫編號 = " + project_id;
  504. zoomToLayer(featureLayer);
  505. }
  506. /*else{
  507. type = data.node.text;
  508. console.log(type);
  509. featureLayer.definitionExpression = "工程類別 = '"+ type + "'";
  510. zoomToLayer(featureLayer);
  511. }*/
  512. });
  513. view.when(function() {
  514. });
  515. });
  516. var db_table = {};
  517. $.ajax({
  518. url: "./script/php/get_db_table.php",
  519. type: "GET",
  520. async: false,
  521. contentType: "application/json",
  522. dataType: "json"
  523. }).done(function(data) {
  524. db_table = data;
  525. }).error(function(error) {
  526. console.log(error);
  527. });
  528. db_table["notes"] = merge_object_by_key(db_table["notes"], "project_id", "notes");
  529. var notes_button_list = [...new Set([].concat(...Object.values(db_table["notes"])))];
  530. var search_data = {
  531. "category": get_value_list_by_key(db_table["category"], null, -1, "category_id").toString().split(","),
  532. "project": get_value_list_by_key(db_table["project"], null, -1, "project_id"),
  533. "type": get_value_list_by_key(db_table["type"], null, -1, "type_id").toString().split(","),
  534. "notes": notes_button_list
  535. };
  536. var filter_base_data = search_data;
  537. function get_value_list_by_key(obj_list, key_search, target_value, key_save) {
  538. output_list = [];
  539. obj_list.forEach(element => {
  540. if (target_value != -1) {
  541. target_value.forEach(e => {
  542. if(e.toString() == element[key_search].toString()) {
  543. output_list.push(element[key_save]);
  544. }
  545. });
  546. } else {
  547. output_list.push(element[key_save]);
  548. }
  549. });
  550. output_list = [...new Set(output_list)];
  551. return output_list;
  552. }
  553. function merge_object_by_key(obj, key, value) {
  554. output_object = {};
  555. while (obj.length > 0) {
  556. pop_out = obj.pop();
  557. if (output_object[pop_out[key]] == undefined) {
  558. output_object[pop_out[key]] = [pop_out[value]];
  559. } else {
  560. output_object[pop_out[key]].push(pop_out[value]);
  561. }
  562. }
  563. return output_object
  564. }
  565. </script>
  566. </head>
  567. <body>
  568. <script type="application/javascript">
  569. var test;
  570. var i = 0;
  571. var download;
  572. var fileName;
  573. var folder;
  574. var software;
  575. var userName = 'maabim';
  576. jQuery(window).load(function() {
  577. var url_href = window.location.href;
  578. var url = new URL(url_href);
  579. var type = url.searchParams.get("type");
  580. var projectId = url.searchParams.get("projectId");
  581. if (projectId != null) {
  582. var projectNode = $(".jstree-anchor").filter(function() {
  583. return $(this).text().includes(projectId);
  584. });
  585. let nodeId = projectNode[0].attributes.id.value;
  586. $('#treeAjaxHTML').jstree("select_node", nodeId);
  587. $("#treeAjaxHTML").jstree("close_all");
  588. }
  589. });
  590. //var typeId = node[0].attributes.id.value;
  591. </script>
  592. <section class="body">
  593. <!-- start: header -->
  594. <header class="header">
  595. <div class="logo-container">
  596. <div class="banner-txt">設計資料庫查詢系統</div>
  597. <div class="visible-xs toggle-sidebar-left" data-toggle-class="sidebar-left-opened" data-target="html" data-fire-event="sidebar-left-opened">
  598. <i class="fa fa-bars" aria-label="Toggle sidebar"></i>
  599. </div>
  600. </div>
  601. <!-- start: search & user box -->
  602. <div class="header-right">
  603. <span class="separator"></span>
  604. <ul class="notifications">
  605. <li>
  606. <a id="upload-btn" href="./Upload.php" class="notification-icon" data-toggle="tooltip" title="匯入工具" data-placement="bottom">
  607. <i class="fa fa-upload"></i>
  608. </a>
  609. <a href="/Front-Page/home.php" class="notification-icon" data-toggle="tooltip" title="綜合登入入口" data-placement="bottom">
  610. <i class="fa fa-home"></i>
  611. </a>
  612. </li>
  613. </ul>
  614. <span class="separator"></span>
  615. <div id="userbox" class="userbox">
  616. <a href="#" data-toggle="dropdown">
  617. <figure class="profile-picture"> <img src="assets/images/!logged-user.jpg" alt="Joseph Doe" class="img-circle" data-lock-picture="assets/images/!logged-user.jpg" /> </figure>
  618. <div class="profile-info" data-lock-name="John Doe" data-lock-email="johndoe@JSOFT.com"> <span class="name"><?php echo $_SESSION['name'] ?></span> <span class="role"><?php echo($groupName);?></span> </div> <i class="fa custom-caret"></i>
  619. </a>
  620. <div class="dropdown-menu">
  621. <ul class="list-unstyled">
  622. <li class="divider"></li>
  623. <li> <a role="menuitem" tabindex="-1" href="./script/php/Logout.php"><i class="fa fa-power-off"></i> Logout</a> </li>
  624. </ul>
  625. </div>
  626. </div>
  627. </div>
  628. <!-- end: search & user box -->
  629. </header>
  630. <!-- end: header -->
  631. <div class="inner-wrapper">
  632. <!-- start: sidebar -->
  633. <aside id="sidebar-left" class="sidebar-left">
  634. <div class="nano">
  635. <div class="nano-content">
  636. <nav id="menu" class="nav-main" role="navigation">
  637. <div class="widget-header clearfix">
  638. <h6 class="title pull-left mt-xs">資料庫文件</h6>
  639. </div>
  640. <div class="widget-content">
  641. <div class="jstree jstree-1 jstree-default" id="treeAjaxHTML"></div>
  642. </div>
  643. </nav>
  644. </div>
  645. </div>
  646. </aside>
  647. <!-- end: sidebar -->
  648. <section role="main" class="content-body">
  649. <header class="page-header">
  650. <ul>
  651. <li>
  652. <label id="header"></label>
  653. </li>
  654. <li class="right">
  655. <a class="mb-xs mt-xs mr-xs modal-with-move-anim btn btn-default" href="#advancedSearch"><i class="fa fa-search"></i> 進階搜尋</a>
  656. </li>
  657. </ul>
  658. </header>
  659. <div class="row">
  660. <div id="advancedSearch" class="zoom-anim-dialog modal-block modal-block-primary mfp-hide">
  661. <section class="panel">
  662. <header class="panel-heading">
  663. <h2 class="panel-title">進階搜尋</h2>
  664. </header>
  665. <div class="panel-body">
  666. <form class="form-horizontal form-bordered" method="get">
  667. <div class="form-group" id="category">
  668. <label class="col-md-3 control-label">工程類別:</label>
  669. <div class="multiselect col-md-6">
  670. <div class="selectBox">
  671. <select>
  672. <option>選擇工程</option>
  673. </select>
  674. <div class="overSelect"></div>
  675. </div>
  676. <div class="checkboxes form-inline" style="display: none; overflow-y:scroll; height:300px">
  677. <label for="category-any"><input type="checkbox" id="category-any" value="any" checked/> 全選</label>
  678. <!-- append option -->
  679. </div>
  680. </div>
  681. </div>
  682. <div class="form-group" id="project">
  683. <label class="col-md-3 control-label">專案類別:</label>
  684. <div class="multiselect col-md-6">
  685. <div class="selectBox">
  686. <select>
  687. <option>選擇專案</option>
  688. </select>
  689. <div class="overSelect"></div>
  690. </div>
  691. <div class="checkboxes form-inline" style="display: none; overflow-y:scroll; height:300px">
  692. <label for="project-any"><input type="checkbox" id="project-any" value="any" checked/> 全選</label>
  693. <!-- append option -->
  694. </div>
  695. </div>
  696. </div>
  697. <div class="form-group" id="type">
  698. <label class="col-md-3 control-label">文件類別:</label>
  699. <div class="multiselect col-md-6">
  700. <div class="selectBox">
  701. <select>
  702. <option>選擇文件</option>
  703. </select>
  704. <div class="overSelect"></div>
  705. </div>
  706. <div class="checkboxes form-inline" style="display: none; overflow-y:scroll; height:300px">
  707. <label for="type-any"><input type="checkbox" id="type-any" value="any" checked/> 全選</label>
  708. <!-- append option -->
  709. </div>
  710. </div>
  711. </div>
  712. <div class="form-group" id="notes" style="display: bllock;" hidden>
  713. <label class="col-md-3 control-label">設計圖類別:</label>
  714. <div class="multiselect col-md-6">
  715. <div class="selectBox">
  716. <select>
  717. <option>選擇設計圖</option>
  718. </select>
  719. <div class="overSelect"></div>
  720. </div>
  721. <div class="checkboxes form-inline" style="display: none; overflow-y:scroll; height:300px">
  722. <label for="notes-any"><input type="checkbox" id="notes-any" value="any" checked/> 全選</label>
  723. <!-- append option -->
  724. </div>
  725. </div>
  726. </div>
  727. <div class="form-group">
  728. <label class="col-md-3 control-label" for="search-word">文字搜尋:</label>
  729. <div class="col-md-6">
  730. <input type="text" class="form-control" placeholder="輸入關鍵字" id="search-word">
  731. </div>
  732. </div>
  733. </form>
  734. </div>
  735. <footer class="panel-footer">
  736. <div class="row">
  737. <div class="col-md-12 text-right">
  738. <div id="treeAjaxJSON" class="jstree jstree-4 jstree-default" role="tree" style="display: none;">
  739. <ul class="jstree-container-ul jstree-children">
  740. <li class="jstree-initial-node jstree-loading jstree-leaf jstree-last">
  741. <i class="jstree-icon jstree-ocl"></i>
  742. <a class="jstree-anchor" href="#"><i class="jstree-icon jstree-themeicon-hidden"></i>Loading ...</a>
  743. </li>
  744. </ul>
  745. </div>
  746. <div class="progress progress-striped light active m-md" style="display: none;">
  747. <div class="progress-bar progress-bar-primary" id="progress-bars" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
  748. </div>
  749. <div class="jstree jstree-4 jstree-default" id="loading" style="display: none;">
  750. <ul class="jstree-container-ul">
  751. <li class="jstree-loading">
  752. <i class="jstree-icon jstree-ocl"></i>讀取中 ...
  753. </li>
  754. </ul>
  755. </div>
  756. <div id="advanced-search-button-group" style="display: block;">
  757. <p id="warning-text" style="display: none; color: red;">警告! 篩選結果多於 1000 筆 </p>
  758. <button class="btn btn-warning" id="keep-search-button" style="display: none;">仍要搜尋</button>
  759. <button class="btn btn-primary" id="advanced-search-button" style="display: inline-block;">搜尋</button>
  760. <button class="btn btn-default modal-dismiss">取消</button>
  761. </div>
  762. </div>
  763. </div>
  764. </footer>
  765. </section>
  766. </div>
  767. <div class="col-md-6">
  768. <section class="panel" id="search-filter-panel" style="display: none;">
  769. <div class="panel-body">
  770. <form class="form-horizontal form-bordered" id="search-filter" method="get" hidden>
  771. <div class="form-group">
  772. <label class="col-md-3 control-label">工程類別:</label>
  773. <div class="col-md-7" id="f-category">
  774. <!-- append option -->
  775. </div>
  776. </div>
  777. <div class="form-group">
  778. <label class="col-md-3 control-label">專案類別:</label>
  779. <div class="col-md-7" id="f-project">
  780. <!-- append option -->
  781. </div>
  782. </div>
  783. <div class="form-group">
  784. <label class="col-md-3 control-label">文件類別:</label>
  785. <div class="col-md-7" id="f-type">
  786. <!-- append option -->
  787. </div>
  788. </div>
  789. <div class="form-group" id="filter_notes" style="display: none;">
  790. <label class="col-md-3 control-label">設計圖類別:</label>
  791. <div class="col-md-7" id="f-notes">
  792. <!-- append option -->
  793. </div>
  794. </div>
  795. </form>
  796. <i class="text-center fa fa-sort-desc" id="filter-slide"></i>
  797. </div>
  798. </section>
  799. <section class="panel">
  800. <div class="panel-body">
  801. <button id="reset" type="button" class="mb-xs mr-xs btn btn-default" style="float: right;"><i class="fa fa-reply"></i> 上一層</button>
  802. <table style="width:99%;" class="table table-bordered table-striped" id="datatable-ajax">
  803. <thead>
  804. <tr>
  805. <th id="SN">項次</th>
  806. <th id="name">類別</th>
  807. <th>關鍵字</th>
  808. <th>版次</th>
  809. <th>檔案數</th>
  810. </tr>
  811. </thead>
  812. <tbody>
  813. </tbody>
  814. </table>
  815. </div>
  816. </section>
  817. <section class="panel">
  818. <div id="panel" class="panel-body" style="height: 210px;">
  819. <div class="table-responsive" style="display:none;">
  820. <table class="table table-bordered mb-none" id="tableDetail">
  821. <tbody>
  822. <tr>
  823. <th>計畫編號</th>
  824. <td id="plan_code"></td>
  825. </tr>
  826. <tr>
  827. <th>計畫名稱</th>
  828. <td id="plan_name"></td>
  829. </tr>
  830. <tr>
  831. <th>圖名</th>
  832. <td id="fileName"></td>
  833. </tr>
  834. <tr>
  835. <th>版次</th>
  836. <td id="version"></td>
  837. </tr>
  838. <tr>
  839. <th>文件</th>
  840. <td id="download"></td>
  841. </tr>
  842. </tbody>
  843. </table>
  844. </div>
  845. </div>
  846. </section>
  847. </div>
  848. <div class="col-md-6">
  849. <div class="tabs">
  850. <ul class="nav nav-tabs nav-justified">
  851. <li class="active">
  852. <a href="#arcgisTab" data-toggle="tab" class="text-center"><i class="fa fa-map-marker"></i> ArcGIS</a>
  853. </li>
  854. <li>
  855. <a href="#pdfTab" data-toggle="tab" class="text-center"><i class="fa fa-file"></i> Pdf 預覽</a>
  856. </li>
  857. </ul>
  858. <div class="tab-content">
  859. <div id="arcgisTab" class="tab-pane active">
  860. <div id="arcgis" class="panel-body" style="height: 730px;">
  861. <div class="mapok" style="height:100%">
  862. <div id="topbar" class="esri-component esri-widget">
  863. <button id="distanceButton" class="action-button esri-icon-measure-line" type="button" title="Measure distance between two points"></button>
  864. <button id="areaButton" class="action-button esri-icon-measure-area" type="button" title="Measure area"></button>
  865. <button id="clear" class="action-button esri-icon-trash" title="Clear Measurements"></button>
  866. </div>
  867. <div id="viewDiv"></div>
  868. <div id="measureExpendDiv"></div>
  869. <div id="measureExpendDiv2"></div>
  870. <div id="slidesDiv" class="esri-widget"></div>
  871. <span style="display:none;" id="project-id"></span>
  872. </div>
  873. </div>
  874. </div>
  875. <div id="pdfTab" class="tab-pane">
  876. <div id="pdfFile"></div>
  877. </div>
  878. </div>
  879. </div>
  880. </div>
  881. </div>
  882. </section>
  883. </div>
  884. </section>
  885. </div>
  886. <script>
  887. var userName = "<?php echo $_SESSION['name'] ?>";
  888. var role = "<?php echo ($groupName); ?>";
  889. var right = <?php echo $right; ?>;
  890. db_table["category"].forEach(element => {
  891. option_id = "c" + element["category_id"] + "-l" + element["list_id"];
  892. $("#category .checkboxes").append("<label class='category-button' for="+option_id+"><input type='checkbox' class='category-option' value="+element["category_name"]+" id="+option_id+" />"+element["category_name"]+"</label>");
  893. filter_option_id = "f-c" + element["category_id"]
  894. list_id = element["list_id"];
  895. $("#f-category").append("<button type='button' class='mb-xs mt-xs mr-xs btn btn-primary' id="+filter_option_id+" list_id="+list_id+" style='display:none;'>"+element["category_name"]+"</button>");
  896. });
  897. db_table["project"].forEach(element => {
  898. option_id = "p" + element["project_id"];
  899. $("#project .checkboxes").append("<label class='project-button' for="+option_id+"><input type='checkbox' class='project-option' value="+element["project_id"]+" id="+option_id+" />["+element["project_id"]+"] "+element["project_name"]+"</label>");
  900. filter_option_id = "f-" + option_id;
  901. $("#f-project").append("<button type='button' class='mb-xs mt-xs mr-xs btn btn-primary' id="+filter_option_id+" style='display:none;'>"+element["project_name"]+"</button>");
  902. });
  903. db_table["type"].forEach(element => {
  904. option_id = "t" + element["type_id"];
  905. $("#type .checkboxes").append("<label class='type-button' for="+option_id+"><input type='checkbox' class='type-option' value="+element["type_name"]+" id="+option_id+" />"+element["type_name"]+"</label>");
  906. filter_option_id = "f-" + option_id;
  907. $("#f-type").append("<button type='button' class='mb-xs mt-xs mr-xs btn btn-primary' id="+filter_option_id+" style='display:none;'>"+element["type_name"]+"</button>");
  908. });
  909. for(i=0;i<notes_button_list.length;i++) {
  910. option_id = "n" + i;
  911. $("#notes .checkboxes").append("<label class='notes-button' for="+option_id+"><input type='checkbox' class='notes-option' value="+notes_button_list[i]+" id="+option_id+" />"+notes_button_list[i]+"</label>");
  912. filter_option_id = "f-" + option_id;
  913. $("#f-notes").append("<button type='button' class='mb-xs mt-xs mr-xs btn btn-primary' id="+filter_option_id+" style='display:none;'>"+notes_button_list[i]+"</button>");
  914. }
  915. if(right < 2){
  916. $("#upload-btn").hide();
  917. }
  918. </script>
  919. <!-- Vendor -->
  920. <script src="assets/vendor/magnific-popup/magnific-popup.js"></script>
  921. <!-- Examples -->
  922. <script src='./script/js/search.js'></script>
  923. <script src='./script/js/filter.js'></script>
  924. <script src="assets/javascripts/ui-elements/examples.modals.js"></script>
  925. </body>
  926. </html>