From e73f1a0bcc36ada8043ea67c1daebf1de88f49b1 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期一, 12 一月 2026 11:24:14 +0800
Subject: [PATCH] 君泰BI大屏提交
---
src/views/reportAnalysis/dataDashboard/index.vue | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/views/reportAnalysis/dataDashboard/index.vue b/src/views/reportAnalysis/dataDashboard/index.vue
index ccf6efd..6bdd658 100644
--- a/src/views/reportAnalysis/dataDashboard/index.vue
+++ b/src/views/reportAnalysis/dataDashboard/index.vue
@@ -1,6 +1,6 @@
<template>
- <div class="scale-container" :style="{ transform: `scale(${scaleRatio})` }">
- <div class="data-dashboard">
+ <div class="scale-container">
+ <div class="data-dashboard" :style="{ transform: `scale(${scaleRatio})` }">
<!-- 鍏ㄥ睆鎸夐挳 - 绉诲姩鍒板乏涓婅 -->
<button class="fullscreen-btn" @click="toggleFullscreen" :title="isFullscreen ? '閫�鍑哄叏灞�' : '鍏ㄥ睆鏄剧ず'">
<svg v-if="!isFullscreen" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
@@ -609,8 +609,9 @@
if (!container) return
// 鑾峰彇瀹瑰櫒鐨勫疄闄呭昂瀵�
- const containerWidth = container.clientWidth || window.innerWidth
- const containerHeight = container.clientHeight || window.innerHeight
+ const rect = container.getBoundingClientRect?.()
+ const containerWidth = container.clientWidth || rect?.width || window.innerWidth
+ const containerHeight = container.clientHeight || rect?.height || window.innerHeight
// 璁$畻瀹介珮缂╂斁姣斾緥锛屽彇杈冨皬鍊间互淇濊瘉鍐呭瀹屾暣鏄剧ず锛堢瓑姣旂缉鏀撅級
const scaleX = containerWidth / designWidth
@@ -1088,14 +1089,14 @@
/* 澶栭儴缂╂斁瀹瑰櫒 - 鍗犳嵁鏁翠釜瑙嗗彛 */
.scale-container {
position: relative;
- width: 100vw;
- height: 100vh;
- overflow: hidden;
+ width: 100%;
+ /* 椤甸潰鍦ㄥ父瑙勫竷灞�涓嬶紙鏈夐《鏍忥級榛樿鍑忓幓 84px锛岄伩鍏嶅唴瀹硅瑁佸垏 */
+ height: calc(100vh - 84px);
display: flex;
align-items: center;
justify-content: center;
- transform-origin: center center;
background-color: #000;
+ overflow: hidden;
}
/* 鍐呴儴鍐呭鍖哄煙 - 鍥哄畾璁捐灏哄 */
@@ -1107,12 +1108,13 @@
background-size: cover;
background-position: center;
background-repeat: no-repeat;
+ transform-origin: center center;
}
/* 鍏ㄥ睆鐘舵�佺殑鏍峰紡 - 浣滅敤浜巗cale-container */
.scale-container:fullscreen {
- width: 100vw;
- height: 100vh;
+ width: 100vw;
+ height: 100vh;
margin: 0;
padding: 0;
background-color: #000;
@@ -1143,7 +1145,7 @@
.dashboard-header {
position: relative;
z-index: 1;
- height: 170px;
+ height: 86px;
background-image: url("@/assets/BI/biaoti.png");
background-size: cover;
background-position: center;
@@ -1157,7 +1159,7 @@
font-weight: 600;
font-size: 52px;
color: #FFFFFF;
-top: 32px;
+top: 16px;
position: absolute;
}
@@ -1190,7 +1192,7 @@
display: flex;
gap: 30px;
padding: 0 30px;
- height: calc(100% - 120px);
+ height: calc(100% - 86px);
overflow: hidden;
}
--
Gitblit v1.9.3