| | |
| | | <template> |
| | | <div class="death-judgment-detail"> |
| | | <case-basic-info :case-id="caseId" :show-attachment="true" /> |
| | | <!-- 公共信息模块(独立显示) --> |
| | | <!-- 公共信息模块(独立显示) --> |
| | | |
| | | <!-- 判定类型标签页 --> |
| | | <el-card class="type-card"> |
| | |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | <el-card class="detail-card common-info-card"> |
| | | <!-- <el-card class="detail-card common-info-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">公共信息</span> |
| | | </div> |
| | |
| | | <el-input v-model="form.gainhospitalname" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="是否默哀缅怀" prop="isspendremember"> |
| | | <el-select |
| | | v-model="form.isspendremember" |
| | | :disabled="!isEdit" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="是" :value="1" /> |
| | | <el-option label="否" :value="0" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="恢复遗体仪容" prop="isrestoreremains"> |
| | | <el-select |
| | | v-model="form.isrestoreremains" |
| | | :disabled="!isEdit" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="是" :value="1" /> |
| | | <el-option label="否" :value="0" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | </el-form> |
| | | </el-card> |
| | | </el-card> --> |
| | | <!-- 脑死亡判定模块 --> |
| | | <el-card v-if="activeJudgmentType === 'brain'" class="detail-card"> |
| | | <div slot="header" class="clearfix"> |
| | |
| | | :loading="saveLoading" |
| | | > |
| | | 保存信息 |
| | | </el-button> |
| | | <el-button |
| | | v-if="isEdit" |
| | | style="float: right; margin-left: 10px;" |
| | | type="success" |
| | | @click="accomplish" |
| | | :loading="saveLoading" |
| | | > |
| | | 完成判定 |
| | | </el-button> |
| | | <el-button |
| | | v-else |
| | |
| | | <el-input v-model="form.deathreason" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | |
| | | </div> |
| | | </el-card> |
| | | |
| | | |
| | | |
| | | <!-- 上传对话框(脑死亡) --> |
| | | <el-dialog |
| | | :title="`上传${getCurrentBrainDeathTypeLabel}评估表`" |
| | |
| | | </el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 附件预览 --> |
| | | <FilePreviewDialog |
| | | :visible="previewVisible" |
| | | :file="currentPreviewFile" |
| | | @close="previewVisible = false" |
| | | @download="handleDownload" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } from "@/api/businessApi"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import CaseBasicInfo from "@/components/CaseBasicInfo"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | |
| | | export default { |
| | | name: "DeathJudgmentDetail", |
| | | components: { CaseBasicInfo }, |
| | | components: { CaseBasicInfo, FilePreviewDialog }, |
| | | |
| | | data() { |
| | | return { |
| | |
| | | |
| | | // 判定类型标签 |
| | | activeJudgmentType: "brain", // 默认显示脑死亡 |
| | | |
| | | // 预览相关 |
| | | previewVisible: false, |
| | | currentPreviewFile: null, |
| | | // 表单数据 |
| | | form: { |
| | | id: undefined, |
| | |
| | | this.infoid = this.$route.query.infoid; |
| | | this.caseId = this.infoid; |
| | | this.isEdit = this.$route.query.isEdit === "true"; |
| | | |
| | | this.activeJudgmentType = this.$route.query.type; |
| | | // 从路由参数获取默认显示类型 |
| | | if (this.$route.query.judgmentType) { |
| | | this.activeJudgmentType = this.$route.query.judgmentType; |
| | |
| | | }, |
| | | |
| | | // 预览附件 |
| | | handlePreview(attachment) { |
| | | if (attachment.fileName.endsWith(".pdf")) { |
| | | window.open(attachment.fileUrl, "_blank"); |
| | | } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) { |
| | | this.$alert( |
| | | `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`, |
| | | "图片预览", |
| | | { |
| | | dangerouslyUseHTMLString: true, |
| | | customClass: "image-preview-dialog" |
| | | } |
| | | ); |
| | | } else { |
| | | this.$message.info("该文件类型暂不支持在线预览,请下载后查看"); |
| | | } |
| | | }, |
| | | handlePreview(file) { |
| | | console.log(file, "file"); |
| | | |
| | | this.currentPreviewFile = { |
| | | fileName: file.fileName, |
| | | fileUrl: file.path || file.fileUrl, |
| | | fileType: this.getFileType(file.fileName) |
| | | }; |
| | | this.previewVisible = true; |
| | | // if (attachment.fileName.endsWith(".pdf")) { |
| | | // window.open(attachment.fileUrl, "_blank"); |
| | | // } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) { |
| | | // this.$alert( |
| | | // `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`, |
| | | // "图片预览", |
| | | // { |
| | | // dangerouslyUseHTMLString: true, |
| | | // customClass: "image-preview-dialog" |
| | | // } |
| | | // ); |
| | | // } else { |
| | | // this.$message.info("该文件类型暂不支持在线预览,请下载后查看"); |
| | | // } |
| | | }, |
| | | getFileType(fileName) { |
| | | if (!fileName) return "other"; |
| | | |
| | | 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"]; |
| | | |
| | | if (imageTypes.includes(extension)) return "image"; |
| | | if (pdfTypes.includes(extension)) return "pdf"; |
| | | if (officeTypes.includes(extension)) return "office"; |
| | | return "other"; |
| | | }, |
| | | // 下载附件 |
| | | handleDownload(attachment) { |
| | | const link = document.createElement("a"); |
| | | link.href = attachment.fileUrl; |
| | | link.download = attachment.fileName; |
| | | link.click(); |
| | | this.$message.success(`开始下载: ${attachment.fileName}`); |
| | | handleDownload(file) { |
| | | const fileUrl = file.path || file.fileUrl; |
| | | const fileName = file.fileName; |
| | | |
| | | if (fileUrl) { |
| | | const link = document.createElement("a"); |
| | | link.href = fileUrl; |
| | | link.download = fileName; |
| | | link.style.display = "none"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | this.$message.success("开始下载文件"); |
| | | } else { |
| | | this.$message.warning("文件路径不存在,无法下载"); |
| | | } |
| | | }, |
| | | |
| | | // 编辑信息 |
| | | handleEdit() { |
| | | this.isEdit = true; |
| | | }, |
| | | accomplish() { |
| | | this.$confirm("是否确认完成该案例死亡判定全部信息?", "提醒", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | this.form.state = 3; |
| | | this.handleSave(); |
| | | }) |
| | | |
| | | .catch(() => {}); |
| | | }, |
| | | // 保存信息 |
| | | async handleSave() { |
| | | // 根据当前标签选择验证规则 |
| | |
| | | rememberAnnex: this.buildBrainDeathAttachmentJson(), |
| | | heartdeathjudgeannex: this.buildHeartDeathAttachmentJson() |
| | | }; |
| | | if (submitData.state == 1 || !submitData.state) { |
| | | submitData.state = 2; |
| | | } |
| | | let response = null; |
| | | |
| | | if (submitData.id) { |