| | |
| | | import './permission' // permission control |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { getConfigKey } from "@/api/system/config"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels,donatebaseinfoEdit, handleTree } from "@/utils/ruoyi"; |
| | | import { parseTime, getLabelsFromString,resetForm, addDateRange, selectDictLabel, selectDictLabels,donatebaseinfoEdit, handleTree } from "@/utils/ruoyi"; |
| | | import { formatTime } from "@/utils/index"; |
| | | import dataV from '@jiaminghi/data-view';//dataV |
| | | // 分页组件 |
| | |
| | | Vue.prototype.getDicts = getDicts |
| | | Vue.prototype.getConfigKey = getConfigKey |
| | | Vue.prototype.parseTime = parseTime |
| | | Vue.prototype.getLabelsFromString = getLabelsFromString |
| | | Vue.prototype.donatebaseinfoEdit = donatebaseinfoEdit |
| | | Vue.prototype.formatTime = formatTime |
| | | Vue.prototype.resetForm = resetForm |
| | |
| | | }); |
| | | return time_str; |
| | | } |
| | | /** |
| | | * 将逗号分隔的字符串转换为对应的label字符串 |
| | | * @param {string} str - 逗号分隔的字符串,如 "2,3,1" |
| | | * @param {Array} options - 选项数组,格式: [{value: "1", label: "选项1"}, ...] |
| | | * @returns {string} - 逗号分隔的label字符串 |
| | | */ |
| | | export function getLabelsFromString(str, options) { |
| | | if (!str || !options || !Array.isArray(options)) { |
| | | return ""; |
| | | } |
| | | |
| | | // 将字符串分割为数组 |
| | | const valueArray = str |
| | | .split(",") |
| | | .map(item => item.trim()) |
| | | .filter(item => item !== ""); |
| | | |
| | | if (valueArray.length === 0) { |
| | | return ""; |
| | | } |
| | | |
| | | // 创建value到label的映射 |
| | | const valueToLabelMap = {}; |
| | | options.forEach(option => { |
| | | if (option.value !== undefined && option.label !== undefined) { |
| | | valueToLabelMap[option.value] = option.label; |
| | | } |
| | | }); |
| | | |
| | | // 获取对应的label |
| | | const labelArray = valueArray.map(value => { |
| | | return valueToLabelMap[value] || value; // 如果找不到对应label,就返回原值 |
| | | }); |
| | | |
| | | // 返回逗号分隔的label字符串 |
| | | return labelArray.join(","); |
| | | } |
| | | export function donatebaseinfoEdit(data) { |
| | | updateDonatebaseinfo(data); |
| | | } |
| | |
| | | > |
| | | <el-form-item label="住院号" prop="inpatientno"> |
| | | <el-input |
| | | v-model="queryParams.inpatientno" |
| | | v-model="queryParams.caseNo" |
| | | placeholder="请输入住院号" |
| | | clearable |
| | | style="width: 200px" |
| | |
| | | <el-descriptions-item label="GCS评分">{{ |
| | | caseData.gcsScore || "-" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="传染病情况">{{ |
| | | caseData.infectious || "无" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="传染病情况" |
| | | >{{ |
| | | getLabelsFromString(caseData.infectious, dict.type.sys_Infectious) |
| | | }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item |
| | | label="传染病其他说明" |
| | | v-if="caseData.infectiousOther" |
| | |
| | | <!-- <el-descriptions-item label="部门编号">{{ |
| | | caseData.deptNo || "-" |
| | | }}</el-descriptions-item> --> |
| | | <el-descriptions-item label="上报医院">{{ |
| | | caseData.toHospital || "-" |
| | | }}</el-descriptions-item> |
| | | |
| | | </el-descriptions> |
| | | </el-card> |
| | | |
| | |
| | | <span class="section-title">上报信息</span> |
| | | </div> |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="上报医院">{{ |
| | | caseData.toHospital || "-" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="报告者姓名">{{ |
| | | caseData.infoName || "-" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="报告者编号">{{ |
| | | caseData.infoNo || "-" |
| | | }}</el-descriptions-item> |
| | | |
| | | <el-descriptions-item label="报告者联系电话">{{ |
| | | caseData.reporterphone || "-" |
| | | caseData.phone || "-" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="协调员姓名">{{ |
| | | caseData.coordinatorName || "-" |
| | |
| | | default: true |
| | | } |
| | | }, |
| | | dicts: ["sys_user_sex", "sys_BloodType"], |
| | | dicts: ["sys_user_sex", "sys_BloodType",'sys_Infectious'], |
| | | data() { |
| | | return { |
| | | // 预览相关 |
| | |
| | | placeholder="请选择证件类型" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="身份证" value="1" /> |
| | | <el-option label="护照" value="2" /> |
| | | <el-option label="军官证" value="3" /> |
| | | <el-option |
| | | v-for="item in dict.type.sys_IDType" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="传染病情况" prop="infectious"> |
| | | <el-input |
| | | <el-checkbox-group v-model="editForm.infectious"> |
| | | <el-checkbox |
| | | v-for="item in dict.type.sys_Infectious" |
| | | :label="item.value" |
| | | :value="item.value" |
| | | >{{ item.label }}</el-checkbox |
| | | > |
| | | </el-checkbox-group> |
| | | <!-- <el-input |
| | | v-model="editForm.infectious" |
| | | placeholder="请输入传染病情况" |
| | | /> |
| | | /> --> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报告者编号" prop="infoNo"> |
| | | <el-form-item label="报告者电话" prop="reporterphone"> |
| | | <el-input |
| | | v-model="editForm.infoNo" |
| | | placeholder="请输入报告者编号" |
| | | v-model="editForm.phone" |
| | | placeholder="请输入报告者联系电话" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报告者电话" prop="reporterphone"> |
| | | <el-input |
| | | v-model="editForm.reporterphone" |
| | | placeholder="请输入报告者联系电话" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="协调员姓名" prop="coordinatorName"> |
| | | <el-input |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="协调员编号" prop="coordinatorNo"> |
| | | <el-input |
| | | v-model="editForm.coordinatorNo" |
| | | placeholder="请输入协调员编号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否终止案例" prop="terminationCase"> |
| | | <el-radio-group v-model="editForm.terminationCase"> |
| | | <el-radio label="0">进行中</el-radio> |
| | | <el-radio label="1">已终止</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | UploadAttachment, |
| | | FilePreviewDialog |
| | | }, |
| | | dicts: ["sys_user_sex", "sys_BloodType"], |
| | | dicts: ["sys_user_sex", "sys_BloodType", "sys_Infectious", "sys_IDType"], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | caseNo: [ |
| | | { required: true, message: "请输入案例编号", trigger: "blur" } |
| | | ], |
| | | name: [ |
| | | { required: true, message: "请输入患者姓名", trigger: "blur" } |
| | | ], |
| | | name: [{ required: true, message: "请输入患者姓名", trigger: "blur" }], |
| | | sex: [{ required: true, message: "请选择性别", trigger: "change" }], |
| | | age: [{ required: true, message: "请输入年龄", trigger: "blur" }], |
| | | diagnosisname: [ |
| | |
| | | |
| | | this.currentCase = data; |
| | | this.editForm = { ...data }; |
| | | this.editForm.idcardtype = this.editForm.idcardtype.toString(); |
| | | console.log(this.editForm.idcardtype); |
| | | this.editForm.infectious = this.editForm.infectious |
| | | .split(",") |
| | | .filter(item => item.trim() !== ""); |
| | | |
| | | this.editOpen = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.editForm && this.$refs.editForm.clearValidate(); |
| | |
| | | this.saveLoading = true; |
| | | |
| | | const requestData = { ...this.editForm }; |
| | | requestData.infectious = requestData.infectious.join(","); |
| | | let response; |
| | | |
| | | if (this.isEditing) { |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <!-- <el-col :span="11"> |
| | | <el-form-item label="捐献者编号" prop="donorno"> |
| | | <el-input |
| | | v-model="formData.donorno" |
| | | placeholder="请输入捐献者编号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |