|
@@ -39,20 +39,31 @@
|
39
|
39
|
<el-container>
|
40
|
40
|
<div style="width:150px">
|
41
|
41
|
<div class="tableTitle">患者列表</div>
|
42
|
|
- <el-table :data="tableData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
|
43
|
|
- <el-table-column prop="date" label="日期" width="70"></el-table-column>
|
44
|
|
- <el-table-column prop="name" label="姓名" width="80"></el-table-column>
|
|
42
|
+ <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
|
|
43
|
+ <el-table-column prop="dialysis_no" label="透析号" width="80">
|
|
44
|
+ <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
|
|
45
|
+ </el-table-column>
|
|
46
|
+ <el-table-column prop="name" label="姓名" width="80">
|
|
47
|
+ <template slot-scope="scope">{{ scope.row.name }}</template>
|
|
48
|
+ </el-table-column>
|
45
|
49
|
</el-table>
|
46
|
50
|
</div>
|
47
|
51
|
<div style="padding-left:10px;flex:1">
|
48
|
52
|
<div class="tableTitle">统计表</div>
|
49
|
|
- <el-table :data="tableData1" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
|
50
|
|
- <el-table-column fixed prop="date" label="日期"></el-table-column>
|
51
|
|
- <el-table-column prop="name" label="姓名"></el-table-column>
|
52
|
|
- <el-table-column prop="province" label="省份"></el-table-column>
|
53
|
|
- <el-table-column prop="city" label="市区"></el-table-column>
|
54
|
|
- <el-table-column prop="address" label="地址"></el-table-column>
|
55
|
|
- <el-table-column prop="zip" label="邮编"></el-table-column>
|
|
53
|
+ <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
|
|
54
|
+ <el-table-column prop="name" label="姓名" fixed>
|
|
55
|
+ <template slot-scope="scope">{{ scope.row.name }}</template>
|
|
56
|
+ </el-table-column>
|
|
57
|
+ <el-table-column
|
|
58
|
+ :label="modeItem.project_name"
|
|
59
|
+ property="number"
|
|
60
|
+ align="center"
|
|
61
|
+ min-width="100"
|
|
62
|
+ v-for="(modeItem, index) in tableName"
|
|
63
|
+ :key="index"
|
|
64
|
+ >
|
|
65
|
+
|
|
66
|
+ </el-table-column>
|
56
|
67
|
</el-table>
|
57
|
68
|
|
58
|
69
|
<el-pagination
|
|
@@ -60,7 +71,7 @@
|
60
|
71
|
@size-change="handleSizeChange"
|
61
|
72
|
@current-change="handleCurrentChange"
|
62
|
73
|
:current-page="listQuery.page"
|
63
|
|
- :page-sizes="[10, 20, 50, 100]"
|
|
74
|
+ :page-sizes="[20, 40, 60, 80,100]"
|
64
|
75
|
:page-size="10"
|
65
|
76
|
background
|
66
|
77
|
style="margin-top:20px;"
|
|
@@ -74,6 +85,7 @@
|
74
|
85
|
|
75
|
86
|
|
76
|
87
|
<script>
|
|
88
|
+ import {getCurrentOrgPatients,getAllMajorInspection,getPatientList } from "@/api/common/common"
|
77
|
89
|
export default {
|
78
|
90
|
data() {
|
79
|
91
|
return {
|
|
@@ -81,7 +93,7 @@ export default {
|
81
|
93
|
start_time: "",
|
82
|
94
|
end_time: "",
|
83
|
95
|
page: 1,
|
84
|
|
- limit: 10
|
|
96
|
+ limit: 20
|
85
|
97
|
},
|
86
|
98
|
options: [
|
87
|
99
|
{
|
|
@@ -106,142 +118,32 @@ export default {
|
106
|
118
|
}
|
107
|
119
|
],
|
108
|
120
|
value: "请选项",
|
109
|
|
- tableData: [
|
110
|
|
- {
|
111
|
|
- date: "2016",
|
112
|
|
- name: "王小虎"
|
113
|
|
- },
|
114
|
|
- {
|
115
|
|
- date: "2016",
|
116
|
|
- name: "王小虎"
|
117
|
|
- },
|
118
|
|
- {
|
119
|
|
- date: "2016",
|
120
|
|
- name: "王小虎"
|
121
|
|
- },
|
122
|
|
- {
|
123
|
|
- date: "2016",
|
124
|
|
- name: "王小虎"
|
125
|
|
- },
|
126
|
|
- {
|
127
|
|
- date: "2016",
|
128
|
|
- name: "王小虎"
|
129
|
|
- },
|
130
|
|
- {
|
131
|
|
- date: "2016",
|
132
|
|
- name: "王小虎"
|
133
|
|
- },
|
134
|
|
- {
|
135
|
|
- date: "2016",
|
136
|
|
- name: "王小虎"
|
137
|
|
- },
|
138
|
|
- {
|
139
|
|
- date: "2016",
|
140
|
|
- name: "王小虎"
|
141
|
|
- },
|
142
|
|
- {
|
143
|
|
- date: "2016",
|
144
|
|
- name: "王小虎"
|
145
|
|
- },
|
146
|
|
- {
|
147
|
|
- date: "2016",
|
148
|
|
- name: "王小虎"
|
149
|
|
- },
|
150
|
|
- {
|
151
|
|
- date: "2016",
|
152
|
|
- name: "王小虎"
|
153
|
|
- },
|
154
|
|
- {
|
155
|
|
- date: "2016",
|
156
|
|
- name: "王小虎"
|
157
|
|
- }
|
158
|
|
- ],
|
159
|
|
- tableData1: [
|
160
|
|
- {
|
161
|
|
- date: "2016-05-03",
|
162
|
|
- name: "王小虎",
|
163
|
|
- province: "上海",
|
164
|
|
- city: "普陀区",
|
165
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
166
|
|
- zip: 200333
|
167
|
|
- },
|
168
|
|
- {
|
169
|
|
- date: "2016-05-02",
|
170
|
|
- name: "王小虎",
|
171
|
|
- province: "上海",
|
172
|
|
- city: "普陀区",
|
173
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
174
|
|
- zip: 200333
|
175
|
|
- },
|
176
|
|
- {
|
177
|
|
- date: "2016-05-04",
|
178
|
|
- name: "王小虎",
|
179
|
|
- province: "上海",
|
180
|
|
- city: "普陀区",
|
181
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
182
|
|
- zip: 200333
|
183
|
|
- },
|
184
|
|
- {
|
185
|
|
- date: "2016-05-01",
|
186
|
|
- name: "王小虎",
|
187
|
|
- province: "上海",
|
188
|
|
- city: "普陀区",
|
189
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
190
|
|
- zip: 200333
|
191
|
|
- },
|
192
|
|
- {
|
193
|
|
- date: "2016-05-08",
|
194
|
|
- name: "王小虎",
|
195
|
|
- province: "上海",
|
196
|
|
- city: "普陀区",
|
197
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
198
|
|
- zip: 200333
|
199
|
|
- },
|
200
|
|
- {
|
201
|
|
- date: "2016-05-06",
|
202
|
|
- name: "王小虎",
|
203
|
|
- province: "上海",
|
204
|
|
- city: "普陀区",
|
205
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
206
|
|
- zip: 200333
|
207
|
|
- },
|
208
|
|
- {
|
209
|
|
- date: "2016-05-07",
|
210
|
|
- name: "王小虎",
|
211
|
|
- province: "上海",
|
212
|
|
- city: "普陀区",
|
213
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
214
|
|
- zip: 200333
|
215
|
|
- },
|
216
|
|
- {
|
217
|
|
- date: "2016-05-08",
|
218
|
|
- name: "王小虎",
|
219
|
|
- province: "上海",
|
220
|
|
- city: "普陀区",
|
221
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
222
|
|
- zip: 200333
|
223
|
|
- },
|
224
|
|
- {
|
225
|
|
- date: "2016-05-06",
|
226
|
|
- name: "王小虎",
|
227
|
|
- province: "上海",
|
228
|
|
- city: "普陀区",
|
229
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
230
|
|
- zip: 200333
|
231
|
|
- },
|
232
|
|
- {
|
233
|
|
- date: "2016-05-07",
|
234
|
|
- name: "王小虎",
|
235
|
|
- province: "上海",
|
236
|
|
- city: "普陀区",
|
237
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
238
|
|
- zip: 200333
|
239
|
|
- }
|
240
|
|
- ]
|
|
121
|
+ tableData: [],
|
|
122
|
+ patientsData:[],
|
|
123
|
+ total:0,
|
|
124
|
+ tableName:[],
|
241
|
125
|
};
|
242
|
126
|
},
|
243
|
127
|
methods: {
|
244
|
|
- changeTime() {},
|
|
128
|
+ changeTime(val) {
|
|
129
|
+ var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
|
|
130
|
+ if (time > 0) {
|
|
131
|
+ this.$message.error("结束时间不能小于开始时间");
|
|
132
|
+ this.listQuery.start_time = "";
|
|
133
|
+ } else {
|
|
134
|
+ this.getPatientList()
|
|
135
|
+ }
|
|
136
|
+ },
|
|
137
|
+ onSearch(){
|
|
138
|
+ },
|
|
139
|
+ handleSizeChange(limit) {
|
|
140
|
+ this.listQuery.limit = limit;
|
|
141
|
+ this.getPatientList()
|
|
142
|
+ },
|
|
143
|
+ handleCurrentChange(page) {
|
|
144
|
+ this.listQuery.page = page;
|
|
145
|
+ this.getPatientList()
|
|
146
|
+ },
|
245
|
147
|
changeEndTime(val) {
|
246
|
148
|
var time =
|
247
|
149
|
this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
|
|
@@ -249,9 +151,71 @@ export default {
|
249
|
151
|
this.$message.error("结束时间不能小于开始时间");
|
250
|
152
|
this.listQuery.end_time = "";
|
251
|
153
|
} else {
|
|
154
|
+ this.getPatientList()
|
252
|
155
|
}
|
|
156
|
+ },
|
|
157
|
+ //获取病人列表
|
|
158
|
+ getCurrentOrgPatients(){
|
|
159
|
+ getCurrentOrgPatients().then(response=>{
|
|
160
|
+ if(response.data.state === 1){
|
|
161
|
+ var patients = response.data.data.patients
|
|
162
|
+ this.patientsData = patients
|
|
163
|
+ }
|
|
164
|
+ })
|
|
165
|
+ },
|
|
166
|
+ //获取检验检查项目
|
|
167
|
+ getAllMajorInspection(){
|
|
168
|
+ getAllMajorInspection().then(response=>{
|
|
169
|
+ if(response.data.state === 1){
|
|
170
|
+ var inspection = response.data.data.inspection
|
|
171
|
+ console.log("inspection",inspection)
|
|
172
|
+ this.tableName = inspection
|
|
173
|
+ }
|
|
174
|
+ })
|
|
175
|
+ },
|
|
176
|
+ getPatientList(){
|
|
177
|
+ getPatientList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.limit,this.listQuery.page).then(response=>{
|
|
178
|
+ if(response.data.state === 1){
|
|
179
|
+ var patientInfo = response.data.data.patientInfo
|
|
180
|
+ console.log("列表数据",patientInfo)
|
|
181
|
+ this.tableData = patientInfo
|
|
182
|
+ var total = response.data.data.total
|
|
183
|
+ console.log("total",total)
|
|
184
|
+ this.total = total
|
|
185
|
+ var list = response.data.data.list
|
|
186
|
+ console.log("list",list)
|
|
187
|
+ }
|
|
188
|
+ })
|
253
|
189
|
}
|
254
|
|
- }
|
|
190
|
+ },
|
|
191
|
+ created(){
|
|
192
|
+ var nowDate = new Date();
|
|
193
|
+ var nowYear = nowDate.getFullYear();
|
|
194
|
+ var nowMonth = nowDate.getMonth() + 1;
|
|
195
|
+ var nowDay = nowDate.getDate();
|
|
196
|
+ this.listQuery.end_time =
|
|
197
|
+ nowYear +
|
|
198
|
+ "-" +
|
|
199
|
+ (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
|
|
200
|
+ "-" +
|
|
201
|
+ (nowDay < 10 ? "0" + nowDay : nowDay);
|
|
202
|
+ nowDate.setMonth(nowDate.getMonth() - 3);
|
|
203
|
+ nowYear = nowDate.getFullYear();
|
|
204
|
+ nowMonth = nowDate.getMonth() + 1;
|
|
205
|
+ nowDay = nowDate.getDate();
|
|
206
|
+ this.listQuery.start_time =
|
|
207
|
+ nowYear +
|
|
208
|
+ "-" +
|
|
209
|
+ (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
|
|
210
|
+ "-" +
|
|
211
|
+ (nowDay < 10 ? "0" + nowDay : nowDay);
|
|
212
|
+ //获取该机构下的所有患者
|
|
213
|
+ this.getCurrentOrgPatients()
|
|
214
|
+ //获取检验检查项目
|
|
215
|
+ this.getAllMajorInspection()
|
|
216
|
+ //获取列表数据
|
|
217
|
+ this.getPatientList()
|
|
218
|
+ }
|
255
|
219
|
};
|
256
|
220
|
</script>
|
257
|
221
|
|