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