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

---
 pagesSub/case/CaseDetails.vue | 2210 +++++++++++++++++++++++++----------------------------------
 1 files changed, 927 insertions(+), 1,283 deletions(-)

diff --git a/pagesSub/case/CaseDetails.vue b/pagesSub/case/CaseDetails.vue
index 465e8ab..0b149ff 100644
--- a/pagesSub/case/CaseDetails.vue
+++ b/pagesSub/case/CaseDetails.vue
@@ -1,54 +1,44 @@
 <template>
   <view class="case-report-container">
-    <!-- 琛ㄥ崟鍐呭 -->
-
     <view class="form-content">
       <view class="page-header">
         <text class="page-title">{{
           isEditMode ? "淇敼妗堜緥" : "涓婃姤妗堜緥"
         }}</text>
       </view>
-      <!-- 鍩烘湰淇℃伅鍗$墖 -->
+
+      <!-- 妗堜緥鍩烘湰淇℃伅鍗$墖 -->
       <view class="form-section">
         <view class="section-header">
           <view class="section-icon">馃搵</view>
-          <text class="section-title">鎹愮尞妗堜緥鍩烘湰淇℃伅</text>
+          <text class="section-title">妗堜緥鍩烘湰淇℃伅</text>
         </view>
-
         <view class="form-grid">
-          <!-- 淇敼鍚庯細娌荤枟鍖婚櫌杈撳叆妗� -->
-          <!-- <view class="form-item">
-              <text class="item-label required">娌荤枟鍖婚櫌</text>
-              <u-input
-                v-model="form.treatmenthospitalname"
-                placeholder="璇疯緭鍏ユ不鐤楀尰闄㈠悕绉�"
-                maxlength="100"
-                class="custom-input"
-              />
-            </view> -->
-
-          <!-- 鏂板锛氫笂鎶ュ尰闄� -->
+          <view class="form-item">
+            <text class="item-label">妗堜緥缂栧彿</text>
+            <u-input
+              v-model="form.caseNo"
+              placeholder="绯荤粺鑷姩鐢熸垚"
+              disabled
+              :disabledColor="disabledColor"
+            />
+          </view>
           <view class="form-item">
             <text class="item-label">涓婃姤鍖婚櫌</text>
             <u-input
               v-model="form.toHospital"
               placeholder="璇疯緭鍏ヤ笂鎶ュ尰闄�"
               maxlength="100"
-              class="custom-input"
             />
           </view>
-
-          <!-- 鏂板锛氶儴闂ㄥ悕绉� -->
           <view class="form-item">
             <text class="item-label">绉戝鍚嶇О</text>
             <u-input
               v-model="form.deptName"
               placeholder="璇疯緭鍏ヤ笂鎶ョ瀹�"
               maxlength="50"
-              class="custom-input"
             />
           </view>
-
           <view class="form-item">
             <text class="item-label required">鎮h�呭鍚�</text>
             <u-input
@@ -56,76 +46,65 @@
               v-model="form.name"
               placeholder="璇疯緭鍏ュ鍚�"
               maxlength="20"
-              class="custom-input"
             />
           </view>
         </view>
       </view>
 
-      <!-- 涓汉淇℃伅鍗$墖 -->
+      <!-- 涓汉淇℃伅鍗$墖锛堟崘鐚汉淇℃伅锛� -->
       <view class="form-section">
         <view class="section-header">
           <view class="section-icon">馃懁</view>
-          <text class="section-title">鎹愮尞浜轰俊鎭�</text>
+          <text class="section-title">涓汉淇℃伅</text>
         </view>
-
         <view class="form-grid">
-          <!-- 鏀归�犲悗鐨勬皯鏃忛�夋嫨 -->
           <view class="form-item">
             <text class="item-label">姘戞棌</text>
             <picker
               mode="selector"
-              :range="nationLabels"
+              :range="nationList"
               :value="nationIndex"
               @change="onNationChange"
             >
               <view class="picker">
-                <text>{{ currentNation }}</text>
+                <text>{{ currentNationText || "璇烽�夋嫨姘戞棌" }}</text>
                 <text class="icon-arrow">鈥�</text>
               </view>
             </picker>
           </view>
-
           <view class="form-item">
             <text class="item-label">鍥界睄</text>
             <u-input
               type="text"
               v-model="form.nationality"
               placeholder="璇疯緭鍏ュ浗绫�"
-              class="custom-input"
             />
           </view>
-
-          <!-- 鏀归�犲悗鐨勮瘉浠剁被鍨嬮�夋嫨 -->
           <view class="form-item">
             <text class="item-label">璇佷欢绫诲瀷</text>
             <picker
               mode="selector"
-              :range="idCardTypeLabels"
+              :range="idCardTypeList"
               :value="idCardTypeIndex"
               @change="onIdCardTypeChange"
             >
               <view class="picker">
-                <text>{{ currentIdCardType }}</text>
+                <text>{{ currentIdCardTypeText || "璇烽�夋嫨璇佷欢绫诲瀷" }}</text>
                 <text class="icon-arrow">鈥�</text>
               </view>
             </picker>
           </view>
-
           <view class="form-item">
-            <text class="item-label required">璇佷欢鍙风爜</text>
+            <text class="item-label">璇佷欢鍙风爜</text>
             <u-input
               type="idcard"
               v-model="form.idcardno"
               placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�"
               maxlength="18"
-              class="custom-input"
               @blur="onIdCardChange"
             />
             <text class="error-text" v-if="idCardError">{{ idCardError }}</text>
           </view>
-
-          <!-- 鏀归�犲悗鐨勬�у埆閫夋嫨 -->
           <view class="form-item">
             <text class="item-label">鎬у埆</text>
             <view class="radio-options">
@@ -133,7 +112,7 @@
                 v-for="gender in genderOptions"
                 :key="gender.value"
                 class="option-item"
-                :class="{ active: form.sex === gender.value }"
+                :class="{ active: form.sex == gender.value }"
                 @click="form.sex = gender.value"
               >
                 <text class="radio-dot"></text>
@@ -141,8 +120,6 @@
               </view>
             </view>
           </view>
-
-          <!-- 鏀归�犲悗鐨勫嚭鐢熸棩鏈熼�夋嫨 -->
           <view class="form-item">
             <text class="item-label">鍑虹敓鏃ユ湡</text>
             <picker
@@ -156,17 +133,113 @@
               </view>
             </picker>
           </view>
-
+          <!-- ===== 淇敼锛氬勾榫勬敼涓哄彲鎵嬪姩杈撳叆 + 鍗曚綅閫夋嫨 ===== -->
           <view class="form-item">
             <text class="item-label">骞撮緞</text>
+            <view style="display: flex; gap: 10rpx; align-items: center">
+              <u-input
+                v-model="form.age"
+                placeholder="杈撳叆鎴栬嚜鍔ㄨ绠�"
+                type="number"
+                style="flex: 1"
+              />
+              <picker
+                mode="selector"
+                :range="ageUnitList"
+                :value="ageUnitIndex"
+                @change="onAgeUnitChange"
+                style="flex: 0 0 160rpx"
+              >
+                <view
+                  class="picker"
+                  style="
+                    height: 86rpx;
+                    background: #fafafa;
+                    border-radius: 12rpx;
+                    padding: 0 16rpx;
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-between;
+                    border: 2rpx solid #e5e5e7;
+                  "
+                >
+                  <text>{{ currentAgeUnitText || "鍗曚綅" }}</text>
+                  <text class="icon-arrow">鈥�</text>
+                </view>
+              </picker>
+            </view>
+          </view>
+          <!-- ===== 淇敼缁撴潫 ===== -->
+          <view class="form-item">
+            <text class="item-label">鑱旂郴鐢佃瘽</text>
             <u-input
-              v-model="ageDisplay"
-              placeholder="鑷姩璁$畻"
-              disabled
-              :disabledColor="disabledColor"
-              border="none"
+              v-model="form.phone"
+              placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+              type="number"
             />
           </view>
+          <view class="form-item">
+            <text class="item-label">瀛﹀巻</text>
+            <picker
+              mode="selector"
+              :range="educationList"
+              :value="educationIndex"
+              @change="onEducationChange"
+            >
+              <view class="picker">
+                <text>{{ currentEducationText || "璇烽�夋嫨瀛﹀巻" }}</text>
+                <text class="icon-arrow">鈥�</text>
+              </view>
+            </picker>
+          </view>
+          <view class="form-item">
+            <text class="item-label">鑱屼笟</text>
+            <picker
+              mode="selector"
+              :range="occupationList"
+              :value="occupationIndex"
+              @change="onOccupationChange"
+            >
+              <view class="picker">
+                <text>{{ currentOccupationText || "璇烽�夋嫨鑱屼笟" }}</text>
+                <text class="icon-arrow">鈥�</text>
+              </view>
+            </picker>
+          </view>
+          <view class="form-item">
+            <text class="item-label">绫嶈疮</text>
+            <u-input v-model="form.nativeplace" placeholder="璇疯緭鍏ョ睄璐�" />
+          </view>
+        </view>
+      </view>
+
+      <!-- 鍦板潃淇℃伅鍗$墖 -->
+      <view class="form-section">
+        <view class="section-header">
+          <view class="section-icon">馃搷</view>
+          <text class="section-title">鍦板潃淇℃伅</text>
+        </view>
+
+        <view class="address-block">
+          <text class="address-label">鐜颁綇鍦板潃</text>
+          <area-select v-model="residenceAddress" @change="onResidenceChange" />
+          <u-input
+            class="address-detail-input"
+            v-model="form.residenceaddress"
+            placeholder="璇疯緭鍏ヨ缁嗗湴鍧�"
+            border="none"
+          />
+        </view>
+
+        <view class="address-block">
+          <text class="address-label">鎴风睄鍦板潃</text>
+          <area-select v-model="registerAddress" @change="onRegisterChange" />
+          <u-input
+            class="address-detail-input"
+            v-model="form.registeraddress"
+            placeholder="璇疯緭鍏ヨ缁嗗湴鍧�"
+            border="none"
+          />
         </view>
       </view>
 
@@ -176,15 +249,10 @@
           <view class="section-icon">馃彞</view>
           <text class="section-title">鍖荤枟淇℃伅</text>
         </view>
-
         <view class="form-grid">
           <view class="form-item">
             <text class="item-label">浣忛櫌鍙�</text>
-            <u-input
-              v-model="form.inpatientno"
-              placeholder="璇疯緭鍏ヤ綇闄㈠彿"
-              border="none"
-            />
+            <u-input v-model="form.inpatientno" placeholder="璇疯緭鍏ヤ綇闄㈠彿" />
           </view>
           <view class="form-item">
             <text class="item-label">GCS璇勫垎</text>
@@ -193,11 +261,9 @@
               type="number"
               maxlength="1"
               placeholder="鈮�7"
-              border="none"
               @blur="handleGcsBlur"
             />
           </view>
-
           <view class="form-item full-width">
             <text class="item-label required">鐤剧梾璇婃柇</text>
             <u-textarea
@@ -205,26 +271,8 @@
               placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�"
               count
               maxlength="200"
-              :customStyle="textareaStyle(!form.diagnosisname)"
             />
           </view>
