From 4c9fdc87987140e8b2c3f0dfc2f6608cdb6be774 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 21 十月 2026 17:39:24 +0800
Subject: [PATCH] 青岛维护

---
 src/views/project/donatebaseinfo/EditCaseModal.vue | 1588 ++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 1,205 insertions(+), 383 deletions(-)

diff --git a/src/views/project/donatebaseinfo/EditCaseModal.vue b/src/views/project/donatebaseinfo/EditCaseModal.vue
index 28efaa4..71ff5b8 100644
--- a/src/views/project/donatebaseinfo/EditCaseModal.vue
+++ b/src/views/project/donatebaseinfo/EditCaseModal.vue
@@ -17,218 +17,6 @@
         <!-- 鍩虹淇℃伅閮ㄥ垎 -->
         <el-card header="鍩虹淇℃伅" class="form-section">
           <el-row :gutter="20">
-            <el-col :span="11">
-              <el-form-item label="妗堜緥缂栧彿" prop="caseNo">
-                <el-input
-                  v-model="formData.caseNo"
-                  :disabled="isEdit"
-                  placeholder="绯荤粺鑷姩鐢熸垚"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="11">
-              <el-form-item label="鎹愮尞鑰呯紪鍙�" prop="donorno">
-                <el-input
-                  v-model="formData.donorno"
-                  placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row :gutter="20">
-            <el-col :span="6">
-              <el-form-item label="濮撳悕" prop="name">
-                <el-input v-model="formData.name" placeholder="蹇呭~椤�" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="鎬у埆" prop="sex">
-                <el-select v-model="formData.sex" placeholder="璇烽�夋嫨鎬у埆">
-                  <el-option label="鏈煡" value="0" />
-                  <el-option label="鐢�" value="1" />
-                  <el-option label="濂�" value="2" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="璇佷欢绫诲瀷" prop="idcardtype">
-                <el-select
-                  v-model="formData.idcardtype"
-                  placeholder="璇烽�夋嫨璇佷欢绫诲瀷"
-                >
-                  <el-option label="韬唤璇�" :value="1" />
-                  <el-option label="鍐涗汉璇�" :value="2" />
-                  <el-option label="鎶ょ収" :value="3" />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="璇佷欢鍙风爜" prop="idcardno">
-                <el-input
-                  v-model="formData.idcardno"
-                  placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�"
-                  @blur="handleIdCardBlur"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row :gutter="20">
-            <el-col :span="6">
-              <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday">
-                <el-date-picker
-                  v-model="formData.birthday"
-                  type="date"
-                  placeholder="閫夋嫨鍑虹敓鏃ユ湡"
-                  value-format="yyyy-MM-dd"
-                  style="width: 100%"
-                  @change="calculateAge"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="骞撮緞" prop="andAge">
-                <el-input v-model="formData.andAge" disabled />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="姘戞棌" prop="nation">
-                <el-select v-model="formData.nation" placeholder="璇烽�夋嫨姘戞棌">
-                  <el-option
-                    v-for="dict in dictOptions.sys_nation"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="鍥界睄" prop="nationality">
-                <el-input
-                  v-model="formData.nationality"
-                  placeholder="璇疯緭鍏ュ浗绫�"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row :gutter="20">
-            <el-col :span="6">
-              <el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
-                <el-input
-                  v-model="formData.phone"
-                  placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="瀛﹀巻" prop="education">
-                <el-select
-                  v-model="formData.education"
-                  placeholder="璇烽�夋嫨瀛﹀巻"
-                >
-                  <el-option
-                    v-for="dict in dictOptions.sys_education"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="鑱屼笟" prop="occupation">
-                <el-select
-                  v-model="formData.occupation"
-                  placeholder="璇烽�夋嫨鑱屼笟"
-                >
-                  <el-option
-                    v-for="dict in dictOptions.sys_occupation"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="绫嶈疮" prop="nativeplace">
-                <el-input
-                  v-model="formData.nativeplace"
-                  placeholder="璇疯緭鍏ョ睄璐�"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-card>
-
-        <!-- 鍖荤枟淇℃伅閮ㄥ垎 -->
-        <el-card header="鍖荤枟淇℃伅" class="form-section">
-          <el-row :gutter="20">
-            <el-col :span="8">
-              <el-form-item label="棣栬瘖鍖婚櫌" prop="treatmenthospitalno">
-                <org-selecter
-                  :org-type="'3'"
-                  v-model="formData.treatmenthospitalno"
-                  @change="handleHospitalChange"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="绉戝" prop="treatmentdeptname">
-                <el-input
-                  v-model="formData.treatmentdeptname"
-                  placeholder="璇疯緭鍏ョ瀹�"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="浣忛櫌鍙�" prop="inpatientno">
-                <el-input
-                  v-model="formData.inpatientno"
-                  placeholder="璇疯緭鍏ヤ綇闄㈠彿"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row :gutter="20">
-            <el-col :span="12">
-              <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
-                <el-input
-                  v-model="formData.diagnosisname"
-                  placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row :gutter="20">
-            <el-col :span="12">
-              <el-form-item label="琛�鍨�" prop="bloodtype">
-                <el-radio-group v-model="formData.bloodtype">
-                  <el-radio label="1">A鍨�</el-radio>
-                  <el-radio label="2">B鍨�</el-radio>
-                  <el-radio label="3">O鍨�</el-radio>
-                  <el-radio label="4">AB鍨�</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="Rh(D)" prop="rhyin">
-                <el-radio-group v-model="formData.rhyin">
-                  <el-radio
-                    v-for="dict in dict.type.sys_bloodtype_rhd || []"
-                    :key="dict.value"
-                    :label="dict.value"
-                  >{{ dict.label }}</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item
                 label="褰撳墠鍖荤枟鏈烘瀯"
@@ -252,69 +40,174 @@
 
           <el-row :gutter="20">
             <el-col :span="12">
-              <el-form-item label="棣栨鍖荤枟鏈烘瀯" prop="firstMedicalInstitution">
+              <el-form-item label="棣栬瘖鍖荤枟鏈烘瀯" prop="firstMedicalInstitution">
                 <el-input
                   v-model="formData.firstMedicalInstitution"
-                  placeholder="璇疯緭鍏ラ娆″尰鐤楁満鏋�"
+                  placeholder="璇疯緭鍏ラ璇婂尰鐤楁満鏋�"
                 />
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="棣栨鍖荤枟鏈烘瀯绉戝" prop="firstDept">
+              <el-form-item label="棣栬瘖鍖荤枟鏈烘瀯绉戝" prop="firstDept">
                 <el-input
                   v-model="formData.firstDept"
-                  placeholder="璇疯緭鍏ラ娆″尰鐤楁満鏋勭瀹�"
+                  placeholder="璇疯緭鍏ラ璇婂尰鐤楁満鏋勭瀹�"
                 />
               </el-form-item>
             </el-col>
           </el-row>
