Newer
Older
urbanLifeline_YanAn / src / views / oneMap / OverallOverview / LeftBox.vue
@鲁yixuan 鲁yixuan on 7 Oct 12 KB updata
  1. <template>
  2. <!-- 基础设施 -->
  3. <div class="infrastructure">
  4. <div class="ListBoxHeader">
  5. <div class="ListBoxHeader_font">基础设施</div>
  6. </div>
  7. <div class="jcssTop">
  8. <div class="subRightBox">
  9. <div
  10. class="headcenter"
  11. v-for="(item, index) in categoryList"
  12. :key="item"
  13. :class="activedname == item.name ? 'activedright' : ''"
  14. @click="categoryclick(item, index)"
  15. >
  16. {{ item.name }}
  17. </div>
  18. </div>
  19. <div class="jcssBox flex">
  20. <div class="jcssTp">
  21. <img :src="riskData[0].Imgurl" alt="" class="NewImg" />
  22. </div>
  23. <div class="jcssContent">
  24. <div class="jcssContent_z">
  25. <div class="ListContent flex flex-align-center">
  26. <div class="icon"></div>
  27. <div class="gw">{{ riskData[0].name1 }}</div>
  28. <div class="NumClass">{{ riskData[0].num1 }}</div>
  29. <div class="gl">{{ riskData[0].dw1 }}</div>
  30. </div>
  31. <div class="ListContent flex flex-align-center">
  32. <div class="icon"></div>
  33. <div class="gw">{{ riskData[0].name2 }}</div>
  34. <div class="NumClass">{{ riskData[0].num2 }}</div>
  35. <div class="gl">{{ riskData[0].dw2 }}</div>
  36. </div>
  37. <div class="ListContent flex flex-align-center">
  38. <div class="icon"></div>
  39. <div class="gw">{{ riskData[0].name3 }}</div>
  40. <div class="NumClass">{{ riskData[0].num3 }}</div>
  41. <div class="gl">{{ riskData[0].dw3 }}</div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <!-- 运行监测 -->
  49. <div class="Operationmonitoring">
  50. <div class="ListBoxHeader">
  51. <div class="ListBoxHeader_font">运行监测</div>
  52. </div>
  53. <div class="yxjcTop">
  54. <div class="topVehicl flex">
  55. <div class="icon"></div>
  56. <div class="text">预警监测</div>
  57.  
  58. <div class="yxjcList">
  59. <div class="head-right" style="">
  60. <div
  61. class="head-item"
  62. v-for="(item, index) in yearList"
  63. :key="item"
  64. :class="yxjcname == item.name ? 'activedright' : ''"
  65. @click="yearclick(item, index)"
  66. >
  67. {{ item.name }}
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="yxjcEcharts"></div>
  73. </div>
  74. </div>
  75. <!-- 实时监测 -->
  76. <div class="Realtime">
  77. <div class="ListBoxHeader">
  78. <div class="ListBoxHeader_font">实时监测</div>
  79. </div>
  80. <Vue3SeamlessScroll :list="FXJCData" :singleHeight="60" :singleWaitTime="1500" :hover="true" class="tableBody">
  81. <div class="tableBodyList" v-for="item in FXJCData">
  82. <span class="tableBodyList_span1">{{ item.num }}</span>
  83. <span class="tableBodyList_span2">{{ item.sz }} </span>
  84. <span class="tableBodyList_span3">{{ item.bm }}</span>
  85. <span class="tableBodyList_span4">{{ item.zb }} </span>
  86. <span class="tableBodyList_span5">
  87. <el-tag type="danger" v-if="item.zk == '异常'">异 常</el-tag>
  88. <el-tag type="success" v-if="item.zk == '正常'">正 常</el-tag>
  89. </span>
  90. </div>
  91. </Vue3SeamlessScroll>
  92. </div>
  93. </template>
  94.  
  95. <script setup>
  96. import { ref, reactive, toRefs, onMounted, onBeforeUnmount } from 'vue';
  97. import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
  98. import ranqi_icon from '@/assets/newImgs/rq.png'; //燃气
  99. import qiaoliang from '@/assets/newImgs/ql.png'; //桥梁
  100. import sd_icon from '@/assets/newImgs/sd.png'; //隧道
  101. import ps_icon from '@/assets/newImgs/ps.png'; //排水
  102. const categoryList = ref([
  103. { name: '燃气', value: 1 },
  104. { name: '排水', value: 2 },
  105. { name: '桥梁', value: 3 },
  106. { name: '隧道', value: 4 },
  107. ]);
  108. const yearList = ref([
  109. { name: '7天', value: 1 },
  110. { name: '15天', value: 2 },
  111. { name: '30天', value: 3 },
  112. ]);
  113. const FXJCData = ref([
  114. {
  115. num: '01',
  116. zb: '管网病管',
  117. sz: '排水',
  118. bm: 'BM234454',
  119. zk: '异常',
  120. },
  121. { num: '02', zb: '管网病管', sz: '排水', bm: 'BM234454', zk: '正常' },
  122. { num: '03', zb: '结构', sz: '隧道', bm: 'BM234454', zk: '正常' },
  123. { num: '04', zb: '老化', sz: '桥梁', bm: 'BM234454', zk: '正常' },
  124. { num: '05', zb: '老化', sz: '排水', bm: 'BM234454', zk: '异常' },
  125. { num: '06', zb: '老化', sz: '排水', bm: 'BM234454', zk: '正常' },
  126. ]);
  127. const yxjcname = ref('7天');
  128. function yearclick(val) {
  129. yxjcname.value = val.name;
  130. }
  131. const riskData = ref([
  132. {
  133. name1: '管网',
  134. name2: '传感器',
  135. name3: '窨井',
  136. num1: '234',
  137. num2: '12',
  138. num3: '12',
  139. Imgurl: ranqi_icon,
  140. dw1: '公里',
  141. dw2: '套',
  142. dw3: '口',
  143. },
  144. ]);
  145.  
  146. const activedname = ref('燃气');
  147. // 点击事件
  148. function categoryclick(val) {
  149. console.log(val.name, '1');
  150. activedname.value = val.name;
  151. if (activedname.value == '燃气') {
  152. riskData.value = [
  153. {
  154. name1: '管网',
  155. name2: '传感器',
  156. name3: '窨井',
  157. num1: '234',
  158. num2: '12',
  159. num3: '12',
  160. Imgurl: ranqi_icon,
  161. dw1: '公里',
  162. dw2: '套',
  163. dw3: '口',
  164. },
  165. ];
  166. } else if (activedname.value == '排水') {
  167. riskData.value = [
  168. {
  169. name1: '管网',
  170. name2: '检查口',
  171. name3: '感知设备',
  172. num1: '234',
  173. num2: '234',
  174. num3: '18',
  175. Imgurl: ps_icon,
  176. dw1: '公里',
  177. dw2: '处',
  178. dw3: '套',
  179. },
  180. ];
  181. } else if (activedname.value == '桥梁') {
  182. riskData.value = [
  183. {
  184. name1: '数量',
  185. name2: '长度',
  186. name3: '感知设备',
  187. num1: '1',
  188. num2: '204',
  189. num3: '92',
  190. Imgurl: qiaoliang,
  191. dw1: '座',
  192. dw2: '米',
  193. dw3: '套',
  194. },
  195. ];
  196. } else {
  197. riskData.value = [
  198. {
  199. name1: '数量',
  200. name2: '长度',
  201. name3: '感知设备',
  202. num1: '1',
  203. num2: '750',
  204. num3: '111',
  205. Imgurl: sd_icon,
  206. dw1: '座',
  207. dw2: '米',
  208. dw3: '套',
  209. },
  210. ];
  211. }
  212. }
  213. </script>
  214.  
  215. <style lang="scss" scoped>
  216. .infrastructure {
  217. width: 450px;
  218. height: 28%;
  219. // background: red;
  220. .jcssTop {
  221. width: 450px;
  222. height: calc(100% - 55px);
  223. margin: 8px auto;
  224. .subRightBox {
  225. width: 450px;
  226. margin: 0 auto;
  227. height: 35px;
  228. display: flex;
  229. cursor: pointer;
  230. font-size: 14px;
  231. color: #ffffff;
  232. .headcenter {
  233. width: 100px;
  234. height: 26px;
  235. padding: 2px 3px;
  236. background: #00344f;
  237. text-align: center;
  238. margin-top: 5px;
  239. margin-left: 10px;
  240. }
  241. .activedright {
  242. border: 1px solid #2cfce9;
  243. color: #e4f5ff;
  244. background: #166f84;
  245. }
  246. }
  247. .jcssBox {
  248. margin-top: 2px;
  249. width: 450px;
  250. height: calc(100% - 40px);
  251. // background: blanchedalmond;
  252. .jcssTp {
  253. width: 43%;
  254. height: 100%;
  255. .NewImg {
  256. position: relative;
  257. top: 13%;
  258. left: 25%;
  259. width: 88px;
  260. height: 111px;
  261. }
  262. }
  263. .jcssContent {
  264. width: 52%;
  265. height: 100%;
  266. // background: yellowgreen;
  267. .jcssContent_z {
  268. position: relative;
  269. top: 20%;
  270. width: 100%;
  271. height: 100px;
  272. // background: red;
  273. .ListContent {
  274. height: 30px;
  275. margin-top: 5px;
  276. // background: yellow;
  277. .icon {
  278. width: 25px;
  279. height: 25px;
  280. background: url('@/assets/newImgs/xtb_img.png') no-repeat;
  281. }
  282. .gw {
  283. font-family: Source Han Sans CN;
  284. font-weight: bold;
  285. font-size: 14px;
  286. color: #85d2d4;
  287. padding-left: 5px;
  288. // background: yellow;
  289. width: 70px;
  290. }
  291. .NumClass {
  292. width: 70px;
  293. text-align: right;
  294. font-family: Source Han Sans CN;
  295. font-weight: bold;
  296. font-size: 26px;
  297. color: #12f9ff;
  298. padding-left: 20px;
  299. }
  300. .gl {
  301. font-family: Source Han Sans CN;
  302. font-weight: bold;
  303. font-size: 14px;
  304. color: #34909f;
  305. padding-left: 10px;
  306. }
  307. }
  308. }
  309. }
  310. }
  311. }
  312. }
  313. .Operationmonitoring {
  314. // background: blue;
  315. width: 450px;
  316. height: 33%;
  317. .yxjcTop {
  318. width: 450px;
  319. height: calc(100% - 60px);
  320. margin: 10px auto;
  321. // background: red;
  322. .topVehicl {
  323. height: 26px;
  324.  
  325. .icon {
  326. position: relative;
  327. left: 10px;
  328. width: 25px;
  329. height: 25px;
  330. background: url('@/assets/newImgs/xtb_img.png') no-repeat;
  331. }
  332. .text {
  333. font-family: Source Han Sans CN;
  334. font-weight: bold;
  335. font-size: 14px;
  336. color: #ebfeff;
  337. line-height: 25px;
  338. position: relative;
  339. left: 12px;
  340. top: 10px;
  341.  
  342. // box-shadow: inset 0px -7px 10px -5px #47eef38a;
  343. background: linear-gradient(0deg, rgba(0, 242, 255, 0.5) 0%, rgba(0, 242, 255, 0) 100%);
  344. height: 10px;
  345. line-height: 0px;
  346. }
  347. .yxjcList {
  348. position: relative;
  349. left: 150px;
  350. display: flex;
  351. width: 46%;
  352. // background: rgb(92, 122, 96);
  353. .head-right {
  354. margin-top: 2px;
  355. cursor: pointer;
  356. font-size: 14px;
  357. color: #ffffff;
  358. display: flex;
  359. line-height: 18px;
  360. .head-item {
  361. width: 60px;
  362. margin-right: 10px;
  363. padding: 2px 3px;
  364. background: #00344f;
  365. height: 23px;
  366. text-align: center;
  367. }
  368. .activedright {
  369. border: 1px solid #2cfce9;
  370. color: #e4f5ff;
  371. background: #166f84;
  372. }
  373. }
  374. }
  375. }
  376. .yxjcEcharts {
  377. margin: 10px auto;
  378. width: 430px;
  379. height: calc(100% - 40px);
  380. background: url('@/assets/newImgs/yxjcE.png') no-repeat;
  381. background-size: 100% 100%;
  382. }
  383. }
  384. }
  385. .Realtime {
  386. width: 450px;
  387. height: 35%;
  388. .tableBody {
  389. width: 432px;
  390. height: calc(100% - 50px);
  391. overflow: hidden;
  392. margin: 0 auto;
  393. .tableBodyList {
  394. height: 60px;
  395. line-height: 60px;
  396. width: 100%;
  397. display: flex;
  398. /* 选择偶数行 */
  399. &:nth-child(even) {
  400. background: linear-gradient(0deg, #008599 0%, #08596d 100%);
  401. }
  402.  
  403. .tableBodyList_span1 {
  404. font-family: Source Han Sans CN;
  405. font-weight: bold;
  406. font-size: 16px;
  407. color: #00f2ff;
  408. height: 60px;
  409. line-height: 60px;
  410. text-align: center;
  411. width: 10%;
  412. // background: #217e8cff;
  413. }
  414. .tableBodyList_span2 {
  415. font-family: Source Han Sans CN;
  416. font-weight: 400;
  417. font-size: 14px;
  418. color: #ffffff;
  419. height: 60px;
  420. line-height: 60px;
  421. text-align: center;
  422. width: 10%;
  423. }
  424. .tableBodyList_span3 {
  425. font-family: Source Han Sans CN;
  426. font-weight: 400;
  427. font-size: 14px;
  428. color: #ffffff;
  429. height: 60px;
  430. line-height: 60px;
  431. text-align: center;
  432. width: 25%;
  433. }
  434.  
  435. .tableBodyList_span4 {
  436. font-family: Source Han Sans CN;
  437. font-weight: 400;
  438. font-size: 14px;
  439. color: #ffffff;
  440. height: 60px;
  441. line-height: 60px;
  442. text-align: center;
  443. width: 35%;
  444. }
  445.  
  446. .tableBodyList_span5 {
  447. font-family: Source Han Sans CN;
  448. font-weight: 400;
  449. font-size: 14px;
  450. color: #ffffff;
  451. height: 60px;
  452. line-height: 60px;
  453. text-align: center;
  454. width: 20%;
  455. }
  456. }
  457. }
  458. }
  459. .ListBoxHeader {
  460. height: 44px;
  461. line-height: 50px;
  462. width: 98%;
  463. background: url('@/assets/newImgs/partBg.png') no-repeat;
  464. background-size: 100% 100%;
  465. display: flex;
  466. align-items: center;
  467. justify-content: space-between;
  468. margin: 7px 0px 0px 8px;
  469. .ListBoxHeader_font {
  470. font-family: PangMenZhengDao;
  471. font-weight: 400;
  472. font-size: 23px;
  473. color: #ebfeff;
  474. padding-left: 34px;
  475. }
  476. }
  477. </style>