CommonVideo.vue 4.9 KB

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