From cd574e3394883b79eac5d63f3b11bca852dbc7a0 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期一, 29 十二月 2025 20:57:17 +0800
Subject: [PATCH] 页面推送

---
 src/views/OfficeRelated/conference/index.vue |  510 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 478 insertions(+), 32 deletions(-)

diff --git a/src/views/OfficeRelated/conference/index.vue b/src/views/OfficeRelated/conference/index.vue
index 2932b7e..d7f2b3b 100644
--- a/src/views/OfficeRelated/conference/index.vue
+++ b/src/views/OfficeRelated/conference/index.vue
@@ -222,10 +222,11 @@
         />
       </div>
     </el-card>
+
     <el-dialog
       title="浼氳绾"
       :visible.sync="minutesDialogVisible"
-      width="600px"
+      width="700px"
     >
       <div v-if="currentRecord.meetingMinutes">
         <el-alert
@@ -237,12 +238,45 @@
         <div class="minutes-content">
           <el-card>
             <div
-              style="white-space: pre-line; line-height: 1.6; max-height: 400px; overflow-y: auto;"
+              style="white-space: pre-line; line-height: 1.6; max-height: 300px; overflow-y: auto;"
             >
               {{ currentRecord.meetingMinutes }}
             </div>
           </el-card>
         </div>
+
+        <!-- 浼氳绾闄勪欢灞曠ず -->
+        <div
+          class="minutes-attachments"
+          v-if="
+            currentRecord.minutesAttachments &&
+              currentRecord.minutesAttachments.length > 0
+          "
+        >
+          <el-divider content-position="left">浼氳绾闄勪欢</el-divider>
+          <div class="attachment-list">
+            <div
+              v-for="file in currentRecord.minutesAttachments"
+              :key="file.id"
+              class="attachment-item"
+            >
+              <el-link
+                type="primary"
+                :href="file.url"
+                target="_blank"
+                class="file-link"
+              >
+                <i
+                  :class="getFileIcon(file.type)"
+                  style="margin-right: 8px;"
+                ></i>
+                {{ file.name }}
+                <span class="file-size">({{ formatFileSize(file.size) }})</span>
+              </el-link>
+            </div>
+          </div>
+        </div>
+
         <div
           class="minutes-meta"
           style="margin-top: 16px; color: #909399; font-size: 12px;"
@@ -327,19 +361,101 @@
             {{ currentRecord.content }}
           </div>
         </el-descriptions-item>
-        <el-descriptions-item
-          label="闄勪欢"
-          :span="2"
-          v-if="currentRecord.attachments && currentRecord.attachments.length"
-        >
-          <div
-            v-for="file in currentRecord.attachments"
-            :key="file.id"
-            class="attachment-item"
-          >
-            <el-link type="primary" :href="file.url" target="_blank">
-              <i class="el-icon-document"></i> {{ file.name }}
-            </el-link>
+        <el-descriptions-item label="浼氳璇︽儏闄勪欢" :span="2">
+          <div class="detail-attachments">
+            <div
+              v-if="
+                currentRecord.detailAttachments &&
+                  currentRecord.detailAttachments.length > 0
+              "
+              class="attachment-grid"
+            >
+              <div
+                v-for="file in currentRecord.detailAttachments"
+                :key="file.id"
+                class="attachment-card"
+              >
+                <el-card shadow="hover" class="file-card">
+                  <div class="file-content">
+                    <i :class="getFileIcon(file.type)" class="file-icon"></i>
+                    <div class="file-info">
+                      <div class="file-name" :title="file.name">
+                        {{ file.name }}
+                      </div>
+                      <div class="file-meta">
+                        <span class="file-size">{{
+                          formatFileSize(file.size)
+                        }}</span>
+                        <span class="file-time">{{
+                          formatDateTime(file.uploadTime)
+                        }}</span>
+                      </div>
+                    </div>
+                  </div>
+                  <div class="file-actions">
+                    <el-button
+                      type="text"
+                      size="mini"
+                      @click="handlePreview(file)"
+                      >棰勮</el-button
+                    >
+                    <el-button
+                      type="text"
+                      size="mini"
+                      @click="handleDownload(file)"
+                      >涓嬭浇</el-button
+                    >
+                  </div>
+                </el-card>
+              </div>
+            </div>
+            <div v-else class="no-attachment">
+              <el-empty
+                description="鏆傛棤浼氳璇︽儏闄勪欢"
+                :image-size="50"
+              ></el-empty>
+            </div>
+          </div>
+        </el-descriptions-item>
+
+        <!-- 浼氳姒傝闄勪欢 -->
+        <el-descriptions-item label="浼氳姒傝闄勪欢" :span="2">
+          <div class="summary-attachments">
+            <div
+              v-if="
+                currentRecord.summaryAttachments &&
+                  currentRecord.summaryAttachments.length > 0
+              "
+              class="attachment-list"
+            >
+              <div
+                v-for="file in currentRecord.summaryAttachments"
+                :key="file.id"
+                class="attachment-item"
+              >
+                <el-link
+                  type="primary"
+                  :href="file.url"
+                  target="_blank"
+                  class="file-link"
+                >
+                  <i
+                    :class="getFileIcon(file.type)"
+                    style="margin-right: 8px;"
+                  ></i>
+                  {{ file.name }}
+                  <span class="file-size"
+                    >({{ formatFileSize(file.size) }})</span
+                  >
+                </el-link>
+              </div>
+            </div>
+            <div v-else class="no-attachment">
+              <el-empty
+                description="鏆傛棤浼氳姒傝闄勪欢"
+                :image-size="50"
+              ></el-empty>
+            </div>
           </div>
         </el-descriptions-item>
       </el-descriptions>
