Index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <script lang="ts" setup>
  2. import { ref } from "vue"
  3. import "@/assets/sass/screen/screen.scss"
  4. import Map from "./Screen/Map.vue"
  5. import Alarm from "./Screen/Alarm.vue"
  6. import Clean from "./Screen/Clean.vue"
  7. import Info from "./Screen/Info.vue"
  8. import ChartPf from "./Screen/ChartPf.vue"
  9. import ChartOver from "./Screen/ChartOver.vue"
  10. const themeClass = "light"
  11. const toggleData = ref({
  12. type: 0,
  13. icon: "fas fa-map",
  14. title: "地图全局信息",
  15. })
  16. function toggle(type: number, title: string, icon: string) {
  17. toggleData.value = {
  18. type,
  19. title,
  20. icon,
  21. }
  22. }
  23. </script>
  24. <template>
  25. <div class="main" :class="themeClass">
  26. <div class="menu-box">
  27. <div class="menu" :class="toggleData.type == 0 ? 'active' : ''" @click="toggle(0, '地图全局概览', 'fas fa-map')">
  28. <span class="fas fa-map icon"></span>
  29. </div>
  30. <div
  31. class="menu"
  32. :class="toggleData.type == 1 ? 'active' : ''"
  33. @click="toggle(1, '商户设施基本概况', 'far fa-building')"
  34. >
  35. <span class="far fa-building icon"></span>
  36. </div>
  37. <div
  38. class="menu"
  39. :class="toggleData.type == 2 ? 'active' : ''"
  40. @click="toggle(2, '浓度超标分析', 'fas fa-chart-line')"
  41. >
  42. <span class="fas fa-chart-line icon"></span>
  43. </div>
  44. <div class="menu" :class="toggleData.type == 3 ? 'active' : ''" @click="toggle(3, '排放总量分析', 'fas fa-smog')">
  45. <span class="fas fa-smog icon"></span>
  46. </div>
  47. <div
  48. class="menu"
  49. :class="toggleData.type == 4 ? 'active' : ''"
  50. @click="toggle(4, '商户清洗概览', 'fas fa-shower')"
  51. >
  52. <span class="fas fa-shower icon"></span>
  53. </div>
  54. <div class="menu" :class="toggleData.type == 5 ? 'active' : ''" @click="toggle(5, '报警信息', 'fas fa-bell')">
  55. <span class="fas fa-bell icon"></span>
  56. </div>
  57. </div>
  58. <div class="content-box">
  59. <div class="box-card">
  60. <div class="card-header">
  61. <div class="card-title">
  62. <span :class="toggleData.icon" class="pe-2"></span>
  63. {{ toggleData.title }}
  64. <div class="svg-box" v-if="themeClass == 'dark'">
  65. <svg width="300px" height="35px" style="transform: scale(0.666667, 0.571429)">
  66. <rect fill="#1E77B3" x="8.038461538461538" y="8.16" width="7" height="7">
  67. <animate
  68. attributeName="fill"
  69. values="#1E77B3;transparent"
  70. dur="1.9802358298367067s"
  71. begin="1.5665624069464412"
  72. repeatCount="indefinite"
  73. ></animate>
  74. </rect>
  75. <rect fill="#1E77B3" x="19.576923076923077" y="8.16" width="7" height="7">
  76. <animate
  77. attributeName="fill"
  78. values="#1E77B3;transparent"
  79. dur="1.8079843323829157s"
  80. begin="0.45705870505509694"
  81. repeatCount="indefinite"
  82. ></animate>
  83. </rect>
  84. <rect fill="#1E77B3" x="31.115384615384613" y="8.16" width="7" height="7">
  85. <animate
  86. attributeName="fill"
  87. values="#1E77B3;transparent"
  88. dur="1.4675650195292191s"
  89. begin="1.0803201432280352"
  90. repeatCount="indefinite"
  91. ></animate>
  92. </rect>
  93. <rect fill="#1E77B3" x="42.65384615384615" y="8.16" width="7" height="7">
  94. <animate
  95. attributeName="fill"
  96. values="#1E77B3;transparent"
  97. dur="1.5354059480846596s"
  98. begin="1.9330663416934963"
  99. repeatCount="indefinite"
  100. ></animate>
  101. </rect>
  102. <rect fill="#1E77B3" x="54.19230769230769" y="8.16" width="7" height="7">
  103. <animate
  104. attributeName="fill"
  105. values="#1E77B3;transparent"
  106. dur="1.4913130129739207s"
  107. begin="0.12382238904918852"
  108. repeatCount="indefinite"
  109. ></animate>
  110. </rect>
  111. <rect fill="#1E77B3" x="65.73076923076923" y="8.16" width="7" height="7">
  112. <animate
  113. attributeName="fill"
  114. values="#1E77B3;transparent"
  115. dur="1.928236748268784s"
  116. begin="1.892890643278922"
  117. repeatCount="indefinite"
  118. ></animate>
  119. </rect>
  120. <rect fill="#1E77B3" x="77.26923076923077" y="8.16" width="7" height="7"></rect>
  121. <rect fill="#1E77B3" x="88.8076923076923" y="8.16" width="7" height="7"></rect>
  122. <rect fill="#1E77B3" x="100.34615384615384" y="8.16" width="7" height="7"></rect>
  123. <rect fill="#1E77B3" x="111.88461538461539" y="8.16" width="7" height="7"></rect>
  124. <rect fill="#1E77B3" x="123.42307692307692" y="8.16" width="7" height="7"></rect>
  125. <rect fill="#1E77B3" x="134.96153846153845" y="8.16" width="7" height="7"></rect>
  126. <rect fill="#1E77B3" x="146.5" y="8.16" width="7" height="7">
  127. <animate
  128. attributeName="fill"
  129. values="#1E77B3;transparent"
  130. dur="1.9881314084763604s"
  131. begin="1.4252096336332358"
  132. repeatCount="indefinite"
  133. ></animate>
  134. </rect>
  135. <rect fill="#1E77B3" x="158.03846153846155" y="8.16" width="7" height="7"></rect>
  136. <rect fill="#1E77B3" x="169.57692307692307" y="8.16" width="7" height="7">
  137. <animate
  138. attributeName="fill"
  139. values="#1E77B3;transparent"
  140. dur="1.4059006832500065s"
  141. begin="0.6639718708760203"
  142. repeatCount="indefinite"
  143. ></animate>
  144. </rect>
  145. <rect fill="#1E77B3" x="181.1153846153846" y="8.16" width="7" height="7"></rect>
  146. <rect fill="#1E77B3" x="192.65384615384616" y="8.16" width="7" height="7"></rect>
  147. <rect fill="#1E77B3" x="204.19230769230768" y="8.16" width="7" height="7">
  148. <animate
  149. attributeName="fill"
  150. values="#1E77B3;transparent"
  151. dur="1.048121912928511s"
  152. begin="1.9317500648829804"
  153. repeatCount="indefinite"
  154. ></animate>
  155. </rect>
  156. <rect fill="#1E77B3" x="215.73076923076923" y="8.16" width="7" height="7">
  157. <animate
  158. attributeName="fill"
  159. values="#1E77B3;transparent"
  160. dur="1.5944112219637578s"
  161. begin="1.3195149646949855"
  162. repeatCount="indefinite"
  163. ></animate>
  164. </rect>
  165. <rect fill="#1E77B3" x="227.26923076923077" y="8.16" width="7" height="7">
  166. <animate
  167. attributeName="fill"
  168. values="#1E77B3;transparent"
  169. dur="1.5210568672490044s"
  170. begin="0.7486217554522492"
  171. repeatCount="indefinite"
  172. ></animate>
  173. </rect>
  174. <rect fill="#1E77B3" x="238.8076923076923" y="8.16" width="7" height="7"></rect>
  175. <rect fill="#1E77B3" x="250.34615384615384" y="8.16" width="7" height="7">
  176. <animate
  177. attributeName="fill"
  178. values="#1E77B3;transparent"
  179. dur="1.1200547922559652s"
  180. begin="1.8735809346836794"
  181. repeatCount="indefinite"
  182. ></animate>
  183. </rect>
  184. <rect fill="#1E77B3" x="261.88461538461536" y="8.16" width="7" height="7"></rect>
  185. <rect fill="#1E77B3" x="273.4230769230769" y="8.16" width="7" height="7"></rect>
  186. <rect fill="#1E77B3" x="284.96153846153845" y="8.16" width="7" height="7">
  187. <animate
  188. attributeName="fill"
  189. values="#1E77B3;transparent"
  190. dur="1.9378290375136897s"
  191. begin="0.2583635026587676"
  192. repeatCount="indefinite"
  193. ></animate>
  194. </rect>
  195. <rect fill="#1E77B3" x="8.038461538461538" y="19.83" width="7" height="7"></rect>
  196. <rect fill="#1E77B3" x="19.576923076923077" y="19.83" width="7" height="7">
  197. <animate
  198. attributeName="fill"
  199. values="#1E77B3;transparent"
  200. dur="1.2860276773144588s"
  201. begin="1.6680355904697706"
  202. repeatCount="indefinite"
  203. ></animate>
  204. </rect>
  205. <rect fill="#1E77B3" x="31.115384615384613" y="19.83" width="7" height="7">
  206. <animate
  207. attributeName="fill"
  208. values="#1E77B3;transparent"
  209. dur="1.9033237591992576s"
  210. begin="0.5293627977187825"
  211. repeatCount="indefinite"
  212. ></animate>
  213. </rect>
  214. <rect fill="#1E77B3" x="42.65384615384615" y="19.83" width="7" height="7">
  215. <animate
  216. attributeName="fill"
  217. values="#1E77B3;transparent"
  218. dur="1.183406324742816s"
  219. begin="0.8026056049089916"
  220. repeatCount="indefinite"
  221. ></animate>
  222. </rect>
  223. <rect fill="#1E77B3" x="54.19230769230769" y="19.83" width="7" height="7"></rect>
  224. <rect fill="#1E77B3" x="65.73076923076923" y="19.83" width="7" height="7">
  225. <animate
  226. attributeName="fill"
  227. values="#1E77B3;transparent"
  228. dur="1.8445954700696134s"
  229. begin="0.5614152425400718"
  230. repeatCount="indefinite"
  231. ></animate>
  232. </rect>
  233. <rect fill="#1E77B3" x="77.26923076923077" y="19.83" width="7" height="7"></rect>
  234. <rect fill="#1E77B3" x="88.8076923076923" y="19.83" width="7" height="7"></rect>
  235. <rect fill="#1E77B3" x="100.34615384615384" y="19.83" width="7" height="7"></rect>
  236. <rect fill="#1E77B3" x="111.88461538461539" y="19.83" width="7" height="7">
  237. <animate
  238. attributeName="fill"
  239. values="#1E77B3;transparent"
  240. dur="1.0197691842404732s"
  241. begin="0.028204407227566453"
  242. repeatCount="indefinite"
  243. ></animate>
  244. </rect>
  245. <rect fill="#1E77B3" x="123.42307692307692" y="19.83" width="7" height="7">
  246. <animate
  247. attributeName="fill"
  248. values="#1E77B3;transparent"
  249. dur="1.2241107211264304s"
  250. begin="1.0474225221850757"
  251. repeatCount="indefinite"
  252. ></animate>
  253. </rect>
  254. <rect fill="#1E77B3" x="134.96153846153845" y="19.83" width="7" height="7"></rect>
  255. <rect fill="#1E77B3" x="146.5" y="19.83" width="7" height="7">
  256. <animate
  257. attributeName="fill"
  258. values="#1E77B3;transparent"
  259. dur="1.6373105427467933s"
  260. begin="0.689874483332173"
  261. repeatCount="indefinite"
  262. ></animate>
  263. </rect>
  264. <rect fill="#1E77B3" x="158.03846153846155" y="19.83" width="7" height="7">
  265. <animate
  266. attributeName="fill"
  267. values="#1E77B3;transparent"
  268. dur="1.0395669442880973s"
  269. begin="0.10734552161264466"
  270. repeatCount="indefinite"
  271. ></animate>
  272. </rect>
  273. <rect fill="#1E77B3" x="169.57692307692307" y="19.83" width="7" height="7"></rect>
  274. <rect fill="#1E77B3" x="181.1153846153846" y="19.83" width="7" height="7"></rect>
  275. <rect fill="#1E77B3" x="192.65384615384616" y="19.83" width="7" height="7">
  276. <animate
  277. attributeName="fill"
  278. values="#1E77B3;transparent"
  279. dur="1.5567458209434697s"
  280. begin="0.5083525542255201"
  281. repeatCount="indefinite"
  282. ></animate>
  283. </rect>
  284. <rect fill="#1E77B3" x="204.19230769230768" y="19.83" width="7" height="7"></rect>
  285. <rect fill="#1E77B3" x="215.73076923076923" y="19.83" width="7" height="7"></rect>
  286. <rect fill="#1E77B3" x="227.26923076923077" y="19.83" width="7" height="7">
  287. <animate
  288. attributeName="fill"
  289. values="#1E77B3;transparent"
  290. dur="1.3817388404549087s"
  291. begin="0.7217052669381379"
  292. repeatCount="indefinite"
  293. ></animate>
  294. </rect>
  295. <rect fill="#1E77B3" x="238.8076923076923" y="19.83" width="7" height="7">
  296. <animate
  297. attributeName="fill"
  298. values="#1E77B3;transparent"
  299. dur="1.5743030860147638s"
  300. begin="0.5524250090930165"
  301. repeatCount="indefinite"
  302. ></animate>
  303. </rect>
  304. <rect fill="#1E77B3" x="250.34615384615384" y="19.83" width="7" height="7"></rect>
  305. <rect fill="#1E77B3" x="261.88461538461536" y="19.83" width="7" height="7"></rect>
  306. <rect fill="#1E77B3" x="273.4230769230769" y="19.83" width="7" height="7">
  307. <animate
  308. attributeName="fill"
  309. values="#1E77B3;transparent"
  310. dur="1.5621821949960784s"
  311. begin="1.4424928490381204"
  312. repeatCount="indefinite"
  313. ></animate>
  314. </rect>
  315. <rect fill="#1E77B3" x="284.96153846153845" y="19.83" width="7" height="7">
  316. <animate
  317. attributeName="fill"
  318. values="#1E77B3;transparent"
  319. dur="1.4908450217194866s"
  320. begin="0.6455036587008234"
  321. repeatCount="indefinite"
  322. ></animate>
  323. </rect>
  324. </svg>
  325. </div>
  326. </div>
  327. </div>
  328. <div class="card-body">
  329. <Map v-if="toggleData.type == 0" :theme-class="themeClass"></Map>
  330. <Info v-if="toggleData.type == 1" :theme-class="themeClass"></Info>
  331. <ChartOver v-if="toggleData.type == 2" :theme-class="themeClass"></ChartOver>
  332. <ChartPf v-if="toggleData.type == 3" :theme-class="themeClass"></ChartPf>
  333. <Clean v-if="toggleData.type == 4"></Clean>
  334. <Alarm v-if="toggleData.type == 5" :max="50" :scorllInterval="5000" :scrollLength="25"></Alarm>
  335. </div>
  336. </div>
  337. </div>
  338. </div>
  339. </template>