WXL
22 小时以前 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,6 +235,82 @@
            </el-table>
          </el-card>
        </el-tab-pane>
        <el-tab-pane label="护理核查记录" name="hlihc">
          <el-card class="record-card">
            <div slot="header" class="clearfix">
              <span class="detail-title">护理核查记录</span>
              <el-button
                type="primary"
                size="mini"
                icon="el-icon-plus"
                @click="handleAddRecord"
              >
                新增核查记录
              </el-button>
            </div>
            <el-table :data="recordList" v-loading="recordLoading">
              <el-table-column
                label="核查时间"
                align="center"
                prop="recordTime"
                width="160"
              />
              <el-table-column
                label="核查人"
                align="center"
                prop="recorder"
                width="100"
              />
              <el-table-column
                label="核查记录"
                align="center"
                prop="checkRecord"
                min-width="200"
                show-overflow-tooltip
              />
              <el-table-column label="附件" align="center" width="120">
                <template slot-scope="scope">
                  <el-button
                    v-if="
                      scope.row.attachments && scope.row.attachments.length > 0
                    "
                    size="mini"
                    type="text"
                    @click="handleViewRecordAttachments(scope.row)"
                  >
                    查看附件({{ scope.row.attachments.length }})
                  </el-button>
                  <span v-else>无附件</span>
                </template>
              </el-table-column>
              <el-table-column
                label="操作"
                align="center"
                width="180"
                class-name="small-padding fixed-width"
              >
                <template slot-scope="scope">
                  <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-edit"
                    @click="handleEditRecord(scope.row)"
                    >编辑</el-button
                  >
                  <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-delete"
                    style="color: #F56C6C;"
                    @click="handleDeleteRecord(scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
          </el-card>
        </el-tab-pane>
        <!-- 肝功能肾功能 -->
        <el-tab-pane label="肝功能肾功能" name="liverKidney">
@@ -268,78 +345,6 @@
    </el-card>
    <!-- 护理核查记录 -->
    <el-card class="record-card">
      <div slot="header" class="clearfix">
        <span class="detail-title">护理核查记录</span>
        <el-button
          type="primary"
          size="mini"
          icon="el-icon-plus"
          @click="handleAddRecord"
        >
          新增核查记录
        </el-button>
      </div>
      <el-table :data="recordList" v-loading="recordLoading">
        <el-table-column
          label="核查时间"
          align="center"
          prop="recordTime"
          width="160"
        />
        <el-table-column
          label="核查人"
          align="center"
          prop="recorder"
          width="100"
        />
        <el-table-column
          label="核查记录"
          align="center"
          prop="checkRecord"
          min-width="200"
          show-overflow-tooltip
        />
        <el-table-column label="附件" align="center" width="120">
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.attachments && scope.row.attachments.length > 0"
              size="mini"
              type="text"
              @click="handleViewRecordAttachments(scope.row)"
            >
              查看附件({{ scope.row.attachments.length }})
            </el-button>
            <span v-else>无附件</span>
          </template>
        </el-table-column>
        <el-table-column
          label="操作"
          align="center"
          width="180"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleEditRecord(scope.row)"
              >编辑</el-button
            >
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              style="color: #F56C6C;"
              @click="handleDeleteRecord(scope.row)"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </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 => ({
        uid: item.id || Math.random(),
        name: item.fileName,
        fileSize: item.fileSize,
        url: item.path || item.fileUrl,
        uploadTime: item.uploadTime,
        status: "success"
      })) : [];
      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 => ({
        uid: item.id || Math.random(),
        name: item.fileName,
        fileSize: item.fileSize,
        url: item.path || item.fileUrl,
        uploadTime: item.uploadTime,
        status: "success"
      })) : [];
      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();
    },
    /** 格式化文件大小 */