-          <!-- <view class="form-item">
-              <text class="item-label">鏄惁闇�瑕佽浆杩�</text>
-              <view class="radio-group horizontal">
-                <view
-                  v-for="bloodType in isTransportOptions"
-                  :key="bloodType.value"
-                  class="radio-item"
-                  @click="form.isTransport = bloodType.value"
-                >
-                  <view
-                    class="radio-dot"
-                    :class="{ active: form.isTransport === bloodType.value }"
-                  ></view>
-                  <text class="radio-label">{{ bloodType.label }}</text>
-                </view>
-              </view>
-            </view> -->
           <view class="form-item">
             <text class="item-label">琛�鍨�</text>
             <view class="radio-group horizontal">
@@ -236,7 +284,7 @@
               >
                 <view
                   class="radio-dot"
-                  :class="{ active: form.bloodType === bloodType.value }"
+                  :class="{ active: form.bloodType == bloodType.value }"
                 ></view>
                 <text class="radio-label">{{ bloodType.label }}</text>
               </view>
@@ -253,7 +301,7 @@
               >
                 <view
                   class="radio-dot"
-                  :class="{ active: form.rhYin === rh.value }"
+                  :class="{ active: form.rhYin == rh.value }"
                 ></view>
                 <text class="radio-label">{{ rh.label }}</text>
               </view>
@@ -263,9 +311,10 @@
             <text class="item-label">浼犳煋鐥�</text>
             <view class="checkbox-group single-line">
               <view
-                v-for="disease in infectiousDiseaselist"
+                v-for="disease in infectiousList"
                 :key="disease.value"
                 class="checkbox-item"
+                :class="{ active: isInfectiousSelected(disease.value) }"
                 @click="toggleInfectious(disease.value)"
               >
                 <view
@@ -287,7 +336,6 @@
             <u-input
               v-model="form.infectiousOther"
               placeholder="璇疯緭鍏ュ叾浠栦紶鏌撶梾"
-              border="none"
             />
           </view>
         </view>
@@ -299,71 +347,62 @@
           <view class="section-icon">馃摓</view>
           <text class="section-title">鑱旂郴淇℃伅</text>
         </view>
-
         <view class="form-grid">
-          <view class="form-item">
+          <!-- <view class="form-item">
             <text class="item-label">ICU璇勪及鍖荤敓</text>
-            <u-input
-              v-model="form.icuDoctor"
-              placeholder="璇疯緭鍏CU璇勪及鍖荤敓"
-              border="none"
-            />
+            <u-input v-model="form.icuDoctor" placeholder="璇疯緭鍏CU璇勪及鍖荤敓" />
           </view>
-
           <view class="form-item">
             <text class="item-label">ICU鍖荤敓鐢佃瘽</text>
-            <u-input
-              v-model="form.icuDoctorPhone"
-              placeholder="璇疯緭鍏CU鍖荤敓鐢佃瘽"
-              type="number"
-              border="none"
-            />
-          </view>
+            <u-input v-model="form.icuDoctorPhone" placeholder="璇疯緭鍏CU鍖荤敓鐢佃瘽" type="number" />
+          </view> -->
           <view class="form-item">
             <text class="item-label">涓婃姤淇℃伅鍛�</text>
-            <u-input
-              v-model="form.infoName"
-              placeholder="璇疯緭鍏ヤ俊鎭憳"
-              border="none"
-            />
+            <u-input v-model="form.infoName" placeholder="璇疯緭鍏ヤ俊鎭憳" />
           </view>
-
-          <view class="form-item">
-            <text class="item-label">鑱旂郴鐢佃瘽</text>
-            <u-input
-              v-model="form.phone"
-              placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
-              type="number"
-              border="none"
-            />
-          </view>
-
-          <!-- <view class="form-item">
-              <text class="item-label">鎶ュ憡浜�</text>
-              <u-input
-                v-model="form.reporterno"
-                placeholder="璇烽�夋嫨鎶ュ憡浜�"
-                readonly
-                border="none"
-                @click="showReporterPicker = true"
-              >
-                <template #suffix>
-                  <u-icon name="arrow-down" color="#86868b"></u-icon>
-                </template>
-              </u-input>
-            </view> -->
-
+          <!-- ===== 淇敼锛氭姤鍛婃椂闂存敼涓哄彲鎵嬪姩閫夋嫨 ===== -->
           <view class="form-item">
             <text class="item-label">鎶ュ憡鏃堕棿</text>
-            <u-input
-              v-model="currentTime"
-              disabled
-              :disabledColor="disabledColor"
-              border="none"
+            <view
+              class="picker"
+              @click="showReportTimePicker = true"
+              style="
+                height: 86rpx;
+                background: #fafafa;
+                border-radius: 12rpx;
+                padding: 0 24rpx;
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                border: 2rpx solid #e5e5e7;
+              "
+            >
+              <text>{{ form.reporttime || "閫夋嫨鎶ュ憡鏃堕棿" }}</text>
+              <text class="icon-arrow">鈥�</text>
+            </view>
+            <u-datetime-picker
+              :show="showReportTimePicker"
+              v-model="reportTimeValue"
+              mode="datetime"
+              @confirm="onReportTimeConfirm"
+              @cancel="showReportTimePicker = false"
+              title="閫夋嫨鎶ュ憡鏃堕棿"
             />
           </view>
+          <!-- ===== 淇敼缁撴潫 ===== -->
         </view>
       </view>
+
+      <!-- 闄勪欢涓婁紶缁勪欢锛堝亣璁惧凡瀹炵幇锛� -->
+      <attachment-upload
+        ref="attachment"
+        :files="attachments"
+        :readonly="isReadonly"
+        :maxCount="5"
+        @update:files="handleFilesUpdate"
+        @upload-base="handleBaseUpload"
+        @preview="handlePreview"
+      />
 
       <!-- 鎿嶄綔鎸夐挳 -->
       <view class="action-buttons">
@@ -377,97 +416,81 @@
           {{ loading ? "鎻愪氦涓�..." : isEditMode ? "淇濆瓨淇敼" : "鎻愪氦涓婃姤" }}
         </u-button>
       </view>
-      <attachment-upload
-        ref="attachment"
-        :files="attachments"
-        :readonly="isReadonly"
-        :maxCount="5"
-        @update:files="handleFilesUpdate"
-        @upload-base="handleBaseUpload"
-        @preview="handlePreview"
-      />
     </view>
-
-    <!-- 绉戝閫夋嫨鍣� -->
-    <u-picker
-      :show="selectShow"
-      :columns="pickerColumns"
-      keyName="label"
-      @confirm="onConfirm"
-      @cancel="selectShow = false"
-      title="璇烽�夋嫨绉戝"
-      ref="uPicker"
-    ></u-picker>
-
-    <!-- 鍖荤枟鏈烘瀯閫夋嫨鍣� -->
-    <u-picker
-      :show="showHospitalPicker"
-      :columns="[hospitalOptions]"
-      keyName="label"
-      @confirm="onHospitalConfirm"
-      @cancel="showHospitalPicker = false"
-      title="璇烽�夋嫨鍖荤枟鏈烘瀯"
-    ></u-picker>
-
-    <!-- 姘戞棌閫夋嫨鍣� -->
-    <u-picker
-      :show="showNationPicker"
-      :columns="[nationOptions]"
-      keyName="label"
-      @confirm="onNationConfirm"
-      @cancel="showNationPicker = false"
-      title="璇烽�夋嫨姘戞棌"
-    ></u-picker>
-
-    <!-- 璇佷欢绫诲瀷閫夋嫨鍣� -->
-    <!-- <u-picker
-      :show="showIdCardTypePicker"
-      :columns="[idCardTypeOptions]"
-      keyName="label"
-      @confirm="onIdCardTypeConfirm"
-      @cancel="showIdCardTypePicker = false"
-      title="璇烽�夋嫨璇佷欢绫诲瀷"
-    ></u-picker> -->
-
-    <!-- 鏃ユ湡閫夋嫨鍣� -->
-    <u-datetime-picker
-      :show="showDatePicker"
-      v-model="birthdayValue"
-      mode="date"
-      @confirm="onDateConfirm"
-      @cancel="showDatePicker = false"
-      title="閫夋嫨鍑虹敓鏃ユ湡"
-    ></u-datetime-picker>
-
-    <!-- 鎶ュ憡浜洪�夋嫨鍣� -->
-    <u-picker
-      :show="showReporterPicker"
-      :columns="[reporterOptions]"
-      keyName="label"
-      @confirm="onReporterConfirm"
-      @cancel="showReporterPicker = false"
-      title="璇烽�夋嫨鎶ュ憡浜�"
-    ></u-picker>
-
-    <!-- 鍔犺浇鐘舵�� -->
-    <u-loading-icon :show="loading" text="鎻愪氦涓�..."></u-loading-icon>
   </view>
 </template>
 
 <script setup>
 import { ref, computed, onMounted, watch } from "vue";
 import { onLoad } from "@dcloudio/uni-app";
-import attachmentUpload from "@/components/attachment";
+import attachmentUpload from "@/components/attachment"; // 鏍规嵁瀹為檯璺緞璋冩暣
+import AreaSelect from "@/components/AreaSelect"; // 寮曞叆鐪佸競鍖虹粍浠�
 import { useUserStore } from "@/stores/user";
-import { useDict } from "@/utils/dict";
+import { useDictMapper } from "@/utils/useDictMapper";
 
-const dict = ref({});
+// ==================== 瀛楀吀鏁版嵁 ====================
+const requiredDictTypes = [
+  "sys_IDType",
+  "sys_user_sex",
+  "sys_Nation",
+  "sys_BloodType",
+  "sys_Infectious",
+  "sys_AgeUnit", // 骞撮緞鍗曚綅锛堝凡瀛樺湪锛�
+  "sys_education",
+  "sys_occupation",
+];
+
+const { dictData, loading: dictLoading } = useDictMapper(requiredDictTypes);
+const getDictList = (dictType) => dictData.value[dictType] || [];
+
+const nationList = computed(() =>
+  getDictList("sys_Nation").map((item) => item.label),
+);
+const idCardTypeList = computed(() =>
+  getDictList("sys_IDType").map((item) => item.label),
+);
+const infectiousList = computed(() => getDictList("sys_Infectious"));
+const educationList = computed(() =>
+  getDictList("sys_education").map((item) => item.label),
+);
+const occupationList = computed(() =>
+  getDictList("sys_occupation").map((item) => item.label),
+);
+// 骞撮緞鍗曚綅鍒楄〃
+const ageUnitList = computed(() =>
+  getDictList("sys_AgeUnit").map((item) => item.label),
+);
+
+// ==================== 鐘舵�佺鐞� ====================
 const userStore = useUserStore();
 const isEditMode = ref(false);
 const currentId = ref(null);
-const selectedInfectious = ref([]); // 瀛樺偍閫変腑鐨勪紶鏌撶梾鍊兼暟缁�
+const selectedInfectious = ref([]);
+const loading = ref(false);
+const currentTime = ref("");
+const disabledColor = ref("#f5f5f7");
+const isReadonly = ref(false);
+const showDatePicker = ref(false);
+const birthdayValue = ref(0);
+const nationIndex = ref(-1);
+const idCardTypeIndex = ref(-1);
+const educationIndex = ref(-1);
+const occupationIndex = ref(-1);
+const idCardError = ref("");
+const attachments = ref([]);
 