-
-          <el-row :gutter="20">
-            <el-col :span="8">
-              <el-form-item label="GSC璇勫垎" prop="gcsScore">
-                <el-input
-                  v-model="formData.gcsScore"
-                  placeholder="璇疯緭鍏SC璇勫垎"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="鍗忚皟鍛樼紪鍙�" prop="coordinatorNo">
-                <el-input
-                  v-model="formData.coordinatorNo"
-                  placeholder="璇疯緭鍏ュ崗璋冨憳缂栧彿"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="鍗忚皟鍛樺鍚�" prop="coordinatorName">
-                <el-input
-                  v-model="formData.coordinatorName"
-                  placeholder="璇疯緭鍏ュ崗璋冨憳濮撳悕"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row>
-            <el-col :span="24">
-              <el-form-item label="鐥呮儏姒傚喌" prop="illnessoverview">
-                <el-input
-                  v-model="formData.illnessoverview"
-                  type="textarea"
-                  :rows="3"
-                  placeholder="璇疯緭鍏ョ梾鎯呮鍐�"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-card>
-
-        <!-- 鍦板潃淇℃伅閮ㄥ垎 -->
-        <el-card header="鍦板潃淇℃伅" class="form-section">
           <el-row :gutter="20">
             <el-col :span="12">
-              <el-form-item label="鐜颁綇鍦板潃" prop="residenceaddress">
+              <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
+                <el-input
+                  v-model="formData.caseNo"
+                  placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="涓婃姤鍖婚櫌" prop="treatmenthospitalname">
+                <el-input
+                  v-model="formData.treatmenthospitalname"
+                  placeholder="璇疯緭鍏ヤ笂鎶ュ尰闄�"
+                />
+              </el-form-item>
+            </el-col>
+            <!-- <el-col :span="11">
+              <el-form-item label="鎹愮尞鑰呯紪鍙�" prop="donorno">
+                <el-input
+                  v-model="formData.donorno"
+                  placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�"
+                />
+              </el-form-item>
+            </el-col> -->
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="濮撳悕" prop="name">
+                <el-input v-model="formData.name" placeholder="蹇呭~椤�" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="鎬у埆" prop="sex">
+                <el-select v-model="formData.sex" placeholder="璇烽�夋嫨鎬у埆">
+                  <el-option label="鐢�" value="1" />
+                  <el-option label="濂�" value="2" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="鍥界睄" prop="nationality">
+                <el-input
+                  v-model="formData.nationality"
+                  placeholder="璇疯緭鍏ュ浗绫�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday">
+                <el-date-picker
+                  v-model="formData.birthday"
+                  type="date"
+                  placeholder="閫夋嫨鍑虹敓鏃ユ湡"
+                  value-format="yyyy-MM-dd"
+                  style="width: 100%"
+                  @change="calculateAge"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="骞撮緞" prop="andAge">
+                <el-input v-model="formData.andAge" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="姘戞棌" prop="nation">
+                <el-select v-model="formData.nation" placeholder="璇烽�夋嫨姘戞棌">
+                  <el-option
+                    v-for="dict in dict.type.sys_nation || []"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  />
+                </el-select>
+              </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="formData.idcardtype"
+                  placeholder="璇烽�夋嫨璇佷欢绫诲瀷"
+                >
+                  <el-option
+                    v-for="dict in dict.type.sys_IDType || []"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="parseInt(dict.value)"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="璇佷欢鍙风爜" prop="idcardno">
+                <el-input
+                  v-model="formData.idcardno"
+                  placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�"
+                  @blur="handleIdCardBlur"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <!-- <el-row :gutter="20">
+
+            <el-col :span="6">
+              <el-form-item label="瀛﹀巻" prop="education">
+                <el-select
+                  v-model="formData.education"
+                  placeholder="璇烽�夋嫨瀛﹀巻"
+                >
+                  <el-option
+                    v-for="dict in dict.type.sys_education || []"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="鑱屼笟" prop="occupation">
+                <el-select
+                  v-model="formData.occupation"
+                  placeholder="璇烽�夋嫨鑱屼笟"
+                >
+                  <el-option
+                    v-for="dict in dict.type.sys_occupation || []"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="绫嶈疮" prop="nativeplace">
+                <el-input
+                  v-model="formData.nativeplace"
+                  placeholder="璇疯緭鍏ョ睄璐�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row> -->
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鐜板眳浣忓湴" prop="residenceaddress">
                 <li-area-select
                   ref="residenceSelect"
                   v-model="residenceAddress"
@@ -324,11 +217,12 @@
                   v-model="formData.residenceaddress"
                   placeholder="璇疯緭鍏ヨ缁嗗湴鍧�"
                   style="margin-top: 8px"
+                  @blur="handleResidenceDetailBlur"
                 />
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="鎴风睄鍦板潃" prop="registeraddress">
+              <el-form-item label="浣忓潃" prop="registeraddress">
                 <li-area-select
                   ref="registerSelect"
                   v-model="registerAddress"
@@ -344,8 +238,386 @@
           </el-row>
         </el-card>
 
