Mitigation.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <div class="menu-content">
  3. <div class="container">
  4. <div class="gradient-text title">防灾救援</div>
  5. <div class="box-left">
  6. <el-input v-model="queryParams.keyword" class="custom-input" placeholder="搜索" @input="initData">
  7. <template #prefix>
  8. <el-icon class="el-input__icon"><search /></el-icon>
  9. </template>
  10. </el-input>
  11. <div class="btn" @click="handleCancel">取消</div>
  12. </div>
  13. <!-- <div class="gradient-text">视频类型</div>-->
  14. <div class="custom-table">
  15. <div class="th">
  16. <div class="td">
  17. <div style="width: 240px">
  18. <el-select
  19. v-model="queryParams.area"
  20. placeholder="所有区县"
  21. size="large"
  22. class="custom-select2"
  23. popper-class="custom-select-popper2"
  24. :teleported="false"
  25. @change="initData"
  26. >
  27. <el-option label="所有区县" value="" />
  28. <el-option v-for="item in district_type" :key="item.value" :label="item.label" :value="item.label" />
  29. </el-select>
  30. </div>
  31. </div>
  32. <div class="td">名称</div>
  33. </div>
  34. <div class="table-content">
  35. <div v-for="(item, index) in listData" :key="index" class="tr" @click="handleShowDialog(item)">
  36. <div class="td">{{ item.area }}</div>
  37. <div class="td">{{ item.name }}</div>
  38. </div>
  39. </div>
  40. </div>
  41. <Dialog v-if="showDialog" v-model="showDialog" title="防灾救援" width="2500px" height="1200px">
  42. <div style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center">
  43. <HKVideo :dot_data="videoMonitorData" />
  44. </div>
  45. </Dialog>
  46. </div>
  47. </div>
  48. </template>
  49. <script lang="ts" setup>
  50. import { Search } from '@element-plus/icons-vue';
  51. import Dialog from './Dialog.vue';
  52. import { getRescue } from '@/api/globalMap/mitigation';
  53. import { deepClone } from '@/utils';
  54. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  55. const { district_type } = toRefs<any>(proxy?.useDict('district_type'));
  56. const queryParams = reactive({
  57. current: 1,
  58. size: 10,
  59. keyword: '',
  60. area: ''
  61. });
  62. const total = ref(0);
  63. const listData = ref([]);
  64. let showDialog = ref(false);
  65. let videoMonitorData = ref({});
  66. const handleShowDialog = (row) => {
  67. showDialog.value = false;
  68. nextTick(() => {
  69. videoMonitorData.value = row;
  70. showDialog.value = true;
  71. });
  72. };
  73. const initData = () => {
  74. let newQueryParams = deepClone(queryParams);
  75. newQueryParams.query = {
  76. area: queryParams.area,
  77. keyword: queryParams.keyword
  78. };
  79. delete newQueryParams.area;
  80. delete newQueryParams.keyword;
  81. getRescue(newQueryParams).then((res) => {
  82. listData.value = res.rows;
  83. total.value = res.total;
  84. });
  85. };
  86. initData();
  87. </script>
  88. <style lang="scss" scoped>
  89. .menu-content {
  90. width: 1579px;
  91. height: 1394px;
  92. background: url('@/assets/images/map/rightMenu/content.png') no-repeat;
  93. padding: 130px 20px 20px 20px;
  94. font-size: 36px;
  95. position: relative;
  96. color: #ffffff;
  97. }
  98. .title {
  99. font-size: 60px;
  100. position: absolute;
  101. top: 30px;
  102. left: 160px;
  103. }
  104. .custom-table {
  105. width: 1499px;
  106. .table-content {
  107. height: 880px;
  108. overflow-y: auto;
  109. overflow-x: hidden;
  110. }
  111. .th {
  112. width: 1499px;
  113. height: 151px;
  114. background: url('@/assets/images/map/rightMenu/th.png') no-repeat;
  115. display: flex;
  116. }
  117. .tr {
  118. height: 139px;
  119. background: url('@/assets/images/map/rightMenu/td.png') no-repeat;
  120. //margin-left: -23px;
  121. display: flex;
  122. padding-right: 20px;
  123. &:hover {
  124. background: url('@/assets/images/map/rightMenu/td_checked.png') no-repeat;
  125. }
  126. }
  127. .td {
  128. flex: 1;
  129. color: #edfaff;
  130. font-size: 38px;
  131. display: flex;
  132. justify-content: center;
  133. align-items: center;
  134. cursor: pointer;
  135. }
  136. .td-text {
  137. /* 设置字体透明 */
  138. color: transparent;
  139. /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
  140. -webkit-background-clip: text;
  141. /* 非Webkit内核浏览器需要使用标准前缀 */
  142. background-clip: text;
  143. font-family: 'YouSheBiaoTiHei';
  144. /* 设置线性渐变,从红色渐变到蓝色 */
  145. background-image: linear-gradient(to bottom, #ffffff 50%, #3075d3 100%);
  146. font-size: 48px;
  147. }
  148. .text-green {
  149. background-image: linear-gradient(to bottom, #ffffff 50%, #40c75f 100%);
  150. }
  151. .text-danger {
  152. background-image: linear-gradient(to bottom, #ffffff 50%, #ff2f3c 100%);
  153. }
  154. }
  155. .box-left {
  156. display: flex;
  157. margin-top: 20px;
  158. margin-bottom: 20px;
  159. .btn {
  160. width: 140px;
  161. min-width: 140px;
  162. height: 56px;
  163. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/btn.png') no-repeat;
  164. display: flex;
  165. justify-content: center;
  166. align-items: center;
  167. cursor: pointer;
  168. margin-left: 20px;
  169. }
  170. }
  171. </style>