From c88c65cd4f46e5dd9a0215d9cda13f07b498f4a7 Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期二, 08 四月 2025 10:02:38 +0800
Subject: [PATCH] 浮窗

---
 src/assets/images/chronology/photoTest.png |    0 
 src/views/chronology/floatingWindow.vue    |   85 ++++++++++++++++++++++++++-
 src/assets/images/directory/touxiang.png   |    0 
 src/views/chronology/index.vue             |    9 ++
 src/views/directory/index.vue              |   69 ++++++++++------------
 5 files changed, 118 insertions(+), 45 deletions(-)

diff --git a/src/assets/images/chronology/photoTest.png b/src/assets/images/chronology/photoTest.png
new file mode 100644
index 0000000..39a2ead
--- /dev/null
+++ b/src/assets/images/chronology/photoTest.png
Binary files differ
diff --git a/src/assets/images/directory/touxiang.png b/src/assets/images/directory/touxiang.png
new file mode 100644
index 0000000..d745296
--- /dev/null
+++ b/src/assets/images/directory/touxiang.png
Binary files differ
diff --git a/src/views/chronology/floatingWindow.vue b/src/views/chronology/floatingWindow.vue
index 96c9609..b556ec3 100644
--- a/src/views/chronology/floatingWindow.vue
+++ b/src/views/chronology/floatingWindow.vue
@@ -1,6 +1,9 @@
 <template>
   <div class="dialogBox">
-    <div class="journalBox">
+    <div
+      class="journalBox"
+      v-if="info.type === 'journal' || info.type === 'book'"
+    >
       <div class="title">澶嶆柟鍓傞噺閰嶆瘮澶氱洰鏍囦紭鍖栫殑ED-NM-MO涓夎仈娉�</div>
       <div class="subtitle">
         <div class="source">涓浗涓尰鍩虹鍖诲鏉傚織</div>
@@ -22,10 +25,55 @@
         璇曢獙璁捐-闈炵嚎鎬у缓妯�-澶氱洰鏍囦紭鍖栫殑涓夎仈娉�
       </div>
     </div>
-    <div class="imageBox"></div>
-    <div class="BookBox"></div>
-    <div class="videoBox"></div>
-    <div class="audioBox"></div>
+    <div class="imageBox" v-if="info.type === 'image'">
+      <div style="width: 500px; height: 300px">
+        <img
+          class="autoImg"
+          src="@/assets/images/chronology/photoTest.png"
+          alt=""
+        />
+      </div>
+    </div>
+    <div class="BookBox" v-if="info.type === 'book'">book</div>
+    <div class="videoBox" v-if="info.type === 'video'">
+      <video
+        width="370"
+        height="240"
+        controls
+        src="https://www.w3schools.com/html/mov_bbb.mp4"
+      ></video>
+
+      <div>
+        <div class="subtitle">
+          <div class="source">涓浗涓尰鍩虹鍖诲鏉傚織</div>
+          <div class="journalInformation">2005 3鏈� 绗�40鍗� 绗�4鏈�</div>
+        </div>
+        <div class="contentBox" style="text-align: left">
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+        </div>
+      </div>
+    </div>
+    <div class="audioBox" v-if="info.type === 'audio'">
+      <audio src="https://www.w3schools.com/html/horse.ogg" controls></audio>
+
+      <div>
+        <div class="subtitle">
+          <div class="source">涓浗涓尰鍩虹鍖诲鏉傚織</div>
+          <div class="journalInformation">2005 3鏈� 绗�40鍗� 绗�4鏈�</div>
+        </div>
+        <div class="contentBox" style="text-align: left">
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+          <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -78,4 +126,31 @@
   margin-top: 10px;
   line-height: 18px;
 }
+.imageBox {
+  min-height: 300px;
+  padding: 10px;
+}
+
+.videoBox {
+  min-height: 240;
+  text-align: center;
+}
+.videoTitle {
+  background: #ffffff;
+  box-sizing: border-box;
+  border: 1px solid #dcdcdc;
+  box-shadow: 0px 0px 10px 0px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-radius: 5px;
+  padding: 10px;
+  width: 100%;
+  height: 100%;
+}
+.autoImg {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
 </style>
diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue
index ec3c594..1161cbc 100644
--- a/src/views/chronology/index.vue
+++ b/src/views/chronology/index.vue
@@ -48,7 +48,7 @@
                 >
                   <div class="detailDialog" v-if="citem.showDetail">
                     <!-- <div class="dialogContent" @click="gotoDetail(citem)"> -->
-                      <floatingWindow :info="citem" />
+                    <floatingWindow :info="citem" />
                     <!-- </div> -->
                   </div>
                 </div>
@@ -87,6 +87,7 @@
               showDetail: false,
               name: "鐜嬫案鐐�",
               year: "1938",
+              type: "journal",
               id: "1",
             },
           ],
@@ -100,6 +101,7 @@
               showDetail: false,
               name: "鐜嬫案鐐�",
               year: "1937",
+              type: "image",
               id: "1",
             },
             {
@@ -107,6 +109,7 @@
               showDetail: false,
               name: "鐜嬫案鐐�",
               year: "1937",
+              type: "book",
               id: "2",
             },
           ],