+        <!-- 鍖荤枟淇℃伅閮ㄥ垎 -->
+        <el-card header="鍖荤枟淇℃伅" class="form-section">
+          <el-row :gutter="20">
+            <!-- <el-col :span="8">
+              <el-form-item label="鍏ラ櫌鏃堕棿" prop="Reporttothehospital">
+                <el-date-picker
+                  v-model="formData.entryTime"
+                  type="datetime"
+                  placeholder="閫夋嫨鍏ラ櫌鏃堕棿"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col> -->
+            <el-col :span="8">
+              <el-form-item label="浣忛櫌鍙�" prop="inpatientno">
+                <el-input
+                  v-model="formData.inpatientno"
+                  placeholder="璇疯緭鍏ヤ綇闄㈠彿"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="琛�鍨�" prop="bloodtype">
+                <el-radio-group v-model="formData.bloodtype">
+                  <el-radio
+                    v-for="dict in dict.type.sys_BloodType || []"
+                    :key="dict.value"
+                    :label="dict.value"
+                    >{{ dict.label }}</el-radio
+                  >
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="Rh(D)" prop="rhyin">
+                <el-radio-group v-model="formData.rhyin">
+                  <el-radio
+                    v-for="dict in dict.type.sys_bloodtype_rhd || []"
+                    :key="dict.value"
+                    :label="dict.value"
+                    >{{ dict.label }}</el-radio
+                  >
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
+                <el-input
+                  v-model="formData.diagnosisname"
+                  placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!-- 鐤剧梾绫诲瀷 -->
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="鐤剧梾绫诲瀷" align="left">
+                <el-checkbox-group v-model="formData.diseasetype">
+                  <el-checkbox
+                    v-for="dict in dict.type.sys_DiseaseType || []"
+                    :key="dict.value"
+                    :label="dict.value"
+                  >
+                    {{ dict.label }}
+                  </el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="鍏朵粬" prop="diseasetypeOther">
+                <el-input
+                  v-model="formData.diseasetypeOther"
+                  placeholder="璇疯緭鍏ュ叾浠�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <!-- 浼犳煋鐥� -->
+          <el-row>
+            <el-col :span="12">
+              <el-form-item align="left" label="浼犳煋鐥�">
+                <el-checkbox-group v-model="formData.infectious">
+                  <el-checkbox
+                    v-for="dict in dict.type.sys_Infectious || []"
+                    :key="dict.value"
+                    :label="dict.value"
+                  >
+                    {{ dict.label }}
+                  </el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item align="left" label="鍏朵粬" prop="infectiousOther">
+                <el-input
+                  v-model="formData.infectiousOther"
+                  placeholder="璇疯緭鍏ュ叾浠�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <!-- 鐥呬汉鐘跺喌鍜屽叾浠栨儏鍐� -->
+          <el-row>
+            <el-col :span="9">
+              <el-form-item align="left" label="鐥呬汉鐘跺喌">
+                <el-checkbox-group v-model="formData.patientstate">
+                  <el-checkbox
+                    v-for="dict in dict.type.sys_patientstate || []"
+                    :key="dict.value"
+                    :label="dict.value"
+                  >
+                    {{ dict.label }}
+                  </el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="15" align="left">
+              <el-form-item label="鍏朵粬鎯呭喌">
+                <el-checkbox-group v-model="formData.othercases">
+                  <el-checkbox
+                    v-for="dict in dict.type.sys_OtherCases || []"
+                    :key="dict.value"
+                    :label="dict.value"
+                  >
+                    {{ dict.label }}
+                  </el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <!-- <el-row :gutter="20">
+            <el-col :span="8">
+              <el-form-item label="GCS璇勫垎" prop="gcsScore">
+                <el-input
+                  v-model="formData.gcsScore"
+                  placeholder="璇疯緭鍏CS璇勫垎"
+                />
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="鍗忚皟鍛樺鍚�" prop="coordinatorName">
+                <el-input
+                  v-model="formData.coordinatorName"
+                  placeholder="璇疯緭鍏ュ崗璋冨憳濮撳悕"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row> -->
+
+          <!-- <el-row>
+            <el-col :span="24">
+              <el-form-item label="鐥呮儏姒傚喌" prop="illnessoverview">
+                <el-input
+                  v-model="formData.illnessoverview"
+                  type="textarea"
+                  :rows="3"
+                  placeholder="璇疯緭鍏ョ梾鎯呮鍐�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row> -->
+        </el-card>
+        <!-- 鎰忔効鍜屼翰灞炰俊鎭儴鍒� -->
+        <el-card header="鎰忔効鍜屼翰灞炰俊鎭�" class="form-section">
+          <!-- 鏈汉鎰忔効 -->
+          <el-row>
+            <el-col :span="24">
+              <el-form-item align="left" label="鏈汉鎰忔効 ">
+                <el-checkbox-group v-model="formData.selfwill">
+                  <el-checkbox
+                    v-for="dict in dict.type.sys_SelfWill || []"
+                    :key="dict.value"
+                    :label="dict.value"
+                  >
+                    {{ dict.label }}
+                  </el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <!-- 浜插睘鐘跺喌 -->
+          <el-row>
+            <el-col :span="12">
+              <el-form-item
+                label="浜插睘鐘跺喌"
+                prop="kinship"
+                class="relation"
+                align="left"
+              >
+                <el-checkbox-group v-model="formData.kinship">
+                  <el-checkbox
+                    v-for="dict in dict.type.sys_Kinship || []"
+                    :key="dict.value"
+                    :label="dict.value"
+                  >
+                    {{ dict.label }}
+                  </el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鍏朵粬" prop="kinshipOther">
+                <el-input
+                  v-model="formData.kinshipOther"
+                  placeholder="璇疯緭鍏ュ叾浠�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <!-- 涓昏浜插睘 -->
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="涓昏浜插睘" prop="majorrelatives">
+                <el-input
+                  v-model="formData.majorrelatives"
+                  placeholder="璇疯緭鍏ヤ富瑕佷翰灞�"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="涓庢綔鍦ㄦ崘鐚�呭叧绯�" prop="familyrelations">
+                <el-select
+                  v-model="formData.familyrelations"
+                  placeholder="璇烽�夋嫨涓庢崘鐚�呭叧绯�"
+                >
+                  <el-option
+                    v-for="dict in dict.type.sys_FamilyRelation || []"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <!-- 淇℃伅鏉ユ簮 -->
+        </el-card>
+        <!-- 鍦板潃淇℃伅閮ㄥ垎 -->
+        <!-- <el-card header="鍦板潃淇℃伅" class="form-section">
+
+        </el-card> -->
+        <!-- 鎶ュ憡淇℃伅閮ㄥ垎 -->
+        <el-card header="鎶ュ憡淇℃伅" class="form-section">
+          <el-row :gutter="20">
+            <!-- <el-col :span="8">
+              <el-form-item label="鎶ュ憡浜虹紪鍙�" prop="reporterno">
+                <el-select
+                  v-model="formData.reporterno"
+                  @change="handleReporterChange"
+                >
+                  <el-option
+                    v-for="reporter in reporters"
+                    :key="reporter.reportNo"
+                    :label="reporter.reportName"
+                    :value="reporter.reportNo"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col> -->
+            <el-row>
+              <el-col :span="12">
+                <el-form-item align="left" label="淇℃伅鏉ユ簮">
+                  <el-checkbox-group v-model="formData.infosources">
+                    <el-checkbox
+                      v-for="dict in dict.type.sys_InfoSources || []"
+                      :key="dict.value"
+                      :label="dict.value"
+                    >
+                      {{ dict.label }}
+                    </el-checkbox>
+                  </el-checkbox-group>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="鍏朵粬" prop="infosourcesOther">
+                  <el-input
+                    v-model="formData.infosourcesOther"
+                    placeholder="璇疯緭鍏ヤ俊鎭潵婧愬叾浠�"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+             <el-row :gutter="20">
+
+            <el-col :span="20">
+              <el-form-item label="鑾峰彇缁勭粐鍚嶇О" prop="acquisitiontissuename">
+                <el-input
+                  v-model="formData.acquisitiontissuename"
+                  placeholder="璇疯緭鍏ヨ幏鍙栫粍缁囧悕绉�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+            <!-- 涓婃姤闃舵鎶ュ憡浜� -->
+            <el-col :span="8">
+              <el-form-item label="涓婃姤闃舵鎶ュ憡浜�" prop="reportername">
+                <el-input
+                  v-model="formData.reportername"
+                  placeholder="鎶ュ憡浜哄鍚�"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="鎶ュ憡浜鸿仈绯荤數璇�" prop="reporterphone">
+                <el-input
+                  v-model="formData.reporterphone"
+                  placeholder="鎶ュ憡浜鸿仈绯荤數璇�"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="鎶ュ憡鏃堕棿" prop="reporttime">
+                <el-date-picker
+                  v-model="formData.reporttime"
+                  type="date"
+                  placeholder="閫夋嫨鎶ュ憡鏃堕棿"
+                  value-format="yyyy-MM-dd "
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <!-- 鎶ュ憡淇℃伅鍛� -->
+            <el-col :span="8">
+              <el-form-item label="鎶ュ憡淇℃伅鍛�" prop="infoName">
+                <el-input
+                  v-model="formData.infoName"
+                  placeholder="璇疯緭鍏ユ姤鍛婁俊鎭憳"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="淇℃伅鍛樿仈绯荤數璇�" prop="infophone">
+                <el-input
+                  v-model="formData.infophone"
+                  placeholder="璇疯緭鍏ヤ俊鎭憳鑱旂郴鐢佃瘽"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <!-- <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="鎶ュ憡鏃堕棿" prop="reporttime">
+                <el-date-picker
+                  v-model="formData.reporttime"
+                  type="date"
+                  placeholder="閫夋嫨鎶ュ憡鏃堕棿"
+                  value-format="yyyy-MM-dd "
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="閮ㄩ棬ID" prop="deptid">
+                <el-input
+                  v-model="formData.deptid"
+                  placeholder="璇疯緭鍏ラ儴闂↖D"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row> -->
+        </el-card>
+
         <!-- 鎹愮尞淇℃伅閮ㄥ垎 -->
