类型:开发

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

View File

@@ -32,7 +32,7 @@
/> />
<img src="@/assets/images/left.png" title="左转" @click="handleAction(LEFT)" /> <img src="@/assets/images/left.png" title="左转" @click="handleAction(LEFT)" />
<img src="@/assets/images/right.png" title="右转" @click="handleAction(RIGHT)" /> <img src="@/assets/images/right.png" title="右转" @click="handleAction(RIGHT)" />
</div> </div>
<div class="action-item"> <div class="action-item">
<div <div
@@ -97,7 +97,6 @@
() => props.isCollect, () => props.isCollect,
(val) => { (val) => {
if (val) { if (val) {
console.log(val,'val 2222222222222222222222')
colletCond.value = val colletCond.value = val
// setTimeout(() => { // setTimeout(() => {
// init() // init()
@@ -112,7 +111,6 @@
) )
// 关注 // 关注
const handleCollect = async (id, status, index) => { const handleCollect = async (id, status, index) => {
// console.log(props.isCollect,777788888)
await postVideoCollectApi({ await postVideoCollectApi({
cameraIndexCode:props.cameraIndexCode, cameraIndexCode:props.cameraIndexCode,
isCollect: props.isCollect == 0 ? 1 : 0 isCollect: props.isCollect == 0 ? 1 : 0
@@ -182,9 +180,9 @@
} }
}) })
} }
onMounted(()=>{ onMounted(()=>{
}) })
</script> </script>

View File

@@ -90,7 +90,7 @@
</div> </div>
<div class="video-right"> <div class="video-right">
<div class="flex justify-between"> <div class="flex justify-between">
<Title2 title="异常告警" /> <!-- <Title2 title="异常告警" />-->
<div class="back-box" @click="handleBack"> <div class="back-box" @click="handleBack">
<img class="icon" src="@/assets/images/back.png" /> <img class="icon" src="@/assets/images/back.png" />
<span>返回</span> <span>返回</span>

View File

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

View File

@@ -37,7 +37,7 @@ export const useScenicStore = defineStore('scenic', () => {
dataList: [], dataList: [],
headList: [ headList: [
{ name: '当前告警总数', count: 0, type: 0 }, { name: '当前告警总数', count: 0, type: 0 },
{ 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: '' scenicSpotId: ''
}) })
) )
sendMessage(
JSON.stringify({
action: 'start',
type: 'getMapNotifyInfo',
scenicSpotId: ''
})
)
} }
}, 5000) }, 5000)
} }

View File

