| | |
| | | <template> |
| | | <div class="assessment-detail"> |
| | | <!-- 基础案例信息 --> |
| | | <case-basic-info :case-id="caseId" :show-attachment="true" /> |
| | | <case-basic-info :case-id="caseId" :show-attachment="true":column="3" /> |
| | | |
| | | <el-card class="organ-assessment-card"> |
| | | <el-card class="organ-assessment-card paper-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>器官评估表</span> |
| | | </div> |
| | | |
| | | <!-- 捐献决定表单 --> |
| | | <el-form> |
| | | <el-form-item label-width="100px" label="捐献决定"> |
| | | <el-checkbox-group v-model="organdecisionValues" @change="handleOrganDecisionChange" :disabled="!isEdit"> |
| | | <el-checkbox v-for="dict in dict.type.sys_Organ" :key="dict.value" :label="dict.value">{{ dict.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | <el-input v-if="showOtherInput" v-model="organdecisionOther" placeholder="请输入其他捐献决定的具体内容" |
| | | style="margin-top: 10px; width: 300px;" :readonly="!isEdit" @input="handleOtherDecisionInput"></el-input> |
| | | </el-form-item> |
| | | <el-form class="paper-form"> |
| | | <div class="form-row"> |
| | | <el-form-item label-width="100px" label="捐献决定" class="col-full"> |
| | | <el-checkbox-group v-model="organdecisionValues" @change="handleOrganDecisionChange" :disabled="!isEdit || isReadOnly"> |
| | | <el-checkbox v-for="dict in dict.type.sys_Organ" :key="dict.value" :label="dict.value">{{ dict.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | <el-input v-if="showOtherInput" v-model="organdecisionOther" placeholder="请输入其他捐献决定的具体内容" |
| | | style="margin-top: 10px; width: 300px;" :readonly="!isEdit || isReadOnly" @input="handleOtherDecisionInput"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | |
| | | <!-- 器官评估表格 --> |
| | |
| | | <el-tab-pane v-for="(assessment, index) in getOrganAssessments(scope.row)" |
| | | :key="`${scope.row.organno}_${index}`" :label="`第${index + 1}次评估`" :name="String(index)"> |
| | | <organ-assessment-form :organ-data="scope.row" :assessment-index="index" |
| | | :readonly="!canAssessOrgan(scope.row)" :current-user="currentUser" |
| | | :readonly="!canAssessOrgan(scope.row) || isReadOnly" :current-user="currentUser" |
| | | @update-assessment="handleUpdateAssessment" @delete-assessment="handleDeleteAssessment" |
| | | @save-assessment="handleSaveAssessment" /> |
| | | </el-tab-pane> |
| | | |
| | | <!-- 添加评估按钮 --> |
| | | <el-tab-pane name="add" v-if="canAssessOrgan(scope.row) && isEdit"> |
| | | <el-tab-pane name="add" v-if="canAssessOrgan(scope.row) && isEdit && !isReadOnly"> |
| | | <template slot="label"> |
| | | <el-button type="text" icon="el-icon-plus" @click.stop="handleAddNewAssessment(scope.row)" |
| | | size="mini"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width"> |
| | | <el-table-column v-if="!isReadOnly" label="操作" align="center" width="150" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="canAssessOrgan(scope.row) && isEdit" size="mini" type="text" |
| | | @click="handleToggleExpand(scope.row)"> |
| | |
| | | </el-card> |
| | | |
| | | <!-- 整体保存按钮 --> |
| | | <div class="footer-actions" v-if="isEdit"> |
| | | <div class="footer-actions" v-if="isEdit && !isReadOnly"> |
| | | <el-button type="primary" @click="handleSaveAll" :loading="saveLoading">保存评估表</el-button> |
| | | <el-button type="success" @click="accomplish" :loading="saveLoading">评估完成</el-button> |
| | | </div> |
| | |
| | | assessedit, |
| | | assessAdd |
| | | } from "@/api/businessApi/index"; |
| | | import { getDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | import CaseBasicInfo from "@/components/CaseBasicInfo"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | import OrganAssessmentForm from "@/components/assessInfoComponents/OrganAssessmentForm.vue"; |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | // 查看模式:只读,禁用表单并隐藏保存按钮 |
| | | isReadOnly() { |
| | | return this.$route.query.mode === "view"; |
| | | }, |
| | | isCoordinator() { |
| | | return this.currentUser.role == "coordinator"; |
| | | }, |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | this.form.assessState = 3; |
| | | this.assessmentData.assessState = 3; |
| | | this.handleSaveAll(); |
| | | }) |
| | | |
| | |
| | | }, |
| | | // 整体保存方法 |
| | | async handleSaveAll() { |
| | | if (this.saveLoading) return; |
| | | this.saveLoading = true; |
| | | try { |
| | | // 新增时校验是否已有相同患者 |
| | | if (!this.assessmentData.id) { |
| | | const exists = await this.checkPatientExists(); |
| | | if (exists) { |
| | | this.$message.warning("该患者已存在,请勿重复添加"); |
| | | return; |
| | | } |
| | | } |
| | | const saveData = { |
| | | id: this.assessmentData.id || undefined, |
| | | infoid: this.infoid, |
| | |
| | | this.$message.error("保存失败,请重试"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | }, |
| | | // 新增时校验是否已有相同患者(按住院号) |
| | | async checkPatientExists() { |
| | | let inpatientno = this.assessmentData.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 evaluateBaseInfolist({ inpatientno, pageNum: 1, pageSize: 1 }); |
| | | let list = res.data || []; |
| | | if (!Array.isArray(list)) { |
| | | list = list.rows || list.list || []; |
| | | } |
| | | return list.some(item => item && item.id != null && item.id !== ""); |
| | | } catch (e) { |
| | | return false; |
| | | } |
| | | }, |
| | | |
| | |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | |
| | | /* ===== 纸质表格网格样式 ===== */ |
| | | .paper-card >>> .el-card__body { |
| | | padding: 16px; |
| | | } |
| | | |
| | | .paper-form { |
| | | border-left: 1px solid #d0d3db; |
| | | background: #fff; |
| | | } |
| | | |
| | | .paper-form >>> .form-row { |
| | | display: flex; |
| | | width: 100%; |
| | | border-top: 1px solid #d0d3db; |
| | | /* 上移1px与上一行的border-bottom重叠,两行之间只显示一条1px细线 */ |
| | | margin-top: -1px; |
| | | } |
| | | .paper-form >>> .form-row:first-child { |
| | | margin-top: 0; |
| | | } |
| | | |
| | | /* 行尾空白填充:不满整行的右侧自动补一个空白格子,网格保持闭合(右侧适当留白) */ |
| | | .paper-form >>> .form-row::after { |
| | | content: ""; |
| | | flex: 1 1 0; |
| | | min-height: 42px; |
| | | background: linear-gradient(to left, #d0d3db 1px, transparent 1px), |
| | | linear-gradient(to top, #d0d3db 1px, transparent 1px); |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .paper-form >>> .el-form-item { |
| | | flex: 0 0 33.3333%; |
| | | display: flex; |
| | | margin: 0; |
| | | background: #fff; |
| | | border-right: 1px solid #d0d3db; |
| | | border-bottom: 1px solid #d0d3db; |
| | | } |
| | | .paper-form >>> .el-form-item::after, |
| | | .paper-form >>> .el-form-item::before { |
| | | display: none; |
| | | } |
| | | |
| | | .paper-form >>> .col-1-3 { flex: 0 0 33.3333%; } |
| | | .paper-form >>> .col-half { flex: 0 0 50%; } |
| | | .paper-form >>> .col-2-3 { flex: 0 0 66.6666%; } |
| | | .paper-form >>> .col-full { flex: 0 0 100%; } |
| | | |
| | | .paper-form >>> .el-form-item__label { |
| | | flex: 0 0 150px; |
| | | width: 150px !important; |
| | | float: none; |
| | | padding: 0 8px !important; |
| | | background: #ecf5ff; |
| | | border-right: 1px solid #d0d3db; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | text-align: center; |
| | | font-size: 13px; |
| | | font-weight: 600; |
| | | color: #2c3038; |
| | | line-height: 1.3; |
| | | white-space: nowrap; |
| | | } |
| | | .paper-form >>> .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before { |
| | | color: #f56c6c; |
| | | margin-right: 2px; |
| | | } |
| | | |
| | | .paper-form >>> .el-form-item__content { |
| | | flex: 1; |
| | | margin-left: 0 !important; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | padding: 6px 10px; |
| | | background: #fff; |
| | | min-height: 42px; |
| | | line-height: 1.4; |
| | | } |
| | | |
| | | /* 控件宽度适中,不铺满整格(内容短时输入框不再拉得很长) */ |
| | | .paper-form >>> .el-form-item__content .el-input, |
| | | .paper-form >>> .el-form-item__content .el-select, |
| | | .paper-form >>> .el-form-item__content .el-cascader { |
| | | width: 220px; |
| | | max-width: 100%; |
| | | } |
| | | .paper-form >>> .el-form-item__content .el-date-editor { |
| | | width: 240px; |
| | | max-width: 100%; |
| | | } |
| | | .paper-form >>> .el-form-item__content .el-range-editor { |
| | | width: 360px; |
| | | max-width: 100%; |
| | | } |
| | | </style> |