Browse Source

添加筛查菜单

newMaster
liuzhipeng 4 months ago
parent
commit
e856997c84
  1. 2
      acupuncture-前台/.env.development
  2. 2
      acupuncture-前台/.env.production
  3. BIN
      acupuncture-前台/src/assets/images/screen.png
  4. 7
      acupuncture-前台/src/layout/components/Sidebar/SidebarItem.vue
  5. 2
      acupuncture-前台/src/permission.js
  6. 25
      acupuncture-前台/src/router/index.js
  7. 568
      acupuncture-前台/src/views/screening/h5.vue
  8. 790
      acupuncture-前台/src/views/screening/qrCode.vue

2
acupuncture-前台/.env.development

@ -9,7 +9,7 @@ VUE_APP_BASE_API = '/dev-api'
VUE_APP_IMG_URL = 'https://test.tall.wiki/acupuncture'
VUE_APP_API_QZURL = 'https://test.tall.wiki/'
# 筛查访问地址
VUE_APP_SCREEN_URL = 'https://test.tall.wiki/acupunctureClient/screening/index'
VUE_APP_SCREEN_URL = 'https://test.tall.wiki/acupunctureClient/screening/h5/'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 访问路径

2
acupuncture-前台/.env.production

@ -7,6 +7,6 @@ NODE_ENV = 'production'
VUE_APP_BASE_API = 'https://test.tall.wiki/acupuncture'
VUE_APP_API_QZURL = 'https://test.tall.wiki/'
# 筛查访问地址
VUE_APP_SCREEN_URL = 'https://test.tall.wiki/acupunctureClient/screening/index'
VUE_APP_SCREEN_URL = 'https://test.tall.wiki/acupunctureClient/screening/h5/'
# 访问路径
VUE_APP_PUBLIC_PATH = '/acupunctureClient/'

BIN
acupuncture-前台/src/assets/images/screen.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

7
acupuncture-前台/src/layout/components/Sidebar/SidebarItem.vue

@ -96,6 +96,7 @@ export default {
患者档案: require("@/assets/images/dangan_n@1x.png"),
诊疗档案: require("@/assets/images/zhenliao_n@1x.png"),
随访档案: require("@/assets/images/suifang_n@1x.png"),
社区筛查: require("@/assets/images/screen.png"),
我的: require("@/assets/images/me_n@1x.png"),
},
itmeIcon1: {
@ -103,6 +104,7 @@ export default {
患者档案: require("@/assets/images/dangan_s@1x.png"),
诊疗档案: require("@/assets/images/zhenliao_s@1x.png"),
随访档案: require("@/assets/images/suifang_s@1x.png"),
社区筛查: require("@/assets/images/screen.png"),
我的: require("@/assets/images/me_s@1x.png"),
},
};
@ -151,6 +153,11 @@ export default {
};
</script>
<style scoped>
.div-img img,
.div-img-gl img {
max-width: 44px;
}
.div-img-gl {
display: none;
}

2
acupuncture-前台/src/permission.js

@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register','/screening/index']
const whiteList = ['/login', '/register','/screening/h5']
const isWhiteList = (path) => {
return whiteList.some(pattern => isPathMatch(pattern, path))

25
acupuncture-前台/src/router/index.js

@ -133,6 +133,26 @@ export const constantRoutes = [
},
],
},
{
path: "/screening",
meta: { title: "社区筛查", icon: "dashboard" },
component: Layout,
redirect: "screening",
children: [
{
path: "/screeningQR",
component: () => import("@/views/screening/qrCode"),
name: "screeningQR",
meta: { title: "二维码", icon: "dashboard" },
},
{
path: "/screeningIndex",
component: () => import("@/views/screening/index"),
name: "screeningIndex",
meta: { title: "筛查列表", icon: "dashboard" },
},
],
},
{
path: "/user",
component: Layout,
@ -148,10 +168,11 @@ export const constantRoutes = [
},
// 筛查基本信息
{
path: "/screening/index",
component: () => import("@/views/screening/index.vue"),
path: "/screening/h5",
component: () => import("@/views/screening/h5.vue"),
hidden: true,
},
];
// 动态路由,基于用户权限动态去加载

568
acupuncture-前台/src/views/screening/h5.vue

