<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>
|
</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">
|
<span class="txt">问诊信息</span>
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :inline="true" size="mini">
|
<el-collapse class="coll" v-model="activeName" accordion>
|
<el-collapse-item class="coll" title="基本信息" name="1" style="width: 900px; font-weight: 600">
|
<div style="width: 900px">
|
<el-form-item label="姓名" prop="cusName">
|
<el-input v-model="form.cusName" placeholder="请输入姓名" />
|
</el-form-item>
|
<el-form-item label="职业" prop="work">
|
<el-select filterable v-model="form.work" placeholder="请选择职业" clearable style="width: 150px">
|
<el-option v-for="dict in dict.type.tj_work" :key="dict.value" :label="dict.label"
|
:value="dict.value" />
|
</el-select>
|
</el-form-item>
|
<el-form-item label="工作状态" prop="workStatus">
|
<el-select filterable v-model="form.workStatus" placeholder="请选择工作状态" clearable style="width: 150px">
|
<el-option v-for="dict in dict.type.tj_work_status" :key="dict.value" :label="dict.label"
|
:value="dict.value" />
|
</el-select>
|
</el-form-item>
|
<el-form-item label="接触毒物" prop="contactPoison">
|
<el-input type="textarea" rows="4" v-model="form.contactPoison" placeholder="请输入接触毒物"
|
style="width: 700px" />
|
</el-form-item>
|
<el-form-item label="既往病史" prop="medicalHistory">
|
<el-input type="textarea" rows="4" v-model="form.medicalHistory" placeholder="请输入既往病史"
|
style="width: 700px" />
|
</el-form-item>
|
</div>
|
</el-collapse-item>
|
<el-collapse-item title="月经史" name="2" v-show="sex">
|
<div style="width: 900px">
|
<el-form-item label="初潮(岁)" prop="chuchao">
|
<el-input v-model="form.chuchao" style="width: 70px" />
|
</el-form-item>
|
<el-form-item label="经期" prop="jingqi">
|
<el-input v-model="form.jingqi" style="width: 70px" />天
|
</el-form-item>
|
<el-form-item label="周期" prop="zhouqi">
|
<el-input v-model="form.zhouqi" style="width: 70px" />天
|
</el-form-item>
|
<el-form-item label="末次月经" prop="mociage">
|
<el-input v-model="form.mociage" style="width: 100px" />
|
</el-form-item>
|
</div>
|
</el-collapse-item>
|
<el-collapse-item title="生育史" name="3" v-show="sex">
|
<div style="width: 900px">
|
<el-form-item label="现有子女(人)" prop="zinv">
|
<el-input v-model="form.zinv" style="width: 70px" />
|
</el-form-item>
|
<el-form-item label="流产(次)" prop="liuchan">
|
<el-input v-model="form.liuchan" style="width: 70px" />
|
</el-form-item>
|
<el-form-item label="早产(次)" prop="zaochan">
|
<el-input v-model="form.zaochan" style="width: 70px" />
|
</el-form-item>
|
<el-form-item label="死产(次)" prop="sichan">
|
<el-input v-model="form.sichan" style="width: 70px" />
|
</el-form-item>
|
<el-form-item label="异常胎(次)" prop="yichangtai">
|
<el-input v-model="form.yichangtai" style="width: 70px" />
|
</el-form-item>
|
</div>
|
</el-collapse-item>
|
<el-collapse-item title="烟酒史" name="4">
|
<div style="width: 900px">
|
<el-form-item label="是否吸烟" prop="xiyan">
|
<!-- <el-input v-model="form.xiyanpinlv" placeholder="请输入吸烟频率" /> -->
|
<el-select filterable v-model="form.xiyan" placeholder="请选择是否吸烟" clearable style="width: 150px">
|
<el-option v-for="dict in dict.type.tj_smoking_pinlv" :key="dict.value" :label="dict.label"
|
:value="dict.value" />
|
</el-select>
|
</el-form-item>
|
<el-form-item label="吸烟频率" prop="xiyanpinlv">
|
<el-input v-model="form.xiyanpinlv" style="width: 70px" />支/天
|
</el-form-item>
|
<el-form-item label="吸烟时间" prop="xiyanyear">
|
<el-input v-model="form.xiyanyear" style="width: 70px" />年 </el-form-item><br />
|
<el-form-item label="是否饮酒" prop="yinjiu">
|
<!-- <el-input v-model="form.yinjiupinlv" placeholder="请输入饮酒频率" /> -->
|
<el-select filterable v-model="form.yinjiu" placeholder="请选择是否饮酒" clearable style="width: 150px">
|
<el-option v-for="dict in dict.type.tj_smoking_pinlv" :key="dict.value" :label="dict.label"
|
:value="dict.value" />
|
</el-select>
|
</el-form-item>
|
<el-form-item label="饮酒频率" prop="yinjiupinlv">
|
<el-input v-model="form.yinjiupinlv" style="width: 70px" />ml/天
|
</el-form-item>
|
<el-form-item label="饮酒时间" prop="yinjiuyear">
|
<el-input v-model="form.yinjiuyear" style="width: 70px" />年
|
</el-form-item>
|
<el-form-item label="其他" prop="qita">
|
<el-input v-model="form.qita" placeholder="请输入其他" type="textarea" style="width: 600px" rows="2" />
|
</el-form-item>
|
</div>
|
</el-collapse-item>
|
<el-collapse-item title="急慢性职业病史信息" name="5">
|
<div style="width: 900px">
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="1.5">
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="addmembers()">添加
|
</el-button>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="delemembers()">删除
|
</el-button>
|
</el-col>
|
</el-row>
|
<el-table border :data="form.tjAskHistorysList" ref="tjAskHistorys" style="width: 98%"
|
@selection-change="handlebingChange">
|
<el-table-column type="selection" width="40" align="center" />
|
<!-- <el-table-column
|
label="序号"
|
align="center"
|
prop="index"
|
width="50"
|
/> -->
|
<el-table-column label="疾病名称" prop="diseaseName">
|
<template slot-scope="scope">
|
<el-input size="mini" v-model="scope.row.diseaseName" placeholder="请输入疾病名称" />
|
</template>
|
</el-table-column>
|
<el-table-column label="诊断日期" prop="diseaseData">
|
<template slot-scope="scope">
|
<!-- <el-input
|
v-model="scope.row.diseaseData"
|
placeholder="请输入诊断日期"
|
/> -->
|
<el-date-picker size="mini" v-model="scope.row.diseaseData" align="right" type="date"
|
placeholder="选择日期" :picker-options="pickerOptions" style="width: 130px" value-format="yyyy-MM-dd">
|
</el-date-picker>
|
</template>
|
</el-table-column>
|
<el-table-column label="诊断单位" prop="diseaseCompany">
|
<template slot-scope="scope">
|
<el-input size="mini" v-model="scope.row.diseaseCompany" placeholder="请输入诊断单位" />
|
</template>
|
</el-table-column>
|
<el-table-column label="是否痊愈" prop="isOk">
|
<template slot-scope="scope">
|
<!-- <el-input v-model="scope.row.isOk" placeholder="请输入是否痊愈" /> -->
|
<el-select filterable size="mini" v-model="scope.row.isOk" placeholder="请选择是否痊愈" clearable>
|
<el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
|
:value="dict.value" />
|
</el-select>
|
</template>
|
</el-table-column>
|
<el-table-column label="备注" prop="remark">
|
<template slot-scope="scope">
|
<el-input size="mini" v-model="scope.row.remark" placeholder="请输入备注" />
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</el-collapse-item>
|
|
<el-collapse-item title="职业史" name="7">
|
<div style="width: 900px">
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="1.5">
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="addmemberss()">添加
|
</el-button>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="delememberss()">删除
|
</el-button>
|
</el-col>
|
</el-row>
|
<el-table border :data="form.workLogs" style="width: 98%" @selection-change="handlezhiyeChange">
|
<el-table-column type="selection" width="40" align="center" />
|
<!-- <el-table-column
|
label="序号"
|
align="center"
|
prop="index"
|
width="50"
|
/> -->
|
<el-table-column label="开始时间" prop="beginTime">
|
<template slot-scope="scope">
|
<el-date-picker size="mini" v-model="scope.row.beginTime" align="right" type="date"
|
placeholder="选择日期" :picker-options="pickerOptions" style="width: 130px" value-format="yyyy-MM-dd">
|
</el-date-picker>
|
</template>
|
</el-table-column>
|
<el-table-column label="结束时间" prop="endTime">
|
<template slot-scope="scope">
|
<el-date-picker size="mini" v-model="scope.row.endTime" align="right" type="date" placeholder="选择日期"
|
:picker-options="pickerOptions" style="width: 130px" value-format="yyyy-MM-dd">
|
</el-date-picker>
|
</template>
|
</el-table-column>
|
<el-table-column label="工作单位" prop="workCompany">
|
<template slot-scope="scope">
|
<el-input size="mini" v-model="scope.row.workCompany" placeholder="请输入工作单位" />
|
</template>
|
</el-table-column>
|
<el-table-column label="部门" prop="workDept">
|
<template slot-scope="scope">
|
<el-input size="mini" v-model="scope.row.workDept" placeholder="请输入部门" />
|
</template>
|
</el-table-column>
|
<el-table-column label="工种" prop="workType">
|
<template slot-scope="scope">
|
<el-input size="mini" v-model="scope.row.workType" placeholder="请输入工种" />
|
</template>
|
</el-table-column>
|
<el-table-column label="有害因素" prop="harmTypeLogs">
|
<template slot-scope="scope">
|
<!-- <el-input v-model="scope.row.isOk" placeholder="请输入是否痊愈" /> -->
|
<el-select filterable size="mini" v-model="scope.row.harmTypeLogs" multiple placeholder="请选择有害因素" clearable>
|
<el-option v-for="dict in harmTypeList" :key="dict.aid" :label="dict.harmType"
|
:value="dict.aid" />
|
</el-select>
|
</template>
|
</el-table-column>
|
<el-table-column label="防护措施" prop="fangHu">
|
<template slot-scope="scope">
|
<el-input size="mini" v-model="scope.row.fangHu" placeholder="请输入防护措施" />
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</el-collapse-item>
|
</el-collapse>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="submitForm" style="margin-top: 10px" :disabled="isdisabled">提交</el-button>
|
</div>
|
</div>
|
</div>
|
|
<!-- 添加或修改问诊对话框 -->
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import {
|
updateHistory,
|
getInfoById,
|
} from "@/api/hosp/history";
|
import { Message } from "element-ui";
|
import { getOrderList } from "@/api/hosp/order";
|
import {
|
listHarmType,
|
} from "@/api/hosp/harmType";
|
export default {
|
name: "History",
|
dicts: ["tj_smoking_pinlv", "sys_yes_no", "tj_work_status", "tj_work", "dict_ageunit", "dict_job"],
|
data() {
|
return {
|
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,
|
message: "",
|
trigger: "blur",
|
},
|
],
|
},
|
};
|
},
|
created() {
|
this.getList();
|
},
|
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);
|
getInfoById(tjNumber).then((response) => {
|
this.form = 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";
|
}
|
}
|
},
|
// 新增行
|
addmembers() {
|
if (this.form.cusName) {
|
if (!this.form.tjAskHistorysList) {
|
this.form.tjAskHistorysList = [];
|
this.form.tjAskHistorysList.push({
|
id: parseInt(length),
|
diseaseName: "",
|
diseaseData: "",
|
diseaseCompany: "",
|
isOk: "",
|
remark: "",
|
Selection,
|
});
|
} else {
|
this.form.tjAskHistorysList.push({
|
id: parseInt(length),
|
diseaseName: "",
|
diseaseData: "",
|
diseaseCompany: "",
|
isOk: "",
|
remark: "",
|
Selection,
|
});
|
}
|
} else {
|
Message.warning("请先填写客户名");
|
}
|
this.$forceUpdate();
|
},
|
|
handlebingChange(selection) {
|
this.bingshiall = []
|
this.bingshiall = selection
|
},
|
|
delemembers() {
|
let that = this
|
if (that.form.tjAskHistorysList.length == that.bingshiall.length) {
|
that.form.tjAskHistorysList = []
|
} else {
|
that.bingshiall.forEach((item1, index1) => {
|
that.form.tjAskHistorysList.forEach((item, index) => {
|
if (item == item1) {
|
that.form.tjAskHistorysList.splice(index, 1)
|
}
|
})
|
})
|
}
|
},
|
|
|
addmemberss() {
|
if (this.form.cusName) {
|
if (!this.form.workLogs) {
|
this.form.workLogs = [];
|
this.form.workLogs.push({
|
id: parseInt(length),
|
beginTime: "",
|
endTime: "",
|
workCompany: "",
|
workDept: "",
|
workType: "",
|
harmTypeLogs: "",
|
fangHu: "",
|
Selection,
|
});
|
} else {
|
this.form.workLogs.push({
|
id: parseInt(length),
|
beginTime: "",
|
endTime: "",
|
workCompany: "",
|
workDept: "",
|
workType: "",
|
harmTypeLogs: "",
|
fangHu: "",
|
Selection,
|
});
|
}
|
} else {
|
Message.warning("请先填写客户名");
|
}
|
this.$forceUpdate();
|
},
|
|
handlezhiyeChange(selection) {
|
this.chageall = []
|
this.chageall = selection
|
|
},
|
|
delememberss() {
|
let that = this
|
if (that.form.workLogs.length == that.chageall.length) {
|
that.form.workLogs = []
|
} else {
|
that.chageall.forEach((item1, index1) => {
|
that.form.workLogs.forEach((item, index) => {
|
if (item == item1) {
|
that.form.workLogs.splice(index, 1)
|
}
|
})
|
})
|
}
|
|
},
|
/** 提交按钮 */
|
submitForm() {
|
this.form.tjNum = this.dataList[0].tjNumber
|
updateHistory(this.form).then((response) => {
|
this.$modal.msgSuccess("修改成功");
|
});
|
},
|
},
|
};
|
</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;
|
}
|
|
.coll {
|
width: 100%;
|
}
|
|
::v-deep .el-collapse-item__header {
|
font-weight: 800;
|
font-size: 16px;
|
}
|
|
.txt {
|
font-size: 16px;
|
font-weight: 800;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
margin-bottom: 20px;
|
}
|
|
.el-table .warning-row {
|
background: #e5f3ff !important;
|
}
|
</style>
|