Browse Source

window

master
DIAMOND 2 years ago
parent
commit
7cf68f01e3
  1. 6
      src/views/page/Model/LabelEditModel.vue
  2. 14
      src/views/page/cameraCenter.vue
  3. 10
      src/views/page/cameraWindow.vue

6
src/views/page/Model/LabelEditModel.vue

@ -80,7 +80,7 @@ const props = defineProps({
modelData: Object modelData: Object
}) })
onMounted(() => { onMounted(() => {
console.log("收到了", props.modelData); // console.log("", props.modelData);
if (props.modelData) { if (props.modelData) {
name.value = props.modelData.name; name.value = props.modelData.name;
canvasLeft.value = props.modelData.canvasLeftRatio canvasLeft.value = props.modelData.canvasLeftRatio
@ -139,7 +139,7 @@ function reset() {
//dom //dom
let dom = document.getElementById(props.modelData.id); let dom = document.getElementById(props.modelData.id);
document.body.onmousemove = e => { document.body.onmousemove = e => {
console.log(e); // console.log(e);
dom.style.left = e.clientX + 'px' dom.style.left = e.clientX + 'px'
dom.style.top = e.clientY + 'px' dom.style.top = e.clientY + 'px'
@ -189,7 +189,7 @@ function confirm() {
Id: props.modelData.id, Id: props.modelData.id,
CreateTime: props.modelData.createTime CreateTime: props.modelData.createTime
}).then(res => { }).then(res => {
console.log("res", res); // console.log("res", res);
if (res.data.data == true) { if (res.data.data == true) {
Msg.success("修改成功") Msg.success("修改成功")

14
src/views/page/cameraCenter.vue

@ -7,8 +7,11 @@
</video> --> </video> -->
<div id="videoPlayer" @mousedown="mouseDownVideo"></div> <div id="videoPlayer" @mousedown="mouseDownVideo"></div>
<div v-for="item in labelList" :class="`labels ${item.groupName == '视频标签' ? 'lavels-video' : 'lavels-build'}`" <div v-for="item in labelList" :class="`labels ${item.groupName == '视频标签' ? 'lavels-video' : 'lavels-build'}`"
:key="item.id" :id="item.id" :key="item.id"
:style="`top:${canvasHeight * item.canvasTopRatio}px;left:${canvasWidth * item.canvasLeftRatio}px`"> :id="item.id"
:style="`top:${canvasHeight * item.canvasTopRatio}px;left:${canvasWidth * item.canvasLeftRatio}px`"
@click="itemClick(item)"
>
<a-dropdown :trigger="['contextmenu']"> <a-dropdown :trigger="['contextmenu']">
<div class="labels-item" v-if="item.groupName == '视频标签'"> <div class="labels-item" v-if="item.groupName == '视频标签'">
<!-- <div class="labels-item" v-if="item.inFlag"> --> <!-- <div class="labels-item" v-if="item.inFlag"> -->
@ -75,6 +78,7 @@ import Msg from "@/utils/message";
import CameraLeftMenu from '@/views/page/Aside/cameraLeftMenu.vue' import CameraLeftMenu from '@/views/page/Aside/cameraLeftMenu.vue'
import CameraRightMenu from '@/views/page/Aside/cameraRightMenu.vue' import CameraRightMenu from '@/views/page/Aside/cameraRightMenu.vue'
import LabelEditModel from '@/views/page/Model/LabelEditModel.vue' import LabelEditModel from '@/views/page/Model/LabelEditModel.vue'
import cameraWindow from '@/views/page/cameraWindow.vue'
import popup from "@/utils/popup"; import popup from "@/utils/popup";
import VideoControlSimple from './VideoControl/VideoControlSimple.vue'; import VideoControlSimple from './VideoControl/VideoControlSimple.vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -182,6 +186,12 @@ function deleteLabel(id: number) {
}) })
} }
//
function itemClick(item:any){
// console.log("",item);
popup("监控画面", [h(cameraWindow, { windowData: item })], "cameraWindow");
}
function loadVideoPlayer() { function loadVideoPlayer() {
let elmId = 'videoPlayer'; let elmId = 'videoPlayer';
let url = apiUrl.WebRtcUrl; let url = apiUrl.WebRtcUrl;

10
src/views/page/cameraWindow.vue

@ -0,0 +1,10 @@
<template>
<div>asdasdasdasdasdasd</div>
</template>
<script setup lang='ts'>
</script>
<style lang="less" scoped>
</style>
Loading…
Cancel
Save