feat:完善功能

This commit is contained in:
zjc
2025-01-16 12:37:23 +08:00
parent ef5cb642ca
commit 2a11f91d36
43 changed files with 2644 additions and 3108 deletions

View File

@@ -1,30 +1,26 @@
<template>
<div class="n-box-traffic">
<!-- nav -->
<div class="left-nav">
<div class="top-box">
<div class="ul">
<div class="li active">路段1</div>
<div class="li">路段1</div>
<div class="li">路段1</div>
<div class="li">路段1</div>
<div class="li">路段1</div>
<div class="box-2">
<ul class="nav">
<li
class="nav-item"
:class="{ active: current == index }"
v-for="(item, index) in 20"
:key="index"
@click="handleNav(index)"
>路段{{ index + 1 }}
</li>
</ul>
<div class="map-box">
<Map />
<div class="video-list">
<div class="li">
<vue3VideoPlay v-bind="options" />
</div>
</div>
</div>
<div class="traffic-box-2">
<div class="map-box">
<Map></Map>
<!-- 视频 -->
<div class="video-list">
<div class="li">
<vue3VideoPlay v-bind="options" />
</div>
<div class="li">
<vue3VideoPlay v-bind="options" />
</div>
<div class="menu">查看更多</div>
<div class="li">
<vue3VideoPlay v-bind="options" />
</div>
<div class="menu">查看更多</div>
</div>
</div>
</div>
@@ -32,6 +28,7 @@
<script setup>
import Map from '@/components/Map/marker.vue'
let current = ref(0)
const options = reactive({
src: 'http://192.168.1.60:8080/live/340200000013200000011_34020000001320000001/hls.m3u8', //视频源
type: 'm3u8', //视频类型
@@ -59,56 +56,47 @@
'fullScreen'
] //显示所有按钮,
})
const handleNav = (e) => {
current.value = e
}
</script>
<style lang="scss" scoped>
.n-box-traffic {
.box-2 {
display: flex;
margin-top: vh(120);
}
.left-nav {
.nav {
margin-left: vw(10);
// margin-top:vh(35);
// width:vw(250);
.top-box {
text-align: left;
font-weight: 400;
overflow: auto;
height: vh(950);
&::-webkit-scrollbar {
width: vw(0); /* 滚动条的宽度 */
}
&-item {
cursor: pointer;
margin-bottom: vw(15);
width: vw(120);
height: vh(54);
font-weight: bold;
font-size: vw(18);
color: rgba(255, 255, 255, 0.7);
line-height: 21px;
text-align: left;
font-style: normal;
text-transform: none;
.title {
font-weight: 600;
font-size: vw(15);
text-align: left;
font-style: normal;
text-transform: none;
height: vh(35);
line-height: vh(34);
padding-left: vw(20);
// background: linear-gradient(90deg, #FFFFFF 0%, #75C1FF 100%);
}
.ul {
.li {
background: url('/src/assets/images/m-nav-bg-1.png');
background-size: 100% 100%;
width: vw(120);
height: vh(58);
line-height: vh(58);
text-align: center;
margin-bottom: vh(15);
}
.active {
background: url('/src/assets/images/m-nav-bg-2.png');
background-size: 100% 100%;
// width:vw(178);
}
}
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
background: url('/src/assets/images/m-nav-bg-1.png');
background-size: 100% 100%;
}
.active {
background: url('/src/assets/images/m-nav-bg-2.png');
background-size: 100% 100%;
}
}
.traffic-box-2 {
.map-box {
position: relative;
z-index: 9;
width: vw(1290);
@@ -118,41 +106,36 @@
box-sizing: border-box;
background-image: url('/src/assets/images/map-bg-2.png');
background-size: 100% 100%;
.map-box {
width: 100%;
height: 100%;
position: relative;
.video-list {
width: vw(320);
height: vh(120);
background: #0a254b;
border-radius: 0px 0px 0px 0px;
position: absolute;
bottom: vw(10);
right: vw(10);
z-index: 99;
display: flex;
justify-content: center;
align-items: center;
.li {
width: vw(140);
height: vh(105);
background-image: url('/src/assets/images/small-v-bg.png');
background-size: 100% 100%;
margin-right: vw(6);
}
.menu {
width: vw(12);
height: vh(60);
font-family: Inter, Inter;
font-weight: 400;
font-size: vw(12);
color: #ffffff;
line-height: vh(14);
text-align: left;
font-style: normal;
text-transform: none;
}
.video-list {
width: vw(320);
height: vh(120);
background: #0a254b;
border-radius: 0px 0px 0px 0px;
position: absolute;
bottom: vw(40);
right: vw(40);
z-index: 99;
display: flex;
justify-content: center;
align-items: center;
.li {
width: vw(140);
height: vh(105);
background-image: url('/src/assets/images/small-v-bg.png');
background-size: 100% 100%;
margin-right: vw(6);
}
.menu {
width: vw(12);
height: vh(60);
font-family: Inter, Inter;
font-weight: 400;
font-size: vw(12);
color: #ffffff;
line-height: vh(14);
text-align: left;
font-style: normal;
text-transform: none;
}
}
}