类型:开发
描述:
This commit is contained in:
@@ -96,6 +96,13 @@
|
||||
scenicSpotId: ''
|
||||
})
|
||||
)
|
||||
sendMessage(
|
||||
JSON.stringify({
|
||||
action: 'start',
|
||||
type: 'getMapNotifyInfo',
|
||||
scenicSpotId: ''
|
||||
})
|
||||
)
|
||||
}
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<img class="info-header__icon" src="@/assets/images/phone.png" alt="" />
|
||||
<span class="info-header__text">联系电话:+86-23-56636999</span>
|
||||
<span class="info-header__text">联系电话:{{ info?.phone }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -210,7 +210,7 @@
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
&-box-2{
|
||||
|
||||
|
||||
}
|
||||
&-container {
|
||||
padding: vh(20) vw(20) 0 vw(20);
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
<div class="video-right">
|
||||
<div class="flex justify-between">
|
||||
<Title2 title="异常告警" />
|
||||
<Title2 title="" />
|
||||
<div class="back-box" @click="handleBack">
|
||||
<img class="icon" src="@/assets/images/back.png" />
|
||||
<span>返回</span>
|
||||
@@ -107,7 +107,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <ul class="videos">
|
||||
<li class="video-item" v-for="item in 8" :key="item">
|
||||
<img src="@/assets/images/sxzd.png" alt="" />
|
||||
@@ -255,7 +255,7 @@
|
||||
}catch (error) {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const handleItemVideo = (url, type, code) => {
|
||||
videoLog.value = 2
|
||||
@@ -448,7 +448,7 @@
|
||||
@extend .video-item__follow;
|
||||
background-image: url('@/assets/images/unfollow.png');
|
||||
}
|
||||
|
||||
|
||||
&-item__inner {
|
||||
position: relative;
|
||||
}
|
||||
@@ -541,24 +541,24 @@
|
||||
&::-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);
|
||||
@@ -641,7 +641,7 @@
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
|
||||
|
||||
background: linear-gradient(90deg, #ffffff 0%, #5cb5ff 100%);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
{{ item.dictLabel }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
<div
|
||||
:class="{ active: current == 3 }"
|
||||
@click="handleNav(3)" class="li">
|
||||
<span>自定义</span>
|
||||
@@ -129,7 +129,7 @@
|
||||
</div>
|
||||
<div class="video-right">
|
||||
<div class="flex justify-between">
|
||||
<Title2 title="异常告警" />
|
||||
<!-- <Title2 title="异常告警" />-->
|
||||
<div class="back-box" @click="handleBack">
|
||||
<img class="icon" src="@/assets/images/back.png" />
|
||||
<span>返回</span>
|
||||
@@ -162,7 +162,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<VideoDialog v-model="show" :isCollect="isCollect" :src="videoSrc" />
|
||||
<VideoDialog v-model="show" :cameraIndexCode="cameraIndexCode" :isCollect="isCollect" :src="videoSrc" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -277,6 +277,7 @@
|
||||
maxMaxBufferLength: 15, // 缓冲区长度的上限
|
||||
maxBufferSize: 20 * 1000 * 1000 // 最大缓冲大小(字节)
|
||||
})
|
||||
console.log(item.hlsUrl);
|
||||
hls.loadSource(item.hlsUrl)
|
||||
hls.attachMedia(video)
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
@@ -294,11 +295,12 @@
|
||||
videoList.value = []
|
||||
total.value = 0
|
||||
current.value = e
|
||||
if(e==3){
|
||||
getColletList(3)
|
||||
return false
|
||||
}
|
||||
getVideoList()
|
||||
if(e==3){
|
||||
getColletList()
|
||||
}else{
|
||||
getVideoList()
|
||||
}
|
||||
|
||||
}
|
||||
const handleBack = () => {
|
||||
videoLog.value = 1
|
||||
@@ -345,13 +347,14 @@
|
||||
const handleRegions = (e) => {
|
||||
regionList.value[e].show = !regionList.value[e].show
|
||||
}
|
||||
const handleCamera = async (cameraIndexCode,resource) => {
|
||||
const handleCamera = async (itemCode,resource) => {
|
||||
show.value = true
|
||||
let res = await getPreviewUrlApi({
|
||||
type: 'hls',
|
||||
cameraIndexCode
|
||||
cameraIndexCode:itemCode
|
||||
})
|
||||
isCollect.value = resource.isCollect
|
||||
cameraIndexCode.value = itemCode;
|
||||
isCollect.value = resource.isCollect
|
||||
videoSrc.value = res.data.url
|
||||
}
|
||||
const handleCollect = async (id, status, index) => {
|
||||
@@ -367,18 +370,17 @@
|
||||
pubSub.publish('videoCollect', id)
|
||||
}
|
||||
const getVideoList = async (val) => {
|
||||
|
||||
|
||||
try {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
if(val==3){
|
||||
params.businessVideoDisplayPosition = ''
|
||||
}else{
|
||||
params.businessVideoDisplayPosition = navList.value[current.value].dictValue
|
||||
params.businessVideoDisplayPosition = navList.value[current.value].dictValue
|
||||
}
|
||||
|
||||
|
||||
let res = await getVideoListApi(params)
|
||||
console.log(res,'list 55555')
|
||||
total.value = res.total
|
||||
if (res.data.length > 0) {
|
||||
// postVideoRemain()
|
||||
@@ -428,7 +430,7 @@
|
||||
console.log(regionList.value, ' regionList.value')
|
||||
}
|
||||
const onMonitorChange = () => {
|
||||
|
||||
|
||||
monitorChange = pubSub.subscribe('monitorChange', (res, data) => {
|
||||
current.value = 0
|
||||
params.businessScenicArea = data.scenicSpotId
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
:height="70"
|
||||
:value="parseFloat(item.rate)"
|
||||
:title="item.occupied"
|
||||
:subTitle="`${item.name}剩余`"
|
||||
:subTitle="`${item.name}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="ml-20 flex flex-1 justify-between">
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
let scenicSpotId = ref('')
|
||||
let scenicChange = null
|
||||
let timer = null
|
||||
let timer2 = null
|
||||
|
||||
watch(
|
||||
() => [isConnected.value, scenicSpotId.value],
|
||||
@@ -70,20 +71,51 @@
|
||||
scenicStore.setCarShipData(val.data)
|
||||
break
|
||||
}
|
||||
// if (!timer) sendCarShip()
|
||||
if (!timer) sendCarShip()
|
||||
// if (!timer2) sendTimer2()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const sendTimer2 = (e) =>{
|
||||
timer2 = setInterval(() => {
|
||||
if (isConnected.value) {
|
||||
//用户画像
|
||||
sendMessage(
|
||||
JSON.stringify({
|
||||
action: 'start',
|
||||
type: 'userPortrait',
|
||||
scenicSpotId: scenicSpotId.value
|
||||
})
|
||||
)
|
||||
//停车数据
|
||||
sendMessage(
|
||||
JSON.stringify({
|
||||
action: 'start',
|
||||
type: 'stopCarData',
|
||||
scenicSpotId: scenicSpotId.value
|
||||
})
|
||||
)
|
||||
}
|
||||
}, 20000)
|
||||
}
|
||||
const sendCarShip = (e) => {
|
||||
|
||||
timer = setInterval(() => {
|
||||
if (isConnected.value) {
|
||||
//车船数据
|
||||
sendMessage(
|
||||
JSON.stringify({
|
||||
action: 'start',
|
||||
type: 'carShipData',
|
||||
scenicSpotId: scenicSpotId.value
|
||||
})
|
||||
) //车窗数据
|
||||
sendMessage(
|
||||
JSON.stringify({
|
||||
action: 'start',
|
||||
type: 'secureData',
|
||||
scenicSpotId: scenicSpotId.value
|
||||
})
|
||||
)
|
||||
}
|
||||
}, 5000)
|
||||
|
||||
Reference in New Issue
Block a user