From 9b2c74ee4f08fad01c2a16bc6e36df073bfa1dd5 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期五, 24 四月 2026 09:12:13 +0800
Subject: [PATCH] 推送

---
 src/views/business/decide/DecideInfo.vue |  403 ++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 228 insertions(+), 175 deletions(-)

diff --git a/src/views/business/decide/DecideInfo.vue b/src/views/business/decide/DecideInfo.vue
index 74ca8c9..239e5f9 100644
--- a/src/views/business/decide/DecideInfo.vue
+++ b/src/views/business/decide/DecideInfo.vue
@@ -1,13 +1,14 @@
 <template>
   <div class="death-judgment-detail">
+    <case-basic-info :case-id="caseId" :show-attachment="true" />
     <el-card class="detail-card">
       <!-- 鍩虹淇℃伅 -->
       <div slot="header" class="clearfix">
         <span class="detail-title">姝讳骸鍒ゅ畾鍩烘湰淇℃伅</span>
         <el-button
           v-if="isEdit"
-          type="primary"
-          style="float: right; padding: 3px 0"
+          type="success"
+          style="float: right"
           @click="handleSave"
           :loading="saveLoading"
         >
@@ -16,7 +17,7 @@
         <el-button
           v-else
           type="primary"
-          style="float: right; padding: 3px 0"
+          style="float: right"
           @click="handleEdit"
         >
           缂栬緫淇℃伅
@@ -26,47 +27,9 @@
       <el-form :model="form" ref="form" :rules="rules" label-width="120px">
         <el-row :gutter="20">
           <el-col :span="8">
-            <el-form-item label="鎹愮尞鑰呯紪鍙�" prop="donorno">
-              <el-input
-                v-model="form.donorno"
-                :readonly="!isEdit"
-                placeholder="鑷姩鐢熸垚鎹愮尞鑰呯紪鍙�"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
-              <el-input v-model="form.name" :readonly="!isEdit" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="鎬у埆" prop="sex">
-              <el-select
-                v-model="form.sex"
-                :disabled="!isEdit"
-                style="width: 100%"
-              >
-                <el-option label="鐢�" value="1" />
-                <el-option label="濂�" value="2" />
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-        <el-row :gutter="20">
-          <el-col :span="8">
-            <el-form-item label="骞撮緞" prop="age">
-              <el-input v-model="form.age" :readonly="!isEdit" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
-              <el-input v-model="form.diagnosisname" :readonly="!isEdit" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
             <el-form-item label="姝讳骸鍘熷洜" prop="deathreason">
-              <el-select
+              <el-input v-model="form.deathreason" :readonly="!isEdit" />
+              <!-- <el-select
                 v-model="form.deathreason"
                 :disabled="!isEdit"
                 style="width: 100%"
@@ -74,9 +37,24 @@
                 <el-option label="鑴戞浜�" value="brain_death" />
                 <el-option label="蹇冩浜�" value="heart_death" />
                 <el-option label="鍏朵粬" value="other" />
-              </el-select>
+              </el-select> -->
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="璐熻矗浜�" prop="responsibleusername">
+              <el-input
+                v-model="form.responsibleusername"
+                :readonly="!isEdit"
+              />
+            </el-form-item>
+          </el-col>
+          <!-- <el-col :span="8">
+            <el-form-item label="璁板綍鐘舵��" prop="recordstate">
+              <el-tag :type="getStatusTag(form.recordstate)">
+                {{ getStatusText(form.recordstate) }}
+              </el-tag>
+            </el-form-item>
+          </el-col> -->
         </el-row>
 
         <el-row :gutter="20">
@@ -122,7 +100,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="鏄惁鎭㈠閬椾綋浠" prop="isrestoreremains">
+            <el-form-item label="鎭㈠閬椾綋浠" prop="isrestoreremains">
               <el-select
                 v-model="form.isrestoreremains"
                 :disabled="!isEdit"
@@ -135,26 +113,11 @@
           </el-col>
         </el-row>
 
