| | |
| | | <!-- 基础信息部分 --> |
| | | <el-card header="基础信息" class="form-section"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="案例编号" prop="caseNo"> |
| | | <el-col :span="12"> |
| | | <el-form-item |
| | | label="当前医疗机构" |
| | | prop="currentMedicalInstitution" |
| | | > |
| | | <el-input |
| | | v-model="formData.currentMedicalInstitution" |
| | | placeholder="请输入当前医疗机构" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="当前医疗机构科室" prop="currentDept"> |
| | | <el-input |
| | | v-model="formData.currentDept" |
| | | placeholder="请输入当前医疗机构科室" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="首诊医疗机构" prop="firstMedicalInstitution"> |
| | | <el-input |
| | | v-model="formData.firstMedicalInstitution" |
| | | placeholder="请输入首诊医疗机构" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="首诊医疗机构科室" prop="firstDept"> |
| | | <el-input |
| | | v-model="formData.firstDept" |
| | | placeholder="请输入首诊医疗机构科室" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="捐献编号" prop="caseNo"> |
| | | <el-input |
| | | v-model="formData.caseNo" |
| | | :disabled="isEdit" |
| | | placeholder="系统自动生成" |
| | | placeholder="请输入捐献编号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="上报医院" prop="treatmenthospitalname"> |
| | | <el-input |
| | | v-model="formData.treatmenthospitalname" |
| | | placeholder="请输入上报医院" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="姓名" prop="name"> |
| | | <el-input v-model="formData.name" placeholder="必填项" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-select v-model="formData.sex" placeholder="请选择性别"> |
| | | <el-option label="男" value="1" /> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="国籍" prop="nationality"> |
| | | <el-input |
| | | v-model="formData.nationality" |
| | | placeholder="请输入国籍" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="出生日期" prop="birthday"> |
| | | <el-date-picker |
| | | v-model="formData.birthday" |
| | | type="date" |
| | | placeholder="选择出生日期" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | @change="calculateAge" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="年龄" prop="andAge"> |
| | | <el-input v-model="formData.andAge" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="民族" prop="nation"> |
| | | <el-select v-model="formData.nation" placeholder="请选择民族"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_nation || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="证件类型" prop="idcardtype"> |
| | | <el-select |
| | | v-model="formData.idcardtype" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="证件号码" prop="idcardno"> |
| | | <el-input |
| | | v-model="formData.idcardno" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="出生日期" prop="birthday"> |
| | | <el-date-picker |
| | | v-model="formData.birthday" |
| | | type="date" |
| | | placeholder="选择出生日期" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | @change="calculateAge" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="年龄" prop="andAge"> |
| | | <el-input v-model="formData.andAge" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="民族" prop="nation"> |
| | | <el-select v-model="formData.nation" placeholder="请选择民族"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_nation || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="国籍" prop="nationality"> |
| | | <el-input |
| | | v-model="formData.nationality" |
| | | placeholder="请输入国籍" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row :gutter="20"> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="联系电话" prop="phone"> |
| | | <el-input |
| | | v-model="formData.phone" |
| | | placeholder="请输入联系电话" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="学历" prop="education"> |
| | | <el-select |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> --> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="上报医院" prop="treatmenthospitalname"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="现居住地" prop="residenceaddress"> |
| | | <li-area-select |
| | | ref="residenceSelect" |
| | | v-model="residenceAddress" |
| | | @change="handleResidenceAddressChange" |
| | | /> |
| | | <el-input |
| | | v-model="formData.treatmenthospitalname" |
| | | placeholder="请输入上报医院" |
| | | v-model="formData.residenceaddress" |
| | | placeholder="请输入详细地址" |
| | | style="margin-top: 8px" |
| | | @blur="handleResidenceDetailBlur" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="住址" prop="registeraddress"> |
| | | <li-area-select |
| | | ref="registerSelect" |
| | | v-model="registerAddress" |
| | | @change="handleRegisterAddressChange" |
| | | /> |
| | | <el-input |
| | | v-model="formData.registeraddress" |
| | | placeholder="请输入详细地址" |
| | | style="margin-top: 8px" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <!-- 医疗信息部分 --> |
| | | <el-card header="医疗信息" class="form-section"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="入院时间" prop="Reporttothehospital"> |
| | | <el-input |
| | | v-model="formData.Reporttothehospital" |
| | | placeholder="请输入入院时间" |
| | | /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="入院科室" prop="treatmentdeptname"> |
| | | <el-input |
| | | v-model="formData.treatmentdeptname" |
| | | placeholder="请输入科室" |
| | | <el-date-picker |
| | | v-model="formData.entryTime" |
| | | type="datetime" |
| | | placeholder="选择入院时间" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="8"> |
| | | <el-form-item label="住院号" prop="inpatientno"> |
| | | <el-input |
| | | v-model="formData.inpatientno" |
| | | placeholder="请输入住院号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="疾病诊断" prop="diagnosisname"> |
| | | <el-input |
| | | v-model="formData.diagnosisname" |
| | | placeholder="请输入疾病诊断名称" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="疾病诊断" prop="diagnosisname"> |
| | | <el-input |
| | | v-model="formData.diagnosisname" |
| | | placeholder="请输入疾病诊断名称" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 疾病类型 --> |
| | | <el-row> |
| | | <el-form-item label="疾病类型" align="left"> |
| | | <el-checkbox-group v-model="formData.diseasetype"> |
| | | <el-checkbox |
| | | v-for="dict in dict.type.sys_DiseaseType || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | > |
| | | {{ dict.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-form-item label="其他" prop="diseasetypeOther"> |
| | | <el-input |
| | | v-model="formData.diseasetypeOther" |
| | | placeholder="请输入其他" |
| | | /> |
| | | </el-form-item> |
| | | <el-col :span="16"> |
| | | <el-form-item label="疾病类型" align="left"> |
| | | <el-checkbox-group v-model="formData.diseasetype"> |
| | | <el-checkbox |
| | | v-for="dict in dict.type.sys_DiseaseType || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | > |
| | | {{ dict.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="其他" prop="diseasetypeOther"> |
| | | <el-input |
| | | v-model="formData.diseasetypeOther" |
| | | placeholder="请输入其他" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- 传染病 --> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item |
| | | label="当前医疗机构" |
| | | prop="currentMedicalInstitution" |
| | | > |
| | | <el-input |
| | | v-model="formData.currentMedicalInstitution" |
| | | placeholder="请输入当前医疗机构" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="当前医疗机构科室" prop="currentDept"> |
| | | <el-input |
| | | v-model="formData.currentDept" |
| | | placeholder="请输入当前医疗机构科室" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="首次医疗机构" prop="firstMedicalInstitution"> |
| | | <el-input |
| | | v-model="formData.firstMedicalInstitution" |
| | | placeholder="请输入首次医疗机构" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="首次医疗机构科室" prop="firstDept"> |
| | | <el-input |
| | | v-model="formData.firstDept" |
| | | placeholder="请输入首次医疗机构科室" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <!-- <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="GCS评分" prop="gcsScore"> |
| | | <el-input |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="协调员编号" prop="coordinatorNo"> |
| | | <el-input |
| | | v-model="formData.coordinatorNo" |
| | | placeholder="请输入协调员编号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="8"> |
| | | <el-form-item label="协调员姓名" prop="coordinatorName"> |
| | | <el-input |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> --> |
| | | |
| | | <el-row> |
| | | <!-- <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="病情概况" prop="illnessoverview"> |
| | | <el-input |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> --> |
| | | </el-card> |
| | | |
| | | <!-- 地址信息部分 --> |
| | | <el-card header="地址信息" class="form-section"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="现住地址" prop="residenceaddress"> |
| | | <li-area-select |
| | | ref="residenceSelect" |
| | | v-model="residenceAddress" |
| | | @change="handleResidenceAddressChange" |
| | | /> |
| | | <el-input |
| | | v-model="formData.residenceaddress" |
| | | placeholder="请输入详细地址" |
| | | style="margin-top: 8px" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="户籍地址" prop="registeraddress"> |
| | | <li-area-select |
| | | ref="registerSelect" |
| | | v-model="registerAddress" |
| | | @change="handleRegisterAddressChange" |
| | | /> |
| | | <el-input |
| | | v-model="formData.registeraddress" |
| | | placeholder="请输入详细地址" |
| | | style="margin-top: 8px" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | |
| | | <!-- 意愿和亲属信息部分 --> |
| | | <el-card header="意愿和亲属信息" class="form-section"> |
| | | <!-- 本人意愿 --> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="与捐赠者关系" prop="familyrelations"> |
| | | <el-form-item label="与潜在捐献者关系" prop="familyrelations"> |
| | | <el-select |
| | | v-model="formData.familyrelations" |
| | | placeholder="请选择与捐赠者关系" |
| | | placeholder="请选择与捐献者关系" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_FamilyRelation || []" |
| | |
| | | </el-row> |
| | | |
| | | <!-- 信息来源 --> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item align="left" label="信息来源"> |
| | | <el-checkbox-group v-model="formData.infosources"> |
| | | <el-checkbox |
| | | v-for="dict in dict.type.sys_InfoSources || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | > |
| | | {{ dict.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-card> |
| | | <!-- 地址信息部分 --> |
| | | <!-- <el-card header="地址信息" class="form-section"> |
| | | |
| | | </el-card> --> |
| | | <!-- 报告信息部分 --> |
| | | <el-card header="报告信息" class="form-section"> |
| | | <el-row :gutter="20"> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="报告人编号" prop="reporterno"> |
| | | <el-select |
| | | v-model="formData.reporterno" |
| | | @change="handleReporterChange" |
| | | > |
| | | <el-option |
| | | v-for="reporter in reporters" |
| | | :key="reporter.reportNo" |
| | | :label="reporter.reportName" |
| | | :value="reporter.reportNo" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="其他" prop="infosourcesOther"> |
| | | </el-col> --> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item align="left" label="信息来源"> |
| | | <el-checkbox-group v-model="formData.infosources"> |
| | | <el-checkbox |
| | | v-for="dict in dict.type.sys_InfoSources || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | > |
| | | {{ dict.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="其他" prop="infosourcesOther"> |
| | | <el-input |
| | | v-model="formData.infosourcesOther" |
| | | placeholder="请输入信息来源其他" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | |
| | | <el-col :span="20"> |
| | | <el-form-item label="获取组织名称" prop="acquisitiontissuename"> |
| | | <el-input |
| | | v-model="formData.infosourcesOther" |
| | | placeholder="请输入信息来源其他" |
| | | v-model="formData.acquisitiontissuename" |
| | | placeholder="请输入获取组织名称" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- 信息员 --> |
| | | <el-row> |
| | | <!-- 上报阶段报告人 --> |
| | | <el-col :span="8"> |
| | | <el-form-item label="信息员" prop="infoname"> |
| | | <el-form-item label="上报阶段报告人" prop="reportername"> |
| | | <el-input |
| | | v-model="formData.infoname" |
| | | placeholder="请输入信息员" |
| | | v-model="formData.reportername" |
| | | placeholder="报告人姓名" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="联系电话" prop="infophone"> |
| | | <el-form-item label="报告人联系电话" prop="reporterphone"> |
| | | <el-input |
| | | v-model="formData.reporterphone" |
| | | placeholder="报告人联系电话" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报告时间" prop="reporttime"> |
| | | <el-date-picker |
| | | v-model="formData.reporttime" |
| | | type="date" |
| | | placeholder="选择报告时间" |
| | | value-format="yyyy-MM-dd " |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- 报告信息员 --> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报告信息员" prop="infoName"> |
| | | <el-input |
| | | v-model="formData.infoName" |
| | | placeholder="请输入报告信息员" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="信息员联系电话" prop="infophone"> |
| | | <el-input |
| | | v-model="formData.infophone" |
| | | placeholder="请输入信息员联系电话" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报告时间" prop="reporttime"> |
| | | <el-date-picker |
| | | v-model="formData.reporttime" |
| | | type="date" |
| | | placeholder="选择报告时间" |
| | | value-format="yyyy-MM-dd " |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="部门ID" prop="deptid"> |
| | | <el-input |
| | | v-model="formData.deptid" |
| | | placeholder="请输入部门ID" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> --> |
| | | </el-card> |
| | | |
| | | <!-- 捐献信息部分 --> |
| | | <el-card header="捐献信息" class="form-section"> |
| | | <!-- <el-card header="捐献信息" class="form-section"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="捐献类别" prop="donationcategory"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="案例时间" prop="donatetime"> |
| | | <el-form-item label="案例上报时间" prop="donatetime"> |
| | | <el-date-picker |
| | | v-model="formData.donatetime" |
| | | type="datetime" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="获取组织编号" prop="acquisitiontissueno"> |
| | | <el-input |
| | | v-model="formData.acquisitiontissueno" |
| | | placeholder="请输入获取组织编号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="获取组织名称" prop="acquisitiontissuename"> |
| | | <el-input |
| | | v-model="formData.acquisitiontissuename" |
| | | placeholder="请输入获取组织名称" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- 红十字会和联系人 --> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item align="left" label="红十字会" prop="redorganno"> |
| | | <org-selecter |
| | | ref="addCrossOrgSelect" |
| | | :org-type="'2'" |
| | | v-model="formData.redorganno" |
| | | /> |
| | | |
| | | <el-select |
| | | v-model="formData.redorganname" |
| | | placeholder="请选择红十字会机构名称" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_redcrossagency" |
| | | :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> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | |
| | | <!-- 报告信息部分 --> |
| | | <el-card header="报告信息" class="form-section"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报告人编号" prop="reporterno"> |
| | | <el-select |
| | | v-model="formData.reporterno" |
| | | @change="handleReporterChange" |
| | | > |
| | | <el-option |
| | | v-for="reporter in reporters" |
| | | :key="reporter.reportNo" |
| | | :label="reporter.reportName" |
| | | :value="reporter.reportNo" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报告人姓名" prop="reportername"> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="获取组织名称" prop="acquisitiontissuename"> |
| | | <el-input |
| | | v-model="formData.reportername" |
| | | placeholder="报告人姓名" |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报告人电话" prop="reporterphone"> |
| | | <el-input |
| | | v-model="formData.reporterphone" |
| | | placeholder="报告人联系电话" |
| | | v-model="formData.acquisitiontissuename" |
| | | placeholder="请输入获取组织名称" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报告时间" prop="reporttime"> |
| | | <el-date-picker |
| | | v-model="formData.reporttime" |
| | | type="datetime" |
| | | placeholder="选择报告时间" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="部门ID" prop="deptid"> |
| | | <el-input |
| | | v-model="formData.deptid" |
| | | placeholder="请输入部门ID" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </el-card> --> |
| | | </el-form> |
| | | |
| | | <!-- 捐献者登记阶段附件(可编辑,存储于亲属确认表 assessannex) --> |
| | | <el-card header="登记阶段附件" class="form-section"> |
| | | <el-tabs v-model="activeRegisterType" type="card"> |
| | | <el-tab-pane |
| | | v-for="type in registerAttachmentTypes" |
| | | :key="type.value" |
| | | :label="type.label" |
| | | :name="type.value" |
| | | > |
| | | <div class="attachment-header"> |
| | | <span class="upload-title">{{ type.label }}</span> |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="openUploadDialog(type.value)" |
| | | > |
| | | 添加附件 |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-table |
| | | :data="getRegisterAttachments(type.value)" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column label="文件名" min-width="200"> |
| | | <template slot-scope="scope"> |
| | | <i |
| | | class="el-icon-document" |
| | | style="color: #409eff; margin-right: 8px" |
| | | ></i> |
| | | <span>{{ scope.row.fileName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="文件类型" width="90" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-tag size="small">{{ |
| | | getFileType(scope.row.fileName) |
| | | }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="文件大小" width="90" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatFileSize(scope.row.fileSize) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="上传时间" width="155" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | formatDateTime(scope.row.uploadTime || scope.row.createTime) |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="145" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | @click="handlePreview(scope.row)" |
| | | > |
| | | 预览 |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | @click="handleRemoveAttachment(type.value, scope.$index)" |
| | | > |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div |
| | | v-if="getRegisterAttachments(type.value).length === 0" |
| | | class="empty-attachment" |
| | | > |
| | | <el-empty |
| | | :description="`暂无${type.label}`" |
| | | :image-size="80" |
| | | ></el-empty> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">取消</el-button> |
| | |
| | | </el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 上传附件对话框 --> |
| | | <el-dialog |
| | | :title="`上传${getCurrentTypeLabel()}附件`" |
| | | :visible.sync="uploadDialogVisible" |
| | | width="480px" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-upload |
| | | ref="uploadRef" |
| | | class="upload-demo" |
| | | drag |
| | | :action="uploadAction" |
| | | :headers="headers" |
| | | multiple |
| | | :file-list="tempFileList" |
| | | :before-upload="beforeUpload" |
| | | :on-change="handleFileChange" |
| | | :on-remove="handleTempRemove" |
| | | :on-success="handleUploadSuccess" |
| | | :auto-upload="false" |
| | | > |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | 支持上传pdf、jpg、png、doc、docx格式文件,单个文件不超过10MB |
| | | </div> |
| | | </el-upload> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="uploadDialogVisible = false">取消</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitUpload" |
| | | :loading="uploadLoading" |
| | | :disabled="tempFileList.length === 0" |
| | | > |
| | | 确认上传 |
| | | </el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 文件预览弹窗 --> |
| | | <FilePreviewDialog |
| | | :visible="previewVisible" |
| | | :file="currentPreviewFile" |
| | | @close="previewVisible = false" |
| | | @download="handleDownload" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | getDonatebaseinfo, |
| | | updateDonatebaseinfo |
| | | } from "@/api/project/donatebaseinfo"; |
| | | import { relativesEdit, relativesAdd, relativesList } from "@/api/businessApi"; |
| | | import OrgSelecter from "@/views/project/components/orgselect"; |
| | | import LiAreaSelect from "@/components/Address"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | import { getToken } from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: "EditCaseModal", |
| | | components: { |
| | | OrgSelecter, |
| | | LiAreaSelect |
| | | LiAreaSelect, |
| | | FilePreviewDialog |
| | | }, |
| | | |
| | | // 添加所有需要的字典类型 |
| | | dicts: [ |
| | | "sys_redcrossagency", |
| | | "sys_bloodtype_rhd", |
| | | "sys_BloodType", |
| | | "sys_user_sex", |
| | |
| | | residenceAddress: {}, |
| | | registerAddress: {}, |
| | | formData: this.getDefaultFormData(), |
| | | // 登记阶段附件(可编辑,存储于亲属确认表 assessannex) |
| | | registerAttachmentTypes: [ |
| | | { value: "1", label: "人体器官潜在捐献者登记表附件" }, |
| | | { value: "5", label: "证件照" }, |
| | | { value: "6", label: "疾病诊断治疗" } |
| | | ], |
| | | registerAttachmentData: { "1": [], "5": [], "6": [] }, |
| | | otherAttachments: [], |
| | | confirmationRecord: null, |
| | | activeRegisterType: "1", |
| | | uploadAction: process.env.VUE_APP_BASE_API + "/common/upload", |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | uploadDialogVisible: false, |
| | | uploadLoading: false, |
| | | tempFileList: [], |
| | | currentUploadType: "", |
| | | previewVisible: false, |
| | | currentPreviewFile: null, |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "请输入捐献者姓名", trigger: "blur" } |
| | | ], |
| | | caseNo: [ |
| | | { required: true, message: "请输入捐献者编号", trigger: "blur" } |
| | | ], |
| | | sex: [{ required: true, message: "请选择性别", trigger: "change" }], |
| | | idcardtype: [ |
| | |
| | | bloodtype: [ |
| | | { required: true, message: "请选择血型", trigger: "change" } |
| | | ], |
| | | donatetime: [ |
| | | { required: true, message: "请选择案例时间", trigger: "change" } |
| | | ], |
| | | // donatetime: [ |
| | | // { required: true, message: "请选择案例时间", trigger: "change" } |
| | | // ], |
| | | reporttime: [ |
| | | { required: true, message: "请选择报告时间", trigger: "change" } |
| | | ], |
| | | residenceaddress: [ |
| | | { required: true, message: "请输入现居住地详细地址", trigger: "blur" } |
| | | ], |
| | | registeraddress: [ |
| | | { required: true, message: "请输入住址详细地址", trigger: "blur" } |
| | | ] |
| | | } |
| | | }; |
| | |
| | | this.handleClose(); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | visible(newVal) { |
| | |
| | | majorrelatives: null, |
| | | familyrelations: null, |
| | | infosources: [], |
| | | infoname: null, |
| | | infoName: null, |
| | | infophone: null, |
| | | redorganno: null, |
| | | contactperson: null, |
| | |
| | | donationcategory: null, |
| | | donatetime: null, |
| | | recordstate: "0", |
| | | acquisitiontissueno: "ZJOPO", |
| | | acquisitiontissuename: "浙江省人体器官获取组织", |
| | | acquisitiontissuename: "青岛大学附属医院", |
| | | |
| | | // 报告信息 |
| | | reporterno: null, |
| | |
| | | this.formData.bloodtype = "0"; |
| | | this.formData.rhyin = "0"; |
| | | this.formData.recordstate = "0"; |
| | | this.formData.acquisitiontissueno = "ZJOPO"; |
| | | this.formData.acquisitiontissuename = "浙江省人体器官获取组织"; |
| | | this.formData.acquisitiontissuename = "青岛大学附属医院"; |
| | | |
| | | // 设置信息员和电话默认值 |
| | | this.formData.infoName = "孙文月"; |
| | | this.formData.infophone = "18661808259"; |
| | | } |
| | | } catch (error) { |
| | | console.error("初始化表单失败:", error); |
| | |
| | | async loadEditData() { |
| | | try { |
| | | const response = await getDonatebaseinfo(this.editData.id); |
| | | response.data.firstMedicalInstitution = |
| | | response.data.treatmenthospitalname; |
| | | const data = response.data; |
| | | console.log("加载到的数据:", data); |
| | | |
| | |
| | | |
| | | this.formData = { ...this.getDefaultFormData(), ...data }; |
| | | console.log("合并后的formData:", this.formData); |
| | | this.formData.infoName = "孙文月"; |
| | | this.formData.infophone = "18661808259"; |
| | | if (!this.formData.currentMedicalInstitution) |
| | | this.formData.currentMedicalInstitution = "青岛大学附属医院"; |
| | | |
| | | // 设置地址信息 |
| | | if (data.residenceprovince) { |
| | | if (!this.formDatacurrentDept) this.formData.currentDept = "器官捐献科"; |
| | | // 根据返回数据设置地址展示信息 |
| | | if (data.residenceprovincename) { |
| | | this.residenceAddress = { |
| | | sheng: data.residenceprovincename, |
| | | shi: data.residencecityname, |
| | | qu: data.residencetownname |
| | | shi: data.residencecountyname, |
| | | qu: data.residencecommunityname |
| | | }; |
| | | } |
| | | |
| | | // 户籍地址 |
| | | if (data.registerprovince) { |
| | | this.registerAddress = { |
| | | sheng: data.registerprovincename, |
| | | sheng: data.registerprovince, |
| | | shi: data.registercityname, |
| | | qu: data.registertownname |
| | | qu: data.registercommunityname |
| | | }; |
| | | } |
| | | console.log(this.registerAddress, "registerAddress12"); |
| | | |
| | | this.calculateAge(data.birthday); |
| | | await this.loadRegisterAttachments(); |
| | | } catch (error) { |
| | | console.error("获取案例数据失败:", error); |
| | | this.$message.error("获取案例数据失败"); |
| | |
| | | }, |
| | | |
| | | handleResidenceAddressChange(address) { |
| | | this.formData.residenceprovince = address.sheng; |
| | | this.formData.residencecity = address.shi; |
| | | this.formData.residencetown = address.qu; |
| | | this.formData.residenceprovincename = address.sheng; |
| | | this.formData.residencecountyname = address.shi; |
| | | this.formData.residencecommunityname = address.qu; |
| | | |
| | | // 每次现住址省市区变化时,如果户籍地址的省市区完全为空,则自动填充 |
| | | const registerProvinceEmpty = !this.formData.registerprovince; |
| | | const registerCityEmpty = !this.formData.registercityname; |
| | | const registerTownEmpty = !this.formData.registercommunityname; |
| | | |
| | | if (registerProvinceEmpty || registerCityEmpty || registerTownEmpty) { |
| | | this.formData.registerprovince = address.sheng; |
| | | this.formData.registercityname = address.shi; |
| | | this.formData.registercommunityname = address.qu; |
| | | this.registerAddress = { |
| | | sheng: address.sheng, |
| | | shi: address.shi, |
| | | qu: address.qu |
| | | }; |
| | | } |
| | | }, |
| | | // 现居住地详细地址失焦时,如果住址详细地址为空则自动填充 |
| | | handleResidenceDetailBlur() { |
| | | if (this.formData.residenceaddress && !this.formData.registeraddress) { |
| | | this.formData.registeraddress = this.formData.residenceaddress; |
| | | } |
| | | }, |
| | | handleRegisterAddressChange(address) { |
| | | console.log(this.registerAddress, "registerAddress11"); |
| | | |
| | | this.formData.registerprovince = address.sheng; |
| | | this.formData.registercityname = address.shi; |
| | | this.formData.registercommunityname = address.qu; |
| | | }, |
| | | |
| | | handleRegisterAddressChange(address) { |
| | | this.formData.registerprovince = address.sheng; |
| | | this.formData.registercity = address.shi; |
| | | this.formData.registertown = address.qu; |
| | | // 加载登记阶段附件(读取亲属确认表 assessannex,与确认详情页共用同一份数据) |
| | | // 捐献确认信息统一通过 confirmationBaseInfoList 接口获取 |
| | | async loadRegisterAttachments() { |
| | | const infoid = this.editData && this.editData.id; |
| | | if (!infoid) { |
| | | this.resetAttachments(); |
| | | return; |
| | | } |
| | | try { |
| | | const res = await relativesList({ infoid }); |
| | | const record = this.parseConfirmationBaseInfo(res); |
| | | if (record && record.id) { |
| | | this.confirmationRecord = record; |
| | | this.parseAssessannex(record.assessannex); |
| | | } else { |
| | | this.confirmationRecord = null; |
| | | this.resetAttachments(); |
| | | } |
| | | } catch (e) { |
| | | console.warn("获取亲属确认附件失败:", e); |
| | | this.resetAttachments(); |
| | | } |
| | | }, |
| | | |
| | | // 解析 confirmationBaseInfoList 返回的确认基础信息(兼容数组 / rows / 单对象结构) |
| | | parseConfirmationBaseInfo(res) { |
| | | if (!res || res.code !== 200) return null; |
| | | const data = res.data; |
| | | if (!data) return null; |
| | | if (Array.isArray(data)) return data[0] || null; |
| | | if (Array.isArray(data.rows)) return data.rows[0] || null; |
| | | if (Array.isArray(data.list)) return data.list[0] || null; |
| | | return data; |
| | | }, |
| | | |
| | | resetAttachments() { |
| | | Object.keys(this.registerAttachmentData).forEach(key => { |
| | | this.registerAttachmentData[key] = []; |
| | | }); |
| | | this.otherAttachments = []; |
| | | }, |
| | | |
| | | parseAssessannex(assessannex) { |
| | | this.resetAttachments(); |
| | | if (!assessannex) return; |
| | | try { |
| | | const list = |
| | | typeof assessannex === "string" ? JSON.parse(assessannex) : assessannex; |
| | | if (!Array.isArray(list)) return; |
| | | list.forEach(item => { |
| | | const type = String(item.type || ""); |
| | | if (this.registerAttachmentData[type]) { |
| | | this.registerAttachmentData[type].push(item); |
| | | } else { |
| | | this.otherAttachments.push(item); |
| | | } |
| | | }); |
| | | } catch (e) { |
| | | console.warn("解析assessannex失败:", e); |
| | | } |
| | | }, |
| | | |
| | | getRegisterAttachments(type) { |
| | | return this.registerAttachmentData[type] || []; |
| | | }, |
| | | |
| | | // 序列化登记阶段附件,并保留确认阶段等其他附件 |
| | | serializeAssessannex() { |
| | | const all = [...this.otherAttachments]; |
| | | this.registerAttachmentTypes.forEach(t => { |
| | | all.push(...(this.registerAttachmentData[t.value] || [])); |
| | | }); |
| | | return JSON.stringify(all); |
| | | }, |
| | | |
| | | getCurrentTypeLabel() { |
| | | const type = this.registerAttachmentTypes.find( |
| | | t => t.value === this.currentUploadType |
| | | ); |
| | | return type ? type.label : ""; |
| | | }, |
| | | |
| | | openUploadDialog(type) { |
| | | this.currentUploadType = type; |
| | | this.tempFileList = []; |
| | | this.uploadDialogVisible = true; |
| | | this.$nextTick(() => { |
| | | if (this.$refs.uploadRef) { |
| | | this.$refs.uploadRef.clearFiles(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | beforeUpload(file) { |
| | | const allowedTypes = [ |
| | | "application/pdf", |
| | | "image/jpeg", |
| | | "image/png", |
| | | "application/msword", |
| | | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" |
| | | ]; |
| | | const maxSize = 10 * 1024 * 1024; |
| | | const isTypeOk = |
| | | allowedTypes.includes(file.type) || |
| | | file.name.endsWith(".pdf") || |
| | | file.name.endsWith(".jpg") || |
| | | file.name.endsWith(".jpeg") || |
| | | file.name.endsWith(".png") || |
| | | file.name.endsWith(".doc") || |
| | | file.name.endsWith(".docx"); |
| | | if (!isTypeOk) { |
| | | this.$message.error( |
| | | "文件格式不支持,请上传pdf、jpg、png、doc或docx格式文件" |
| | | ); |
| | | return false; |
| | | } |
| | | if (file.size > maxSize) { |
| | | this.$message.error("文件大小不能超过10MB"); |
| | | return false; |
| | | } |
| | | return true; |
| | | }, |
| | | |
| | | handleFileChange(file, fileList) { |
| | | this.tempFileList = fileList; |
| | | }, |
| | | |
| | | handleTempRemove(file, fileList) { |
| | | this.tempFileList = fileList; |
| | | }, |
| | | |
| | | handleUploadSuccess(response, file) { |
| | | if (response.code !== 200) { |
| | | this.$message.error(response.msg || "上传失败"); |
| | | return; |
| | | } |
| | | const newAttachment = { |
| | | id: Date.now(), |
| | | fileName: file.name, |
| | | fileUrl: response.url, |
| | | fileSize: file.size, |
| | | fileType: this.getFileExtension(file.name), |
| | | type: this.currentUploadType, |
| | | uploadTime: this.getCurrentTime(), |
| | | uploader: "当前用户" |
| | | }; |
| | | if (this.registerAttachmentData[this.currentUploadType]) { |
| | | this.registerAttachmentData[this.currentUploadType].push(newAttachment); |
| | | } |
| | | this.$message.success("上传成功"); |
| | | this.uploadLoading = false; |
| | | this.uploadDialogVisible = false; |
| | | this.tempFileList = []; |
| | | }, |
| | | |
| | | submitUpload() { |
| | | if (this.tempFileList.length === 0) { |
| | | this.$message.warning("请先选择要上传的文件"); |
| | | return; |
| | | } |
| | | this.uploadLoading = true; |
| | | this.$refs.uploadRef.submit(); |
| | | }, |
| | | |
| | | handleRemoveAttachment(type, index) { |
| | | this.$confirm("确定要删除这个附件吗?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | const container = this.registerAttachmentData[type]; |
| | | if (container && container[index]) { |
| | | container.splice(index, 1); |
| | | this.$message.success("附件删除成功"); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | |
| | | handlePreview(file) { |
| | | this.currentPreviewFile = { |
| | | fileName: file.fileName, |
| | | fileUrl: file.fileUrl, |
| | | fileType: this.getFileType(file.fileName) |
| | | }; |
| | | this.previewVisible = true; |
| | | }, |
| | | |
| | | handleDownload(file) { |
| | | const fileUrl = 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("文件路径不存在,无法下载"); |
| | | } |
| | | }, |
| | | |
| | | getFileType(fileName) { |
| | | if (!fileName) return "other"; |
| | | const extension = this.getFileExtension(fileName); |
| | | const imageTypes = ["jpg", "jpeg", "png"]; |
| | | const pdfTypes = ["pdf"]; |
| | | const officeTypes = ["doc", "docx"]; |
| | | if (imageTypes.includes(extension)) return "image"; |
| | | if (pdfTypes.includes(extension)) return "pdf"; |
| | | if (officeTypes.includes(extension)) return "office"; |
| | | return "other"; |
| | | }, |
| | | |
| | | getFileExtension(filename) { |
| | | return filename |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | }, |
| | | |
| | | formatFileSize(size) { |
| | | if (!size) return "0 B"; |
| | | const k = 1024; |
| | | const sizes = ["B", "KB", "MB", "GB"]; |
| | | const i = Math.floor(Math.log(size) / Math.log(k)); |
| | | return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i]; |
| | | }, |
| | | |
| | | formatDateTime(dateTime) { |
| | | if (!dateTime) return ""; |
| | | try { |
| | | const date = new Date(dateTime); |
| | | if (isNaN(date.getTime())) return dateTime; |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | const hours = String(date.getHours()).padStart(2, "0"); |
| | | const minutes = String(date.getMinutes()).padStart(2, "0"); |
| | | return `${year}-${month}-${day} ${hours}:${minutes}`; |
| | | } catch (error) { |
| | | return dateTime; |
| | | } |
| | | }, |
| | | |
| | | getCurrentTime() { |
| | | const now = new Date(); |
| | | return `${now.getFullYear()}-${(now.getMonth() + 1) |
| | | .toString() |
| | | .padStart(2, "0")}-${now |
| | | .getDate() |
| | | .toString() |
| | | .padStart(2, "0")} ${now |
| | | .getHours() |
| | | .toString() |
| | | .padStart(2, "0")}:${now |
| | | .getMinutes() |
| | | .toString() |
| | | .padStart(2, "0")}:${now |
| | | .getSeconds() |
| | | .toString() |
| | | .padStart(2, "0")}`; |
| | | }, |
| | | |
| | | // 保存登记阶段附件到亲属确认表 assessannex |
| | | async saveAssessannex() { |
| | | const infoid = this.formData.id; |
| | | if (!infoid) return; |
| | | const assessannex = this.serializeAssessannex(); |
| | | try { |
| | | if (this.confirmationRecord && this.confirmationRecord.id) { |
| | | // 已存在确认表记录:仅更新附件字段,保留其余信息 |
| | | await relativesEdit({ ...this.confirmationRecord, assessannex }); |
| | | } else { |
| | | // 确认表记录不存在:新增完整记录(携带登记表基础信息) |
| | | await relativesAdd(this.buildConfirmationRecord(infoid, assessannex)); |
| | | } |
| | | } catch (e) { |
| | | console.warn("保存登记阶段附件失败:", e); |
| | | this.$message.warning("登记阶段附件保存失败,请重试"); |
| | | } |
| | | }, |
| | | |
| | | // 构建新增亲属确认表记录:携带捐献者基础信息,而非仅 infoid + assessannex |
| | | buildConfirmationRecord(infoid, assessannex) { |
| | | const f = this.formData; |
| | | return { |
| | | infoid, |
| | | caseNo: f.caseNo || "", |
| | | name: f.name || "", |
| | | sex: f.sex || "", |
| | | age: f.age != null ? f.age : "", |
| | | diagnosisname: f.diagnosisname || "", |
| | | treatmenthospitalname: f.treatmenthospitalname || "", |
| | | relativeconfirmationsign: "0", |
| | | state: 2, |
| | | assessannex |
| | | }; |
| | | }, |
| | | |
| | | handleClose() { |
| | |
| | | this.formData = this.getDefaultFormData(); |
| | | this.residenceAddress = {}; |
| | | this.registerAddress = {}; |
| | | this.resetAttachments(); |
| | | this.$emit("closed"); |
| | | }, |
| | | |
| | |
| | | this.$message.error("请确认表单必填信息完整后提交"); |
| | | return; |
| | | } |
| | | |
| | | // 额外校验现居住地和住址的省市区是否已选择 |
| | | if ( |
| | | !this.formData.residenceprovincename || |
| | | !this.formData.residencecountyname |
| | | ) { |
| | | this.$message.error("请完善现居住地的省市区信息"); |
| | | return; |
| | | } |
| | | if (!this.formData.registerprovince || !this.formData.registercityname) { |
| | | this.$message.error("请完善住址的省市区信息"); |
| | | return; |
| | | } |
| | | this.submitLoading = true; |
| | | try { |
| | | const submitData = this.processSubmitData(); |
| | |
| | | |
| | | const result = await updateDonatebaseinfo(submitData); |
| | | if (result.code === 200) { |
| | | await this.saveAssessannex(); |
| | | this.$message.success(this.isEdit ? "更新成功" : "新增成功"); |
| | | this.$emit("success", result.data); |
| | | console.log(1122); |
| | |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | .form-section { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .form-section:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .attachment-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 12px; |
| | | } |
| | | |
| | | .upload-title { |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | .empty-attachment { |
| | | padding: 12px 0; |
| | | } |
| | | </style> |