flx:优化监控分页逻辑
This commit is contained in:
parent
d354d72a0f
commit
a0189983a8
@ -5,7 +5,7 @@
|
||||
<div :class="{'page-box1': pageNo > 1}" @click="onPageClick('up')">
|
||||
<div class="page-up"></div>
|
||||
</div>
|
||||
<div :class="{'page-box1': pageNo < pageSizeFlag}" @click="onPageClick('next')">
|
||||
<div :class="{'page-box1': pageNo <= pageSizeFlag && Math.trunc(pageSizeFlag) != 1}" @click="onPageClick('next')">
|
||||
<div class="page-down"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -16,15 +16,20 @@ let closeVideo=null
|
||||
import {
|
||||
OpenVideo,
|
||||
unInitObjPlugin,
|
||||
InitObjPlugin, hidePluginWindow,getCurrentLayout, showPluginWindow, closeAllVideo, cuttingPartWindow, resizeFn, isLoadPlugin, setWidthAndHeight, setOffset
|
||||
InitObjPlugin, hidePluginWindow,getCurrentLayout, setCurrentLayout, showPluginWindow, closeAllVideo, cuttingPartWindow, resizeFn, isLoadPlugin, setWidthAndHeight, setOffset
|
||||
} from "./video_isc_plugin.js";
|
||||
export default {
|
||||
props: ["devList", "type", 'isIframe', "devListAll"],
|
||||
watch: {
|
||||
//监听value的变化,进行相应的操作即可
|
||||
devList: function (a, b) {
|
||||
console.log('isc_plugin.vue获取到设备列表')
|
||||
console.log('isc_plugin.vue获取到设备列表', a)
|
||||
//a是value的新值,b是旧值
|
||||
closeAllVideo();
|
||||
if(a.length > 4) {
|
||||
this.layout = '4x4';
|
||||
setCurrentLayout(this.layout)
|
||||
}
|
||||
if (a.length > 0) {
|
||||
isLoadPlugin(a, this.layout)
|
||||
} else {
|
||||
@ -82,10 +87,10 @@ export default {
|
||||
// }
|
||||
|
||||
var layout = '2x2'
|
||||
if (this.type == 'company') {
|
||||
// layout='6x10'
|
||||
layout = '4x6'
|
||||
}
|
||||
// if (this.type == 'company') {
|
||||
// // layout='6x10'
|
||||
// layout = '4x6'
|
||||
// }
|
||||
if (this.type.indexOf('x') != -1) {
|
||||
layout = this.type
|
||||
}
|
||||
@ -134,7 +139,10 @@ export default {
|
||||
this.pageNo -= 1;
|
||||
} else if(type == "next") {
|
||||
console.log("pageNo", this.pageSizeFlag);
|
||||
if(this.pageNo >= this.pageSizeFlag) return;
|
||||
if(this.pageNo >= this.pageSizeFlag) {
|
||||
if(this.pageNo <= 1) return;
|
||||
this.pageNo = 0;
|
||||
};
|
||||
this.pageNo += 1;
|
||||
}
|
||||
const dataList = this.pageList;
|
||||
|
||||
@ -238,7 +238,10 @@ export default {
|
||||
this.pageNo -= 1;
|
||||
} else if(type == "next") {
|
||||
console.log("pageNo", this.pageSizeFlag);
|
||||
if(this.pageNo >= this.pageSizeFlag) return;
|
||||
if(this.pageNo >= this.pageSizeFlag) {
|
||||
if(this.pageNo == 1) return;
|
||||
this.pageNo = 0;
|
||||
};
|
||||
this.pageNo += 1;
|
||||
}
|
||||
const dataList = this.pageList;
|
||||
|
||||
@ -524,3 +524,12 @@ export const getCurrentLayout = async () => {
|
||||
});
|
||||
return data;
|
||||
}
|
||||
// 设置当前布局
|
||||
export const setCurrentLayout = async (layout) => {
|
||||
await oWebControl.JS_RequestInterface({
|
||||
funcName: "setLayout",
|
||||
argument: {
|
||||
layout: layout
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -37,7 +37,7 @@
|
||||
:isIframe="isIframe"
|
||||
:devList="devList"
|
||||
:devListAll="devListAll"
|
||||
v-if="isWindows() && $store.state.forceH5Play == 0"
|
||||
v-if="!isWindows() && $store.state.forceH5Play == 0"
|
||||
:class="{
|
||||
isDockingToWoer: isDockingToWoer,
|
||||
isLongguangIframe: isIframe,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user