-        <el-card header="鎹愮尞淇℃伅" class="form-section">
+        <!-- <el-card header="鎹愮尞淇℃伅" class="form-section">
           <el-row :gutter="20">
             <el-col :span="8">
               <el-form-item label="鎹愮尞绫诲埆" prop="donationcategory">
@@ -354,7 +626,7 @@
                   placeholder="璇烽�夋嫨鎹愮尞绫诲埆"
                 >
                   <el-option
-                    v-for="dict in dictOptions.sys_DonationCategory"
+                    v-for="dict in dict.type.sys_DonationCategory || []"
                     :key="dict.value"
                     :label="dict.label"
                     :value="dict.value"
@@ -363,7 +635,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="妗堜緥鏃堕棿" prop="donatetime">
+              <el-form-item label="妗堜緥涓婃姤鏃堕棿" prop="donatetime">
                 <el-date-picker
                   v-model="formData.donatetime"
                   type="datetime"
@@ -386,15 +658,45 @@
             </el-col>
           </el-row>
 
-          <el-row :gutter="20">
-            <el-col :span="12">
-              <el-form-item label="鑾峰彇缁勭粐缂栧彿" prop="acquisitiontissueno">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item align="left" label="绾㈠崄瀛椾細" prop="redorganno">
+
+                <el-select
+                  v-model="formData.redorganname"
+                  placeholder="璇烽�夋嫨绾㈠崄瀛椾細鏈烘瀯鍚嶇О"
+                >
+                  <el-option
+                    v-for="dict in dict.type.sys_redcrossagency"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="鑱旂郴浜�" prop="contactperson">
                 <el-input
-                  v-model="formData.acquisitiontissueno"
-                  placeholder="璇疯緭鍏ヨ幏鍙栫粍缁囩紪鍙�"
+                  v-model="formData.contactperson"
+                  placeholder="璇疯緭鍏ヨ仈绯讳汉"
                 />
               </el-form-item>
             </el-col>
+            <el-col :span="8">
+              <el-form-item label="鑱旂郴鏃堕棿" prop="contacttime">
+                <el-date-picker
+                  v-model="formData.contacttime"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  placeholder="閫夋嫨鎶ュ憡鏃堕棿"
+                  style="width: 100%"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+
             <el-col :span="12">
               <el-form-item label="鑾峰彇缁勭粐鍚嶇О" prop="acquisitiontissuename">
                 <el-input
@@ -404,68 +706,95 @@
               </el-form-item>
             </el-col>
           </el-row>
-        </el-card>
-
-        <!-- 鎶ュ憡淇℃伅閮ㄥ垎 -->
-        <el-card header="鎶ュ憡淇℃伅" class="form-section">
-          <el-row :gutter="20">
-            <el-col :span="8">
-              <el-form-item label="鎶ュ憡浜虹紪鍙�" prop="reporterno">
-                <el-select
-                  v-model="formData.reporterno"
-                  @change="handleReporterChange"
-                >
-                  <el-option
-                    v-for="reporter in reporters"
-                    :key="reporter.reportNo"
-                    :label="reporter.reportName"
-                    :value="reporter.reportNo"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="鎶ュ憡浜哄鍚�" prop="reportername">
-                <el-input
-                  v-model="formData.reportername"
-                  placeholder="鎶ュ憡浜哄鍚�"
-                  :disabled="true"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="鎶ュ憡浜虹數璇�" prop="reporterphone">
-                <el-input
-                  v-model="formData.reporterphone"
-                  placeholder="鎶ュ憡浜鸿仈绯荤數璇�"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row :gutter="20">
-            <el-col :span="12">
-              <el-form-item label="鎶ュ憡鏃堕棿" prop="reporttime">
-                <el-date-picker
-                  v-model="formData.reporttime"
-                  type="datetime"
-                  placeholder="閫夋嫨鎶ュ憡鏃堕棿"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  style="width: 100%"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="閮ㄩ棬ID" prop="deptid">
-                <el-input
-                  v-model="formData.deptid"
-                  placeholder="璇疯緭鍏ラ儴闂↖D"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-card>
+        </el-card> -->
       </el-form>
