Gis.cshtml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. @using WeApp.TrainingCampGroup.Dto
  2. @{
  3. Layout = "~/Views/Shared/Layout/_Layout.Spec.cshtml";
  4. string campName = ViewBag.CampName;
  5. ViewBag.Title = "GIS(" + campName + ")";
  6. }
  7. <style>
  8. body {
  9. background: #f5f5f5;
  10. }
  11. .slide {
  12. color: rgb(81, 106, 248)
  13. }
  14. .tab-content-box {
  15. width: 100vw;
  16. max-width: 1300px;
  17. margin: 0 auto;
  18. height: 100vh;
  19. overflow: auto;
  20. background: #000;
  21. position: relative;
  22. }
  23. #carousel {
  24. position: static;
  25. width: 100%;
  26. cursor: pointer;
  27. }
  28. .tab-content-box .carousel-control {
  29. width: 80px;
  30. background: #4c4c4c;
  31. }
  32. .tab-content-box .carousel-indicators {
  33. left: 80px;
  34. /*text-align: left;*/
  35. }
  36. .tab-content-box .carousel-indicators li {
  37. display: none;
  38. margin-left: 5px;
  39. }
  40. .tab-box, .tab-box ul, .tab-box li {
  41. float: left;
  42. }
  43. .tab-box {
  44. margin-top: 20px;
  45. margin-left: 5px;
  46. width: 150px;
  47. position: absolute;
  48. }
  49. .tab-box ul, .tab-box li {
  50. width: 100%;
  51. line-height: 37px;
  52. }
  53. .nav-tabs {
  54. border-bottom: none;
  55. }
  56. .nav-tabs > li > a {
  57. font-size: 15px;
  58. color: #678CEB;
  59. border-radius: 0 35px 35px 0;
  60. border: 1px solid #678CEB;
  61. padding: 8px 15px;
  62. }
  63. .nav > li > a:hover, .nav > li > a:active, .nav > li > a:focus {
  64. color: #eee;
  65. background: #678CEB;
  66. border-color: #678CEB;
  67. }
  68. .nav-tabs > li > a.active, .nav-tabs > li > a.active:focus, .nav-tabs > li > a.active:hover {
  69. cursor: default;
  70. color: #eee;
  71. border: 1px solid rgb(81, 106, 248);
  72. background: rgb(81, 106, 248);
  73. cursor: none;
  74. }
  75. .path-box {
  76. height: 100vh;
  77. background: transparent;
  78. margin: 0 auto;
  79. }
  80. .path-box .carousel .carousel-inner {
  81. height: auto;
  82. max-width: 550px;
  83. }
  84. .tab-content-box .carousel-item, .tab-content-box .item {
  85. max-width: 550px;
  86. margin: 0 auto;
  87. }
  88. .tab-box-border {
  89. position: absolute;
  90. width: 100%;
  91. max-width: 570px;
  92. height: 100%;
  93. border: 2px dashed #f00;
  94. border-top: none;
  95. border-bottom: none;
  96. top: 0;
  97. left: calc(50% - 285px);
  98. margin: 0 auto;
  99. cursor: none;
  100. z-index: 1;
  101. }
  102. .gis {
  103. height: 100vh;
  104. }
  105. </style>
  106. <div class="" style="min-width: 100vw; min-height: 100vh;">
  107. <div class="tab-box" style="z-index: 1000">
  108. <ul id="info-tab" class="nav nav-tabs" role="tablist" style="float: left">
  109. <li role="presentation" style="float: left"><a href="#t0" role="tab" class="active" data-toggle="tab">Start</a></li>
  110. <li role="presentation" class="" style="float: left"><a href="#t1" role="tab" data-toggle="tab">Running Path</a></li>
  111. <li role="presentation" class="" style="float: left"><a href="#t2" role="tab" data-toggle="tab">Gis</a></li>
  112. </ul>
  113. </div>
  114. <div id="info-content" class="tab-content">
  115. <div class="tab-box-border"></div>
  116. <div id="t0" role="tabpanel" class="tab-pane active">
  117. <div class="tab-content-box">
  118. <div class="title">
  119. </div>
  120. </div>
  121. </div>
  122. <div id="t1" role="tabpanel" class="tab-pane" style="position: relative">
  123. <div class="tab-content-box">
  124. <div id="group-path-box"></div>
  125. </div>
  126. </div>
  127. <div id="t2" role="tabpanel" class="tab-pane">
  128. <div class="tab-content-box" style="position: relative">
  129. <div class="gis item" id="container"></div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. @section scripts{
  135. <script src="https://webapi.amap.com/maps?v=1.4.10&key=4a93c6fbce674fbb621275fa23804d93&plugin=AMap.PolyEditor"></script>
  136. <script src="~/Content/Js/scene-path.js"></script>
  137. <script>
  138. $(function () {
  139. ScenePath();
  140. setInterval(ScenePath, 1000 * 30);
  141. });
  142. </script>
  143. <script id="path">
  144. function ScenePath() {
  145. $.iwbAjax5({
  146. url: abp.appUrl + 'Query/GetCampRunningInfos?no=@(ViewBag.CampNo)',
  147. success: function(res) {
  148. var str = FormatterScenePath(res);
  149. $('#group-path-box').html(str);
  150. }
  151. });
  152. }
  153. </script>
  154. <script id="gis">
  155. var map = new AMap.Map('container',
  156. {
  157. resizeEnable: true,
  158. zoom: 12,
  159. center: [121.527209, 31.228674]
  160. });
  161. AMap.plugin(['AMap.ToolBar', 'AMap.Scale', 'AMap.OverView'],
  162. function () {
  163. map.addControl(new AMap.ToolBar());
  164. map.addControl(new AMap.Scale());
  165. map.addControl(new AMap.OverView({ isOpen: true }));
  166. }
  167. );
  168. </script>
  169. <script>
  170. </script>
  171. }