From 1b34a1cc4afd8796b969efef58b3600665c5cfe8 Mon Sep 17 00:00:00 2001
From: chendingwei <1170506816@qq.com>
Date: Tue, 13 Dec 2022 16:49:27 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=B8=E6=9C=BA=E6=A8=A1?=
=?UTF-8?q?=E7=B3=8A=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/index.vue | 1 -
src/views/page/aside/cameraLeftMenu.vue | 216 ++++++++++++++++++++++++
src/views/page/cameraCenter.vue | 178 ++-----------------
3 files changed, 227 insertions(+), 168 deletions(-)
create mode 100644 src/views/page/aside/cameraLeftMenu.vue
diff --git a/src/views/index.vue b/src/views/index.vue
index 86bb995..135afad 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -20,7 +20,6 @@
+
+
\ No newline at end of file
diff --git a/src/views/page/cameraCenter.vue b/src/views/page/cameraCenter.vue
index c22d86f..621ff9a 100644
--- a/src/views/page/cameraCenter.vue
+++ b/src/views/page/cameraCenter.vue
@@ -42,33 +42,7 @@
工具箱
-
- 请输入标签内容
-
-
-
- 选择切换高点
-
-
-
-
-
-
-
-
-
- {{ title }}
-
- onContextMenuClick(treeKey, menuKey)">
- 打开
- 删除
-
-
-
-
-
-
-
+
@@ -82,7 +56,7 @@ import { apiUrl } from "@/axios";
import { storeToRefs } from 'pinia';
import Msg from "@/utils/message";
import * as cameraApi from '@/axios/cameraBase/cameraApi';
-import { number } from "vue-types";
+import CameraLeftMenu from '@/views/page/aside/cameraLeftMenu.vue'
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
let piniaStore = useStore();
let player = document.querySelector('#videoPlayer')
@@ -97,41 +71,19 @@ let labelList = ref([])
let addLabel = storeToRefs(piniaStore).addLabel
let addLabelLeft = ref(0);
let addLabelTop = ref(0);
-const treeData =ref( [
- {
- title: '视频监控',
- key: '视频监控',
- children: [
- {
- title: '横琴',
- key: '横琴',
- children: [
- // { title: '0-0-1-0', key: '0-0-1-0' },
- // { title: '0-0-1-1', key: '0-0-1-1' },
- // { title: '0-0-1-2', key: '0-0-1-2' },
- ],
- },
- ],
- },
-]);
+
onMounted(() => {
{
player = document.querySelector('#videoPlayer');
canvas = document.querySelector('#videoCanvas');
- loadTreeData();
loadVideoPlayer();
loadVideoCanvas();
}
})
-const onContextMenuClick = (treeKey: string, menuKey: string) => {
- console.log(`treeKey: ${treeKey}, menuKey: ${menuKey}`);
-};
-const expandedKeys = ref([]);
-
-watch(expandedKeys, (newVal,oldVal) => {
- console.log(newVal[newVal.length-1],'expandedKeys', newVal,oldVal);
-});
+
+
+
watch(curSelectKey, (newVal, oldVal) => {
switchCamera(newVal)
})
@@ -145,21 +97,7 @@ watch(addLabel, (newVal, oldVal) => {
}
}
})
-function loadTreeData() {
- cameraApi.GetList().then((res: any) => {
- let list: Array = res.data.data;
- console.log(list);
- treeData.value[0].children[0].children=list.map((item:any)=>{
- item.title=item.name
- item.key=item.id
- return item
- })
- piniaStore.addCameraMap(list)
-
- // switchCamera(list[0].id.toString())
- // treeData.value=piniaStore.treeData
- });
-}
+
//测试删除标签
function test(id: number) {
@@ -178,12 +116,7 @@ function test(id: number) {
Msg.error("删除失败")
})
}
-function selectCamera(e:any){
- console.log(e);
- if(e.length&&typeof e[0]=='number'){
- switchCamera(e[0].toString())
- }
-}
+
function mouseRightFn(e: any) {
console.log(1111111111, e);
@@ -443,67 +376,8 @@ onUnmounted(() => {
}
}
- .container {
- padding: 0 20px;
- }
-
- :deep(.ant-tree) {
- background-color: transparent !important;
-
- div {
- color: #000 !important;
- }
- }
-
- .messageList {
- position: absolute;
- top: 18%;
- left: 1%;
- width: 11vw;
- height: 21vw;
- background: url(@/assets/images/loginBG.png);
- background-size: 100% 100%;
- }
-
- .messageTitle {
- position: absolute;
- top: 6%;
- left: 50%;
- width: 75%;
- border-radius: 1vh;
- transform: translate(-50%, -50%);
- height: 3vh;
- color: #fff;
- line-height: 3vh;
- text-align: center;
- background-image: linear-gradient(to right, rgba(255, 107, 0, 0.3), rgba(80, 80, 80, 0.1), rgba(255, 107, 0, 0.3));
- }
- .arTagTitle {
- font-size: 1em;
- color: #333;
- padding-left: 1.2vw;
- line-height: 47px;
- position: absolute;
- top: 10%;
- left: 1%;
- width: 8.5vw;
- height: 50px;
- background: url(@/assets/images/textBG.png) no-repeat;
- background-size: 100% 100%;
- }
-
- .arTagTitle::before {
- content: '';
- background: url(@/assets/images/textAnimal.png) no-repeat;
- background-size: 100% 100%;
- height: 35px;
- width: 35px;
- position: absolute;
- top: 6px;
- left: -15px;
- animation: rounte 5s linear infinite;
- }
+
.buttomList {
position: absolute;
@@ -559,38 +433,8 @@ onUnmounted(() => {
font-size: 0.8em;
}
- .search {
- position: relative;
- height: 1.5em;
- width: 75%;
- margin: 6vh 0 0 50%;
- transform: translateX(-50%);
- color: #eee;
-
- img {
- position: absolute;
- top: 0;
- left: 0;
- height: 1.5em;
- width: 1.5em;
- }
-
- .arScrean {
- border: 0;
- outline: 0;
- height: 1.5em;
- position: absolute;
- top: 0;
- left: 1.9em;
- padding-left: 0.3em;
- border-left: #999 1px solid;
- color: #eee;
- background: rgba(200, 200, 255, 0);
- }
- }
+
}
-:deep(.ant-dropdown-menu-title-content) {
- color: #000 !important;
-}
+