| | |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">评估各项记录</span> |
| | | <el-button |
| | | v-if="!isReadOnly" |
| | | type="primary" |
| | | size="mini" |
| | | :loading="saveLoading" |
| | | @click="toggleEditMode" |
| | | style="float: right;margin-left: 20px;" |
| | | > |
| | | 保存编辑 |
| | | </el-button> |
| | | <el-button |
| | | v-if="!isReadOnly" |
| | | type="success" |
| | | size="mini" |
| | | :loading="saveLoading" |
| | | @click="accomplish" |
| | | style="float: right;margin-left: 20px;" |
| | | > |
| | |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">培养结果记录</span> |
| | | <el-button |
| | | v-if="!isReadOnly" |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-plus" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="!isReadOnly" |
| | | label="操作" |
| | | align="center" |
| | | width="200" |
| | |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">护理核查记录</span> |
| | | <el-button |
| | | v-if="!isReadOnly" |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-plus" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="!isReadOnly" |
| | | label="操作" |
| | | align="center" |
| | | width="180" |
| | |
| | | <liver-kidney-panel |
| | | ref="liverKidney" |
| | | :initial-data="assessmentData.liverKidney" |
| | | :is-editing="isEdit && activeTab === 'liverKidney'" |
| | | :is-editing="!isReadOnly && isEdit && activeTab === 'liverKidney'" |
| | | @data-change="handleLiverKidneyDataChange" |
| | | /> |
| | | </el-tab-pane> |
| | |
| | | <blood-routine-panel |
| | | ref="bloodRoutine" |
| | | :initial-data="assessmentData.bloodRoutine" |
| | | :is-editing="isEdit && activeTab === 'bloodRoutine'" |
| | | :is-editing="!isReadOnly && isEdit && activeTab === 'bloodRoutine'" |
| | | @data-change="handleBloodRoutineDataChange" |
| | | /> |
| | | </el-tab-pane> |
| | |
| | | <urine-routine-panel |
| | | ref="urineRoutine" |
| | | :initial-data="assessmentData.urineRoutine" |
| | | :is-editing="isEdit && activeTab === 'urineRoutine'" |
| | | :is-editing="!isReadOnly && isEdit && activeTab === 'urineRoutine'" |
| | | @data-change="handleUrineRoutineDataChange" |
| | | /> |
| | | </el-tab-pane> |
| | |
| | | <heart-lab-panel |
| | | ref="heartLab" |
| | | :initial-data="assessmentData.heartLab" |
| | | :is-editing="isEdit && activeTab === 'heartLab'" |
| | | :is-editing="!isReadOnly && isEdit && activeTab === 'heartLab'" |
| | | @data-change="handleHeartLabDataChange" |
| | | /> |
| | | </el-tab-pane> |
| | |
| | | <lung-lab-panel |
| | | ref="lungLab" |
| | | :initial-data="assessmentData.lungLab" |
| | | :is-editing="isEdit && activeTab === 'lungLab'" |
| | | :is-editing="!isReadOnly && isEdit && activeTab === 'lungLab'" |
| | | @data-change="handleLungLabDataChange" |
| | | /> |
| | | </el-tab-pane> |
| | |
| | | <pancreas-lab-panel |
| | | ref="pancreasLab" |
| | | :initial-data="assessmentData.pancreasLab" |
| | | :is-editing="isEdit && activeTab === 'pancreasLab'" |
| | | :is-editing="!isReadOnly && isEdit && activeTab === 'pancreasLab'" |
| | | @data-change="handlePancreasLabDataChange" |
| | | /> |
| | | </el-tab-pane> |
| | |
| | | |
| | | <script> |
| | | import { maintainList, maintainedit, maintainAdd } from "@/api/businessApi"; |
| | | import { getDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | import Pagination from "@/components/Pagination"; |
| | | import UploadAttachment from "@/components/UploadAttachment"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | |
| | | isEdit: true, |
| | | currentMaintenanceId: null, |
| | | isEditMode: false, |
| | | saveLoading: false, |
| | | form: { |
| | | id: undefined, |
| | | caseNo: "", |
| | |
| | | watch: { |
| | | $route(to, from) { |
| | | this.loadMaintenanceData(); |
| | | } |
| | | }, |
| | | computed: { |
| | | // 查看模式:只读,禁用表单并隐藏保存按钮 |
| | | isReadOnly() { |
| | | return this.$route.query.mode === "view"; |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | // 保存所有数据 |
| | | async handleSave() { |
| | | if (this.saveLoading) return; |
| | | this.saveLoading = true; |
| | | try { |
| | | // 新增时校验是否已有相同患者 |
| | | if (!this.currentMaintenanceId) { |
| | | const exists = await this.checkPatientExists(); |
| | | if (exists) { |
| | | this.$message.warning("该患者已存在,请勿重复添加"); |
| | | return; |
| | | } |
| | | } |
| | | const saveData = { |
| | | ...this.form, |
| | | itemDesc: { |
| | |
| | | } catch (error) { |
| | | console.error("保存数据失败:", error); |
| | | this.$message.error("保存失败"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | }, |
| | | // 新增时校验是否已有相同患者(按住院号) |
| | | async checkPatientExists() { |
| | | let inpatientno = this.form.inpatientno; |
| | | if (!inpatientno && this.caseId) { |
| | | try { |
| | | const caseRes = await getDonatebaseinfo(this.caseId); |
| | | inpatientno = (caseRes.data && caseRes.data.inpatientno) || ""; |
| | | } catch (e) { |
| | | inpatientno = ""; |
| | | } |
| | | } |
| | | if (!inpatientno) return false; |
| | | try { |
| | | const res = await maintainList({ inpatientno, pageNum: 1, pageSize: 1 }); |
| | | const list = res.data || []; |
| | | return list.some(item => item && item.id != null && item.id !== ""); |
| | | } catch (e) { |
| | | return false; |
| | | } |
| | | }, |
| | | // 5. 在 methods 中添加数据处理方法 |