-        <el-row :gutter="20">
-          <el-col :span="8">
-            <el-form-item label="璐熻矗浜�" prop="responsibleusername">
-              <el-input v-model="form.responsibleusername" :readonly="!isEdit" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="璁板綍鐘舵��" prop="recordstate">
-              <el-tag :type="getStatusTag(form.recordstate)">
-                {{ getStatusText(form.recordstate) }}
-              </el-tag>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-        <el-form-item label="姝讳骸鍒ゅ畾璇存槑" prop="judgmentDescription">
+        <el-form-item label="姝讳骸鍒ゅ畾璇存槑" prop="remark">
           <el-input
             type="textarea"
             :rows="3"
-            v-model="form.judgmentDescription"
+            v-model="form.remark"
             :readonly="!isEdit"
             placeholder="璇︾粏璁板綍姝讳骸鍒ゅ畾杩囩▼鍜屼緷鎹�"
           />
@@ -166,7 +129,7 @@
     <el-card class="attachment-card">
       <div slot="header" class="clearfix">
         <span class="detail-title">姝讳骸鍒ゅ畾璇勪及琛ㄩ檮浠�</span>
-        <el-button
+        <!-- <el-button
           v-if="isEdit"
           type="primary"
           size="mini"
@@ -174,7 +137,7 @@
           :loading="uploadLoading"
         >
           涓婁紶闄勪欢
-        </el-button>
+        </el-button> -->
       </div>
 
       <!-- 闄勪欢绫诲瀷閫夐」鍗� -->
@@ -221,7 +184,9 @@
 
               <el-table-column label="鏂囦欢绫诲瀷" width="100" align="center">
                 <template slot-scope="scope">
-                  <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag>
+                  <el-tag size="small">{{
+                    getFileType(scope.row.fileName)
+                  }}</el-tag>
                 </template>
               </el-table-column>
 
@@ -243,11 +208,7 @@
                 </template>
               </el-table-column>
 
-              <el-table-column
-                label="鎿嶄綔"
-                width="180"
-                align="center"
-              >
+              <el-table-column label="鎿嶄綔" width="180" align="center">
                 <template slot-scope="scope">
                   <el-button
                     size="mini"
@@ -280,7 +241,10 @@
               v-if="getAttachmentsByType(type.value).length === 0"
               class="empty-attachment"
             >
-              <el-empty description="鏆傛棤璇勪及琛ㄩ檮浠�" :image-size="80"></el-empty>
+              <el-empty
+                description="鏆傛棤璇勪及琛ㄩ檮浠�"
+                :image-size="80"
+              ></el-empty>
             </div>
           </div>
         </el-tab-pane>
@@ -298,16 +262,20 @@
         ref="uploadRef"
         class="upload-demo"
         drag
-        action="#"
+        :action="uploadAction"
+        :headers="headers"
         multiple
         :file-list="tempFileList"
         :before-upload="beforeUpload"
         :on-change="handleFileChange"
         :on-remove="handleTempRemove"
+        :on-success="handleUploadSuccess"
         :auto-upload="false"
       >
         <i class="el-icon-upload"></i>
-        <div class="el-upload__text">灏嗚瘎浼拌〃鏂囦欢鎷栧埌姝ゅ锛屾垨<em>鐐瑰嚮涓婁紶</em></div>
+        <div class="el-upload__text">
+          灏嗚瘎浼拌〃鏂囦欢鎷栧埌姝ゅ锛屾垨<em>鐐瑰嚮涓婁紶</em>
+        </div>
         <div class="el-upload__tip" slot="tip">
           鏀寔涓婁紶pdf銆乯pg銆乸ng銆乨oc銆乨ocx銆亁ls銆亁lsx鏍煎紡鏂囦欢锛屽崟涓枃浠朵笉瓒呰繃10MB
         </div>
@@ -329,16 +297,27 @@
 </template>
 
 <script>
