fix: BUG修改
This commit is contained in:
parent
4d0ec77f96
commit
078cf5b8f7
@ -10,6 +10,7 @@ export const GlobalStore = defineStore({
|
|||||||
id: "GlobalState",
|
id: "GlobalState",
|
||||||
// state: 返回对象的函数
|
// state: 返回对象的函数
|
||||||
state: (): GlobalState => ({
|
state: (): GlobalState => ({
|
||||||
|
globalScale: 1,
|
||||||
sn: "",
|
sn: "",
|
||||||
// token
|
// token
|
||||||
token: "",
|
token: "",
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
/* GlobalState */
|
/* GlobalState */
|
||||||
export interface GlobalState {
|
export interface GlobalState {
|
||||||
|
globalScale: number | null;
|
||||||
sn: string | null;
|
sn: string | null;
|
||||||
Message: Object | null;
|
Message: Object | null;
|
||||||
token: string | null;
|
token: string | null;
|
||||||
|
|||||||
@ -260,7 +260,7 @@ import personOn from "@/assets/images/carPosition/personOn.png";
|
|||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import Card from "@/components/card.vue";
|
import Card from "@/components/card.vue";
|
||||||
const store = GlobalStore();
|
const store:any = GlobalStore();
|
||||||
import { computed, reactive, ref, onMounted, onBeforeMount, watch } from "vue";
|
import { computed, reactive, ref, onMounted, onBeforeMount, watch } from "vue";
|
||||||
var mouseTool;
|
var mouseTool;
|
||||||
var marker;
|
var marker;
|
||||||
@ -372,6 +372,15 @@ let formRules = ref({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
const resetMapSize = () => {
|
||||||
|
console.log(666)
|
||||||
|
setTimeout(() => {
|
||||||
|
let mapContent:any = document.getElementById("mapContainer");
|
||||||
|
console.log(mapContent)
|
||||||
|
mapContent.style.transform = `scale(${1/store.globalScale})`;
|
||||||
|
}, 200);
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
choiceMonth.value = formatMonthTime(dayValue.value);
|
choiceMonth.value = formatMonthTime(dayValue.value);
|
||||||
console.log("当前月份", choiceMonth.value);
|
console.log("当前月份", choiceMonth.value);
|
||||||
@ -380,7 +389,17 @@ onMounted(() => {
|
|||||||
getCrewListData();
|
getCrewListData();
|
||||||
getFenceList();
|
getFenceList();
|
||||||
getFenceType();
|
getFenceType();
|
||||||
|
resetMapSize()
|
||||||
|
window.addEventListener("resize", e => {
|
||||||
|
resetMapSize()
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
onBeforeMount(() => {
|
||||||
|
window.removeEventListener("resize", e => {
|
||||||
|
resetMapSize()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// computed: {
|
// computed: {
|
||||||
// //Uploader实例
|
// //Uploader实例
|
||||||
// // uploader() {
|
// // uploader() {
|
||||||
|
|||||||
@ -404,6 +404,14 @@ let addEditForm = ref({
|
|||||||
type: 1,
|
type: 1,
|
||||||
driver: ""
|
driver: ""
|
||||||
});
|
});
|
||||||
|
const resetMapSize = () => {
|
||||||
|
console.log(666)
|
||||||
|
setTimeout(() => {
|
||||||
|
let mapContent:any = document.getElementById("mapContainer");
|
||||||
|
console.log(mapContent)
|
||||||
|
mapContent.style.transform = `scale(${1/store.globalScale})`;
|
||||||
|
}, 200);
|
||||||
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
choiceMonth.value = formatMonthTime(dayValue.value);
|
choiceMonth.value = formatMonthTime(dayValue.value);
|
||||||
// console.log("当前月份", choiceMonth.value);
|
// console.log("当前月份", choiceMonth.value);
|
||||||
@ -412,7 +420,17 @@ onMounted(() => {
|
|||||||
getCrewListData();
|
getCrewListData();
|
||||||
getFenceList();
|
getFenceList();
|
||||||
getFenceType();
|
getFenceType();
|
||||||
|
resetMapSize()
|
||||||
|
window.addEventListener("resize", e => {
|
||||||
|
resetMapSize()
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
onBeforeMount(() => {
|
||||||
|
window.removeEventListener("resize", e => {
|
||||||
|
resetMapSize()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// computed: {
|
// computed: {
|
||||||
// //Uploader实例
|
// //Uploader实例
|
||||||
// // uploader() {
|
// // uploader() {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ScaleBox :width="1920" :height="1080" bgc="transparent" :delay="100" :isFlat="false">
|
<ScaleBox :width="1920" :height="1080" bgc="transparent" :delay="100" :isFlat="false" @scaleChange="scaleChange">
|
||||||
<div class="largeScreen" ref="dataScreenRef">
|
<div class="largeScreen" ref="dataScreenRef">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<!-- <div class="hearderIcon"><img src="@/assets/images/jxjLogo.png" alt="" /></div> -->
|
<!-- <div class="hearderIcon"><img src="@/assets/images/jxjLogo.png" alt="" /></div> -->
|
||||||
@ -98,6 +98,9 @@ let nowDate = ref("2023.11.16" as any);
|
|||||||
let projectPassDay = ref(0 as any);
|
let projectPassDay = ref(0 as any);
|
||||||
//获取项目信息
|
//获取项目信息
|
||||||
const projectTimeInfo = ref({} as any);
|
const projectTimeInfo = ref({} as any);
|
||||||
|
const scaleChange = (data:any) => {
|
||||||
|
store.globalScale = data;
|
||||||
|
}
|
||||||
const getProjectInfo = async () => {
|
const getProjectInfo = async () => {
|
||||||
getNowDate();
|
getNowDate();
|
||||||
const res: any = await getTaskTimeDetail({ projectSn: store.sn });
|
const res: any = await getTaskTimeDetail({ projectSn: store.sn });
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
<ysyPlayAndPlayback :ref="'ysy'" :ysyParams="ysyParams"></ysyPlayAndPlayback>
|
<ysyPlayAndPlayback :ref="'ysy'" :ysyParams="ysyParams"></ysyPlayAndPlayback>
|
||||||
</div>
|
</div>
|
||||||
<!-- 播放海康 -->
|
<!-- 播放海康 -->
|
||||||
<div ref="playWndBox" style="width: 90%; height: 100%; margin: 0 5% 2% 5%">
|
<!-- <div ref="playWndBox" style="width: 90%; height: 100%; margin: 0 5% 2% 5%">
|
||||||
<div
|
<div
|
||||||
id="playWnd"
|
id="playWnd"
|
||||||
class="playWnd"
|
class="playWnd"
|
||||||
@ -46,6 +46,9 @@
|
|||||||
width: playWndWidth + 'px'
|
width: playWndWidth + 'px'
|
||||||
}"
|
}"
|
||||||
></div>
|
></div>
|
||||||
|
</div> -->
|
||||||
|
<div ref="playWndBox" style="width: 96%; height: 100%;margin: 0 2% 0% 2%">
|
||||||
|
<div id="playWnd" class="playWnd" style="width: 100%; height: 100%"></div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
@ -154,19 +157,21 @@ onMounted(async () => {
|
|||||||
// 监听scroll事件,使插件窗口尺寸跟随DIV窗口变化
|
// 监听scroll事件,使插件窗口尺寸跟随DIV窗口变化
|
||||||
window.addEventListener("scroll", () => {
|
window.addEventListener("scroll", () => {
|
||||||
if (oWebControl.value == undefined) {
|
if (oWebControl.value == undefined) {
|
||||||
oWebControl.JS_Resize(tagDomObj?.clientWidth, tagDomObj?.clientHeight);
|
setTimeout(function(){
|
||||||
|
oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale);
|
||||||
|
},200)
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
|
// 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
|
||||||
window.addEventListener("resize", e => {
|
window.addEventListener("resize", e => {
|
||||||
if (oWebControl.value == undefined) {
|
if (oWebControl.value == undefined) {
|
||||||
// console.log("wwwww", e);
|
setTimeout(function(){
|
||||||
|
oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale);
|
||||||
oWebControl.JS_Resize(tagDomObj?.clientWidth, tagDomObj?.clientHeight);
|
},200)
|
||||||
// oWebControl.JS_Resize(playWndHeight.value, playWndWidth.value);
|
|
||||||
// setWndCover();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
// 初始化播放器插件
|
// 初始化播放器插件
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
@ -300,7 +305,7 @@ const init = (callback: (() => void) | undefined) => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(function (oData: any) {
|
.then(function (oData: any) {
|
||||||
oWebControl.JS_Resize(playWndWidth.value, playWndHeight.value); // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
|
oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale); // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback();
|
||||||
@ -418,8 +423,8 @@ const previewVideo = (data: string | null) => {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.videoPlayerBig {
|
.videoPlayerBig {
|
||||||
width: 90%;
|
width: 100%;
|
||||||
height: 90%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user