|
|
@ -34,7 +34,7 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="建档组织" prop="tenantId"> |
|
|
|
<el-form-item label="建档组织" prop="tenantId"> |
|
|
|
<el-select |
|
|
|
v-model="queryParams.param.tenantId" |
|
|
|
placeholder="请选择" |
|
|
@ -48,8 +48,20 @@ |
|
|
|
:key="index" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item label="创建时间" prop="doctorNo"> |
|
|
|
<el-date-picker |
|
|
|
v-model="queryTime" |
|
|
|
type="daterange" |
|
|
|
range-separator="至" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
align="right" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
icon="el-icon-search" |
|
|
@ -91,7 +103,7 @@ |
|
|
|
<el-table-column |
|
|
|
label="姓名" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-NAME" |
|
|
|
min-width="100" |
|
|
|
show-overflow-tooltip |
|
|
|
fixed |
|
|
@ -99,52 +111,57 @@ |
|
|
|
<el-table-column |
|
|
|
label="性别" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-SEX" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="出生日期" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-BIRTH" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="年龄" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-AGE" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="联系方式" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-PHONE" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="身高cm" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-HEIGHT" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="体重kg" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-WEIGHT" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="BMI" |
|
|
|
align="center" |
|
|
|
prop="SCWJ-BMI" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
<el-table-column label="BMI" align="center" prop="name" min-width="100" /> |
|
|
|
<el-table-column |
|
|
|
show-overflow-tooltip |
|
|
|
label="结论" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-JL" |
|
|
|
min-width="150" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="失眠自评(SRSS)" |
|
|
|
align="center" |
|
|
|
prop="name" |
|
|
|
prop="SCWJ-RESULT" |
|
|
|
min-width="150" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
@ -181,87 +198,22 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getToken } from "@/utils/auth"; |
|
|
|
import { |
|
|
|
queryPatient, |
|
|
|
patientAdd, |
|
|
|
patientUpd, |
|
|
|
patientDel, |
|
|
|
} from "@/api/patientFile"; |
|
|
|
// import { tenantsList } from "@/api/member"; |
|
|
|
import { queryDetail } from "@/api/screening.js"; |
|
|
|
import { tenantsList } from "@/api/member"; |
|
|
|
export default { |
|
|
|
name: "Notice", |
|
|
|
dicts: ["sys_notice_status", "sys_notice_type"], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
queryTime: [], // 创建时间范围 |
|
|
|
tenantsListData: [], // 组织列表 |
|
|
|
headers: { |
|
|
|
Authorization: "Bearer " + getToken(), |
|
|
|
deptId: localStorage.getItem("hospitalId"), |
|
|
|
}, |
|
|
|
uploadFileUrl1: |
|
|
|
process.env.VUE_APP_API_QZURL + "/acupuncture/patient/import", // 上传的图片服务器地址 |
|
|
|
fileList: [], |
|
|
|
// 现病史 |
|
|
|
medicalHistory: [ |
|
|
|
"高血压", |
|
|
|
"脑血管病", |
|
|
|
"恶性肿瘤", |
|
|
|
"冠心病", |
|
|
|
"精神疾病", |
|
|
|
"胃和十二指肠溃疡", |
|
|
|
"肥胖症", |
|
|
|
"骨质疏松症", |
|
|
|
"遗传性、先天性疾病", |
|
|
|
"糖尿病", |
|
|
|
"慢性肺系疾病", |
|
|
|
"高脂血症", |
|
|
|
"肝脏疾病(脂肪肝、乙型肝炎、肝硬化等)", |
|
|
|
"过敏性疾病", |
|
|
|
"关节炎", |
|
|
|
"痛风", |
|
|
|
"肾炎、肾病", |
|
|
|
"高脂血症", |
|
|
|
], |
|
|
|
idCardType: [ |
|
|
|
{ |
|
|
|
label: "身份证", |
|
|
|
value: 0, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "护照或外国人永居证", |
|
|
|
value: 1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "港澳居民来往内地通行", |
|
|
|
value: 2, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "台湾居民来往大陆通行证", |
|
|
|
value: 3, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "其他", |
|
|
|
value: 4, |
|
|
|
}, |
|
|
|
], |
|
|
|
idCardTypeValue: { |
|
|
|
0: "身份证", |
|
|
|
1: "护照或外国人永居证", |
|
|
|
2: "港澳居民来往内地通行", |
|
|
|
3: "台湾居民来往大陆通行证", |
|
|
|
4: "其他", |
|
|
|
}, |
|
|
|
loading: false, // 遮罩层 |
|
|
|
ids: [], // 选中数组 |
|
|
|
single: true, // 非单个禁用 |
|
|
|
multiple: true, // 非多个禁用 |
|
|
|
showSearch: true, // 显示搜索条件 |
|
|
|
total: 0, // 总条数 |
|
|
|
listDat: [{}], // 公告表格数据 |
|
|
|
title: "", // 弹出层标题 |
|
|
|
open: false, // 是否显示弹出层 |
|
|
|
importOpen: false, // 导入弹窗 |
|
|
|
listDat: [], // 公告表格数据 |
|
|
|
// 查询参数 |
|
|
|
queryParams: { |
|
|
|
pageNum: 1, |
|
|
@ -275,90 +227,36 @@ export default { |
|
|
|
sourceId: "", //来源 |
|
|
|
}, |
|
|
|
}, |
|
|
|
formDisabled: false, |
|
|
|
importform: {}, |
|
|
|
// 表单参数 |
|
|
|
form: {}, |
|
|
|
// 表单校验 |
|
|
|
rules: { |
|
|
|
name: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "患者姓名不能为空", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
gender: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "性别不能为空", |
|
|
|
trigger: "change", |
|
|
|
}, |
|
|
|
], |
|
|
|
birthDate: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "出生日期不能为空", |
|
|
|
trigger: "change", |
|
|
|
}, |
|
|
|
], |
|
|
|
phone: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "手机号码不能为空", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
{ |
|
|
|
pattern: /^1[3456789]\d{9}$/, |
|
|
|
message: "手机号码格式不正确", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
ethnicity: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "民族不能为空", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
idCardType: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "证件类型不能为空", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
idCard: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "证件号码不能为空", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
educationYears: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "受教育年限不能为空", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
currentIllnessHistory: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "现病史不能为空", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
let idCard = this.$route.query.idCard; |
|
|
|
this.queryParams.param.keywords = idCard || ""; |
|
|
|
this.getList(); // 列表 |
|
|
|
// this.getTenantsList(); // 组织列表 |
|
|
|
// this.getLastWeekDays(); // 获取上一周的开始结束时间 |
|
|
|
// this.getList(); // 列表 |
|
|
|
this.getTenantsList(); // 组织列表 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取上一周的开始结束时间 |
|
|
|
getLastWeekDays() { |
|
|
|
let obj = { |
|
|
|
startTime: "", |
|
|
|
endTime: "", |
|
|
|
}; |
|
|
|
obj.startTime = this.$moment( |
|
|
|
this.$moment() |
|
|
|
.week(this.$moment().week() - 1) |
|
|
|
.startOf("week") |
|
|
|
.add(1, "days") |
|
|
|
.valueOf() |
|
|
|
).format("YYYY-MM-DD"); |
|
|
|
obj.endTime = this.$moment( |
|
|
|
this.$moment() |
|
|
|
.week(this.$moment().week() - 1) |
|
|
|
.endOf("week") |
|
|
|
.add(1, "days") |
|
|
|
.valueOf() |
|
|
|
).format("YYYY-MM-DD"); |
|
|
|
this.queryTime = [obj.startTime, obj.endTime]; |
|
|
|
}, |
|
|
|
// 组织列表 |
|
|
|
getTenantsList() { |
|
|
|
tenantsList({ |
|
|
@ -368,66 +266,29 @@ export default { |
|
|
|
this.tenantsListData = res.data.list; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 上传成功回 - pdg |
|
|
|
handleUploadPdfAdd1(res) { |
|
|
|
if (res.code == 200) { |
|
|
|
this.importOpen = false; |
|
|
|
this.getList(); |
|
|
|
this.$modal.msgSuccess("导入成功"); |
|
|
|
} else { |
|
|
|
this.$message.error(res.msg || "导入失败"); |
|
|
|
this.fileList = []; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 上传前校检格式和大小 - 图片 |
|
|
|
handleBeforeUpload1(file) { |
|
|
|
const isLt2M = file.size / 1024 / 1024 < 100; |
|
|
|
// 校检文件大小 |
|
|
|
if (!isLt2M) { |
|
|
|
this.$message.error("上传文件大小不能超过 100MB!"); |
|
|
|
} |
|
|
|
return isLt2M; |
|
|
|
}, |
|
|
|
// 上传前校检格式和大小 - 文件 |
|
|
|
handleBeforePdfUpload1(file) { |
|
|
|
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1); |
|
|
|
const whiteList = ["xlsx", "xls"]; |
|
|
|
if (whiteList.indexOf(fileSuffix) === -1) { |
|
|
|
this.$message.error("上传文件只能是.xlsx, .xls"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 查询公告列表 */ |
|
|
|
getList() { |
|
|
|
this.loading = true; |
|
|
|
queryPatient(this.queryParams).then((res) => { |
|
|
|
// 判断时间数组是否有值 |
|
|
|
this.queryParams.param.startTime = ""; |
|
|
|
this.queryParams.param.endTime = ""; |
|
|
|
if (this.queryTime?.length) { |
|
|
|
this.queryParams.param.startTime = this.queryTime[0] + " " + "00:00:00"; |
|
|
|
this.queryParams.param.endTime = this.queryTime[1] + " " + "23:59:59"; |
|
|
|
} |
|
|
|
queryDetail(this.queryParams).then((res) => { |
|
|
|
this.listDat = res.data.list; |
|
|
|
this.listDat.forEach((item) => { |
|
|
|
if (item.recordList) { |
|
|
|
item.recordList.forEach((row) => { |
|
|
|
item[row.code] = row.answer; |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
this.total = res.data.total; |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 取消按钮 |
|
|
|
cancel() { |
|
|
|
this.open = false; |
|
|
|
this.reset(); |
|
|
|
}, |
|
|
|
// 表单重置 |
|
|
|
reset() { |
|
|
|
this.form = { |
|
|
|
name: "", // 姓名 |
|
|
|
gender: 0, // 性别 |
|
|
|
birthDate: "", // 出生日期 |
|
|
|
ethnicity: "", // 民族 |
|
|
|
educationYears: "", // 教育程度 |
|
|
|
phone: "", // 联系电话 |
|
|
|
idCardType: "", // 证件类型 |
|
|
|
idCard: "", // 证件号码 |
|
|
|
source: 1, |
|
|
|
currentIllnessHistory: [], // 现病史 |
|
|
|
currentIllnessHistoryQt: "", // 现病史 |
|
|
|
}; |
|
|
|
this.resetForm("form"); |
|
|
|
}, |
|
|
|
/** 搜索按钮操作 */ |
|
|
|
handleQuery() { |
|
|
|
this.queryParams.pageNum = 1; |
|
|
@ -451,101 +312,18 @@ export default { |
|
|
|
this.single = selection.length != 1; |
|
|
|
this.multiple = !selection.length; |
|
|
|
}, |
|
|
|
/** 新增按钮操作 */ |
|
|
|
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}`, |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 提交按钮 */ |
|
|
|
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(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
|
handleDelete(row) { |
|
|
|
const idList = row.id ? [row.id] : this.ids; |
|
|
|
this.$modal |
|
|
|
.confirm("是否确认删除当前选择的数据?") |
|
|
|
.then(function () { |
|
|
|
return patientDel({ |
|
|
|
idList: idList, |
|
|
|
}); |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.getList(); |
|
|
|
this.$modal.msgSuccess("删除成功"); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
/** 导出按钮操作 */ |
|
|
|
handleExport() { |
|
|
|
let data = JSON.parse(JSON.stringify(this.queryParams)); |
|
|
|
data.param.idList = this.ids; |
|
|
|
this.download1( |
|
|
|
"/patient/export", |
|
|
|
"/screening/exportRzScreen", |
|
|
|
{ |
|
|
|
...this.queryParams.params, |
|
|
|
...data, |
|
|
|
}, |
|
|
|
`患者档案.xlsx` |
|
|
|
`筛查列表.xlsx` |
|
|
|
); |
|
|
|
}, |
|
|
|
/** 下载按钮操作 */ |
|
|
|
handleDownload() { |
|
|
|
window.open( |
|
|
|
`${process.env.VUE_APP_API_QZURL}/acupuncture/profile/PatientTemplate.xlsx` |
|
|
|
); |
|
|
|
// this.download1( |
|
|
|
// "/patient/export", {}, |
|
|
|
// `患者档案导入模版.xlsx` |
|
|
|
// ); |
|
|
|
}, |
|
|
|
/** 导入按钮操作 */ |
|
|
|
handleImport() { |
|
|
|
this.fileList = []; |
|
|
|
this.importOpen = true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|