| | |
| | | <template> |
| | | <div class="maintenance-detail"> |
| | | <!-- 基础信息 --> |
| | | <el-card class="detail-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">供者基本信息</span> |
| | | <el-button type="success" style="float: right;" @click="handleSave"> |
| | | 保存信息 |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-form :model="form" ref="form" label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="住院号" prop="caseNo"> |
| | | <el-input v-model="form.caseNo" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="捐献者姓名" prop="name"> |
| | | <el-input v-model="form.name" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="性别" prop="gender"> |
| | | <el-select v-model="form.sex" style="width: 100%"> |
| | | <el-option label="男" value="0" /> |
| | | <el-option label="女" value="1" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="年龄" prop="age"> |
| | | <el-input v-model="form.age" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="疾病诊断" prop="diagnosisname"> |
| | | <el-input v-model="form.diagnosisname" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="首诊医疗机构" prop="treatmenthospitalname"> |
| | | <el-input v-model="form.treatmenthospitalname" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="患者状态" prop="recordstate"> |
| | | <el-select v-model="form.recordstate" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_DonationCategory || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item |
| | | label="未完成原因" |
| | | prop="incompleteReason" |
| | | v-if="form.recordstate === '5'" |
| | | > |
| | | <el-input |
| | | v-model="form.incompleteReason" |
| | | placeholder="请输入未完成捐献的原因" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="上报时间" prop="reporttime"> |
| | | <el-date-picker |
| | | v-model="form.reporttime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="死亡时间" prop="deathTime"> |
| | | <el-date-picker |
| | | v-model="form.deathTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="协调员" prop="coordinatorName"> |
| | | <el-input v-model="form.coordinatorName" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="血型" prop="bloodtype"> |
| | | <el-select v-model="form.bloodtype" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_BloodType" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="Rh(D)" prop="rhYin"> |
| | | <el-radio-group v-model="form.rhYin"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_bloodtype_rhd || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{ dict.label }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="特殊病史" prop="specialMedicalHistory"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.specialMedicalHistory" |
| | | placeholder="记录特殊病史信息" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | <case-basic-info :case-id="caseId" :show-attachment="true" /> |
| | | |
| | | <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" |
| | | @click="toggleEditMode" |
| | | style="float: right;" |
| | | style="float: right;margin-left: 20px;" |
| | | > |
| | | {{ isEdit ? "完成编辑" : "开始编辑" }} |
| | | 保存编辑 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="mini" |
| | | @click="accomplish" |
| | | style="float: right;margin-left: 20px;" |
| | | > |
| | | 完成编辑 |
| | | </el-button> |
| | | </div> |
| | | |
| | |
| | | <el-tag |
| | | :type="scope.row.result === '阴性' ? 'success' : '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> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </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"> |
| | |
| | | </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 |
| | |
| | | v-model="cultureForm.result" |
| | | placeholder="请选择培养结果" |
| | | style="width: 100%" |
| | | @change="handleResultChange" |
| | | > |
| | | <el-option label="阴性" value="阴性" /> |
| | | <el-option label="阳性" value="阳性" /> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item |
| | | v-if="cultureForm.result === '阳性'" |
| | | label="阳性详情" |
| | | prop="positiveDetails" |
| | | > |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | v-model="cultureForm.positiveDetails" |
| | | placeholder="请输入阳性结果的详细信息" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="附件"> |
| | | <UploadAttachment |
| | | ref="cultureUploadAttachment" |
| | |
| | | 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 { |
| | |
| | | FilePreviewDialog, |
| | | LiverKidneyPanel, |
| | | BloodRoutinePanel, |
| | | UrineRoutinePanel |
| | | UrineRoutinePanel, |
| | | CaseBasicInfo |
| | | }, |
| | | dicts: [ |
| | | "sys_donornode", |
| | |
| | | |
| | | data() { |
| | | return { |
| | | isEdit: false, |
| | | caseId: null, |
| | | isEdit: true, |
| | | currentMaintenanceId: null, |
| | | isEditMode: false, |
| | | form: { |
| | |
| | | cultureType: "", |
| | | sampleTime: "", |
| | | result: "阴性", |
| | | positiveDetails: "", // 新增:阳性详情 |
| | | attachments: [] |
| | | }, |
| | | cultureFileList: [], |
| | |
| | | ], |
| | | result: [ |
| | | { required: true, message: "请选择培养结果", trigger: "change" } |
| | | ] |
| | | ], |
| | | positiveDetails: [] // 动态验证规则 |
| | | }, |
| | | cultureTypeOptions: [ |
| | | { value: "1", label: "血培养" }, |
| | |
| | | |
| | | // 附件相关配置 |
| | | 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: { |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.caseId = this.$route.query.infoid; |
| | | |
| | | this.loadMaintenanceData(); |
| | | }, |
| | | watch: { |
| | |
| | | this.recordLoading = false; |
| | | } |
| | | }, |
| | | // 处理培养结果选择变化 |
| | | handleResultChange(value) { |
| | | this.$nextTick(() => { |
| | | if (value === "阳性") { |
| | | this.cultureRules.positiveDetails = [ |
| | | { required: true, message: "请输入阳性详情", trigger: "blur" } |
| | | ]; |
| | | } else { |
| | | this.cultureRules.positiveDetails = []; |
| | | this.cultureForm.positiveDetails = ""; |
| | | } |
| | | // 清除验证 |
| | | if (this.$refs.cultureForm) { |
| | | this.$refs.cultureForm.clearValidate("positiveDetails"); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 处理点击培养结果标签 |
| | | handleResultClick(row) { |
| | | if (row.result === "阳性" && row.positiveDetails) { |
| | | this.$alert( |
| | | `<div style="padding: 10px;"> |
| | | <h4 style="margin-bottom: 10px; color: #f56c6c;">阳性详情:</h4> |
| | | <div style="background: #fef0f0; padding: 15px; border-radius: 4px; border-left: 4px solid #f56c6c;"> |
| | | <p style="margin: 0; white-space: pre-wrap; line-height: 1.5;">${row.positiveDetails}</p> |
| | | </div> |
| | | </div>`, |
| | | "阳性结果详情", |
| | | { |
| | | dangerouslyUseHTMLString: true, |
| | | confirmButtonText: "关闭", |
| | | customClass: "result-details-dialog", |
| | | showClose: false |
| | | } |
| | | ); |
| | | } else if (row.result === "阳性") { |
| | | this.$message.warning("该阳性记录暂无详情信息"); |
| | | } |
| | | }, |
| | | // 保存所有数据 |
| | | async handleSave() { |
| | | try { |
| | |
| | | nursingRecords: this.recordList |
| | | } |
| | | }; |
| | | if (saveData.state == 1 || !saveData.state) { |
| | | saveData.state = 2; |
| | | } |
| | | this.extracontentinfo.specialMedicalHistory = this.form.specialMedicalHistory; |
| | | let response; |
| | | if (this.isEditMode && this.currentMaintenanceId) { |
| | |
| | | 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; |
| | |
| | | this.handleSave(); |
| | | } |
| | | }, |
| | | accomplish() { |
| | | this.$confirm("是否完成该案例捐献确认步骤?", "提醒", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | this.form.state = 3; |
| | | this.handleSave(); |
| | | }) |
| | | |
| | | .catch(() => {}); |
| | | }, |
| | | // 培养记录相关方法 |
| | | handleAddCulture() { |
| | | this.cultureDialogTitle = "新增培养记录"; |
| | |
| | | }); |
| | | }, |
| | | |
| | | // 5. 修改编辑培养记录方法 |
| | | 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.cultureForm = { |
| | | ...row, |
| | | positiveDetails: row.positiveDetails || "" // 确保有positiveDetails字段 |
| | | }; |
| | | 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(); |
| | | // 如果编辑时是阳性结果,设置验证规则 |
| | | if (row.result === "阳性") { |
| | | this.cultureRules.positiveDetails = [ |
| | | { required: true, message: "请输入阳性详情", trigger: "blur" } |
| | | ]; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 6. 修改保存培养记录方法 |
| | | handleSaveCulture() { |
| | | this.$refs.cultureForm.validate(valid => { |
| | | if (valid) { |
| | | this.cultureSaveLoading = true; |
| | | |
| | | if (this.cultureForm.id) { |
| | | // 构建保存数据 |
| | | const saveData = { |
| | | ...this.cultureForm, |
| | | // 如果是阴性,清空阳性详情 |
| | | positiveDetails: |
| | | this.cultureForm.result === "阳性" |
| | | ? this.cultureForm.positiveDetails || "" |
| | | : "" |
| | | }; |
| | | |
| | | if (saveData.id) { |
| | | const index = this.cultureList.findIndex( |
| | | item => item.id === this.cultureForm.id |
| | | item => item.id === saveData.id |
| | | ); |
| | | if (index !== -1) { |
| | | this.cultureList.splice(index, 1, { ...this.cultureForm }); |
| | | this.cultureList.splice(index, 1, { ...saveData }); |
| | | } |
| | | } else { |
| | | this.cultureForm.id = Date.now(); |
| | | this.cultureList.push({ ...this.cultureForm }); |
| | | saveData.id = Date.now(); |
| | | this.cultureList.push({ ...saveData }); |
| | | } |
| | | |
| | | this.$message.success(this.cultureForm.id ? "修改成功" : "新增成功"); |
| | | this.$message.success(saveData.id ? "修改成功" : "新增成功"); |
| | | this.cultureDialogVisible = false; |
| | | this.cultureSaveLoading = false; |
| | | } |
| | |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19), |
| | | recorder: "当前用户", |
| | | recorder: store.getters.name, |
| | | checkRecord: "", |
| | | attachments: [] |
| | | }; |
| | |
| | | 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(); |
| | |
| | | /** 获取文件类型 */ |
| | | 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"]; |
| | |
| | | |
| | | /** 获取文件扩展名 */ |
| | | getFileExtension(filename) { |
| | | return filename.split(".").pop().toLowerCase(); |
| | | return filename |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | }, |
| | | |
| | | /** 格式化文件大小 */ |
| | |
| | | font-size: 13px; |
| | | margin-left: 8px; |
| | | } |
| | | /* 7. 添加一些样式 */ |
| | | .result-details-dialog { |
| | | width: 500px; |
| | | } |
| | | |
| | | .result-details-dialog .el-message-box__content { |
| | | padding: 0; |
| | | } |
| | | |
| | | .result-details-dialog .el-message-box__header { |
| | | background: #fef0f0; |
| | | border-bottom: 1px solid #fde2e2; |
| | | } |
| | | |
| | | .result-details-dialog .el-message-box__title { |
| | | color: #f56c6c; |
| | | font-weight: bold; |
| | | } |
| | | </style> |