类型:开发

描述:
This commit is contained in:
2025-04-02 12:27:59 +08:00
parent 5a0fa16d03
commit b67da6ce24
13 changed files with 84 additions and 44 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -4,7 +4,7 @@
</div>
<div v-if="type==2" class="title-2">
<div @click="handleTitleClick(0)" class="item " :class="current==0?'active':''" >
<span >景区购票</span>
<span>景区购票</span>
</div>
<div @click="handleTitleClick(1)" class="item" :class="current==1?'active':''">
<span>直通车购票</span>
@@ -42,6 +42,7 @@
.item{
// margin-right: vw(22);
padding:vw(5) vw(10);
cursor: pointer;
// border-bottom:1px solid #ccc;
}
& span {

View File

@@ -97,7 +97,6 @@
() => props.isCollect,
(val) => {
if (val) {
console.log(val,'val 2222222222222222222222')
colletCond.value = val
// setTimeout(() => {
// init()
@@ -112,7 +111,6 @@
)
// 关注
const handleCollect = async (id, status, index) => {
// console.log(props.isCollect,777788888)
await postVideoCollectApi({
cameraIndexCode:props.cameraIndexCode,
isCollect: props.isCollect == 0 ? 1 : 0

View File

@@ -90,7 +90,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>

View File

@@ -10,17 +10,17 @@ export const useHomeStore = defineStore('home', () => {
{ value: 0, name: '低感景区总数' }
],
data: [
{ name: '当日购票量', value: 0 },
{ name: '未来3天购票量', value: 0 },
{ name: '3天后购票量', value: 0 }
{ name: '购今日票数', value: 0 },
{ name: '未来三天票数', value: 0 },
{ name: '购三天后票数', value: 0 }
]
})
//直通车购票
let trainData = ref({
data: [
{ name: '当日购票量', value: 0 },
{ name: '未来3天购票量', value: 0 },
{ name: '3天后购票量', value: 0 }
{ name: '购今日票数', value: 0 },
{ name: '未来三天票数', value: 0 },
{ name: '购三天后票数', value: 0 }
]
})
// 景区排队数据

View File

@@ -37,7 +37,7 @@ export const useScenicStore = defineStore('scenic', () => {
dataList: [],
headList: [
{ name: '当前告警总数', count: 0, type: 0 },
{ name: '安全告警总数', count: 0, type: 0 },
{ name: '异常告警总数', count: 0, type: 0 },
{ name: '已解除告警数', count: 0, type: 0 }
]
})

View File

@@ -96,6 +96,13 @@
scenicSpotId: ''
})
)
sendMessage(
JSON.stringify({
action: 'start',
type: 'getMapNotifyInfo',
scenicSpotId: ''
})
)
}
}, 5000)
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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) => {
@@ -378,7 +381,6 @@
}
let res = await getVideoListApi(params)
console.log(res,'list 55555')
total.value = res.total
if (res.data.length > 0) {
// postVideoRemain()

View File

@@ -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">

View File

@@ -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)