WXL
昨天 c8e9849cb5f24848df0174c13bfbbff37bb08a5a
src/views/business/maintain/maintainInfo.vue
@@ -52,20 +52,55 @@
              />
              <el-table-column label="培养结果" align="center" prop="result">
                <template slot-scope="scope">
                  <!-- 阳性结果带悬浮提示 -->
                  <el-tooltip
                    v-if="
                      scope.row.result === '阳性' && scope.row.positiveDetails
                    "
                    effect="light"
                    placement="top"
                    :open-delay="200"
                    popper-class="custom-positive-tooltip"
                  >
                    <div slot="content">
                      <div
                        style="font-weight: bold; color: #f56c6c; margin-bottom: 8px;"
                      >
                        <i class="el-icon-warning"></i> 阳性结果详情
                      </div>
                      <div
                        style="color: #606266; line-height: 1.6; white-space: pre-wrap;"
                      >
                        {{ scope.row.positiveDetails }}
                      </div>
                    </div>
                    <el-tag
                      type="danger"
                      effect="plain"
                      @click="handleResultClick(scope.row)"
                      style="cursor: pointer;"
                    >
                      {{ scope.row.result }}
                      <i class="el-icon-info" style="margin-left: 4px;"></i>
                    </el-tag>
                  </el-tooltip>
                  <!-- 阳性但没有详情的 -->
                  <el-tag
                    :type="scope.row.result === '阴性' ? 'success' : 'danger'"
                    v-else-if="
                      scope.row.result === '阳性' && !scope.row.positiveDetails
                    "
                    type="danger"
                    effect="plain"
                    @click="handleResultClick(scope.row)"
                    style="cursor: pointer;"
                  >
                    {{ scope.row.result }}
                    <i
                      v-if="
                        scope.row.result === '阳性' && scope.row.positiveDetails
                      "
                      class="el-icon-info"
                      style="margin-left: 4px;"
                    ></i>
                  </el-tag>
                  <!-- 阴性结果 -->
                  <el-tag v-else type="success" effect="plain">
                    {{ scope.row.result }}
                  </el-tag>
                </template>
              </el-table-column>
@@ -215,6 +250,30 @@
            :initial-data="assessmentData.urineRoutine"
            :is-editing="isEdit && activeTab === 'urineRoutine'"
            @data-change="handleUrineRoutineDataChange"
          />
        </el-tab-pane>
        <el-tab-pane label="心脏化验" name="heartLab">
          <heart-lab-panel
            ref="heartLab"
            :initial-data="assessmentData.heartLab"
            :is-editing="isEdit && activeTab === 'heartLab'"
            @data-change="handleHeartLabDataChange"
          />
        </el-tab-pane>
        <el-tab-pane label="肺脏化验" name="lungLab">
          <lung-lab-panel
            ref="lungLab"
            :initial-data="assessmentData.lungLab"
            :is-editing="isEdit && activeTab === 'lungLab'"
            @data-change="handleLungLabDataChange"
          />
        </el-tab-pane>
        <el-tab-pane label="胰腺化验" name="pancreasLab">
          <pancreas-lab-panel
            ref="pancreasLab"
            :initial-data="assessmentData.pancreasLab"
            :is-editing="isEdit && activeTab === 'pancreasLab'"
            @data-change="handlePancreasLabDataChange"
          />
        </el-tab-pane>
      </el-tabs>
@@ -463,6 +522,9 @@
import LiverKidneyPanel from "@/components/MaintainComponents/LiverKidneyPanel.vue";
import BloodRoutinePanel from "@/components/MaintainComponents/BloodRoutinePanel.vue";
import UrineRoutinePanel from "@/components/MaintainComponents/UrineRoutinePanel.vue";
import HeartLabPanel from "@/components/MaintainComponents/HeartLabPanel.vue";
import LungLabPanel from "@/components/MaintainComponents/LungLabPanel.vue";
import PancreasLabPanel from "@/components/MaintainComponents/PancreasLabPanel.vue";
import CaseBasicInfo from "@/components/CaseBasicInfo";
import store from "@/store";
import dayjs from "dayjs";
@@ -476,7 +538,10 @@
    LiverKidneyPanel,
    BloodRoutinePanel,
    UrineRoutinePanel,
    CaseBasicInfo
    CaseBasicInfo,
    HeartLabPanel,
    LungLabPanel,
    PancreasLabPanel
  },
  dicts: [
    "sys_donornode",
@@ -595,6 +660,9 @@
        liverKidney: {},
        bloodRoutine: {},
        urineRoutine: {},
        heartLab: {}, // 新增
        lungLab: {}, // 新增
        pancreasLab: {}, // 新增
        cultureResults: [],
        nursingRecords: []
      }
@@ -668,6 +736,15 @@
              if (itemDescData.urineRoutine) {
                this.assessmentData.urineRoutine = itemDescData.urineRoutine;
              }
              if (itemDescData.heartLab) {
                this.assessmentData.heartLab = itemDescData.heartLab;
              }
              if (itemDescData.lungLab) {
                this.assessmentData.lungLab = itemDescData.lungLab;
              }
              if (itemDescData.pancreasLab) {
                this.assessmentData.pancreasLab = itemDescData.pancreasLab;
              }
            } catch (error) {
              console.error("解析itemDesc JSON失败:", error);
            }
@@ -735,6 +812,9 @@
            liverKidney: this.assessmentData.liverKidney,
            bloodRoutine: this.assessmentData.bloodRoutine,
            urineRoutine: this.assessmentData.urineRoutine,
            heartLab: this.assessmentData.heartLab, // 新增
            lungLab: this.assessmentData.lungLab, // 新增
            pancreasLab: this.assessmentData.pancreasLab, // 新增
            cultureResults: this.cultureList,
            nursingRecords: this.recordList
          }
@@ -773,7 +853,16 @@
        this.$message.error("保存失败");
      }
    },
    // 5. 在 methods 中添加数据处理方法
    handleHeartLabDataChange(data) {
      this.assessmentData.heartLab = data;
    },
    handleLungLabDataChange(data) {
      this.assessmentData.lungLab = data;
    },
    handlePancreasLabDataChange(data) {
      this.assessmentData.pancreasLab = data;
    },
    // 切换编辑模式
    toggleEditMode() {
      // this.isEdit = !this.isEdit;
@@ -1274,4 +1363,7 @@
  color: #f56c6c;
  font-weight: bold;
}
.custom-positive-tooltip {
  max-width: 400px;
}
</style>