From 5319d5b95497b5b546947ac340c14c71e5b54ca6 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 10 十二月 2025 09:57:58 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/patient/profile/index.vue | 1654 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 1,478 insertions(+), 176 deletions(-)

diff --git a/src/views/patient/patient/profile/index.vue b/src/views/patient/patient/profile/index.vue
index 53838c1..73e600f 100644
--- a/src/views/patient/patient/profile/index.vue
+++ b/src/views/patient/patient/profile/index.vue
@@ -16,7 +16,11 @@
               {{ userform.sex == 1 ? "鐢�" : "濂�" }}
             </div>
             <div style="margin-left: 10px" class="text-title">
-              {{ userform.age }}宀�
+              <span v-if="userform.age"
+                >{{ userform.age }}{{ userform.ageUnit }}</span
+              ><span v-if="userform.age2"
+                >{{ userform.age2 }}{{ userform.ageUnit2 }}</span
+              >
             </div>
             <div style="margin-left: 10px" class="text-title">
               {{ userform.birthdate }}
@@ -72,7 +76,7 @@
           > -->
           <el-tab-pane name="weight"
             ><span class="mulsz" slot="label"
-              ><i class="el-icon-s-data"></i>韬珮澶村洿瓒嬪娍
+              ><i class="el-icon-s-data"></i>韬暱澶村洿瓒嬪娍
             </span></el-tab-pane
           >
           <!-- <el-tab-pane name="heartrate"
@@ -123,11 +127,21 @@
                     disabled
                   ></el-input> </el-form-item
               ></el-col>
+            </el-row>
+            <el-row :gutter="20">
               <el-col :span="12"
                 ><el-form-item label="鑱旂郴鏂瑰紡" prop="telcode">
                   <el-input
                     v-model="userform.telcode"
                     placeholder="璇疯緭鍏ヨ仈绯绘柟寮�"
+                    maxlength="30"
+                  /> </el-form-item
+              ></el-col>
+              <el-col :span="12"
+                ><el-form-item label="棰勭暀鐢佃瘽" prop="reservedPhone">
+                  <el-input
+                    v-model="userform.reservedPhone"
+                    placeholder="璇疯緭鍏ラ鐣欑數璇�"
                     maxlength="30"
                   /> </el-form-item
               ></el-col>
@@ -196,6 +210,316 @@
                     >
                   </div>
                 </el-form-item>