@@ -126,12 +129,14 @@
               color: "#87A7B9",
               showDetail: false,
               name: "鐜嬫案鐐�",
+              type: "video",
               id: "3",
             },
             {
               color: "#87A7B9",
               showDetail: false,
               name: "鐜嬫案鐐�",
+              type: "audio",
               id: "4",
             },
             {
@@ -990,7 +995,7 @@
   z-index: 9999;
   cursor: pointer;
   background: #fff;
-  border: 2px solid #CBBEAA;
+  border: 2px solid #cbbeaa;
   box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.5);
 }
 
diff --git a/src/views/directory/index.vue b/src/views/directory/index.vue
index 3cf48be..2303847 100644
--- a/src/views/directory/index.vue
+++ b/src/views/directory/index.vue
@@ -4,12 +4,18 @@
       <p>鐜嬫案鐐庨櫌澹鐢熺洰褰�</p>
     </div>
     <div class="page-main-title">
-      <p @click="changeTab('chart')" :class="[activeTabs == 'chart' ? 'active-tab' : '']">
-        <img :src="[activeTabs == 'chart' ? chartIcon : noChartIcon]" alt="">
+      <p
+        @click="changeTab('chart')"
+        :class="[activeTabs == 'chart' ? 'active-tab' : '']"
+      >
+        <img :src="[activeTabs == 'chart' ? chartIcon : noChartIcon]" alt="" />
         <span>鍥捐〃鏄剧ず</span>
       </p>
-      <p @click="changeTab('list')" :class="[activeTabs == 'list' ? 'active-tab' : '']">
-        <img :src="[activeTabs == 'list' ? listIcon : noListIcon]" alt="">
+      <p
+        @click="changeTab('list')"
+        :class="[activeTabs == 'list' ? 'active-tab' : '']"
+      >
+        <img :src="[activeTabs == 'list' ? listIcon : noListIcon]" alt="" />
         <span>鍒楄〃鏄剧ず</span>
       </p>
     </div>
@@ -31,8 +37,9 @@
             <p class="table-title-degree">{{ item.degree }}</p>
             <p class="table-title-number">{{ item.studentList.length }}浜�</p>
           </div>
-          <div class="table-title-right" @click="item.isShow = !item.isShow"><img
-              :src="[item.isShow ? topIcon : bottomIcon]" alt=""></div>
+          <div class="table-title-right" @click="item.isShow = !item.isShow">
+            <img :src="[item.isShow ? topIcon : bottomIcon]" alt="" />
+          </div>
         </div>
         <table
           cellpadding="100"
@@ -251,7 +258,7 @@
         name: "Root",
         children: [
           {
-            name: "Node 1",
+            name: "鐜嬬帀鏉�",
             children: [
               { name: "Leaf 1-1" },
               { name: "Leaf 1-2" },
@@ -305,40 +312,26 @@
             return `
               <div style="
                 padding: 10px;
-                background: #fff;
+                background: #FDF8F0;
                 border-radius: 5px;
-                box-shadow: 0 2px 10px rgba(0,0,0,0.1);
                 max-width: 300px;
+                width: 360px;
+                text-align: center;
               ">
-                <div style="
-                  border-bottom: 1px solid #eee;
-                  padding-bottom: 5px;
-                  margin-bottom: 5px;
-                ">
-                  <span style="
-                    font-size: 16px;
-                    color: #333;
-                    font-weight: bold;
-                  ">${data.name}</span>
-                  ${
-                    data.customInfo
-                      ? `<span style="
-                    background: #ffeb3b;
-                    padding: 2px 5px;
-                    border-radius: 3px;
-                    margin-left: 8px;
-                    font-size: 12px;
-                  ">${data.customInfo}</span>`
-                      : ""
-                  }
-                </div>
-                <div style="margin-top: 8px;">
-                  <div>鑺傜偣鍊�: <span style="color: #4f8ff7;">${
-                    data.value || 0
-                  }</span></div>
-                  <div>鎻忚堪: ${data.description || "鏆傛棤鎻忚堪"}</div>
-        
-                </div>
+                <div style="width: 80px;height: 80px;position: relative; margin: 0 auto; margin-bottom: 10px;background: #D8D8D8;">
+      <img class="autoImg"  src="${require("@/assets/images/directory/touxiang.png")}" alt="">
+                  </div>
+                <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${
+                  data.name
+                }</div>
+                <div> <span> 鐢� </span> <span> 纭曞+ </span> <span> 鍖椾含涓尰鑽ぇ瀛� </span></div>
+                <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;text-align: left;margin-top: 10px;">
+                  <p style="margin-bottom: 5px;">瀛︿範鏃堕棿锛�1985.09 -1988.07</p>
+                  <p style="margin-bottom: 5px;">鐜板伐浣滃崟浣嶏細鍖椾含涓尰鑽ぇ瀛︿笢鏂瑰尰闄�</p>
+                  <p style="margin-bottom: 5px;">鑱屽姟锛氬師闄㈤暱</p>
+                  <p style="margin-bottom: 5px;">鑱岀О锛氫富浠诲尰甯堛�佹暀鎺�</p>
+                  </div>
+                
               </div>
             `;
           },

--
Gitblit v1.9.1