<template>
|
<div class="app-container">
|
<div class="hist1">
|
<div class="hist2">
|
<el-form
|
:model="queryParams"
|
ref="queryForm"
|
size="small"
|
:inline="true"
|
v-show="showSearch"
|
label-width="68px"
|
>
|
<el-form-item label="姓名" prop="name">
|
<el-input
|
v-model="queryParams.name"
|
placeholder="请输入客户名"
|
clearable
|
@keyup.enter.native="handleQuery"
|
style="width: 130px"
|
/>
|
</el-form-item>
|
<el-form-item label="体检号" prop="tjNum">
|
<el-input
|
ref="inputName"
|
v-model="queryParams.tjNum"
|
placeholder="请输入体检号"
|
style="width: 170px"
|
clearable
|
@keyup.enter.native="handleQuery"
|
/>
|
</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-table
|
:row-class-name="tableRowClassName"
|
height="650px"
|
v-loading="loading"
|
:data="orderList"
|
ref="multipleTable"
|
@selection-change="handleSelectionChange"
|
border
|
style="width: 95%"
|
>
|
<el-table-column type="selection" width="40px" align="center" />
|
<el-table-column
|
label="序号"
|
align="center"
|
prop="newID"
|
width="50px"
|
:show-overflow-tooltip="true"
|
fixed="left"
|
/>
|
<el-table-column
|
label="姓名"
|
align="center"
|
prop="tjCustomerName"
|
width="110px"
|
:show-overflow-tooltip="true"
|
/>
|
<el-table-column
|
label="性别"
|
align="center"
|
prop="tjCustomerSex"
|
width="55px"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<span v-if="scope.row.tjCustomerSex == '0'">男</span>
|
<span v-if="scope.row.tjCustomerSex == '1'">女</span>
|
<span v-if="scope.row.tjCustomerSex == '2'">未知</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="电话"
|
align="center"
|
prop="tjCustomerPhone"
|
width="120px"
|
:show-overflow-tooltip="true"
|
/>
|
<el-table-column
|
label="年龄"
|
align="center"
|
prop="tjCustomerAge"
|
width="70"
|
:show-overflow-tooltip="true"
|
/>
|
<el-table-column
|
label="年龄单位"
|
align="center"
|
prop="ageUnit"
|
width="80"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<dict-tag
|
:options="dict.type.dict_ageunit"
|
:value="scope.row.ageUnit"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="职业"
|
align="center"
|
prop="career"
|
width="120"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<dict-tag
|
:options="dict.type.dict_job"
|
:value="scope.row.career"
|
/>
|
</template>
|
</el-table-column>
|
</el-table>
|
<div class="pagi">
|
<div class="pagi1">
|
<pagination
|
v-show="total > 0"
|
:total="total"
|
:page.sync="queryParams.pageNum"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
</div>
|
</div>
|
</div>
|
<div class="hist3">
|
<jianqianwenzhen
|
:jianqianwenzhendata="jianqianwenzhendata"
|
></jianqianwenzhen>
|
</div>
|
</div>
|
|
<!-- 添加或修改问诊对话框 -->
|
<el-dialog
|
:title="title"
|
:visible.sync="open"
|
width="1000px"
|
append-to-body
|
>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import jianqianwenzhen from "@/components/jianqianwenzhen";
|
import { Message } from "element-ui";
|
import { getOrderList } from "@/api/hosp/order";
|
import { listHarmType } from "@/api/hosp/harmType";
|
export default {
|
name: "History",
|
components: { jianqianwenzhen },
|
dicts: [
|
"tj_smoking_pinlv",
|
"sys_yes_no",
|
"tj_work_status",
|
"tj_work",
|
"dict_ageunit",
|
"dict_job",
|
],
|
data() {
|
let checkPhoneNum = (rule, value, callback) => {
|
console.log(value);
|
let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
|
if (value == "" && value == undefined && !value) {
|
return callback("");
|
} else if (value != undefined && value != "") {
|
return callback();
|
} else if (!patter.test(value)) {
|
return callback("");
|
}
|
};
|
return {
|
jianqianwenzhendata: [],
|
selectList: [],
|
dataList: [],
|
pickerOptions: {
|
disabledDate(time) {
|
return time.getTime() > Date.now();
|
},
|
shortcuts: [
|
{
|
text: "今天",
|
onClick(picker) {
|
picker.$emit("pick", new Date());
|
},
|
},
|
{
|
text: "昨天",
|
onClick(picker) {
|
const date = new Date();
|
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
picker.$emit("pick", date);
|
},
|
},
|
{
|
text: "一周前",
|
onClick(picker) {
|
const date = new Date();
|
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
picker.$emit("pick", date);
|
},
|
},
|
],
|
},
|
sex: true,
|
activeName: "1",
|
// 遮罩层
|
loading: true,
|
isdisabled: false,
|
// 选中数组
|
ids: [],
|
// 子表选中数据
|
checkedTjAskHistorys: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 问诊表格数据
|
historyList: [],
|
// 体检记录表格数据
|
orderList: [],
|
// ${subTable.functionName}表格数据
|
tjAskHistorysList: [],
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 20,
|
cusName: null,
|
},
|
harmTypeList: [],
|
// 表单参数
|
form: {},
|
chageall: [],
|
bingshiall: [],
|
rew: [],
|
// 表单校验
|
rules: {
|
deleted: [
|
{
|
required: true,
|
validator: checkPhoneNum,
|
trigger: "blur",
|
},
|
],
|
},
|
};
|
},
|
created() {
|
this.getList();
|
},
|
mounted() {
|
this.$nextTick(() => {
|
this.$refs.inputName.focus();
|
});
|
},
|
methods: {
|
/** 查询问诊列表 */
|
// getList() {
|
// this.loading = true;
|
// listHistory(this.queryParams).then((response) => {
|
// this.historyList = response.rows;
|
// response.rows.forEach((item, index) => {
|
// item.newID =
|
// (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
|
// index +
|
// 1;
|
// });
|
// this.total = response.total;
|
// this.loading = false;
|
// });
|
// },
|
/** 查询体检记录列表 */
|
getList() {
|
this.loading = true;
|
listHarmType().then((response) => {
|
this.harmTypeList = response.rows;
|
this.loading = false;
|
});
|
getOrderList(this.queryParams).then((response) => {
|
this.orderList = response.data.list;
|
if (this.orderList) {
|
this.orderList.forEach((item, index) => {
|
item.newID =
|
(this.queryParams.pageNum - 1) * this.queryParams.pageSize +
|
index +
|
1;
|
});
|
if (response.code === 200) {
|
if (this.orderList.length != 0) {
|
this.$nextTick(() => {
|
this.$refs.multipleTable.toggleRowSelection(
|
this.orderList[0],
|
true
|
);
|
});
|
this.dataList = this.orderList[0];
|
} else {
|
this.$refs.multipleTable.clearSelection();
|
}
|
}
|
}
|
this.total = response.data.total;
|
this.loading = false;
|
});
|
},
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
askId: null,
|
cusId: null,
|
cusName: null,
|
work: null,
|
workStatus: null,
|
medicalHistory: null,
|
chuchao: null,
|
jingqi: null,
|
zhouqi: null,
|
mociage: null,
|
zinv: null,
|
liuchan: null,
|
zaochan: null,
|
sichan: null,
|
yichangtai: null,
|
xiyan: null,
|
xiyanpinlv: null,
|
xiyanyear: null,
|
yinjiu: null,
|
yinjiupinlv: null,
|
yinjiuyear: null,
|
qita: null,
|
remark: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
deleted: null,
|
userId: null,
|
};
|
this.tjAskHistorysList = [];
|
this.resetForm("form");
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
// 单选框选中数据
|
handleSelectionChange(selection) {
|
this.dataList = [];
|
this.selectList = selection;
|
// this.ids = selection.map((item) => item.askId);
|
// this.single = selection.length !== 1;
|
// this.multiple = !selection.length;
|
this.dataList = this.$refs.multipleTable.selection;
|
this.dataList.forEach((item) => {
|
// this.allList = item.tjTollCollectorDetailList
|
// this.id = item.id;
|
// this.tollCollectorId = item.tollCollectorId
|
});
|
if (selection.length > 1) {
|
let del_row = selection.shift();
|
this.$refs.multipleTable.toggleRowSelection(del_row, false);
|
}
|
selection.forEach((item1) => {
|
if (item1.tjCustomerSex === 1) {
|
this.sex = true;
|
} else {
|
this.sex = false;
|
}
|
});
|
let tjNumber = selection.map((item) => item.tjNumber);
|
this.jianqianwenzhendata = tjNumber;
|
// getInfoById(tjNumber).then((response) => {
|
// this.jianqianwenzhendata = response.data;
|
// if (this.form.xiyan == null) {
|
// this.form.xiyan = "1";
|
// }
|
// if (this.form.xiyanpinlv == null) {
|
// this.form.xiyanpinlv = "0";
|
// }
|
// if (this.form.xiyanyear == null) {
|
// this.form.xiyanyear = "0";
|
// }
|
// if (this.form.yinjiu == null) {
|
// this.form.yinjiu = "1";
|
// }
|
// if (this.form.yinjiupinlv == null) {
|
// this.form.yinjiupinlv = "0";
|
// }
|
// if (this.form.yinjiuyear == null) {
|
// this.form.yinjiuyear = "0";
|
// }
|
// this.form.tjAskHistorysList = response.data.tjAskHistorysList;
|
// // this.isdisabled= true
|
// });
|
},
|
tableRowClassName({ row, rowIndex }) {
|
for (let i = 0; i < this.selectList.length; i++) {
|
if (row === this.selectList[i]) {
|
return "warning-row";
|
}
|
}
|
},
|
|
|
|
|
|
|
},
|
};
|
</script>
|
<style lang="scss" scoped >
|
.pagi {
|
margin-right: -10px;
|
}
|
|
/* .pag1 {
|
width: 30%;
|
} */
|
.hist1 {
|
width: 1580px;
|
display: flex;
|
justify-content: space-evenly;
|
}
|
|
.hist2 {
|
width: 708px;
|
}
|
|
.hist3 {
|
margin-top: 60px;
|
}
|
|
::v-deep .el-collapse-item__header {
|
font-weight: 800;
|
font-size: 16px;
|
}
|
|
.el-table .warning-row {
|
background: #e5f3ff !important;
|
}
|
</style>
|