@@ -14,7 +14,7 @@
</div> </div>
<div> <div>
<img class="info-header__icon" src="@/assets/images/phone.png" alt="" /> <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> </div>
</div> </div>
@@ -210,7 +210,7 @@
background-size: 100% 100%; background-size: 100% 100%;
} }
&-box-2{ &-box-2{
} }
&-container { &-container {
padding: vh(20) vw(20) 0 vw(20); padding: vh(20) vw(20) 0 vw(20);

View File

@@ -75,7 +75,7 @@
</div> </div>
<div class="video-right"> <div class="video-right">
<div class="flex justify-between"> <div class="flex justify-between">
<Title2 title="异常告警" /> <Title2 title="" />
<div class="back-box" @click="handleBack"> <div class="back-box" @click="handleBack">
<img class="icon" src="@/assets/images/back.png" /> <img class="icon" src="@/assets/images/back.png" />
<span>返回</span> <span>返回</span>
@@ -107,7 +107,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<!-- <ul class="videos"> <!-- <ul class="videos">
<li class="video-item" v-for="item in 8" :key="item"> <li class="video-item" v-for="item in 8" :key="item">
<img src="@/assets/images/sxzd.png" alt="" /> <img src="@/assets/images/sxzd.png" alt="" />
@@ -255,7 +255,7 @@
}catch (error) { }catch (error) {
loading.value = false loading.value = false
} }
} }
const handleItemVideo = (url, type, code) => { const handleItemVideo = (url, type, code) => {
videoLog.value = 2 videoLog.value = 2
@@ -448,7 +448,7 @@
@extend .video-item__follow; @extend .video-item__follow;
background-image: url('@/assets/images/unfollow.png'); background-image: url('@/assets/images/unfollow.png');
} }
&-item__inner { &-item__inner {
position: relative; position: relative;
} }
@@ -541,24 +541,24 @@
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: vw(0); /* 滚动条的宽度 */ width: vw(0); /* 滚动条的宽度 */
} }
/* 滚动条轨道 */ /* 滚动条轨道 */
&::-webkit-scrollbar-track { &::-webkit-scrollbar-track {
background: #f1f1f1; /* 轨道的背景色 */ background: #f1f1f1; /* 轨道的背景色 */
} }
/* 滚动条滑块 */ /* 滚动条滑块 */
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
background: #888; /* 滑块的背景色 */ background: #888; /* 滑块的背景色 */
border-radius: 5px; /* 滑块的圆角 */ border-radius: 5px; /* 滑块的圆角 */
} }
/* 当鼠标悬停在滚动条上时滑块的样式 */ /* 当鼠标悬停在滚动条上时滑块的样式 */
&::-webkit-scrollbar-thumb:hover { &::-webkit-scrollbar-thumb:hover {
background: #555; /* 滑块的背景色 */ background: #555; /* 滑块的背景色 */
} }
} }
.item { .item {
margin-bottom: vh(10); margin-bottom: vh(10);
padding: vw(10); padding: vw(10);
@@ -641,7 +641,7 @@
text-align: center; text-align: center;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
background: linear-gradient(90deg, #ffffff 0%, #5cb5ff 100%); background: linear-gradient(90deg, #ffffff 0%, #5cb5ff 100%);
-webkit-background-clip: text; -webkit-background-clip: text;
background-clip: text; background-clip: text;

View File

@@ -14,7 +14,7 @@
{{ item.dictLabel }} {{ item.dictLabel }}
</span> </span>
</div> </div>
<div <div
:class="{ active: current == 3 }" :class="{ active: current == 3 }"
@click="handleNav(3)" class="li"> @click="handleNav(3)" class="li">
<span>自定义</span> <span>自定义</span>
@@ -129,7 +129,7 @@
</div> </div>
<div class="video-right"> <div class="video-right">
<div class="flex justify-between"> <div class="flex justify-between">
<Title2 title="异常告警" /> <!-- <Title2 title="异常告警" />-->
<div class="back-box" @click="handleBack"> <div class="back-box" @click="handleBack">
<img class="icon" src="@/assets/images/back.png" /> <img class="icon" src="@/assets/images/back.png" />
<span>返回</span> <span>返回</span>
@@ -162,7 +162,7 @@
</div> </div>
</div> </div>
</div> </div>
<VideoDialog v-model="show" :isCollect="isCollect" :src="videoSrc" /> <VideoDialog v-model="show" :cameraIndexCode="cameraIndexCode" :isCollect="isCollect" :src="videoSrc" />
</template> </template>
<script setup> <script setup>
@@ -277,6 +277,7 @@
maxMaxBufferLength: 15, // 缓冲区长度的上限 maxMaxBufferLength: 15, // 缓冲区长度的上限
maxBufferSize: 20 * 1000 * 1000 // 最大缓冲大小(字节) maxBufferSize: 20 * 1000 * 1000 // 最大缓冲大小(字节)
}) })
console.log(item.hlsUrl);
hls.loadSource(item.hlsUrl) hls.loadSource(item.hlsUrl)
hls.attachMedia(video) hls.attachMedia(video)
hls.on(Hls.Events.MANIFEST_PARSED, () => { hls.on(Hls.Events.MANIFEST_PARSED, () => {
@@ -294,11 +295,12 @@
videoList.value = [] videoList.value = []
total.value = 0 total.value = 0
current.value = e current.value = e
if(e==3){ if(e==3){
getColletList(3) getColletList()
return false }else{
} getVideoList()
getVideoList() }
} }
const handleBack = () => { const handleBack = () => {
videoLog.value = 1 videoLog.value = 1
@@ -345,13 +347,14 @@
const handleRegions = (e) => { const handleRegions = (e) => {
regionList.value[e].show = !regionList.value[e].show regionList.value[e].show = !regionList.value[e].show
} }
const handleCamera = async (cameraIndexCode,resource) => { const handleCamera = async (itemCode,resource) => {
show.value = true show.value = true
let res = await getPreviewUrlApi({ let res = await getPreviewUrlApi({
type: 'hls', type: 'hls',
cameraIndexCode cameraIndexCode:itemCode
}) })
isCollect.value = resource.isCollect cameraIndexCode.value = itemCode;
isCollect.value = resource.isCollect
videoSrc.value = res.data.url videoSrc.value = res.data.url
} }
const handleCollect = async (id, status, index) => { const handleCollect = async (id, status, index) => {
@@ -367,18 +370,17 @@
pubSub.publish('videoCollect', id) pubSub.publish('videoCollect', id)
} }
const getVideoList = async (val) => { const getVideoList = async (val) => {
try { try {
if (loading.value) return if (loading.value) return
loading.value = true loading.value = true
if(val==3){ if(val==3){
params.businessVideoDisplayPosition = '' params.businessVideoDisplayPosition = ''
}else{ }else{
params.businessVideoDisplayPosition = navList.value[current.value].dictValue params.businessVideoDisplayPosition = navList.value[current.value].dictValue
} }
let res = await getVideoListApi(params) let res = await getVideoListApi(params)
console.log(res,'list 55555')
total.value = res.total total.value = res.total
if (res.data.length > 0) { if (res.data.length > 0) {
// postVideoRemain() // postVideoRemain()
@@ -428,7 +430,7 @@
console.log(regionList.value, ' regionList.value') console.log(regionList.value, ' regionList.value')
} }
const onMonitorChange = () => { const onMonitorChange = () => {
monitorChange = pubSub.subscribe('monitorChange', (res, data) => { monitorChange = pubSub.subscribe('monitorChange', (res, data) => {
current.value = 0 current.value = 0
params.businessScenicArea = data.scenicSpotId params.businessScenicArea = data.scenicSpotId

View File

@@ -78,7 +78,7 @@
:height="70" :height="70"
:value="parseFloat(item.rate)" :value="parseFloat(item.rate)"
:title="item.occupied" :title="item.occupied"
:subTitle="`${item.name}剩余`" :subTitle="`${item.name}`"
/> />
</div> </div>
<div class="ml-20 flex flex-1 justify-between"> <div class="ml-20 flex flex-1 justify-between">

View File

@@ -22,6 +22,7 @@
let scenicSpotId = ref('') let scenicSpotId = ref('')
let scenicChange = null let scenicChange = null
let timer = null let timer = null
let timer2 = null
watch( watch(
() => [isConnected.value, scenicSpotId.value], () => [isConnected.value, scenicSpotId.value],
@@ -70,20 +71,51 @@
scenicStore.setCarShipData(val.data) scenicStore.setCarShipData(val.data)
break 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) => { const sendCarShip = (e) => {
timer = setInterval(() => { timer = setInterval(() => {
if (isConnected.value) { if (isConnected.value) {
//车船数据
sendMessage( sendMessage(
JSON.stringify({ JSON.stringify({
action: 'start', action: 'start',
type: 'carShipData', type: 'carShipData',
scenicSpotId: scenicSpotId.value scenicSpotId: scenicSpotId.value
}) })
) //车窗数据
sendMessage(
JSON.stringify({
action: 'start',
type: 'secureData',
scenicSpotId: scenicSpotId.value
})
) )
} }
}, 5000) }, 5000)