@@ -404,7 +520,109 @@
         <el-form-item label="浼氳鍦扮偣" prop="location">
           <el-input v-model="editForm.location" placeholder="璇疯緭鍏ヤ細璁湴鐐�" />
         </el-form-item>
+        <el-form-item label="浼氳璇︽儏闄勪欢">
+          <div class="attachment-upload-section">
+            <div class="section-title">浼氳鐩稿叧璧勬枡</div>
+            <div class="upload-tip">涓婁紶浼氳璁ㄨ鏉愭枡銆佽儗鏅祫鏂欑瓑鐩稿叧鏂囦欢</div>
+            <el-upload
+              class="detail-upload"
+              action="#"
+              :auto-upload="false"
+              :on-change="handleDetailFileChange"
+              :file-list="editForm.detailAttachments"
+              :limit="10"
+              multiple
+            >
+              <el-button size="small" type="primary" icon="el-icon-upload">
+                涓婁紶璇︽儏闄勪欢
+              </el-button>
+              <div slot="tip" class="el-upload__tip">
+                鏀寔鏂囨。銆佸浘鐗囩瓑鏍煎紡锛屽崟涓枃浠朵笉瓒呰繃20MB
+              </div>
+            </el-upload>
+            <div
+              v-if="
+                editForm.detailAttachments &&
+                  editForm.detailAttachments.length > 0
+              "
+              class="uploaded-files"
+            >
+              <div
+                v-for="(file, index) in editForm.detailAttachments"
+                :key="file.uid || index"
+                class="file-item"
+              >
+                <span class="file-name">{{ file.name }}</span>
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="handleRemoveDetailFile(index)"
+                  style="color: #F56C6C;"
+                >
+                  鍒犻櫎
+                </el-button>
+              </div>
+            </div>
+          </div>
+        </el-form-item>
 
+        <el-form-item label="浼氳姒傝" prop="summary">
+          <el-input
+            v-model="editForm.summary"
+            type="textarea"
+            :rows="2"
+            placeholder="璇疯緭鍏ヤ細璁瑕�"
+            maxlength="200"
+            show-word-limit
+          />
+        </el-form-item>
+
+        <!-- 浼氳姒傝闄勪欢涓婁紶 -->
+        <el-form-item label="浼氳姒傝闄勪欢">
+          <div class="attachment-upload-section">
+            <div class="section-title">浼氳绾鏉愭枡</div>
+            <div class="upload-tip">涓婁紶浼氳绾銆佸喅璁枃浠剁瓑鐩稿叧鏉愭枡</div>
+            <el-upload
+              class="summary-upload"
+              action="#"
+              :auto-upload="false"
+              :on-change="handleSummaryFileChange"
+              :file-list="editForm.summaryAttachments"
+              :limit="5"
+              multiple
+            >
+              <el-button size="small" type="primary" icon="el-icon-upload">
+                涓婁紶姒傝闄勪欢
+              </el-button>
+              <div slot="tip" class="el-upload__tip">
+                鏀寔PDF銆乄ord绛夋枃妗f牸寮忥紝鍗曚釜鏂囦欢涓嶈秴杩�10MB
+              </div>
+            </el-upload>
+            <div
+              v-if="
+                editForm.summaryAttachments &&
+                  editForm.summaryAttachments.length > 0
+              "
+              class="uploaded-files"
+            >
+              <div
+                v-for="(file, index) in editForm.summaryAttachments"
+                :key="file.uid || index"
+                class="file-item"
+              >
+                <span class="file-name">{{ file.name }}</span>
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="handleRemoveSummaryFile(index)"
+                  style="color: #F56C6C;"
+                >
+                  鍒犻櫎
+                </el-button>
+              </div>
+            </div>
+          </div>
+        </el-form-item>
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="寮�濮嬫椂闂�" prop="startTime">
@@ -450,20 +668,27 @@
           />
         </el-form-item>
 
