1.需盘点取消

2.古井贡的首列是最后列
3.视频墙修改为不再使用多个视频墙模式
bozhou-古井贡酒
LAPTOP-S9HJSOEB\昊天 2 years ago
parent 657fba01ca
commit f15e5c6f2b

@ -1,6 +1,6 @@
<template> <template>
<div class="subsection"> <div class="subsection">
<a-layout style="width: 1500px"> <a-layout style="width: 1700px; ">
<a-layout style="width: 100%;height: 310px"> <a-layout style="width: 100%;height: 310px">
<a-layout-sider width="110px"> <a-layout-sider width="110px">
<a-tabs default-active-key="1" tab-position="left" @change="changeTabLeft" v-if="total.row > nums.row"> <a-tabs default-active-key="1" tab-position="left" @change="changeTabLeft" v-if="total.row > nums.row">
@ -20,11 +20,11 @@
</a-layout-sider> </a-layout-sider>
<a-layout-content> <a-layout-content>
<!-- <slot :data="{select, nums, random}"></slot> --> <!-- <slot :data="{select, nums, random}"></slot> -->
<div class="roadway-buttom"> <div class="roadway-buttom" style="overflow-x: auto;">
<div class="roadway-box"> <div class="roadway-box">
<div class="line" v-for="(row,rowIndex) in total.row" :key="rowIndex" v-if="row >= random.row[0] && row <= random.row[1]"> <div class="line" v-for="(row,rowIndex) in total.row" :key="rowIndex" v-if="row >= random.row[0] && row <= random.row[1]">
<div v-for="(column,index) in total.column" :key="index" class="el" v-if="column >= random.column[0] && column <= random.column[1]"> <div v-for="(column,index) in columnList" :key="index" class="el" v-if="column >= random.column[0] && column <= random.column[1]">
<!--渲染默认巷道框架规格 定位浮在 已有巷道上做对应--> <!--渲染默认巷道框架规格 定位浮在 已有巷道上做对应-->
<span <span
@ -39,8 +39,9 @@
</div> </div>
</a-layout-content> </a-layout-content>
</a-layout> </a-layout>
<!--
<a-layout-footer> <a-layout-footer>
<!-- <a-tabs default-active-key="1" tab-position="bottom" @change="value => select.row = value" v-if="total.row > nums.row"> -->
<a-tabs default-active-key="1" tab-position="bottom" @change="changeTab" v-if="total.column > nums.column"> <a-tabs default-active-key="1" tab-position="bottom" @change="changeTab" v-if="total.column > nums.column">
<a-tab-pane <a-tab-pane
v-for="index in latticeColumn" v-for="index in latticeColumn"
@ -48,7 +49,7 @@
> >
<span slot="tab"> <span slot="tab">
{{ getRandom(index, latticeColumn, nums.column, total.column) }} {{ getRandom(index, latticeColumn, nums.column, total.column) }}
<!-- <a-icon :id="`${shelveId}-row-${getRandom(index,latticeRow,nums.row,total.row)}`"/> -->
<a-icon type="info-circle" v-if="status.column[index] === 1" style="color: #FFD700"/> <a-icon type="info-circle" v-if="status.column[index] === 1" style="color: #FFD700"/>
<a-icon type="close-circle" v-else-if="status.column[index] === 2" style="color: #d81e06"/> <a-icon type="close-circle" v-else-if="status.column[index] === 2" style="color: #d81e06"/>
@ -58,6 +59,7 @@
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-layout-footer> </a-layout-footer>
-->
</a-layout> </a-layout>
</div> </div>
</template> </template>
@ -89,7 +91,7 @@ export default {
default: () => { default: () => {
return { return {
row: 10, row: 10,
column: 30 column: 300
} }
} }
}, },
@ -160,10 +162,13 @@ export default {
row: {}, row: {},
column: {} column: {}
}, },
timer: null timer: null,
columnList: [],
} }
}, },
mounted() { mounted() {
this.rowList = this.moveLastToFirst()
this.$nextTick(() => { this.$nextTick(() => {
this.getStatus(); this.getStatus();
}) })
@ -192,6 +197,14 @@ export default {
}, },
methods: { methods: {
moveLastToFirst() {
const arr = [];
arr.push(this.total.column)
for (let i = 1; i <= this.total.column-1; i++) {
arr.push(i);
}
this.columnList = arr
},
changeTab(value){ changeTab(value){
this.select.column = value this.select.column = value
this.getStatus() this.getStatus()
@ -354,6 +367,7 @@ export default {
} }
.roadway-box { .roadway-box {
width: 2500px;
//transform: rotateX(180deg); //transform: rotateX(180deg);
padding: 10px 10px 0 0; padding: 10px 10px 0 0;
.line { .line {

@ -46,13 +46,6 @@
></a-tag> ></a-tag>
盘点正确 盘点正确
</span> </span>
<span class="info-text">
<a-tag
color="#f2ed48"
style="width: 30px; height: 20px; margin-right: 6px"
></a-tag>
需盘点
</span>
<span class="info-text"> <span class="info-text">
<a-tag <a-tag
color="#bfbfbf" color="#bfbfbf"

@ -32,6 +32,10 @@
:key="pane.key" :key="pane.key"
:tab="pane.title" :tab="pane.title"
> >
</a-tab-pane>
</a-tabs>
<a-row <a-row
v-for='rowIndex in row' v-for='rowIndex in row'
:key='rowIndex' :key='rowIndex'
@ -51,9 +55,6 @@
></video> ></video>
</a-col> </a-col>
</a-row> </a-row>
</a-tab-pane>
</a-tabs>
</div> </div>
</template> </template>
@ -88,7 +89,7 @@ export default {
//watch: {}, //watch: {},
computed: { computed: {
videoHeight() { videoHeight() {
return this.clientHeight / this.row + "px"; return (this.clientHeight / this.row )+ "px";
}, },
}, },
destroyed() { destroyed() {
@ -96,10 +97,12 @@ export default {
}, },
mounted() { mounted() {
this.getWallStyle(); this.getWallStyle();
this.$nextTick(() => { this.$nextTick(() => {
console.log("DOM已更新完成");
this.playPageCameras(); this.playPageCameras();
}); });
let isFullscreen = let isFullscreen =
document.fullscreenElement || document.fullscreenElement ||
document.mozFullScreenElement || document.mozFullScreenElement ||
@ -123,6 +126,7 @@ export default {
that.isFullscreen = !that.isFullscreen; that.isFullscreen = !that.isFullscreen;
}); });
}, },
updated() {},
methods: { methods: {
getWallStyle() { getWallStyle() {
this.$api.httpApi this.$api.httpApi
@ -150,52 +154,15 @@ export default {
console.log("clientHeight:" + this.clientHeight); console.log("clientHeight:" + this.clientHeight);
}, },
onEdit(targetKey, action) { onEdit(targetKey, action) {
const index = this.panes.findIndex((pane) => pane.key === targetKey); const index = this.panes.findIndex(
(pane) => pane.key === targetKey
);
if (index !== -1) { if (index !== -1) {
this.panes.splice(index, 1); this.panes.splice(index, 1);
} }
}, },
getAllCameras() {
this.$api.httpApi
.getAllCameras1({
data: {},
})
.then((res) => {
if (res.code == 200) {
let cameras = res.data;
for (let i = 1; i <= cameras.length; i++) {
let rowIndex =
Math.floor((i - 1) / this.column) + 1;
if (rowIndex > this.row) {
return;
}
let columnIndex = i % this.column;
if (columnIndex == 0) {
columnIndex = this.column;
}
let idName = rowIndex + "-" + columnIndex;
console.log("idName:" + idName);
let server =
cameras[i - 1].rtcServer +
":" +
cameras[i - 1].rtcServerPort;
let video = document.getElementById(idName);
let player = new WebRtcPlayer(
server,
video,
"camera" + cameras[i - 1].id
);
this.players.push(player);
}
}
})
.catch((err) => {
console.log(err);
});
},
// //
countVideo(i) { countVideo(i) {
this.row = i; this.row = i;
this.column = i; this.column = i;
@ -207,23 +174,26 @@ export default {
var page = Math.ceil(cameras.length / (this.row * this.column)); var page = Math.ceil(cameras.length / (this.row * this.column));
this.panes = []; this.panes = [];
for (var i = 1; i <= page; i++) { for (var i = 1; i <= page; i++) {
this.panes.push({ title: "视频墙 "+i, content: "Content of Tab "+i, key: i-1 }); this.panes.push({
title: "视频墙 " + i,
content: "Content of Tab " + i,
key: i - 1,
});
} }
}, },
changeTab(key) { changeTab(key) {
console.log(key); console.log(key);
}, },
onTabClick(key) { onTabClick(key) {
this.destory() this.destory();
console.log(key); console.log(key);
this.activeKey = key; this.activeKey = key;
this.playPageCameras(); this.playPageCameras();
}, },
playPageCameras() { playPageCameras() {
this.$nextTick(() => {
this.$api.httpApi this.$api.httpApi
.getAllCameras({ .getAllCameras({
data: {}, data: {},
@ -231,9 +201,12 @@ export default {
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
let cameras = res.data; let cameras = res.data;
this.pageInfo(cameras) this.pageInfo(cameras);
var pageSize = (this.row*this.column); var pageSize = this.row * this.column;
var camerasPage = cameras.slice(this.activeKey*pageSize,(this.activeKey+1)*pageSize); var camerasPage = cameras.slice(
this.activeKey * pageSize,
(this.activeKey + 1) * pageSize
);
console.log(camerasPage); console.log(camerasPage);
this.players = []; this.players = [];
for (let i = 1; i <= camerasPage.length; i++) { for (let i = 1; i <= camerasPage.length; i++) {
@ -253,6 +226,7 @@ export default {
":" + ":" +
camerasPage[i - 1].rtcServerPort; camerasPage[i - 1].rtcServerPort;
let video = document.getElementById(idName); let video = document.getElementById(idName);
console.log(video);
let player = new WebRtcPlayer( let player = new WebRtcPlayer(
server, server,
video, video,
@ -265,6 +239,7 @@ export default {
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
});
}, },
destory() { destory() {
for (let player of this.players) { for (let player of this.players) {

@ -98,7 +98,7 @@ export default {
console.log("clientHeight:"+this.clientHeight) console.log("clientHeight:"+this.clientHeight)
}, },
getAllCameras(){ getAllCameras(){
this.$api.httpApi.getAllCameras3({ this.$api.httpApi.getAllCameras1({
data: {} data: {}
}).then(res => { }).then(res => {
if(res.code == 200) { if(res.code == 200) {
@ -116,6 +116,7 @@ export default {
console.log("idName:"+idName); console.log("idName:"+idName);
let server = cameras[i-1].rtcServer+":"+ cameras[i-1].rtcServerPort let server = cameras[i-1].rtcServer+":"+ cameras[i-1].rtcServerPort
let video = document.getElementById(idName); let video = document.getElementById(idName);
console.log(video);
let player = new WebRtcPlayer(server,video,"camera"+cameras[i-1].id); let player = new WebRtcPlayer(server,video,"camera"+cameras[i-1].id);
this.players.push(player); this.players.push(player);
} }

Loading…
Cancel
Save