|
@@ -1,23 +1,45 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-row :gutter="20" style="height: 100%">
|
|
|
+ <el-row :gutter="20" style="margin-top: 0">
|
|
|
<el-col :span="4" style="box-shadow: 0 3px 10px 0 rgb(0 0 0 / 6%); border-right: 1px solid #f1f2f4; overflow-y: auto; height: 100%">
|
|
|
- <el-tree :data="deptOptions" @node-click="handleNodeClick" :default-expand-all="true" :expand-on-click-node="false" highlight-current></el-tree>
|
|
|
+ <el-input
|
|
|
+ placeholder="输入部门关键字"
|
|
|
+ v-model="filterText">
|
|
|
+ </el-input>
|
|
|
+ <div style="height: calc(-203px + 100vh);overflow-y: auto; margin-top: 3px">
|
|
|
+ <el-tree
|
|
|
+ class="filter-tree"
|
|
|
+ :data="deptOptions"
|
|
|
+ default-expand-all
|
|
|
+ :filter-node-method="filterNode"
|
|
|
+ @node-click="handleNodeClick"
|
|
|
+ ref="tree">
|
|
|
+ </el-tree>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
<el-col :span="20" style="height: 100%">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" >
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" style="margin-top: 0;">
|
|
|
<el-form-item prop="physician">
|
|
|
<el-input v-model="queryParams.physician" placeholder="请输入主治医生" clearable @keyup.enter.native="handleQuery" class="se" />
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="patientName">
|
|
|
<el-input v-model="queryParams.patientName" placeholder="请输入患者姓名" clearable @keyup.enter.native="handleQuery" class="se" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item >
|
|
|
+ <el-date-picker
|
|
|
+ v-model="dischargeTime"
|
|
|
+ type="daterange"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table :data="patientList" border @selection-change="selects" height="calc(100vh - 230px)">
|
|
|
+ <el-table :data="patientList" border @selection-change="selects" height="calc(100vh - 250px)">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="科室" align="center" prop="department" />
|
|
|
<el-table-column label="患者姓名" align="center" prop="name" />
|
|
@@ -47,6 +69,8 @@ export default {
|
|
|
name: 'User',
|
|
|
data() {
|
|
|
return {
|
|
|
+ dischargeTime:[],
|
|
|
+ filterText:'',
|
|
|
total:0,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
@@ -68,15 +92,33 @@ export default {
|
|
|
patientName:undefined,
|
|
|
department:undefined,
|
|
|
deptId:undefined,
|
|
|
+ startTime:undefined,
|
|
|
+ endTime: undefined
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
+ dischargeTime(newVal) {
|
|
|
+ if (newVal && newVal.length === 2) {
|
|
|
+ this.queryParams.startTime = newVal[0]; // 开始日期
|
|
|
+ this.queryParams.endTime = newVal[1]; // 结束日期
|
|
|
+ }else {
|
|
|
+ this.queryParams.startTime = '';
|
|
|
+ this.queryParams.endTime = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filterText(val) {
|
|
|
+ this.$refs.tree.filter(val);
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
this.getDepartment();
|
|
|
},
|
|
|
methods: {
|
|
|
+ filterNode(value, data) {
|
|
|
+ if (!value) return true;
|
|
|
+ return data.label.indexOf(value) !== -1;
|
|
|
+ },
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
@@ -87,11 +129,10 @@ export default {
|
|
|
},
|
|
|
/** 查询患者列表*/
|
|
|
getList(){
|
|
|
- console.log(this.deptId)
|
|
|
this.get({
|
|
|
url:'/work/visit/patientCard',
|
|
|
data: {
|
|
|
- ...this.queryParams
|
|
|
+ ...this.queryParams,
|
|
|
}
|
|
|
}).then((response)=>{
|
|
|
this.patientList = response.rows;
|
|
@@ -129,6 +170,7 @@ export default {
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
+ this.dischargeTime = [];
|
|
|
this.resetForm('queryForm');
|
|
|
this.handleQuery();
|
|
|
},
|