-        <el-form-item label="闄勪欢涓婁紶">
-          <el-upload
-            action="#"
-            :auto-upload="false"
-            :on-change="handleFileChange"
-            :file-list="editForm.attachments"
-            :limit="5"
-            multiple
-          >
-            <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
-            <div slot="tip" class="el-upload__tip">
-              鏀寔涓婁紶鏂囨。銆佸浘鐗囩瓑鏂囦欢锛屽崟涓枃浠朵笉瓒呰繃10MB
-            </div>
-          </el-upload>
+        <!-- 浼氳绾闄勪欢涓婁紶 -->
+        <el-form-item label="浼氳绾闄勪欢">
+          <div class="attachment-upload-section">
+            <div class="upload-tip">涓婁紶涓庝細璁邯瑕佺浉鍏崇殑琛ュ厖鏉愭枡</div>
+            <el-upload
+              class="minutes-upload"
+              action="#"
+              :auto-upload="false"
+              :on-change="handleMinutesFileChange"
+              :file-list="editForm.minutesAttachments"
+              :limit="5"
+              multiple
+            >
+              <el-button size="small" type="primary" icon="el-icon-upload">
+                涓婁紶绾闄勪欢
+              </el-button>
+              <div slot="tip" class="el-upload__tip">
+                鏀寔鍥剧墖銆佹枃妗g瓑鏍煎紡锛屽崟涓枃浠朵笉瓒呰繃10MB
+              </div>
+            </el-upload>
+          </div>
         </el-form-item>
         <el-form-item label="浼氳绾" prop="meetingMinutes">
           <el-input
@@ -543,7 +768,10 @@
         endTime: "",
         summary: "",
         content: "",
-        attachments: []
+        attachments: [],
+        detailAttachments: [], // 浼氳璇︽儏闄勪欢
+        summaryAttachments: [], // 浼氳姒傝闄勪欢
+        minutesAttachments: [] // 浼氳绾闄勪欢
       },
       // 琛ㄥ崟楠岃瘉瑙勫垯
       editRules: {
@@ -599,6 +827,24 @@
       } finally {
         this.loading = false;
       }
