From 7cba9843fb3a9ae5bba43044b6c41b7ac3d62323 Mon Sep 17 00:00:00 2001
From: hui <770260999@qq.com>
Date: Fri, 1 Mar 2024 18:57:55 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=8F=9C=E5=8D=95=E5=8F=98?=
=?UTF-8?q?=E5=BD=A2=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../JiHeExpressway/components/Adaptation.vue | 19 ++++++--
ruoyi-ui/src/views/JiHeExpressway/index.vue | 46 ++++++++++++++-----
.../pages/datav/roadNet/index.vue | 4 +-
.../pages/datav/roadNet/sensors.vue | 46 +++++++++++++------
ruoyi-ui/vue.config.js | 4 +-
5 files changed, 84 insertions(+), 35 deletions(-)
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
index ca9e5cfd..ff5a269d 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
@@ -15,6 +15,11 @@ export default {
defaultHeight: {
type: Number,
default: () => 1080
+ },
+ headerHeight: {
+ type: Number,
+ default: () => 68
+
}
},
provide() {
@@ -33,10 +38,10 @@ export default {
computed: {
transformStyle() {
const obj = {};
-
obj["transform"] = `scaleX(${this.scale.scaleX}) scaleY(${this.scale.scaleY})`;
obj["width"] = this.defaultWidth + "px";
- obj["height"] = this.defaultHeight + "px";
+ obj["height"] = this.defaultHeight - this.headerHeight + "px";
+ obj["top"] = this.headerHeight + "px";
// obj.top = `calc(50% - ${(this.defaultHeight / 2) * this.scaleY}px)`;
// obj.left = `calc(50% - ${(this.defaultWidth / 2) * this.scaleX}px)`;
@@ -46,12 +51,16 @@ export default {
return this.scale
}
},
+ watch:{
+ headerHeight(){
+ }
+ },
methods: {
initScale() {
let winW = window.innerWidth;
- let winH = window.innerHeight;
+ let winH = window.innerHeight - this.headerHeight;
- this.setScale(this.scale.scaleX = winW / this.defaultWidth, this.scale.scaleY = winH / this.defaultHeight)
+ this.setScale(this.scale.scaleX = winW / this.defaultWidth, this.scale.scaleY = winH / (this.defaultHeight - this.headerHeight))
},
setScale(scaleX, scaleY) {
const cssGlobalVariable = [
@@ -141,7 +150,7 @@ body {
diff --git a/ruoyi-ui/src/views/JiHeExpressway/index.vue b/ruoyi-ui/src/views/JiHeExpressway/index.vue
index 133c7c7d..ddf08c79 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/index.vue
@@ -1,12 +1,12 @@
-
-
-