-// 琛ㄥ崟鏁版嵁
+// 骞撮緞鍗曚綅绱㈠紩
+const ageUnitIndex = ref(-1);
+
+// 鎶ュ憡鏃堕棿閫夋嫨鍣�
+const showReportTimePicker = ref(false);
+const reportTimeValue = ref(Date.now());
+
+// 鍦板潃鏁版嵁
+const residenceAddress = ref({ sheng: "", shi: "", qu: "" });
+const registerAddress = ref({ sheng: "", shi: "", qu: "" });
+
+// ==================== 琛ㄥ崟鏁版嵁 ====================
 const form = ref({
   caseNo: "",
   treatmenthospitalname: "",
@@ -475,604 +498,415 @@
   coordinatorName: "",
   coordinatorNo: "",
   treatmentdeptname: "",
+  deptName: "",
   name: "",
   nation: "",
   nationality: "涓浗",
   idcardtype: "",
   idcardno: "",
+  rhYin: "1",
   sex: "",
   birthday: "",
   age: "",
-  ageunit: "", // 鏂板锛氬勾榫勫崟浣�
+  ageunit: "",
   inpatientno: "",
+  gcsScore: "",
   diagnosisname: "",
   bloodType: "",
-  rhYin: "",
   infoName: "",
   phone: "",
+  icuDoctor: "",
+  icuDoctorPhone: "",
   reportername: "",
   reporterno: "",
-  reporterphone: "", // 鎶ュ憡鑰呰仈绯荤數璇�
+  reporterphone: "",
   reporttime: "",
-  contactperson: "", // 鏂板锛氳仈绯讳汉锛堝崗璋冨憳锛�
-  education: "", // 鏂板锛氬鍘�
-  illnessoverview: "", // 鏂板锛氱梾鎯呮鍐�
-  infectious: "", // 浼犳煋鐥呮儏鍐�
-  infectiousOther: "", // 浼犳煋鐥呭叾浠�
-  isTransport: "", // 鏂板锛氭槸鍚﹂渶瑕佽浆杩愶紝榛樿1涓嶉渶瑕�
-  nativeplace: "", // 鏂板锛氱睄璐�
-  occupation: "", // 鏂板锛氳亴涓�
-  patientstate: "", // 鏂板锛氱梾浜虹姸鍐�
-  registeraddress: "", // 鏂板锛氭埛绫嶅湴鍧�
-  registerprovince: "", // 鏂板锛氭埛绫嶅湴鍧�鐪佺紪鍙�
-  registerprovincename: "", // 鏂板锛氭埛绫嶅湴鍧�鐪佸悕绉�
-  registercityname: "", // 鏂板锛氬競鍚嶇О
-  registertownname: "", // 鏂板锛氭墍灞炶閬擄紙闀囷級鍚嶇О
-  registercommunityname: "", // 鏂板锛氱ぞ鍖猴紙鏉戯級鍚嶇О
-  residenceaddress: "", // 鏂板锛氱幇浣忓湴鍧�
-  residenceprovince: "", // 鏂板锛氱幇浣忓湴鍧�鐪佷唬鐮�
-  residenceprovincename: "", // 鏂板锛氱幇浣忓湴鍧�鐪佸悕绉�
-  residencecountycode: "", // 鏂板锛氭墍灞炲尯鍩熺紪鍙�
-  residencecountyname: "", // 鏂板锛氭墍灞炲尯鍩熷悕绉�
-  residencetownname: "", // 鏂板锛氭墍灞炶閬擄紙闀囷級鍚嶇О
-  residencecommunity: "", // 鏂板锛氱ぞ鍖猴紙鏉戯級缂栧彿
-  residencecommunityname: "", // 鏂板锛氱ぞ鍖猴紙鏉戯級鍚嶇О
-  remark: "", // 鏂板锛氬娉�
-  reportStatus: "1", // 鏂板锛氫笂鎶ョ姸鎬侊紝榛樿1宸蹭笂鎶�
-  terminationCase: 0, // 鏂板锛氭槸鍚︾粓姝㈡渚嬶紝榛樿0寮�鍚�
-  annexfilesList: [], // 闄勪欢鏂囦欢鍦板潃闆嗗悎
+  contactperson: "",
+  education: "",
+  illnessoverview: "",
+  infectious: "",
+  infectiousOther: "",
+  isTransport: "",
+  nativeplace: "",
+  occupation: "",
+  patientstate: "",
+  registeraddress: "",
+  registerprovince: "",
+  registerprovincename: "",
+  registercityname: "",
+  registertownname: "",
+  registercommunityname: "",
+  residenceaddress: "",
+  residenceprovince: "",
+  residenceprovincename: "",
+  residencecountycode: "",
+  residencecountyname: "",
+  residencetownname: "",
+  residencecommunity: "",
+  residencecommunityname: "",
+  remark: "",
+  reportStatus: "1",
+  terminationCase: 0,
+  annexfilesList: [],
 });
 
-// 閫夋嫨鍣ㄧ姸鎬�
-const attachments = ref([]);
-const infectiousDiseaselist = ref([]);
-const nationLabel = ref([]);
+// ==================== 閫夐」鏁版嵁 ====================
+const genderOptions = computed(() => {
+  const sexDict = getDictList("sys_user_sex");
+  if (sexDict.length)
+    return sexDict.map((item) => ({ label: item.label, value: item.value }));
+  return [
+    { label: "鐢�", value: "1" },
+    { label: "濂�", value: "2" },
+  ];
+});
 
-const isReadonly = ref(false);
-const id = ref(null);
-const selectShow = ref(false);
-const showHospitalPicker = ref(false);
-const showNationPicker = ref(false);
-const showIdCardTypePicker = ref(false);
-const showDatePicker = ref(false);
-const showReporterPicker = ref(false);
-const birthdayValue = ref(0);
-
-// 瀛楀吀鏁版嵁閫夐」
-const hospitalOptions = ref([
-  { label: "闈掑矝闀滄箹鍖婚櫌", value: "qdhospital1" },
-  { label: "闈掑矝绉戝ぇ鍖婚櫌", value: "qdhospital2" },
-  { label: "闈掑矝澶у闄勫睘鍖婚櫌", value: "qdhospital3" },
-  { label: "闈掑矝甯傜珛鍖婚櫌", value: "qdhospital4" },
-]);
-
-const pickerColumns = ref([
-  [
-    { label: "绁炵粡澶栫", value: "neurosurgery" },
-    { label: "蹇冭绠″唴绉�", value: "cardiology" },
-    { label: "閲嶇棁鍖诲绉�", value: "icu" },
-    { label: "鎬ヨ瘖绉�", value: "emergency" },
-    { label: "绁炵粡鍐呯", value: "neurology" },
-    { label: "鍛煎惛鍐呯", value: "respiratory" },
-    { label: "娑堝寲鍐呯", value: "gastroenterology" },
-    { label: "鑲惧唴绉�", value: "nephrology" },
-  ],
-]);
-
-const nationOptions = ref([
-  { label: "姹夋棌", value: "han" },
-  { label: "鍥炴棌", value: "hui" },
-  { label: "婊℃棌", value: "man" },
-  { label: "钂欏彜鏃�", value: "menggu" },
-]);
-
-const idCardTypeOptions = ref([
-  { label: "灞呮皯韬唤璇�", value: "idcard" },
-  { label: "鎶ょ収", value: "passport" },
-  { label: "鍐涘畼璇�", value: "officer" },
-]);
-
-const genderOptions = ref([
-  { label: "鐢�", value: "1" },
-  { label: "濂�", value: "2" },
-]);
-
-const bloodTypeOptions = ref([
+const bloodTypeOptions = [
   { label: "A鍨�", value: "A鍨�" },
   { label: "B鍨�", value: "B鍨�" },
   { label: "O鍨�", value: "O鍨�" },
   { label: "AB鍨�", value: "AB鍨�" },
-]);
-const isTransportOptions = ref([
-  { label: "闇�瑕�", value: "2" },
-  { label: "涓嶉渶瑕�", value: "1" },
-]);
-const rhOptions = ref([
+];
+
+const rhOptions = [
   { label: "闃虫��", value: "1" },
   { label: "闃存��", value: "0" },
-]);
+];
 
