Squashed commit of the following:
commit eaaf9cdd86a967c876407b7d4e4954d4a06f42ad
Merge: 4ac3dd4 43b5d3c
Author: 严妍 <3096114695@qq.com>
Date: Thu Jul 13 18:04:04 2023 +0800
Merge branch 'shenzhen-dev' of http://139.9.66.234:18023/yjlHub/zhgdlarge into dev-cjp
commit 4ac3dd47beb94c4d29300ec149734d4bf2afa8cd
Author: 严妍 <3096114695@qq.com>
Date: Thu Jul 13 18:03:45 2023 +0800
对接 七参数大屏视频列表接口
This commit is contained in:
parent
43b5d3cd23
commit
1a7b013ff9
11
src/api/modules/video.ts
Normal file
11
src/api/modules/video.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import http from "@/api";
|
||||
const BASEURL = import.meta.env.VITE_API_URL;
|
||||
|
||||
// 根据分组查询视频列表
|
||||
export const selectProjectVideoListApi = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/videoItem/selectProjectVideoList`, params);
|
||||
};
|
||||
// 查询子账号视频列表
|
||||
export const selectUserVideoListApi = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/videoItem/selectUserVideoList`, params);
|
||||
};
|
||||
@ -1,89 +1,60 @@
|
||||
<template>
|
||||
<div class="videoListBig">
|
||||
<div class="title"><i>监控设备列表</i></div>
|
||||
<div class="content">
|
||||
<div class="decivList">
|
||||
<div class="menuDev" v-for="item in VideoData.VideoList" :class="item.status == 0 ? 'online' : 'offline'">
|
||||
<div class="decName">
|
||||
<span v-show="item.status == 0"><img src="@/assets/images/dustNoise/onlineImg.png" alt="" /></span>
|
||||
<span v-show="item.status == 1"><img src="@/assets/images/dustNoise/offImg.png" alt="" /></span>
|
||||
<span> {{ item.videoName }}</span>
|
||||
<vue-scroll style="height: 500px;">
|
||||
<div class="content">
|
||||
<div class="decivList">
|
||||
<div class="menuDev" v-for="item in videoList" :key="item.id" :class="item.deviceState == 1 ? 'online' : 'offline'">
|
||||
<div class="decName">
|
||||
<!-- <span v-show="item.deviceState == 1"><img src="@/assets/images/dustNoise/onlineImg.png" alt="" /></span> -->
|
||||
<!-- <span v-show="item.deviceState == 2"><img src="@/assets/images/dustNoise/offImg.png" alt="" /></span> -->
|
||||
<span style="white-space: nowrap"> {{ item.videoName }}</span>
|
||||
</div>
|
||||
<div class="status">{{ item.deviceState == 1 ? "在线" : "离线" }}</div>
|
||||
</div>
|
||||
<div class="status">{{ item.status == 0 ? "在线" : "离线" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive } from "vue";
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { GlobalStore } from "@/stores";
|
||||
// import { useRouter } from "vue-router";
|
||||
import { selectProjectVideoListApi, selectUserVideoListApi } from "@/api/modules/video";
|
||||
// const router = useRouter();
|
||||
const store = GlobalStore();
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
let VideoData = reactive({
|
||||
VideoList: [
|
||||
{
|
||||
videoName: "东侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "南侧枪机",
|
||||
status: 1
|
||||
},
|
||||
{
|
||||
videoName: "西侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 1
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
videoName: "北侧枪机",
|
||||
status: 0
|
||||
}
|
||||
]
|
||||
});
|
||||
return {
|
||||
VideoData
|
||||
};
|
||||
}
|
||||
};
|
||||
let videoList = ref([] as any);
|
||||
|
||||
function loadData() {
|
||||
selectProjectVideoListApi({
|
||||
projectSn: store.sn
|
||||
}).then(res => {
|
||||
videoList.value = res.result.videoList[0].list;
|
||||
console.log("视频列表", res);
|
||||
});
|
||||
}
|
||||
function loadData2() {
|
||||
selectUserVideoListApi({
|
||||
projectSn: store.sn
|
||||
// userId: store.userId
|
||||
}).then(res => {
|
||||
console.log("子账号视频列表", res);
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
loadData();
|
||||
loadData2();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.videoListBig {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: scroll;
|
||||
.title {
|
||||
height: 5%;
|
||||
line-height: 35px;
|
||||
@ -98,7 +69,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.content {
|
||||
height: 95%;
|
||||
height: 800px;
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
background: url("@/assets/images/cardImg.png") no-repeat;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user