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 @@
-
-
-