-const reporterOptions = ref([
-  { label: "寮犲尰鐢�", value: "doctor1" },
-  { label: "鏉庡尰鐢�", value: "doctor2" },
-]);
-
-// 鐘舵�佺鐞�
-const loading = ref(false);
-const currentTime = ref("");
-const disabledColor = ref("#f5f5f7");
-
-// 璁$畻灞炴��
-const isFormValid = computed(() => {
-  return (
-    form.value.name &&
-    // form.value.idcardno &&
-    form.value.diagnosisname &&
-    form.value.toHospital
-  );
-});
-// 閫夋嫨鍣ㄧ储寮�
-const hospitalIndex = ref(-1);
-const deptIndex = ref(-1);
-const nationIndex = ref(-1);
-const idCardTypeIndex = ref(-1);
-
-// 璁$畻灞炴�� - 鏍囩鏁扮粍
-const hospitalLabels = computed(() =>
-  hospitalOptions.value.map((item) => item.label),
-);
-const ageDisplay = computed(() => {
-  if (!form.value.age || !form.value.ageunit) {
-    return "鑷姩璁$畻";
-  }
-  return `${form.value.age}${form.value.ageunit}`;
-});
-const deptLabels = computed(() => {
-  return pickerColumns.value[0].map((item) => item.label);
-});
-const nationLabels = computed(() =>
-  nationLabel.value.map((item) => item.label),
-);
-const idCardTypeLabels = computed(() =>
-  idCardTypeOptions.value.map((item) => item.label),
+// ==================== 璁$畻灞炴�� ====================
+const isFormValid = computed(
+  () => form.value.name && form.value.diagnosisname && form.value.toHospital,
 );
 
-// 璁$畻灞炴�� - 褰撳墠閫変腑鏄剧ず鏂囨湰
-const currentHospital = computed(() => {
-  return hospitalIndex.value >= 0
-    ? hospitalLabels.value[hospitalIndex.value]
-    : "璇烽�夋嫨鍖荤枟鏈烘瀯";
+// 骞撮緞鏄剧ず锛堢敤浜庡洖鏄惧崟浣嶆枃鏈級
+const currentAgeUnitText = computed(() => {
+  if (ageUnitIndex.value >= 0 && ageUnitList.value[ageUnitIndex.value]) {
+    return ageUnitList.value[ageUnitIndex.value];
+  }
+  if (form.value.ageunit) {
+    const found = getDictList("sys_AgeUnit").find(
+      (item) => item.value === form.value.ageunit,
+    );
+    return found ? found.label : form.value.ageunit;
+  }
+  return "";
 });
 
-const currentDept = computed(() => {
-  return deptIndex.value >= 0
-    ? deptLabels.value[deptIndex.value]
-    : "璇烽�夋嫨绉戝";
+const currentNationText = computed(() => {
+  if (nationIndex.value >= 0 && nationList.value[nationIndex.value])
+    return nationList.value[nationIndex.value];
+  return form.value.nation || "";
 });
 
-const currentNation = computed(() => {
-  return nationIndex.value >= 0
-    ? nationLabels.value[nationIndex.value]
-    : form.value.nation
-    ? form.value.nation
-    : "璇烽�夋嫨姘戞棌";
+const currentIdCardTypeText = computed(() => {
+  if (idCardTypeIndex.value >= 0 && idCardTypeList.value[idCardTypeIndex.value])
+    return idCardTypeList.value[idCardTypeIndex.value];
+  if (form.value.idcardtype) {
+    const found = getDictList("sys_IDType").find(
+      (item) => item.value == form.value.idcardtype,
+    );
+    return found ? found.label : form.value.idcardtype;
+  }
+  return "";
 });
 
-const currentIdCardType = computed(() => {
-  return idCardTypeIndex.value >= 0
-    ? idCardTypeLabels.value[idCardTypeIndex.value]
-    : "璇烽�夋嫨璇佷欢绫诲瀷";
-});
-const onNationChange = (e) => {
-  const index = parseInt(e.detail.value);
-  nationIndex.value = index;
-  form.value.nation = nationOptions.value[index].label;
-  console.log(form.value.nation, "form.value.nation");
-};
-
-const onIdCardTypeChange = (e) => {
-  const index = parseInt(e.detail.value);
-  idCardTypeIndex.value = index;
-  form.value.idcardtype = idCardTypeOptions.value[index].value;
-  console.log(form.value.idcardtype, "form.value.idcardtype");
-};
-
-const onBirthdayChange = (e) => {
-  form.value.birthday = e.detail.value;
-  calculateAge();
-};
-const onDateConfirm = (e) => {
-  const date = new Date(e.value);
-
-  // 鏍煎紡鍖栨棩鏈熶负 YYYY-MM-DD
-  form.value.birthday = `${date.getFullYear()}-${(date.getMonth() + 1)
-    .toString()
-    .padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}`;
-
-  calculateAge();
-  showDatePicker.value = false;
-};
-
-// 韬唤璇侀獙璇�
-const idCardError = ref("");
-const validateIdCard = () => {
-  const idCard = form.value.idcardno;
-  console.log(idCard, "褰撳墠杈撳叆");
-
-  // if (!idCard) {
-  //   idCardError.value = "璇疯緭鍏ヨ瘉浠跺彿鐮�";
-  //   return false;
-  // }
-
-  if (idCard.length !== 18) {
-    idCardError.value = "韬唤璇佸彿鐮佸繀椤绘槸18浣�";
-    return false;
+const currentEducationText = computed(() => {
+  if (educationIndex.value >= 0 && educationList.value[educationIndex.value])
+    return educationList.value[educationIndex.value];
+  if (form.value.education) {
+    const found = getDictList("sys_education").find(
+      (item) => item.value == form.value.education,
+    );
+    return found ? found.label : form.value.education;
   }
-
-  // 楠岃瘉鍓�17浣嶅繀椤绘槸鏁板瓧
-  const reg = /^\d{17}(\d|X|x)$/;
-  if (!reg.test(idCard)) {
-    idCardError.value = "韬唤璇佸彿鐮佹牸寮忎笉姝g‘";
-    return false;
-  }
-  // 楠岃瘉鍑虹敓鏃ユ湡
-  const birthStr = idCard.substring(6, 14);
-  const year = birthStr.substring(0, 4);
-  const month = birthStr.substring(4, 6);
-  const day = birthStr.substring(6, 8);
-
-  const birthDate = new Date(`${year}-${month}-${day}`);
-  if (isNaN(birthDate.getTime())) {
-    idCardError.value = "韬唤璇佸彿鐮佷腑鐨勫嚭鐢熸棩鏈熸棤鏁�";
-    return false;
-  }
-  console.log(3);
-
-  // 楠岃瘉鏃ユ湡鑼冨洿锛�1900骞磋嚦浠婏級
-  const currentYear = new Date().getFullYear();
-  const birthYear = parseInt(year, 10);
-  if (birthYear < 1900 || birthYear > currentYear) {
-    idCardError.value = "鍑虹敓骞翠唤涓嶅湪鏈夋晥鑼冨洿鍐�";
-    return false;
-  }
-  console.log(4);
-
-  // 楠岃瘉鏍¢獙鐮侊紙绗�18浣嶏級
-  if (!validateIdCardCheckCode(idCard)) {
-    idCardError.value = "韬唤璇佸彿鐮佹牎楠屽け璐�";
-    return false;
-  }
-  console.log(5);
-
-  idCardError.value = "";
-  return true;
-};
-// 韬唤璇佸彿鍙樺寲澶勭悊
-const onIdCardChange = (value) => {
-  // 楠岃瘉韬唤璇佹牸寮�
-  if (validateIdCard()) {
-    // 灏濊瘯鎻愬彇鍑虹敓鏃ユ湡
-    extractBirthdayFromIdCard();
-  }
-};
-const handleGcsBlur = () => {
-  const val = Number(form.value.gcsScore);
-
-  if (!val && val !== 0) return;
-  console.log(val);
-
-  if (val > 7) {
-    uni.showToast({
-      title: "GCS璇勫垎涓嶈兘澶т簬7",
-      icon: "none",
-    });
-    form.value.gcsScore = "";
-  }
-
-  if (val < 3) {
-    uni.showToast({
-      title: "GCS璇勫垎涓嶈兘灏忎簬3",
-      icon: "none",
-    });
-    form.value.gcsScore = "";
-  }
-};
-
-// 韬唤璇佹牎楠岀爜楠岃瘉鍑芥暟
-const validateIdCardCheckCode = (idCard) => {
-  // 绯绘暟鏁扮粍
-  const coefficientArray = [
-    7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2,
-  ];
-  // 鏍¢獙鐮佸搴斿��
-  const checkCodeMap = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
-
-  let sum = 0;
-  for (let i = 0; i < 17; i++) {
-    sum += parseInt(idCard.charAt(i), 10) * coefficientArray[i];
-  }
-
-  const checkCode = checkCodeMap[sum % 11];
-  return checkCode === idCard.charAt(17).toUpperCase();
-};
-// 浠庤韩浠借瘉鍙锋彁鍙栧嚭鐢熸棩鏈�
-const extractBirthdayFromIdCard = () => {
-  const idCard = form.value.idcardno;
-
-  if (!idCard || idCard.length !== 18) {
-    return;
-  }
-
-  try {
-    // 鎻愬彇鍑虹敓鏃ユ湡閮ㄥ垎锛堢7-14浣嶏細YYYYMMDD锛�
-    const birthStr = idCard.substring(6, 14);
-    const year = birthStr.substring(0, 4);
-    const month = birthStr.substring(4, 6);
-    const day = birthStr.substring(6, 8);
-
-    // 楠岃瘉鏃ユ湡鏄惁鏈夋晥
-    const birthDate = new Date(`${year}-${month}-${day}`);
-    if (isNaN(birthDate.getTime())) {
-      console.log("韬唤璇佸彿鐮佷腑鐨勫嚭鐢熸棩鏈熸棤鏁�");
-      return;
-    }
-
-    // 楠岃瘉鏃ユ湡鑼冨洿锛堜笉鑳芥槸鏈潵鏃ユ湡锛�
-    const today = new Date();
-    if (birthDate > today) {
-      console.log("鍑虹敓鏃ユ湡涓嶈兘鏄湭鏉ユ棩鏈�");
-      return;
-    }
-
-    // 楠岃瘉鏈堜唤鍜屾棩鏈熸槸鍚﹀悎鐞�
-    const monthNum = parseInt(month, 10);
-    const dayNum = parseInt(day, 10);
-
-    if (monthNum < 1 || monthNum > 12) {
-      console.log("鏈堜唤鏃犳晥");
-      return;
-    }
-
-    // 妫�鏌ユ棩鏈熸槸鍚︽湁鏁堬紙绠�鍗曢獙璇侊級
-    const daysInMonth = new Date(year, monthNum, 0).getDate();
-    if (dayNum < 1 || dayNum > daysInMonth) {
-      console.log("鏃ユ湡鏃犳晥");
-      return;
-    }
-
-    // 璁剧疆鍑虹敓鏃ユ湡
-    form.value.birthday = `${year}-${month.padStart(2, "0")}-${day.padStart(
-      2,
-      "0",
-    )}`;
-
-    // 璁$畻骞撮緞
-    calculateAge();
-
-    // 浠庤韩浠借瘉鎻愬彇鎬у埆锛堢17浣嶏紝濂囨暟涓虹敺锛屽伓鏁颁负濂筹級
-    const genderCode = parseInt(idCard.charAt(16), 10);
-    if (!isNaN(genderCode)) {
-      form.value.sex = genderCode % 2 === 1 ? "1" : "2";
-    }
-
-    uni.showToast({
-      title: "宸茶嚜鍔ㄦ彁鍙栧嚭鐢熸棩鏈熷拰鎬у埆",
-      icon: "success",
-      duration: 1500,
-    });
-  } catch (error) {
-    console.error("瑙f瀽韬唤璇佸嚭鐢熸棩鏈熷け璐�:", error);
-  }
-};
-
-const textareaStyle = (isError) => {
-  return isError
-    ? "border: 2rpx solid #ff4757; border-radius: 12rpx; min-height: 120rpx; padding: 20rpx 24rpx;"
-    : "border: 2rpx solid #e5e5e7; border-radius: 12rpx; min-height: 120rpx; padding: 20rpx 24rpx;";
-};
-
-// 鐢熷懡鍛ㄦ湡
-onMounted(() => {
-  // updateCurrentTime();
-  // generateDonorNo();
-  setInterval(updateCurrentTime, 1000);
+  return "";
 });
 
-onLoad(async (options) => {
-  id.value = options.id;
-  if (options.id) {
-    currentId.value = options.id;
-    isEditMode.value = true;
-    await loadCaseData(options.id);
-  } else {
-    isEditMode.value = false;
-    generateDonorNo();
+const currentOccupationText = computed(() => {
+  if (occupationIndex.value >= 0 && occupationList.value[occupationIndex.value])
+    return occupationList.value[occupationIndex.value];
+  if (form.value.occupation) {
+    const found = getDictList("sys_occupation").find(
+      (item) => item.value == form.value.occupation,
+    );
+    return found ? found.label : form.value.occupation;
   }
-  console.log(userStore.userInfo, "userStoreuserInfo");
-
-  if (!userStore.userInfo) {
-    await userStore.refreshUserInfo();
-  }
-  form.value.treatmenthospitalname = userStore.userInfo.orgName;
-  form.value.toHospital = userStore.userInfo.orgName;
-  form.value.coordinatorName = userStore.userInfo.coordinatorName;
-  form.value.coordinatorNo = userStore.userInfo.coordinatorNo;
-  form.value.infoName = userStore.userInfo.nickName;
-  form.value.phone = userStore.userInfo.phonenumber;
-  form.value.reportername = userStore.userInfo.name;
-  form.value.reporterno = userStore.userInfo.userId;
-  // 鑾峰彇瀛楀吀鏁版嵁
-  dict.value = await useDict(
-    "sys_IDType",
-    "sys_user_sex",
-    "sys_Nation",
-    "sys_BloodType",
-    "sys_Infectious",
-    "sys_AgeUnit", // 鏂板骞撮緞鍗曚綅
-    "sys_education", // 鏂板瀛﹀巻
-    "sys_occupation", // 鏂板鑱屼笟
-  );
-  initOptions();
-  updateCurrentTime();
+  return "";
 });
-// 鍒濆鍖栭�夐」鏁版嵁鐨勬柟娉�
-const initOptions = () => {
-  infectiousDiseaselist.value = dict.value.sys_Infectious || [];
-  idCardTypeOptions.value = dict.value.sys_IDType || [];
-  nationLabel.value = dict.value.sys_Nation || [];
 
-  // 鍒濆鍖栦紶鏌撶梾閫夋嫨鐘舵��
-  if (form.value.infectious) {
-    // 灏嗛�楀彿鍒嗛殧鐨勫瓧绗︿覆杞崲涓烘暟缁�
-    selectedInfectious.value = form.value.infectious
-      .split(",")
-      .filter((item) => item.trim() !== "");
-  }
-};
-// 鍒囨崲浼犳煋鐥呴�夋嫨
-const toggleInfectious = (value) => {
-  const index = selectedInfectious.value.indexOf(value);
-
-  if (index === -1) {
-    // 娣诲姞閫変腑
-    selectedInfectious.value.push(value);
-  } else {
-    // 绉婚櫎閫変腑
-    selectedInfectious.value.splice(index, 1);
-  }
-
-  // 鏇存柊琛ㄥ崟鐨� infectious 瀛楁锛堥�楀彿鍒嗛殧鐨勫瓧绗︿覆锛�
-  form.value.infectious = selectedInfectious.value.join(",");
-};
-// 妫�鏌ヤ紶鏌撶梾鏄惁琚�変腑
-const isInfectiousSelected = (value) => {
-  return selectedInfectious.value.includes(value);
-};
-
-// 鏂规硶瀹氫箟
+// ==================== 鏂规硶 ====================
 const updateCurrentTime = () => {
   const now = new Date();
-
-  // 鎵嬪姩鏍煎紡鍖栨棩鏈熷拰鏃堕棿
   const year = now.getFullYear();
   const month = String(now.getMonth() + 1).padStart(2, "0");
   const day = String(now.getDate()).padStart(2, "0");
   const hours = String(now.getHours()).padStart(2, "0");
   const minutes = String(now.getMinutes()).padStart(2, "0");
   const seconds = String(now.getSeconds()).padStart(2, "0");
-
-  currentTime.value = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
-  form.value.reporttime = currentTime.value;
+  const timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+  currentTime.value = timeStr;
+  // 濡傛灉鎶ュ憡鏃堕棿灏氭湭鎵嬪姩璁剧疆锛堟垨涓虹┖锛夛紝鍒欒嚜鍔ㄥ~鍏ュ綋鍓嶆椂闂�
+  if (!form.value.reporttime) {
+    form.value.reporttime = timeStr;
+  }
 };
 
-const generateDonorNo = () => {
-  const date = new Date();
-  const timestamp = date.getTime().toString().slice(-6);
-  // form.value.caseNo = `DON${date.getFullYear()}${(date.getMonth() + 1)
-  //   .toString()
-  //   .padStart(2, "0")}${timestamp}`;
+const generateCaseNo = () => {
+  // 浼樺厛浣跨敤涓婃姤鏃堕棿锛屽鏋滄病鏈夊垯浣跨敤褰撳墠鏃堕棿
+  const timeStr = form.value.reporttime || currentTime.value;
+
+  // 瑙f瀽鏃堕棿瀛楃涓�
+  let year, month, day, hours, minutes;
+
+  if (timeStr) {
+    // 鏍煎紡锛�2026-07-15 14:30:00
+    const parts = timeStr.split(" ");
+    if (parts.length >= 2) {
+      const dateParts = parts[0].split("-");
+      const timeParts = parts[1].split(":");
+      year = dateParts[0];
+      month = dateParts[1];
+      day = dateParts[2];
+      hours = timeParts[0];
+      minutes = timeParts[1];
+    } else {
+      // 鍙湁鏃ユ湡娌℃湁鏃堕棿
+      const dateParts = timeStr.split("-");
+      year = dateParts[0];
+      month = dateParts[1];
+      day = dateParts[2];
+      hours = "00";
+      minutes = "00";
+    }
+  } else {
+    // 娌℃湁涓婃姤鏃堕棿锛屼娇鐢ㄥ綋鍓嶆椂闂�
+    const now = new Date();
+    year = now.getFullYear().toString();
+    month = String(now.getMonth() + 1).padStart(2, "0");
+    day = String(now.getDate()).padStart(2, "0");
+    hours = String(now.getHours()).padStart(2, "0");
+    minutes = String(now.getMinutes()).padStart(2, "0");
+  }
+
+  // 鏍煎紡锛歰po202607151430
+  form.value.caseNo = `${year}${month}${day}${hours}${minutes}`;
+};
+
+// 姘戞棌閫夋嫨
+const onNationChange = (e) => {
+  const index = parseInt(e.detail.value);
+  nationIndex.value = index;
+  form.value.nation = nationList.value[index];
+};
+
+// 璇佷欢绫诲瀷閫夋嫨
+const onIdCardTypeChange = (e) => {
+  const index = parseInt(e.detail.value);
+  idCardTypeIndex.value = index;
+  const selectedLabel = idCardTypeList.value[index];
+  const dictItem = getDictList("sys_IDType").find(
+    (item) => item.label == selectedLabel,
+  );
+  form.value.idcardtype = dictItem ? dictItem.value : selectedLabel;
+};
+
+// 瀛﹀巻閫夋嫨
+const onEducationChange = (e) => {
+  const index = parseInt(e.detail.value);
+  educationIndex.value = index;
+  const selectedLabel = educationList.value[index];
+  const dictItem = getDictList("sys_education").find(
+    (item) => item.label == selectedLabel,
+  );
+  form.value.education = dictItem ? dictItem.value : selectedLabel;
+};
+
+// 鑱屼笟閫夋嫨
+const onOccupationChange = (e) => {
+  const index = parseInt(e.detail.value);
+  occupationIndex.value = index;
+  const selectedLabel = occupationList.value[index];
+  const dictItem = getDictList("sys_occupation").find(
+    (item) => item.label == selectedLabel,
+  );
+  form.value.occupation = dictItem ? dictItem.value : selectedLabel;
+};
+
+// 骞撮緞鍗曚綅閫夋嫨
+const onAgeUnitChange = (e) => {
+  const index = parseInt(e.detail.value);
+  ageUnitIndex.value = index;
+  const selectedLabel = ageUnitList.value[index];
+  const dictItem = getDictList("sys_AgeUnit").find(
+    (item) => item.label === selectedLabel,
+  );
+  form.value.ageunit = dictItem ? dictItem.value : selectedLabel;
+};
+
+// 鍑虹敓鏃ユ湡
+const onBirthdayChange = (e) => {
+  form.value.birthday = e.detail.value;
+  calculateAge();
+};
+
+const onDateConfirm = (e) => {
+  const date = new Date(e.value);
+  form.value.birthday = `${date.getFullYear()}-${String(
+    date.getMonth() + 1,
+  ).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
+  calculateAge();
+  showDatePicker.value = false;
 };
 
 const calculateAge = () => {
   if (!form.value.birthday) {
     form.value.age = "";
     form.value.ageunit = "";
+    ageUnitIndex.value = -1;
     return;
   }
-
   const birthDate = new Date(form.value.birthday);
   const today = new Date();
-
-  // 妫�鏌ユ棩鏈熸湁鏁堟��
-  if (isNaN(birthDate.getTime())) {
-    form.value.age = "";
-    form.value.ageunit = "";
-    return;
-  }
-
-  // 妫�鏌ユ槸鍚︿负鏈潵鏃ユ湡
+  if (isNaN(birthDate.getTime())) return;
   if (birthDate > today) {
-    uni.showToast({
-      title: "鍑虹敓鏃ユ湡涓嶈兘鏄湭鏉ユ棩鏈�",
-      icon: "none",
-    });
+    uni.showToast({ title: "鍑虹敓鏃ユ湡涓嶈兘鏄湭鏉ユ棩鏈�", icon: "none" });
     form.value.age = "";
     form.value.ageunit = "";
+    ageUnitIndex.value = -1;
     return;
   }
-
-  // 璁$畻鎬诲ぉ鏁板樊
-  const timeDiff = today.getTime() - birthDate.getTime();
-  const daysDiff = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
-
-  if (daysDiff < 0) {
-    // 鏈潵鏃ユ湡澶勭悊
-    form.value.age = "";
-    form.value.ageunit = "";
-    return;
-  }
-
-  // 璁$畻骞淬�佹湀銆佹棩
-  const years = today.getFullYear() - birthDate.getFullYear();
-  const months = today.getMonth() - birthDate.getMonth();
-  const days = today.getDate() - birthDate.getDate();
-
+  const daysDiff = Math.floor((today - birthDate) / (1000 * 60 * 60 * 24));
+  if (daysDiff < 0) return;
+  let years = today.getFullYear() - birthDate.getFullYear();
+  let months = today.getMonth() - birthDate.getMonth();
+  let days = today.getDate() - birthDate.getDate();
   let ageValue, ageUnit;
-
   if (years >= 1) {
-    // 澶т簬绛変簬1骞达細鏄剧ず骞�
-    let actualYears = years;
-
-    // 澶勭悊鏈堜唤鍜屾棩鏈熺殑杈圭晫鎯呭喌
-    if (months < 0 || (months === 0 && days < 0)) {
-      actualYears = years - 1;
-    }
-
-    ageValue = actualYears.toString();
+    if (months < 0 || (months === 0 && days < 0)) years--;
+    ageValue = years.toString();
     ageUnit = "宀�";
   } else if (daysDiff >= 30) {
-    // 澶т簬绛変簬30澶╋細鏄剧ず鏈�
     let totalMonths = years * 12 + months;
-    if (days < 0) {
-      totalMonths--;
-    }
-    ageValue = Math.max(1, totalMonths).toString(); // 纭繚鑷冲皯1涓湀
+    if (days < 0) totalMonths--;
+    ageValue = Math.max(1, totalMonths).toString();
     ageUnit = "涓湀";
   } else {
-    // 灏忎簬30澶╋細鏄剧ず澶�
-    ageValue = Math.max(1, daysDiff).toString(); // 纭繚鑷冲皯1澶�
+    ageValue = Math.max(1, daysDiff).toString();
     ageUnit = "澶�";
   }
-
   form.value.age = ageValue;
   form.value.ageunit = ageUnit;
+  // 鍚屾鍗曚綅绱㈠紩
+  const unitList = ageUnitList.value;
+  const idx = unitList.findIndex((item) => item === ageUnit);
+  ageUnitIndex.value = idx >= 0 ? idx : -1;
 };
 
-// 澶勭悊鍩虹闄勪欢涓婁紶
-const handleBaseUpload = (file) => {
-  console.log("鍩虹闄勪欢涓婁紶鎴愬姛:", file);
-  attachments.value.push(file);
+// 韬唤璇佸鐞�
+const validateIdCard = () => {
+  const idCard = form.value.idcardno;
+  if (!idCard) {
+    idCardError.value = "";
+    return true;
+  }
+  if (idCard.length !== 18) {
+    idCardError.value = "韬唤璇佸彿鐮佸繀椤绘槸18浣�";
+    return false;
+  }
+  const reg = /^\d{17}(\d|X|x)$/;
+  if (!reg.test(idCard)) {
+    idCardError.value = "韬唤璇佸彿鐮佹牸寮忎笉姝g‘";
+    return false;
+  }
+  const coefficientArray = [
+    7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2,
+  ];
+  const checkCodeMap = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
+  let sum = 0;
+  for (let i = 0; i < 17; i++)
+    sum += parseInt(idCard.charAt(i), 10) * coefficientArray[i];
+  const checkCode = checkCodeMap[sum % 11];
+  if (checkCode != idCard.charAt(17).toUpperCase()) {
+    idCardError.value = "韬唤璇佸彿鐮佹牎楠屽け璐�";
+    return false;
+  }
+  idCardError.value = "";
+  return true;
 };
 
-// 澶勭悊鍏朵粬闄勪欢涓婁紶
+const onIdCardChange = () => {
+  if (validateIdCard()) extractBirthdayFromIdCard();
+};
+
+const extractBirthdayFromIdCard = () => {
+  const idCard = form.value.idcardno;
+  if (!idCard || idCard.length !== 18) return;
+  const year = idCard.substring(6, 10);
+  const month = idCard.substring(10, 12);
+  const day = idCard.substring(12, 14);
+  const birthDate = new Date(`${year}-${month}-${day}`);
+  if (isNaN(birthDate.getTime())) return;
+  form.value.birthday = `${year}-${month}-${day}`;
+  calculateAge();
+  const genderCode = parseInt(idCard.charAt(16), 10);
+  if (!isNaN(genderCode)) form.value.sex = genderCode % 2 === 1 ? "1" : "2";
+  uni.showToast({
+    title: "宸茶嚜鍔ㄦ彁鍙栧嚭鐢熸棩鏈熷拰鎬у埆",
+    icon: "success",
+    duration: 1500,
+  });
+};
+
+const handleGcsBlur = () => {
+  const val = Number(form.value.gcsScore);
+  if (!val && val !== 0) return;
+  if (val > 7) {
+    uni.showToast({ title: "GCS璇勫垎涓嶈兘澶т簬7", icon: "none" });
+    form.value.gcsScore = "";
+  }
+  if (val < 3) {
+    uni.showToast({ title: "GCS璇勫垎涓嶈兘灏忎簬3", icon: "none" });
+    form.value.gcsScore = "";
+  }
+};
+
+// 浼犳煋鐥�
+const toggleInfectious = (value) => {
+  const index = selectedInfectious.value.indexOf(value);
+  if (index === -1) selectedInfectious.value.push(value);
+  else selectedInfectious.value.splice(index, 1);
+  form.value.infectious = selectedInfectious.value.join(",");
+};
+const isInfectiousSelected = (value) =>
+  selectedInfectious.value.includes(value);
+
+// 鎶ュ憡鏃堕棿鎵嬪姩閫夋嫨
+const onReportTimeConfirm = (e) => {
+  const date = new Date(e.value);
+  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");
+  const seconds = String(date.getSeconds()).padStart(2, "0");
+  form.value.reporttime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+  showReportTimePicker.value = false;
+
+  // 濡傛灉鏄柊澧炴ā寮忥紝閲嶆柊鐢熸垚妗堜緥缂栧彿
+  if (!isEditMode.value) {
+    generateCaseNo();
+  }
+};
+
+// 闄勪欢澶勭悊锛堢ず渚嬶紝闇�鏍规嵁瀹為檯闄勪欢缁勪欢璋冩暣锛�
+const handleBaseUpload = (file) => attachments.value.push(file);
 const handleFilesUpdate = (files) => {
-  console.log(files, "files");
-
-  attachments.value = files.map((file) => ({
-    ...file,
-    // 纭繚鍙瓨鍌ㄥ崐璺緞
-    // url: file.url.startsWith("http")
-    //   ? file.url.replace(baseUrlHt, "")
-    //   : file.url,
-  }));
+  attachments.value = files.map((file) => ({ ...file }));
 };
-
-// 棰勮鏂囦欢 - 淇敼涓轰娇鐢ㄥ畬鏁碪RL
 const handlePreview = (file) => {
   const fullUrl = file.url.startsWith("http")
     ? file.url
-    : baseUrlHt + (file.url.startsWith("/") ? "" : "/") + file.url;
-
+    : (file.url.startsWith("/") ? "" : "/") + file.url;
   if (file.type.includes("image")) {
     uni.previewImage({
       urls: attachments.value
@@ -1080,79 +914,42 @@
         .map((f) =>
           f.url.startsWith("http")
             ? f.url
-            : baseUrlHt + (f.url.startsWith("/") ? "" : "/") + f.url,
+            : (f.url.startsWith("/") ? "" : "/") + f.url,
         ),
       current: fullUrl,
     });
   } else if (file.type.includes("pdf")) {
     uni.downloadFile({
       url: fullUrl,
-      success: (res) => {
+      success: (res) =>
         uni.openDocument({
           filePath: res.tempFilePath,
           fileType: "pdf",
           showMenu: true,
-        });
-      },
-      fail: (err) => {
-        console.error("鎵撳紑鏂囨。澶辫触:", err);
-        uni.showToast({ title: "鎵撳紑鏂囦欢澶辫触", icon: "none" });
-      },
+        }),
     });
   } else {
     uni.showToast({ title: "鏆備笉鏀寔姝ゆ枃浠剁被鍨嬮瑙�", icon: "none" });
   }
 };
-// 閫夋嫨鍣ㄧ‘璁や簨浠�
-const onConfirm = (e) => {
-  if (e.value && e.value[0]) {
-    form.value.treatmentdeptname = e.value[0].label;
-  }
-  selectShow.value = false;
+
+// 鍦板潃鍙樻洿澶勭悊
+const onResidenceChange = (val) => {
+  form.value.residenceprovincename = val.sheng;
+  form.value.residenceprovince = val.provinceCode || "";
+  form.value.residencecountyname = val.shi;
+  form.value.residencetownname = val.qu;
+  // 鍙牴鎹渶瑕佽ˉ鍏呭尯鍘縞ode
+};
+const onRegisterChange = (val) => {
+  form.value.registerprovincename = val.sheng;
+  form.value.registerprovince = val.provinceCode || "";
+  form.value.registercityname = val.shi;
+  form.value.registertownname = val.qu;
 };
 
-const onHospitalConfirm = (e) => {
-  console.log(e, "姘戞棌");
-
-  if (e.value && e.value[0]) {
-    form.value.treatmenthospitalname = e.value[0].label;
-  }
-  showHospitalPicker.value = false;
-};
-
-const onNationConfirm = (e) => {
-  if (e.value && e.value[0]) {
-    form.value.nation = e.value[0].label;
-  }
-  showNationPicker.value = false;
-};
-
-const onIdCardTypeConfirm = (e) => {
-  if (e.value && e.value[0]) {
-    form.value.idcardtype = e.value[0].value;
-  }
-  showIdCardTypePicker.value = false;
-};
-
-// const onDateConfirm = (e) => {
-//   const date = new Date(e.value);
-//   form.value.birthday = `${date.getFullYear()}-${(date.getMonth() + 1)
-//     .toString()
-//     .padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}`;
-//   calculateAge();
-//   showDatePicker.value = false;
-// };
-
-const onReporterConfirm = (e) => {
-  if (e.value && e.value[0]) {
-    form.value.reporterno = e.value[0].label;
-  }
-  showReporterPicker.value = false;
-};
-
-const goBack = () => {
-  uni.navigateBack();
-};
+// 琛ㄥ崟鎿嶄綔
+const handleCancel = () => uni.navigateBack();
 
 const resetForm = () => {
   uni.showModal({
@@ -1161,30 +958,26 @@
     success: (res) => {
       if (res.confirm) {
         Object.keys(form.value).forEach((key) => {
-          if (!["id", "caseNo"].includes(key)) {
-            form.value[key] = "";
-          }
+          if (!["id", "caseNo"].includes(key)) form.value[key] = "";
         });
-
-        // 閲嶇疆閫夋嫨鍣ㄧ储寮�
-        hospitalIndex.value = -1;
-        deptIndex.value = -1;
+        form.value.nationality = "涓浗";
+        form.value.reportStatus = "1";
+        form.value.terminationCase = 0;
         nationIndex.value = -1;
         idCardTypeIndex.value = -1;
-        // 閲嶇疆浼犳煋鐥呴�夋嫨
+        educationIndex.value = -1;
+        occupationIndex.value = -1;
+        ageUnitIndex.value = -1;
         selectedInfectious.value = [];
-
-        // 閲嶇疆闄勪欢
         attachments.value = [];
-        form.value.nationality = "涓浗";
-        form.value.isTransport = "";
-        form.value.terminationCase = 0;
-        form.value.reportStatus = "1";
-
+        residenceAddress.value = { sheng: "", shi: "", qu: "" };
+        registerAddress.value = { sheng: "", shi: "", qu: "" };
         if (!isEditMode.value) {
-          generateDonorNo();
+          // 閲嶇疆鎶ュ憡鏃堕棿涓哄綋鍓嶆椂闂�
+          updateCurrentTime();
+          // 鏍规嵁鏂扮殑涓婃姤鏃堕棿鐢熸垚妗堜緥缂栧彿
+          generateCaseNo();
         }
-
         uni.showToast({ title: "琛ㄥ崟宸查噸缃�", icon: "success" });
       }
     },
@@ -1193,18 +986,15 @@
 
 const handleSubmit = async () => {
   if (!isFormValid.value) {
-    uni.showToast({
-      title: "璇峰~鍐欏鍚嶃�佽瘉浠跺彿鐮佸拰鐤剧梾璇婃柇",
-      icon: "none",
-    });
+    uni.showToast({ title: "璇峰~鍐欏鍚嶃�佺柧鐥呰瘖鏂拰涓婃姤鍖婚櫌", icon: "none" });
     return;
   }
-
   try {
+    loading.value = true;
     uni.showLoading({ title: isEditMode.value ? "淇敼涓�..." : "鎻愪氦涓�..." });
-    // 鍑嗗鎻愪氦鏁版嵁
     const submitData = {
       ...form.value,
+      treatmenthospitalname: form.value.toHospital,
       age: parseInt(form.value.age) || 0,
       annexfilesList: attachments.value.map((file) => ({
         path: file.url,
@@ -1215,41 +1005,29 @@
       terminationCase: form.value.terminationCase || 0,
       reportStatus: form.value.reportStatus || "1",
     };
-
     let res;
     if (isEditMode.value) {
-      // 淇敼鎺ュ彛
       res = await uni.$uapi.post(
         "/project/donatebaseinforeport/edit",
         submitData,
       );
     } else {
-      // 鏂板鎺ュ彛
       res = await uni.$uapi.post(
         "/project/donatebaseinforeport/add",
         submitData,
       );
     }
-
     uni.hideLoading();
-
-    if (res.code === 200) {
+    if (res.code == 200) {
       uni.showToast({
         title: isEditMode.value ? "淇敼鎴愬姛" : "涓婃姤鎴愬姛",
         icon: "success",
       });
-
-      // 娓呯┖鏈湴瀛樺偍鐨勮崏绋�
-      removeDraft();
-
-      setTimeout(() => {
-        uni.navigateBack();
-      }, 1500);
+      setTimeout(() => uni.navigateBack(), 1500);
     } else {
       throw new Error(res.msg || "鎿嶄綔澶辫触");
     }
   } catch (error) {
-    console.error("鎿嶄綔澶辫触:", error);
     uni.showToast({
       title: error.message || (isEditMode.value ? "淇敼澶辫触" : "涓婃姤澶辫触"),
       icon: "none",
@@ -1258,65 +1036,135 @@
     loading.value = false;
   }
 };
-const removeDraft = () => {
-  try {
-    uni.removeStorageSync('caseReportDraft');
-  } catch (e) {
-    console.error('绉婚櫎鑽夌澶辫触', e);
-  }
-};
-// 鍙栨秷澶勭悊
-const handleCancel = () => {
-  uni.navigateBack();
-};
 
+// 鍔犺浇妗堜緥鏁版嵁
 const loadCaseData = async (id) => {
   try {
     loading.value = true;
     const res = await uni.$uapi.get(
       `/project/donatebaseinforeport/getInfo/${id}`,
     );
-
     if (res.code) {
       form.value = res.data;
-      if (res.data.infectious) {
+      if (res.data.infectious)
         selectedInfectious.value = res.data.infectious
           .split(",")
           .filter((item) => item.trim() !== "");
+      if (form.value.nation) {
+        const idx = nationList.value.findIndex(
+          (item) => item == form.value.nation,
+        );
+        nationIndex.value = idx >= 0 ? idx : -1;
       }
-      currentNation.value = form.value.nation;
-      idCardTypeIndex.value = form.value.idcardtype;
-      // 澶勭悊閫夋嫨鍣ㄧ储寮�
-      // updatePickerIndexes();
-      // 澶勭悊闄勪欢
+      if (form.value.idcardtype) {
+        const dictList = getDictList("sys_IDType");
+        const idx = dictList.findIndex(
+          (item) => item.value == form.value.idcardtype,
+        );
+        idCardTypeIndex.value = idx >= 0 ? idx : -1;
+      }
+      if (form.value.education) {
+        const dictList = getDictList("sys_education");
+        const idx = dictList.findIndex(
+          (item) => item.value == form.value.education,
+        );
+        educationIndex.value = idx >= 0 ? idx : -1;
+      }
+      if (form.value.occupation) {
+        const dictList = getDictList("sys_occupation");
+        const idx = dictList.findIndex(
+          (item) => item.value == form.value.occupation,
+        );
+        occupationIndex.value = idx >= 0 ? idx : -1;
+      }
+      // 骞撮緞鍗曚綅鍥炴樉
+      if (form.value.ageunit) {
+        const unitList = ageUnitList.value;
+        const idx = unitList.findIndex((item) => item === form.value.ageunit);
+        ageUnitIndex.value = idx >= 0 ? idx : -1;
+      }
+      // 鍦板潃鍥炴樉
+      if (res.data.residenceprovincename) {
+        residenceAddress.value = {
+          sheng: res.data.residenceprovincename,
+          shi: res.data.residencecountyname,
+          qu: res.data.residencetownname,
+        };
+      }
+      if (res.data.registerprovincename) {
+        registerAddress.value = {
+          sheng: res.data.registerprovincename,
+          shi: res.data.registercityname,
+          qu: res.data.registertownname,
+        };
+      }
       if (res.data.annexfilesList) {
-        attachments.value = res.data.annexfilesList;
-        attachments.value.forEach((item) => {
-          item.url = item.path;
-          item.name = item.fileName;
-        });
+        attachments.value = res.data.annexfilesList.map((item) => ({
+          url: item.path,
+          name: item.fileName,
+          type: item.type || "",
+        }));
       }
-      console.log(3, "res");
-
-      uni.showToast({
-        title: "鏁版嵁鍔犺浇鎴愬姛",
-        icon: "success",
-      });
     } else {
       throw new Error(res.msg || "鏁版嵁鍔犺浇澶辫触");
     }
   } catch (error) {
-    console.error("鍔犺浇妗堜緥鏁版嵁澶辫触:", error);
-    uni.showToast({
-      title: "鏁版嵁鍔犺浇澶辫触锛岃閲嶈瘯",
-      icon: "none",
-    });
+    uni.showToast({ title: "鏁版嵁鍔犺浇澶辫触锛岃閲嶈瘯", icon: "none" });
   } finally {
     loading.value = false;
   }
 };
+
+// ==================== 鐢熷懡鍛ㄦ湡 ====================
+onMounted(() => {
+  updateCurrentTime();
+  setInterval(updateCurrentTime, 1000);
+});
+
+onLoad(async (options) => {
+  if (options.id) {
+    currentId.value = options.id;
+    isEditMode.value = true;
+    await new Promise((resolve) => {
+      if (!dictLoading.value) resolve();
+      else {
+        const stopWatch = watch(dictLoading, (val) => {
+          if (!val) {
+            stopWatch();
+            resolve();
+          }
+        });
+      }
+    });
+    await loadCaseData(options.id);
+  } else {
+    isEditMode.value = false;
+    generateCaseNo();
+    // 鏂板鏃堕粯璁ゅ~鍏ユ姤鍛婃椂闂�
+    updateCurrentTime();
+  }
+
+  if (!userStore.userInfo) await userStore.refreshUserInfo();
+  const user = userStore.userInfo;
+  if (user) {
+    if (!form.value.treatmenthospitalname)
+      form.value.treatmenthospitalname = user.orgName;
+    if (!form.value.toHospital) form.value.toHospital = user.orgName;
+    if (!form.value.coordinatorName)
+      form.value.coordinatorName = user.coordinatorName;
+    if (!form.value.coordinatorNo)
+      form.value.coordinatorNo = user.coordinatorNo;
+    if (!form.value.infoName) form.value.infoName = user.nickName;
+    if (!form.value.phone) form.value.phone = user.phonenumber;
+    if (!form.value.reportername) form.value.reportername = user.name;
+    if (!form.value.reporterno) form.value.reporterno = user.userId;
+  }
+  updateCurrentTime();
+});
 </script>
+
 <style lang="scss" scoped>
+// 鏍峰紡涓庡師鏉ヤ繚鎸佷竴鑷达紝鏂板鍦板潃鍧楁牱寮�
 .case-report-container {
   min-height: 100vh;
   background: linear-gradient(135deg, #f8fdff 0%, #e8f7f6 100%);
@@ -1324,40 +1172,53 @@
 
 .form-content {
   padding: 30rpx;
-  padding-bottom: 180rpx; // 缁欐寜閽暀鍑虹┖闂�
+  padding-bottom: 220rpx;
+}
+
+.page-header {
+  padding: 30rpx 0;
+  text-align: center;
+  margin-bottom: 20rpx;
+}
+
+.page-title {
+  font-size: 38rpx;
+  font-weight: 700;
+  color: #1d1d1f;
+  letter-spacing: 2rpx;
 }
 
 .form-section {
   background: #fff;
   border-radius: 20rpx;
   padding: 30rpx;
-  margin-bottom: 30rpx;
-  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
+  margin-bottom: 26rpx;
+  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.05);
 }
 
 .section-header {
   display: flex;
-  // align-items: center;
-  margin-bottom: 30rpx;
+  align-items: center;
+  margin-bottom: 28rpx;
   padding-bottom: 20rpx;
   border-bottom: 2rpx solid #f0f0f0;
 }
 
 .section-icon {
-  font-size: 32rpx;
-  margin-right: 16rpx;
+  font-size: 34rpx;
+  margin-right: 14rpx;
 }
 
 .section-title {
   font-size: 32rpx;
-  font-weight: 600;
+  font-weight: 650;
   color: #1d1d1f;
 }
 
 .form-grid {
   display: flex;
   flex-direction: column;
-  gap: 24rpx;
+  gap: 28rpx;
 }
 
 .form-item {
@@ -1372,7 +1233,7 @@
 .item-label {
   font-size: 28rpx;
   color: #1d1d1f;
-  font-weight: 500;
+  font-weight: 520;
   margin-bottom: 12rpx;
 
   &.required::after {
@@ -1382,19 +1243,82 @@
   }
 }
 
-// 鑷畾涔塽-input鏍峰紡
-:deep(.u-input) {
-  border: 2rpx solid #e5e5e7 !important;
-  border-radius: 12rpx !important;
-  padding: 20rpx 24rpx !important;
-  background: #fff !important;
-}
-
+:deep(.u-input),
 :deep(.u-textarea) {
   border: 2rpx solid #e5e5e7 !important;
   border-radius: 12rpx !important;
   padding: 20rpx 24rpx !important;
   background: #fff !important;
+
+  &:focus-within {
+    border-color: #0f95b0 !important;
+  }
+}
+
+.picker {
+  height: 86rpx;
+  background: #fafafa;
+  border-radius: 12rpx;
+  padding: 0 24rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  border: 2rpx solid #e5e5e7;
+
+  &:active {
+    border-color: #0f95b0;
+  }
+
+  .icon-arrow {
+    font-size: 34rpx;
+    color: #86868b;
+    transform: rotate(90deg);
+  }
+}
+
+.radio-options {
+  display: flex;
+  gap: 44rpx;
+
+  .option-item {
+    display: flex;
+    align-items: center;
+    gap: 14rpx;
+
+    .radio-dot {
+      width: 34rpx;
+      height: 34rpx;
+      border: 3rpx solid #d1d1d6;
+      border-radius: 50%;
+      position: relative;
+    }
+
+    .option-label {
+      font-size: 28rpx;
+      color: #1d1d1f;
+    }
+
+    &.active .radio-dot {
+      border-color: #0f95b0;
+
+      &::after {
+        content: "";
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+        width: 18rpx;
+        height: 18rpx;
+        background: #0f95b0;
+        border-radius: 50%;
+      }
+    }
+
+    &.active .option-label {
+      color: #0f95b0;
+      font-weight: 550;
+    }
+  }
 }
 
 .radio-group {
@@ -1407,39 +1331,131 @@
   }
 }
 
-.radio-item {
+// 鏇挎崲鍘熸湁鐨� .radio-group.horizontal 鐩稿叧鏍峰紡
+.radio-group.horizontal {
   display: flex;
-  align-items: center;
-  gap: 16rpx;
-}
+  flex-wrap: nowrap;
+  overflow-x: auto;
+  gap: 18rpx;
 
-.radio-dot {
-  width: 32rpx;
-  height: 32rpx;
-  border: 2rpx solid #e5e5e7;
-  border-radius: 50%;
-  position: relative;
+  .radio-item {
+    flex-shrink: 0;
+    display: flex;
+    align-items: center;
+    gap: 8rpx;
+    padding: 10rpx 20rpx;
+    border-radius: 20rpx;
+    background: #f5f5f7;
+    transition: all 0.2s;
 
-  &.active {
-    border-color: #0f95b0;
-
-    &::after {
-      content: "";
-      position: absolute;
-      top: 50%;
-      left: 50%;
-      transform: translate(-50%, -50%);
-      width: 16rpx;
-      height: 16rpx;
-      background: #0f95b0;
+    .radio-dot {
+      width: 36rpx;
+      height: 36rpx;
+      border: 2rpx solid #d1d1d6;
       border-radius: 50%;
+      background-color: #fff;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      transition: all 0.2s;
+
+      &.active {
+        border-color: #0f95b0;
+        background-color: #0f95b0;
+
+        // 鍙�夛細濡傛灉甯屾湜鏈夌櫧鑹插鍕撅紝鍙栨秷娉ㄩ噴涓嬮潰
+        // &::after {
+        //   content: "鉁�";
+        //   font-size: 20rpx;
+        //   color: white;
+        //   line-height: 1;
+        // }
+      }
+    }
+
+    .radio-label {
+      font-size: 26rpx;
+      color: #1d1d1f;
+      white-space: nowrap;
+    }
+
+    // 閫変腑鏃舵暣浣撹儗鏅井寰彉鑹诧紙鍙�夛級
+    &.active {
+      background: rgba(15, 149, 176, 0.1);
     }
   }
 }
 
-.radio-label {
-  font-size: 28rpx;
-  color: #1d1d1f;
+.checkbox-group.single-line {
+  display: flex;
+  flex-wrap: nowrap;
+  overflow-x: auto;
+  gap: 16rpx;
+
+  .checkbox-item {
+    display: flex;
+    align-items: center;
+    gap: 8rpx;
+    flex-shrink: 0;
+    padding: 10rpx 20rpx;
+    border-radius: 22rpx;
+    background: #f5f5f7;
+
+    &.active {
+      border-color: #0f95b0;
+      background: rgba(15, 149, 176, 0.09);
+    }
+
+    .checkbox-box {
+      width: 30rpx;
+      height: 30rpx;
+      border: 2rpx solid #d1d1d6;
+      border-radius: 6rpx;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      background: #fff;
+
+      &.active {
+        border-color: #0f95b0;
+        background: #0f95b0;
+      }
+
+      .checkbox-check {
+        font-size: 20rpx;
+        color: white;
+        font-weight: bold;
+      }
+    }
+
+    .checkbox-label {
+      font-size: 25rpx;
+      color: #1d1d1f;
+      white-space: nowrap;
+    }
+  }
+}
+
+.error-text {
+  font-size: 23rpx;
+  color: #ff4757;
+  margin-top: 8rpx;
+}
+
+.address-block {
+  margin-bottom: 32rpx;
+
+  .address-label {
+    font-size: 27rpx;
+    color: #1d1d1f;
+    font-weight: 520;
+    margin-bottom: 12rpx;
+    display: block;
+  }
+
+  .address-detail-input {
+    margin-top: 16rpx;
+  }
 }
 
 .action-buttons {
@@ -1449,407 +1465,35 @@
   right: 0;
   background: #fff;
   padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom));
-  box-shadow: 0 -2rpx 20rpx rgba(0, 0, 0, 0.08);
-  z-index: 99;
+  box-shadow: 0 -4rpx 24rpx rgba(0, 0, 0, 0.07);
+  z-index: 9;
   display: flex;
   gap: 20rpx;
-}
 
-.btn {
-  flex: 1;
-  height: 80rpx;
-  border-radius: 16rpx;
-  font-size: 32rpx;
-  font-weight: 500;
-
-  &.secondary {
-    background: #f5f5f7 !important;
-    color: #1d1d1f !important;
-  }
-
-  &.primary {
-    background: linear-gradient(135deg, #0f95b0, #89c4c1) !important;
-    color: #fff !important;
-
-    &:disabled {
-      background: #c0c0c0 !important;
-      opacity: 0.6;
-    }
-  }
-}
-.case-report-container {
-  min-height: 100vh;
-  background: linear-gradient(135deg, #f8fdff 0%, #e8f7f6 100%);
-}
-
-.form-scroll {
-  height: 100vh;
-}
-
-
-
-.form-section {
-  background: #fff;
-  border-radius: 20rpx;
-  padding: 30rpx;
-  margin-bottom: 30rpx;
-  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
-}
-
-.section-header {
-  display: flex;
-  align-items: center;
-  margin-bottom: 30rpx;
-  padding-bottom: 20rpx;
-  border-bottom: 2rpx solid #f0f0f0;
-}
-
-.section-icon {
-  font-size: 32rpx;
-  margin-right: 16rpx;
-}
-
-.section-title {
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #1d1d1f;
-}
-
-.form-grid {
-  display: flex;
-  flex-direction: column;
-  gap: 24rpx;
-}
-
-.form-item {
-  display: flex;
-  flex-direction: column;
-}
-
-.item-label {
-  font-size: 28rpx;
-  color: #1d1d1f;
-  font-weight: 500;
-  margin-bottom: 12rpx;
-
-  &.required::after {
-    content: "*";
-    color: #ff4757;
-    margin-left: 4rpx;
-  }
-}
-
-/* 鏀归�犲悗鐨勯�夋嫨鍣ㄦ牱寮� */
-.picker {
-  height: 88rpx;
-  background: #f5f5f7;
-  border-radius: 12rpx;
-  padding: 0 24rpx;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  border: 2rpx solid #e5e5e7;
-
-  text {
-    font-size: 28rpx;
-    color: #1d1d1f;
-
-    &.icon-arrow {
-      font-size: 32rpx;
-      color: #86868b;
-      transform: rotate(90deg);
-    }
-  }
-}
-
-.page-header {
-  padding: 30rpx 0;
-  text-align: center;
-  margin-bottom: 20rpx;
-}
-
-.page-title {
-  font-size: 36rpx;
-  font-weight: 600;
-  color: #1d1d1f;
-}
-
-/* 鍦ㄥ師鏈夋牱寮忓熀纭�涓婃坊鍔� */
-.form-section {
-  position: relative;
-}
-
-.edit-badge {
-  position: absolute;
-  top: 30rpx;
-  right: 30rpx;
-  background: #ff6b35;
-  color: white;
-  padding: 8rpx 16rpx;
-  border-radius: 20rpx;
-  font-size: 24rpx;
-}
-
-/* 鍔犺浇鐘舵�佹牱寮� */
-.loading-overlay {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  background: rgba(0, 0, 0, 0.5);
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  z-index: 9999;
-}
-
-/* 鍝嶅簲寮忚皟鏁� */
-@media (max-width: 768px) {
-  .form-content {
-    padding: 20rpx;
-    padding-bottom: 180rpx;
-  }
-
-  .form-section {
-    padding: 20rpx;
-  }
-}
-
-/* 鏀归�犲悗鐨勫崟閫夋寜閽牱寮� */
-.radio-options {
-  display: flex;
-  gap: 40rpx;
-}
-
-.option-item {
-  display: flex;
-  align-items: center;
-  gap: 16rpx;
-
-  .radio-dot {
-    width: 32rpx;
-    height: 32rpx;
-    border: 2rpx solid #e5e5e7;
-    border-radius: 50%;
-    position: relative;
-  }
-
-  .option-label {
-    font-size: 28rpx;
-    color: #1d1d1f;
-  }
-
-  &.active {
-    .radio-dot {
-      border-color: #0f95b0;
-
-      &::after {
-        content: "";
-        position: absolute;
-        top: 50%;
-        left: 50%;
-        transform: translate(-50%, -50%);
-        width: 16rpx;
-        height: 16rpx;
-        background: #0f95b0;
-        border-radius: 50%;
-      }
-    }
-
-    .option-label {
-      color: #0f95b0;
-    }
-  }
-}
-
-.error-text {
-  font-size: 24rpx;
-  color: #ff4757;
-  margin-top: 8rpx;
-}
-
-/* 鍘熸湁鏍峰紡璋冩暣 */
-:deep(.u-input) {
-  border: 2rpx solid #e5e5e7 !important;
-  border-radius: 12rpx !important;
-  padding: 20rpx 24rpx !important;
-  background: #fff !important;
-}
-.idcard-hint {
-  margin-top: 8rpx;
-  padding: 12rpx 16rpx;
-  background: #f0f9ff;
-  border-radius: 8rpx;
-  border-left: 4rpx solid #0f95b0;
-}
-
-.hint-text {
-  display: block;
-  font-size: 24rpx;
-  color: #0f95b0;
-  margin-bottom: 4rpx;
-
-  &:last-child {
-    margin-bottom: 0;
-  }
-}
-
-.error-text {
-  font-size: 24rpx;
-  color: #ff4757;
-  margin-top: 8rpx;
-}
-.btn {
-  flex: 1;
-  height: 80rpx;
-  border-radius: 16rpx;
-  font-size: 32rpx;
-  font-weight: 500;
-
-  &.secondary {
-    background: #f5f5f7 !important;
-    color: #1d1d1f !important;
-  }
-
-  &.primary {
-    background: linear-gradient(135deg, #0f95b0, #89c4c1) !important;
-    color: #fff !important;
-
-    &:disabled {
-      background: #c0c0c0 !important;
-      opacity: 0.6;
-    }
-  }
-}
-.checkbox-group {
-  display: flex;
-  flex-wrap: nowrap; /* 绂佹鎹㈣ */
-  gap: 20rpx;
-  overflow-x: auto; /* 姘村钩婊氬姩 */
-  padding-bottom: 10rpx; /* 缁欐粴鍔ㄦ潯鐣欏嚭绌洪棿 */
-  -webkit-overflow-scrolling: touch; /* iOS骞虫粦婊氬姩 */
-
-  &.single-line {
-    display: flex;
-    flex-wrap: nowrap;
-    overflow-x: auto;
-    width: 100%;
-
-    /* 闅愯棌婊氬姩鏉★紝浣嗕繚鎸佹粴鍔ㄥ姛鑳� */
-    &::-webkit-scrollbar {
-      display: none;
-    }
-  }
-}
-
-.checkbox-item {
-  display: flex;
-  align-items: center;
-  gap: 8rpx;
-  flex-shrink: 0; /* 闃叉閫夐」琚帇缂� */
-  padding: 8rpx 16rpx;
-  border-radius: 20rpx;
-  background: #f5f5f7;
-  transition: all 0.3s ease;
-
-  &.active {
-    background: rgba(15, 149, 176, 0.1);
-  }
-}
-
-.checkbox-box {
-  width: 28rpx;
-  height: 28rpx;
-  border: 2rpx solid #e5e5e7;
-  border-radius: 6rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  background: #fff;
-  transition: all 0.3s ease;
-  flex-shrink: 0;
-
-  &.active {
-    border-color: #0f95b0;
-    background: #0f95b0;
-  }
-}
-
-.checkbox-check {
-  font-size: 20rpx;
-  color: white;
-  font-weight: bold;
-}
-
-.checkbox-label {
-  font-size: 24rpx;
-  color: #1d1d1f;
-  white-space: nowrap;
-}
-
-/* 浼樺寲鍗曢�夋寜閽粍鐨勬牱寮忥紝淇濇寔涓�鑷存�� */
-.radio-group.horizontal {
-  display: flex;
-  flex-wrap: nowrap;
-  overflow-x: auto;
-  gap: 20rpx;
-  padding-bottom: 10rpx;
-  -webkit-overflow-scrolling: touch;
-
-  &::-webkit-scrollbar {
-    display: none;
-  }
-
-  .radio-item {
-    flex-shrink: 0;
+  .btn {
+    flex: 1;
+    height: 84rpx;
+    border-radius: 16rpx;
+    font-size: 31rpx;
+    font-weight: 530;
     display: flex;
     align-items: center;
-    gap: 8rpx;
-    padding: 8rpx 16rpx;
-    border-radius: 20rpx;
-  }
+    justify-content: center;
 
-  .radio-item .radio-dot.active {
-    border-color: #0f95b0;
-
-    &::after {
-      background: #0f95b0;
+    &.secondary {
+      background: #f5f5f7 !important;
+      color: #1d1d1f !important;
     }
-  }
-}
 
-/* 濡傛灉闇�瑕佸浐瀹氶珮搴︼紝鍙互杩欐牱璁剧疆 */
-.checkbox-group.single-line {
-  min-height: 60rpx;
-  align-items: center;
-}
+    &.primary {
+      background: linear-gradient(135deg, #0f95b0, #66b8b5) !important;
+      color: #fff !important;
 
-/* 鍦ㄧЩ鍔ㄧ浼樺寲瑙︽懜鍖哄煙 */
-.checkbox-item {
-  min-height: 60rpx;
-  padding: 8rpx 20rpx;
-  cursor: pointer;
-}
-
-/* 娣诲姞閫変腑鐘舵�佺殑瑙嗚鍙嶉 */
-.checkbox-item.active {
-  border: 1rpx solid #0f95b0;
-  background: rgba(15, 149, 176, 0.08);
-}
-
-/* 鍝嶅簲寮忚皟鏁� */
-@media (max-width: 768px) {
-  .checkbox-group.single-line {
-    gap: 12rpx;
-  }
-
-  .checkbox-item {
-    padding: 6rpx 14rpx;
-  }
-
-  .checkbox-label {
-    font-size: 22rpx;
+      &:disabled {
+        background: #c8c8cc !important;
+        opacity: 0.55;
+      }
+    }
   }
 }
 </style>

--
Gitblit v1.9.3