@ -0,0 +1,568 @@
<template>
<div class="app-container">
<div class="hospital">山西因孚社区</div>
<el-form
v-if="stepNum == 1"
:rules="rules"
ref="form"
:model="form"
label-width="110px"
>
<!-- 姓名性别单选出生日期年龄联系方式 -->
<div class="card">
<div class="card-title">基本信息</div>
<div>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-radio v-model="form.sex" label="0"></el-radio>
<el-radio v-model="form.sex" label="1"></el-radio>
</el-form-item>
<el-form-item label="出生日期" prop="dateOfBirth">
<el-date-picker
v-model="form.dateOfBirth"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="年龄" prop="age">
<el-input
v-model="form.age"
type="number"
placeholder="请输入姓名"
></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="phone">
<el-input
v-model="form.phone"
type="number"
placeholder="请输入联系方式"
></el-input>
</el-form-item>
</div>
</div>
<!-- 身高体重BMI -->
<div class="card">
<div class="card-title">体重自评</div>
<el-form-item label="身高cm" prop="height">
<el-input
@blur="calculateBMI"
v-model="form.height"
type="number"
placeholder="请输入身高"
></el-input>
</el-form-item>
<el-form-item label="体重kg" prop="weight">
<el-input
@blur="calculateBMI"
v-model="form.weight"
type="number"
placeholder="请输入体重"
></el-input>
</el-form-item>
<el-form-item label="BMI" prop="BMI">
<el-input
:disabled="true"
v-model="form.BMI"
type="number"
placeholder="BMI"
></el-input>
</el-form-item>
<el-form-item label="结论" prop="verdict">
<span :class="`BIMTips${BMIVerdict[form.verdict]}`">
{{ form.verdict || "- - -" }}</span
>
</el-form-item>
</div>
</el-form>
<div class="card" v-if="stepNum == 2">
<div class="card-title">失眠自评SRSS</div>
<div
class="item-container"
v-for="(item, index) in scaleList"
:key="index"
>
<div class="item-title">{{ index + 1 }}. {{ item.question }}</div>
<div class="item-radio-box">
<el-radio-group v-model="form[`topic${index + 1}`]">
<el-radio
class="item-radio"
v-for="(criteria, index) in item.options"
:key="index"
:label="criteria.score"
>{{ criteria.label }}
</el-radio>
</el-radio-group>
</div>
</div>
</div>
<div class="submit-box" v-if="stepNum == 1">
<el-button type="primary" class="submit-box-but" @click="submitForm">
下一步
</el-button>
</div>
<div class="submit-box" v-if="stepNum == 2">
<el-button type="primary" class="submit-box-but" @click="scaleSubmitForm">
提交
</el-button>
</div>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
import {
queryPatient,
patientAdd,
patientUpd,
patientDel,
} from "@/api/patientFile";
export default {
name: "Notice",
dicts: ["sys_notice_status", "sys_notice_type"],
data() {
return {
stepNum: 2,
headers: {
Authorization: "Bearer " + getToken(),
deptId: localStorage.getItem("hospitalId"),
},
uploadFileUrl1:
process.env.VUE_APP_API_QZURL + "/acupuncture/patient/import", //
fileList: [],
//
form: {
name: "",
sex: "0",
dateOfBirth: "",
age: "",
phone: "",
height: "",
weight: "",
BMI: "",
verdict: "",
},
BMITips: [
{
label: "偏瘦",
score: 18.5,
},
{
label: "正常",
score: 23.9,
},
{
label: "偏胖",
score: 27.9,
},
{
label: "肥胖",
score: 28,
},
],
//
rules: {
name: [
{
required: true,
message: "姓名不能为空",
trigger: "blur",
},
],
sex: [
{
required: true,
message: "性别不能为空",
trigger: "blur",
},
],
dateOfBirth: [
{
required: true,
message: "出生日期不能为空",
trigger: "change",
},
],
age: [
{
required: true,
message: "年龄不能为空",
trigger: "blur",
},
],
phone: [
{
required: true,
message: "联系方式不能为空",
trigger: "blur",
},
{
pattern: /^1[3456789]\d{9}$/,
message: "格式不正确",
trigger: "change",
},
],
age: [
{
required: true,
message: "年龄不能为空",
trigger: "blur",
},
],
height: [
{
required: true,
message: "身高不能为空",
trigger: "blur",
},
],
weight: [
{
required: true,
message: "体重不能为空",
trigger: "blur",
},
],
BMI: [
{
required: true,
message: "BMI不能为空",
trigger: "blur",
},
],
},
BMIVerdict: {
偏瘦: "1",
正常: "2",
偏胖: "3",
肥胖: "4",
},
// 1. ?
//
// 2. ?
//
// 3., ?
// 0~5 6~12 13~18 ) 19~24 25~31
// 4. ?
// 9 7~8 5~6 3~4 1~2
// 5. ?
// 0~5 6~12 13~18 19~24 25~31
// 6. ?
// 0~5 6~12 13~18 19~24 25~31
// 7. ?
// 0~5 61~2 13~18 19~24 25~31
// 8. ?
// 0~5 61~2 13~18 19~24 25~31
// 9. , ?
// 0~5 61~2 13~18 19~24 25~31
// 10. ?
//
scaleList: [
{
question: "您觉得平时睡眠足够吗 ?",
options: [
{ label: "睡眠过多了", score: 1 },
{ label: "睡眠正好", score: 2 },
{ label: "睡眠欠一些", score: 3 },
{ label: "睡眠不够", score: 4 },
{ label: "睡眠时间远远不够", score: 5 },
],
},
{
question: "您在睡眠后是否已觉得充分休息过了 ?",
options: [
{ label: "觉得充分休息过了", score: 1 },
{ label: "觉得休息过了", score: 2 },
{ label: "觉得休息了一点", score: 3 },
{ label: "不觉得休息过了", score: 4 },
{ label: "觉得一点儿也没休息", score: 5 },
],
},
{
question: "您晚上已睡过觉,白天是否打瞌睡 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少 (6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常(19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您平均每个晚上大约能睡几小时 ?",
options: [
{ label: "≥9小时", score: 1 },
{ label: "7~8 小时", score: 2 },
{ label: "5~6 小时", score: 3 },
{ label: "3~4 小时", score: 4 },
{ label: "1~2 小时", score: 5 },
],
},
{
question: "您是否有入睡困难 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少 (6~12 天)", score: 2 },
{ label: "有时(13~18 天 )", score: 3 },
{ label: "经常(19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您入睡后中间是否易醒 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时(13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您在醒后是否难于再入睡 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "您是否多梦或常被恶梦惊醒 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "为了睡眠 , 您是否吃安眠药 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "您失眠后心情(心境)如何 ?",
options: [
{ label: "无不适", score: 1 },
{ label: "无所谓", score: 2 },
{ label: "有时心烦、急躁", score: 3 },
{ label: "心慌、气短", score: 4 },
{ label: "乏力、没精神、做事效率低", score: 5 },
],
},
],
};
},
created() {},
methods: {
// BIM
calculateBMI() {
if (this.form.weight && this.form.height) {
const weight = parseFloat(this.form.weight);
const height = parseFloat(this.form.height);
const bmi = weight / (height / 100) ** 2;
this.form.BMI = bmi.toFixed(2);
this.getBMITips(bmi);
}
},
// BIM
// <18.5
// 18.5~23.9
// 24~27.9
// 28
getBMITips(bmi) {
let tips = "";
if (bmi < 18.5) {
tips = "偏瘦";
}
if (bmi >= 18.5 && bmi < 23.9) {
tips = "正常";
}
if (bmi >= 24 && bmi < 27.9) {
tips = "偏胖";
}
if (bmi >= 28) {
tips = "肥胖";
}
this.form.verdict = tips;
},
// - 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.listDat = res.data.list;
this.total = res.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {};
this.resetForm("form");
},
/** 基本信息 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
// patientAdd(this.form).then((response) => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
this.stepNum++;
}
});
},
//
scaleSubmitForm() {
let score = 0;
// , topic${i}
for (let i = 1; i <= 24; i++) {
if (this.form[`topic${i}`] !== undefined) {
score += this.form[`topic${i}`];
}
}
console.log("score", score);
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.hospital {
background: #fff;
font-size: 20px;
color: #70483e;
line-height: 50px;
font-weight: 600;
margin-bottom: 10px;
border-radius: 6px;
text-align: center;
}
.BIMTips1 {
color: #cccccc;
}
.BIMTips2 {
color: #66cc00;
}
.BIMTips3 {
color: #ffff00;
}
.BIMTips4 {
color: #ff9900;
}
.item-radio {
display: block;
margin-bottom: 10px;
}
.item-title {
font-size: 18px;
font-weight: bold;
color: #3d3d3d;
line-height: 26px;
}
.item-radio-box {
margin: 16px 0px;
}
>>> .el-radio__label {
font-size: 16px;
color: #555555;
line-height: 20px;
}
.submit-box {
display: flex;
justify-content: center;
align-items: center;
.submit-box-but {
background: #c6a268;
width: 100%;
font-size: 16px;
}
}
.card {
padding: 16px;
background: #fff;
border-radius: 6px;
margin-bottom: 14px;
}
.card-title {
font-weight: 600;
font-size: 20px;
margin-bottom: 16px;
}
/* */
.app-container {
/* background: linear-gradient(to bottom, #70483e, #f7f8fa); */
background: #70483e;
min-height: 100vh;
}
>>> .el-input__inner {
border: none;
border-bottom: 1px solid #dcdfe6;
border-radius: 0;
}
>>> .el-date-editor.el-input {
width: 100% !important;
}
>>> .el-form-item--medium .el-form-item__label {
padding-right: 30px;
}
>>> .el-radio input[aria-hidden="true"] {
display: none !important;
}
>>> .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled)
.el-radio__inner {
box-shadow: none !important;
}
</style>
<!-- >>> .el-input__inner {
padding: 0 15px !important;
} -->

