From b65e5730b9e46207a624c0ccf4c9e102312c655f Mon Sep 17 00:00:00 2001 From: xianyi Date: Fri, 28 Nov 2025 18:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/UI8/UI8.css | 8 ++++++++ src/pages/UI8/UI8.tsx | 39 ++++++++++++++++++++++++++++++--------- src/pages/UI9/UI9.css | 6 ++++-- src/pages/UI9/UI9.tsx | 2 +- 4 files changed, 43 insertions(+), 12 deletions(-) diff --git a/src/pages/UI8/UI8.css b/src/pages/UI8/UI8.css index 376f37e..a751257 100644 --- a/src/pages/UI8/UI8.css +++ b/src/pages/UI8/UI8.css @@ -96,6 +96,7 @@ -ms-overflow-style: none; /* IE 和 Edge */ padding: 20px 10px; + margin-bottom: 10px; } .ui8-pdf-container::-webkit-scrollbar { @@ -232,6 +233,7 @@ flex-direction: column; align-items: center; justify-content: center; + transition: opacity 0.3s ease, transform 0.3s ease; } .ui8-right-section :last-child { @@ -239,6 +241,12 @@ margin-left: 100px; } +.ui8-right-section--hidden { + opacity: 0; + transform: translateX(80px); + pointer-events: none; +} + .ui8-printer-panel { width: 100%; height: -6px; diff --git a/src/pages/UI8/UI8.tsx b/src/pages/UI8/UI8.tsx index f48480a..b221013 100644 --- a/src/pages/UI8/UI8.tsx +++ b/src/pages/UI8/UI8.tsx @@ -4,7 +4,6 @@ import "react-pdf/dist/esm/Page/AnnotationLayer.css"; import "./UI8.css"; import "../../assets/css/basic.css"; import { useNavigate } from "react-router-dom"; -import BackButton from "../../components/BackButton"; import ConfirmButton from "../../components/ConfirmButton"; import ui8A from "../../assets/ui8A.png"; import ui8B from "../../assets/ui8B.png"; @@ -73,6 +72,8 @@ const UI8: React.FC = () => { const [isPrinterDropdownOpen, setIsPrinterDropdownOpen] = useState(false); const printerDropdownRef = useRef(null); + const pdfContainerRef = useRef(null); + const [isRightSectionHidden, setIsRightSectionHidden] = useState(false); const getExamId = () => { const storedId = localStorage.getItem("selectedExamId"); @@ -264,9 +265,22 @@ const UI8: React.FC = () => { setIsPrinterDropdownOpen((prev) => !prev); }, [printers.length, printersLoading]); - const handleBack = useCallback(() => { - navigate(-1); - }, [navigate]); + const handlePdfScroll = useCallback(() => { + const container = pdfContainerRef.current; + if (!container) return; + const shouldHide = container.scrollTop > 20; + setIsRightSectionHidden((prev) => { + if (prev === shouldHide) return prev; + return shouldHide; + }); + }, []); + + useEffect(() => { + setIsRightSectionHidden(false); + if (pdfContainerRef.current) { + pdfContainerRef.current.scrollTop = 0; + } + }, [pdfFiles]); // 打印PDF功能 const handleConfirm = useCallback(async () => { @@ -396,7 +410,11 @@ const UI8: React.FC = () => {
-
+
{ />
-
+
-
- +
+ {/* */}
diff --git a/src/pages/UI9/UI9.css b/src/pages/UI9/UI9.css index 03c9d4d..fe29555 100644 --- a/src/pages/UI9/UI9.css +++ b/src/pages/UI9/UI9.css @@ -7,8 +7,8 @@ width: 100%; height: 100%; } + .ui9-title { - width: 690px; height: 88px; overflow-wrap: break-word; color: rgba(0, 45, 93, 1); @@ -18,6 +18,7 @@ text-align: left; white-space: nowrap; } + .ui9-text { width: 628px; overflow-wrap: break-word; @@ -29,6 +30,7 @@ line-height: 80px; text-align: center; } + .ui9-instruction { height: 34px; overflow-wrap: break-word; @@ -65,4 +67,4 @@ width: 358px; height: 358px; margin: 110px 0; -} +} \ No newline at end of file diff --git a/src/pages/UI9/UI9.tsx b/src/pages/UI9/UI9.tsx index b0fa70e..76b0601 100644 --- a/src/pages/UI9/UI9.tsx +++ b/src/pages/UI9/UI9.tsx @@ -45,7 +45,7 @@ const UI9: React.FC = () => { return (
- 太平VIP客户认证 + 微信扫码添加 {isAuthenticated ? ( <>