-import { deathinfoedit, deathinfoInfo } from "@/api/businessApi";
+import {
+  deathinfoedit,
+  deathinfoadd,
+  queryDathInfoBaseInfo
+} from "@/api/businessApi";
+import { getToken } from "@/utils/auth";
+import CaseBasicInfo from "@/components/CaseBasicInfo";
 
 export default {
   name: "DeathJudgmentDetail",
+  components: { CaseBasicInfo },
+
   data() {
     return {
+      caseId: null,
       // 鏄惁缂栬緫妯″紡
       isEdit: false,
       // 淇濆瓨鍔犺浇鐘舵��
       saveLoading: false,
+      infoid: undefined,
+
       // 琛ㄥ崟鏁版嵁
       form: {
         id: undefined,
@@ -356,7 +335,7 @@
         gainhospitalname: "",
         isspendremember: 0,
         isrestoreremains: 0,
-        rememberannex: "",
+        rememberAnnex: "",
         responsibleuserid: "",
         responsibleusername: "",
         recordstate: "0",
@@ -384,7 +363,10 @@
       uploadLoading: false,
       tempFileList: [],
       currentUploadType: "",
-
+      uploadAction: process.env.VUE_APP_BASE_API + "/common/upload",
+      headers: {
+        Authorization: "Bearer " + getToken()
+      },
       // 璇勪及琛ㄧ被鍨嬪畾涔�
       attachmentTypes: [
         { value: "1", label: "鑴戞浜″垽瀹氳〃" },
@@ -409,29 +391,33 @@
     }
   },
   created() {
+    this.infoid = this.$route.query.infoid;
+    this.caseId = this.infoid;
     const id = this.$route.query.id;
-    this.isEdit = this.$route.path.includes('/edit') || this.$route.path.includes('/add');
-    if (id && !this.$route.path.includes('/add')) {
-      this.getDetail(id);
-    } else if (this.$route.path.includes('/add')) {
-      this.generateDonorNo();
-    }
+    this.isEdit = this.$route.query.isEdit;
+    this.getDetail(this.infoid);
+
+    // if (id && !this.$route.path.includes("/add")) {
+    //   this.getDetail(id);
+    // } else if (this.$route.path.includes("/add")) {
+    //   this.generateDonorNo();
+    // }
     this.getAttachmentList();
   },
   methods: {
     // 鐢熸垚鎹愮尞鑰呯紪鍙�
     generateDonorNo() {
       const timestamp = Date.now().toString();
-      this.form.donorno = 'DONOR' + timestamp.slice(-8);
+      this.form.donorno = "DONOR" + timestamp.slice(-8);
     },
     // 鑾峰彇璇︽儏
-    async getDetail(id) {
+    async getDetail(infoid) {
       try {
-        const response = await deathinfoInfo({ id });
+        const response = await queryDathInfoBaseInfo({ infoid });
         let realData = {};
 
         if (response && response.data) {
-          realData = response.data;
+          realData = response.data[0];
         } else if (response) {
           realData = response;
         }
@@ -441,18 +427,21 @@
           ...this.form,
           ...realData,
           // 纭繚鏁板�肩被鍨嬪瓧娈垫纭浆鎹�
-          isspendremember: realData.isspendremember ? parseInt(realData.isspendremember) : 0,
-          isrestoreremains: realData.isrestoreremains ? parseInt(realData.isrestoreremains) : 0
+          isspendremember: realData.isspendremember
+            ? parseInt(realData.isspendremember)
+            : 0,
+          isrestoreremains: realData.isrestoreremains
+            ? parseInt(realData.isrestoreremains)
+            : 0
         };
 
         // 瑙f瀽闄勪欢淇℃伅
-        if (realData.rememberannex) {
-          this.parseAttachmentData(realData.rememberannex);
+        if (realData.rememberAnnex) {
+          this.parseAttachmentData(realData.rememberAnnex);
         }
-
       } catch (error) {
-        console.error('鑾峰彇姝讳骸鍒ゅ畾璇︽儏澶辫触:', error);
-        this.$message.error('鏁版嵁鍔犺浇澶辫触');
+        console.error("鑾峰彇姝讳骸鍒ゅ畾璇︽儏澶辫触:", error);
+        this.$message.error("鏁版嵁鍔犺浇澶辫触");
       }
     },
     // 瑙f瀽闄勪欢鏁版嵁
@@ -465,7 +454,7 @@
           }
         }
       } catch (error) {
-        console.error('瑙f瀽闄勪欢鏁版嵁澶辫触:', error);
+        console.error("瑙f瀽闄勪欢鏁版嵁澶辫触:", error);
       }
     },
     // 鏋勫缓闄勪欢JSON鏁版嵁
@@ -477,7 +466,7 @@
       const statusMap = {
         "0": "warning", // 缁存姢涓�
         "1": "success", // 宸插畬鎴�
-        "99": "danger"  // 宸茬粓姝�
+        "99": "danger" // 宸茬粓姝�
       };
       return statusMap[status] || "info";
     },