790
acupuncture-前台/src/views/screening/qrCode.vue

@ -0,0 +1,790 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="" prop="noticeTitle">
<el-input
style="width: 300px"
v-model="queryParams.param.keywords"
placeholder="支持姓名、全拼、简拼、手机号码、证件号码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="年龄范围" prop="createBy">
<div class="form-item-age">
<el-input
v-model="queryParams.param.startAge"
placeholder="最小年龄"
clearable
@keyup.enter.native="handleQuery"
/>
<span></span>
<el-input
v-model="queryParams.param.endAge"
placeholder="最大年龄"
clearable
@keyup.enter.native="handleQuery"
/>
</div>
</el-form-item>
<!-- <el-form-item label="建档组织" prop="tenantId">
<el-select
v-model="queryParams.param.tenantId"
placeholder="请选择"
clearable
>
<el-option label="dict.label" value="dict.value" />
</el-select>
</el-form-item> -->
<el-form-item label="数据来源" prop="sourceId">
<el-select
v-model="queryParams.param.sourceId"
placeholder="请选择"
clearable
>
<el-option label="筛查" :value="0" />
<el-option label="录入" :value="1" />
<el-option label="HIS" :value="2" />
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
重置
</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-bottom"
size="mini"
@click="handleDownload"
>下载模版</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
>导入</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="listDat"
@selection-change="handleSelectionChange"
max-height="600"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="姓名"
align="center"
prop="name"
min-width="100"
fixed
/>
<el-table-column
label="性别"
align="center"
prop="gender"
show-overflow-tooltip
min-width="100"
fixed
>
<template slot-scope="scope">
<span v-if="scope.row.gender == 0"></span>
<span v-if="scope.row.gender == 1"></span>
</template>
</el-table-column>
<el-table-column
label="出生日期"
align="center"
prop="birthDate"
show-overflow-tooltip
min-width="150"
fixed
/>
<el-table-column
label="民族"
align="center"
prop="ethnicity"
show-overflow-tooltip
min-width="100"
/>
<el-table-column
label="受教育年限"
align="center"
prop="educationYears"
show-overflow-tooltip
min-width="100"
/>
<el-table-column
label="手机号码"
align="center"
prop="phone"
show-overflow-tooltip
min-width="150"
/>
<el-table-column
label="证件类型"
align="center"
prop="idCardType"
show-overflow-tooltip
min-width="200"
>
<template slot-scope="scope">
{{ idCardTypeValue[scope.row.idCardType] }}
</template>
</el-table-column>
<el-table-column
label="证件号码"
align="center"
prop="idCard"
show-overflow-tooltip
min-width="180"
/>
<el-table-column
label="建档人"
align="center"
prop="createBy"
show-overflow-tooltip
min-width="100"
/>
<el-table-column
label="建档组织(医院名称)"
align="center"
prop="tenantName"
show-overflow-tooltip
min-width="150"
/>
<el-table-column label="建档日期" align="center" min-width="140">
<template slot-scope="scope">
<span>{{
parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}")
}}</span>
</template>
</el-table-column>
<el-table-column
fixed="right"
label="来源"
align="center"
prop="source"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope">
<span v-if="scope.row.source == 0">筛查</span>
<span v-if="scope.row.source == 1">录入</span>
<span v-if="scope.row.source == 2">HIS</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-tickets"
@click="handleDetails(scope.row)"
>详情</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-notebook-1"
@click="handleArchives(scope.row)"
>诊疗档案</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改公告对话框 -->
<el-dialog
class="popup"
:title="title"
:visible.sync="open"
width="780px"
append-to-body
>
<el-form
class="formStep"
ref="form"
:model="form"
: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-select
v-model="form.idCardType"
placeholder="请选择"
:disabled="formDisabled"
>
<el-option
v-for="item in idCardType"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</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>
<script>
import { getToken } from "@/utils/auth";
import {
queryPatient,
patientAdd,
patientUpd,
patientDel,
} from "@/api/patientFile";
export default {
name: "Notice",
dicts: ["sys_notice_status", "sys_notice_type"],
data() {
return {
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, //
//
queryParams: {
pageNum: 1,
pageSize: 10,
param: {
keywords: "", //
startAge: "", //
endAge: "", //
tenantId: "", //
createBy: "", //
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();
},
methods: {
// - 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.listDat = res.data.list;
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;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.param = {
keywords: "", //
startAge: "", //
endAge: "", //
tenantId: "", //
createBy: "", //
sourceId: "", //
};
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
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: `/medicalIndex?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() {
this.download1(
"/patient/export",
{
...this.queryParams.params,
},
`患者档案.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>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.form-item-age {
display: flex;
align-items: center;
}
.form-item-age span {
margin: 0 10px;
}
.form-item-age >>> .el-input {
width: 100px;
}
</style>
<!-- >>> .el-input__inner {
padding: 0 15px !important;
} -->
Loading…
Cancel
Save