PotentialFloodHazard.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <template>
  2. <div class="menu-content">
  3. <div class="gradient-text title">易涝隐患点</div>
  4. <div class="box1">
  5. <!-- <div class="title-box">列表</div>-->
  6. <div class="date-box">
  7. <div class="text1">更新</div>
  8. <div class="text-box">
  9. <div class="text2">{{ timeArr[0] }}</div>
  10. <div class="text1">年</div>
  11. <div class="text2">{{ timeArr[1] }}</div>
  12. <div class="text1">月</div>
  13. <div class="text2">{{ timeArr[2] }}</div>
  14. <div class="text1">日</div>
  15. </div>
  16. </div>
  17. </div>
  18. <div class="box2">
  19. <div class="box-left">
  20. <el-input v-model="queryParams.keyword" class="custom-input" placeholder="搜索" style="width: 600px" @input="initData">
  21. <template #prefix>
  22. <el-icon class="el-input__icon"><search /></el-icon>
  23. </template>
  24. </el-input>
  25. <div class="btn" @click="handleCancel">取消</div>
  26. </div>
  27. <div class="btn2" @click="showMoreVideos">
  28. <div class="video-icon"></div>
  29. <div>全部视频</div>
  30. </div>
  31. </div>
  32. <div class="custom-table">
  33. <div class="table-header">
  34. <div class="td">
  35. <el-select
  36. v-model="queryParams.area"
  37. placeholder="所有区县"
  38. size="large"
  39. class="custom-select2"
  40. popper-class="custom-select-popper2"
  41. :teleported="false"
  42. @change="initData"
  43. >
  44. <el-option label="所有区县" value="" />
  45. <el-option v-for="item in district_type" :key="item.value" :label="item.label" :value="item.label" />
  46. </el-select>
  47. </div>
  48. <div class="td">易涝点名称</div>
  49. <div class="td">提供单位</div>
  50. </div>
  51. <div class="table-content">
  52. <div v-for="(item, index) in dataList" :key="index" class="tr" @click="handleShowDialog(item)">
  53. <div class="td">{{ item.area }}</div>
  54. <div class="td btn3">
  55. <div class="video-icon"></div>
  56. {{ item.flood_name }}
  57. </div>
  58. <div class="td">{{ item.unit }}</div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <NearbyVideos v-if="showNearbyVideos" v-model="showNearbyVideos" :location="location" />
  64. <NearbyVideos v-if="showNearbyVideos2" v-model="showNearbyVideos2" :getDataMethod="getDataMethod" />
  65. </template>
  66. <script lang="ts" setup>
  67. import { Search } from '@element-plus/icons-vue';
  68. import {
  69. getWaterloggedAllVideoInfo,
  70. getWaterloggedRoadsList,
  71. getWaterloggedRoadsUpdateTime
  72. } from '@/api/globalMap/potentialFloodHazard';
  73. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  74. const { district_type } = toRefs<any>(proxy?.useDict('district_type'));
  75. const getMap = inject('getMap');
  76. const queryParams = reactive({
  77. area: '',
  78. keyword: ''
  79. });
  80. const dataList = ref([]);
  81. const showNearbyVideos = ref(false);
  82. const showNearbyVideos2 = ref(false);
  83. const getDataMethod = ref(null);
  84. let location = ref([]);
  85. const initData = () => {
  86. getWaterloggedRoadsList(queryParams).then((res) => {
  87. dataList.value = res.data.list;
  88. });
  89. };
  90. const handleCancel = () => {
  91. queryParams.keyword = '';
  92. initData();
  93. };
  94. const showMoreVideos = () => {
  95. getDataMethod.value = getWaterloggedAllVideoInfo;
  96. showNearbyVideos2.value = true;
  97. };
  98. const handleShowDialog = (item) => {
  99. location.value = [item.lng, item.lat];
  100. getMap().setCenter(location.value);
  101. showNearbyVideos.value = true;
  102. };
  103. let timeArr = ref([]);
  104. onMounted(() => {
  105. initData();
  106. getWaterloggedRoadsUpdateTime().then((res) => {
  107. const dateTimeStr = res.data.list[0].update_time;
  108. let parts = dateTimeStr.split(' ');
  109. timeArr.value = parts[0].split('-');
  110. });
  111. });
  112. </script>
  113. <style lang="scss" scoped>
  114. .menu-content {
  115. width: 1584px;
  116. height: 2066px;
  117. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/dialog.png') no-repeat;
  118. padding: 130px 30px 20px 40px;
  119. font-size: 36px;
  120. position: relative;
  121. color: #ffffff;
  122. .box1 {
  123. display: flex;
  124. justify-content: space-between;
  125. align-items: flex-end;
  126. .title-box {
  127. width: 370px;
  128. height: 35px;
  129. background-image: url('@/assets/images/map/rightMenu/rainMonitor/titleBox.png');
  130. background-repeat: no-repeat;
  131. background-position: bottom left;
  132. font-size: 44px;
  133. color: #fff;
  134. padding-left: 50px;
  135. display: flex;
  136. align-items: center;
  137. margin-bottom: 30px;
  138. }
  139. .date-box {
  140. width: 672px;
  141. height: 144px;
  142. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/dateBox.png') no-repeat;
  143. display: flex;
  144. align-items: center;
  145. padding-left: 200px;
  146. .text-box {
  147. display: flex;
  148. align-content: center;
  149. padding-left: 15px;
  150. }
  151. .text1 {
  152. font-size: 36px;
  153. }
  154. .text2 {
  155. font-size: 40px;
  156. color: transparent;
  157. background-image: linear-gradient(to bottom, #ffffff 25%, #2b72d6 100%);
  158. -webkit-background-clip: text;
  159. background-clip: text;
  160. display: inline-block;
  161. font-family: BEBAS-1;
  162. margin: 0 15px;
  163. }
  164. }
  165. }
  166. .box2 {
  167. display: flex;
  168. justify-content: space-between;
  169. align-items: baseline;
  170. .box-left {
  171. display: flex;
  172. .btn {
  173. width: 140px;
  174. height: 56px;
  175. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/btn.png') no-repeat;
  176. display: flex;
  177. justify-content: center;
  178. align-items: center;
  179. cursor: pointer;
  180. margin-left: 20px;
  181. }
  182. }
  183. .btn2 {
  184. width: 300px;
  185. height: 120px;
  186. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/btn2.png') no-repeat;
  187. display: flex;
  188. justify-content: center;
  189. align-items: center;
  190. cursor: pointer;
  191. margin-left: 20px;
  192. color: #edfaff;
  193. font-size: 32px;
  194. .video-icon {
  195. width: 41px;
  196. height: 38px;
  197. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/video.png') no-repeat;
  198. display: flex;
  199. }
  200. }
  201. }
  202. }
  203. .custom-table {
  204. .table-header {
  205. width: 1490px;
  206. height: 88px;
  207. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/header.png') no-repeat;
  208. display: flex;
  209. align-items: center;
  210. padding: 0 30px;
  211. }
  212. .td {
  213. &:nth-child(1) {
  214. width: 260px;
  215. }
  216. &:nth-child(2) {
  217. flex: 5;
  218. }
  219. &:nth-child(3) {
  220. flex: 2;
  221. }
  222. }
  223. .table-content {
  224. height: 1530px;
  225. overflow-y: auto;
  226. .tr {
  227. width: 1490px;
  228. height: 88px;
  229. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/tr.png') no-repeat;
  230. background-size: 100% 100%;
  231. display: flex;
  232. align-items: center;
  233. margin-top: 8px;
  234. padding: 0 30px;
  235. cursor: default;
  236. &:hover {
  237. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/trActive.png') no-repeat;
  238. }
  239. .td {
  240. white-space: nowrap;
  241. text-overflow: ellipsis;
  242. overflow: hidden;
  243. }
  244. .btn3 {
  245. cursor: pointer;
  246. color: #00d0ee;
  247. display: flex;
  248. .video-icon {
  249. width: 54px;
  250. height: 54px;
  251. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/icon1.png') no-repeat;
  252. }
  253. }
  254. }
  255. }
  256. }
  257. .title {
  258. font-size: 60px;
  259. position: absolute;
  260. top: 30px;
  261. left: 160px;
  262. }
  263. </style>