From c8e9849cb5f24848df0174c13bfbbff37bb08a5a Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 七月 2026 15:45:30 +0800
Subject: [PATCH] 维护

---
 src/views/business/appear/index.vue | 1855 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 1,510 insertions(+), 345 deletions(-)

diff --git a/src/views/business/appear/index.vue b/src/views/business/appear/index.vue
index 8918fca..58e7a2e 100644
--- a/src/views/business/appear/index.vue
+++ b/src/views/business/appear/index.vue
@@ -2,505 +2,1625 @@
   <div class="app-container">
     <!-- 鎼滅储绛涢�夊尯鍩� -->
     <el-card class="filter-card">
-      <el-form
-        :model="queryParams"
-        ref="queryForm"
-        :inline="true"
-        class="demo-form-inline"
-      >
-        <el-form-item label="鎹愮尞缂栧彿" prop="donorNo">
-          <el-input
-            v-model="queryParams.donorNo"
-            placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
-            clearable
-            style="width: 200px"
-          />
+      <el-form :model="queryParams" ref="queryForm" :inline="true" class="demo-form-inline">
+        <el-form-item label="濮撳悕" prop="name">
+          <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ユ偅鑰呭鍚�" clearable style="width: 200px" />
         </el-form-item>
-        <el-form-item label="鎹愮尞鑰呭鍚�" prop="donorName">
-          <el-input
-            v-model="queryParams.donorName"
-            placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
-            clearable
-            style="width: 200px"
-          />
+        <el-form-item label="涓婃姤鍖婚櫌" prop="caseNo">
+          <el-input v-model="queryParams.caseNo" placeholder="璇疯緭鍏ヤ笂鎶ユ渚嬬紪鍙�" clearable style="width: 200px" />
         </el-form-item>
-        <el-form-item label="妗堜緥鐘舵��" prop="status">
-          <el-select
-            v-model="queryParams.status"
-            placeholder="璇烽�夋嫨鐘舵��"
-            clearable
-            style="width: 200px"
-          >
+        <el-form-item label="涓婃姤鐘舵��" prop="reportStatus">
+          <el-select v-model="queryParams.reportStatus" placeholder="璇烽�夋嫨鐘舵��" clearable style="width: 200px">
             <el-option label="鍏ㄩ儴" value="" />
-            <el-option label="寰呭鎵�" value="0" />
-            <el-option label="宸查�氳繃" value="1" />
-            <el-option label="宸茬粓姝�" value="2" />
+            <el-option label="宸查槄璇�" value="2" />
+            <el-option label="宸插悓鎰�" value="3" />
+            <el-option label="宸查┏鍥�" value="4" />
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" icon="el-icon-search" @click="handleQuery"
-            >鎼滅储</el-button
-          >
+          <el-button type="primary" icon="el-icon-search" @click="handleQuery">鎼滅储</el-button>
           <el-button icon="el-icon-refresh" @click="resetQuery">閲嶇疆</el-button>
         </el-form-item>
       </el-form>
     </el-card>
 
-    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 - 淇敼鍒犻櫎鎸夐挳鐨勭鐢ㄦ潯浠� -->
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-plus" @click="handleAdd"
-          >鏂板妗堜緥</el-button
-        >
-      </el-col>
-
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          :disabled="multiple"
-          @click="handleDelete"
-          >鍒犻櫎</el-button
-        >
+        <el-button type="danger" plain icon="el-icon-delete" :disabled="multiple || hasApprovedSelected()"
+          @click="handleDelete">
+          鍒犻櫎
+        </el-button>
       </el-col>
     </el-row>
 
     <!-- 鏁版嵁琛ㄦ牸 -->
-    <el-table
-      v-loading="loading"
-      :data="caseList"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="caseList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <!-- <el-table-column label="搴忓彿" type="index" width="60" align="center"/>
-      <el-table-column label="鎹愮尞缂栧彿" align="center" prop="donorNo" width="140"/> -->
-      <el-table-column
-        label="涓婃姤鏃堕棿"
-        align="center"
-        prop="reportTime"
-        width="160"
-      />
 
