Merge branch 'main' of http://139.155.124.81:8088/cloud-mediate/mediate-manage-web into main
This commit is contained in:
commit
f814141e15
102
src/pages/mediation-page/components/VideoRoom.vue
Normal file
102
src/pages/mediation-page/components/VideoRoom.vue
Normal file
@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div
|
||||
:style="contentStyle"
|
||||
class="content"
|
||||
@mousedown="startDrag"
|
||||
@mouseup="stopDrag"
|
||||
@mouseleave="stopDrag">
|
||||
<div class="drag-div" @mousedown.stop="startDrag"></div>
|
||||
<div>Other content</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
position: { x: 0, y: 0 },
|
||||
dragging: false,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
mouseMoveHandler: null,
|
||||
mouseUpHandler: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
contentStyle() {
|
||||
return {
|
||||
left: `${this.position.x}px`,
|
||||
top: `${this.position.y}px`,
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
startDrag(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (!event.target.closest('.drag-div')) return;
|
||||
|
||||
this.dragging = true;
|
||||
this.offsetX = event.clientX - this.position.x;
|
||||
this.offsetY = event.clientY - this.position.y;
|
||||
|
||||
this.removeEventListeners();
|
||||
|
||||
this.mouseMoveHandler = this.onMouseMove.bind(this);
|
||||
this.mouseUpHandler = this.stopDrag.bind(this);
|
||||
|
||||
document.addEventListener('mousemove', this.mouseMoveHandler, true);
|
||||
document.addEventListener('mouseup', this.mouseUpHandler, true);
|
||||
},
|
||||
onMouseMove(event) {
|
||||
if (this.dragging) {
|
||||
requestAnimationFrame(() => {
|
||||
this.updatePosition(event.clientX, event.clientY);
|
||||
});
|
||||
}
|
||||
},
|
||||
updatePosition(clientX, clientY) {
|
||||
this.position.x = clientX - this.offsetX;
|
||||
this.position.y = clientY - this.offsetY;
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
stopDrag() {
|
||||
this.dragging = false;
|
||||
this.removeEventListeners();
|
||||
},
|
||||
removeEventListeners() {
|
||||
if (this.mouseMoveHandler) {
|
||||
document.removeEventListener('mousemove', this.mouseMoveHandler, true);
|
||||
}
|
||||
if (this.mouseUpHandler) {
|
||||
document.removeEventListener('mouseup', this.mouseUpHandler, true);
|
||||
}
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
this.removeEventListeners();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
position: absolute;
|
||||
border: 1px solid #ccc;
|
||||
box-sizing: border-box;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.drag-div {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #f00;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
color: white;
|
||||
cursor: grab;
|
||||
}
|
||||
</style>
|
||||
@ -17,16 +17,19 @@
|
||||
@click="VideoDialog={caseId:visiblePopover.caseId}">新增预约</div>
|
||||
</div>
|
||||
<div class="p-16 border-radius-8 border-solid-lighter-1">
|
||||
<el-scrollbar :style="'height: 132px'">
|
||||
<el-scrollbar :style="'height: 130px'">
|
||||
<div class="pb-6 pt-6 bor-E5E6EB" v-for="(item, index) in videoTableData" :key="index">
|
||||
<div class="flex-row align-items-center">
|
||||
<div class="mr-8 color-000 f-weight600 f16">{{item.pkgName}} {{item.bookingTime}}</div>
|
||||
<el-tag size="small">待视频</el-tag>
|
||||
<div class="mr-8 color-000 f-weight600 f16">{{item.name}} {{item.bookingTime}}</div>
|
||||
<el-tag size="small" :type="queryCondition.type?'success':''">{{ queryCondition.type ? '已视频' : '待视频' }}</el-tag>
|
||||
</div>
|
||||
<div class="flex-row justify-content-between align-items-center">
|
||||
<div class="f12">{{item.invitee}}</div>
|
||||
<div class="f12">{{item.content}}</div>
|
||||
<div class="flex-row align-items-center">
|
||||
<div class="f16 mr-8 cursor-pointer"><i class="el-icon-video-camera"></i></div>
|
||||
<div class="f16 mr-8 cursor-pointer"
|
||||
@click="handleVideoCall">
|
||||
<i class="el-icon-video-camera"></i>
|
||||
</div>
|
||||
<div class="f16 mr-8 cursor-pointer"
|
||||
@click="VideoEditDialog={id:item.id, bookingTime:item.bookingTime}">
|
||||
<i class="el-icon-edit-outline"></i>
|
||||
@ -42,20 +45,22 @@
|
||||
</div>
|
||||
|
||||
<!-- 视频预约 -->
|
||||
<VideoReservationDialog v-if="VideoDialog" :eventDialog.sync="VideoDialog"/>
|
||||
<VideoReservationDialog v-if="VideoDialog" :eventDialog.sync="VideoDialog" />
|
||||
<!-- 视频预约修改 -->
|
||||
<videoReservationEditDialog v-if="VideoEditDialog" :eventDialog.sync="VideoEditDialog" />
|
||||
<videoReservationEditDialog v-if="VideoEditDialog" :eventDialog.sync="VideoEditDialog" />
|
||||
<!-- 视频房间 -->
|
||||
<VideoRoom v-if="VideoCallDialog" :eventDialog.sync="VideoCallDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import eventTracingApi from "@/services/eventTracingApi";
|
||||
import videoTelephone from "@/services/videoTelephone";
|
||||
export default {
|
||||
name: "caseVideoReservationDialog",
|
||||
components: {
|
||||
VideoReservationDialog: () => import('./VideoReservationDialog'),//视频预约
|
||||
videoReservationEditDialog: () => import('../../event-tracing/components/videoReservationDialog'),//视频预约修改
|
||||
VideoRoom: () => import('./VideoRoom'),
|
||||
},
|
||||
props: {
|
||||
visiblePopover: {
|
||||
@ -79,6 +84,7 @@ export default {
|
||||
videoTableData: [],
|
||||
VideoDialog: null,
|
||||
VideoEditDialog: null,
|
||||
VideoCallDialog: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -100,8 +106,7 @@ export default {
|
||||
}
|
||||
videoTelephone.getListByCaseId(dataJson).then(res => {
|
||||
if (!res.code) {
|
||||
this.videoTableData = res.records;
|
||||
// this.total = res.total;
|
||||
this.videoTableData = res;
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -119,6 +124,11 @@ export default {
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleVideoCall(item) {
|
||||
this.VideoCallDialog = {
|
||||
id: item.id
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user