parking-usage.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <template>
  2. <div class="page animate__animated animate__faster animate__fadeInLeft">
  3. <more title="车位使用情况" nomore></more>
  4. <div class="btnList">
  5. <div @click="activedIndex=index" v-for="(item,index) in parkList" :key="index" style="padding-right: 1.25rem;">
  6. <el-button :type="activedIndex==index?'primary':''" size="medium">{{item.label}}</el-button>
  7. </div>
  8. </div>
  9. <!-- A1停车场 -->
  10. <div class="paking" style="display: flex;justify-content: space-between;" v-show="activedIndex==0"
  11. :class="activedIndex==0?'animate__fadeInLeft':'animate__fadeOutLeft'">
  12. <div
  13. style="height: 100%;width: calc(70% - 30px);display: flex;flex-direction: column;justify-content: space-between;">
  14. <div class="grid-content"
  15. style="height:calc( 50% - 15px);display: flex;justify-content: center;align-items: center;">
  16. <div style="margin: 0.5rem;" v-for="(item,index) in 39" :key="index">
  17. <el-popover placement="bottom" title="" width="200" trigger="hover">
  18. <div class="tips">
  19. <div>
  20. <label>停车场:</label>
  21. A1停车场
  22. </div>
  23. <div>
  24. <label>车位号:</label>
  25. pc20211220{{index}}
  26. </div>
  27. <div>
  28. <label>车牌号:</label>
  29. <span v-if="pakingA_a.includes(index)">粤SB12345{{index}}</span>
  30. <span style="color: red;" v-else>车位为空</span>
  31. </div>
  32. <div>
  33. <label>车位类型:</label>
  34. 固定停车位
  35. </div>
  36. </div>
  37. <img slot="reference"
  38. :src="pakingA_a.includes(index)?'/img/test/paking1.png':'/img/test/paking-empty.png'"
  39. style="height: 70px;width: 40px;">
  40. </el-popover>
  41. </div>
  42. </div>
  43. <div class="grid-content"
  44. style="height:calc( 50% - 15px);display: flex;justify-content: center;align-items: center;">
  45. <div style="margin: 0.5rem;" v-for="(item,index) in 39" :key="index">
  46. <el-popover placement="bottom" title="" width="200" trigger="hover">
  47. <div class="tips">
  48. <div>
  49. <label>停车场:</label>
  50. A1停车场
  51. </div>
  52. <div>
  53. <label>车位号:</label>
  54. pc20211220{{index}}
  55. </div>
  56. <div>
  57. <label>车牌号:</label>
  58. <span v-if="pakingA_b.includes(index)">粤SB12345{{index}}</span>
  59. <span style="color: red;" v-else>车位为空</span>
  60. </div>
  61. <div>
  62. <label>车位类型:</label>
  63. 固定停车位
  64. </div>
  65. </div>
  66. <img slot="reference"
  67. :src="pakingA_b.includes(index)?'/img/test/paking1.png':'/img/test/paking-empty.png'"
  68. style="height: 70px;width: 40px;">
  69. </el-popover>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="grid-content"
  74. style="height: 100%;width: 30%;display: flex;justify-content: center;align-items: center;">
  75. <div style="margin: 0.625rem;" v-for="(item,index) in 27" :key="index">
  76. <el-popover placement="bottom" title="" width="200" trigger="hover">
  77. <div class="tips">
  78. <div>
  79. <label>停车场:</label>
  80. A1停车场
  81. </div>
  82. <div>
  83. <label>车位号:</label>
  84. pc20211220{{index}}
  85. </div>
  86. <div>
  87. <label>车牌号:</label>
  88. <span v-if="pakingA_c.includes(index)">粤SB12345{{index}}</span>
  89. <span style="color: red;" v-else>车位为空</span>
  90. </div>
  91. <div>
  92. <label>车位类型:</label>
  93. 固定停车位
  94. </div>
  95. </div>
  96. <img slot="reference" :src="pakingA_c.includes(index)?'/img/test/paking2.png':'/img/test/paking2-empty.png'"
  97. style="width: 70px;height: 40px;">
  98. </el-popover>
  99. </div>
  100. </div>
  101. </div>
  102. <!-- A2停车场 -->
  103. <div class="paking animate__animated animate__faster" v-show="activedIndex==1"
  104. :class="activedIndex==1?'animate__fadeInLeft':'animate__fadeOutRight'"
  105. style="height: 660px;display: flex;justify-content: space-between;flex-direction: column;">
  106. <div v-for="(item,index) in 2" :key="index" class="grid-content"
  107. style="display: flex;justify-content: center;align-items: center;width: 100%;height: calc(100%/2 - 15px);">
  108. <div style="margin: 0.58rem;" v-for="(item,index) in 55" :key="index">
  109. <el-popover placement="bottom" title="" width="200" trigger="hover">
  110. <div class="tips">
  111. <div>
  112. <label>停车场:</label>
  113. A2停车场
  114. </div>
  115. <div>
  116. <label>车位号:</label>
  117. pc20211220{{index}}
  118. </div>
  119. <div>
  120. <label>车牌号:</label>
  121. <span v-if="pakingB_a.includes(index)">粤SB12345{{index}}</span>
  122. <span style="color: red;" v-else>车位为空</span>
  123. </div>
  124. <div>
  125. <label>车位类型:</label>
  126. 固定停车位
  127. </div>
  128. </div>
  129. <img slot="reference" :src="pakingB_a.includes(index)?'/img/test/paking1.png':'/img/test/paking-empty.png'"
  130. style="height: 70px;width: 40px;">
  131. </el-popover>
  132. </div>
  133. </div>
  134. </div>
  135. <!-- A3停车场 -->
  136. <div class="paking animate__animated animate__faster" v-show="activedIndex==2"
  137. :class="activedIndex==2?'animate__fadeInLeft':'animate__fadeOutRight'"
  138. style="height: 660px;display: flex;justify-content: space-between;">
  139. <div v-for="(item,index) in 3" :key="index" class="grid-content"
  140. style="display: flex;justify-content: center;align-items: center;height: 100%;width: calc(100%/3 - 30px);">
  141. <div style="margin: 0.4rem;" v-for="(item,index) in 30" :key="index">
  142. <el-popover placement="bottom" title="" width="200" trigger="hover">
  143. <div class="tips">
  144. <div>
  145. <label>停车场:</label>
  146. A1停车场
  147. </div>
  148. <div>
  149. <label>车位号:</label>
  150. pc20211220{{index}}
  151. </div>
  152. <div>
  153. <label>车牌号:</label>
  154. <span v-if="pakingC_a.includes(index)">粤SB12345{{index}}</span>
  155. <span style="color: red;" v-else>车位为空</span>
  156. </div>
  157. <div>
  158. <label>车位类型:</label>
  159. 固定停车位
  160. </div>
  161. </div>
  162. <img slot="reference" :src="pakingC_a.includes(index)?'/img/test/paking2.png':'/img/test/paking2-empty.png'"
  163. style="width: 70px;height: 40px;">
  164. </el-popover>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </template>
  170. <script>
  171. import more from "@/components/more.vue"
  172. export default {
  173. components: {
  174. more
  175. },
  176. data() {
  177. return {
  178. parkList: [{
  179. label: 'A1停车场',
  180. value: 1
  181. },
  182. {
  183. label: 'A2停车场',
  184. value: 2
  185. },
  186. {
  187. label: 'A3停车场',
  188. value: 3
  189. }
  190. ],
  191. activedIndex: 0,
  192. pakingA_a: [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 14, 15, 20, 24, 25, 26, 30, 31, 32, 34, 36],
  193. pakingA_b: [0, 1, 2, 3, 5, 7, 9, 13, 14, 16, 20, 24, 25, 26, 27, 29, 30, 32, 33, 35, 38],
  194. pakingA_c: [0, 1, 2, 3, 4, 8, 12, 14, 15, 20, 24, 25, 26],
  195. pakingB_a: [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 14, 15, 20, 24, 25, 26, 30, 31, 32, 34, 36, 41, 42, 43, 45, 48, 49],
  196. pakingC_a: [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 14, 15, 20, 24, 25, 26, 30, 31, 32, 34, 36, 41, 42, 43, 45, 48, 49],
  197. };
  198. }
  199. };
  200. </script>
  201. <style lang="scss" scoped>
  202. .page {
  203. background-color: #FFFFFF;
  204. padding: 1.25rem;
  205. box-sizing: border-box;
  206. }
  207. .tips {
  208. padding: 10px;
  209. div {
  210. display: flex;
  211. padding-top: 0.625rem;
  212. font-size: 14px;
  213. }
  214. label {
  215. width: 70px;
  216. }
  217. }
  218. .btnList {
  219. padding-top: 0.625rem;
  220. display: flex;
  221. }
  222. .paking {
  223. border-radius: 0.25rem;
  224. box-sizing: border-box;
  225. background-color: #052252;
  226. margin-top: 1.25rem;
  227. padding: 1.875rem;
  228. width: 100%;
  229. height: 660px;
  230. }
  231. .el-row {
  232. margin-bottom: 20px;
  233. &:last-child {
  234. margin-bottom: 0;
  235. }
  236. }
  237. .el-col {
  238. border-radius: 4px;
  239. }
  240. .grid-content {
  241. box-sizing: border-box;
  242. padding: 10px;
  243. border-radius: 4px;
  244. display: flex;
  245. justify-content: flex-start;
  246. align-items: center;
  247. flex-wrap: wrap;
  248. min-height: 13.75rem;
  249. background-color: #f5f5f5;
  250. }
  251. </style>