WXL
19 小时以前 9b2c74ee4f08fad01c2a16bc6e36df073bfa1dd5
src/views/business/maintain/maintainInfo.vue
@@ -1,7 +1,8 @@
<template>
  <div class="maintenance-detail">
    <case-basic-info :case-id="caseId" :show-attachment="true" />
    <!-- 基础信息 -->
    <el-card class="detail-card">
    <!-- <el-card class="detail-card">
      <div slot="header" class="clearfix">
        <span class="detail-title">供者基本信息</span>
        <el-button type="success" style="float: right;" @click="handleSave">
@@ -140,11 +141,11 @@
          />
        </el-form-item>
      </el-form>
    </el-card>
    </el-card> -->
    <el-card class="assessment-card">
      <div slot="header" class="clearfix">
        <span class="detail-title">供者评估各项记录</span>
        <span class="detail-title">评估各项记录</span>
        <el-button
          type="primary"
          size="mini"
@@ -234,40 +235,7 @@
            </el-table>
          </el-card>
        </el-tab-pane>
        <!-- 肝功能肾功能 -->
        <el-tab-pane label="肝功能肾功能" name="liverKidney">
          <liver-kidney-panel
            ref="liverKidney"
            :initial-data="assessmentData.liverKidney"
            :is-editing="isEdit && activeTab === 'liverKidney'"
            @data-change="handleLiverKidneyDataChange"
          />
        </el-tab-pane>
        <!-- 血常规 -->
        <el-tab-pane label="血常规" name="bloodRoutine">
          <blood-routine-panel
            ref="bloodRoutine"
            :initial-data="assessmentData.bloodRoutine"
            :is-editing="isEdit && activeTab === 'bloodRoutine'"
            @data-change="handleBloodRoutineDataChange"
          />
        </el-tab-pane>
        <!-- 尿常规 -->
        <el-tab-pane label="尿常规" name="urineRoutine">
          <urine-routine-panel
            ref="urineRoutine"
            :initial-data="assessmentData.urineRoutine"
            :is-editing="isEdit && activeTab === 'urineRoutine'"
            @data-change="handleUrineRoutineDataChange"
          />
        </el-tab-pane>
      </el-tabs>
    </el-card>
    <!-- 护理核查记录 -->
        <el-tab-pane label="护理核查记录" name="hlihc">
    <el-card class="record-card">
      <div slot="header" class="clearfix">
        <span class="detail-title">护理核查记录</span>
@@ -304,7 +272,9 @@
        <el-table-column label="附件" align="center" width="120">
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.attachments && scope.row.attachments.length > 0"
                    v-if="
                      scope.row.attachments && scope.row.attachments.length > 0
                    "
              size="mini"
              type="text"
              @click="handleViewRecordAttachments(scope.row)"
@@ -340,6 +310,41 @@
        </el-table-column>
      </el-table>
    </el-card>
        </el-tab-pane>
        <!-- 肝功能肾功能 -->
        <el-tab-pane label="肝功能肾功能" name="liverKidney">
          <liver-kidney-panel
            ref="liverKidney"
            :initial-data="assessmentData.liverKidney"
            :is-editing="isEdit && activeTab === 'liverKidney'"
            @data-change="handleLiverKidneyDataChange"
          />
        </el-tab-pane>
        <!-- 血常规 -->
        <el-tab-pane label="血常规" name="bloodRoutine">
          <blood-routine-panel
            ref="bloodRoutine"
            :initial-data="assessmentData.bloodRoutine"
            :is-editing="isEdit && activeTab === 'bloodRoutine'"
            @data-change="handleBloodRoutineDataChange"
          />
        </el-tab-pane>
        <!-- 尿常规 -->
        <el-tab-pane label="尿常规" name="urineRoutine">
          <urine-routine-panel
            ref="urineRoutine"
            :initial-data="assessmentData.urineRoutine"
            :is-editing="isEdit && activeTab === 'urineRoutine'"
            @data-change="handleUrineRoutineDataChange"
          />
        </el-tab-pane>
      </el-tabs>
    </el-card>
    <!-- 护理核查记录 -->
    <!-- 培养记录编辑对话框 -->
    <el-dialog
