<template>
|
<div>
|
<el-form
|
:model="queryParams"
|
ref="tableList"
|
:inline="true"
|
label-width="76px"
|
style="margin-top: 10px"
|
>
|
<el-form-item label="姓名" prop="name">
|
<el-input
|
v-model="queryParams.name"
|
style="width: 116px"
|
placeholder="请输入姓名"
|
clearable
|
@keyup.enter.native="submitForm"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="体检号" prop="tjNumber">
|
<el-input
|
ref="inputName"
|
v-model="queryParams.tjNumber"
|
style="width: 240px"
|
placeholder="请输入体检号"
|
clearable
|
@blur="hb"
|
@keyup.enter.native="submitForm"
|
></el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button
|
size="mini"
|
type="primary"
|
@click="submitForm"
|
style="margin-right: 15px"
|
>搜索</el-button
|
>
|
<el-button size="mini" @click="resetQuery">重置</el-button>
|
</el-form-item>
|
</el-form>
|
<div style="display: flex">
|
<el-radio-group
|
v-model="tjStatus"
|
@input="radioChange"
|
style="margin-left: 30px"
|
>
|
<el-radio-button label="0">未检</el-radio-button>
|
<el-radio-button label="1">已检</el-radio-button>
|
</el-radio-group>
|
</div>
|
|
<template>
|
<el-table
|
:data="tableList"
|
v-loading="loading"
|
ref="table"
|
height="536px"
|
style="margin: 20px; width: 98%"
|
border
|
:cell-class-name="myclass"
|
>
|
<!-- <template slot="empty">数据正在加载中</template> -->
|
<el-table-column
|
label="体检号"
|
align="center"
|
prop="tjNumber"
|
width="160px"
|
/>
|
<el-table-column
|
label="姓名"
|
align="center"
|
prop="cusName"
|
width="90px"
|
/>
|
<el-table-column label="性别" align="center" prop="cusSex" width="60px">
|
<template slot-scope="scope">
|
<span v-if="scope.row.cusSex == '0'">男</span>
|
<span v-if="scope.row.cusSex == '1'">女</span>
|
<span v-if="scope.row.cusSex == '2'">未知</span>
|
<span v-if="scope.row.cusSex == '9'">未说明性别</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="出生日期"
|
align="center"
|
prop="cusBrithday"
|
width="100px"
|
/>
|
<el-table-column
|
label="电话"
|
align="center"
|
prop="cusPhone"
|
width="100px"
|
/>
|
<el-table-column
|
label="体检类型"
|
align="center"
|
prop="tjType"
|
width="80px"
|
/>
|
<el-table-column
|
label="登记时间"
|
align="center"
|
prop="tjTime"
|
width="160px"
|
>
|
</el-table-column>
|
<el-table-column
|
label="体检时间"
|
align="center"
|
prop="tjTime"
|
width="100px"
|
>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.tjTime, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="未检项"
|
prop="notCheckeds"
|
:show-overflow-tooltip="true"
|
/>
|
<el-table-column label="操作" align="center" width="130px">
|
<template slot-scope="scope">
|
<el-button
|
type="primary"
|
icon="el-icon-first-aid-kit"
|
size="mini"
|
@click="Changeapplyfor(scope.row)"
|
title="会诊申请"
|
v-if="tjStatus == '1'"
|
></el-button>
|
<el-button
|
type="primary"
|
icon="el-icon-share"
|
size="mini"
|
@click="handleClick(scope.row)"
|
title="详情"
|
></el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<div class="pag">
|
<div class="pag1">
|
<pagination
|
v-show="total > 0"
|
:total="total"
|
:page.sync="queryParams.page"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
</div>
|
</div>
|
</template>
|
|
<!-- 点击右边弹出层 -->
|
<el-drawer
|
:visible.sync="drawer"
|
:with-header="false"
|
size="70%"
|
:before-close="handleClose"
|
>
|
<el-card class="box-card" style="margin: 15px 15px" v-for="(item, index) in illnes"
|
:key="index">
|
<div slot="header" class="clearfix">
|
<span>{{item.title}}</span>
|
</div>
|
<el-card
|
class="box-card"
|
style="margin: 15px 15px"
|
v-for="(item1, index) in item.illness"
|
:key="index"
|
>
|
<div style="padding: 10px 0">{{ item1.title }}</div>
|
<el-checkbox-group
|
v-model="checkedCities"
|
@change="handleCheckedCitiesChange"
|
>
|
<el-checkbox
|
v-for="city in item1.cities"
|
:label="city"
|
:key="city"
|
>{{ city }}</el-checkbox
|
>
|
</el-checkbox-group>
|
</el-card>
|
</el-card>
|
</el-drawer>
|
</div>
|
</template>
|
|
|
<script>
|
import { getInfo } from "@/api/login";
|
import { getProList } from "@/api/doctor/check";
|
import { listHzlog } from "@/api/hosp/hzlog";
|
import { listUser } from "@/api/system/user";
|
import { getChildList } from "@/api/system/dept";
|
export default {
|
dicts: ["sys_user_sex", "sys_yes_no", "tj_result_type", "lj_positive"],
|
name: "check",
|
data() {
|
return {
|
// 遮罩层
|
loading: false,
|
open: false,
|
title: "",
|
hzlogList: [],
|
id: [],
|
// 总条数
|
total: 0,
|
// 绑定单选按钮
|
tjStatus: "0",
|
// 抽屉打开方式
|
drawer: false,
|
tableList: [],
|
deptList: [],
|
tableAll: {},
|
row: {},
|
info: {},
|
allList: [],
|
autorule: [],
|
vals: {},
|
illnes: [
|
{
|
title: "公卫体检",
|
illness: [
|
{
|
title: "症状",
|
cities: [
|
"头疼",
|
"头晕",
|
"便秘",
|
"耳鸣",
|
"心悸",
|
"胸闷",
|
"呼吸困难",
|
"关节肿痛",
|
"听不清或无法听清",
|
"慢性咳嗽",
|
],
|
},
|
{
|
title: "疾病史",
|
cities: [
|
"高血压",
|
"糖尿病",
|
"脑出血",
|
"白内障",
|
"恶心肿瘤",
|
"慢性支气管炎",
|
"老年性骨关节病",
|
"心肌梗死",
|
"心绞痛",
|
"慢性阻塞性肺气肿",
|
],
|
},
|
{
|
title: "生活方式",
|
cities: [
|
"头疼",
|
"头晕",
|
"便秘",
|
"耳鸣",
|
"心悸",
|
"胸闷",
|
"呼吸困难",
|
"关节肿痛",
|
"听不清或无法听清",
|
"慢性咳嗽",
|
],
|
},
|
],
|
},
|
{
|
title:"体格检查"
|
},
|
{
|
title:"辅助检查"
|
},
|
{
|
title:"健康指导"
|
},
|
],
|
|
checkedCities: ["头疼", "头晕"],
|
form: {
|
createTime: new Date(),
|
},
|
// 医生
|
doctorName: "",
|
// 父项
|
proName: "",
|
// 父项Id
|
proId: "",
|
company: "",
|
tjStandardGtValue: "",
|
// 用户表格数据
|
userList: null,
|
// 父项目列表
|
Parent: [],
|
hzReplyLogsList: [],
|
hasdeptList: [],
|
radio: "",
|
nums: "",
|
proParentList: [],
|
tjNumber: "",
|
// 全部小结
|
DeptadviceAll: [],
|
project: {},
|
// 小结
|
summaryList: [],
|
summaryAll: [],
|
tjOrderDetailList: [],
|
tjOrderDetail: [],
|
deptId: "",
|
userId: "",
|
nickName: "",
|
doctorNames: "",
|
date: new Date(new Date().getTime() + 8 * 3600 * 1000)
|
.toJSON()
|
.substr(0, 19)
|
.replace("T", " "),
|
// 查询参数
|
queryParams: {
|
page: 1,
|
pageSize: 10,
|
tjNumber: "",
|
type: "",
|
name: null,
|
},
|
queryParam: {
|
page: 1,
|
pageSize: 1000,
|
},
|
rules: {
|
hzType: [
|
{ required: true, message: "会诊科室为必填项", trigger: "change" },
|
],
|
},
|
};
|
},
|
|
created() {
|
this.getList();
|
this.getListUser();
|
},
|
|
mounted() {
|
let _this = this;
|
this.timer = setInterval(() => {
|
_this.date = new Date(new Date().getTime() + 8 * 3600 * 1000)
|
.toJSON()
|
.substr(0, 19)
|
.replace("T", " ");
|
}, 1000);
|
|
this.$nextTick(() => {
|
this.$refs.inputName.focus();
|
});
|
},
|
beforeDestroy() {
|
if (this.timer) {
|
clearInterval(this.timer);
|
}
|
},
|
|
methods: {
|
/** 查询用户列表 */
|
getListUser() {
|
listUser().then((response) => {
|
this.userList = response.rows;
|
this.userList.forEach((element) => {
|
const userName = this.$store.state.user.name;
|
if (userName == element.userName) {
|
this.doctorName = element.nickName;
|
}
|
});
|
});
|
getInfo().then((response) => {
|
this.info = response.user;
|
this.deptId = response.user.deptId;
|
this.userId = response.user.userId;
|
this.nickName = response.user.nickName;
|
});
|
},
|
|
// 搜索
|
submitForm() {
|
this.queryParams.page = 1;
|
this.loading = true;
|
this.queryParams.type = this.tjStatus;
|
getProList(this.queryParams).then((response) => {
|
if (response.code == 200) {
|
this.loading = false;
|
if (response.data) {
|
if (response.data.date) {
|
this.tableList = response.data.date;
|
this.queryParams.tjNumber = "";
|
} else {
|
this.tableList = response.data.customers;
|
this.queryParams.tjNumber = "";
|
}
|
this.total = response.data.total;
|
} else {
|
this.tableList = [];
|
}
|
}
|
});
|
},
|
|
handleClose() {
|
this.$tab.refreshPage();
|
},
|
|
myclass(row, column, rowIndex, columnIndex) {
|
if (row.row.isPositive == 1) {
|
return "setclass";
|
}
|
},
|
|
getList() {
|
this.loading = true;
|
this.queryParams.type = this.tjStatus;
|
getProList(this.queryParams).then((response) => {
|
if (response.code == 200) {
|
this.loading = false;
|
if (response.data) {
|
if (response.data.date) {
|
this.tableList = response.data.date;
|
} else {
|
this.tableList = response.data.customers;
|
}
|
this.total = response.data.total;
|
} else {
|
this.tableList = [];
|
}
|
}
|
});
|
},
|
|
// 单选按钮
|
radioChange(val) {
|
this.queryParams.type = val;
|
this.loading = true;
|
getProList(this.queryParams).then((response) => {
|
if (response.code == 200) {
|
this.loading = false;
|
if (response.data) {
|
this.tableList = response.data.date;
|
this.total = response.data.total;
|
} else {
|
this.tableList = [];
|
}
|
}
|
});
|
},
|
hb() {
|
if (this.queryParams.tjNumber != "") {
|
this.submitForm();
|
}
|
},
|
|
// 重置
|
resetQuery() {
|
this.resetForm("tableList");
|
this.submitForm();
|
this.$nextTick(() => {
|
this.$refs.inputName.focus();
|
});
|
},
|
|
Changeapplyfor(row) {
|
this.open = true;
|
this.form = row;
|
this.form.hzDoctorId = this.info.userId;
|
getChildList().then((res) => {
|
this.deptList = res.data;
|
});
|
this.Hzlog(this.form.tjNumber);
|
},
|
|
Hzlog(val) {
|
let data = {
|
tjNumber: val,
|
};
|
listHzlog(data).then((response) => {
|
this.hzlogList = response.rows;
|
this.hzlogList.forEach((item) => {
|
item.hzDeptName = "";
|
if (item.hzType == "0") {
|
item.hzDeptName = "全院会诊";
|
} else {
|
item.hzDeptIdList.forEach((item1) => {
|
this.deptList.forEach((item2) => {
|
if (item1 == item2.deptId) {
|
item.hzDeptName += item2.deptName + ",";
|
}
|
});
|
});
|
}
|
});
|
});
|
},
|
|
// 点击详情
|
handleClick(row) {
|
this.drawer = true;
|
},
|
handleCheckedCitiesChange() {
|
},
|
},
|
};
|
</script>
|
<style>
|
.el-table .cell {
|
-webkit-box-sizing: border-box;
|
box-sizing: border-box;
|
text-overflow: ellipsis;
|
white-space: normal;
|
word-break: break-all;
|
line-height: 23px;
|
padding-left: 10px;
|
padding-right: 10px;
|
}
|
|
.setclass {
|
background-color: #f86b35;
|
color: black;
|
}
|
|
.blue-button {
|
width: 10px;
|
background-color: #e2e3e4;
|
}
|
|
.el-button--medium {
|
padding: 4px 14px;
|
font-size: 14px;
|
}
|
|
.dialog-footers {
|
margin-top: 10px;
|
margin-left: calc(100% - 10%);
|
}
|
|
.main {
|
height: 700px;
|
overflow: hidden;
|
}
|
|
.pag {
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
}
|
|
.pag1 {
|
width: 30%;
|
}
|
|
.el-message {
|
top: 40px !important;
|
border: 1px solid #c1c1c1;
|
background-color: #c1c1c1;
|
}
|
|
.el-message * {
|
color: var(--white) !important;
|
}
|
</style>
|