+              </el-col>
+            </el-row>
+            <!-- 绛涙煡鎽樿妯″潡 -->
+            <el-row :gutter="20">
+              <el-col :span="12">
+                <div class="screening-summary">
+                  <div class="summary-header">
+                    <i class="el-icon-search"></i>
+                    <span>绛涙煡鎽樿</span>
+                    <div
+                      style="
+                        margin-left: auto;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
+                      <el-button
+                        type="primary"
+                        size="mini"
+                        @click="addScreening"
+                      >
+                        <i class="el-icon-plus"></i> 鏂板
+                      </el-button>
+                      <el-button
+                        type="text"
+                        size="mini"
+                        @click="refreshScreeningData"
+                        style="margin-left: 10px"
+                      >
+                        <i class="el-icon-refresh"></i> 鍒锋柊
+                      </el-button>
+                    </div>
+                  </div>
+                  <div class="summary-content">
+                    <el-table
+                      :data="screeningSummaryData"
+                      border
+                      size="mini"
+                      height="200"
+                      v-loading="screeningLoading"
+                    >
+                      <el-table-column
+                        prop="screeningType"
+                        label="绛涙煡绫诲瀷"
+                        width="100"
+                      >
+                        <template slot-scope="scope">
+                          <el-tag
+                            :type="getScreeningTagType(scope.row.screeningType)"
+                          >
+                            {{ scope.row.screeningType }}
+                          </el-tag>
+                        </template>
+                      </el-table-column>
+                      <el-table-column
+                        prop="screeningDate"
+                        label="绛涙煡鏃ユ湡"
+                        width="100"
+                      >
+                        <template slot-scope="scope">
+                          {{ formatTime(scope.row.screeningDate) }}
+                        </template>
+                      </el-table-column>
+                      <el-table-column prop="result" label="缁撴灉" width="80">
+                        <template slot-scope="scope">
+                          <el-tag
+                            :type="
+                              scope.row.result === '姝e父'
+                                ? 'success'
+                                : scope.row.result === '寮傚父'
+                                ? 'danger'
+                                : 'warning'
+                            "
+                            size="small"
+                          >
+                            {{ scope.row.result }}
+                          </el-tag>
+                        </template>
+                      </el-table-column>
+                      <el-table-column
+                        prop="details"
+                        label="璇︾粏缁撴灉"
+                        min-width="120"
+                      >
+                        <template slot-scope="scope">
+                          <el-tooltip
+                            :content="scope.row.details"
+                            placement="top"
+                            v-if="
+                              scope.row.details && scope.row.details.length > 10
+                            "
+                          >
+                            <span
+                              >{{ scope.row.details.substring(0, 10) }}...</span
+                            >
+                          </el-tooltip>
+                          <span v-else>{{ scope.row.details }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="鎿嶄綔" width="150" fixed="right">
+                        <template slot-scope="scope">
+                          <el-button
+                            type="primary"
+                            size="mini"
+                            @click="editScreening(scope.$index, scope.row)"
+                          >
+                            缂栬緫
+                          </el-button>
+                          <el-button
+                            type="danger"
+                            size="mini"
+                            @click="deleteScreening(scope.$index, scope.row)"
+                          >
+                            鍒犻櫎
+                          </el-button>
+                        </template>
+                      </el-table-column>
+                    </el-table>
+
+                    <div class="summary-stats">
+                      <el-row :gutter="10">
+                        <el-col :span="8">
+                          <div class="stat-item">
+                            <div class="stat-value" style="color: #67c23a">
+                              {{ screeningStats.normal }}
+                            </div>
+                            <div class="stat-label">姝e父</div>
+                          </div>
+                        </el-col>
+                        <el-col :span="8">
+                          <div class="stat-item">
+                            <div class="stat-value" style="color: #e6a23c">
+                              {{ screeningStats.abnormal }}
+                            </div>
+                            <div class="stat-label">寮傚父</div>
+                          </div>
+                        </el-col>
+                        <el-col :span="8">
+                          <div class="stat-item">
+                            <div class="stat-value" style="color: #f56c6c">
+                              {{ screeningStats.critical }}
+                            </div>
+                            <div class="stat-label">鍗辨��</div>
+                          </div>
+                        </el-col>
+                      </el-row>
+                    </div>
+                  </div>
+                </div>
+              </el-col>
+
+              <!-- 鎱㈢梾鎽樿妯″潡 -->
+              <el-col :span="12">
+                <div class="chronic-disease-summary">
+                  <div class="summary-header">
+                    <i class="el-icon-document"></i>
+                    <span>鎱㈢梾鎽樿</span>
+                    <div
+                      style="
+                        margin-left: auto;
+                        display: flex;
+                        align-items: center;
+                      "
+                    >
+                      <el-button
+                        type="primary"
+                        size="mini"
+                        @click="addChronicDisease"
+                      >
+                        <i class="el-icon-plus"></i> 鏂板
+                      </el-button>
+                      <el-button
+                        type="text"
+                        size="mini"
+                        @click="refreshChronicData"
+                        style="margin-left: 10px"
+                      >
+                        <i class="el-icon-refresh"></i> 鍒锋柊
+                      </el-button>
+                    </div>
+                  </div>
+                  <div class="summary-content">
+                    <el-table
+                      :data="chronicDiseaseData"
+                      border
+                      size="mini"
+                      height="200"
+                      v-loading="chronicLoading"
+                    >
+                      <el-table-column
+                        prop="diseaseName"
+                        label="鐤剧梾鍚嶇О"
+                        width="120"
+                      >
+                        <template slot-scope="scope">
+                          <el-tag
+                            :type="getDiseaseTagType(scope.row.diseaseName)"
+                          >
+                            {{ scope.row.diseaseName }}
+                          </el-tag>
+                        </template>
+                      </el-table-column>
+                      <el-table-column
+                        prop="diagnoseDate"
+                        label="纭瘖鏃ユ湡"
+                        width="100"
+                      >
+                        <template slot-scope="scope">
+                          {{ formatTime(scope.row.diagnoseDate) }}
+                        </template>
+                      </el-table-column>
+                      <el-table-column prop="status" label="鐘舵��" width="80">
+                        <template slot-scope="scope">
+                          <el-tag
+                            :type="
+                              scope.row.status === '绋冲畾'
+                                ? 'success'
+                                : scope.row.status === '娲诲姩鏈�'
+                                ? 'warning'
+                                : 'danger'
+                            "
+                            size="small"
+                          >
+                            {{ scope.row.status }}
+                          </el-tag>
+                        </template>
+                      </el-table-column>
+                      <el-table-column
+                        prop="currentTreatment"
+                        label="褰撳墠娌荤枟"
+                        min-width="120"
+                      >
+                        <template slot-scope="scope">
+                          <el-tooltip
+                            :content="scope.row.currentTreatment"
+                            placement="top"
+                            v-if="
+                              scope.row.currentTreatment &&
+                              scope.row.currentTreatment.length > 10
+                            "
+                          >
+                            <span
+                              >{{
+                                scope.row.currentTreatment.substring(0, 10)
+                              }}...</span
+                            >
+                          </el-tooltip>
+                          <span v-else>{{ scope.row.currentTreatment }}</span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="鎿嶄綔" width="150" fixed="right">
+                        <template slot-scope="scope">
+                          <el-button
+                            type="primary"
+                            size="mini"
+                            @click="editChronicDisease(scope.$index, scope.row)"
+                          >
+                            缂栬緫
+                          </el-button>
+                          <el-button
+                            type="danger"
+                            size="mini"
+                            @click="
+                              deleteChronicDisease(scope.$index, scope.row)
+                            "
+                          >
+                            鍒犻櫎
+                          </el-button>
+                        </template>
+                      </el-table-column>
+                    </el-table>
+
+                    <div class="summary-stats">
+                      <el-row :gutter="10">
+                        <el-col :span="6">
+                          <div class="stat-item">
+                            <div class="stat-value" style="color: #67c23a">
+                              {{ chronicStats.stable }}
+                            </div>
+                            <div class="stat-label">绋冲畾</div>
+                          </div>
+                        </el-col>
+                        <el-col :span="6">
+                          <div class="stat-item">
+                            <div class="stat-value" style="color: #e6a23c">
+                              {{ chronicStats.active }}
+                            </div>
+                            <div class="stat-label">娲诲姩鏈�</div>
+                          </div>
+                        </el-col>
+                        <el-col :span="6">
+                          <div class="stat-item">
+                            <div class="stat-value" style="color: #f56c6c">
+                              {{ chronicStats.severe }}
+                            </div>
+                            <div class="stat-label">涓ラ噸</div>
+                          </div>
+                        </el-col>
+                        <el-col :span="6">
+                          <div class="stat-item">
+                            <div class="stat-value" style="color: #909399">
+                              {{ chronicStats.total }}
+                            </div>
+                            <div class="stat-label">鎬绘暟</div>
+                          </div>
+                        </el-col>
+                      </el-row>
+                    </div>
+                  </div>
+                </div>
               </el-col>
             </el-row>
           </el-form>
@@ -309,9 +633,8 @@
                     <el-radio label="MCT濂�">MCT濂�</el-radio>
                     <el-radio label="鍏跺畠鐗规畩濂剁矇">鍏跺畠鐗规畩濂剁矇</el-radio>
                   </el-radio-group>
-                </el-form-item> </el-col
-              >
-
+                </el-form-item>
+              </el-col>
             </el-row>
           </el-form>
         </div>
@@ -372,12 +695,12 @@
           <el-table-column
             label="灏辫瘖鏃堕棿"
             align="center"
-            key="admindate"
-            prop="admindate"
+            key="admitdate"
+            prop="admitdate"
             width="160"
           >
             <template slot-scope="scope">
-              <span>{{ formatTime(scope.row.admindate) }}</span>
+              <span>{{ formatTime(scope.row.admitdate) }}</span>
             </template>
           </el-table-column>
 
@@ -737,18 +1060,124 @@
           class="sontwoactiveName"
           style="width: 880px; height: 560px"
         ></div>
-        <div style="width: 400px">
+        <div style="width: 600px">
           <el-card class="box-card">
             <el-button @click="borninfoVisible = true" type="success" round
               >娣诲姞鏁版嵁</el-button
             >
-            <SFtable
-              :currentList="borninfooptions"
-              :tableLabel="tableLabeltz"
-              :serialnumber="false"
-              :center="false"
-              :multiplechoice="false"
-            />
+            <el-table :data="borninfooptions" style="width: 100%" border>
+              <el-table-column
+                prop="generatedTime"
+                label="璁板綍鏃ユ湡"
+                width="120"
+              >
+                <template slot-scope="scope">
+                  <span v-if="!scope.row.editing">{{
+                    scope.row.generatedTime
+                  }}</span>
+                  <!-- <el-date-picker
+                    v-else
+                    v-model="scope.row.generatedTime"
+                    type="date"
+                    placeholder="閫夋嫨鏃ユ湡"
+                    value-format="yyyy-MM-dd"
+                    size="small"
+                  ></el-date-picker> -->
+                  <el-date-picker
+                    v-else
+                    v-model="scope.row.generatedTime"
+                    type="datetime"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+                    size="small"
+                  >
+                  </el-date-picker>
+                </template>
+              </el-table-column>
+              <el-table-column prop="doctor" label="璐d换鍖荤敓" width="100">
+                <template slot-scope="scope">
+                  <span v-if="!scope.row.editing">{{ scope.row.doctor }}</span>
+                  <el-input
+                    v-else
+                    v-model="scope.row.doctor"
+                    size="small"
+                    placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+                  ></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="height" label="韬暱(cm)" width="100">
+                <template slot-scope="scope">
+                  <span v-if="!scope.row.editing">{{ scope.row.height }}</span>
+                  <el-input
+                    v-else
+                    v-model.number="scope.row.height"
+                    size="small"
+                    placeholder="韬暱"
+                  ></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="headCir" label="澶村洿(cm)" width="100">
+                <template slot-scope="scope">
+                  <span v-if="!scope.row.editing">{{ scope.row.headCir }}</span>
+                  <el-input
+                    v-else
+                    v-model.number="scope.row.headCir"
+                    size="small"
+                    placeholder="澶村洿"
+                  ></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="age" label="鑳庨緞(鍛�)" width="100">
+                <template slot-scope="scope">
+                  <span v-if="!scope.row.editing">{{ scope.row.age }}</span>
+                  <el-input
+                    v-else
+                    v-model.number="scope.row.age"
+                    size="small"
+                    placeholder="鑳庨緞"
+                  ></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column prop="weight" label="浣撻噸(kg)" width="100">
+                <template slot-scope="scope">
+                  <span v-if="!scope.row.editing">{{ scope.row.weight }}</span>
+                  <el-input
+                    v-else
+                    v-model.number="scope.row.weight"
+                    size="small"
+                    placeholder="浣撻噸"
+                  ></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column label="鎿嶄綔" width="180" fixed="right">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="!scope.row.editing"
+                    type="primary"
+                    size="mini"
+                    @click="handleEdit(scope.row)"
+                    >缂栬緫</el-button
+                  >
+                  <el-button
+                    v-else
+                    type="success"
+                    size="mini"
+                    @click="handleSave(scope.row)"
+                    >淇濆瓨</el-button
+                  >
+                  <el-button
+                    v-if="!scope.row.editing"
+                    type="danger"
+                    size="mini"
+                    @click="handleDelete(scope.$index, scope.row)"
+                    >鍒犻櫎</el-button
+                  >
+                  <el-button v-else size="mini" @click="handleCancel(scope.row)"
+                    >鍙栨秷</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
           </el-card>
         </div>
       </div>
@@ -804,7 +1233,147 @@
         </div>
       </div> -->
     </div>
+    <!-- 绛涙煡鎽樿缂栬緫瀵硅瘽妗� -->
+    <el-dialog
+      :title="screeningEditing ? '缂栬緫绛涙煡璁板綍' : '鏂板绛涙煡璁板綍'"
+      :visible.sync="screeningDialogVisible"
+      width="600px"
+    >
+      <el-form :model="screeningForm" label-width="100px">
+        <el-form-item label="绛涙煡绫诲瀷" prop="screeningType" required>
+          <el-select
+            v-model="screeningForm.screeningType"
+            placeholder="璇烽�夋嫨绛涙煡绫诲瀷"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in screeningTypeOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
 
+        <el-form-item label="绛涙煡鏃ユ湡" prop="screeningDate" required>
+          <el-date-picker
+            v-model="screeningForm.screeningDate"
+            type="datetime"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="閫夋嫨绛涙煡鏃ユ湡"
+            style="width: 100%"
+          >
+          </el-date-picker>
+        </el-form-item>
+
+        <el-form-item label="绛涙煡缁撴灉" prop="result" required>
+          <el-select
+            v-model="screeningForm.result"
+            placeholder="璇烽�夋嫨缁撴灉"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in resultOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="璇︾粏缁撴灉" prop="details">
+          <el-input
+            type="textarea"
+            :rows="3"
+            v-model="screeningForm.details"
+            placeholder="璇疯緭鍏ヨ缁嗙粨鏋滀俊鎭�"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="screeningDialogVisible = false">鍙栨秷</el-button>
+        <el-button type="primary" @click="saveScreening">纭畾</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 鎱㈢梾鎽樿缂栬緫瀵硅瘽妗� -->
+    <el-dialog
+      :title="chronicEditing ? '缂栬緫鎱㈢梾璁板綍' : '鏂板鎱㈢梾璁板綍'"
+      :visible.sync="chronicDialogVisible"
+      width="600px"
+    >
+      <el-form :model="chronicForm" label-width="100px">
+        <el-form-item label="鐤剧梾鍚嶇О" prop="diseaseName" required>
+          <el-select
+            v-model="chronicForm.diseaseName"
+            placeholder="璇烽�夋嫨鐤剧梾鍚嶇О"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in diseaseOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="纭瘖鏃ユ湡" prop="diagnoseDate" required>
+          <el-date-picker
+            v-model="chronicForm.diagnoseDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="閫夋嫨纭瘖鏃ユ湡"
+            style="width: 100%"
+          >
+          </el-date-picker>
+        </el-form-item>
+
+        <el-form-item label="褰撳墠鐘舵��" prop="status" required>
+          <el-select
+            v-model="chronicForm.status"
+            placeholder="璇烽�夋嫨鐘舵��"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in statusOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="褰撳墠娌荤枟" prop="currentTreatment">
+          <el-input
+            type="textarea"
+            :rows="2"
+            v-model="chronicForm.currentTreatment"
+            placeholder="璇疯緭鍏ュ綋鍓嶆不鐤楁柟妗�"
+          >
+          </el-input>
+        </el-form-item>
+
+        <el-form-item label="闅忚璁″垝" prop="followUpPlan">
+          <el-input
+            v-model="chronicForm.followUpPlan"
+            placeholder="璇疯緭鍏ラ殢璁胯鍒�"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="chronicDialogVisible = false">鍙栨秷</el-button>
+        <el-button type="primary" @click="saveChronicDisease">纭畾</el-button>
+      </div>
+    </el-dialog>
     <el-dialog :title="titletb" :visible.sync="AddanumberVisible">
       <el-form :model="numberform" label-width="100px">
         <el-form-item label="濮撳悕">
@@ -829,12 +1398,12 @@
         :model="borninfoform"
         label-width="120px"
       >
-        <!-- 韬珮 -->
-        <el-form-item label="韬珮(cm)" prop="height">
+        <!-- 韬暱 -->
+        <el-form-item label="韬暱(cm)" prop="height">
           <el-input
             v-model.number="borninfoform.height"
             autocomplete="off"
-            placeholder="璇疯緭鍏ヨ韩楂橈紙30-120cm锛�"
+            placeholder="璇疯緭鍏ヨ韩闀匡紙30-120cm锛�"
           >
           </el-input>
         </el-form-item>
@@ -848,11 +1417,34 @@
           >
           </el-input>
         </el-form-item>
+        <el-form-item label="浣撻噸锛坘g锛�" prop="weight">
+          <el-input
+            v-model.number="borninfoform.weight"
+            autocomplete="off"
+            placeholder="璇疯緭鍏ヤ綋閲�"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="璁板綍鏃ユ湡" prop="generatedTime">
+          <!-- <el-date-picker
+            v-model="borninfoform.generatedTime"
+            type="date"
+            placeholder="閫夋嫨鏃ユ湡"
+          >
+          </el-date-picker> -->
+          <el-date-picker
+            v-model="borninfoform.generatedTime"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            type="datetime"
+            placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+          >
+          </el-date-picker>
+        </el-form-item>
 
         <!-- 鑳庨緞 -->
         <el-form-item label="鑳庨緞锛堝懆锛�" prop="age">
           <el-input
-            v-model.number="borninfoform.age"
+            v-model="borninfoform.age"
             autocomplete="off"
             placeholder="璇疯緭鍏ヨ儙榫�"
           >
@@ -892,6 +1484,8 @@
 import {
   listPatouthosp,
   newborninfoadd,
+  newborninfoedit,
+  newborninforemove,
   newborninfolist,
 } from "@/api/smartor/patouthosp";
 import { listpatient } from "@/api/patient/record";
@@ -921,9 +1515,27 @@
       sonactiveName: "inhospital", //鍋ュ悍鐩戞祴瀵艰埅
       sontwoactiveName: "weight", //鍖荤枟妗f瀵艰埅
       dynamicTags: [],
+      // 绛涙煡鎽樿鐩稿叧鏁版嵁
+      screeningLoading: false,
+      screeningSummaryData: [],
+      screeningStats: {
+        normal: 0,
+        abnormal: 0,
+        critical: 0,
+      },
+
+      // 鎱㈢梾鎽樿鐩稿叧鏁版嵁
+      chronicLoading: false,
+      chronicDiseaseData: [],
+      chronicStats: {
+        stable: 0,
+        active: 0,
+        severe: 0,
+        total: 0,
+      },
       borninforules: {
         height: [
-          { required: true, message: "韬珮涓嶈兘涓虹┖", trigger: "blur" },
+          { required: true, message: "韬暱涓嶈兘涓虹┖", trigger: "blur" },
           {
             type: "number",
             message: "蹇呴』涓烘暟瀛楀��",
@@ -931,9 +1543,9 @@
           },
           {
             validator: (rule, value, callback) => {
-              // 鏂扮敓鍎胯韩楂樹竴鑸寖鍥达細30-120cm
+              // 鏂扮敓鍎胯韩闀夸竴鑸寖鍥达細30-120cm
               if (value < 30 || value > 120) {
-                callback(new Error("璇疯緭鍏�30-120cm涔嬮棿鐨勫悎鐞嗚韩楂樺��"));
+                callback(new Error("璇疯緭鍏�30-120cm涔嬮棿鐨勫悎鐞嗚韩闀垮��"));
               } else if (!/^[0-9]+(\.[0-9]{1})?$/.test(value)) {
                 callback(new Error("鏈�澶氫繚鐣欎竴浣嶅皬鏁�"));
               } else {
@@ -960,7 +1572,7 @@
         ],
         age: [
           { required: true, message: "鑳庨緞涓嶈兘涓虹┖", trigger: "blur" },
-          { type: "integer", message: "蹇呴』涓烘暣鏁板懆鏁�" },
+          // { type: "integer", message: "蹇呴』涓烘暣鏁板懆鏁�" },
           {
             validator: (rule, value, callback) => {
               // 妫�鏌ユ槸鍚﹀凡瀛樺湪璇ュ懆鏁版暟鎹�
@@ -1022,6 +1634,58 @@
       xtechartdom: {},
       tzechartdom: {},
       tableData: [],
+      // 绛涙煡鎽樿缂栬緫鐩稿叧
+      screeningEditing: false,
+      screeningEditIndex: -1,
+      screeningEditTemp: {},
+      screeningDialogVisible: false,
+      screeningForm: {
+        screeningType: "",
+        screeningDate: "",
+        result: "姝e父",
+        details: "",
+      },
+
+      // 鎱㈢梾鎽樿缂栬緫鐩稿叧
+      chronicEditing: false,
+      chronicEditIndex: -1,
+      chronicEditTemp: {},
+      chronicDialogVisible: false,
+      chronicForm: {
+        diseaseName: "",
+        diagnoseDate: "",
+        status: "绋冲畾",
+        currentTreatment: "",
+        followUpPlan: "",
+      },
+
+      // 绛涢�夐�夐」
+      resultOptions: [
+        { label: "姝e父", value: "姝e父" },
+        { label: "寮傚父", value: "寮傚父" },
+        { label: "鍗辨��", value: "鍗辨��" },
+      ],
+
+      statusOptions: [
+        { label: "绋冲畾", value: "绋冲畾" },
+        { label: "娲诲姩鏈�", value: "娲诲姩鏈�" },
+        { label: "涓ラ噸", value: "涓ラ噸" },
+      ],
+
+      screeningTypeOptions: [
+        { label: "蹇冭绠�", value: "蹇冭绠�" },
+        { label: "绯栧翱鐥�", value: "绯栧翱鐥�" },
+        { label: "鑲跨槫鏍囧織", value: "鑲跨槫鏍囧織" },
+        { label: "鑲惧姛鑳�", value: "鑲惧姛鑳�" },
+        { label: "鍛煎惛绯荤粺", value: "鍛煎惛绯荤粺" },
+      ],
+
+      diseaseOptions: [
+        { label: "楂樿鍘�", value: "楂樿鍘�" },
+        { label: "2鍨嬬硸灏跨梾", value: "2鍨嬬硸灏跨梾" },
+        { label: "鍐犲績鐥�", value: "鍐犲績鐥�" },
+        { label: "鎱㈡�ц偩鐥�", value: "鎱㈡�ц偩鐥�" },
+      ],
       tableDatalist: [
         {
           id: 12,
@@ -1075,9 +1739,12 @@
         { label: "鑸掑紶鍘�", width: "", prop: "age" },
       ],
       tableLabeltz: [
+        { label: "鏃ユ湡", width: "", prop: "generatedTime" },
         { label: "璐d换鍖荤敓", width: "", prop: "doctor" },
-        { label: "韬珮", width: "", prop: "height" },
-        { label: "澶村洿", width: "", prop: "headCir" },
+        { label: "韬暱(cm)", width: "", prop: "height" },
+        { label: "澶村洿(cm)", width: "", prop: "headCir" },
+        { label: "鑳庨緞(鍛�)", width: "", prop: "age" },
+        { label: "浣撻噸(kg)", width: "", prop: "weight" },
       ],
       tableLabelxl: [
         { label: "娴嬮噺鏃堕棿", width: "", prop: "name" },
@@ -1130,6 +1797,9 @@
     this.id = this.$route.query.id;
     this.getuserinfo();
     this.gettabList();
+    // 鍒濆鍖栫瓫鏌ュ拰鎱㈢梾鏁版嵁
+    this.initScreeningData();
+    this.initChronicDiseaseData();
   },
 
   methods: {
@@ -1159,6 +1829,147 @@
           }
         });
       }
+    },
+    /** 绛涙煡鎽樿 - 鏂板 */
+    addScreening() {
+      this.screeningEditing = false;
+      this.screeningEditIndex = -1;
+      this.screeningForm = {
+        screeningType: "",
+        screeningDate: new Date().toISOString().split("T")[0] + " 09:00:00",
+        result: "姝e父",
+        details: "",
+      };
+      this.screeningDialogVisible = true;
+    },
+
+    /** 绛涙煡鎽樿 - 缂栬緫 */
+    editScreening(index, row) {
+      this.screeningEditing = true;
+      this.screeningEditIndex = index;
+      this.screeningForm = { ...row };
+      this.screeningDialogVisible = true;
+    },
+
+    /** 绛涙煡鎽樿 - 淇濆瓨 */
+    saveScreening() {
+      if (
+        !this.screeningForm.screeningType ||
+        !this.screeningForm.screeningDate
+      ) {
+        this.$message.error("璇峰~鍐欏繀濉瓧娈�");
+        return;
+      }
+
+      if (this.screeningEditing) {
+        // 缂栬緫鐜版湁璁板綍
+        this.screeningSummaryData.splice(this.screeningEditIndex, 1, {
+          ...this.screeningForm,
+          id: this.screeningSummaryData[this.screeningEditIndex].id,
+        });
+        this.$message.success("绛涙煡璁板綍淇敼鎴愬姛");
+      } else {
+        // 鏂板璁板綍
+        const newRecord = {
+          id: Date.now(), // 涓存椂ID
+          ...this.screeningForm,
+          riskLevel: this.getRiskLevelByResult(this.screeningForm.result),
+        };
+        this.screeningSummaryData.unshift(newRecord);
+        this.$message.success("绛涙煡璁板綍鏂板鎴愬姛");
+      }
+
+      this.calculateScreeningStats();
+      this.screeningDialogVisible = false;
+    },
+
+    /** 绛涙煡鎽樿 - 鍒犻櫎 */
+    deleteScreening(index, row) {
+      this.$confirm("纭畾瑕佸垹闄よ繖鏉$瓫鏌ヨ褰曞悧锛�", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          this.screeningSummaryData.splice(index, 1);
+          this.calculateScreeningStats();
+          this.$message.success("鍒犻櫎鎴愬姛");
+        })
+        .catch(() => {});
+    },
+
+    /** 鏍规嵁缁撴灉鑾峰彇椋庨櫓绛夌骇 */
+    getRiskLevelByResult(result) {
+      const riskMap = {
+        姝e父: "low",
+        寮傚父: "medium",
+        鍗辨��: "critical",
+      };
+      return riskMap[result] || "low";
+    },
+    /** 鎱㈢梾鎽樿 - 鏂板 */
+    addChronicDisease() {
+      this.chronicEditing = false;
+      this.chronicEditIndex = -1;
+      this.chronicForm = {
+        diseaseName: "",
+        diagnoseDate: new Date().toISOString().split("T")[0],
+        status: "绋冲畾",
+        currentTreatment: "",
+        followUpPlan: "姣忔湀澶嶈瘖涓�娆�",
+      };
+      this.chronicDialogVisible = true;
+    },
+
+    /** 鎱㈢梾鎽樿 - 缂栬緫 */
+    editChronicDisease(index, row) {
+      this.chronicEditing = true;
+      this.chronicEditIndex = index;
+      this.chronicForm = { ...row };
+      this.chronicDialogVisible = true;
+    },
+
+    /** 鎱㈢梾鎽樿 - 淇濆瓨 */
+    saveChronicDisease() {
+      if (!this.chronicForm.diseaseName || !this.chronicForm.diagnoseDate) {
+        this.$message.error("璇峰~鍐欏繀濉瓧娈�");
+        return;
+      }
+
+      if (this.chronicEditing) {
+        // 缂栬緫鐜版湁璁板綍
+        this.chronicDiseaseData.splice(this.chronicEditIndex, 1, {
+          ...this.chronicForm,
+          id: this.chronicDiseaseData[this.chronicEditIndex].id,
+        });
+        this.$message.success("鎱㈢梾璁板綍淇敼鎴愬姛");
+      } else {
+        // 鏂板璁板綍
+        const newRecord = {
+          id: Date.now(), // 涓存椂ID
+          ...this.chronicForm,
+        };
+        this.chronicDiseaseData.unshift(newRecord);
+        this.$message.success("鎱㈢梾璁板綍鏂板鎴愬姛");
+      }
+
+      this.calculateChronicStats();
+      this.chronicDialogVisible = false;
+    },
+
+    /** 鎱㈢梾鎽樿 - 鍒犻櫎 */
+    deleteChronicDisease(index, row) {
+      this.$confirm("纭畾瑕佸垹闄よ繖鏉℃參鐥呰褰曞悧锛�", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          this.chronicDiseaseData.splice(index, 1);
+          this.calculateChronicStats();
+          this.$message.success("鍒犻櫎鎴愬姛");
+        })
+        .catch(() => {});
     },
     checkAgeExists(newAge) {
       // 鍋囪宸叉湁鏁版嵁瀛樺偍鍦� this.existingData 涓�
@@ -1194,6 +2005,232 @@
       });
       // 鑱旂郴淇℃伅
       this.getcontactlist();
+    },
+    /** 鍒濆鍖栫瓫鏌ユ憳瑕佹暟鎹� */
+    initScreeningData() {
+      // 妯℃嫙绛涙煡鎽樿鏁版嵁[1,4](@ref)
+      this.screeningSummaryData = [
+        {
+          id: 1,
+          screeningType: "蹇冭绠�",
+          screeningDate: "2024-11-15 09:00:00",
+          result: "寮傚父",
+          details: "蹇冪數鍥炬樉绀篠T娈靛帇浣庯紝寤鸿杩涗竴姝ユ鏌�",
+          riskLevel: "high",
+        },
+        {
+          id: 2,
+          screeningType: "绯栧翱鐥�",
+          screeningDate: "2024-11-10 14:30:00",
+          result: "姝e父",
+          details: "绌鸿吂琛�绯�5.6mmol/L锛岀硸鍖栬绾㈣泲鐧�5.8%",
+          riskLevel: "low",
+        },
+        {
+          id: 3,
+          screeningType: "鑲跨槫鏍囧織",
+          screeningDate: "2024-11-05 10:15:00",
+          result: "鍗辨��",
+          details: "CEA 15.2ng/mL锛屽缓璁珛鍗充笓绉戝氨璇�",
+          riskLevel: "critical",
+        },
+        {
+          id: 4,
+          screeningType: "鑲惧姛鑳�",
+          screeningDate: "2024-10-28 16:20:00",
+          result: "寮傚父",
+          details: "鑲岄厫娓呴櫎鐜囧亸浣庯紝eGFR 55mL/min",
+          riskLevel: "medium",
+        },
+        {
+          id: 5,
+          screeningType: "鍛煎惛绯荤粺",
+          screeningDate: "2024-10-20 11:00:00",
+          result: "姝e父",
+          details: "鑲哄姛鑳芥鏌ユ湭瑙佹槑鏄惧紓甯�",
+          riskLevel: "low",
+        },
+      ];
+
+      // 璁$畻缁熻淇℃伅
+      this.calculateScreeningStats();
+    },
+
+    /** 璁$畻绛涙煡缁熻淇℃伅 */
+    calculateScreeningStats() {
+      this.screeningStats = {
+        normal: this.screeningSummaryData.filter(
+          (item) => item.result === "姝e父"
+        ).length,
+        abnormal: this.screeningSummaryData.filter(
+          (item) => item.result === "寮傚父"
+        ).length,
+        critical: this.screeningSummaryData.filter(
+          (item) => item.result === "鍗辨��"
+        ).length,
+      };
+    },
+
+    /** 鍒濆鍖栨參鐥呮憳瑕佹暟鎹� */
+    initChronicDiseaseData() {
+      // 妯℃嫙鎱㈢梾鎽樿鏁版嵁[2,5](@ref)
+      this.chronicDiseaseData = [
+        {
+          id: 1,
+          diseaseName: "楂樿鍘�",
+          diagnoseDate: "2020-03-15",
+          status: "绋冲畾",
+          currentTreatment: "姘ㄦ隘鍦板钩 5mg qd锛屽畾鏈熺洃娴嬭鍘�",
+          followUpPlan: "姣忔湀澶嶈瘖涓�娆�",
+        },
+        {
+          id: 2,
+          diseaseName: "2鍨嬬硸灏跨梾",
+          diagnoseDate: "2019-08-20",
+          status: "娲诲姩鏈�",
+          currentTreatment: "浜岀敳鍙岃儘 500mg bid锛岃儼宀涚礌娉ㄥ皠",
+          followUpPlan: "姣忎袱鍛ㄥ璇婁竴娆�",
+        },
+        {
+          id: 3,
+          diseaseName: "鍐犲績鐥�",
+          diagnoseDate: "2021-05-10",
+          status: "绋冲畾",
+          currentTreatment: "闃垮徃鍖规灄 100mg qd锛岄樋鎵樹紣浠栨眬 20mg qd",
+          followUpPlan: "姣忓搴﹀璇婁竴娆�",
+        },
+        {
+          id: 4,
+          diseaseName: "鎱㈡�ц偩鐥�",
+          diagnoseDate: "2022-01-30",
+          status: "涓ラ噸",
+          currentTreatment: "鎺у埗琛�鍘嬨�佽绯栵紝浣庤泲鐧介ギ椋�",
+          followUpPlan: "姣忔湀涓撶闅忚",
+        },
+      ];
+
+      // 璁$畻缁熻淇℃伅
+      this.calculateChronicStats();
+    },
+
+    /** 璁$畻鎱㈢梾缁熻淇℃伅 */
+    calculateChronicStats() {
+      this.chronicStats = {
+        stable: this.chronicDiseaseData.filter((item) => item.status === "绋冲畾")
+          .length,
+        active: this.chronicDiseaseData.filter(
+          (item) => item.status === "娲诲姩鏈�"
+        ).length,
+        severe: this.chronicDiseaseData.filter((item) => item.status === "涓ラ噸")
+          .length,
+        total: this.chronicDiseaseData.length,
+      };
+    },
+
+    /** 鑾峰彇绛涙煡绫诲瀷鏍囩鏍峰紡 */
+    getScreeningTagType(type) {
+      const typeMap = {
+        蹇冭绠�: "danger",
+        绯栧翱鐥�: "warning",
+        鑲跨槫鏍囧織: "danger",
+        鑲惧姛鑳�: "warning",
+        鍛煎惛绯荤粺: "success",
+      };
+      return typeMap[type] || "info";
+    },
+
+    /** 鑾峰彇鐤剧梾鍚嶇О鏍囩鏍峰紡 */
+    getDiseaseTagType(diseaseName) {
+      const diseaseMap = {
+        楂樿鍘�: "warning",
+        "2鍨嬬硸灏跨梾": "danger",
+        鍐犲績鐥�: "danger",
+        鎱㈡�ц偩鐥�: "danger",
+      };
+      return diseaseMap[diseaseName] || "info";
+    },
+
+    /** 鏌ョ湅绛涙煡璇︽儏 */
+    viewScreeningDetail(row) {
+      this.$alert(
+        `<div>
+        <p><strong>绛涙煡绫诲瀷锛�</strong>${row.screeningType}</p>
+        <p><strong>绛涙煡鏃ユ湡锛�</strong>${this.formatTime(row.screeningDate)}</p>
+        <p><strong>绛涙煡缁撴灉锛�</strong><el-tag type="${
+          row.result === "姝e父"
+            ? "success"
+            : row.result === "寮傚父"
+            ? "danger"
+            : "warning"
+        }">${row.result}</el-tag></p>
+        <p><strong>璇︾粏缁撴灉锛�</strong>${row.details}</p>
+        <p><strong>椋庨櫓璇勪及锛�</strong>${this.getRiskLevelText(
+          row.riskLevel
+        )}</p>
+      </div>`,
+        "绛涙煡璇︽儏",
+        {
+          dangerouslyUseHTMLString: true,
+          customClass: "detail-dialog",
+        }
+      );
+    },
+
+    /** 鏌ョ湅鎱㈢梾璇︽儏 */
+    viewChronicDetail(row) {
+      this.$alert(
+        `<div>
+        <p><strong>鐤剧梾鍚嶇О锛�</strong>${row.diseaseName}</p>
+        <p><strong>纭瘖鏃ユ湡锛�</strong>${this.formatTime(row.diagnoseDate)}</p>
+        <p><strong>褰撳墠鐘舵�侊細</strong><el-tag type="${
+          row.status === "绋冲畾"
+            ? "success"
+            : row.status === "娲诲姩鏈�"
+            ? "warning"
+            : "danger"
+        }">${row.status}</el-tag></p>
+        <p><strong>褰撳墠娌荤枟锛�</strong>${row.currentTreatment}</p>
+        <p><strong>闅忚璁″垝锛�</strong>${row.followUpPlan}</p>
+      </div>`,
+        "鎱㈢梾璇︽儏",
+        {
+          dangerouslyUseHTMLString: true,
+          customClass: "detail-dialog",
+        }
+      );
+    },
+
+    /** 鑾峰彇椋庨櫓绛夌骇鏂囨湰 */
+    getRiskLevelText(level) {
+      const levelMap = {
+        low: "浣庨闄�",
+        medium: "涓闄�",
+        high: "楂橀闄�",
+        critical: "鍗辨��",
+      };
+      return levelMap[level] || "鏈煡";
+    },
+
+    /** 鍒锋柊绛涙煡鏁版嵁 */
+    refreshScreeningData() {
+      this.screeningLoading = true;
+      // 妯℃嫙寮傛鍔犺浇
+      setTimeout(() => {
+        this.initScreeningData();
+        this.screeningLoading = false;
+        this.$message.success("绛涙煡鏁版嵁宸插埛鏂�");
+      }, 1000);
+    },
+
+    /** 鍒锋柊鎱㈢梾鏁版嵁 */
+    refreshChronicData() {
+      this.chronicLoading = true;
+      // 妯℃嫙寮傛鍔犺浇
+      setTimeout(() => {
+        this.initChronicDiseaseData();
+        this.chronicLoading = false;
+        this.$message.success("鎱㈢梾鏁版嵁宸插埛鏂�");
+      }, 1000);
     },
     // 淇濆瓨鎮h�呮。妗�
     savefile() {
@@ -1322,7 +2359,9 @@
       if (tab.index == "1") {
         this.getList(1);
       } else if (tab.index == "2") {
-        this.newbornList();
+        console.log(1111);
+
+        this.newcharts();
       } else if (tab.index == "3") {
         this.handleClickfw();
       }
@@ -1380,15 +2419,17 @@
       this.$refs["borninfoform"].validate((valid) => {
         if (valid) {
           this.borninfoform.patId = this.id;
-
+          this.borninfoform.sex = this.userform.sex;
           newborninfoadd(this.borninfoform).then((res) => {
             if (res.code == 200) {
               this.$modal.msgSuccess("鏂板鎴愬姛");
-              this.newbornList();
+              // this.newbornList();
+              this.tzechartsInit();
               this.borninfoVisible = false;
             } else {
               this.$modal.msgError("鏂板澶辫触");
-              this.newbornList();
+              // this.newbornList();
+              this.tzechartsInit();
               this.borninfoVisible = false;
             }
           });
@@ -1625,177 +2666,275 @@
       // 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃銆�
       myxyChart.setOption(option);
     },
-    tzechartsInit() {
-      // 鑾峰彇鏁版嵁闆嗗悎
-      this.newbornList()
-        .then(() => {
-          // 妫�鏌ユ暟鎹湁鏁堟��
-          if (!this.borninfooptions || this.borninfooptions.length === 0) {
-            console.warn("娌℃湁鍙敤鐨勬柊鐢熷効鏁版嵁");
-            return;
-          }
-          // 鎵惧嚭鏈�澶х殑age鍊硷紙纭畾X杞磋寖鍥达級
-          const maxAge = Math.max(
-            ...this.borninfooptions.map((item) => parseInt(item.age) || 0)
-          );
-          if (maxAge <= 0) {
-            console.error("鏃犳晥鐨勫懆鏁版暟鎹�");
-            return;
-          }
+    // 鏂扮敓鍎垮浘琛�
+    // 鏂扮敓鍎垮浘琛� - 浣跨敤鏃堕棿杞�
+    async tzechartsInit() {
+      try {
+        // 绛夊緟鏁版嵁鍔犺浇瀹屾垚
+        await this.newbornList();
 
-          // 鍔ㄦ�佺敓鎴恱Axis鏁版嵁锛堜粠1鍛ㄥ埌鏈�澶у懆锛�
-          const xAxisData = Array.from(
-            { length: maxAge },
-            (_, i) => `${i + 1}鍛╜
+        if (!this.borninfooptions || this.borninfooptions.length === 0) {
+          console.warn("娌℃湁鍙敤鐨勬柊鐢熷効鏁版嵁");
+          return;
+        }
+
+        // 鍒濆鍖栧浘琛�
+        const myChart = echarts.init(this.tzechartdom);
+
+        // 澶勭悊鏁版嵁 - 鎸夋椂闂存帓搴�
+        const sortedData = this.borninfooptions
+          .filter((item) => item.generatedTime)
+          .sort(
+            (a, b) => new Date(a.generatedTime) - new Date(b.generatedTime)
           );
 
-          // 鍒濆鍖栨暟鎹暟缁�
-          const heightData = Array(maxAge).fill(null);
-          const headCirData = Array(maxAge).fill(null);
+        if (sortedData.length === 0) {
+          console.warn("娌℃湁鏈夋晥鐨勬椂闂存暟鎹�");
+          return;
+        }
 
-          // 閬嶅巻鎵�鏈夋暟鎹偣锛屽~鍏呭埌瀵瑰簲浣嶇疆
-          this.borninfooptions.forEach((item) => {
-            try {
-              const age = parseInt(item.age);
-              const height = parseFloat(item.height);
-              const headCir = parseFloat(item.headCir);
+        // 鍑嗗鍥捐〃鏁版嵁
+        const timeData = sortedData.map((item) => item.generatedTime);
+        const heightData = sortedData.map((item) => ({
+          name: item.generatedTime,
+          value: [item.generatedTime, item.height || null],
+        }));
+        const headCirData = sortedData.map((item) => ({
+          name: item.generatedTime,
+          value: [item.generatedTime, item.headCir || null],
+        }));
+        const weightData = sortedData.map((item) => ({
+          name: item.generatedTime,
+          value: [item.generatedTime, item.weight || null],
+        }));
 
-              // 纭繚鏁版嵁鏈夋晥涓斿懆鏁板湪鑼冨洿鍐�
-              if (age > 0 && age <= maxAge) {
-                const weekIndex = age - 1;
-                if (!isNaN(height)) heightData[weekIndex] = height;
-                if (!isNaN(headCir)) headCirData[weekIndex] = headCir;
-              }
-            } catch (e) {
-              console.error("鏁版嵁澶勭悊閿欒:", e);
-            }
-          });
-
-          // 鑾峰彇鎮h�呭鍚嶏紙浣跨敤绗竴鏉℃湁鏁堟暟鎹級
-          const patientName = this.borninfooptions[0]?.name || "鏈煡";
-
-          // 鍒濆鍖栧浘琛�
-          const myxyChart = echarts.init(this.tzechartdom);
-          const option = {
-            title: {
-              text: `${patientName}鐢熼暱鍙戣偛鎸囨爣鍥綻,
-              left: "center",
+        const option = {
+          title: {
+            text: "鏂扮敓鍎跨敓闀垮彂鑲茶秼鍔垮浘",
+            left: "center",
+            textStyle: {
+              fontSize: 16,
+              fontWeight: "bold",
             },
-            tooltip: {
-              trigger: "axis",
-              formatter: function (params) {
-                let result = params[0].axisValue + "<br/>";
-                params.forEach((item) => {
-                  const value = item.value !== null ? item.value : "鏆傛棤鏁版嵁";
-                  result += `${item.marker} ${item.seriesName}: ${value}<br/>`;
-                });
-                return result;
+          },
+          tooltip: {
+            trigger: "axis",
+            formatter: function (params) {
+              let result = `${params[0].name}<br/>`;
+              params.forEach((item) => {
+                if (item.value && item.value[1] !== null) {
+                  const unit =
+                    item.seriesName.includes("韬暱") ||
+                    item.seriesName.includes("澶村洿")
+                      ? "cm"
+                      : item.seriesName.includes("浣撻噸")
+                      ? "kg"
+                      : "";
+                  result += `${item.marker} ${item.seriesName}: ${item.value[1]} ${unit}<br/>`;
+                }
+              });
+              return result;
+            },
+          },
+          legend: {
+            data: ["韬暱", "澶村洿", "浣撻噸"],
+            bottom: 10,
+          },
+          grid: {
+            left: "3%",
+            right: "4%",
+            bottom: "15%",
+            top: "15%",
+            containLabel: true,
+          },
+          toolbox: {
+            feature: {
+              saveAsImage: {
+                title: "淇濆瓨鍥剧墖",
+                pixelRatio: 2,
               },
-            },
-            legend: {
-              data: ["韬珮(cm)", "澶村洿(cm)"],
-              bottom: 10,
-            },
-            grid: {
-              left: "3%",
-              right: "4%",
-              bottom: "15%", // 涓哄浘渚嬬暀鍑虹┖闂�
-              containLabel: true,
-            },
-            toolbox: {
-              feature: {
-                saveAsImage: {
-                  title: "淇濆瓨鍥剧墖",
-                  pixelRatio: 2,
-                },
-                dataView: {
-                  title: "鏁版嵁瑙嗗浘",
-                  readOnly: true,
+              dataView: {
+                title: "鏁版嵁瑙嗗浘",
+                readOnly: true,
+                lang: ["鏁版嵁瑙嗗浘", "鍏抽棴", "鍒锋柊"],
+              },
+              dataZoom: {
+                yAxisIndex: "none",
+                title: {
+                  zoom: "鍖哄煙缂╂斁",
+                  back: "鍖哄煙缂╂斁杩樺師",
                 },
               },
-              right: 20,
             },
-            xAxis: {
-              type: "category",
-              boundaryGap: false,
-              data: xAxisData,
-              axisLabel: {
-                interval: 0, // 鏄剧ず鎵�鏈夋爣绛�
-                rotate: 30, // 鏍囩鏃嬭浆闃叉閲嶅彔
+            right: 20,
+            top: 10,
+          },
+          dataZoom: [
+            {
+              type: "inside",
+              xAxisIndex: [0],
+              start: 0,
+              end: 100,
+            },
+            {
+              type: "slider",
+              xAxisIndex: [0],
+              start: 0,
+              end: 100,
+              bottom: 0,
+              height: 20,
+            },
+          ],
+          xAxis: {
+            type: "time", // 浣跨敤鏃堕棿杞碵1,3](@ref)
+            name: "璁板綍鏃堕棿",
+            nameLocation: "middle",
+            nameGap: 30,
+            axisLabel: {
+              formatter: {
+                year: "{yyyy}",
+                month: "{MM}/{dd}",
+                day: "{MM}/{dd}",
+                hour: "{MM}/{dd}",
+              },
+              rotate: 45,
+            },
+            splitLine: {
+              show: true,
+              lineStyle: {
+                type: "dashed",
               },
             },
-            yAxis: {
+          },
+          yAxis: [
+            {
               type: "value",
+              name: "韬暱/澶村洿(cm)",
+              position: "left",
               axisLabel: {
                 formatter: "{value} cm",
               },
+              splitLine: {
+                show: true,
+                lineStyle: {
+                  type: "dashed",
+                },
+              },
             },
-            series: [
-              {
-                name: "韬珮",
-                type: "line",
-                data: heightData,
-                symbol: "circle",
-                symbolSize: 8,
-                itemStyle: {
-                  color: "#5470C6",
-                },
-                lineStyle: {
-                  width: 3,
-                },
-                connectNulls: true, // 杩炴帴绌哄��
+            {
+              type: "value",
+              name: "浣撻噸(kg)",
+              position: "right",
+              axisLabel: {
+                formatter: "{value} kg",
               },
-              {
-                name: "澶村洿",
-                type: "line",
-                data: headCirData,
-                symbol: "circle",
-                symbolSize: 8,
-                itemStyle: {
-                  color: "#91CC75",
-                },
-                lineStyle: {
-                  width: 3,
-                },
-                connectNulls: true, // 杩炴帴绌哄��
+              splitLine: {
+                show: false,
               },
-            ],
-            animationDuration: 1000, // 鍔ㄧ敾鏃堕暱
-          };
+            },
+          ],
+          series: [
+            {
+              name: "韬暱",
+              type: "line",
+              yAxisIndex: 0,
+              data: heightData,
+              smooth: true, // 骞虫粦鏇茬嚎[1](@ref)
+              symbol: "circle",
+              symbolSize: 6,
+              itemStyle: {
+                color: "#5470C6",
+              },
+              lineStyle: {
+                width: 3,
+              },
+              markPoint: {
+                data: [
+                  { type: "max", name: "鏈�澶у��" },
+                  { type: "min", name: "鏈�灏忓��" },
+                ],
+              },
+              connectNulls: true,
+            },
+            {
+              name: "澶村洿",
+              type: "line",
+              yAxisIndex: 0,
+              data: headCirData,
+              smooth: true,
+              symbol: "circle",
+              symbolSize: 6,
+              itemStyle: {
+                color: "#91CC75",
+              },
+              lineStyle: {
+                width: 3,
+              },
+              markPoint: {
+                data: [
+                  { type: "max", name: "鏈�澶у��" },
+                  { type: "min", name: "鏈�灏忓��" },
+                ],
+              },
+              connectNulls: true,
+            },
+            {
+              name: "浣撻噸",
+              type: "line",
+              yAxisIndex: 1,
+              data: weightData,
+              smooth: true,
+              symbol: "circle",
+              symbolSize: 6,
+              itemStyle: {
+                color: "#EE6666",
+              },
+              lineStyle: {
+                width: 3,
+              },
+              markPoint: {
+                data: [
+                  { type: "max", name: "鏈�澶у��" },
+                  { type: "min", name: "鏈�灏忓��" },
+                ],
+              },
+              connectNulls: true,
+            },
+          ],
+          animationDuration: 1000,
+        };
 
-          // 浣跨敤閰嶇疆椤规樉绀哄浘琛�
-          myxyChart.setOption(option);
+        // 浣跨敤閰嶇疆椤规樉绀哄浘琛�
+        myChart.setOption(option);
 
-          // 绐楀彛澶у皬鍙樺寲鏃堕噸鏂拌皟鏁村浘琛ㄥぇ灏�
-          const resizeHandler = () => myxyChart.resize();
-          window.addEventListener("resize", resizeHandler);
+        // 绐楀彛澶у皬鍙樺寲鏃堕噸鏂拌皟鏁村浘琛ㄥぇ灏�
+        const resizeHandler = () => myChart.resize();
+        window.addEventListener("resize", resizeHandler);
 
-          // 鍦ㄧ粍浠堕攢姣佹椂绉婚櫎浜嬩欢鐩戝惉锛堝鏋滄槸Vue/React缁勪欢锛�
-          this.$once("hook:beforeDestroy", () => {
-            window.removeEventListener("resize", resizeHandler);
-            myxyChart.dispose();
-          });
-        })
-        .catch((error) => {
-          console.error("鍔犺浇鏁版嵁澶辫触:", error);
+        // 鍦ㄧ粍浠堕攢姣佹椂绉婚櫎浜嬩欢鐩戝惉
+        this.$once("hook:beforeDestroy", () => {
+          window.removeEventListener("resize", resizeHandler);
+          myChart.dispose();
         });
+      } catch (error) {
+        console.error("鍔犺浇鍥捐〃澶辫触:", error);
+      }
     },
 
-    // 鑾峰彇鏂扮敓鍎挎暟鎹�
-    newbornList() {
-      return newborninfolist({ patId: this.id })
-        .then((response) => {
-          this.borninfooptions = response.rows || [];
-
-          this.newcharts();
-          console.log("鍔犺浇鐨勬柊鐢熷効鏁版嵁:", this.borninfooptions);
-          return Promise.resolve();
-        })
-        .catch((error) => {
-          console.error("璇锋眰鏁版嵁澶辫触:", error);
-          this.borninfooptions = [];
-          return Promise.reject(error);
-        });
+    async newbornList() {
+      try {
+        const response = await newborninfolist({ patId: this.id });
+        this.borninfooptions = (response.rows || []).map((item) => ({
+          ...item,
+          // 纭繚鏃堕棿鏍煎紡姝g‘
+          generatedTime: item.generatedTime || item.createTime,
+          editing: false,
+        }));
+        console.log("鍔犺浇鐨勬柊鐢熷効鏁版嵁:", this.borninfooptions);
+      } catch (error) {
+        console.error("璇锋眰鏁版嵁澶辫触:", error);
+        this.borninfooptions = [];
+      }
     },
     // 蹇冪巼
     xlechartsInit() {
@@ -2018,6 +3157,74 @@
       // 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃銆�
       myxyChart.setOption(option);
     },
+    // 鏂扮敓鍎挎暟鎹紪杈�
+    // 缂栬緫琛�
+    handleEdit(row) {
+      this.$set(row, "editing", true);
+      // 澶囦唤鍘熷鏁版嵁鐢ㄤ簬鍙栨秷鎿嶄綔
+      this.$set(row, "originalData", { ...row });
+    },
+
+    // 淇濆瓨琛�
+    handleSave(row) {
+      this.$set(row, "editing", false);
+      // 璋冪敤API淇濆瓨鏁版嵁
+      this.saveNewbornData(row);
+    },
+
+    // 鍙栨秷缂栬緫
+    handleCancel(row) {
+      this.$set(row, "editing", false);
+      // 鎭㈠鍘熷鏁版嵁
+      if (row.originalData) {
+        Object.assign(row, row.originalData);
+        delete row.originalData;
+      }
+    },
+
+    // 鍒犻櫎琛�
+    handleDelete(index, row) {
+      this.$confirm("纭畾瑕佸垹闄よ繖鏉¤褰曞悧锛�", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          // 璋冪敤API鍒犻櫎鏁版嵁
+          newborninforemove(row.id).then(() => {
+            this.borninfooptions.splice(index, 1);
+            this.$message.success("鍒犻櫎鎴愬姛");
+            // 閲嶆柊娓叉煋鍥捐〃
+            this.tzechartsInit();
+          });
+        })
+        .catch(() => {});
+    },
+
+    // 淇濆瓨鏁版嵁鍒板悗绔�
+    async saveNewbornData(data) {
+      try {
+        const response = await newborninfoedit(data);
+        if (response.code === 200) {
+          this.$message.success("淇濆瓨鎴愬姛");
+          // 閲嶆柊鍔犺浇鏁版嵁骞跺埛鏂板浘琛�
+          await this.newbornList();
+          this.tzechartsInit();
+        } else {
+          this.$message.error("淇濆瓨澶辫触");
+        }
+      } catch (error) {
+        console.error("淇濆瓨鏁版嵁澶辫触:", error);
+        this.$message.error("淇濆瓨澶辫触");
+      }
+    },
+
+    // 鍒犻櫎鏁版嵁
+    async deleteNewbornData(id) {
+      // 瀹炵幇鍒犻櫎API璋冪敤
+      // 杩欓噷闇�瑕佹牴鎹綘鐨勫悗绔帴鍙e疄鐜�
+      return Promise.resolve();
+    },
   },
 };
 </script>
@@ -2050,6 +3257,81 @@
       font-size: 20px;
       font-weight: 500;
       color: #ecfcfc;
+    }
+  }
+}
+.screening-summary,
+.chronic-disease-summary {
+  background: #ffffff;
+  border: 1px solid #e6e6e6;
+  border-radius: 4px;
+  margin-bottom: 20px;
+
+  .summary-header {
+    display: flex;
+    align-items: center;
+    padding: 12px 15px;
+    background: #f5f7fa;
+    border-bottom: 1px solid #e6e6e6;
+    font-weight: 600;
+    color: #333;
+
+    i {
+      margin-right: 8px;
+      color: #409eff;
+    }
+  }
+
+  .summary-content {
+    padding: 15px;
+
+    .summary-stats {
+      margin-top: 15px;
+      padding-top: 15px;
+      border-top: 1px dashed #e6e6e6;
+
+      .stat-item {
+        text-align: center;
+
+        .stat-value {
+          font-size: 24px;
+          font-weight: bold;
+          margin-bottom: 5px;
+        }
+
+        .stat-label {
+          font-size: 12px;
+          color: #909399;
+        }
+      }
+    }
+  }
+}
+
+/* 璇︽儏瀵硅瘽妗嗘牱寮� */
+:deep(.detail-dialog) {
+  .el-message-box__message {
+    p {
+      margin: 10px 0;
+      line-height: 1.6;
+    }
+
+    strong {
+      color: #333;
+      min-width: 80px;
+      display: inline-block;
+    }
+  }
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 1200px) {
+  .screening-summary,
+  .chronic-disease-summary {
+    .summary-content {
+      .el-table {
+        font-size: 12px;
+      }
     }
   }
 }
@@ -2153,4 +3435,24 @@
 ::v-deep.el-table .warning-row {
   background: oldlace;
 }
+/* 鎿嶄綔鎸夐挳缁勬牱寮� */
+.summary-header .el-button-group {
+  margin-left: auto;
+}
+
+/* 瀵硅瘽妗嗚〃鍗曟牱寮� */
+.el-dialog .el-form-item {
+  margin-bottom: 20px;
+}
+
+/* 缁熻鏁板瓧鏍峰紡浼樺寲 */
+.stat-item {
+  cursor: pointer;
+  transition: all 0.3s;
+}
+
+.stat-item:hover {
+  background-color: #f5f7fa;
+  border-radius: 4px;
+}
 </style>

--
Gitblit v1.9.3