flx:优化监控分页逻辑

This commit is contained in:
Rain_ 2025-12-11 18:20:03 +08:00
parent d354d72a0f
commit a0189983a8
4 changed files with 30 additions and 10 deletions

View File

@ -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)
//avalueb
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;

View File

@ -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;

View File

@ -523,4 +523,13 @@ export const getCurrentLayout = async () => {
funcName: "getLayout"
});
return data;
}
// 设置当前布局
export const setCurrentLayout = async (layout) => {
await oWebControl.JS_RequestInterface({
funcName: "setLayout",
argument: {
layout: layout
}
});
}

View File

@ -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,