+    },
+    getFileIcon(fileType) {
+      const iconMap = {
+        pdf: "el-icon-document",
+        doc: "el-icon-document",
+        docx: "el-icon-document",
+        xls: "el-icon-document",
+        xlsx: "el-icon-document",
+        ppt: "el-icon-document",
+        pptx: "el-icon-document",
+        jpg: "el-icon-picture",
+        jpeg: "el-icon-picture",
+        png: "el-icon-picture",
+        gif: "el-icon-picture",
+        zip: "el-icon-folder",
+        rar: "el-icon-folder"
+      };
+      return iconMap[fileType] || "el-icon-document";
     },
     // 鏌ョ湅浼氳绾
     handleViewMinutes(record) {
@@ -691,7 +937,9 @@
         const meetingMinutes = hasMinutes
           ? minutesExamples[Math.floor(Math.random() * minutesExamples.length)]
           : "";
-
+        const hasDetailAttachments = Math.random() > 0.5;
+        const hasSummaryAttachments = Math.random() > 0.6;
+        const hasMinutesAttachments = Math.random() > 0.7;
         return {
           id: index + 1,
           title: `鍏充簬${
@@ -699,6 +947,47 @@
               Math.floor(Math.random() * 4)
             ]
           }鐨勪細璁甡,
+           // 娣诲姞鍒嗙被鍨嬮檮浠�
+          detailAttachments: hasDetailAttachments ? [
+            {
+              id: `detail-${index}-1`,
+              name: `浼氳鏉愭枡-${index}.pdf`,
+              type: 'pdf',
+              size: 2048000,
+              url: '/api/files/meeting-material.pdf',
+              uploadTime: new Date(startTime.getTime() - 3600000).toISOString()
+            },
+            {
+              id: `detail-${index}-2`,
+              name: `鑳屾櫙璧勬枡-${index}.docx`,
+              type: 'docx',
+              size: 1024000,
+              url: '/api/files/background.docx',
+              uploadTime: new Date(startTime.getTime() - 7200000).toISOString()
+            }
+          ] : [],
+
+          summaryAttachments: hasSummaryAttachments ? [
+            {
+              id: `summary-${index}-1`,
+              name: `浼氳绾-${index}.pdf`,
+              type: 'pdf',
+              size: 512000,
+              url: '/api/files/meeting-summary.pdf',
+              uploadTime: new Date(startTime.getTime() + 3600000).toISOString()
+            }
+          ] : [],
+
+          minutesAttachments: hasMinutesAttachments ? [
+            {
+              id: `minutes-${index}-1`,
+              name: `琛ュ厖鏉愭枡-${index}.jpg`,
+              type: 'jpg',
+              size: 1024000,
+              url: '/api/files/supplement.jpg',
+              uploadTime: new Date(startTime.getTime() + 7200000).toISOString()
+            }
+          ] : [],
           meetingType:
             meetingTypes[Math.floor(Math.random() * meetingTypes.length)],
           participants: uniqueParticipants,
@@ -868,7 +1157,51 @@
         })
         .catch(() => {});
     },
+    // 鏂板鏂规硶锛氭牸寮忓寲鏂囦欢澶у皬
+    formatFileSize(bytes) {
+      if (!bytes) return "0 B";
+      const k = 1024;
+      const sizes = ["B", "KB", "MB", "GB"];
+      const i = Math.floor(Math.log(bytes) / Math.log(k));
+      return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
+    },
 
+    // 鍒嗙被鍨嬫枃浠朵笂浼犲鐞�
+    handleDetailFileChange(file, fileList) {
+      this.editForm.detailAttachments = fileList;
+    },
+
+    handleSummaryFileChange(file, fileList) {
+      this.editForm.summaryAttachments = fileList;
+    },
+
+    handleMinutesFileChange(file, fileList) {
+      this.editForm.minutesAttachments = fileList;
+    },
+
+    // 鍒犻櫎宸蹭笂浼犵殑鏂囦欢
+    handleRemoveDetailFile(index) {
+      this.editForm.detailAttachments.splice(index, 1);
+    },
+
+    handleRemoveSummaryFile(index) {
+      this.editForm.summaryAttachments.splice(index, 1);
+    },
+
+    // 鏂囦欢棰勮鍜屼笅杞�
+    handlePreview(file) {
+      // 瀹炵幇鏂囦欢棰勮閫昏緫
+      this.$message.info(`棰勮鏂囦欢: ${file.name}`);
+    },
+
+    handleDownload(file) {
+      // 瀹炵幇鏂囦欢涓嬭浇閫昏緫
+      const link = document.createElement("a");
+      link.href = file.url;
+      link.download = file.name;
+      link.click();
+      this.$message.success(`寮�濮嬩笅杞�: ${file.name}`);
+    },
     // 淇濆瓨璁板綍
     async handleSave() {
       try {
@@ -947,7 +1280,9 @@
         meetingMinutes: "",
         minutesCreateTime: "",
         minutesCreator: "",
-        attachments: []
+        detailAttachments: [],
+        summaryAttachments: [],
+        minutesAttachments: []
       };
     }
   }
@@ -1019,4 +1354,115 @@
     justify-content: space-between;
   }
 }
+/* 鏂板闄勪欢鐩稿叧鏍峰紡 */
+.attachment-upload-section {
+  border: 1px solid #ebeef5;
+  border-radius: 4px;
+  padding: 15px;
+  background-color: #fafafa;
+}
+
+.section-title {
+  font-weight: bold;
+  margin-bottom: 8px;
+  color: #303133;
+}
+
+.upload-tip {
+  font-size: 12px;
+  color: #909399;
+  margin-bottom: 10px;
+}
+
+.uploaded-files {
+  margin-top: 10px;
+}
+
+.file-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 8px;
+  border-bottom: 1px solid #f0f0f0;
+}
+
+.file-item:last-child {
+  border-bottom: none;
+}
+
+.file-name {
+  flex: 1;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.attachment-grid {
+  display: grid;
+  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
+  gap: 10px;
+}
+
+.file-card {
+  transition: all 0.3s ease;
+}
+
+.file-card:hover {
+  transform: translateY(-2px);
+  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+}
+
+.file-content {
+  display: flex;
+  align-items: center;
+}
+
+.file-icon {
+  font-size: 24px;
+  color: #409EFF;
+  margin-right: 10px;
+}
+
+.file-info {
+  flex: 1;
+}
+
+.file-name {
+  font-size: 14px;
+  font-weight: 500;
+  margin-bottom: 4px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.file-meta {
+  display: flex;
+  justify-content: space-between;
+  font-size: 12px;
+  color: #909399;
+}
+
+.file-actions {
+  margin-top: 8px;
+  text-align: center;
+}
+
+.file-link {
+  display: flex;
+  align-items: center;
+}
+
+.no-attachment {
+  text-align: center;
+  padding: 20px;
+  color: #909399;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+  .attachment-grid {
+    grid-template-columns: 1fr;
+  }
+}
 </style>

--
Gitblit v1.9.3