-      <el-table-column
-        label="鎹愮尞鑰呭鍚�"
-        align="center"
-        prop="donorName"
-        width="100"
-      />
-      <el-table-column label="鎬у埆" align="center" prop="gender" width="80">
-        <template slot-scope="scope">
-          <dict-tag :options="genderOptions" :value="scope.row.gender" />
+      <el-table-column label="缂栧彿" align="center" prop="caseNo" width="150" fixed />
+      <el-table-column label="濮撳悕" align="center" prop="name" width="100" fixed />
+      <el-table-column label="涓婃姤鐘舵��" align="center" prop="reportStatus" width="100">
+        <template #default="scope">
+          <el-tag :type="scope.row.reportStatus | statusFilter">
+            {{ scope.row.reportStatus | statusTextFilter }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="杞繍" align="center" width="100">
+        <template #default="scope">
+          <el-tag :type="getTransportStatusTag(scope.row)">
+            {{ getTransportStatusText(scope.row) }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="鎬у埆" align="center" prop="sex" width="80">
+        <template #default="scope">
+          <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
         </template>
       </el-table-column>
       <el-table-column label="骞撮緞" align="center" prop="age" width="80" />
       <el-table-column label="琛�鍨�" align="center" prop="bloodType" width="80">
-        <template slot-scope="scope">
-          <dict-tag :options="bloodTypeOptions" :value="scope.row.bloodType" />
+        <template #default="scope">
+          <dict-tag :options="dict.type.sys_BloodType" :value="scope.row.bloodType" />
         </template>
       </el-table-column>
-      <el-table-column
-        label="鐤剧梾璇婃柇"
-        align="center"
-        prop="diagnosis"
-        min-width="200"
-        show-overflow-tooltip
-      />
-      <el-table-column
-        label="涓婃姤鍖婚櫌"
-        align="center"
-        prop="hospitalName"
-        width="150"
-      />
-      <el-table-column label="鐘舵��" align="center" prop="status" width="100">
-        <template slot-scope="scope">
-          <el-tag :type="scope.row.status | statusFilter">
-            {{ scope.row.status | statusTextFilter }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="鎿嶄綔"
-        align="center"
-        class-name="small-padding fixed-width"
-        width="200"
-      >
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-view"
-            @click="handleDetail(scope.row)"
-            >璇︽儏</el-button
-          >
-
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-check"
-            @click="handleApprove(scope.row)"
-            v-if="scope.row.status === '0'"
-            >瀹℃壒</el-button
-          >
+      <el-table-column label="鐤剧梾璇婃柇" align="center" prop="diagnosisname" min-width="200" show-overflow-tooltip />
+      <el-table-column label="GCS璇勫垎" align="center" prop="gcsScore" width="80" show-overflow-tooltip />
+      <el-table-column label="涓婃姤鍖婚櫌" align="center" prop="treatmenthospitalname" width="150" />
+      <el-table-column label="涓婃姤鏃堕棿" align="center" prop="reporttime" width="160" />
+      <el-table-column label="鎿嶄綔" align="center" fixed="right" width="300">
+        <template #default="scope">
+          <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)">璇︽儏</el-button>
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">缂栬緫</el-button>
+          <el-button size="mini" type="text" icon="el-icon-check" @click="handleApprove(scope.row)"
+            v-if="scope.row.reportStatus == '2' && scope.row.delFlag == 0">纭</el-button>
+          <!-- 绉婚櫎杞繍鎸夐挳 -->
+          <el-button v-if="scope.row.serviceTransport.length" size="mini" type="primary"
+            @click="goToTransportDetail(scope.row.name)">鏌ョ湅杞繍鍗�</el-button>
+          <el-button v-if="
+            scope.row.reportStatus == 3 &&
+            !scope.row.serviceTransport.length &&
+            scope.row.isTransport == 2
+          " size="mini" type="success" @click="Createatransferorder(scope.row)">鍒涘缓杞繍鍗�</el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <!-- 鍒嗛〉 -->
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+      @pagination="getList" />
 
     <!-- 妗堜緥璇︽儏寮规 -->
-    <el-dialog
-      :title="detailTitle"
-      :visible.sync="detailOpen"
-      width="900px"
-      append-to-body
-      :close-on-click-modal="false"
-    >
+    <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="900px" append-to-body
+      :close-on-click-modal="false">
       <case-detail :caseData="currentCase" @close="detailOpen = false" />
     </el-dialog>
 
-    <!-- 瀹℃壒寮规 -->
-    <!-- 瀹℃壒寮规浼樺寲 -->
-    <el-dialog
-      title="妗堜緥瀹℃壒"
-      :visible.sync="approveOpen"
-      width="80vw"
-      append-to-body
-      class="approve-dialog"
-    >
-      <el-container style="height: 800px;">
+    <!-- 纭寮规 -->
+    <el-dialog title="妗堜緥纭" :visible.sync="approveOpen" width="80vw" append-to-body class="approve-dialog">
+      <!-- 浣跨敤 div 甯冨眬鏇夸唬 el-container -->
+      <div class="approve-dialog-content">
         <!-- 宸︿晶锛氭渚嬭鎯� -->
-        <el-aside
-          width="50vw"
-          style="background: #f8f9fa; padding: 20px; overflow-y: auto;"
-        >
+        <div class="approve-detail-left">
           <div class="approve-detail-preview">
             <h3 style="margin-bottom: 15px; color: #303133;">妗堜緥璇︽儏棰勮</h3>
             <case-detail :caseData="currentCase" :showtitle="false" />
           </div>
-        </el-aside>
+        </div>
 
-        <!-- 鍙充晶锛氬鎵硅〃鍗� -->
-        <el-main style="padding: 20px;">
-          <el-form
-            ref="approveForm"
-            :model="approveForm"
-            :rules="approveRules"
-            label-width="100px"
-          >
-            <el-form-item label="瀹℃壒缁撴灉" prop="approveResult">
-              <el-radio-group v-model="approveForm.approveResult">
-                <el-radio label="1">閫氳繃</el-radio>
-                <el-radio label="2">缁堟</el-radio>
+        <!-- 鍙充晶锛氱‘璁よ〃鍗� -->
+        <div class="approve-form-right">
+          <el-form ref="approveForm" :model="approveForm" :rules="approveRules" label-width="100px">
+            <el-form-item label="纭缁撴灉" prop="approveResult">
+              <el-radio-group v-model="approveForm.approveResult" @change="handleApproveResultChange">
+                <el-radio label="3">鍚屾剰</el-radio>
+                <el-radio label="4">椹冲洖</el-radio>
               </el-radio-group>
             </el-form-item>
-            <el-form-item label="瀹℃壒鎰忚" prop="approveOpinion">
-              <el-input
-                type="textarea"
-                v-model="approveForm.approveOpinion"
-                placeholder="璇疯緭鍏ヨ缁嗙殑瀹℃壒鎰忚锛屽寘鎷�氳繃鎴栫粓姝㈢殑鐞嗙敱"
-                :rows="6"
-                maxlength="500"
-                show-word-limit
-              />
+
+            <!-- 褰撻�夋嫨"鍚屾剰"鏃舵樉绀鸿浆杩愰�夐」 -->
+            <el-form-item v-if="approveForm.approveResult == '3'" label="鏄惁闇�瑕佽浆杩�" prop="isTransport">
+              <el-radio-group v-model="approveForm.isTransport">
+                <el-radio label="1">涓嶉渶瑕�</el-radio>
+                <el-radio label="2">闇�瑕�</el-radio>
+              </el-radio-group>
+            </el-form-item>
+
+            <!-- 褰撻�夋嫨"椹冲洖"鏃舵樉绀洪┏鍥炲師鍥� -->
+            <div v-if="approveForm.approveResult == '4'">
+              <el-form-item label="椹冲洖鍘熷洜" prop="rejectType">
+                <el-radio-group v-model="approveForm.rejectType">
+                  <el-radio label="1">濂借浆</el-radio>
+                  <el-radio label="2">姝讳骸</el-radio>
+                  <el-radio label="3">涓嶇鍚堟崘鐚爣鍑�</el-radio>
+                  <el-radio label="4">瀹跺睘鏀惧純鎹愮尞</el-radio>
+                  <el-radio label="5">鍏朵粬</el-radio>
+                </el-radio-group>
+              </el-form-item>
+
+              <el-form-item label="椹冲洖鎰忚" prop="confirmResult">
+                <el-input type="textarea" v-model="approveForm.confirmResult" placeholder="璇疯緭鍏ヨ缁嗙殑椹冲洖鎰忚" :rows="6"
+                  maxlength="500" show-word-limit />
+              </el-form-item>
+            </div>
+
+            <!-- 褰撻�夋嫨"鍚屾剰"鏃舵樉绀虹‘璁ゆ剰瑙� -->
+            <el-form-item v-if="approveForm.approveResult == '3'" label="纭鎰忚" prop="confirmResult">
+              <el-input type="textarea" v-model="approveForm.confirmResult" placeholder="璇疯緭鍏ョ‘璁ゆ剰瑙�" :rows="6"
+                maxlength="500" show-word-limit />
             </el-form-item>
           </el-form>
-        </el-main>
-      </el-container>
+        </div>
+      </div>
 
       <div slot="footer" class="dialog-footer">
         <el-button @click="approveOpen = false">鍙栨秷</el-button>
         <el-button type="primary" @click="submitApprove">纭畾</el-button>
       </div>
     </el-dialog>
+
+    <!-- 鏂板/缂栬緫妗堜緥寮规 -->
+    <el-dialog :title="`${isEditing ? '缂栬緫' : '鏂板'}妗堜緥`" :visible.sync="editOpen" width="68%" append-to-body
+      :close-on-click-modal="false" @close="handleEditClose">
+      <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="120px">
+        <!-- 鍩烘湰淇℃伅 -->
+        <el-card class="form-section" shadow="never">
+          <div slot="header" class="section-header">
+            <i class="el-icon-user" style="color: #409EFF; margin-right: 8px;"></i>
+            <span>鍩烘湰淇℃伅</span>
+          </div>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="妗堜緥缂栧彿" prop="caseNo">
+                <el-input v-model="editForm.caseNo" placeholder="璇疯緭鍏ユ渚嬬紪鍙�" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鎮h�呭鍚�" prop="name">
+                <el-input v-model="editForm.name" placeholder="璇疯緭鍏ユ偅鑰呭鍚�" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鎬у埆" prop="sex">
+                <el-select v-model="editForm.sex" placeholder="璇烽�夋嫨鎬у埆" style="width: 100%">
+                  <el-option label="鐢�" value="1" />
+                  <el-option label="濂�" value="2" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="骞撮緞" prop="age">
+                <el-input-number v-model="editForm.age" :min="0" :max="120" placeholder="璇疯緭鍏ュ勾榫�" style="width: 100%" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="骞撮緞鍗曚綅" prop="ageunit">
+                <el-select v-model="editForm.ageunit" placeholder="璇烽�夋嫨骞撮緞鍗曚綅" style="width: 100%">
+                  <el-option label="宀�" value="year" />
+                  <el-option label="鏈�" value="month" />
+                  <el-option label="澶�" value="day" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="琛�鍨�" prop="bloodType">
+                <el-select v-model="editForm.bloodType" placeholder="璇烽�夋嫨琛�鍨�" style="width: 100%">
+                  <el-option label="A鍨�" :value="'A鍨�'" />
+                  <el-option label="B鍨�" :value="'B鍨�'" />
+                  <el-option label="O鍨�" :value="'O鍨�'" />
+                  <el-option label="AB鍨�" :value="'AB鍨�'" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="Rh闃存��" prop="rhYin">
+                <el-radio-group v-model="editForm.rhYin">
+                  <el-radio label="0">鍚�</el-radio>
+                  <el-radio label="1">鏄�</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday">
+                <el-date-picker v-model="editForm.birthday" type="date" placeholder="閫夋嫨鍑虹敓鏃ユ湡" value-format="yyyy-MM-dd"
+                  style="width: 100%" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="璇佷欢绫诲瀷" prop="idcardtype">
+                <el-select v-model="editForm.idcardtype" placeholder="璇烽�夋嫨璇佷欢绫诲瀷" style="width: 100%">
+                  <el-option v-for="item in dict.type.sys_IDType" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="璇佷欢鍙风爜" prop="idcardno">
+                <el-input v-model="editForm.idcardno" placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="姘戞棌" prop="nation">
+                <el-input v-model="editForm.nation" placeholder="璇疯緭鍏ユ皯鏃�" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鍥界睄" prop="nationality">
+                <el-input v-model="editForm.nationality" placeholder="璇疯緭鍏ュ浗绫�" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="绫嶈疮" prop="nativeplace">
+                <el-input v-model="editForm.nativeplace" placeholder="璇疯緭鍏ョ睄璐�" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="瀛﹀巻" prop="education">
+                <!-- <el-input v-model="editForm.education" placeholder="璇疯緭鍏ュ鍘�" /> -->
+                <el-select v-model="editForm.education" placeholder="璇烽�夋嫨瀛﹀巻绫诲瀷" style="width: 100%">
+                  <el-option v-for="item in dict.type.sys_education" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鑱屼笟" prop="occupation">
+                <!-- <el-input v-model="editForm.occupation" placeholder="璇疯緭鍏ヨ亴涓�" /> -->
+                <el-select v-model="editForm.occupation" placeholder="璇烽�夋嫨鑱屼笟绫诲瀷" style="width: 100%">
+                  <el-option v-for="item in dict.type.sys_occupation" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
+                <el-input v-model="editForm.phone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <!-- 鍦板潃淇℃伅 -->
+        <el-card class="form-section" shadow="never">
+          <div slot="header" class="section-header">
+            <i class="el-icon-location-information" style="color: #67C23A; margin-right: 8px;"></i>
+            <span>鍦板潃淇℃伅</span>
+          </div>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鐜颁綇鍦板潃" prop="residenceaddress">
+                <li-area-select ref="residenceSelect" v-model="residenceAddress"
+                  @change="handleResidenceAddressChange" />
+                <el-input v-model="editForm.residenceaddress" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" style="margin-top: 8px" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鎴风睄鍦板潃" prop="registeraddress">
+                <li-area-select ref="registerSelect" v-model="registerAddress" @change="handleRegisterAddressChange" />
+                <el-input v-model="editForm.registeraddress" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" style="margin-top: 8px" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <!-- 鍖荤枟淇℃伅 -->
+        <el-card class="form-section" shadow="never">
+          <div slot="header" class="section-header">
+            <i class="el-icon-first-aid-kit" style="color: #E6A23C; margin-right: 8px;"></i>
+            <span>鍖荤枟淇℃伅</span>
+          </div>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
+                <el-input v-model="editForm.diagnosisname" placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="GCS璇勫垎" prop="gcsScore">
+                <el-input v-model="editForm.gcsScore" placeholder="璇疯緭鍏CS璇勫垎" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-form-item label="鐥呮儏姒傚喌" prop="illnessoverview">
+            <el-input v-model="editForm.illnessoverview" type="textarea" :rows="3" placeholder="璇疯緭鍏ョ梾鎯呮鍐�" maxlength="500"
+              show-word-limit />
+          </el-form-item>
+
+          <el-form-item label="鐥呬汉鐘跺喌" prop="patientstate">
+            <el-input v-model="editForm.patientstate" type="textarea" :rows="2" placeholder="璇疯緭鍏ョ梾浜虹姸鍐�" maxlength="200"
+              show-word-limit />
+          </el-form-item>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="浼犳煋鐥呮儏鍐�" prop="infectious">
+                <el-checkbox-group v-model="editForm.infectious">
+                  <el-checkbox v-for="item in dict.type.sys_Infectious" :label="item.value" :value="item.value">{{
+                    item.label }}</el-checkbox>
+                </el-checkbox-group>
+                <!-- <el-input
+                  v-model="editForm.infectious"
+                  placeholder="璇疯緭鍏ヤ紶鏌撶梾鎯呭喌"
+                /> -->
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="浼犳煋鐥呭叾浠栬鏄�">
+                <el-input v-model="editForm.infectiousOther" placeholder="璇疯緭鍏ヤ紶鏌撶梾鍏朵粬璇存槑" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-form-item label="鏄惁闇�瑕佽浆杩�" prop="isTransport">
+            <el-radio-group v-model="editForm.isTransport">
+              <el-radio label="1">涓嶉渶瑕�</el-radio>
+              <el-radio label="2">闇�瑕�</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-card>
+
+        <!-- 鍖婚櫌淇℃伅 -->
+        <el-card class="form-section" shadow="never">
+          <div slot="header" class="section-header">
+            <i class="el-icon-office-building" style="color: #909399; margin-right: 8px;"></i>
+            <span>鍖婚櫌淇℃伅</span>
+          </div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="ICU璇勪及鍖荤敓" prop="icuDoctor">
+                <el-input v-model="editForm.icuDoctor" placeholder="璇疯緭鍏CU璇勪及鍖荤敓" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="ICU鍖荤敓鐢佃瘽" prop="icuDoctorPhone">
+                <el-input v-model="editForm.icuDoctorPhone" placeholder="璇疯緭鍏CU鍖荤敓鎵嬫満鍙�" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="娌荤枟鍖婚櫌" prop="treatmenthospitalname">
+                <el-input v-model="editForm.treatmenthospitalname" placeholder="璇疯緭鍏ユ不鐤楀尰闄㈠悕绉�" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="娌荤枟绉戝" prop="treatmentdeptname">
+                <el-input v-model="editForm.treatmentdeptname" placeholder="璇疯緭鍏ユ不鐤楃瀹ゅ悕绉�" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="浣忛櫌鍙�" prop="inpatientno">
+                <el-input v-model="editForm.inpatientno" placeholder="璇疯緭鍏ヤ綇闄㈠彿" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="閮ㄩ棬鍚嶇О" prop="deptName">
+                <el-input v-model="editForm.deptName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="閮ㄩ棬缂栧彿" prop="deptNo">
+                <el-input v-model="editForm.deptNo" placeholder="璇疯緭鍏ラ儴闂ㄧ紪鍙�" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="涓婃姤鍖婚櫌" prop="toHospital">
+                <el-input v-model="editForm.toHospital" placeholder="璇疯緭鍏ヤ笂鎶ョ殑鍖婚櫌" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <!-- 涓婃姤淇℃伅 -->
+        <el-card class="form-section" shadow="never">
+          <div slot="header" class="section-header">
+            <i class="el-icon-s-data" style="color: #F56C6C; margin-right: 8px;"></i>
+            <span>涓婃姤淇℃伅</span>
+          </div>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鎶ュ憡鑰呭鍚�" prop="infoName">
+                <el-input v-model="editForm.infoName" placeholder="璇疯緭鍏ユ姤鍛婅�呭鍚�" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鎶ュ憡鑰呯數璇�" prop="reporterphone">
+                <el-input v-model="editForm.phone" placeholder="璇疯緭鍏ユ姤鍛婅�呰仈绯荤數璇�" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鍗忚皟鍛樺鍚�" prop="coordinatorName">
+                <el-input v-model="editForm.coordinatorName" placeholder="璇疯緭鍏ュ崗璋冨憳濮撳悕" />
+              </el-form-item>
+            </el-col>
+            <!-- <el-col :span="12">
+              <el-form-item label="鍗忚皟鍛樼紪鍙�" prop="coordinatorNo">
+                <el-input
+                  v-model="editForm.coordinatorNo"
+                  placeholder="璇疯緭鍏ュ崗璋冨憳缂栧彿"
+                />
+              </el-form-item>
+            </el-col> -->
+          </el-row>
+
+          <el-form-item label="涓婃姤鐘舵��" prop="reportStatus">
+            <el-select v-model="editForm.reportStatus" placeholder="璇烽�夋嫨涓婃姤鐘舵��" style="width: 100%" :disabled="isEditing">
+              <el-option label="宸蹭笂鎶�" value="1" />
+              <el-option label="宸查槄璇�" value="2" />
+              <el-option label="宸插悓鎰�" value="3" />
+              <el-option label="宸查┏鍥�" value="4" />
+            </el-select>
+          </el-form-item>
+        </el-card>
+
+        <!-- 闄勪欢淇℃伅 -->
+<el-card class="form-section" shadow="never">
+  <div slot="header" class="section-header">
+    <i class="el-icon-folder" style="color: #409EFF; margin-right: 8px;"></i>
+    <span>闄勪欢淇℃伅</span>
+  </div>
+
+  <!-- 涓婁紶缁勪欢锛堢洿鎺ユ斁缃紝鏃犲垎绫婚�夋嫨锛� -->
+  <div class="upload-wrapper">
+    <UploadAttachment
+      ref="uploadAttachment"
+      :file-list="attachmentFileList"
+      :limit="attachmentLimit"
+      :accept="attachmentAccept"
+      @change="handleAttachmentChange"
+      @upload-success="handleUploadSuccess"
+      @upload-error="handleUploadError"
+      @remove="handleAttachmentRemove"
+    />
+    <div style="font-size:12px; color:#909399; margin-top:4px;">
+      褰撳墠涓婁紶鍒嗙被锛�<el-tag size="small" type="info">{{ activeTab === '鏈垎绫�' ? '鏈垎绫�' : activeTab }}</el-tag>
+      锛堝垏鎹� Tab 鍙敼鍙樹笂浼犲垎绫伙級
+    </div>
+  </div>
+
+  <!-- 闄勪欢鍒楄〃 - 鍒嗙被Tab灞曠ず锛屾敮鎸佷慨鏀瑰垎绫� -->
+  <div class="attachment-list" v-if="editForm.annexfilesList && editForm.annexfilesList.length > 0">
+    <el-tabs v-model="activeTab" type="border-card">
+      <el-tab-pane
+        v-for="category in categories"
+        :key="category"
+        :label="category + '(' + getCategoryCount(category) + ')'"
+        :name="category"
+      >
+        <el-table :data="getCategoryFiles(category)" style="width: 100%" size="small" border>
+          <el-table-column label="鏂囦欢鍚�" min-width="180">
+            <template #default="scope">
+              <i class="el-icon-document" style="margin-right: 8px; color: #409EFF;"></i>
+              <span class="file-name">{{ scope.row.fileName }}</span>
+            </template>
+          </el-table-column>
+          <!-- 鍙紪杈戝垎绫讳笅鎷� -->
+          <el-table-column label="鍒嗙被" width="150">
+            <template #default="scope">
+              <el-select
+                v-model="scope.row.fileType"
+                size="small"
+                @change="updateAttachmentCategory(scope.row, $event)"
+                placeholder="閫夋嫨鍒嗙被"
+              >
+                <el-option label="鐧昏琛ㄩ檮浠�" value="鐧昏琛ㄩ檮浠�" />
+                <el-option label="璇佷欢鐓�" value="璇佷欢鐓�" />
+                <el-option label="鐤剧梾璇婃柇娌荤枟" value="鐤剧梾璇婃柇娌荤枟" />
+                <el-option label="鏈垎绫�" value="" />
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="鏂囦欢绫诲瀷" width="100">
+            <template #default="scope">
+              <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="鍒涘缓鏃堕棿" width="160">
+            <template #default="scope">
+              <span>{{ formatDateTime(scope.row.createTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="澶囨敞" min-width="130" show-overflow-tooltip>
+            <template #default="scope">
+              <span>{{ scope.row.remart || "鏃�" }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="鎿嶄綔" width="180" fixed="right">
+            <template #default="scope">
+              <el-button size="mini" type="primary" @click="handlePreview(scope.row)">棰勮</el-button>
+              <el-button size="mini" type="danger" @click="handleRemoveAttachmentByFile(scope.row)">鍒犻櫎</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</el-card>
+
+        <!-- 澶囨敞淇℃伅 -->
+        <el-card class="form-section" shadow="never">
+          <div slot="header" class="section-header">
+            <i class="el-icon-edit" style="color: #67C23A; margin-right: 8px;"></i>
+            <span>澶囨敞淇℃伅</span>
+          </div>
+          <el-form-item prop="remark">
+            <el-input v-model="editForm.remark" type="textarea" :rows="4" placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" maxlength="500"
+              show-word-limit />
+          </el-form-item>
+        </el-card>
+      </el-form>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="handleEditClose">鍙栨秷</el-button>
+        <el-button type="primary" :loading="saveLoading" @click="handleSave">淇濆瓨</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 鏂囦欢棰勮寮圭獥 -->
+    <FilePreviewDialog :visible="previewVisible" :file="currentPreviewFile" @close="previewVisible = false"
+      @download="handleDownload" />
   </div>
 </template>
 
 <script>
 import CaseDetail from "./caseDetail";
-import CaseDetailPreview from "./CaseDetailPreview";
+import UploadAttachment from "@/components/UploadAttachment";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import {
+  donateList,
+  donateInfo,
+  donateDel,
+  donateEdit,
+  donateAdd
+} from "@/api/businessApi/index";
+import LiAreaSelect from "@/components/Address";
+
+import dayjs from "dayjs";
+
 export default {
   name: "CaseList",
-  components: { CaseDetail, CaseDetailPreview },
+  components: {
+    CaseDetail,
+    LiAreaSelect,
+    UploadAttachment,
+    FilePreviewDialog
+  },
+  dicts: [
+    "sys_user_sex",
+    "sys_BloodType",
+    "sys_Infectious",
+    "sys_IDType",
+    "sys_education",
+    "sys_occupation"
+  ],
 
   data() {
+    const validateConfirmResult = (rule, value, callback) => {
+      if (this.approveForm.approveResult === "4" && !value) {
+        callback(new Error("椹冲洖鏃跺繀椤诲~鍐欓┏鍥炴剰瑙�"));
+      } else {
+        callback();
+      }
+    };
     return {
       // 閬僵灞�
       loading: false,
+      saveLoading: false,
       // 閫変腑鏁扮粍
       ids: [],
+      residenceAddress: {},
+      registerAddress: {},
       // 闈炲崟涓鐢�
       single: true,
       // 闈炲涓鐢�
       multiple: true,
+      currentCategory: "鐧昏琛ㄩ檮浠�", // 褰撳墠涓婁紶鍒嗙被
+      activeTab: "鐧昏琛ㄩ檮浠�", // 褰撳墠婵�娲荤殑Tab
+      presetCategories: ["鐧昏琛ㄩ檮浠�", "璇佷欢鐓�", "鐤剧梾璇婃柇娌荤枟"], // 棰勮鍒嗙被鍒楄〃
       // 鎬绘潯鏁�
       total: 0,
       // 妗堜緥琛ㄦ牸鏁版嵁
       caseList: [],
       // 璇︽儏寮规鏄惁鏄剧ず
       detailOpen: false,
-      // 瀹℃壒寮规鏄惁鏄剧ず
+      // 纭寮规鏄惁鏄剧ず
       approveOpen: false,
+      // 缂栬緫寮规鏄惁鏄剧ず
+      editOpen: false,
+      // 缂栬緫鐘舵��
+      isEditing: false,
       // 璇︽儏寮规鏍囬
       detailTitle: "",
       // 褰撳墠鎿嶄綔鐨勬渚�
       currentCase: {},
-      // 鎬у埆閫夐」
-      genderOptions: [
-        { value: "0", label: "鐢�" },
-        { value: "1", label: "濂�" }
-      ],
-      // 琛�鍨嬮�夐」
-      bloodTypeOptions: [
-        { value: "A", label: "A鍨�" },
-        { value: "B", label: "B鍨�" },
-        { value: "O", label: "O鍨�" },
-        { value: "AB", label: "AB鍨�" }
-      ],
       // 鏌ヨ鍙傛暟
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        donorNo: undefined,
-        donorName: undefined,
-        status: undefined
+        caseNo: undefined,
+        name: undefined,
+        reportStatus: undefined
       },
-      // 瀹℃壒琛ㄥ崟
+      // 纭琛ㄥ崟
       approveForm: {
-        caseId: null,
-        approveResult: "1",
-        approveOpinion: ""
+        id: null,
+        approveResult: "3",
+        confirmResult: "",
+        rejectType: "", // 椹冲洖鍘熷洜
+        isTransport: "", // 鏄惁闇�瑕佽浆杩�
+        createTransport: false, // 鏄惁闇�瑕佸垱寤鸿浆杩愬崟
+        isDonate: "0" // 鏄惁鎹愮尞锛�0-鏈崘鐚紝1-宸叉崘鐚�
       },
-      // 瀹℃壒琛ㄥ崟楠岃瘉
+      // 纭琛ㄥ崟楠岃瘉
       approveRules: {
         approveResult: [
-          { required: true, message: "璇烽�夋嫨瀹℃壒缁撴灉", trigger: "change" }
+          { required: true, message: "璇烽�夋嫨纭缁撴灉", trigger: "change" }
         ],
-        approveOpinion: [
-          { required: true, message: "璇疯緭鍏ュ鎵规剰瑙�", trigger: "blur" }
+        confirmResult: [{ validator: validateConfirmResult, trigger: "blur" }],
+        rejectType: {
+          required: false,
+          validator: (rule, value, callback) => {
+            if (this.approveForm.approveResult == "4" && !value) {
+              callback(new Error("璇烽�夋嫨椹冲洖鍘熷洜"));
+            } else {
+              callback();
+            }
+          },
+          trigger: "change"
+        },
+        isTransport: [
+          { required: true, message: "璇烽�夋嫨鏄惁闇�瑕佽浆杩�", trigger: "change" }
         ]
-      }
+      },
+      // 缂栬緫琛ㄥ崟
+      editForm: this.getDefaultFormData(),
+      // 琛ㄥ崟楠岃瘉瑙勫垯
+      editRules: {
+        caseNo: [
+          { required: true, message: "璇疯緭鍏ユ渚嬬紪鍙�", trigger: "blur" }
+        ],
+        name: [{ required: true, message: "璇疯緭鍏ユ偅鑰呭鍚�", trigger: "blur" }],
+        sex: [{ required: true, message: "璇烽�夋嫨鎬у埆", trigger: "change" }],
+        age: [{ required: true, message: "璇疯緭鍏ュ勾榫�", trigger: "blur" }],
+        diagnosisname: [
+          { required: true, message: "璇疯緭鍏ョ柧鐥呰瘖鏂�", trigger: "blur" }
+        ],
+        treatmenthospitalname: [
+          { required: true, message: "璇疯緭鍏ユ不鐤楀尰闄�", trigger: "blur" }
+        ],
+        reportStatus: [
+          { required: true, message: "璇烽�夋嫨涓婃姤鐘舵��", trigger: "change" }
+        ]
+      },
+      // 闄勪欢鐩稿叧閰嶇疆
+      attachmentLimit: 10,
+      attachmentAccept: ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx",
+      attachmentFileList: [],
+      // 棰勮鐩稿叧
+      previewVisible: false,
+      currentPreviewFile: null
     };
   },
   filters: {
-    statusFilter(status) {
+    statusFilter(reportStatus) {
       const statusMap = {
-        "0": "warning", // 寰呭鎵�
-        "1": "success", // 宸查�氳繃
-        "2": "danger" // 宸茬粓姝�
+        "1": "info", // 宸蹭笂鎶�
+        "2": "warning", // 宸查槄璇伙紙寰呯‘璁わ級
+        "3": "success", // 宸插悓鎰�
+        "4": "danger" // 宸查┏鍥�
       };
-      return statusMap[status];
+      return statusMap[reportStatus] || "info";
     },
-    statusTextFilter(status) {
+    statusTextFilter(reportStatus) {
       const statusMap = {
-        "0": "寰呭鎵�",
-        "1": "宸查�氳繃",
-        "2": "宸茬粓姝�"
+        "1": "宸蹭笂鎶�",
+        "2": "宸查槄璇�",
+        "3": "宸插悓鎰�",
+        "4": "宸查┏鍥�"
       };
-      return statusMap[status];
+      return statusMap[reportStatus] || "鏈煡鐘舵��";
     }
   },
   created() {
     this.getList();
   },
+  computed: {
+    // 鑾峰彇鎵�鏈夊瓨鍦ㄧ殑鍒嗙被锛堟寜鍥哄畾椤哄簭锛夛紝鍖呭惈鈥滄湭鍒嗙被鈥�
+   categories() {
+    // 鍥哄畾杩斿洖鎵�鏈夐璁惧垎绫� + 鏈垎绫伙紝鏃犺鏄惁鏈夋枃浠�
+    return ['鐧昏琛ㄩ檮浠�', '璇佷欢鐓�', '鐤剧梾璇婃柇娌荤枟', '鏈垎绫�'];
+  }
+  },
   methods: {
     /** 鏌ヨ妗堜緥鍒楄〃 */
-    getList() {
+    async getList() {
       this.loading = true;
-      // 妯℃嫙API璋冪敤寤惰繜
-      setTimeout(() => {
-        // 娴嬭瘯鏁版嵁
-        this.caseList = [
-          {
-            id: 1,
-            donorNo: "DON20241219001",
-            donorName: "寮犱笁",
-            gender: "0",
-            age: 38,
-            bloodType: "A",
-            diagnosis:
-              "鑴戝浼ゅ鑷磋剳姝讳骸锛岀粡鎶㈡晳鏃犳晥瀹e竷鑴戞浜°�傚灞炲悓鎰忓櫒瀹樻崘鐚��",
-            hospitalName: "闈掑矝澶у闄勫睘鍖婚櫌",
-            status: "0",
-            reportTime: "2024-12-19 09:30:00",
-            reporterName: "鏉庡尰鐢�",
-            idCardNo: "370203198510123456",
-            nation: "姹夋棌",
-            phone: "13800138000",
-            address: "灞变笢鐪侀潚宀涘競甯傚崡鍖洪娓腑璺�100鍙�",
-            inpatientNo: "ZY20241219001",
-            departmentName: "绁炵粡澶栫",
-            doctorName: "鐜嬩富浠�",
-            infectiousDisease: "鏃�",
-            medicalRecord:
-              "鎮h�呭洜浜ら�氫簨鏁呭鑷翠弗閲嶈剳澶栦激锛岀粡鎶㈡晳鏃犳晥瀹e竷鑴戞浜°��",
-            hospitalLevel: "涓夌骇鐢茬瓑",
-            contactPerson: "寮犳姢澹�",
-            contactPhone: "13900139000",
-            hospitalAddress: "灞变笢鐪侀潚宀涘競甯傚崡鍖烘睙鑻忚矾1鍙�"
-          },
-          {
-            id: 2,
-            donorNo: "DON20241218001",
-            donorName: "鏉庡洓",
-            gender: "1",
-            age: 45,
-            bloodType: "O",
-            diagnosis: "鎬ユ�у績鑲屾姝伙紝蹇冭剰鍔熻兘琛扮",
-            hospitalName: "闈掑矝甯傜珛鍖婚櫌",
-            status: "1",
-            reportTime: "2024-12-18 14:20:00",
-            approveTime: "2024-12-18 16:30:00",
-            reporterName: "鍒樺尰鐢�",
-            approverName: "瀹℃牳涓撳憳A",
-            approveOpinion: "璧勬枡榻愬叏锛岀鍚堟崘鐚潯浠讹紝鍚屾剰閫氳繃銆�"
-          },
-          {
-            id: 3,
-            donorNo: "DON20241217001",
-            donorName: "鐜嬩簲",
-            gender: "0",
-            age: 52,
-            bloodType: "B",
-            diagnosis: "棰呭唴鍑鸿锛岃剳骞插姛鑳戒抚澶�",
-            hospitalName: "闈掑矝鐪肩鍖婚櫌",
-            status: "2",
-            reportTime: "2024-12-17 10:15:00",
-            approveTime: "2024-12-17 14:20:00",
-            reporterName: "闄堝尰鐢�",
-            approverName: "瀹℃牳涓撳憳B",
-            approveOpinion: "瀹跺睘鍚屾剰涔︿笉瀹屾暣锛岄渶琛ュ厖鏉愭枡鍚庨噸鏂版彁浜ゃ��"
-          },
-          {
-            id: 4,
-            donorNo: "DON20241216001",
-            donorName: "璧靛叚",
-            gender: "1",
-            age: 28,
-            bloodType: "AB",
-            diagnosis: "閲嶅瀷棰呰剳鎹熶激锛屽鍣ㄥ畼鍔熻兘琛扮",
-            hospitalName: "闈掑矝鍎跨鍖婚櫌",
-            status: "0",
-            reportTime: "2024-12-16 16:45:00",
-            reporterName: "瀛欏尰鐢�"
-          }
-        ];
-        this.total = this.caseList.length;
+      try {
+        const response = await donateList(this.queryParams);
+        this.caseList = response.rows || response.data || [];
+        this.total = response.total || this.caseList.length;
+      } catch (error) {
+        console.error("鑾峰彇妗堜緥鍒楄〃澶辫触:", error);
+        this.$modal.msgError("鑾峰彇妗堜緥鍒楄〃澶辫触");
+        this.caseList = [];
+        this.total = 0;
+      } finally {
         this.loading = false;
-      }, 500);
+      }
     },
-    // 澶氶�夋閫変腑鏁版嵁
+    handleResidenceAddressChange(address) {
+      this.editForm.residenceprovince = address.sheng;
+      this.editForm.residencecity = address.shi;
+      this.editForm.residencetown = address.qu;
+    },
+
+    handleRegisterAddressChange(address) {
+      console.log(this.registerAddress, "registerAddress11");
+
+      this.editForm.registerprovince = address.sheng;
+      this.editForm.registercity = address.shi;
+      this.editForm.registertown = address.qu;
+    },
+    /** 纭缁撴灉鍙樺寲澶勭悊 */
+    handleApproveResultChange(value) {
+      if (value == "3") {
+        // 閫夋嫨鍚屾剰鏃讹紝閲嶇疆椹冲洖鍘熷洜
+        this.approveForm.rejectType = "";
+        this.approveForm.isDonate = "0"; // 閲嶇疆涓烘湭鎹愮尞
+      } else if (value == "4") {
+        // 閫夋嫨椹冲洖鏃讹紝閲嶇疆杞繍閫夐」
+        this.approveForm.isTransport = "1";
+        this.approveForm.createTransport = false;
+      }
+
+      // 娓呴櫎楠岃瘉
+      this.$nextTick(() => {
+        if (this.$refs.approveForm) {
+          this.$refs.approveForm.clearValidate();
+        }
+      });
+    },
+
+    // 杞繍鐩稿叧鏂规硶
+    /** 鑾峰彇杞繍鐘舵�佹爣绛炬牱寮� */
+    getTransportStatusTag(row) {
+      if (row.isTransport == "1") {
+        return "info"; // 涓嶉渶瑕佽浆杩�
+      }
+      if (
+        row.serviceTransport &&
+        Array.isArray(row.serviceTransport) &&
+        row.serviceTransport.length > 0
+      ) {
+        // 鏍规嵁杞繍鍗曠姸鎬佹樉绀轰笉鍚岄鑹�
+        const transport = row.serviceTransport[0];
+        if (transport.transitStatus) {
+          switch (transport.transitStatus.toString()) {
+            case "1":
+              return "warning"; // 寰呰浆杩�
+            case "2":
+              return "primary"; // 杞繍涓�
+            case "3":
+              return "success"; // 杞繍瀹屾垚
+            case "4":
+              return "danger"; // 杞繍鍙栨秷
+            case "5":
+              return "info"; // 鏆傚瓨
+            default:
+              return "info";
+          }
+        }
+        return "primary"; // 鏈夎浆杩愪俊鎭絾鏃犵姸鎬�
+      }
+      return "success"; // 闇�瑕佽浆杩愪絾鏃犺浆杩愪俊鎭�
+    },
+
+    /** 鑾峰彇杞繍鐘舵�佹枃鏈� */
+    getTransportStatusText(row) {
+      if (row.isTransport == "1") {
+        return "鏃犻渶杞繍";
+      }
+      if (
+        row.serviceTransport &&
+        Array.isArray(row.serviceTransport) &&
+        row.serviceTransport.length > 0
+      ) {
+        const transport = row.serviceTransport[0];
+        if (transport.transitStatus) {
+          switch (transport.transitStatus.toString()) {
+            case "1":
+              return "寰呰浆杩�";
+            case "2":
+              return "杞繍涓�";
+            case "3":
+              return "杞繍瀹屾垚";
+            case "4":
+              return "杞繍鍙栨秷";
+            case "5":
+              return "鏆傚瓨";
+            default:
+              return "鏈夎浆杩愬崟";
+          }
+        }
+        return "鏈夎浆杩愬崟";
+      }
+      return "鏈煡";
+    },
+
+    /** 璺宠浆鍒板垱寤鸿浆杩愬崟椤甸潰 */
+    Createatransferorder(res) {
+      console.log(res);
+
+      this.$router.push({
+        path: "/report/transfer",
+        query: {
+          autoCreate: "true",
+          caseId: res.id,
+          caseNo: res.caseNo,
+          patName: res.name,
+          age: res.age,
+          sex: res.sex,
+          diagnosisname: res.diagnosisname,
+          treatmentHospitalName: res.treatmenthospitalname
+        }
+      });
+    },
+
+    /** 澶氶�夋閫変腑鏁版嵁 */
     handleSelectionChange(selection) {
+      console.log(selection, "22");
+
       this.ids = selection.map(item => item.id);
+      console.log(this.ids, "33");
+
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
+
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
       this.queryParams.pageNum = 1;
       this.getList();
     },
+
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    /** 璇︽儏鎸夐挳鎿嶄綔 */
-    handleDetail(row) {
-      this.currentCase = row;
-      this.detailTitle = `妗堜緥璇︽儏 - ${row.donorNo}`;
-      this.detailOpen = true;
-    },
-    // 鍦ㄧ埗缁勪欢涓洿鏂板鎵规柟娉�
-    handleApprove(row) {
-      this.currentCase = row;
-      this.approveForm.caseId = row.id;
-      this.approveForm.approveResult = "1";
-      this.approveForm.approveOpinion = "";
-      this.approveOpen = true;
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        caseNo: undefined,
+        name: undefined,
+        reportStatus: undefined
+      };
+      this.getList();
     },
 
-    /** 鎻愪氦瀹℃壒 */
-    submitApprove() {
-      this.$refs["approveForm"].validate(valid => {
-        if (valid) {
-          // 妯℃嫙瀹℃壒鎻愪氦
-          this.$modal.msgSuccess("瀹℃壒鎴愬姛");
-          this.approveOpen = false;
-          // 鏇存柊妗堜緥鐘舵��
-          const caseItem = this.caseList.find(
-            item => item.id === this.approveForm.caseId
-          );
-          if (caseItem) {
-            caseItem.status = this.approveForm.approveResult;
-            caseItem.approveTime = new Date().toLocaleString();
-            caseItem.approverName = "褰撳墠鐢ㄦ埛";
-            caseItem.approveOpinion = this.approveForm.approveOpinion;
+    /** 璇︽儏鎸夐挳鎿嶄綔 */
+    async handleDetail(row) {
+      try {
+        this.currentCase = row;
+        if (this.currentCase.registerprovincename) {
+          this.residenceAddress = {
+            sheng: this.currentCase.registerprovincename,
+            shi: this.currentCase.registercityname,
+            qu: this.currentCase.registertownname
+          };
+        }
+        // 鎴风睄鍦板潃
+        if (this.currentCase.residenceprovincename) {
+          this.registerAddress = {
+            sheng: this.currentCase.residenceprovincename,
+            shi: this.currentCase.residencecountyname,
+            qu: this.currentCase.residencetownname
+          };
+        }
+        // 濡傛灉鐘舵�佹槸"宸蹭笂鎶�"(1)锛屽垯鏇存柊涓�"宸查槄璇�"(2)
+        if (this.currentCase.reportStatus == "1") {
+          try {
+            const updateData = {
+              ...this.currentCase,
+              reportStatus: "2",
+              updateTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
+              updateBy: this.$store.state.user?.name || "褰撳墠鐢ㄦ埛"
+            };
+
+            await donateEdit(updateData);
+            this.currentCase.reportStatus = "2";
+            this.currentCase.updateTime = updateData.updateTime;
+            row.reportStatus = "2";
+            this.$modal.msgSuccess("鐘舵�佸凡鏇存柊涓哄凡闃呰");
+          } catch (updateError) {
+            console.error("鐘舵�佹洿鏂板け璐�:", updateError);
           }
         }
+
+        this.detailTitle = `妗堜緥璇︽儏 - ${this.currentCase.caseNo ||
+          row.caseNo}`;
+        this.detailOpen = true;
+        console.log(this.currentCase, "this.currentCase");
+      } catch (error) {
+        console.error("鑾峰彇妗堜緥璇︽儏澶辫触:", error);
+        this.currentCase = row;
+        this.detailTitle = `妗堜緥璇︽儏 - ${row.caseNo}`;
+        this.detailOpen = true;
+      }
+    },
+    // 鑾峰彇鏌愬垎绫荤殑鏂囦欢鏁伴噺
+    getCategoryCount(category) {
+      return this.editForm.annexfilesList.filter(item => {
+        const type = item.fileType || "";
+        if (category === "鏈垎绫�") {
+          return !this.presetCategories.includes(type);
+        }
+        return type === category;
+      }).length;
+    },
+    // 鑾峰彇鏌愬垎绫荤殑鏂囦欢鍒楄〃
+    getCategoryFiles(category) {
+      return this.editForm.annexfilesList.filter(item => {
+        const type = item.fileType || "";
+        if (category === "鏈垎绫�") {
+          return !this.presetCategories.includes(type);
+        }
+        return type === category;
       });
+    },
+    // 鏇存柊闄勪欢鍒嗙被锛堜笅鎷変慨鏀规椂瑙﹀彂锛�
+    updateAttachmentCategory(row, newVal) {
+      const target = this.editForm.annexfilesList.find(item => item === row);
+      if (target) {
+        target.fileType = newVal; // 鍙兘涓虹┖瀛楃涓�
+        // 鍚屾鏇存柊 attachmentFileList
+        const fileItem = this.attachmentFileList.find(f => f.raw === row);
+        if (fileItem) {
+          fileItem.raw.fileType = newVal;
+          fileItem.fileType = newVal || "鏈垎绫�";
+        }
+        // 鍙�夛細濡傛灉褰撳墠婵�娲荤殑tab娌℃湁鏂囦欢浜嗭紝鑷姩鍒囨崲鍒扮涓�涓湁鏂囦欢鐨則ab
+        const currentTabHasFiles =
+          this.getCategoryFiles(this.activeTab).length > 0;
+        if (!currentTabHasFiles) {
+          const firstCategory = this.categories[0];
+          if (firstCategory) this.activeTab = firstCategory;
+        }
+      }
+    },
+    // 鎸夋枃浠跺璞″垹闄わ紙鐢ㄤ簬琛ㄦ牸涓殑鍒犻櫎鎸夐挳锛�
+    handleRemoveAttachmentByFile(file) {
+      const index = this.editForm.annexfilesList.findIndex(
+        item => item === file
+      );
+      if (index > -1) {
+        this.editForm.annexfilesList.splice(index, 1);
+        // 鍚屾鍒犻櫎 attachmentFileList
+        const fileIndex = this.attachmentFileList.findIndex(
+          f => f.raw === file || f.url === file.fileUrl
+        );
+        if (fileIndex > -1) {
+          this.attachmentFileList.splice(fileIndex, 1);
+        }
+        this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+      }
+    },
+    /** 缂栬緫鎸夐挳鎿嶄綔 */
+    async handleEdit(row) {
+      try {
+        const response = await donateInfo(row.id);
+        if (response.code == 200 || response.data) {
+          this.isEditing = true;
+          const data = response.data || response;
+          // 纭繚闄勪欢閮芥湁 fileType 瀛楁锛岄粯璁や负绌哄瓧绗︿覆
+          if (data.annexfilesList) {
+            data.annexfilesList = data.annexfilesList.map(item => ({
+              ...item,
+              fileType: item.fileType || ""
+            }));
+            this.attachmentFileList = this.parseAttachmentToFileList(
+              data.annexfilesList
+            );
+          } else {
+            this.attachmentFileList = [];
+          }
+          if (data.registerprovincename) {
+            this.residenceAddress = {
+              sheng: data.residenceprovincename,
+              shi: data.residencecountyname,
+              qu: data.residencetownname
+            };
+          }
+          // 鎴风睄鍦板潃
+          if (data.residenceprovincename) {
+            this.registerAddress = {
+              sheng: data.registerprovincename,
+              shi: data.registercityname,
+              qu: data.registertownname
+            };
+          }
+          this.currentCase = data;
+          this.editForm = { ...data };
+          this.editForm.idcardtype = this.editForm.idcardtype?.toString() ?? "";
+          console.log(this.editForm.idcardtype);
+          this.editForm.infectious = this.editForm.infectious
+            .split(",")
+            .filter(item => item.trim() !== "");
+
+          this.editOpen = true;
+          this.$nextTick(() => {
+            this.$refs.editForm && this.$refs.editForm.clearValidate();
+          });
+        } else {
+          this.$message.error(response.msg || "鑾峰彇璁板綍澶辫触");
+        }
+      } catch (error) {
+        console.error("鑾峰彇璁板綍澶辫触:", error);
+        this.$modal.msgError("鑾峰彇璁板綍澶辫触");
+      }
+    },
+    hasApprovedSelected() {
+      if (!this.ids || this.ids.length === 0) return false;
+      return this.caseList.some(
+        item => this.ids.includes(item.id) && item.reportStatus === "3"
+      );
     },
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd() {
-      this.$router.push("/case/add");
+      this.isEditing = false;
+      this.editForm = this.getDefaultFormData();
+      this.attachmentFileList = [];
+      this.editOpen = true;
+      this.$nextTick(() => {
+        this.$refs.editForm && this.$refs.editForm.clearValidate();
+      });
     },
 
-    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal
-        .confirm('鏄惁纭鍒犻櫎浣忛櫌鍙蜂负"' + ids + '"鐨勬暟鎹」锛�')
-        .then(() => {
-          // 妯℃嫙鍒犻櫎鎿嶄綔
-          this.caseList = this.caseList.filter(item => !ids.includes(item.id));
-          this.total = this.caseList.length;
-          this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-        })
-        .catch(() => {});
+    /** 纭鎸夐挳鎿嶄綔 */
+    async handleApprove(row) {
+      try {
+        const response = await donateInfo(row.id);
+        this.currentCase = response.data || response || row;
+
+        this.approveForm.id = row.id;
+        this.approveForm.approveResult = "3";
+        this.approveForm.confirmResult = "";
+        this.approveForm.rejectType = "";
+        this.approveForm.isTransport = row.isTransport || "1";
+        this.approveForm.isDonate = "0";
+
+        this.$nextTick(() => {
+          if (this.$refs.approveForm) {
+            this.$refs.approveForm.clearValidate();
+          }
+        });
+
+        this.approveOpen = true;
+      } catch (error) {
+        console.error("鑾峰彇妗堜緥璇︽儏澶辫触:", error);
+        this.currentCase = row;
+        this.approveForm.id = row.id;
+        this.approveForm.approveResult = "3";
+        this.approveForm.confirmResult = "";
+        this.approveOpen = true;
+        this.$modal.msgError("鑾峰彇璇︽儏澶辫触锛屼絾宸叉墦寮�纭绐楀彛");
+      }
+    },
+
+    /** 鎻愪氦纭 */
+    async submitApprove() {
+      try {
+        const valid = await this.$refs.approveForm.validate();
+        if (!valid) return;
+
+        // 鍑嗗纭鏁版嵁
+        const approveData = {
+          ...this.currentCase,
+          reportStatus: this.approveForm.approveResult,
+          confirmResult: this.approveForm.confirmResult,
+          approvername: this.$store.state.user?.name || "褰撳墠鐢ㄦ埛",
+          approvetime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
+          updateTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
+          updateBy: this.$store.state.user?.name || "褰撳墠鐢ㄦ埛"
+        };
+
+        // 澶勭悊纭缁撴灉
+        if (this.approveForm.approveResult == "3") {
+          // 鍚屾剰
+          approveData.isTransport = this.approveForm.isTransport;
+
+          // 濡傛灉涓嶉渶瑕佽浆杩愶紝璁剧疆isDonate涓�1
+          if (this.approveForm.isTransport == "1") {
+            approveData.isDonate = "1";
+          } else {
+            approveData.isDonate = "0";
+          }
+        } else if (this.approveForm.approveResult == "4") {
+          // 椹冲洖
+          approveData.rejectType = this.approveForm.rejectType;
+          approveData.isTransport = "1"; // 椹冲洖鐨勬渚嬩笉闇�瑕佽浆杩�
+          approveData.isDonate = "0"; // 椹冲洖鐨勬渚嬫爣璁颁负宸叉崘鐚�
+        }
+
+        // 淇濆瓨妗堜緥纭淇℃伅
+        await donateEdit(approveData);
+
+        this.$modal.msgSuccess("纭鎴愬姛");
+
+        // 鍏抽棴纭瀵硅瘽妗�
+        this.approveOpen = false;
+
+        // 鍒锋柊鍒楄〃
+        this.getList();
+
+        // 濡傛灉鍚屾剰涓旈渶瑕佽浆杩愶紝璺宠浆鍒拌浆杩愬崟鍒涘缓椤甸潰
+        if (
+          this.approveForm.approveResult == "3" &&
+          this.approveForm.isTransport == "2"
+        ) {
+          this.$router.push({
+            path: "/report/transfer",
+            query: {
+              autoCreate: "true",
+              caseId: this.currentCase.id,
+              caseNo: this.currentCase.caseNo,
+              patName: this.currentCase.name,
+              age: this.currentCase.age,
+              sex: this.currentCase.sex,
+              diagnosisname: this.currentCase.diagnosisname,
+              treatmentHospitalName: this.currentCase.treatmenthospitalname
+            }
+          });
+        }
+      } catch (error) {
+        console.error("纭澶辫触:", error);
+        if (error !== "cancel") {
+          this.$modal.msgError("纭澶辫触");
+        }
+      }
+    },
+
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 - 淇敼锛屽鍔犲凡鍚屾剰鏍¢獙 */
+    async handleDelete(row) {
+      console.log(this.ids, "1");
+      console.log(row, "2");
+
+      let ids = this.ids;
+      console.log(ids);
+
+      const deleteItems = this.caseList.filter(item => ids.includes(item.id));
+
+      // 妫�鏌ユ槸鍚︽湁宸插悓鎰忕殑妗堜緥
+      const approvedItems = deleteItems.filter(
+        item => item.reportStatus === "3"
+      );
+      if (approvedItems.length > 0) {
+        const names = approvedItems.map(item => item.caseNo).join(",");
+        this.$modal.msgWarning(`宸插悓鎰忕殑妗堜緥涓嶅彲鍒犻櫎锛�${names}`);
+        return;
+      }
+
+      try {
+        await this.$modal.confirm(
+          '鏄惁纭鍒犻櫎娼滃湪鎹愮尞鑰呬负"' + ids.join(",") + '"鐨勬暟鎹」锛�'
+        );
+
+        // 閫愪釜鍒犻櫎锛屼竴涓渚嬭皟鐢ㄤ竴娆″垹闄ゆ帴鍙�
+        let successCount = 0;
+        let failCount = 0;
+        let failIds = [];
+
+        for (const id of ids) {
+          try {
+            await donateDel(id);
+            successCount++;
+          } catch (error) {
+            console.error(`鍒犻櫎ID ${id} 澶辫触:`, error);
+            failCount++;
+            failIds.push(id);
+          }
+        }
+
+        // 鏄剧ず鍒犻櫎缁撴灉
+        if (failCount === 0) {
+          this.$modal.msgSuccess(`鎴愬姛鍒犻櫎 ${successCount} 涓渚媊);
+        } else {
+          this.$modal.msgWarning(
+            `鎴愬姛鍒犻櫎 ${successCount} 涓渚嬶紝${failCount} 涓渚嬪垹闄ゅけ璐ワ紙ID: ${failIds.join(
+              ","
+            )}锛塦
+          );
+        }
+
+        this.getList();
+      } catch (error) {
+        if (error !== "cancel") {
+          console.error("鍒犻櫎鎿嶄綔鍙栨秷鎴栧け璐�:", error);
+          this.$modal.msgError("鍒犻櫎澶辫触");
+        }
+      }
+    },
+
+    /** 鑾峰彇榛樿琛ㄥ崟鏁版嵁 */
+    getDefaultFormData() {
+      return {
+        id: undefined,
+        caseNo: undefined,
+        name: undefined,
+        sex: undefined,
+        age: undefined,
+        ageunit: "year",
+        bloodType: undefined,
+        rhYin: "0",
+        birthday: undefined,
+        idcardtype: "1",
+        idcardno: undefined,
+        nation: undefined,
+        nationality: undefined,
+        nativeplace: undefined,
+        education: undefined,
+        occupation: undefined,
+        phone: undefined,
+        // 鎴风睄鍦板潃
+        registerprovincename: undefined,
+        registercityname: undefined,
+        registertownname: undefined,
+        registercommunityname: undefined,
+        registeraddress: undefined,
+        // 鐜颁綇鍦板潃
+        residenceprovincename: undefined,
+        residencecountyname: undefined,
+        residencetownname: undefined,
+        residencecommunityname: undefined,
+        residenceaddress: undefined,
+        // 鍖荤枟淇℃伅
+        diagnosisname: undefined,
+        illnessoverview: undefined,
+        patientstate: undefined,
+        gcsScore: undefined,
+        infectious: undefined,
+        infectiousOther: undefined,
+        isTransport: "1",
+        isDonate: "0", // 鏂板锛氭槸鍚︽崘鐚�
+        rejectType: undefined, // 鏂板锛氶┏鍥炲師鍥�
+        // 鍖婚櫌淇℃伅
+        treatmenthospitalname: undefined,
+        treatmentdeptname: undefined,
+        inpatientno: undefined,
+        deptName: undefined,
+        deptNo: undefined,
+        toHospital: undefined,
+        // 涓婃姤淇℃伅
+        infoName: undefined,
+        infoNo: undefined,
+        reporterphone: undefined,
+        coordinatorName: undefined,
+        coordinatorNo: undefined,
+        terminationCase: "0",
+        reportStatus: "1", // 榛樿宸蹭笂鎶�
+        // 闄勪欢
+        annexfilesList: [],
+        // 鍏朵粬
+        remark: undefined,
+        createBy: undefined,
+        createTime: undefined,
+        updateBy: undefined,
+        updateTime: undefined,
+        delFlag: 0
+      };
+    },
+
+    /** 闄勪欢杞崲 */
+    parseAttachmentToFileList(attachments) {
+  if (!attachments || !Array.isArray(attachments)) return [];
+  return attachments.map((item, index) => ({
+    uid: item.id || `attachment-${index}-${Date.now()}`,
+    name: item.fileName,
+    url: item.path || item.fileUrl,
+    status: 'success',
+    raw: item,
+    fileType: item.fileType || ''   // 绌哄瓧绗︿覆琛ㄧず鏈垎绫�
+  }));
+}
+,
+
+    /** 闄勪欢鍙樺寲澶勭悊 */
+    handleAttachmentChange(fileList) {
+      this.attachmentFileList = fileList;
+    },
+
+    /** 闄勪欢涓婁紶鎴愬姛澶勭悊 */
+    handleUploadSuccess({ file, fileList, response }) {
+  if (response && response.code == 200) {
+    if (!this.editForm.annexfilesList) {
+      this.editForm.annexfilesList = [];
+    }
+    // 鏍规嵁褰撳墠婵�娲荤殑 Tab 鍐冲畾鍒嗙被锛堟湭鍒嗙被 Tab 瀵瑰簲绌哄瓧绗︿覆锛�
+    const category = this.activeTab === '鏈垎绫�' ? '' : this.activeTab;
+    const attachmentObj = {
+      fileName: file.name,
+      path: response.data || file.url,
+      fileUrl: response.data || file.url,
+      type: this.getFileExtension(file.name),
+      createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+      remart: file.raw?.remart || '',
+      caseNo: this.editForm.caseNo,
+      fileType: category   // 浣跨敤 activeTab 鍐冲畾
+    };
+    this.editForm.annexfilesList.push(attachmentObj);
+    // 鍚屾鏇存柊 attachmentFileList
+    this.attachmentFileList.push({
+      uid: attachmentObj.path,
+      name: attachmentObj.fileName,
+      url: attachmentObj.path,
+      status: 'success',
+      raw: attachmentObj,
+      fileType: category
+    });
+    this.$message.success('鏂囦欢涓婁紶鎴愬姛');
+  }
+},
+
+    /** 闄勪欢涓婁紶閿欒澶勭悊 */
+    handleUploadError({ file, fileList, error }) {
+      console.error("闄勪欢涓婁紶澶辫触:", error);
+      this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+    },
+
+    /** 闄勪欢绉婚櫎澶勭悊 */
+    handleAttachmentRemove(file) {
+      if (file.url && this.editForm.annexfilesList) {
+        const index = this.editForm.annexfilesList.findIndex(
+          item => item.path == file.url || item.fileUrl == file.url
+        );
+        if (index > -1) {
+          this.editForm.annexfilesList.splice(index, 1);
+        }
+      }
+    },
+
+    /** 鎵嬪姩鍒犻櫎闄勪欢 */
+    handleRemoveAttachment(index) {
+      this.editForm.annexfilesList.splice(index, 1);
+      this.attachmentFileList.splice(index, 1);
+      this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+    },
+
+    /** 鏂囦欢棰勮 */
+    handlePreview(file) {
+      this.currentPreviewFile = {
+        fileName: file.fileName,
+        fileUrl: file.path || file.fileUrl,
+        fileType: this.getFileType(file.fileName)
+      };
+      this.previewVisible = true;
+    },
+
+    /** 鏂囦欢涓嬭浇 */
+    handleDownload(file) {
+      const fileUrl = file.path || file.fileUrl;
+      const fileName = file.fileName;
+
+      if (fileUrl) {
+        const link = document.createElement("a");
+        link.href = fileUrl;
+        link.download = fileName;
+        link.style.display = "none";
+        document.body.appendChild(link);
+        link.click();
+        document.body.removeChild(link);
+        this.$message.success("寮�濮嬩笅杞芥枃浠�");
+      } else {
+        this.$message.warning("鏂囦欢璺緞涓嶅瓨鍦紝鏃犳硶涓嬭浇");
+      }
+    },
+
+    /** 鑾峰彇鏂囦欢绫诲瀷 */
+    getFileType(fileName) {
+      if (!fileName) return "other";
+      const extension = fileName
+        .split(".")
+        .pop()
+        .toLowerCase();
+      const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"];
+      const pdfTypes = ["pdf"];
+      const officeTypes = ["doc", "docx", "xls", "xlsx"];
+
+      if (imageTypes.includes(extension)) return "image";
+      if (pdfTypes.includes(extension)) return "pdf";
+      if (officeTypes.includes(extension)) return "office";
+      return "other";
+    },
+
+    /** 鑾峰彇鏂囦欢鎵╁睍鍚� */
+    getFileExtension(filename) {
+      if (!filename) return "";
+      return filename
+        .split(".")
+        .pop()
+        .toLowerCase();
+    },
+
+    /** 鏃ユ湡鏃堕棿鏍煎紡鍖� */
+    formatDateTime(dateTime) {
+      if (!dateTime) return "";
+      return dayjs(dateTime).format("YYYY-MM-DD HH:mm:ss");
+    },
+
+    /** 鍏抽棴缂栬緫瀵硅瘽妗� */
+    handleEditClose() {
+      this.editOpen = false;
+      this.currentCase = {};
+      this.editForm = this.getDefaultFormData();
+      this.attachmentFileList = [];
+      this.$nextTick(() => {
+        this.$refs.editForm && this.$refs.editForm.clearValidate();
+      });
+    },
+    goToTransportDetail(name) {
+      this.$router.push({
+        path: "/report/transfer",
+        query: {
+          autoCreate: "true",
+          patName: name
+        }
+      });
+    },
+    /** 淇濆瓨琛ㄥ崟 */
+    async handleSave() {
+      try {
+        const valid = await this.$refs.editForm.validate();
+        if (!valid) return;
+
+        const pendingFiles = this.attachmentFileList.filter(
+          item => item.status !== "success"
+        );
+        if (pendingFiles.length > 0) {
+          this.$message.warning(
+            "杩樻湁鏂囦欢鏈笂浼犲畬鎴愶紝璇峰厛涓婁紶鎵�鏈夋枃浠舵垨绉婚櫎鏈笂浼犵殑鏂囦欢"
+          );
+          return;
+        }
+
+        this.saveLoading = true;
+
+        const requestData = { ...this.editForm };
+        requestData.infectious = requestData.infectious.join(",");
+        let response;
+
+        requestData.isDonate = requestData.isDonate
+          ? requestData.isDonate
+          : "0";
+
+        if (this.isEditing) {
+          response = await donateEdit(requestData);
+        } else {
+          // 鏂板鏃惰缃垱寤轰俊鎭�
+          requestData.createTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
+          requestData.createBy = this.$store.state.user?.name || "褰撳墠鐢ㄦ埛";
+          response = await donateAdd(requestData);
+        }
+
+        if (response.code == 200) {
+          this.$message.success(this.isEditing ? "淇敼鎴愬姛" : "鏂板鎴愬姛");
+          this.handleEditClose();
+          this.getList();
+        } else {
+          this.$message.error(response.msg || "鎿嶄綔澶辫触");
+        }
+      } catch (error) {
+        console.error("淇濆瓨澶辫触:", error);
+        this.$message.error("鎿嶄綔澶辫触锛岃绋嶅悗閲嶈瘯");
+      } finally {
+        this.saveLoading = false;
+      }
     }
   }
 };
 </script>
 
 <style scoped>
+.app-container {
+  padding: 20px;
+}
+
 .filter-card {
   margin-bottom: 20px;
 }
+
 .mb8 {
   margin-bottom: 8px;
 }
-/* 璇︽儏椤甸潰鏍峰紡浼樺寲 */
-.case-detail-container {
-  max-height: 70vh;
-  overflow-y: auto;
-  padding: 0 10px;
-}
 
-.detail-section {
+/* 琛ㄥ崟鍖哄煙鏍峰紡 */
+.form-section {
   margin-bottom: 16px;
 }
 
 .section-header {
   display: flex;
-  justify-content: space-between;
   align-items: center;
-}
-
-.section-title {
-  font-size: 16px;
   font-weight: bold;
   color: #303133;
 }
 
-/* 瀹℃壒寮规鏍峰紡 */
-.approve-dialog >>> .el-dialog__body {
+.dialog-footer {
+  text-align: right;
+  padding: 20px 0 0;
+}
+
+/* 闄勪欢鏍峰紡 */
+.attachment-section {
+  margin-bottom: 16px;
+}
+
+.attachment-header {
+  display: flex;
+  align-items: center;
+  margin-bottom: 16px;
+  padding: 8px 0;
+  border-bottom: 1px solid #ebeef5;
+}
+
+.attachment-title {
+  font-weight: bold;
+  margin: 0 8px;
+}
+
+.attachment-tip {
+  font-size: 12px;
+  color: #909399;
+}
+
+.attachment-list {
+  margin-top: 16px;
+}
+
+.list-title {
+  font-weight: bold;
+  margin-bottom: 12px;
+  color: #303133;
+}
+
+.file-name {
+  font-size: 13px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+/* 纭寮规鏍峰紡 */
+.approve-dialog>>>.el-dialog__body {
   padding: 0;
 }
 
@@ -508,6 +1628,51 @@
   height: 100%;
 }
 
+.approve-dialog-content {
+  display: flex;
+  height: 600px;
+  /* 鍙互璋冩暣楂樺害 */
+  overflow: hidden;
+}
+
+.approve-detail-left {
+  width: 50%;
+  background: #f8f9fa;
+  padding: 20px;
+  overflow-y: auto;
+  border-right: 1px solid #e4e7ed;
+}
+
+.approve-form-right {
+  width: 50%;
+  padding: 20px;
+  overflow-y: auto;
+}
+
+.approve-detail-preview {
+  height: 100%;
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 1200px) {
+  .approve-dialog-content {
+    flex-direction: column;
+    height: auto;
+    max-height: 80vh;
+  }
+
+  .approve-detail-left,
+  .approve-form-right {
+    width: 100%;
+    height: auto;
+  }
+
+  .approve-detail-left {
+    border-right: none;
+    border-bottom: 1px solid #e4e7ed;
+  }
+}
+
 /* 鍝嶅簲寮忚璁� */
 @media (max-width: 1200px) {
   .approve-dialog {

--
Gitblit v1.9.3