|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<!-- <el-form |
|
|
|
<el-form |
|
|
|
:model="queryParams" |
|
|
|
ref="queryForm" |
|
|
|
size="small" |
|
|
@ -35,7 +35,7 @@ |
|
|
|
重置 |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> --> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
<el-col :span="1.5"> |
|
|
@ -109,14 +109,14 @@ |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-download" |
|
|
|
@click="handleArchives(scope.row)" |
|
|
|
@click="handleExport(scope.row)" |
|
|
|
>导出 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-delete" |
|
|
|
@click="handleArchives(scope.row)" |
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
>删除 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
@ -146,122 +146,27 @@ |
|
|
|
:rules="rules" |
|
|
|
label-width="100px" |
|
|
|
> |
|
|
|
<el-form-item label="姓名" prop="name"> |
|
|
|
<el-input |
|
|
|
v-model="form.name" |
|
|
|
:disabled="formDisabled" |
|
|
|
placeholder="请输入" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="性别" prop="gender"> |
|
|
|
<el-radio-group v-model="form.gender" :disabled="formDisabled"> |
|
|
|
<el-radio :label="0">男</el-radio> |
|
|
|
<el-radio :label="1">女</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="出生日期" prop="birthDate"> |
|
|
|
<el-date-picker |
|
|
|
:disabled="formDisabled" |
|
|
|
format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
v-model="form.birthDate" |
|
|
|
type="date" |
|
|
|
placeholder="选择日期" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="民族" prop="ethnicity"> |
|
|
|
<el-input |
|
|
|
v-model="form.ethnicity" |
|
|
|
placeholder="请输入" |
|
|
|
:disabled="formDisabled" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="受教育年限" prop="educationYears"> |
|
|
|
<el-input |
|
|
|
v-model="form.educationYears" |
|
|
|
placeholder="请输入" |
|
|
|
:disabled="formDisabled" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="手机号码" prop="phone"> |
|
|
|
<el-input |
|
|
|
v-model="form.phone" |
|
|
|
placeholder="请输入" |
|
|
|
:disabled="formDisabled" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="证件类型" prop="idCardType"> |
|
|
|
<el-form-item label="组织" prop="name"> |
|
|
|
<el-select |
|
|
|
v-model="form.idCardType" |
|
|
|
v-model="form.tenantId" |
|
|
|
placeholder="请选择" |
|
|
|
:disabled="formDisabled" |
|
|
|
clearable |
|
|
|
filterable |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in idCardType" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
v-for="(item, index) in tenantsListData" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id" |
|
|
|
:key="index" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="证件号码" prop="idCard"> |
|
|
|
<el-input |
|
|
|
v-model="form.idCard" |
|
|
|
placeholder="请输入" |
|
|
|
:disabled="formDisabled" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="现病史" prop=""> |
|
|
|
<el-checkbox-group |
|
|
|
v-model="form.currentIllnessHistory" |
|
|
|
:disabled="formDisabled" |
|
|
|
> |
|
|
|
<el-checkbox v-for="(item, index) in medicalHistory" :label="item"> |
|
|
|
</el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
<el-input |
|
|
|
v-model="form.currentIllnessHistoryQt" |
|
|
|
placeholder="其他" |
|
|
|
:disabled="formDisabled" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
|
|
<el-button @click="cancel">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<!-- 导入患者信息 --> |
|
|
|
<el-dialog |
|
|
|
title="导入患者档案" |
|
|
|
:visible.sync="importOpen" |
|
|
|
width="640px" |
|
|
|
append-to-body |
|
|
|
> |
|
|
|
<el-form ref="importform" :model="importform"> |
|
|
|
<el-form-item prop="accessUrl"> |
|
|
|
<el-upload |
|
|
|
:limit="1" |
|
|
|
class="avatar-uploader wj-uploader" |
|
|
|
:headers="headers" |
|
|
|
:action="uploadFileUrl1" |
|
|
|
accept=".xlsx, .xls" |
|
|
|
:before-upload="handleBeforePdfUpload1" |
|
|
|
:on-success="handleUploadPdfAdd1" |
|
|
|
:file-list="fileList" |
|
|
|
:show-file-list="true" |
|
|
|
> |
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
<div class="el-upload__text"> |
|
|
|
将文件拖到此处,或 |
|
|
|
<em>点击上传</em> |
|
|
|
</div> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -498,19 +403,7 @@ export default { |
|
|
|
}, |
|
|
|
// 表单重置 |
|
|
|
reset() { |
|
|
|
this.form = { |
|
|
|
name: "", // 姓名 |
|
|
|
gender: 0, // 性别 |
|
|
|
birthDate: "", // 出生日期 |
|
|
|
ethnicity: "", // 民族 |
|
|
|
educationYears: "", // 教育程度 |
|
|
|
phone: "", // 联系电话 |
|
|
|
idCardType: "", // 证件类型 |
|
|
|
idCard: "", // 证件号码 |
|
|
|
source: 1, |
|
|
|
currentIllnessHistory: [], // 现病史 |
|
|
|
currentIllnessHistoryQt: "", // 现病史 |
|
|
|
}; |
|
|
|
this.form = {}; |
|
|
|
this.resetForm("form"); |
|
|
|
}, |
|
|
|
/** 搜索按钮操作 */ |
|
|
@ -522,11 +415,6 @@ export default { |
|
|
|
resetQuery() { |
|
|
|
this.queryParams.param = { |
|
|
|
keywords: "", //关键字 |
|
|
|
startAge: "", //开始年龄 |
|
|
|
endAge: "", //结束年龄 |
|
|
|
tenantId: "", //建档组织 |
|
|
|
createBy: "", //建档人 |
|
|
|
sourceId: "", //来源 |
|
|
|
}; |
|
|
|
this.handleQuery(); |
|
|
|
}, |
|
|
@ -540,52 +428,18 @@ export default { |
|
|
|
handleAdd() { |
|
|
|
this.reset(); |
|
|
|
this.open = true; |
|
|
|
this.title = "新增患者档案"; |
|
|
|
this.formDisabled = false; |
|
|
|
}, |
|
|
|
/** 修改按钮操作 */ |
|
|
|
handleUpdate(row) { |
|
|
|
this.open = true; |
|
|
|
this.title = "修改患者档案"; |
|
|
|
this.formDisabled = false; |
|
|
|
this.form = JSON.parse(JSON.stringify(row)); |
|
|
|
// 字符串转数组 |
|
|
|
this.form.currentIllnessHistory = |
|
|
|
this.form.currentIllnessHistory?.split(",") || []; |
|
|
|
}, |
|
|
|
/** 详情按钮操作 */ |
|
|
|
handleDetails(row) { |
|
|
|
this.open = true; |
|
|
|
this.title = "患者档案详情"; |
|
|
|
this.formDisabled = true; |
|
|
|
this.form = JSON.parse(JSON.stringify(row)); |
|
|
|
// 字符串转数组 |
|
|
|
this.form.currentIllnessHistory = |
|
|
|
this.form.currentIllnessHistory?.split(",") || []; |
|
|
|
}, |
|
|
|
/** 诊疗档案 */ |
|
|
|
handleArchives(row) { |
|
|
|
this.$router.push({ |
|
|
|
path: `/medicalFile/index?idCard=${row.idCard}`, |
|
|
|
}); |
|
|
|
this.title = "新增筛查二维码"; |
|
|
|
}, |
|
|
|
|
|
|
|
/** 提交按钮 */ |
|
|
|
submitForm: function () { |
|
|
|
this.$refs["form"].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (this.form.id != undefined) { |
|
|
|
patientUpd(this.form).then((response) => { |
|
|
|
this.$modal.msgSuccess("修改成功"); |
|
|
|
this.open = false; |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
patientAdd(this.form).then((response) => { |
|
|
|
this.$modal.msgSuccess("新增成功"); |
|
|
|
this.open = false; |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
} |
|
|
|
patientUpd(this.form).then((response) => { |
|
|
|
this.$modal.msgSuccess("修改成功"); |
|
|
|
this.open = false; |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
@ -608,29 +462,17 @@ export default { |
|
|
|
}, |
|
|
|
/** 导出按钮操作 */ |
|
|
|
handleExport() { |
|
|
|
this.download1( |
|
|
|
"/patient/export", |
|
|
|
{ |
|
|
|
...this.queryParams.params, |
|
|
|
}, |
|
|
|
`患者档案.xlsx` |
|
|
|
); |
|
|
|
}, |
|
|
|
/** 下载按钮操作 */ |
|
|
|
handleDownload() { |
|
|
|
window.open( |
|
|
|
`${process.env.VUE_APP_API_QZURL}/acupuncture/profile/PatientTemplate.xlsx` |
|
|
|
); |
|
|
|
// window.open( |
|
|
|
// `${process.env.VUE_APP_API_QZURL}/acupuncture/profile/PatientTemplate.xlsx` |
|
|
|
// ); |
|
|
|
// this.download1( |
|
|
|
// "/patient/export", {}, |
|
|
|
// `患者档案导入模版.xlsx` |
|
|
|
// "/patient/export", |
|
|
|
// { |
|
|
|
// ...this.queryParams.params, |
|
|
|
// }, |
|
|
|
// `筛查二维码.xlsx` |
|
|
|
// ); |
|
|
|
}, |
|
|
|
/** 导入按钮操作 */ |
|
|
|
handleImport() { |
|
|
|
this.fileList = []; |
|
|
|
this.importOpen = true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|