对接 七参数大屏接口
This commit is contained in:
parent
31df8dcfd2
commit
4ac3dd47be
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>
|
<template>
|
||||||
<div class="videoListBig">
|
<div class="videoListBig">
|
||||||
<div class="title"><i>监控设备列表</i></div>
|
<div class="title"><i>监控设备列表</i></div>
|
||||||
<div class="content">
|
<vue-scroll style="height: 500px;">
|
||||||
<div class="decivList">
|
<div class="content">
|
||||||
<div class="menuDev" v-for="item in VideoData.VideoList" :class="item.status == 0 ? 'online' : 'offline'">
|
<div class="decivList">
|
||||||
<div class="decName">
|
<div class="menuDev" v-for="item in videoList" :key="item.id" :class="item.deviceState == 1 ? 'online' : 'offline'">
|
||||||
<span v-show="item.status == 0"><img src="@/assets/images/dustNoise/onlineImg.png" alt="" /></span>
|
<div class="decName">
|
||||||
<span v-show="item.status == 1"><img src="@/assets/images/dustNoise/offImg.png" alt="" /></span>
|
<!-- <span v-show="item.deviceState == 1"><img src="@/assets/images/dustNoise/onlineImg.png" alt="" /></span> -->
|
||||||
<span> {{ item.videoName }}</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>
|
||||||
<div class="status">{{ item.status == 0 ? "在线" : "离线" }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</vue-scroll>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup lang="ts">
|
||||||
import { reactive } from "vue";
|
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 {
|
let videoList = ref([] as any);
|
||||||
setup() {
|
|
||||||
let VideoData = reactive({
|
function loadData() {
|
||||||
VideoList: [
|
selectProjectVideoListApi({
|
||||||
{
|
projectSn: store.sn
|
||||||
videoName: "东侧枪机",
|
}).then(res => {
|
||||||
status: 0
|
videoList.value = res.result.videoList[0].list;
|
||||||
},
|
console.log("视频列表", res);
|
||||||
{
|
});
|
||||||
videoName: "南侧枪机",
|
}
|
||||||
status: 1
|
function loadData2() {
|
||||||
},
|
selectUserVideoListApi({
|
||||||
{
|
projectSn: store.sn
|
||||||
videoName: "西侧枪机",
|
// userId: store.userId
|
||||||
status: 0
|
}).then(res => {
|
||||||
},
|
console.log("子账号视频列表", res);
|
||||||
{
|
});
|
||||||
videoName: "北侧枪机",
|
}
|
||||||
status: 0
|
|
||||||
},
|
onMounted(async () => {
|
||||||
{
|
loadData();
|
||||||
videoName: "北侧枪机",
|
loadData2();
|
||||||
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
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.videoListBig {
|
.videoListBig {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
overflow: scroll;
|
||||||
.title {
|
.title {
|
||||||
height: 5%;
|
height: 5%;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
@ -98,7 +69,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
height: 95%;
|
height: 800px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
background: url("@/assets/images/cardImg.png") no-repeat;
|
background: url("@/assets/images/cardImg.png") no-repeat;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user