dataScreen.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <template>
  2. <div class="screen">
  3. <div style="height: 10px" />
  4. <div class="titleImage">
  5. <el-image :src="titleUrl" />
  6. <span class="Heading">龙弛智慧隧道系统</span>
  7. <div
  8. class="titleOption"
  9. style="left: 19%"
  10. @click="jumpScreen('map')"
  11. >
  12. <span>地图</span>
  13. </div>
  14. <div
  15. class="titleOption"
  16. style="left: 76%"
  17. @click="jumpScreen('model')"
  18. >
  19. <span>模型</span>
  20. </div>
  21. </div>
  22. <div style="height: 10px" />
  23. <el-row>
  24. <el-col
  25. :span="5"
  26. style="height: 900px;"
  27. >
  28. <div class="deviceBox">
  29. <img
  30. src="@/assets/main_top_left.png"
  31. alt=""
  32. >
  33. <div class="titleIcon" />
  34. <div class="deviceBox_title">设备汇总</div>
  35. <div class="deviceOptionBox">
  36. <div
  37. v-for="item in deviceList"
  38. class="deviceOption"
  39. >
  40. <img
  41. :src="item.url"
  42. style="width: 35px;height: 35px"
  43. alt=""
  44. >
  45. <el-text
  46. style="padding-top: 8px;color: #ffffff"
  47. size="small"
  48. >{{ item.label + item.value }}</el-text>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="chartBox">
  53. <Chart />
  54. </div>
  55. <div class="chartBox">
  56. <lightChart />
  57. </div>
  58. </el-col>
  59. <el-col
  60. :span="14"
  61. style="display: flex;justify-content: center"
  62. >
  63. <div class="centerBox">
  64. <Map />
  65. </div>
  66. </el-col>
  67. <el-col
  68. :span="5"
  69. class="rightBox"
  70. >
  71. <div style="height: 20px" />
  72. <div class="panel">
  73. <span class="panel-title">亮度调整</span>
  74. <!-- <el-slider-->
  75. <!-- v-model="transparency"-->
  76. <!-- :step="50"-->
  77. <!-- show-stops-->
  78. <!-- :show-tooltip="false"-->
  79. <!-- class="panel-slider"-->
  80. <!-- @change="changeTransparency"-->
  81. <!-- />-->
  82. <div
  83. class="brightness"
  84. style="margin: 90px 0 0 50px;"
  85. >
  86. <span>低</span>
  87. <span>中</span>
  88. <span>高</span>
  89. </div>
  90. <!-- <el-slider-->
  91. <!-- v-model="transparencyTwo"-->
  92. <!-- :step="50"-->
  93. <!-- show-stops-->
  94. <!-- :show-tooltip="false"-->
  95. <!-- class="panel-slider2"-->
  96. <!-- @change="changeTransparencyTwo"-->
  97. <!-- />-->
  98. <div
  99. class="brightness"
  100. style="margin: 50px 0 0 50px;"
  101. >
  102. <span>低</span>
  103. <span>中</span>
  104. <span>高</span>
  105. </div>
  106. <div class="panel-bottom" />
  107. </div>
  108. <div class="warnBox">
  109. <img
  110. :src="warn"
  111. alt=""
  112. class="warnBoxExternal"
  113. >
  114. <img
  115. :src="warnTitle"
  116. alt=""
  117. class="warnBoxTitle"
  118. >
  119. <span>警告列表</span>
  120. </div>
  121. </el-col>
  122. </el-row>
  123. </div>
  124. </template>
  125. <script setup>
  126. // 标题图片
  127. import titleUrl from '@/assets/title_bg.png'
  128. import environments from '@/assets/icons/environment.png'
  129. import fourWays from '@/assets/icons/fourWays.png'
  130. import inductance from '@/assets/icons/inductance.png'
  131. import singleLamp from '@/assets/icons/singleLamp.png'
  132. import Chart from './components/chart.vue'
  133. import warn from '@/assets/main_bottopm_top2.png'
  134. import Map from './components/map.vue'
  135. import warnTitle from '@/assets/warnTitle.png'
  136. // import lightChart from './components/lightChart.vue'
  137. import { queryAllTunnels } from '@/api/tunnel'
  138. import { reactive, onMounted } from 'vue'
  139. import { useScreenStore } from '@/pinia/modules/screen'
  140. const useScreen = useScreenStore()
  141. const deviceList = reactive([
  142. { url: environments, label: '环境:', value: '2/1' },
  143. { url: fourWays, label: '四路:', value: '2/1' },
  144. { url: inductance, label: '电感:', value: '2/1' },
  145. { url: singleLamp, label: '单灯:', value: '2/1' },
  146. ])
  147. const jumpScreen = (type) => {
  148. console.log(type)
  149. }
  150. onMounted(() => {
  151. queryAllTunnels().then(res => {
  152. if (res.code === 0) {
  153. console.log('标点数据',res.data)
  154. useScreen.setTunnelList(res.data)
  155. }
  156. })
  157. })
  158. </script>
  159. <style scoped lang="less">
  160. .horn {
  161. position: absolute;
  162. content: "";
  163. width: 10px;
  164. height: 10px;
  165. }
  166. .screen{
  167. width: 100%;
  168. height: 1000px;
  169. //background-image: url("@/assets/back.jpeg");
  170. background-size:100% 100%;
  171. background: #2d407d url("@/assets/line.png");
  172. .titleImage {
  173. width: 100%;
  174. height: 70px;
  175. display: flex;
  176. align-items: center;
  177. justify-content: center;
  178. position: relative;
  179. .Heading{
  180. position: absolute;
  181. left: 42%;
  182. top: 25%;
  183. text-align: center;
  184. font-size: 1.7vw;
  185. font-weight: bold;
  186. color: #0EFCFF;
  187. }
  188. .titleOption{
  189. position: absolute;
  190. top: 7px;
  191. width: 100px;
  192. height: 32px;
  193. border: 1px solid #0EFCFF;
  194. color: #0EFCFF;
  195. display: flex;
  196. align-items: center;
  197. justify-content: center;
  198. font-size: 16px;
  199. }
  200. }
  201. .deviceBox {
  202. width: 400px;
  203. height: 180px;
  204. margin: 20px;
  205. position: relative;
  206. pointer-events: auto;
  207. img {
  208. width: 400px;
  209. height: 180px;
  210. }
  211. .deviceBox_title {
  212. position: absolute;
  213. left: 30px;
  214. top: 15px;
  215. font-size: 20px;
  216. color: #0EFCFF;
  217. }
  218. .deviceOptionBox {
  219. position: absolute;
  220. top: 70px;
  221. width: 400px;
  222. height: 60px;
  223. display: flex;
  224. justify-content: space-around;
  225. align-items: center;
  226. .deviceOption {
  227. width: 90px;
  228. height: 60px;
  229. display: flex;
  230. flex-direction: column;
  231. align-items: center;
  232. color: #ffffff;
  233. }
  234. }
  235. }
  236. .titleIcon{
  237. width: 5px;
  238. height: 20px;
  239. background-color: #0EFCFF;
  240. position: absolute;
  241. left: 20px;
  242. top: 16px;
  243. }
  244. .chartBox{
  245. width: 400px;
  246. height: 250px;
  247. margin: 20px;
  248. position: relative;
  249. pointer-events: auto;
  250. }
  251. .rightBox{
  252. height: 900px;
  253. .warnBox{
  254. position: relative;
  255. width: 400px;
  256. height: 300px;
  257. margin: 20px 0 0 20px;
  258. .warnBoxExternal{
  259. width: 400px;
  260. height: 270px;
  261. }
  262. .warnBoxTitle{
  263. width: 200px;
  264. height: 35px;
  265. position: absolute;
  266. left: 20px;
  267. top: 30px;
  268. }
  269. span{
  270. color:#ffffff;
  271. font-size: 18px;
  272. position: absolute;
  273. left: 70px;
  274. top: 37px;
  275. }
  276. }
  277. .panel{
  278. position: relative;
  279. width: 400px;
  280. height: 200px;
  281. margin-left: 20px;
  282. border: 1px solid rgba(25,186,139,0.17);
  283. padding: 0 0.1875rem 0.5rem;
  284. margin-bottom: 0.1875rem;
  285. background: url(@/assets/line.png) rgba(255,255,255,0.04);
  286. &::before{
  287. .horn;
  288. top: 0;
  289. left: 0;
  290. border-left: 2px solid #02a6b5;
  291. border-top: 2px solid #02a6b5;
  292. }
  293. &::after{
  294. .horn;
  295. top: 0;
  296. right: 0;
  297. border-right: 2px solid #02a6b5;
  298. border-top: 2px solid #02a6b5;
  299. }
  300. .panel-bottom{
  301. &::before{
  302. .horn;
  303. bottom: 0;
  304. left: 0;
  305. border-left: 2px solid #02a6b5;
  306. border-bottom: 2px solid #02a6b5;
  307. }
  308. &::after{
  309. .horn;
  310. bottom: 0;
  311. right: 0;
  312. border-right: 2px solid #02a6b5;
  313. border-bottom: 2px solid #02a6b5;
  314. }
  315. }
  316. .panel-title{
  317. position: absolute;
  318. left: 160px;
  319. top: 10px;
  320. font-size: 20px;
  321. font-weight: bold;
  322. color: #0EFCFF;
  323. }
  324. .panelSwitchTitle{
  325. color: #ffffff;
  326. font-size: 16px;
  327. position: absolute;
  328. bottom: 30px;
  329. font-weight: bold;
  330. left:25px;
  331. }
  332. .panelSwitch{
  333. position: absolute;
  334. right: 25px;
  335. bottom: 20px;
  336. }
  337. .panel-slider{
  338. width: 300px;
  339. position: absolute;
  340. top: 60px;
  341. left: 50px;
  342. }
  343. .panel-slider2{
  344. width: 300px;
  345. position: absolute;
  346. top: 120px;
  347. left: 50px;
  348. }
  349. .brightness{
  350. width: 300px;
  351. display: flex;
  352. justify-content: space-between;
  353. color: #909399;
  354. font-size: 14px;
  355. }
  356. }
  357. }
  358. }
  359. .dataBox{
  360. width: 200px;
  361. height: 150px;
  362. background-color: #283a72;
  363. }
  364. .centerBox{
  365. width: 1000px;
  366. height: 700px;
  367. border-radius: 10px;
  368. margin-top: 20px;
  369. }
  370. </style>