Commit 91d67654 by Tianqing Liu

feat: 增加待我处理按钮

1 parent 14a6411c
......@@ -3,7 +3,7 @@
<van-action-bar>
<van-action-bar-icon icon="video-o" text="场景" @click="onClickIcon('scene')" />
<van-action-bar-icon v-if="props.ptzEnable" icon="aim" text="云台" @click="onClickIcon('ptz')" />
<van-action-bar-button type="danger" color="#387CF5" text="截图巡检" @click="onClickButton" />
<van-action-bar-button type="danger" color="#387CF5" style="height: 44px" text="截图巡检" @click="onClickButton" />
</van-action-bar>
</div>
</template>
......
......@@ -291,11 +291,17 @@
<!--底部按钮区-->
<VideoController
v-if="originUser === 'record'"
:ptz-enable="ptzEnableInController"
@screenshot="handleScreenshot"
@showMonitor="navBack"
@showPTZ="handleShowPTZ"
/>
<ProcessingController
v-else
@screenshot="handleScreenshot"
@back="handleBack"
/>
</div>
</template>
<script setup>
......@@ -303,6 +309,7 @@ import { ref, onMounted } from "vue";
import { Toast } from "vant";
import livePlayer from "@/components/extension/index.vue";
import VideoController from './controller.vue'
import ProcessingController from './processingController.vue';
import shopTour from "@/components/shopTour.vue";
//import vconsole from 'vconsole';
if (process.env.NODE_ENV !== "production") {
......@@ -350,12 +357,22 @@ const navBack = () => {
};
const ptzEnableInController = ref(paramObj.ptzEnable === '1') // 是否展示云台
const originUser = ref(paramObj.origin || 'record') // processing record
const showPTZStatus = ref(false);
const handleShowPTZ = () => {
console.log('handleShowPTZ')
showPTZStatus.value = !showPTZStatus.value;
vionPlayer.value.setPTZEnable(showPTZStatus.value);
}
const handleBack = () => {
const params = {
type: "inspection-back",
data: {},
origin: originUser.value,
}
window.postMessage(params, '*');
uni.postMessage(params, '*');
}
// 监控场景编辑
const gateEditShow = ref(false);
......@@ -949,6 +966,7 @@ const pictureProcess = (imgUrl) => {
data: {
imgUrl,
id: paramObj.id,
origin: originUser.value,
}
}
window.postMessage(params, '*');
......
<template>
<div class="processing-container">
<van-button type="default" size="normal" style="margin-right: 10px;" @click="handleBack">返回</van-button>
<!--icon="plus"-->
<van-button type="primary" size="normal" @click="handleScreenshot">截图反馈</van-button>
</div>
</template>
<script setup>
const props = defineProps(['originUser']) // processing origin
const emit = defineEmits(['screenshot', 'back'])
function handleScreenshot(type) {
console.log('onClickIcon', type)
emit('screenshot')
}
function handleBack() {
console.log('handleBack')
emit('back')
}
</script>
<style lang="less" scoped>
.processing-container {
display: flex;
padding: 10px;
position: fixed;
width: 100%;
bottom: 0px;
> button {
flex: 1;
border-radius: 8px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!