tranBureauVideo.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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="initData2">
  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="initData2"
  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">
  33. <div style="width: 240px">
  34. <el-select
  35. v-model="queryParams.video_type"
  36. placeholder="类型"
  37. size="large"
  38. class="custom-select2"
  39. popper-class="custom-select-popper2"
  40. :teleported="false"
  41. @change="initData2"
  42. >
  43. <el-option label="所有类型" value="" />
  44. <el-option v-for="item in videoType" :key="item.dictCode" :label="item.dictLabel" :value="item.dictValue" />
  45. </el-select>
  46. </div>
  47. </div>
  48. <div class="td">名称</div>
  49. </div>
  50. <div class="table-content">
  51. <div v-for="(item, index) in listData" :key="index" class="tr" @click="handleShowDialog(item)">
  52. <div class="td">{{ item.area }}</div>
  53. <div class="td">{{ item.video_type_label }}</div>
  54. <div class="td">{{ item.name }}</div>
  55. </div>
  56. <div class="footer">
  57. <pagination
  58. v-show="total > 0"
  59. v-model:page="queryParams.page"
  60. v-model:limit="queryParams.pageSize"
  61. :total="total"
  62. layout="total, prev, pager, next"
  63. @pagination="initData2"
  64. />
  65. </div>
  66. </div>
  67. </div>
  68. <Dialog v-if="showDialog" v-model="showDialog" type="md" title="交通局视频" hide-footer>
  69. <div style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center">
  70. <HKVideo :dot_data="videoMonitorData" />
  71. </div>
  72. </Dialog>
  73. </div>
  74. </div>
  75. </template>
  76. <script lang="ts" setup>
  77. import { Search } from '@element-plus/icons-vue';
  78. import { getRescue } from '@/api/globalMap/mitigation';
  79. import { deepClone } from '@/utils';
  80. import { getVideoList, getVideoType } from '@/api/globalMap/tranBureauVideo';
  81. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  82. const { district_type, danger_type } = toRefs<any>(proxy?.useDict('district_type', 'danger_type'));
  83. const queryParams = reactive({
  84. page: 1,
  85. pageSize: 10,
  86. keyword: '',
  87. area: '',
  88. video_type: ''
  89. });
  90. const total = ref(0);
  91. const listData = ref([]);
  92. const videoType = ref([]);
  93. let showDialog = ref(false);
  94. let videoMonitorData = ref({});
  95. const handleShowDialog = (row) => {
  96. showDialog.value = false;
  97. nextTick(() => {
  98. videoMonitorData.value = row;
  99. showDialog.value = true;
  100. });
  101. };
  102. const initData = () => {
  103. getVideoType().then((res) => {
  104. videoType.value = res.data;
  105. });
  106. };
  107. const initData2 = () => {
  108. getVideoList(queryParams).then((res) => {
  109. listData.value = res.data;
  110. total.value = res.total;
  111. });
  112. };
  113. const handleCancel = () => {
  114. queryParams.keyword = '';
  115. initData2();
  116. };
  117. initData2();
  118. initData();
  119. </script>
  120. <style lang="scss" scoped>
  121. .menu-content {
  122. width: 1579px;
  123. height: 1394px;
  124. background: url('@/assets/images/map/rightMenu/content.png') no-repeat;
  125. padding: 130px 20px 20px 20px;
  126. font-size: 36px;
  127. position: relative;
  128. color: #ffffff;
  129. }
  130. .title {
  131. font-size: 60px;
  132. position: absolute;
  133. top: 30px;
  134. left: 160px;
  135. }
  136. .custom-table {
  137. width: 1499px;
  138. .table-content {
  139. height: 880px;
  140. overflow-y: auto;
  141. overflow-x: hidden;
  142. }
  143. .th {
  144. width: 1499px;
  145. height: 151px;
  146. background: url('@/assets/images/map/rightMenu/th.png') no-repeat;
  147. display: flex;
  148. }
  149. .tr {
  150. height: 139px;
  151. background: url('@/assets/images/map/rightMenu/td.png') no-repeat;
  152. //margin-left: -23px;
  153. display: flex;
  154. padding-right: 20px;
  155. &:hover {
  156. background: url('@/assets/images/map/rightMenu/td_checked.png') no-repeat;
  157. }
  158. }
  159. .td {
  160. flex: 1;
  161. color: #edfaff;
  162. font-size: 38px;
  163. display: flex;
  164. justify-content: center;
  165. align-items: center;
  166. cursor: pointer;
  167. }
  168. .td-text {
  169. /* 设置字体透明 */
  170. color: transparent;
  171. /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
  172. -webkit-background-clip: text;
  173. /* 非Webkit内核浏览器需要使用标准前缀 */
  174. background-clip: text;
  175. font-family: 'YouSheBiaoTiHei';
  176. /* 设置线性渐变,从红色渐变到蓝色 */
  177. background-image: linear-gradient(to bottom, #ffffff 50%, #3075d3 100%);
  178. font-size: 48px;
  179. }
  180. .text-green {
  181. background-image: linear-gradient(to bottom, #ffffff 50%, #40c75f 100%);
  182. }
  183. .text-danger {
  184. background-image: linear-gradient(to bottom, #ffffff 50%, #ff2f3c 100%);
  185. }
  186. }
  187. .box-left {
  188. display: flex;
  189. margin-top: 20px;
  190. margin-bottom: 20px;
  191. .btn {
  192. width: 140px;
  193. min-width: 140px;
  194. height: 56px;
  195. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/btn.png') no-repeat;
  196. display: flex;
  197. justify-content: center;
  198. align-items: center;
  199. cursor: pointer;
  200. margin-left: 20px;
  201. }
  202. }
  203. .footer {
  204. height: 64px;
  205. display: flex;
  206. justify-content: flex-end;
  207. margin-bottom: 30px;
  208. .pagination-container {
  209. height: 64px;
  210. margin: 0;
  211. }
  212. :deep(.el-pagination__total) {
  213. color: #a7ccdf;
  214. font-size: 32px;
  215. }
  216. :deep(.el-pagination) {
  217. .btn-next,
  218. .btn-prev {
  219. background-color: transparent;
  220. border: none;
  221. .el-icon {
  222. font-size: 22px;
  223. color: #a7ccdf;
  224. }
  225. }
  226. .btn-prev:disabled,
  227. .btn-next:disabled {
  228. background-color: transparent;
  229. border: none;
  230. }
  231. .el-pager li {
  232. width: 64px;
  233. height: 64px;
  234. line-height: 64px;
  235. text-align: center;
  236. font-size: 32px;
  237. color: #a7ccdf;
  238. background-color: #0e3064;
  239. border: 1px solid #0c57a7;
  240. margin: 0 6px;
  241. &:hover {
  242. background-color: #038dff;
  243. border: 1px solid #038dff;
  244. }
  245. }
  246. .el-pager li.is-active {
  247. background-color: #038dff;
  248. border: 1px solid #038dff;
  249. }
  250. }
  251. }
  252. </style>