+
+      <!-- 鎹愮尞鑰呯櫥璁伴樁娈甸檮浠讹紙鍙紪杈戯紝瀛樺偍浜庝翰灞炵‘璁よ〃 assessannex锛� -->
+      <el-card header="鐧昏闃舵闄勪欢" class="form-section">
+        <el-tabs v-model="activeRegisterType" type="card">
+          <el-tab-pane
+            v-for="type in registerAttachmentTypes"
+            :key="type.value"
+            :label="type.label"
+            :name="type.value"
+          >
+            <div class="attachment-header">
+              <span class="upload-title">{{ type.label }}</span>
+              <el-button
+                size="mini"
+                type="primary"
+                icon="el-icon-plus"
+                @click="openUploadDialog(type.value)"
+              >
+                娣诲姞闄勪欢
+              </el-button>
+            </div>
+
+            <el-table
+              :data="getRegisterAttachments(type.value)"
+              size="small"
+              style="width: 100%"
+            >
+              <el-table-column label="鏂囦欢鍚�" min-width="200">
+                <template slot-scope="scope">
+                  <i
+                    class="el-icon-document"
+                    style="color: #409eff; margin-right: 8px"
+                  ></i>
+                  <span>{{ scope.row.fileName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="鏂囦欢绫诲瀷" width="90" align="center">
+                <template slot-scope="scope">
+                  <el-tag size="small">{{
+                    getFileType(scope.row.fileName)
+                  }}</el-tag>
+                </template>
+              </el-table-column>
+              <el-table-column label="鏂囦欢澶у皬" width="90" align="center">
+                <template slot-scope="scope">
+                  <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="涓婁紶鏃堕棿" width="155" align="center">
+                <template slot-scope="scope">
+                  <span>{{
+                    formatDateTime(scope.row.uploadTime || scope.row.createTime)
+                  }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="鎿嶄綔" width="145" align="center">
+                <template slot-scope="scope">
+                  <el-button
+                    size="mini"
+                    type="primary"
+                    @click="handlePreview(scope.row)"
+                  >
+                    棰勮
+                  </el-button>
+                  <el-button
+                    size="mini"
+                    type="danger"
+                    @click="handleRemoveAttachment(type.value, scope.$index)"
+                  >
+                    鍒犻櫎
+                  </el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+
+            <div
+              v-if="getRegisterAttachments(type.value).length === 0"
+              class="empty-attachment"
+            >
+              <el-empty
+                :description="`鏆傛棤${type.label}`"
+                :image-size="80"
+              ></el-empty>
+            </div>
+          </el-tab-pane>
+        </el-tabs>
+      </el-card>
 
       <div slot="footer" class="dialog-footer">
         <el-button @click="handleClose">鍙栨秷</el-button>
@@ -478,6 +807,55 @@
         </el-button>
       </div>
     </el-dialog>
+
+    <!-- 涓婁紶闄勪欢瀵硅瘽妗� -->
+    <el-dialog
+      :title="`涓婁紶${getCurrentTypeLabel()}闄勪欢`"
+      :visible.sync="uploadDialogVisible"
+      width="480px"
+      :close-on-click-modal="false"
+    >
+      <el-upload
+        ref="uploadRef"
+        class="upload-demo"
+        drag
+        :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__tip" slot="tip">
+          鏀寔涓婁紶pdf銆乯pg銆乸ng銆乨oc銆乨ocx鏍煎紡鏂囦欢锛屽崟涓枃浠朵笉瓒呰繃10MB
+        </div>
+      </el-upload>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="uploadDialogVisible = false">鍙栨秷</el-button>
+        <el-button
+          type="primary"
+          @click="submitUpload"
+          :loading="uploadLoading"
+          :disabled="tempFileList.length === 0"
+        >
+          纭涓婁紶
+        </el-button>
+      </span>
+    </el-dialog>
+
+    <!-- 鏂囦欢棰勮寮圭獥 -->
+    <FilePreviewDialog
+      :visible="previewVisible"
+      :file="currentPreviewFile"
+      @close="previewVisible = false"
+      @download="handleDownload"
+    />
   </div>
 </template>
 
@@ -486,17 +864,40 @@
   getDonatebaseinfo,
   updateDonatebaseinfo
 } from "@/api/project/donatebaseinfo";
+import { relativesEdit, relativesAdd, relativesList } from "@/api/businessApi";
 import OrgSelecter from "@/views/project/components/orgselect";
 import LiAreaSelect from "@/components/Address";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import { getToken } from "@/utils/auth";
 
 export default {
   name: "EditCaseModal",
   components: {
     OrgSelecter,
-    LiAreaSelect
+    LiAreaSelect,
+    FilePreviewDialog
   },
 
-  dicts: ["sys_bloodtype_rhd", "sys_BloodType"],
+  // 娣诲姞鎵�鏈夐渶瑕佺殑瀛楀吀绫诲瀷
+  dicts: [
+    "sys_redcrossagency",
+    "sys_bloodtype_rhd",
+    "sys_BloodType",
+    "sys_user_sex",
+    "sys_IDType",
+    "sys_nation",
+    "sys_education",
+    "sys_occupation",
+    "sys_DiseaseType",
+    "sys_Infectious",
+    "sys_patientstate",
+    "sys_OtherCases",
+    "sys_SelfWill",
+    "sys_Kinship",
+    "sys_FamilyRelation",
+    "sys_InfoSources",
+    "sys_DonationCategory"
+  ],
 
   props: {
     visible: {
@@ -523,9 +924,30 @@
       residenceAddress: {},
       registerAddress: {},
       formData: this.getDefaultFormData(),
+      // 鐧昏闃舵闄勪欢锛堝彲缂栬緫锛屽瓨鍌ㄤ簬浜插睘纭琛� assessannex锛�
+      registerAttachmentTypes: [
+        { value: "1", label: "浜轰綋鍣ㄥ畼娼滃湪鎹愮尞鑰呯櫥璁拌〃闄勪欢" },
+        { value: "5", label: "璇佷欢鐓�" },
+        { value: "6", label: "鐤剧梾璇婃柇娌荤枟" }
+      ],
+      registerAttachmentData: { "1": [], "5": [], "6": [] },
+      otherAttachments: [],
+      confirmationRecord: null,
+      activeRegisterType: "1",
+      uploadAction: process.env.VUE_APP_BASE_API + "/common/upload",
+      headers: { Authorization: "Bearer " + getToken() },
+      uploadDialogVisible: false,
+      uploadLoading: false,
+      tempFileList: [],
+      currentUploadType: "",
+      previewVisible: false,
+      currentPreviewFile: null,
       rules: {
         name: [
           { required: true, message: "璇疯緭鍏ユ崘鐚�呭鍚�", trigger: "blur" }
+        ],
+        caseNo: [
+          { required: true, message: "璇疯緭鍏ユ崘鐚�呯紪鍙�", trigger: "blur" }
         ],
         sex: [{ required: true, message: "璇烽�夋嫨鎬у埆", trigger: "change" }],
         idcardtype: [
@@ -546,11 +968,17 @@
         bloodtype: [
           { required: true, message: "璇烽�夋嫨琛�鍨�", trigger: "change" }
         ],
-        donatetime: [
-          { required: true, message: "璇烽�夋嫨妗堜緥鏃堕棿", trigger: "change" }
-        ],
+        // donatetime: [
+        //   { required: true, message: "璇烽�夋嫨妗堜緥鏃堕棿", trigger: "change" }
+        // ],
         reporttime: [
           { required: true, message: "璇烽�夋嫨鎶ュ憡鏃堕棿", trigger: "change" }
+        ],
+        residenceaddress: [
+          { required: true, message: "璇疯緭鍏ョ幇灞呬綇鍦拌缁嗗湴鍧�", trigger: "blur" }
+        ],
+        registeraddress: [
+          { required: true, message: "璇疯緭鍏ヤ綇鍧�璇︾粏鍦板潃", trigger: "blur" }
         ]
       }
     };
@@ -564,12 +992,12 @@
         return this.visible;
       },
       set(value) {
-        this.$emit('update:visible', value);
+        this.$emit("update:visible", value);
         if (!value) {
           this.handleClose();
         }
       }
-    }
+    },
   },
   watch: {
     visible(newVal) {
@@ -592,15 +1020,15 @@
     }
   },
   created() {
-    console.log('EditCaseModal created');
-    console.log('visible:', this.visible);
-    console.log('editData:', this.editData);
+    console.log("EditCaseModal created");
+    console.log("visible:", this.visible);
+    console.log("editData:", this.editData);
   },
   mounted() {
-    console.log('EditCaseModal mounted');
-    console.log('visible:', this.visible);
-    console.log('editData:', this.editData);
-    console.log('isEdit:', this.isEdit);
+    console.log("EditCaseModal mounted");
+    console.log("visible:", this.visible);
+    console.log("editData:", this.editData);
+    console.log("isEdit:", this.isEdit);
   },
   methods: {
     getDefaultFormData() {
@@ -642,21 +1070,38 @@
         illnessoverview: null,
         coordinatorNo: null,
         coordinatorName: null,
+        diseasetype: [],
+        infectious: [],
+        patientstate: [],
+        othercases: [],
 
         // 鍦板潃淇℃伅
         residenceaddress: null,
         residenceprovince: null,
         residencecity: null,
+        residencetown: null,
         registeraddress: null,
         registerprovince: null,
         registercity: null,
+        registertown: null,
+
+        // 鎰忔効鍜屼翰灞炰俊鎭�
+        selfwill: [],
+        kinship: [],
+        majorrelatives: null,
+        familyrelations: null,
+        infosources: [],
+        infoName: null,
+        infophone: null,
+        redorganno: null,
+        contactperson: null,
+        contacttime: null,
 
         // 鎹愮尞淇℃伅
         donationcategory: null,
         donatetime: null,
         recordstate: "0",
-        acquisitiontissueno: "ZJOPO",
-        acquisitiontissuename: "娴欐睙鐪佷汉浣撳櫒瀹樿幏鍙栫粍缁�",
+        acquisitiontissuename: "闈掑矝澶у闄勫睘鍖婚櫌",
 
         // 鎶ュ憡淇℃伅
         reporterno: null,
@@ -665,32 +1110,32 @@
         reporttime: null,
         deptid: null,
 
-        // 鏁扮粍瀛楁
-        diseasetype: [],
-        infectious: [],
-        selfwill: [],
-        othercases: [],
-        infosources: [],
-        kinship: [],
-        patientstate: []
+        // 鍏朵粬瀛楁
+        diseasetypeOther: null,
+        infectiousOther: null,
+        kinshipOther: null,
+        infosourcesOther: null
       };
     },
 
     async initForm() {
-      console.log('鍒濆鍖栬〃鍗曪紝isEdit:', this.isEdit);
+      console.log("鍒濆鍖栬〃鍗曪紝isEdit:", this.isEdit);
       try {
         if (this.isEdit && this.editData && this.editData.id) {
-          console.log('鍔犺浇缂栬緫鏁版嵁锛宨d:', this.editData.id);
+          console.log("鍔犺浇缂栬緫鏁版嵁锛宨d:", this.editData.id);
           await this.loadEditData();
         } else {
-          console.log('鏂板妯″紡锛屽垵濮嬪寲琛ㄥ崟');
+          console.log("鏂板妯″紡锛屽垵濮嬪寲琛ㄥ崟");
           this.formData = this.getDefaultFormData();
           this.formData.nationality = "涓浗";
           this.formData.bloodtype = "0";
           this.formData.rhyin = "0";
           this.formData.recordstate = "0";
-          this.formData.acquisitiontissueno = "ZJOPO";
-          this.formData.acquisitiontissuename = "娴欐睙鐪佷汉浣撳櫒瀹樿幏鍙栫粍缁�";
+          this.formData.acquisitiontissuename = "闈掑矝澶у闄勫睘鍖婚櫌";
+
+          // 璁剧疆淇℃伅鍛樺拰鐢佃瘽榛樿鍊�
+          this.formData.infoName = "瀛欐枃鏈�";
+          this.formData.infophone = "18661808259";
         }
       } catch (error) {
         console.error("鍒濆鍖栬〃鍗曞け璐�:", error);
@@ -707,8 +1152,10 @@
     async loadEditData() {
       try {
         const response = await getDonatebaseinfo(this.editData.id);
+        response.data.firstMedicalInstitution =
+          response.data.treatmenthospitalname;
         const data = response.data;
-        console.log('鍔犺浇鍒扮殑鏁版嵁:', data);
+        console.log("鍔犺浇鍒扮殑鏁版嵁:", data);
 
         // 澶勭悊鏁扮粍瀛楁
         const arrayFields = [
@@ -721,34 +1168,41 @@
           "patientstate"
         ];
         arrayFields.forEach(field => {
-          if (data[field]) {
+          if (data[field] && typeof data[field] === "string") {
             data[field] = data[field].split(",");
-          } else {
+          } else if (!data[field]) {
             data[field] = [];
           }
         });
 
         this.formData = { ...this.getDefaultFormData(), ...data };
-        console.log('鍚堝苟鍚庣殑formData:', this.formData);
+        console.log("鍚堝苟鍚庣殑formData:", this.formData);
+        this.formData.infoName = "瀛欐枃鏈�";
+        this.formData.infophone = "18661808259";
+        if (!this.formData.currentMedicalInstitution)
+          this.formData.currentMedicalInstitution = "闈掑矝澶у闄勫睘鍖婚櫌";
 
-        // 璁剧疆鍦板潃淇℃伅
-        if (data.residenceprovince) {
+        if (!this.formDatacurrentDept) this.formData.currentDept = "鍣ㄥ畼鎹愮尞绉�";
+        // 鏍规嵁杩斿洖鏁版嵁璁剧疆鍦板潃灞曠ず淇℃伅
+        if (data.residenceprovincename) {
           this.residenceAddress = {
             sheng: data.residenceprovincename,
-            shi: data.residencecityname,
-            qu: data.residencetownname
+            shi: data.residencecountyname,
+            qu: data.residencecommunityname
           };
         }
-
+        // 鎴风睄鍦板潃
         if (data.registerprovince) {
           this.registerAddress = {
-            sheng: data.registerprovincename,
+            sheng: data.registerprovince,
             shi: data.registercityname,
-            qu: data.registertownname
+            qu: data.registercommunityname
           };
         }
+        console.log(this.registerAddress, "registerAddress12");
 
         this.calculateAge(data.birthday);
+        await this.loadRegisterAttachments();
       } catch (error) {
         console.error("鑾峰彇妗堜緥鏁版嵁澶辫触:", error);
         this.$message.error("鑾峰彇妗堜緥鏁版嵁澶辫触");
@@ -852,40 +1306,385 @@
     },
 
     handleResidenceAddressChange(address) {
-      this.formData.residenceprovince = address.sheng;
-      this.formData.residencecity = address.shi;
-      this.formData.residencetown = address.qu;
+      this.formData.residenceprovincename = address.sheng;
+      this.formData.residencecountyname = address.shi;
+      this.formData.residencecommunityname = address.qu;
+
+      // 姣忔鐜颁綇鍧�鐪佸競鍖哄彉鍖栨椂锛屽鏋滄埛绫嶅湴鍧�鐨勭渷甯傚尯瀹屽叏涓虹┖锛屽垯鑷姩濉厖
+      const registerProvinceEmpty = !this.formData.registerprovince;
+      const registerCityEmpty = !this.formData.registercityname;
+      const registerTownEmpty = !this.formData.registercommunityname;
+
+      if (registerProvinceEmpty || registerCityEmpty || registerTownEmpty) {
+        this.formData.registerprovince = address.sheng;
+        this.formData.registercityname = address.shi;
+        this.formData.registercommunityname = address.qu;
+        this.registerAddress = {
+          sheng: address.sheng,
+          shi: address.shi,
+          qu: address.qu
+        };
+      }
+    },
+    // 鐜板眳浣忓湴璇︾粏鍦板潃澶辩劍鏃讹紝濡傛灉浣忓潃璇︾粏鍦板潃涓虹┖鍒欒嚜鍔ㄥ~鍏�
+    handleResidenceDetailBlur() {
+      if (this.formData.residenceaddress && !this.formData.registeraddress) {
+        this.formData.registeraddress = this.formData.residenceaddress;
+      }
+    },
+    handleRegisterAddressChange(address) {
+      console.log(this.registerAddress, "registerAddress11");
+
+      this.formData.registerprovince = address.sheng;
+      this.formData.registercityname = address.shi;
+      this.formData.registercommunityname = address.qu;
     },
 
-    handleRegisterAddressChange(address) {
-      this.formData.registerprovince = address.sheng;
-      this.formData.registercity = address.shi;
-      this.formData.registertown = address.qu;
+    // 鍔犺浇鐧昏闃舵闄勪欢锛堣鍙栦翰灞炵‘璁よ〃 assessannex锛屼笌纭璇︽儏椤靛叡鐢ㄥ悓涓�浠芥暟鎹級
+    // 鎹愮尞纭淇℃伅缁熶竴閫氳繃 confirmationBaseInfoList 鎺ュ彛鑾峰彇
+    async loadRegisterAttachments() {
+      const infoid = this.editData && this.editData.id;
+      if (!infoid) {
+        this.resetAttachments();
+        return;
+      }
+      try {
+        const res = await relativesList({ infoid });
+        const record = this.parseConfirmationBaseInfo(res);
+        if (record && record.id) {
+          this.confirmationRecord = record;
+          this.parseAssessannex(record.assessannex);
+        } else {
+          this.confirmationRecord = null;
+          this.resetAttachments();
+        }
+      } catch (e) {
+        console.warn("鑾峰彇浜插睘纭闄勪欢澶辫触:", e);
+        this.resetAttachments();
+      }
+    },
+
+    // 瑙f瀽 confirmationBaseInfoList 杩斿洖鐨勭‘璁ゅ熀纭�淇℃伅锛堝吋瀹规暟缁� / rows / 鍗曞璞$粨鏋勶級
+    parseConfirmationBaseInfo(res) {
+      if (!res || res.code !== 200) return null;
+      const data = res.data;
+      if (!data) return null;
+      if (Array.isArray(data)) return data[0] || null;
+      if (Array.isArray(data.rows)) return data.rows[0] || null;
+      if (Array.isArray(data.list)) return data.list[0] || null;
+      return data;
+    },
+
+    resetAttachments() {
+      Object.keys(this.registerAttachmentData).forEach(key => {
+        this.registerAttachmentData[key] = [];
+      });
+      this.otherAttachments = [];
+    },
+
+    parseAssessannex(assessannex) {
+      this.resetAttachments();
+      if (!assessannex) return;
+      try {
+        const list =
+          typeof assessannex === "string" ? JSON.parse(assessannex) : assessannex;
+        if (!Array.isArray(list)) return;
+        list.forEach(item => {
+          const type = String(item.type || "");
+          if (this.registerAttachmentData[type]) {
+            this.registerAttachmentData[type].push(item);
+          } else {
+            this.otherAttachments.push(item);
+          }
+        });
+      } catch (e) {
+        console.warn("瑙f瀽assessannex澶辫触:", e);
+      }
+    },
+
+    getRegisterAttachments(type) {
+      return this.registerAttachmentData[type] || [];
+    },
+
+    // 搴忓垪鍖栫櫥璁伴樁娈甸檮浠讹紝骞朵繚鐣欑‘璁ら樁娈电瓑鍏朵粬闄勪欢
+    serializeAssessannex() {
+      const all = [...this.otherAttachments];
+      this.registerAttachmentTypes.forEach(t => {
+        all.push(...(this.registerAttachmentData[t.value] || []));
+      });
+      return JSON.stringify(all);
+    },
+
+    getCurrentTypeLabel() {
+      const type = this.registerAttachmentTypes.find(
+        t => t.value === this.currentUploadType
+      );
+      return type ? type.label : "";
+    },
+
+    openUploadDialog(type) {
+      this.currentUploadType = type;
+      this.tempFileList = [];
+      this.uploadDialogVisible = true;
+      this.$nextTick(() => {
+        if (this.$refs.uploadRef) {
+          this.$refs.uploadRef.clearFiles();
+        }
+      });
+    },
+
+    beforeUpload(file) {
+      const allowedTypes = [
+        "application/pdf",
+        "image/jpeg",
+        "image/png",
+        "application/msword",
+        "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+      ];
+      const maxSize = 10 * 1024 * 1024;
+      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");
+      if (!isTypeOk) {
+        this.$message.error(
+          "鏂囦欢鏍煎紡涓嶆敮鎸侊紝璇蜂笂浼爌df銆乯pg銆乸ng銆乨oc鎴杁ocx鏍煎紡鏂囦欢"
+        );
+        return false;
+      }
+      if (file.size > maxSize) {
+        this.$message.error("鏂囦欢澶у皬涓嶈兘瓒呰繃10MB");
+        return false;
+      }
+      return true;
+    },
+
+    handleFileChange(file, fileList) {
+      this.tempFileList = fileList;
+    },
+
+    handleTempRemove(file, fileList) {
+      this.tempFileList = fileList;
+    },
+
+    handleUploadSuccess(response, file) {
+      if (response.code !== 200) {
+        this.$message.error(response.msg || "涓婁紶澶辫触");
+        return;
+      }
+      const newAttachment = {
+        id: Date.now(),
+        fileName: file.name,
+        fileUrl: response.url,
+        fileSize: file.size,
+        fileType: this.getFileExtension(file.name),
+        type: this.currentUploadType,
+        uploadTime: this.getCurrentTime(),
+        uploader: "褰撳墠鐢ㄦ埛"
+      };
+      if (this.registerAttachmentData[this.currentUploadType]) {
+        this.registerAttachmentData[this.currentUploadType].push(newAttachment);
+      }
+      this.$message.success("涓婁紶鎴愬姛");
+      this.uploadLoading = false;
+      this.uploadDialogVisible = false;
+      this.tempFileList = [];
+    },
+
+    submitUpload() {
+      if (this.tempFileList.length === 0) {
+        this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
+        return;
+      }
+      this.uploadLoading = true;
+      this.$refs.uploadRef.submit();
+    },
+
+    handleRemoveAttachment(type, index) {
+      this.$confirm("纭畾瑕佸垹闄よ繖涓檮浠跺悧锛�", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning"
+      })
+        .then(() => {
+          const container = this.registerAttachmentData[type];
+          if (container && container[index]) {
+            container.splice(index, 1);
+            this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+          }
+        })
+        .catch(() => {});
+    },
+
+    handlePreview(file) {
+      this.currentPreviewFile = {
+        fileName: file.fileName,
+        fileUrl: file.fileUrl,
+        fileType: this.getFileType(file.fileName)
+      };
+      this.previewVisible = true;
+    },
+
+    handleDownload(file) {
+      const fileUrl = 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 = this.getFileExtension(fileName);
+      const imageTypes = ["jpg", "jpeg", "png"];
+      const pdfTypes = ["pdf"];
+      const officeTypes = ["doc", "docx"];
+      if (imageTypes.includes(extension)) return "image";
+      if (pdfTypes.includes(extension)) return "pdf";
+      if (officeTypes.includes(extension)) return "office";
+      return "other";
+    },
+
+    getFileExtension(filename) {
+      return filename
+        .split(".")
+        .pop()
+        .toLowerCase();
+    },
+
+    formatFileSize(size) {
+      if (!size) return "0 B";
+      const k = 1024;
+      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];
+    },
+
+    formatDateTime(dateTime) {
+      if (!dateTime) return "";
+      try {
+        const date = new Date(dateTime);
+        if (isNaN(date.getTime())) return dateTime;
+        const year = date.getFullYear();
+        const month = String(date.getMonth() + 1).padStart(2, "0");
+        const day = String(date.getDate()).padStart(2, "0");
+        const hours = String(date.getHours()).padStart(2, "0");
+        const minutes = String(date.getMinutes()).padStart(2, "0");
+        return `${year}-${month}-${day} ${hours}:${minutes}`;
+      } catch (error) {
+        return dateTime;
+      }
+    },
+
+    getCurrentTime() {
+      const now = new Date();
+      return `${now.getFullYear()}-${(now.getMonth() + 1)
+        .toString()
+        .padStart(2, "0")}-${now
+        .getDate()
+        .toString()
+        .padStart(2, "0")} ${now
+        .getHours()
+        .toString()
+        .padStart(2, "0")}:${now
+        .getMinutes()
+        .toString()
+        .padStart(2, "0")}:${now
+        .getSeconds()
+        .toString()
+        .padStart(2, "0")}`;
+    },
+
+    // 淇濆瓨鐧昏闃舵闄勪欢鍒颁翰灞炵‘璁よ〃 assessannex
+    async saveAssessannex() {
+      const infoid = this.formData.id;
+      if (!infoid) return;
+      const assessannex = this.serializeAssessannex();
+      try {
+        if (this.confirmationRecord && this.confirmationRecord.id) {
+          // 宸插瓨鍦ㄧ‘璁よ〃璁板綍锛氫粎鏇存柊闄勪欢瀛楁锛屼繚鐣欏叾浣欎俊鎭�
+          await relativesEdit({ ...this.confirmationRecord, assessannex });
+        } else {
+          // 纭琛ㄨ褰曚笉瀛樺湪锛氭柊澧炲畬鏁磋褰曪紙鎼哄甫鐧昏琛ㄥ熀纭�淇℃伅锛�
+          await relativesAdd(this.buildConfirmationRecord(infoid, assessannex));
+        }
+      } catch (e) {
+        console.warn("淇濆瓨鐧昏闃舵闄勪欢澶辫触:", e);
+        this.$message.warning("鐧昏闃舵闄勪欢淇濆瓨澶辫触锛岃閲嶈瘯");
+      }
+    },
+
+    // 鏋勫缓鏂板浜插睘纭琛ㄨ褰曪細鎼哄甫鎹愮尞鑰呭熀纭�淇℃伅锛岃�岄潪浠� infoid + assessannex
+    buildConfirmationRecord(infoid, assessannex) {
+      const f = this.formData;
+      return {
+        infoid,
+        caseNo: f.caseNo || "",
+        name: f.name || "",
+        sex: f.sex || "",
+        age: f.age != null ? f.age : "",
+        diagnosisname: f.diagnosisname || "",
+        treatmenthospitalname: f.treatmenthospitalname || "",
+        relativeconfirmationsign: "0",
+        state: 2,
+        assessannex
+      };
     },
 
     handleClose() {
-      console.log('鍏抽棴寮规');
+      console.log("鍏抽棴寮规");
       this.isEdit = false;
       this.submitLoading = false;
       this.formData = this.getDefaultFormData();
       this.residenceAddress = {};
       this.registerAddress = {};
+      this.resetAttachments();
       this.$emit("closed");
     },
 
     async handleSubmit() {
       const valid = await this.$refs.formRef.validate().catch(() => false);
-      if (!valid) return;
-
+      if (!valid) {
+        this.$message.error("璇风‘璁よ〃鍗曞繀濉俊鎭畬鏁村悗鎻愪氦");
+        return;
+      }
+      // 棰濆鏍¢獙鐜板眳浣忓湴鍜屼綇鍧�鐨勭渷甯傚尯鏄惁宸查�夋嫨
+      if (
+        !this.formData.residenceprovincename ||
+        !this.formData.residencecountyname
+      ) {
+        this.$message.error("璇峰畬鍠勭幇灞呬綇鍦扮殑鐪佸競鍖轰俊鎭�");
+        return;
+      }
+      if (!this.formData.registerprovince || !this.formData.registercityname) {
+        this.$message.error("璇峰畬鍠勪綇鍧�鐨勭渷甯傚尯淇℃伅");
+        return;
+      }
       this.submitLoading = true;
       try {
         const submitData = this.processSubmitData();
-        console.log('鎻愪氦鏁版嵁:', submitData);
+        console.log("鎻愪氦鏁版嵁:", submitData);
 
         const result = await updateDonatebaseinfo(submitData);
         if (result.code === 200) {
+          await this.saveAssessannex();
           this.$message.success(this.isEdit ? "鏇存柊鎴愬姛" : "鏂板鎴愬姛");
           this.$emit("success", result.data);
+          console.log(1122);
+
           this.handleClose();
         } else {
           this.$message.error(result.msg || "鎿嶄綔澶辫触");
@@ -935,6 +1734,11 @@
           "YYYY-MM-DD HH:mm:ss"
         );
       }
+      if (data.contacttime) {
+        data.contacttime = this.$moment(data.contacttime).format(
+          "YYYY-MM-DD HH:mm:ss"
+        );
+      }
 
       // 璁剧疆榛樿鍊�
       if (!data.recordstate) {
@@ -945,7 +1749,7 @@
       }
 
       return data;
-    }
+    },
   }
 };
 </script>
@@ -954,7 +1758,25 @@
 .form-section {
   margin-bottom: 20px;
 }
+
 .form-section:last-child {
   margin-bottom: 0;
 }
+
+.attachment-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 12px;
+}
+
+.upload-title {
+  font-size: 14px;
+  font-weight: 600;
+  color: #303133;
+}
+
+.empty-attachment {
+  padding: 12px 0;
+}
 </style>

--
Gitblit v1.9.3