RoadNetworkVideo.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <div class="menu-content">
  3. <div class="container">
  4. <div class="gradient-text common-dialog-title2">路网视频</div>
  5. <div class="box-left">
  6. <el-input v-model="queryParams.query.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>
  14. <div class="title-box">
  15. <div class="gradient-text">类型</div>
  16. </div>
  17. <div class="box">
  18. <div v-for="(item, index) in options" :key="index" :class="item.checked ? 'box-item box-item-active' : 'box-item'" @click="handleClick(item)">
  19. <div class="text1">{{ item.label }}</div>
  20. </div>
  21. </div>
  22. <div class="title-box">
  23. <div class="gradient-text">视频类型</div>
  24. </div>
  25. <div class="custom-table">
  26. <div class="th">
  27. <div class="td">
  28. <div style="width: 240px">
  29. <el-select
  30. v-model="queryParams.area"
  31. placeholder="所有区县"
  32. size="large"
  33. class="custom-select2"
  34. popper-class="custom-select-popper2"
  35. :teleported="false"
  36. @change="initData"
  37. >
  38. <el-option label="所有区县" value="" />
  39. <el-option v-for="item in district_type" :key="item.value" :label="item.label" :value="item.label" />
  40. </el-select>
  41. </div>
  42. </div>
  43. <div class="td">名称</div>
  44. </div>
  45. <div class="table-content">
  46. <div v-for="(item, index) in listData" :key="index" class="tr" @click="handleShowDialog(item)">
  47. <div class="td">{{ item.area }}</div>
  48. <div class="td">{{ item.name }}</div>
  49. </div>
  50. </div>
  51. </div>
  52. <pagination
  53. v-show="total > 0"
  54. v-model:page="queryParams.current"
  55. v-model:limit="queryParams.size"
  56. :total="total"
  57. layout="total, prev, pager, next"
  58. @pagination="initData"
  59. />
  60. </div>
  61. </template>
  62. <script lang="ts" setup>
  63. import { Search } from '@element-plus/icons-vue';
  64. import { getRoadVideoList } from '@/api/globalMap/roadNetworkVideo';
  65. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  66. const { district_type } = toRefs<any>(proxy?.useDict('district_type'));
  67. const handleShowVideo2 = inject('handleShowVideo2');
  68. const queryParams = reactive({
  69. current: 1,
  70. size: 10,
  71. query: {
  72. keyword: '',
  73. type: '1,2,3,4,5',
  74. area: ''
  75. }
  76. });
  77. let total = ref(0);
  78. const options = reactive([
  79. // { label: '检测站', value: '1', checked: true },
  80. { label: '收费站', value: '1', checked: true },
  81. { label: '高速公路', value: '2', checked: true },
  82. { label: '国道', value: '3', checked: true },
  83. { label: '省市县际道路', value: '4', checked: true },
  84. { label: '乡道', value: '5', checked: true },
  85. // { label: '高速服务区', value: '高速服务区', checked: true }
  86. ]);
  87. const listData = ref([]);
  88. const handleShowDialog = (row) => {
  89. handleShowVideo2(row);
  90. };
  91. const initData = () => {
  92. getRoadVideoList(queryParams).then((res) => {
  93. listData.value = res.rows;
  94. total.value = res.total;
  95. });
  96. };
  97. const handleCancel = () => {
  98. queryParams.query.keyword = '';
  99. initData();
  100. };
  101. const handleClick = (item) => {
  102. item.checked = !item.checked;
  103. let type = [];
  104. options.forEach((item) => {
  105. if (!!item.checked) {
  106. type.push(item.value);
  107. }
  108. });
  109. queryParams.query.type = type.toString();
  110. initData();
  111. };
  112. initData();
  113. </script>
  114. <style lang="scss" scoped>
  115. .menu-content {
  116. width: 574px;
  117. height: 581px;
  118. background: url('@/assets/images/map/rightMenu/content.png') no-repeat;
  119. background-size: 100% 100%;
  120. padding: 60px 10px 10px 15px;
  121. font-size: 14px;
  122. position: relative;
  123. color: #ffffff;
  124. }
  125. .custom-table {
  126. width: 550px;
  127. .table-content {
  128. height: 250px;
  129. overflow-y: auto;
  130. overflow-x: hidden;
  131. }
  132. .th {
  133. background: url('@/assets/images/map/rightMenu/th.png') no-repeat;
  134. background-size: 100% 100%;
  135. display: flex;
  136. padding: 7px 12px;
  137. height: 32px;
  138. }
  139. .tr {
  140. background: url('@/assets/images/map/rightMenu/td.png') no-repeat;
  141. background-size: 100% 100%;
  142. display: flex;
  143. padding: 7px 12px;
  144. &:hover {
  145. background: url('@/assets/images/map/rightMenu/td_checked.png') no-repeat;
  146. background-size: 100% 100%;
  147. }
  148. }
  149. .td {
  150. flex: 1;
  151. color: #edfaff;
  152. font-size: 14px;
  153. display: flex;
  154. justify-content: center;
  155. align-items: center;
  156. cursor: pointer;
  157. }
  158. .td-text {
  159. /* 设置字体透明 */
  160. color: transparent;
  161. /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
  162. -webkit-background-clip: text;
  163. /* 非Webkit内核浏览器需要使用标准前缀 */
  164. background-clip: text;
  165. font-family: 'YouSheBiaoTiHei';
  166. /* 设置线性渐变,从红色渐变到蓝色 */
  167. background-image: linear-gradient(to bottom, #ffffff 50%, #3075d3 100%);
  168. font-size: 14px;
  169. }
  170. .text-green {
  171. background-image: linear-gradient(to bottom, #ffffff 50%, #40c75f 100%);
  172. }
  173. .text-danger {
  174. background-image: linear-gradient(to bottom, #ffffff 50%, #ff2f3c 100%);
  175. }
  176. }
  177. .box-left {
  178. display: flex;
  179. align-items: center;
  180. margin-bottom: 10px;
  181. .btn {
  182. width: 59px;
  183. height: 23px;
  184. background: url('@/assets/images/map/rightMenu/potentialFloodHazard/btn.png') no-repeat;
  185. background-size: 100% 100%;
  186. display: flex;
  187. justify-content: center;
  188. align-items: center;
  189. cursor: pointer;
  190. margin-left: 20px;
  191. }
  192. }
  193. .box {
  194. display: flex;
  195. flex-wrap: wrap;
  196. font-size: 14px;
  197. .box-item {
  198. display: flex;
  199. justify-content: space-between;
  200. padding: 12px 63px 0 34px;
  201. cursor: pointer;
  202. width: 184px;
  203. height: 43px;
  204. background: url('@/assets/images/map/rightMenu/tag.png') no-repeat;
  205. background-size: 100% 100%;
  206. margin-left: -60px;
  207. &:nth-child(1),
  208. &:nth-child(5) {
  209. margin-left: -10px;
  210. }
  211. &:hover {
  212. background: url('@/assets/images/map/rightMenu/tagActive.png') no-repeat;
  213. background-size: 100% 100%;
  214. }
  215. .text1 {
  216. flex: 1;
  217. color: #ffffff;
  218. overflow: hidden;
  219. white-space: nowrap;
  220. text-overflow: ellipsis;
  221. }
  222. .text2 {
  223. font-family: 'BEBAS-1';
  224. margin-left: 25px;
  225. font-size: 38px;
  226. color: #00e8ff;
  227. }
  228. }
  229. .box-item-active {
  230. background: url('@/assets/images/map/rightMenu/tagActive.png') no-repeat;
  231. background-size: 100% 100%;
  232. }
  233. }
  234. .title-box {
  235. height: 27px;
  236. background: url('@/assets/images/map/rightMenu/titleBox2.png') no-repeat bottom left;
  237. background-size: 135px 20px;
  238. padding-left: 28px;
  239. font-size: 16px;
  240. color: #f4f7fa;
  241. display: flex;
  242. align-items: center;
  243. }
  244. .pagination-container {
  245. height: 64px;
  246. margin: 8px 0 0 0;
  247. }
  248. :deep(.el-pagination__total) {
  249. color: #a7ccdf !important;
  250. }
  251. :deep(.el-pagination) {
  252. .btn-next,
  253. .btn-prev {
  254. background-color: transparent !important;
  255. border: none !important;
  256. .el-icon {
  257. color: #a7ccdf !important;
  258. }
  259. }
  260. .btn-prev:disabled,
  261. .btn-next:disabled {
  262. background-color: transparent !important;
  263. border: none !important;
  264. }
  265. .el-pager li {
  266. text-align: center;
  267. color: #a7ccdf !important;
  268. background-color: #0e3064 !important;
  269. border: 1px solid #0c57a7 !important;
  270. &:hover {
  271. background-color: #038dff !important;
  272. border: 1px solid #038dff !important;
  273. }
  274. }
  275. .el-pager li.is-active {
  276. background-color: #038dff !important;
  277. border: 1px solid #038dff !important;
  278. }
  279. }
  280. </style>