类型:开发

描述:
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

@@ -32,7 +32,7 @@
/>
<img src="@/assets/images/left.png" title="左转" @click="handleAction(LEFT)" />
<img src="@/assets/images/right.png" title="右转" @click="handleAction(RIGHT)" />
</div>
<div class="action-item">
<div
@@ -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
@@ -182,9 +180,9 @@
}
})
}
onMounted(()=>{
})
</script>

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>
@@ -210,7 +210,7 @@
background-size: 100% 100%;
}
&-box-2{
}
&-container {
padding: vh(20) vw(20) 0 vw(20);

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

View File

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

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)