@@ -504,16 +493,19 @@
     },
     // 鑾峰彇鏂囦欢绫诲瀷
     getFileType(fileName) {
-      const ext = fileName.split('.').pop().toLowerCase();
+      const ext = fileName
+        .split(".")
+        .pop()
+        .toLowerCase();
       const typeMap = {
-        'pdf': 'PDF',
-        'doc': 'DOC',
-        'docx': 'DOCX',
-        'xls': 'XLS',
-        'xlsx': 'XLSX',
-        'jpg': 'JPG',
-        'jpeg': 'JPEG',
-        'png': 'PNG'
+        pdf: "PDF",
+        doc: "DOC",
+        docx: "DOCX",
+        xls: "XLS",
+        xlsx: "XLSX",
+        jpg: "JPG",
+        jpeg: "JPEG",
+        png: "PNG"
       };
       return typeMap[ext] || ext.toUpperCase();
     },
@@ -531,34 +523,37 @@
     // 涓婁紶鍓嶆牎楠�
     beforeUpload(file) {
       const allowedTypes = [
-        'application/pdf',
-        'image/jpeg',
-        'image/png',
-        'application/msword',
-        'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
-        'application/vnd.ms-excel',
-        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+        "application/pdf",
+        "image/jpeg",
+        "image/png",
+        "application/msword",
+        "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+        "application/vnd.ms-excel",
+        "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
       ];
 
       const maxSize = 10 * 1024 * 1024; // 10MB
 
-      const isTypeOk = allowedTypes.includes(file.type) ||
-                      file.name.endsWith('.pdf') ||
-                      file.name.endsWith('.jpg') ||
-                      file.name.endsWith('.jpeg') ||
-                      file.name.endsWith('.png') ||
-                      file.name.endsWith('.doc') ||
-                      file.name.endsWith('.docx') ||
-                      file.name.endsWith('.xls') ||
-                      file.name.endsWith('.xlsx');
+      const isTypeOk =
+        allowedTypes.includes(file.type) ||
+        file.name.endsWith(".pdf") ||
+        file.name.endsWith(".jpg") ||
+        file.name.endsWith(".jpeg") ||
+        file.name.endsWith(".png") ||
+        file.name.endsWith(".doc") ||
+        file.name.endsWith(".docx") ||
+        file.name.endsWith(".xls") ||
+        file.name.endsWith(".xlsx");
 
       if (!isTypeOk) {
-        this.$message.error('鏂囦欢鏍煎紡涓嶆敮鎸侊紝璇蜂笂浼爌df銆乯pg銆乸ng銆乨oc銆乨ocx銆亁ls鎴杧lsx鏍煎紡鏂囦欢');
+        this.$message.error(
+          "鏂囦欢鏍煎紡涓嶆敮鎸侊紝璇蜂笂浼爌df銆乯pg銆乸ng銆乨oc銆乨ocx銆亁ls鎴杧lsx鏍煎紡鏂囦欢"
+        );
         return false;
       }
 
       if (file.size > maxSize) {
-        this.$message.error('鏂囦欢澶у皬涓嶈兘瓒呰繃10MB');
+        this.$message.error("鏂囦欢澶у皬涓嶈兘瓒呰繃10MB");
         return false;
       }
 
@@ -572,16 +567,11 @@
     handleTempRemove(file, fileList) {
       this.tempFileList = fileList;
     },
-    // 鎻愪氦涓婁紶
-    async submitUpload() {
-      if (this.tempFileList.length === 0) {
-        this.$message.warning('璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢');
-        return;
-      }
-
-      this.uploadLoading = true;
-
-      try {
+    /** 涓婁紶鎴愬姛澶勭悊 */
+    handleUploadSuccess(response, file, fileList) {
+      if (response.code === 200) {
+        file.url = response.data || response.url;
+        this.$message.success("鏂囦欢涓婁紶鎴愬姛");
         for (const file of this.tempFileList) {
           const newAttachment = {
             id: Date.now() + Math.random(),
@@ -590,59 +580,102 @@
             fileName: file.name,
             fileSize: file.size,
             uploadTime: new Date().toISOString(),
-            uploader: '褰撳墠鐢ㄦ埛',
-            fileUrl: URL.createObjectURL(file.raw)
+            uploader: "褰撳墠鐢ㄦ埛",
+            fileUrl: file.url
           };
 
           this.attachmentList.push(newAttachment);
         }
 
         // 鏇存柊闄勪欢JSON鏁版嵁鍒拌〃鍗�
-        this.form.rememberannex = this.buildAttachmentJson();
+        this.form.rememberAnnex = this.buildAttachmentJson();
 
-        this.$message.success('鏂囦欢涓婁紶鎴愬姛');
+        this.$message.success("鏂囦欢涓婁紶鎴愬姛");
         this.uploadDialogVisible = false;
-        this.tempFileList = [];
-      } catch (error) {
-        this.$message.error('鏂囦欢涓婁紶澶辫触');
-        console.error('涓婁紶澶辫触:', error);
-      } finally {
         this.uploadLoading = false;
+        this.tempFileList = [];
+      } else {
+        this.$message.error(response.msg || "鏂囦欢涓婁紶澶辫触");
       }
+    },
+    // 鎻愪氦涓婁紶
+    async submitUpload() {
+      if (this.tempFileList.length === 0) {
+        this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
+        return;
+      }
+      this.$refs.uploadRef.submit();
+      this.uploadLoading = true;
+
+      // try {
+      //   for (const file of this.tempFileList) {
+      //     const newAttachment = {
+      //       id: Date.now() + Math.random(),
+      //       type: this.currentUploadType,
+      //       typeName: this.getCurrentTypeLabel,
+      //       fileName: file.name,
+      //       fileSize: file.size,
+      //       uploadTime: new Date().toISOString(),
+      //       uploader: "褰撳墠鐢ㄦ埛",
+      //       fileUrl: URL.createObjectURL(file.raw)
+      //     };
+
+      //     this.attachmentList.push(newAttachment);
+      //   }
+
+      //   // 鏇存柊闄勪欢JSON鏁版嵁鍒拌〃鍗�
+      //   this.form.rememberAnnex = this.buildAttachmentJson();
+
+      //   this.$message.success("鏂囦欢涓婁紶鎴愬姛");
+      //   this.uploadDialogVisible = false;
+      //   this.tempFileList = [];
+      // } catch (error) {
+      //   this.$message.error("鏂囦欢涓婁紶澶辫触");
+      //   console.error("涓婁紶澶辫触:", error);
+      // } finally {
+      //   this.uploadLoading = false;
+      // }
     },
     // 鍒犻櫎闄勪欢
     handleRemoveAttachment(attachment) {
-      this.$confirm('纭畾瑕佸垹闄よ繖涓瘎浼拌〃闄勪欢鍚楋紵', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(() => {
-        const index = this.attachmentList.findIndex(item => item.id === attachment.id);
-        if (index !== -1) {
-          this.attachmentList.splice(index, 1);
-          // 鏇存柊闄勪欢JSON鏁版嵁鍒拌〃鍗�
-          this.form.rememberannex = this.buildAttachmentJson();
-          this.$message.success('璇勪及琛ㄥ垹闄ゆ垚鍔�');
-        }
-      }).catch(() => {});
+      this.$confirm("纭畾瑕佸垹闄よ繖涓瘎浼拌〃闄勪欢鍚楋紵", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning"
+      })
+        .then(() => {
+          const index = this.attachmentList.findIndex(
+            item => item.id === attachment.id
+          );
+          if (index !== -1) {
+            this.attachmentList.splice(index, 1);
+            // 鏇存柊闄勪欢JSON鏁版嵁鍒拌〃鍗�
+            this.form.rememberAnnex = this.buildAttachmentJson();
+            this.$message.success("璇勪及琛ㄥ垹闄ゆ垚鍔�");
+          }
+        })
+        .catch(() => {});
     },
     // 棰勮闄勪欢
     handlePreview(attachment) {
-      if (attachment.fileName.endsWith('.pdf')) {
-        window.open(attachment.fileUrl, '_blank');
+      if (attachment.fileName.endsWith(".pdf")) {
+        window.open(attachment.fileUrl, "_blank");
       } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) {
-        this.$alert(`<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`,
-          '鍥剧墖棰勮', {
+        this.$alert(
+          `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`,
+          "鍥剧墖棰勮",
+          {
             dangerouslyUseHTMLString: true,
-            customClass: 'image-preview-dialog'
-          });
+            customClass: "image-preview-dialog"
+          }
+        );
       } else {
-        this.$message.info('璇ユ枃浠剁被鍨嬫殏涓嶆敮鎸佸湪绾块瑙堬紝璇蜂笅杞藉悗鏌ョ湅');
+        this.$message.info("璇ユ枃浠剁被鍨嬫殏涓嶆敮鎸佸湪绾块瑙堬紝璇蜂笅杞藉悗鏌ョ湅");
       }
     },
     // 涓嬭浇闄勪欢
     handleDownload(attachment) {
-      const link = document.createElement('a');
+      const link = document.createElement("a");
       link.href = attachment.fileUrl;
       link.download = attachment.fileName;
       link.click();
@@ -662,25 +695,34 @@
             // 鏋勫缓鎻愪氦鏁版嵁
             const submitData = {
               ...this.form,
+              infoid: this.infoid,
               // 纭繚闄勪欢鏁版嵁鏈�鏂�
               rememberannex: this.buildAttachmentJson()
             };
+            let response = null;
 
-            const response = await deathinfoedit(submitData);
+            if (submitData.id) {
+              response = await deathinfoedit(submitData);
+            } else {
+              response = await deathinfoadd(submitData);
+            }
+            // const response = await deathinfoedit(submitData);
 
             if (response.code === 200) {
-              this.$message.success('淇濆瓨鎴愬姛');
+              this.$message.success("淇濆瓨鎴愬姛");
               this.isEdit = false;
-
-              if (this.$route.path.includes('/add')) {
-                this.$router.push('/case/deathJudgment');
+              if (!this.form.id) {
+                this.form.id = response.data;
+              }
+              if (this.$route.path.includes("/add")) {
+                this.$router.push("/case/deathJudgment");
               }
             } else {
-              this.$message.error(response.message || '淇濆瓨澶辫触');
+              this.$message.error(response.message || "淇濆瓨澶辫触");
             }
           } catch (error) {
-            console.error('淇濆瓨澶辫触:', error);
-            this.$message.error('淇濆瓨澶辫触');
+            console.error("淇濆瓨澶辫触:", error);
+            this.$message.error("淇濆瓨澶辫触");
           } finally {
             this.saveLoading = false;
           }
@@ -689,17 +731,28 @@
     },
     // 鏂囦欢澶у皬鏍煎紡鍖�
     formatFileSize(size) {
-      if (size === 0) return '0 B';
+      if (size === 0) return "0 B";
       const k = 1024;
-      const sizes = ['B', 'KB', 'MB', 'GB'];
+      const sizes = ["B", "KB", "MB", "GB"];
       const i = Math.floor(Math.log(size) / Math.log(k));
-      return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
+      return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
     },
     // 鏃堕棿鏍煎紡鍖�
     parseTime(time) {
-      if (!time) return '';
+      if (!time) return "";
       const date = new Date(time);
-      return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
+      return `${date.getFullYear()}-${(date.getMonth() + 1)
+        .toString()
+        .padStart(2, "0")}-${date
+        .getDate()
+        .toString()
+        .padStart(2, "0")} ${date
+        .getHours()
+        .toString()
+        .padStart(2, "0")}:${date
+        .getMinutes()
+        .toString()
+        .padStart(2, "0")}`;
     }
   }
 };

--
Gitblit v1.9.3