417
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
let isCollect = ref(0)
|
||||
let list = ref([])
|
||||
let src = ref('')
|
||||
@@ -84,7 +85,7 @@ let isCollect = ref(0)
|
||||
postVideoRemainApi({
|
||||
cameraIndexCode: list.value.map((item) => item.cameraIndexCode)
|
||||
})
|
||||
}, 4000)
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
const getPreviewUrl = async (code) => {
|
||||
@@ -101,13 +102,8 @@ let isCollect = ref(0)
|
||||
pageSize: 5
|
||||
})
|
||||
list.value = res.data
|
||||
if(list.value.length){
|
||||
postVideoRemain()
|
||||
}else{
|
||||
console.log('清除定时器')
|
||||
//清除定时器
|
||||
if (timer) clearInterval(timer)
|
||||
}
|
||||
postVideoRemain()
|
||||
if (timer) clearInterval(timer)
|
||||
// console.log(list.value,'list.valuelist.valuelist.valuelist.value')
|
||||
// nextTick(() => {
|
||||
// list.value.forEach(async (item, index) => {
|
||||
@@ -129,7 +125,14 @@ let isCollect = ref(0)
|
||||
// })
|
||||
// })
|
||||
}
|
||||
|
||||
watch(
|
||||
() => list.value,
|
||||
(val) => {
|
||||
if(val.length){
|
||||
postVideoRemain()
|
||||
}
|
||||
}
|
||||
)
|
||||
// 释放hls实例
|
||||
const clearHlsRefs = () => {
|
||||
if (hlsRefs.length > 0) {
|
||||
|
||||
@@ -64,6 +64,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :title="'三峡之巅广播'" center v-model="dialogTableVisible2">
|
||||
<div class="bom-box bom-box2">
|
||||
<div class="table2">
|
||||
<!-- <div class="header-title">三峡之巅广播</div> -->
|
||||
<iframe style="width:100%;height:100%;" src="http://192.168.0.2:81/"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -71,6 +79,7 @@
|
||||
import { getComDeptsApi, getComDeptUsersApi, getComRecordApi } from '@/api/common'
|
||||
let deptsList = ref([])
|
||||
let dialogTableVisible = ref(false)
|
||||
let dialogTableVisible2 = ref(false)
|
||||
const getComDepts = async () => {
|
||||
let res = await getComDeptsApi()
|
||||
deptsList.value = res.data
|
||||
@@ -83,7 +92,8 @@
|
||||
let gridData = ref([])
|
||||
let gridTitle = ref('')
|
||||
const goItc = () => {
|
||||
location.href="http://192.168.0.2:81/";
|
||||
dialogTableVisible2.value = true
|
||||
// location.href="http://192.168.0.2:81/";
|
||||
}
|
||||
const handleDepsUser = async (id, item) => {
|
||||
gridTitle.value = item.name
|
||||
@@ -99,6 +109,13 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-dialog__headerbtn .el-dialog__close){
|
||||
color:#fff;
|
||||
font-size:40px;
|
||||
position:relative;
|
||||
top:15px;
|
||||
right:15px;
|
||||
}
|
||||
:deep(.el-dialog) {
|
||||
background: url('/src/assets/images/map-bg-2.png') no-repeat top center;
|
||||
background-size: 100% 100%;
|
||||
@@ -124,7 +141,23 @@
|
||||
background-image: url('@/assets/images/bg-1.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.bom-box2{
|
||||
// margin-top:vh(10);
|
||||
min-width:vw(900);
|
||||
height:vh(800);
|
||||
.header-title{
|
||||
font-size:vw(24);
|
||||
color:#fff;
|
||||
text-align:center;
|
||||
font-weight:bold;
|
||||
margin-bottom:vh(20);
|
||||
}
|
||||
}
|
||||
.bom-box {
|
||||
.table2{
|
||||
width:100%;
|
||||
height:vh(740);
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
margin-top: vh(5);
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
// 点击导航
|
||||
const handleNav = (item) => {
|
||||
// console.log(item.path,'测试一下 ')
|
||||
console.log(item,router.currentRoute.value.path,'测试一下 ')
|
||||
if (isSkip.value) {
|
||||
router.push(item.path)
|
||||
} else {
|
||||
@@ -219,8 +219,10 @@
|
||||
let res = await getSpotListApi()
|
||||
spotList.value = res.data
|
||||
}
|
||||
let monitorDefaultData = ref(null)
|
||||
// 设置当前路由导航栏
|
||||
const setNav = async () => {
|
||||
console.log(monitorDefaultData.value,'setNav 测试 ++++++++++++')
|
||||
navLeft.value = []
|
||||
navRight.value = []
|
||||
otherLeftNav.value = []
|
||||
@@ -294,8 +296,16 @@
|
||||
},
|
||||
...spotRes.data
|
||||
]
|
||||
current.value = navLeft.value[0].id
|
||||
title.value = navLeft.value[0].name
|
||||
if(monitorDefaultData.value){
|
||||
current.value = monitorDefaultData.value.id
|
||||
title.value = monitorDefaultData.value.name
|
||||
pubSub.publish('monitorChange', monitorDefaultData.value)
|
||||
}else{
|
||||
current.value = navLeft.value[0].id
|
||||
title.value = navLeft.value[0].name
|
||||
}
|
||||
|
||||
|
||||
break
|
||||
case '/sceneTesting':
|
||||
title.value = '三峡之巅-安全检测'
|
||||
@@ -362,7 +372,26 @@
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
onMounted(() => {
|
||||
onMounted(async() => {
|
||||
// 获取查询参数
|
||||
|
||||
|
||||
PubSub.subscribe('navToChange', (msg, data) => {
|
||||
monitorDefaultData.value = data
|
||||
console.log(monitorDefaultData.value,'monitorDefaultData.valuemonitorDefaultData.value')
|
||||
// getSpotListApi().then((res)=>{
|
||||
// console.log(res.data[0],'spotResspotResspotRes')
|
||||
// router.push('/monitor')
|
||||
// router.currentRoute.value.path = '/monitor'
|
||||
// setTimeout(()=>{
|
||||
// current.value = res.data[1].id
|
||||
// handleNav(res.data[1])
|
||||
// pubSub.publish('monitorChange', res.data[1])
|
||||
// },2000)
|
||||
// })
|
||||
|
||||
|
||||
})
|
||||
getWeather()
|
||||
getSpotList()
|
||||
getCurrentDate()
|
||||
|
||||
Reference in New Issue
Block a user