| | |
| | | <el-card v-if="activeJudgmentType === 'brain'" class="detail-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">脑死亡判定信息</span> |
| | | |
| | | <el-button |
| | | v-if="isEdit" |
| | | style="float: right; margin-left: 10px;" |
| | | type="success" |
| | | @click="handleSave" |
| | | :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 |
| | | v-if="!isEdit" |
| | | style="float: right; margin-left: 10px;" |
| | | type="primary" |
| | | @click="handleEdit" |
| | |
| | | <el-col :span="8"> |
| | | <el-form-item label="判定医生二" prop="deathjudgedoctt"> |
| | | <el-input v-model="form.deathjudgedoctt" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="其他判定医生"> |
| | | <div |
| | | v-for="(doctor, index) in brainExtraDoctors" |
| | | :key="index" |
| | | style="display: flex; align-items: center; margin-bottom: 8px;" |
| | | > |
| | | <el-input |
| | | v-model="brainExtraDoctors[index]" |
| | | placeholder="请输入医生姓名" |
| | | style="flex: 1; margin-right: 10px;" |
| | | :readonly="!isEdit" |
| | | /> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="danger" |
| | | icon="el-icon-minus" |
| | | circle |
| | | size="mini" |
| | | @click="removeBrainDoctor(index)" |
| | | /> |
| | | </div> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | @click="addBrainDoctor" |
| | | > |
| | | 添加医生 |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="心死亡时间" prop="heartdeathtime"> |
| | | <el-form-item label="心死亡判定完成时间" prop="heartdeathtime"> |
| | | <el-date-picker |
| | | v-model="form.heartdeathtime" |
| | | type="datetime" |
| | |
| | | v-model="form.heartdeathjudgedoctt" |
| | | :readonly="!isEdit" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="其他判定医生"> |
| | | <div |
| | | v-for="(doctor, index) in heartExtraDoctors" |
| | | :key="index" |
| | | style="display: flex; align-items: center; margin-bottom: 8px;" |
| | | > |
| | | <el-input |
| | | v-model="heartExtraDoctors[index]" |
| | | placeholder="请输入医生姓名" |
| | | style="flex: 1; margin-right: 10px;" |
| | | :readonly="!isEdit" |
| | | /> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="danger" |
| | | icon="el-icon-minus" |
| | | circle |
| | | size="mini" |
| | | @click="removeHeartDoctor(index)" |
| | | /> |
| | | </div> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | @click="addHeartDoctor" |
| | | > |
| | | 添加医生 |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-tabs> |
| | | </div> |
| | | </el-card> |
| | | |
| | | <!-- 底部操作按钮 --> |
| | | <div style="text-align: center; margin: 30px 0;"> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="primary" |
| | | @click="handleSave" |
| | | :loading="saveLoading" |
| | | > |
| | | 保存信息 |
| | | </el-button> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="success" |
| | | @click="accomplish" |
| | | :loading="saveLoading" |
| | | > |
| | | 完成判定 |
| | | </el-button> |
| | | </div> |
| | | <!-- 上传对话框(脑死亡) --> |
| | | <el-dialog |
| | | :title="`上传${getCurrentBrainDeathTypeLabel}评估表`" |
| | |
| | | data() { |
| | | return { |
| | | caseId: null, |
| | | isEdit: false, |
| | | isEdit: true, |
| | | saveLoading: false, |
| | | infoid: undefined, |
| | | |
| | | brainExtraDoctors: [], // 脑死亡其他判定医生 |
| | | heartExtraDoctors: [], // 心死亡其他判定医生 |
| | | // 判定类型标签 |
| | | activeJudgmentType: "brain", // 默认显示脑死亡 |
| | | // 预览相关 |
| | |
| | | responsibleuserid: "", |
| | | responsibleusername: "", |
| | | recordstate: "0", |
| | | remark: "" |
| | | extContent: "" |
| | | }, |
| | | // 表单验证规则 |
| | | rules: { |
| | |
| | | { required: false, message: "心死亡原因不能为空", trigger: "blur" } |
| | | ], |
| | | heartdeathtime: [ |
| | | { required: false, message: "心死亡时间不能为空", trigger: "change" } |
| | | { |
| | | required: false, |
| | | message: "心死亡判定完成时间不能为空", |
| | | trigger: "change" |
| | | } |
| | | ], |
| | | heartdeathjudgedocto: [ |
| | | { |
| | |
| | | { value: "3", label: "短潜伏期体感诱发电位评估表" }, |
| | | { value: "4", label: "经颅多普勒超声评估记录" }, |
| | | { value: "5", label: "卫健委脑损伤质控中心 - 临床综合评估表" }, |
| | | { value: "6", label: "UW评分表" } |
| | | { value: "7", label: "AT前" }, |
| | | { value: "8", label: "AT后" }, |
| | | { value: "6", label: "UW评分表(脑死亡)" } |
| | | ], |
| | | // 心死亡评估表类型定义 |
| | | heartDeathAttachmentTypes: [ |
| | | { value: "heart_1", label: "心死亡判定表" }, |
| | | { value: "heart_2", label: "心电图评估表" } |
| | | { value: "heart_2", label: "UW评分表(心死亡)" } |
| | | ], |
| | | |
| | | // 附件列表数据 |
| | |
| | | created() { |
| | | 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 = tab.name; |
| | | // 可以在这里添加其他切换逻辑 |
| | | }, |
| | | addBrainDoctor() { |
| | | this.brainExtraDoctors.push(""); |
| | | }, |
| | | removeBrainDoctor(index) { |
| | | this.brainExtraDoctors.splice(index, 1); |
| | | }, |
| | | addHeartDoctor() { |
| | | this.heartExtraDoctors.push(""); |
| | | }, |
| | | removeHeartDoctor(index) { |
| | | this.heartExtraDoctors.splice(index, 1); |
| | | }, |
| | | |
| | | // 序列化额外医生列表为字符串(用中文逗号分隔) |
| | | serializeExtraDoctors(list) { |
| | | return list.filter(name => name && name.trim()).join(","); |
| | | }, |
| | | |
| | | // 从字符串解析出医生列表(按中文逗号拆分) |
| | | parseExtraDoctors(str) { |
| | | if (!str) return []; |
| | | return str |
| | | .split(",") |
| | | .map(s => s.trim()) |
| | | .filter(s => s); |
| | | }, |
| | | // 生成捐献者编号 |
| | | generateDonorNo() { |
| | | const timestamp = Date.now().toString(); |
| | |
| | | async getDetail(infoid) { |
| | | try { |
| | | const response = await queryDathInfoBaseInfo({ infoid }); |
| | | let realData = {}; |
| | | |
| | | if (response && response.data) { |
| | | realData = response.data[0]; |
| | | } else if (response) { |
| | | realData = response; |
| | | } |
| | | let realData = response?.data?.[0] || response || {}; |
| | | |
| | | // 映射字段到表单 |
| | | this.form = { |
| | |
| | | if (realData.rememberAnnex) { |
| | | this.parseAttachmentData(realData.rememberAnnex, "brain"); |
| | | } |
| | | |
| | | if (realData.extContent) { |
| | | const parts = realData.extContent.split(" | "); |
| | | parts.forEach(part => { |
| | | if (part.includes("脑死亡其他医生:")) { |
| | | const doctorsStr = part.replace("脑死亡其他医生:", ""); |
| | | this.brainExtraDoctors = this.parseExtraDoctors(doctorsStr); |
| | | } else if (part.includes("心死亡其他医生:")) { |
| | | const doctorsStr = part.replace("心死亡其他医生:", ""); |
| | | this.heartExtraDoctors = this.parseExtraDoctors(doctorsStr); |
| | | } |
| | | }); |
| | | } |
| | | // 解析心死亡附件信息 |
| | | if (realData.heartdeathjudgeannex) { |
| | | this.parseAttachmentData(realData.heartdeathjudgeannex, "heart"); |
| | |
| | | this.saveLoading = true; |
| | | |
| | | try { |
| | | // 构建额外医生字符串 |
| | | const brainExtraStr = this.serializeExtraDoctors( |
| | | this.brainExtraDoctors |
| | | ); |
| | | const heartExtraStr = this.serializeExtraDoctors( |
| | | this.heartExtraDoctors |
| | | ); |
| | | |
| | | let extContent = this.form.extContent || ""; |
| | | // 如果已有备注,用 ' | ' 分隔;否则直接赋值 |
| | | if (brainExtraStr) { |
| | | extContent += |
| | | (extContent ? " | " : "") + "脑死亡其他医生:" + brainExtraStr; |
| | | } |
| | | if (heartExtraStr) { |
| | | extContent += |
| | | (extContent ? " | " : "") + "心死亡其他医生:" + heartExtraStr; |
| | | } |
| | | // 构建提交数据 |
| | | const submitData = { |
| | | ...this.form, |
| | | infoid: this.infoid, |
| | | // 确保附件数据最新 |
| | | rememberAnnex: this.buildBrainDeathAttachmentJson(), |
| | | heartdeathjudgeannex: this.buildHeartDeathAttachmentJson() |
| | | rememberannex: this.buildBrainDeathAttachmentJson(), |
| | | heartdeathjudgeannex: this.buildHeartDeathAttachmentJson(), |
| | | extContent: extContent // 使用合并后的 extContent |
| | | }; |
| | | if (submitData.state == 1 || !submitData.state) { |
| | | submitData.state = 2; |