@@ -569,6 +574,8 @@
import LiverKidneyPanel from "@/components/MaintainComponents/LiverKidneyPanel.vue";
import BloodRoutinePanel from "@/components/MaintainComponents/BloodRoutinePanel.vue";
import UrineRoutinePanel from "@/components/MaintainComponents/UrineRoutinePanel.vue";
import CaseBasicInfo from "@/components/CaseBasicInfo";
import store from "@/store";
import dayjs from "dayjs";
export default {
@@ -579,7 +586,8 @@
    FilePreviewDialog,
    LiverKidneyPanel,
    BloodRoutinePanel,
    UrineRoutinePanel
    UrineRoutinePanel,
    CaseBasicInfo
  },
  dicts: [
    "sys_donornode",
@@ -592,7 +600,8 @@
  data() {
    return {
      isEdit: false,
      caseId: null,
      isEdit: true,
      currentMaintenanceId: null,
      isEditMode: false,
      form: {
@@ -686,7 +695,8 @@
      // 附件相关配置
      attachmentLimit: 10,
      attachmentAccept: ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt",
      attachmentAccept:
        ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt",
      // 评估数据存储
      assessmentData: {
@@ -699,6 +709,8 @@
    };
  },
  created() {
    this.caseId = this.$route.query.infoid;
    this.loadMaintenanceData();
  },
  watch: {
@@ -808,10 +820,13 @@
        if (response.code === 200) {
          this.$message.success("保存成功");
          this.isEdit = false;
          this.donatebaseinfoEdit({
            id: this.$route.query.infoid,
            extracontent: JSON.stringify(this.extracontentinfo)
          });
          if (!this.currentMaintenanceId) {
            this.currentMaintenanceId = response.data;
          }
          // this.donatebaseinfoEdit({
          //   id: this.$route.query.infoid,
          //   extracontent: JSON.stringify(this.extracontentinfo)
          // });
          if (!this.isEditMode && response.data && response.data.id) {
            this.currentMaintenanceId = response.data.id;
            this.isEditMode = true;
@@ -853,14 +868,16 @@
    handleEditCulture(row) {
      this.cultureDialogTitle = "编辑培养记录";
      this.cultureForm = { ...row };
      this.cultureFileList = row.attachments ? row.attachments.map(item => ({
      this.cultureFileList = row.attachments
        ? row.attachments.map(item => ({
        uid: item.id || Math.random(),
        name: item.fileName,
        fileSize: item.fileSize,
        url: item.path || item.fileUrl,
        uploadTime: item.uploadTime,
        status: "success"
      })) : [];
          }))
        : [];
      this.cultureDialogVisible = true;
      this.$nextTick(() => {
        this.$refs.cultureForm && this.$refs.cultureForm.clearValidate();
@@ -915,7 +932,7 @@
          .toISOString()
          .replace("T", " ")
          .substring(0, 19),
        recorder: "当前用户",
        recorder: store.getters.name,
        checkRecord: "",
        attachments: []
      };
@@ -929,14 +946,16 @@
    handleEditRecord(row) {
      this.recordDialogTitle = "编辑护理核查记录";
      this.recordForm = { ...row };
      this.recordFileList = row.attachments ? row.attachments.map(item => ({
      this.recordFileList = row.attachments
        ? row.attachments.map(item => ({
        uid: item.id || Math.random(),
        name: item.fileName,
        fileSize: item.fileSize,
        url: item.path || item.fileUrl,
        uploadTime: item.uploadTime,
        status: "success"
      })) : [];
          }))
        : [];
      this.recordDialogVisible = true;
      this.$nextTick(() => {
        this.$refs.recordForm && this.$refs.recordForm.clearValidate();
@@ -1113,7 +1132,10 @@
    /** 获取文件类型 */
    getFileType(fileName) {
      if (!fileName) return "other";
      const extension = fileName.split(".").pop().toLowerCase();
      const extension = fileName
        .split(".")
        .pop()
        .toLowerCase();
      const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"];
      const pdfTypes = ["pdf"];
      const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"];
@@ -1167,7 +1189,10 @@
    /** 获取文件扩展名 */
    getFileExtension(filename) {
      return filename.split(".").pop().toLowerCase();
      return filename
        .split(".")
        .pop()
        .toLowerCase();
    },
    /** 格式化文件大小 */