From 17b3cf1889304ae7f861ef05e7735d61f9c18e74 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期一, 07 十二月 2020 17:20:03 +0800
Subject: [PATCH] 桌面分屏指示器添加临界条件判断是否显示
---
src/pages/desktop/index/components/ToolsEntry.vue | 2 +-
src/components/subComponents/MultiRangeSlider.vue | 1 -
src/components/player/index.vue | 55 +------------------------------------------------------
3 files changed, 2 insertions(+), 56 deletions(-)
diff --git a/src/components/player/index.vue b/src/components/player/index.vue
index 7cffb92..c64cf57 100644
--- a/src/components/player/index.vue
+++ b/src/components/player/index.vue
@@ -79,22 +79,6 @@
};
},
watch: {
- // "TreeDataPool.selectedNode": async function(node){
- // if(node){
- // console.log('TreeDataPool.selectedNode')
- // console.log(node)
- // //this.Camera.cameraId = node.id;
- // const res = await getAllPolygon({cameraId: node.id});
-
- // this.canvasData.line = res.data.line;
- // this.canvasData.rect = res.data.rect;
- // this.canvasData.arrow = res.data.arrow;
- // this.canvasData.polygon = res.data.polygon;
- // console.log(this.canvasData)
- // this.clickSelect(this.canvasData);
- // }
- // },
-
rtspUrl: function (newVal, oldVal) {
if (newVal !== oldVal) {
if (this.wfs.config) {
@@ -112,7 +96,7 @@
if (id !== this.wfsId) {
return
}
-
+
if (this.wfs.websocketLoader && this.wfs.websocketLoader.client) {
if (this.wfs.websocketLoader.client.disconnected) {
this.clickStart();
@@ -135,7 +119,6 @@
if (cameraId == "") {
cameraId = this.getUuid();
}
-
if (Wfs.isSupported()) {
let wsAddr = this.wsAddr;
let cameraInfo = {
@@ -181,11 +164,6 @@
_this.ctx.moveTo(v.location[0].x / _this.showProportion, v.location[0].y / _this.showProportion);
_this.ctx.lineTo(v.location[1].x / _this.showProportion, v.location[1].y / _this.showProportion);
_this.ctx.stroke();
- // _this.showRemarks(
- // v.location[0].x / _this.showProportion,
- // v.location[0].y / _this.showProportion,
- // v.name
- // );
_this.canvas.style.cursor = "default";
});
_this.canvasData.rect.forEach(function (v, i) {
@@ -197,11 +175,6 @@
_this.ctx.lineTo(v.location[3].x / _this.showProportion, v.location[3].y / _this.showProportion);
_this.ctx.lineTo(v.location[0].x / _this.showProportion, v.location[0].y / _this.showProportion);
_this.ctx.stroke();
- // _this.showRemarks(
- // v.location[0].x / _this.showProportion,
- // v.location[0].y / _this.showProportion,
- // v.name
- // );
_this.canvas.style.cursor = "default";
});
@@ -217,12 +190,6 @@
30,
"yellow"
);
- // 缁樺埗鏂规硶
- // _this.showRemarks(
- // v.location[0].x / _this.showProportion,
- // v.location[0].y / _this.showProportion,
- // v.name
- // );
_this.canvas.style.cursor = "default";
});
@@ -238,11 +205,6 @@
}
_this.ctx.closePath();
_this.ctx.stroke();
- // _this.showRemarks(
- // v.location[v.location.length - 1].x / _this.showProportion,
- // v.location[v.location.length - 1].y / _this.showProportionY,
- // v.name
- // );
_this.canvas.style.cursor = "default";
});
@@ -320,30 +282,15 @@
this.canvasData.arrow = res.data.arrow;
this.canvasData.polygon = res.data.polygon;
console.log(this.canvasData)
- // this.canvasData = {
- // line: [],
- // arrow: [],
- // polygon: [{id:'uuid', name: '澶氳竟褰�1', location: [{ x: 735, y: 155 }, { x: 830, y: 156 }, { x: 809, y: 351 }, { x: 809, y: 364 }, { x: 753, y: 396 }, { x: 755, y: 520 },{ x: 706, y: 524 },{ x: 722, y: 392 },{x:758,y:280},{ x: 735, y: 155 }] }],
- // //rect: rsp.data.rect
- // rect: []
- // };
this.clickSelect(this.canvasData);
}
},
mounted() {
- //鑾峰彇video瀹介珮骞剁粰鍖哄煙canvas璧嬪��
- //this.setWidthHeight();
this.clickStart();
-
- window.addEventListener('resize',()=>{
- //this.setWidthHeight();
- //this.initArea();
- });
this.$nextTick(()=>{
this.canvas = this.$refs.areaCanvas;
this.ctx = this.canvas.getContext("2d");
this.ctx.lineWidth = 1;
-
this.initArea();
})
diff --git a/src/components/subComponents/MultiRangeSlider.vue b/src/components/subComponents/MultiRangeSlider.vue
index 5b8c0ac..5bab8e5 100644
--- a/src/components/subComponents/MultiRangeSlider.vue
+++ b/src/components/subComponents/MultiRangeSlider.vue
@@ -636,7 +636,6 @@
this.rangeArr.push(rang[j]);
}
}
-
this.rangeArrBackup = JSON.stringify(this.rangeArr);
},
redraw(onlyDraw = true) {
diff --git a/src/pages/desktop/index/components/ToolsEntry.vue b/src/pages/desktop/index/components/ToolsEntry.vue
index cfbfb00..cbc5e4f 100644
--- a/src/pages/desktop/index/components/ToolsEntry.vue
+++ b/src/pages/desktop/index/components/ToolsEntry.vue
@@ -1,7 +1,7 @@
<template>
<div class="tools-entry">
<div class="entry-wrap">
- <el-carousel :height="rowSize==3?'600px':'770px'" :autoplay="false" arrow="never">
+ <el-carousel :height="rowSize==3?'600px':'770px'" :autoplay="false" arrow="never" :indicator-position="carousels.length==1?'none':''">
<el-carousel-item v-for="(carousel,index) in carousels" :key="index">
<div class="app-list clearFix sdk-list">
<!-- <draggable v-model="carousel" @start="drag=true" @end="drag=false"> -->
--
Gitblit v1.8.0