feat:完善功能
This commit is contained in:
@@ -29,25 +29,45 @@
|
||||
|
||||
const { id, setOption } = useEchart()
|
||||
|
||||
var defaultCofig = {
|
||||
let params = null
|
||||
|
||||
let getTotal = () => {
|
||||
return props.dataList.reduce((per, cur) => {
|
||||
return per + cur.count
|
||||
}, 0)
|
||||
}
|
||||
|
||||
let defaultCofig = {
|
||||
color: [],
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
bottom: 'center',
|
||||
y: 'center',
|
||||
left: '50%',
|
||||
itemWidth: fitChartSize(12),
|
||||
itemHeight: fitChartSize(12),
|
||||
itemGap: fitChartSize(10),
|
||||
itemGap: fitChartSize(6),
|
||||
formatter: (name) => {
|
||||
let obj = props.dataList.find((item) => item.name == name)
|
||||
return `{name|${name}} {value|${obj?.value}}{value|%}`
|
||||
},
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
fontSize: fitChartSize(16)
|
||||
rich: {
|
||||
name: {
|
||||
color: '#fff',
|
||||
fontSize: fitChartSize(12)
|
||||
},
|
||||
value: {
|
||||
color: '#fff',
|
||||
fontSize: fitChartSize(12)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
center: ['30%', '50%'],
|
||||
radius: ['30%', '40%'],
|
||||
center: ['24%', '50%'],
|
||||
radius: ['35%', '50%'],
|
||||
itemStyle: {
|
||||
borderWidth: fitChartSize(4),
|
||||
borderColor: '#093672'
|
||||
@@ -64,7 +84,7 @@
|
||||
padding: [0, 0, 5, 0]
|
||||
},
|
||||
name: {
|
||||
color: '#7894A8',
|
||||
color: '#fff',
|
||||
fontSize: fitChartSize(12)
|
||||
}
|
||||
}
|
||||
@@ -79,28 +99,40 @@
|
||||
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(newVal) => {
|
||||
if (newVal.length > 0) {
|
||||
nextTick(() => {
|
||||
defaultCofig.color = props.colors
|
||||
defaultCofig.series[0].data = props.dataList
|
||||
defaultCofig.series[0].label.formatter = () => {
|
||||
return `{value|${props.total}}` + '\n' + `{name|工单总数}`
|
||||
}
|
||||
setOption({
|
||||
...defaultCofig,
|
||||
...props.config
|
||||
})
|
||||
})
|
||||
(val) => {
|
||||
if (val.length > 0) {
|
||||
setTimeout(() => {
|
||||
init()
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
const init = () => {
|
||||
if (!params) {
|
||||
defaultCofig.color = props.colors
|
||||
defaultCofig.series[0].data = props.dataList
|
||||
defaultCofig.series[0].label.formatter = () => {
|
||||
return `{value|${getTotal()}}` + '\n' + `{name|告警总数}`
|
||||
}
|
||||
params = {
|
||||
...defaultCofig,
|
||||
...props.config
|
||||
}
|
||||
} else {
|
||||
params.series[0].data = props.dataList
|
||||
params.series[0].label.formatter = () => {
|
||||
return `{value|${getTotal()}}` + '\n' + `{name|告警总数}`
|
||||
}
|
||||
}
|
||||
setOption(params)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.alarmRate {
|
||||
width: vw(240);
|
||||
width: vw(380);
|
||||
height: vh(200);
|
||||
}
|
||||
</style>
|
||||
|
||||
111
src/views/monitor/components/alarmToday.vue
Normal file
111
src/views/monitor/components/alarmToday.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div class="alarm-today" :id="id" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { fitChartSize } from '@/utils/dataUtil'
|
||||
import { useEchart } from '@/hooks/echart'
|
||||
|
||||
const { id, setOption } = useEchart()
|
||||
|
||||
let props = defineProps({
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.list,
|
||||
(val) => {
|
||||
if (val.length > 0) {
|
||||
setTimeout(() => {
|
||||
init()
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
let params = null
|
||||
|
||||
const getSeriesData = () => {
|
||||
return props.list.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
itemStyle: {
|
||||
color: '#0D53FF'
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const getXAxisData = () => {
|
||||
return props.list.map((item) => item.name)
|
||||
}
|
||||
const init = () => {
|
||||
if (!params) {
|
||||
params = {
|
||||
grid: {
|
||||
left: '4%',
|
||||
right: '4%',
|
||||
top: '10%',
|
||||
bottom: '4%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
boundaryGap: true,
|
||||
type: 'category',
|
||||
data: getXAxisData(),
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(5, 72, 134, 1)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: fitChartSize(12),
|
||||
color: '#fff'
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
fontSize: fitChartSize(12),
|
||||
color: 'rgba(255,255,255,0.9)'
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'bar',
|
||||
data: getSeriesData(),
|
||||
barWidth: fitChartSize(20),
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontSize: fitChartSize(10)
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
} else {
|
||||
params.xAxis.data = getXAxisData()
|
||||
params.series[0].data = getSeriesData()
|
||||
}
|
||||
setOption(params)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.alarm-today {
|
||||
width: vw(400);
|
||||
height: vh(200);
|
||||
}
|
||||
</style>
|
||||
@@ -1,149 +1,117 @@
|
||||
<template>
|
||||
<div class="box-1">
|
||||
<Title1 title="交通信息" />
|
||||
<div class="traffic">
|
||||
<div class="traffic-item">
|
||||
<span class="traffic-item__title">总核心监控点位</span>
|
||||
<countup class="traffic-item__value--primary" end-val="895" />
|
||||
<template v-if="!scenicSpotId">
|
||||
<Title1 title="交通信息" />
|
||||
<div class="traffic">
|
||||
<div class="traffic-item" v-for="(item, index) in trafficData" :key="index">
|
||||
<span class="traffic-item__title">{{ item.name }}</span>
|
||||
<countup
|
||||
:class="{
|
||||
'traffic-item__value--primary': item.type == 0,
|
||||
'traffic-item__value--success': item.type == 1,
|
||||
'traffic-item__value--error': item.type == 2
|
||||
}"
|
||||
:end-val="item.value"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="traffic-item">
|
||||
<span class="traffic-item__title">总核心监控点位</span>
|
||||
<countup class="traffic-item__value--success" end-val="895" />
|
||||
<Title1 title="景区信息" />
|
||||
<div class="scenic">
|
||||
<div class="scenic-item" v-for="(item, index) in scenicSpotData.headList" :key="index">
|
||||
<span class="scenic-item__label">{{ item.name }}</span>
|
||||
<countup class="scenic-item__value" :end-val="item.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="traffic-item">
|
||||
<span class="traffic-item__title">总核心监控点位</span>
|
||||
<countup class="traffic-item__value--error" end-val="895" />
|
||||
<div class="flex pt-20">
|
||||
<div class="box">
|
||||
<Title3 title="异常告警" />
|
||||
<Line :width="370" :height="180" :data="abnormalData" :xAxisData="abnormalXAxisData" />
|
||||
</div>
|
||||
<div class="box">
|
||||
<Title3 title="异常告警占比" />
|
||||
<div class="flex">
|
||||
<alarmRate :dataList="scenicSpotData.dataLists" />
|
||||
<!-- <alarmList /> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Title1 title="景区信息" />
|
||||
<div class="scenic">
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">核心路段监控点位</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
<Title1 title="交通信息" />
|
||||
<div class="scenic">
|
||||
<div
|
||||
class="scenic-item"
|
||||
v-for="(item, index) in trafficAbnormalityData.headList"
|
||||
:key="index"
|
||||
>
|
||||
<span class="scenic-item__label">{{ item.name }}</span>
|
||||
<countup class="scenic-item__value" :end-val="item.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">核心景区分析点位</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">异常点位</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">异常告警</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">已处理</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex pt-20">
|
||||
<div class="box">
|
||||
<Title3 title="异常告警" />
|
||||
<Line
|
||||
:width="370"
|
||||
:height="180"
|
||||
:config="{ legend: false }"
|
||||
:data="[
|
||||
{
|
||||
name: '企业数',
|
||||
data: [64, 159, 112, 86, 151, 131, 118, 232, 23, 64, 159, 112, 86, 151, 131, 118]
|
||||
}
|
||||
]"
|
||||
:xAxisData="[
|
||||
'12-16 10:00',
|
||||
'12-16 14:00',
|
||||
'12-16 16:00',
|
||||
'12-16 22:00',
|
||||
'12-17 02:00',
|
||||
'12-17 06:00',
|
||||
'12-17 10:00',
|
||||
'12-17 14:00',
|
||||
'12-17 16:00',
|
||||
'12-16 22:00',
|
||||
'12-18 02:00',
|
||||
'12-18 06:00',
|
||||
'12-8 10:00',
|
||||
'12-18 14:00',
|
||||
'12-18 16:00',
|
||||
'12-18 20:00'
|
||||
]"
|
||||
/>
|
||||
<div class="flex pt-20">
|
||||
<div class="box">
|
||||
<Title3 title="拥堵告警" />
|
||||
<Line :width="370" :height="180" :data="jamlData" :xAxisData="jamXAxisData" />
|
||||
</div>
|
||||
<div class="box">
|
||||
<Title3 title="拥堵告警占比" />
|
||||
<div class="flex">
|
||||
<alarmRate :dataList="trafficAbnormalityData.dataLists" />
|
||||
<!-- <alarmList /> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="box">
|
||||
<Title3 title="异常告警占比" />
|
||||
<div class="flex">
|
||||
<alarmRate :dataList="dataList" />
|
||||
<alarmList />
|
||||
<template v-if="scenicSpotId">
|
||||
<div class="detection-top">
|
||||
<img class="map-img" src="@/assets/images/map-img-1.jpg" />
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="monitor">
|
||||
<div class="t-title">
|
||||
<span>监控点位统计</span>
|
||||
</div>
|
||||
<div class="monitor-statistics">
|
||||
<img class="monitor-statistics-icon" src="@/assets/images/t-ico-0.png" />
|
||||
<div
|
||||
class="monitor-statistics-item"
|
||||
v-for="(item, index) in monitoringPointData.headList"
|
||||
:key="index"
|
||||
>
|
||||
<span class="monitor-statistics-item__label">{{ item.name }}</span>
|
||||
<countup class="monitor-statistics-item__value" :end-val="item.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg">
|
||||
<Title3 title="今日安全告警" />
|
||||
<alarm-today :list="monitoringPointData.dataList" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="traffic-alarm">
|
||||
<div class="t-title">
|
||||
<span>异常告警统计</span>
|
||||
</div>
|
||||
<div class="traffic-alarm-statistics">
|
||||
<img class="traffic-alarm-statistics-icon" src="@/assets/images/t-ico-2.png" />
|
||||
<div
|
||||
class="traffic-alarm-statistics-item"
|
||||
v-for="(item, index) in abnormalAlarmData.headList"
|
||||
:key="index"
|
||||
>
|
||||
<span class="traffic-alarm-statistics-item__label">{{ item.name }}</span>
|
||||
<countup class="traffic-alarm-statistics-item__value" :end-val="item.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg">
|
||||
<Title3 title="异常告警占比" />
|
||||
<div class="flex">
|
||||
<!-- <alarmRate :dataList="[]" /> -->
|
||||
<div class="none">无异常</div>
|
||||
<!-- <alarmList /> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Title1 title="交通信息" />
|
||||
<div class="scenic">
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">核心路段监控点位</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">核心景区分析点位</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">拥堵路段</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">拥堵告警</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
<div class="scenic-item">
|
||||
<span class="scenic-item__label">已处理</span>
|
||||
<countup class="scenic-item__value" end-val="895" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex pt-20">
|
||||
<div class="box">
|
||||
<Title3 title="异常告警" />
|
||||
<Line
|
||||
:width="370"
|
||||
:height="180"
|
||||
:config="{ legend: false }"
|
||||
:data="[
|
||||
{
|
||||
name: '企业数',
|
||||
data: [64, 159, 112, 86, 151, 131, 118, 232, 23, 64, 159, 112, 86, 151, 131, 118]
|
||||
}
|
||||
]"
|
||||
:xAxisData="[
|
||||
'12-16 10:00',
|
||||
'12-16 14:00',
|
||||
'12-16 16:00',
|
||||
'12-16 22:00',
|
||||
'12-17 02:00',
|
||||
'12-17 06:00',
|
||||
'12-17 10:00',
|
||||
'12-17 14:00',
|
||||
'12-17 16:00',
|
||||
'12-16 22:00',
|
||||
'12-18 02:00',
|
||||
'12-18 06:00',
|
||||
'12-8 10:00',
|
||||
'12-18 14:00',
|
||||
'12-18 16:00',
|
||||
'12-18 20:00'
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
<div class="box">
|
||||
<Title3 title="异常告警占比" />
|
||||
<div class="flex">
|
||||
<alarmRate :dataList="dataList" />
|
||||
<alarmList />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -151,24 +119,239 @@
|
||||
import countup from 'vue-countup-v3'
|
||||
import alarmRate from './alarmRate'
|
||||
import alarmList from './alarmList'
|
||||
import alarmToday from './alarmToday'
|
||||
|
||||
const dataList = ref([
|
||||
{
|
||||
name: '云阳',
|
||||
value: 20
|
||||
},
|
||||
{
|
||||
name: '奉节',
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
name: '巫山',
|
||||
value: 70
|
||||
}
|
||||
import { useWebSocket } from '@/hooks/socket'
|
||||
import { mode, socketBaseUrl, proSocketBaseUrl } from '@/utils/config'
|
||||
|
||||
const { isConnected, dataRes, sendMessage } = useWebSocket(
|
||||
`${mode == 'dev' ? socketBaseUrl : proSocketBaseUrl}/ws/monitor`
|
||||
)
|
||||
|
||||
// 景区id
|
||||
let scenicSpotId = ref('')
|
||||
// 交通信息
|
||||
let trafficData = ref([
|
||||
{ name: '总核心监控点位', type: 0, value: 0 },
|
||||
{ name: '总核心分析点位', type: 1, value: 0 },
|
||||
{ name: '总异常点位', type: 2, value: 0 }
|
||||
])
|
||||
// 景区信息
|
||||
let scenicSpotData = ref({
|
||||
dataList: [],
|
||||
dataLists: []
|
||||
})
|
||||
// 交通告警信息
|
||||
let trafficAbnormalityData = ref({
|
||||
dataList: [],
|
||||
dataLists: [],
|
||||
headList: []
|
||||
})
|
||||
// 监控点位统计
|
||||
let monitoringPointData = ref({
|
||||
dataList: [],
|
||||
headList: [
|
||||
{ name: '监控点位', type: 0, value: 0 },
|
||||
{ name: '核心点位', type: 0, value: 0 },
|
||||
{ name: '异常点位', type: 1, value: 0 }
|
||||
]
|
||||
})
|
||||
// 监控点位统计
|
||||
let abnormalAlarmData = ref({
|
||||
dataList: [],
|
||||
headList: [
|
||||
{ name: '当前告警总数', type: 0, value: 0 },
|
||||
{ name: '安全告警总数', type: 0, value: 0 },
|
||||
{ name: '已解除告警数', type: 1, value: 0 }
|
||||
]
|
||||
})
|
||||
|
||||
// 异常告警
|
||||
let abnormalData = computed(() => {
|
||||
return [{ data: scenicSpotData.value.dataList.map((item) => item.value) }]
|
||||
})
|
||||
let abnormalXAxisData = computed(() => {
|
||||
return scenicSpotData.value.dataList.map((item) => item.name)
|
||||
})
|
||||
|
||||
// 拥堵告警
|
||||
let jamlData = computed(() => {
|
||||
return [{ data: trafficAbnormalityData.value.dataList.map((item) => item.value) }]
|
||||
})
|
||||
let jamXAxisData = computed(() => {
|
||||
return trafficAbnormalityData.value.dataList.map((item) => item.name)
|
||||
})
|
||||
|
||||
watch(
|
||||
() => isConnected.value,
|
||||
(val) => {
|
||||
if (val) {
|
||||
sendMessage(
|
||||
JSON.stringify({
|
||||
action: 'start',
|
||||
type: 'index',
|
||||
scenicSpotId: ''
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
watch(
|
||||
() => dataRes.value,
|
||||
(val) => {
|
||||
if (val) {
|
||||
console.log(val, '安全接受消息')
|
||||
switch (val.type) {
|
||||
case 'trafficData':
|
||||
trafficData.value = val.headList
|
||||
break
|
||||
case 'scenicSpotData':
|
||||
scenicSpotData.value = val
|
||||
break
|
||||
case 'trafficAbnormalityData':
|
||||
trafficAbnormalityData.value = val
|
||||
break
|
||||
case 'monitoringPointLocation':
|
||||
monitoringPointData.value = val
|
||||
break
|
||||
case 'abnormalAlarmData':
|
||||
abnormalAlarmData.value = val
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
let monitorChange = null
|
||||
|
||||
onMounted(() => {
|
||||
monitorChange = PubSub.subscribe('monitorChange', (msg, data) => {
|
||||
scenicSpotId.value = data.scenicSpotId
|
||||
sendMessage(
|
||||
JSON.stringify({
|
||||
action: 'start',
|
||||
type: 'index',
|
||||
scenicSpotId: data.scenicSpotId
|
||||
})
|
||||
)
|
||||
})
|
||||
})
|
||||
onUnmounted(() => {
|
||||
PubSub.unsubscribe(monitorChange)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.none {
|
||||
width: vw(380);
|
||||
height: vh(200);
|
||||
font-size: vw(28);
|
||||
color: #f2f2f2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.detection-top {
|
||||
width: 100%;
|
||||
height: vh(580);
|
||||
background-color: #fff;
|
||||
.map-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.monitor {
|
||||
width: vw(405);
|
||||
margin-right: vw(8);
|
||||
&-statistics {
|
||||
height: vh(70);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
background-image: url('@/assets/images/i-data-bg-1.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
&-statistics-icon {
|
||||
width: vw(45);
|
||||
height: vw(48);
|
||||
}
|
||||
&-statistics-item {
|
||||
&__label {
|
||||
font-weight: 400;
|
||||
font-size: vw(14);
|
||||
color: #fff;
|
||||
}
|
||||
&__value {
|
||||
margin-top: vh(10);
|
||||
font-weight: bold;
|
||||
font-size: vw(24);
|
||||
color: #ffffff;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
.monitor-statistics-item__value {
|
||||
color: #e21b1b;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.traffic-alarm {
|
||||
width: vw(405);
|
||||
&-statistics {
|
||||
height: vh(70);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
background-image: url('@/assets/images/i-data-bg-1.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
&-statistics-icon {
|
||||
width: vw(45);
|
||||
height: vw(48);
|
||||
}
|
||||
&-statistics-item {
|
||||
&__label {
|
||||
font-weight: 400;
|
||||
font-size: vw(14);
|
||||
color: #fff;
|
||||
}
|
||||
&__value {
|
||||
margin-top: vh(10);
|
||||
font-weight: bold;
|
||||
font-size: vw(24);
|
||||
color: #e21b1b;
|
||||
text-align: center;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
.traffic-statistics-item__value {
|
||||
color: rgba(167, 0, 0, 0.6);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bg {
|
||||
padding: vw(5);
|
||||
margin-top: vh(8);
|
||||
background-image: url('@/assets/images/bg-3.png');
|
||||
background-size: 100% 100%;
|
||||
&:nth-child(1) {
|
||||
margin-right: vw(10);
|
||||
}
|
||||
}
|
||||
.t-title {
|
||||
margin: vh(10) auto;
|
||||
width: 100%;
|
||||
height: vh(32);
|
||||
font-weight: 800;
|
||||
font-size: vw(16);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-image: url('@/assets/images/title-4.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
:deep(.el-select__wrapper) {
|
||||
background: linear-gradient(270deg, rgba(8, 41, 86, 0.16) 0%, #0b61b4 100%);
|
||||
border: none;
|
||||
|
||||
@@ -1,34 +1,708 @@
|
||||
<template>
|
||||
<!-- 视频 -->
|
||||
<div class="box-2">
|
||||
<Nav />
|
||||
<!-- 视频 -->
|
||||
<Monitor :list="videoList" />
|
||||
<div class="left-nav">
|
||||
<div v-if="showNav" class="ul">
|
||||
<div
|
||||
class="li"
|
||||
:class="{ active: current == index }"
|
||||
v-for="(item, index) in navList"
|
||||
:key="index"
|
||||
@click="handleNav(index)"
|
||||
>
|
||||
{{ item.dictLabel }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bom-box">
|
||||
<Title2 title="检索" />
|
||||
<!-- <div class="search-box flex">
|
||||
<el-input placeholder="请输入内容" v-model="searchValue" clearable> </el-input>
|
||||
<img class="search-icon" src="/src/assets/images/search-icon-1.png" alt="" />
|
||||
</div> -->
|
||||
<div class="tree-box">
|
||||
<div class="tree-a" v-for="(item, i) in regionList" :key="i">
|
||||
<div class="flex align-center">
|
||||
<img class="node" src="@/assets/images/node.png" alt="" />
|
||||
<span class="name-1">{{ item.regions }}</span>
|
||||
</div>
|
||||
<div
|
||||
class="tree-b"
|
||||
v-for="(resource, x) in item.videoResources"
|
||||
:key="x"
|
||||
@click="handleCamera(resource.cameraIndexCode)"
|
||||
>
|
||||
<span class="name-2 activee">
|
||||
{{ resource.cameraName || resource.cameraIndexCode }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="videoLog == 1" class="video-wrapper">
|
||||
<div class="video-list">
|
||||
<div
|
||||
class="video-item"
|
||||
v-for="(item, index) in videoList"
|
||||
:key="index"
|
||||
@click="handleItemVideo(item.hlsUrl, 100)"
|
||||
>
|
||||
<div class="video-item__inner">
|
||||
<video
|
||||
class="video-item__video"
|
||||
:id="'monitorVideo' + index"
|
||||
muted
|
||||
autoplay
|
||||
:controls="false"
|
||||
style="object-fit: cover"
|
||||
>
|
||||
<source src="" type="application/x-mpegURL" />
|
||||
</video>
|
||||
<p class="video-item__title--primary">
|
||||
{{ item.cameraName || item.cameraIndexCode }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="videoLog == 2" class="video-detail">
|
||||
<div class="video-detail__wrapper">
|
||||
<video
|
||||
class="video-detail__video"
|
||||
ref="videoRef"
|
||||
muted
|
||||
autoplay
|
||||
controls
|
||||
style="object-fit: cover"
|
||||
>
|
||||
<source src="" type="application/x-mpegURL" />
|
||||
</video>
|
||||
</div>
|
||||
<div class="video-right">
|
||||
<div class="flex justify-between">
|
||||
<Title2 title="异常告警" />
|
||||
<div class="back-box" @click="handleBack">
|
||||
<img class="icon" src="@/assets/images/back.png" />
|
||||
<span>返回</span>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li
|
||||
class="item"
|
||||
v-for="(item, index) in videoList"
|
||||
:key="index"
|
||||
@click="handleItemVideo(item.hlsUrl, 101)"
|
||||
>
|
||||
<div>
|
||||
<p class="item-title--primary">
|
||||
{{ item.cameraName }}
|
||||
</p>
|
||||
<video
|
||||
class="item-img"
|
||||
:id="'monitorVideo' + index"
|
||||
muted
|
||||
autoplay
|
||||
:controls="false"
|
||||
style="object-fit: cover"
|
||||
>
|
||||
<source src="" type="application/x-mpegURL" />
|
||||
</video>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<VideoDialog v-model="show" :src="videoSrc" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Nav from '@/components/Nav/index.vue'
|
||||
import Monitor from '@/components/Monitor/index.vue'
|
||||
import { getVideoListApi } from '@/api/home'
|
||||
import { getVideoListApi, postRefreshApi, getPreviewUrlApi } from '@/api/home'
|
||||
import { getVideoTypeApi, getVideoRegionsApi, postVideoRemainApi } from '@/api/monitor'
|
||||
|
||||
import PubSub from 'pubsub-js'
|
||||
import Hls from 'hls.js'
|
||||
|
||||
let videoList = ref([])
|
||||
let navList = ref([])
|
||||
let current = ref(0)
|
||||
let showNav = ref(true)
|
||||
let videoLog = ref(1)
|
||||
let videoRef = ref()
|
||||
let scenicSpotId = ref('')
|
||||
let regionList = ref()
|
||||
let monitorChange = null
|
||||
let videoSrc = ref('')
|
||||
let show = ref(false)
|
||||
|
||||
// const postVideoRemain = async () => {
|
||||
// setInterval(() => {
|
||||
// postVideoRemainApi({
|
||||
// cameraIndexCode: videoList.value.map((item) => item.cameraIndexCode)
|
||||
// })
|
||||
// }, 3000)
|
||||
// }
|
||||
|
||||
const initVideo = () => {
|
||||
nextTick(() => {
|
||||
videoList.value.forEach(async (item, index) => {
|
||||
const video = document.getElementById(`monitorVideo${index}`)
|
||||
let res = await postRefreshApi({
|
||||
type: 'hls',
|
||||
businessVideoDisplayPosition: item.businessVideoDisplayPosition,
|
||||
cameraIndexCode: item.cameraIndexCode
|
||||
})
|
||||
item.hlsUrl = res.data.hlsUrl
|
||||
const hls = new Hls({
|
||||
maxBufferLength: 10, // 最大缓冲长度(秒)
|
||||
maxMaxBufferLength: 15, // 缓冲区长度的上限
|
||||
maxBufferSize: 30 * 1000 * 1000 // 最大缓冲大小(字节)
|
||||
})
|
||||
hls.loadSource(res.data.hlsUrl)
|
||||
hls.attachMedia(video)
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
video.play()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
const handleNav = (e) => {
|
||||
if (current.value == e) return
|
||||
videoLog.value = 1
|
||||
videoList.value = []
|
||||
current.value = e
|
||||
getVideoList()
|
||||
}
|
||||
const handleBack = () => {
|
||||
videoLog.value = 1
|
||||
initVideo()
|
||||
}
|
||||
const handleItemVideo = (url, type) => {
|
||||
videoLog.value = 2
|
||||
nextTick(() => {
|
||||
const hls = new Hls({
|
||||
maxBufferLength: 10, // 最大缓冲长度(秒)
|
||||
maxMaxBufferLength: 15, // 缓冲区长度的上限
|
||||
maxBufferSize: 30 * 1000 * 1000 // 最大缓冲大小(字节)
|
||||
})
|
||||
hls.loadSource(url)
|
||||
hls.attachMedia(videoRef.value)
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
videoRef.value.play()
|
||||
})
|
||||
if (type == 100) initVideo()
|
||||
})
|
||||
}
|
||||
const handleCamera = async (cameraIndexCode) => {
|
||||
show.value = true
|
||||
let res = await getPreviewUrlApi({
|
||||
type: 'hls',
|
||||
cameraIndexCode
|
||||
})
|
||||
videoSrc.value = res.data.url
|
||||
}
|
||||
const getVideoList = async () => {
|
||||
let res = await getVideoListApi({
|
||||
businessVideoDisplayPosition: ''
|
||||
businessScenicArea: scenicSpotId.value,
|
||||
businessVideoDisplayPosition: navList.value[current.value].dictValue
|
||||
})
|
||||
videoList.value = res.data
|
||||
// postVideoRemain()
|
||||
nextTick(() => {
|
||||
videoList.value.forEach(async (item, index) => {
|
||||
const video = document.getElementById(`monitorVideo${index}`)
|
||||
let res = await postRefreshApi({
|
||||
type: 'hls',
|
||||
businessVideoDisplayPosition: item.businessVideoDisplayPosition,
|
||||
cameraIndexCode: item.cameraIndexCode
|
||||
})
|
||||
item.hlsUrl = res.data.hlsUrl
|
||||
const hls = new Hls({
|
||||
maxBufferLength: 10, // 最大缓冲长度(秒)
|
||||
maxMaxBufferLength: 15, // 缓冲区长度的上限
|
||||
maxBufferSize: 30 * 1000 * 1000 // 最大缓冲大小(字节)
|
||||
})
|
||||
hls.loadSource(res.data.hlsUrl)
|
||||
hls.attachMedia(video)
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
video.play()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
const getVideoType = async (id) => {
|
||||
let res = await getVideoTypeApi({
|
||||
businessScenicArea: scenicSpotId.value
|
||||
})
|
||||
if (res.data.length > 0) {
|
||||
navList.value = res.data
|
||||
getVideoList(id)
|
||||
} else {
|
||||
videoList.value = []
|
||||
initVideo()
|
||||
}
|
||||
}
|
||||
const getVideoRegions = async () => {
|
||||
let res = await getVideoRegionsApi({
|
||||
businessScenicArea: scenicSpotId.value
|
||||
})
|
||||
regionList.value = res.data
|
||||
console.log(regionList.value, 'regionList')
|
||||
}
|
||||
const onMonitorChange = () => {
|
||||
monitorChange = PubSub.subscribe('monitorChange', (res, data) => {
|
||||
scenicSpotId.value = data.scenicSpotId
|
||||
regionList.value = []
|
||||
getVideoType()
|
||||
getVideoRegions()
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getVideoList()
|
||||
getVideoType()
|
||||
getVideoRegions()
|
||||
onMonitorChange()
|
||||
})
|
||||
onUnmounted(() => {
|
||||
PubSub.unsubscribe(monitorChange)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//背景色设置为透明
|
||||
:deep(.el-input__wrapper) {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
//输入框颜色
|
||||
:deep(.el-input__inner) {
|
||||
background-color: rgba(0, 0, 0, 0) !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.box-2 {
|
||||
margin-top: vh(120);
|
||||
height: vh(950);
|
||||
display: flex;
|
||||
flex: 1;
|
||||
margin-top: vh(120);
|
||||
height: vh(965);
|
||||
}
|
||||
.left-nav {
|
||||
margin: 0 vw(8);
|
||||
width: vw(250);
|
||||
background: linear-gradient(321deg, #0b2f64 0%, #062b57 91%, rgba(5, 40, 79, 0) 100%);
|
||||
.bom-box {
|
||||
margin-top: vh(20);
|
||||
.search-box {
|
||||
border-radius: vw(2);
|
||||
border: 1px solid #0096ff;
|
||||
margin: vh(10) auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: rgba(217, 217, 217, 0);
|
||||
|
||||
.search-icon {
|
||||
width: vw(20);
|
||||
height: vw(20);
|
||||
margin-right: vw(10);
|
||||
}
|
||||
}
|
||||
|
||||
.tree-box {
|
||||
position: relative;
|
||||
height: vh(550);
|
||||
padding: 0 vw(8);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
/* 滚动条整体样式 */
|
||||
&::-webkit-scrollbar {
|
||||
width: vw(0); /* 滚动条的宽度 */
|
||||
}
|
||||
/* 滚动条轨道 */
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #f1f1f1; /* 轨道的背景色 */
|
||||
}
|
||||
/* 滚动条滑块 */
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #888; /* 滑块的背景色 */
|
||||
border-radius: 5px; /* 滑块的圆角 */
|
||||
}
|
||||
/* 当鼠标悬停在滚动条上时滑块的样式 */
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background: #555; /* 滑块的背景色 */
|
||||
}
|
||||
.tree-a {
|
||||
position: relative;
|
||||
border-left: vw(2) #37d8fc solid;
|
||||
|
||||
.node {
|
||||
position: absolute;
|
||||
left: vw(-8);
|
||||
width: vw(16);
|
||||
height: vw(16);
|
||||
}
|
||||
.name-1 {
|
||||
padding: 0 vw(20);
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
font-size: vw(15);
|
||||
color: #ffffff;
|
||||
height: vh(30);
|
||||
line-height: vh(30);
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
.tree-b::before {
|
||||
position: absolute;
|
||||
top: vw(-8);
|
||||
left: vw(-8);
|
||||
content: '';
|
||||
width: vw(12);
|
||||
height: vw(12);
|
||||
background-image: url('/src/assets/images/icon-a-1.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.tree-b {
|
||||
position: relative;
|
||||
border-left: vw(3) solid;
|
||||
border-image: linear-gradient(311deg, rgba(0, 11, 36, 0), rgba(55, 216, 252, 1)) 1 1;
|
||||
margin-left: vw(30);
|
||||
margin-top: vh(10);
|
||||
.name-2 {
|
||||
cursor: pointer;
|
||||
padding: 0 vw(20);
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
font-size: vw(15);
|
||||
color: #ffffff;
|
||||
height: vh(30);
|
||||
line-height: vh(30);
|
||||
white-space: nowrap; /* 保证文本在一行内显示 */
|
||||
overflow: hidden; /* 隐藏溢出的内容 */
|
||||
text-overflow: ellipsis; /* 使用省略号表示文本溢出 */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ul {
|
||||
font-weight: 400;
|
||||
font-size: vw(18);
|
||||
color: #fff;
|
||||
height: vh(340);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
/* 滚动条整体样式 */
|
||||
&::-webkit-scrollbar {
|
||||
width: vw(0); /* 滚动条的宽度 */
|
||||
}
|
||||
/* 滚动条轨道 */
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #f1f1f1; /* 轨道的背景色 */
|
||||
}
|
||||
/* 滚动条滑块 */
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #888; /* 滑块的背景色 */
|
||||
border-radius: 5px; /* 滑块的圆角 */
|
||||
}
|
||||
/* 当鼠标悬停在滚动条上时滑块的样式 */
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background: #555; /* 滑块的背景色 */
|
||||
}
|
||||
.li {
|
||||
cursor: pointer;
|
||||
width: vw(250);
|
||||
height: vh(58);
|
||||
line-height: vh(58);
|
||||
text-align: center;
|
||||
margin-bottom: vh(15);
|
||||
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%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.video {
|
||||
&-wrapper {
|
||||
width: 100%;
|
||||
height: vh(960);
|
||||
padding: vh(30) vw(20);
|
||||
background-image: url('/src/assets/images/log-v-bg.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
&-list {
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
gap: vw(8);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: vw(4); /* 滚动条的宽度 */
|
||||
}
|
||||
/* 滚动条轨道 */
|
||||
&::-webkit-scrollbar-track {
|
||||
background: 'transparent'; /* 轨道的背景色 */
|
||||
}
|
||||
/* 滚动条滑块 */
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: rgba(0, 150, 255, 0.63); /* 滑块的背景色 */
|
||||
border-radius: 5px; /* 滑块的圆角 */
|
||||
}
|
||||
}
|
||||
&-item {
|
||||
width: vw(406);
|
||||
height: vh(300);
|
||||
padding: vw(10);
|
||||
background-image: url('/src/assets/images/item-primary.png');
|
||||
background-size: 100% 100%;
|
||||
&:nth-child(5n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
&-item__inner {
|
||||
position: relative;
|
||||
}
|
||||
&-item__title {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: vh(10) vw(10);
|
||||
color: #fff;
|
||||
font-size: vw(14);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
z-index: 999;
|
||||
}
|
||||
&-item__title--error {
|
||||
@extend .video-item__title;
|
||||
background-color: rgba(226, 27, 27, 0.72);
|
||||
}
|
||||
&-item__title--primary {
|
||||
@extend .video-item__title;
|
||||
background-color: rgba(4, 30, 69, 0.72);
|
||||
}
|
||||
&-item__video {
|
||||
width: 100%;
|
||||
height: vh(286);
|
||||
}
|
||||
|
||||
&-detail {
|
||||
margin-left: vw(10);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
&-detail__wrapper {
|
||||
position: relative;
|
||||
padding: vh(40) vw(50);
|
||||
width: vw(1660);
|
||||
height: vh(960);
|
||||
background-image: url('/src/assets/images/one-video-bg.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
&-detail__title {
|
||||
position: absolute;
|
||||
left: vw(50);
|
||||
right: vw(50);
|
||||
top: 40 (vh);
|
||||
z-index: 9;
|
||||
font-weight: 400;
|
||||
font-size: vw(14);
|
||||
color: #ffffff;
|
||||
padding: vw(20);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: rgba(4, 30, 69, 0.5);
|
||||
}
|
||||
&-detail__video {
|
||||
width: 100%;
|
||||
height: vh(880);
|
||||
}
|
||||
&-right {
|
||||
margin-left: vw(8);
|
||||
width: vw(440);
|
||||
height: vh(956);
|
||||
background: #082f5a;
|
||||
.back-box {
|
||||
cursor: pointer;
|
||||
padding-right: vw(20);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon {
|
||||
width: vw(30);
|
||||
height: auto;
|
||||
margin-right: vw(10);
|
||||
}
|
||||
& > span {
|
||||
font-weight: bold;
|
||||
font-size: vw(20);
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: vh(920);
|
||||
padding: vw(8);
|
||||
/* 滚动条整体样式 */
|
||||
&::-webkit-scrollbar {
|
||||
width: vw(0); /* 滚动条的宽度 */
|
||||
}
|
||||
|
||||
/* 滚动条轨道 */
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #f1f1f1; /* 轨道的背景色 */
|
||||
}
|
||||
|
||||
/* 滚动条滑块 */
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #888; /* 滑块的背景色 */
|
||||
border-radius: 5px; /* 滑块的圆角 */
|
||||
}
|
||||
|
||||
/* 当鼠标悬停在滚动条上时滑块的样式 */
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background: #555; /* 滑块的背景色 */
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-bottom: vh(10);
|
||||
padding: vw(10);
|
||||
background-image: url('@/assets/images/item-primary.png');
|
||||
background-size: 100% 100%;
|
||||
& > div {
|
||||
position: relative;
|
||||
}
|
||||
&-title {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: vw(10);
|
||||
color: #fff;
|
||||
font-size: vw(14);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
z-index: 999;
|
||||
}
|
||||
&-title--error {
|
||||
@extend .item-title;
|
||||
background-color: rgba(226, 27, 27, 0.72);
|
||||
}
|
||||
&-title--primary {
|
||||
@extend .item-title;
|
||||
background-color: rgba(4, 30, 69, 0.72);
|
||||
}
|
||||
&-img {
|
||||
width: 100%;
|
||||
height: vh(164);
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
.video-live {
|
||||
.video-rt {
|
||||
width: vw(400);
|
||||
height: vh(950);
|
||||
background: radial-gradient(
|
||||
to bottom 70% at 99% 50%,
|
||||
#0a4190 0%,
|
||||
rgba(0, 77, 136, 0.6) 100%
|
||||
);
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
border: 1px solid;
|
||||
opacity: 0.4;
|
||||
border-image: linear-gradient(180deg, rgba(0, 150, 255, 1), rgba(0, 90, 153, 0)) 1 1;
|
||||
margin-left: vw(10);
|
||||
padding: vw(20);
|
||||
.rt-v-box {
|
||||
overflow-y: auto;
|
||||
/* 滚动条整体样式 */
|
||||
&::-webkit-scrollbar {
|
||||
width: vw(4); /* 滚动条的宽度 */
|
||||
}
|
||||
/* 滚动条轨道 */
|
||||
&::-webkit-scrollbar-track {
|
||||
background: 'transparent'; /* 轨道的背景色 */
|
||||
}
|
||||
/* 滚动条滑块 */
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: rgba(0, 150, 255, 0.63); /* 滑块的背景色 */
|
||||
border-radius: 5px; /* 滑块的圆角 */
|
||||
}
|
||||
height: 100%;
|
||||
}
|
||||
.title {
|
||||
background-image: url('/src/assets/images/nav-l-t-bg.png');
|
||||
background-size: 100% 100%;
|
||||
margin-bottom: vh(10);
|
||||
position: relative;
|
||||
left: vw(-20);
|
||||
span {
|
||||
margin-left: vw(30);
|
||||
font-weight: 800;
|
||||
font-size: vw(15);
|
||||
line-height: vh(26);
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
|
||||
background: linear-gradient(90deg, #ffffff 0%, #5cb5ff 100%);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
.rt-video {
|
||||
width: 100%;
|
||||
height: vh(300);
|
||||
background-image: url('/src/assets/images/v-item-bg.png');
|
||||
background-size: 100% 100%;
|
||||
padding: vw(20);
|
||||
box-sizing: border-box;
|
||||
margin-bottom: vh(2);
|
||||
position: relative;
|
||||
.desc {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
background: rgba(4, 30, 69, 0.5);
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: vw(14);
|
||||
color: #ffffff;
|
||||
padding: vw(20);
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
.v-error-bg {
|
||||
background-image: url('/src/assets/images/v-item-bg-1.png');
|
||||
background-size: 100% 100%;
|
||||
.desc {
|
||||
background: rgba(226, 27, 27, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -6,6 +6,4 @@
|
||||
<script setup>
|
||||
import box1 from './components/box-1.vue'
|
||||
import box2 from './components/box-2.vue'
|
||||
|
||||
onMounted(() => {})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user