|
@@ -0,0 +1,460 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb :crumbs='crumbs'></bread-crumb>
|
|
5
|
+ </div>
|
|
6
|
+ <div class="app-container" id="outcome-indicators-query">
|
|
7
|
+ <analysis-nav activeName="infectiousdiseases"></analysis-nav>
|
|
8
|
+
|
|
9
|
+ <!-- <div class="cell">
|
|
10
|
+ <label class="title">
|
|
11
|
+ <span class="name">日期查询</span> :
|
|
12
|
+ </label>
|
|
13
|
+ <el-date-picker
|
|
14
|
+ v-model="listQuery.start_time"
|
|
15
|
+ prefix-icon="el-icon-date"
|
|
16
|
+ @change="changeTime"
|
|
17
|
+ :editable="false"
|
|
18
|
+ style="width: 196px;"
|
|
19
|
+ type="date"
|
|
20
|
+ placeholder="选择日期时间"
|
|
21
|
+ align="right"
|
|
22
|
+ format="yyyy-MM-dd"
|
|
23
|
+ value-format="yyyy-MM-dd"
|
|
24
|
+ ></el-date-picker>
|
|
25
|
+ <span class>-</span>
|
|
26
|
+ <el-date-picker
|
|
27
|
+ v-model="listQuery.end_time"
|
|
28
|
+ prefix-icon="el-icon-date"
|
|
29
|
+ @change="changeTime"
|
|
30
|
+ :editable="false"
|
|
31
|
+ style="width: 196px;"
|
|
32
|
+ type="date"
|
|
33
|
+ placeholder="选择日期时间"
|
|
34
|
+ align="right"
|
|
35
|
+ format="yyyy-MM-dd"
|
|
36
|
+ value-format="yyyy-MM-dd"
|
|
37
|
+ ></el-date-picker>
|
|
38
|
+ </div> -->
|
|
39
|
+ <div class="cell clearfix">
|
|
40
|
+ <label class="title">
|
|
41
|
+ <span class="name">转归状态</span> :
|
|
42
|
+ </label>
|
|
43
|
+ <div class="time">
|
|
44
|
+ <ul class>
|
|
45
|
+ <li
|
|
46
|
+ :class="item.lapseto==lapsetoType?'active':''"
|
|
47
|
+ @click="selectLapseTo( item.lapseto)"
|
|
48
|
+ v-for="item in lapsetoState"
|
|
49
|
+ :key="item.value"
|
|
50
|
+ >{{item.label}}</li>
|
|
51
|
+ </ul>
|
|
52
|
+ </div>
|
|
53
|
+ </div>
|
|
54
|
+ <div class="cell clearfix">
|
|
55
|
+ <label class="title">
|
|
56
|
+ <span class="name">年龄</span> :
|
|
57
|
+ </label>
|
|
58
|
+ <div class="time">
|
|
59
|
+ <ul class>
|
|
60
|
+ <li
|
|
61
|
+ :class="item.age==ageType?'active':''"
|
|
62
|
+ @click="selectAge( item.age)"
|
|
63
|
+ v-for="item in ageOptions"
|
|
64
|
+ :key="item.value"
|
|
65
|
+ >{{item.label}}</li>
|
|
66
|
+ </ul>
|
|
67
|
+ </div>
|
|
68
|
+ </div>
|
|
69
|
+
|
|
70
|
+ <div class="cell clearfix">
|
|
71
|
+ <label class="title">
|
|
72
|
+ <span class="name">传染病</span> :
|
|
73
|
+ </label>
|
|
74
|
+ <div class="time">
|
|
75
|
+ <ul class>
|
|
76
|
+ <li
|
|
77
|
+ :class="item.id==contagionType?'active':''"
|
|
78
|
+ @click="selectContagionType( item.id)"
|
|
79
|
+ v-for="item in contagionList"
|
|
80
|
+ :key="item.id"
|
|
81
|
+ >{{item.name}}</li>
|
|
82
|
+ </ul>
|
|
83
|
+ </div>
|
|
84
|
+ </div>
|
|
85
|
+
|
|
86
|
+ <h4 class="hui">统计图</h4>
|
|
87
|
+ <hr class="huixiao">
|
|
88
|
+ <el-row :gutter="32">
|
|
89
|
+ <el-col :xs="24" :sm="24" :lg="8">
|
|
90
|
+ <div class="chart-wrapper">
|
|
91
|
+
|
|
92
|
+ </div>
|
|
93
|
+ </el-col>
|
|
94
|
+ <el-col :xs="24" :sm="24" :lg="8">
|
|
95
|
+ <div class="chart-wrapper">
|
|
96
|
+ <!-- <pie-chart :title="peiTitle" :options="CompletionOptions"/> -->
|
|
97
|
+ <bar-chart :title="peiTitle" :options="CompletionOptions" />
|
|
98
|
+ </div>
|
|
99
|
+ </el-col>
|
|
100
|
+ <el-col :xs="24" :sm="24" :lg="8">
|
|
101
|
+ <div class="chart-wrapper">
|
|
102
|
+
|
|
103
|
+ </div>
|
|
104
|
+ </el-col>
|
|
105
|
+ </el-row>
|
|
106
|
+
|
|
107
|
+ <h4 class="hui">统计表</h4>
|
|
108
|
+ <hr class="huixiao">
|
|
109
|
+ <el-table
|
|
110
|
+ ref="multipleTable"
|
|
111
|
+ :data="tableData"
|
|
112
|
+ border
|
|
113
|
+ fit
|
|
114
|
+ highlight-current-row
|
|
115
|
+ style="width: 100%;margin-top: 10px;"
|
|
116
|
+ :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
|
|
117
|
+ >
|
|
118
|
+
|
|
119
|
+ <el-table-column label="透析号" min-width="100" property="dialysis_no" align="center">
|
|
120
|
+ </el-table-column>
|
|
121
|
+ <el-table-column label="患者姓名" min-width="100" property="name" align="center">
|
|
122
|
+ </el-table-column>
|
|
123
|
+ <el-table-column label="性别" min-width="80" property="gender" align="center">
|
|
124
|
+ <template slot-scope="scope"><span>{{getPatientGender(scope.row.gender)}}</span></template>
|
|
125
|
+ </el-table-column>
|
|
126
|
+ <el-table-column label="年龄" min-width="80" property="birthday" align="center">
|
|
127
|
+ <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
|
|
128
|
+ </el-table-column>
|
|
129
|
+ <el-table-column label="归转状态" min-width="80" property="lapseto" align="center">
|
|
130
|
+ <template slot-scope="scope"><span>{{getPatientLapseto(scope.row.lapseto)}}</span></template>
|
|
131
|
+ </el-table-column>
|
|
132
|
+ <el-table-column label="传染病" min-width="80" property="lapseto" align="center">
|
|
133
|
+ <template slot-scope="scope"><span>{{getPatientInfectiousDiseases(scope.row.contagions)}}</span></template>
|
|
134
|
+ </el-table-column>
|
|
135
|
+
|
|
136
|
+ </el-table>
|
|
137
|
+
|
|
138
|
+ <!-- <pagi-nation title="分页"></pagi-nation> -->
|
|
139
|
+
|
|
140
|
+ <el-pagination
|
|
141
|
+ align="right"
|
|
142
|
+ @size-change="handleSizeChange"
|
|
143
|
+ @current-change="handleCurrentChange"
|
|
144
|
+ :current-page="listQuery.pate"
|
|
145
|
+ :page-sizes="[10, 20, 50, 100]"
|
|
146
|
+ :page-size="10"
|
|
147
|
+ background
|
|
148
|
+ style="margin-top:20px;"
|
|
149
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
150
|
+ :total="total"
|
|
151
|
+ ></el-pagination>
|
|
152
|
+ </div>
|
|
153
|
+ </div>
|
|
154
|
+</template>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+<script>
|
|
158
|
+import { GetPAInfectiousDiseasesData } from "@/api/qcd";
|
|
159
|
+import BarChart from "../components/BarChart";
|
|
160
|
+import {jsGetAge, uParseTime} from "@/utils/tools";
|
|
161
|
+import analysisNav from './components/analysisNav'
|
|
162
|
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
|
163
|
+export default {
|
|
164
|
+ name: "totalAnalysis",
|
|
165
|
+ data() {
|
|
166
|
+ return {
|
|
167
|
+ crumbs:[
|
|
168
|
+ {path:false, name:'科室质控'},
|
|
169
|
+ {path:false, name:'患者分析'},
|
|
170
|
+ {path:false, name:'并发症分析'},
|
|
171
|
+ ],
|
|
172
|
+ total: 0,
|
|
173
|
+ patientMap:{},
|
|
174
|
+ listQuery: {
|
|
175
|
+ start_time: "",
|
|
176
|
+ end_time: "",
|
|
177
|
+ page: 1,
|
|
178
|
+ limit: 10,
|
|
179
|
+ },
|
|
180
|
+ peiTitle:'传染病(人)',
|
|
181
|
+ // CompletionOptions:{
|
|
182
|
+ // legend:[],
|
|
183
|
+ // series:[],
|
|
184
|
+ // },
|
|
185
|
+ CompletionOptions: {
|
|
186
|
+ xAxis:[],
|
|
187
|
+ series:[],
|
|
188
|
+ },
|
|
189
|
+ tableData: [],
|
|
190
|
+ lapsetoType: 0,
|
|
191
|
+ lapsetoState: [
|
|
192
|
+ { value: 0, label: "全部", source: 0, lapseto: 0 },
|
|
193
|
+ { value: 1, label: "转出", source: 0, lapseto: 2 },
|
|
194
|
+ { value: 2, label: "留治", source: 0, lapseto: 1 }
|
|
195
|
+ ],
|
|
196
|
+ ageType: 0,
|
|
197
|
+ ageOptions: [
|
|
198
|
+ { value: 0, label: "全部", age: 0 },
|
|
199
|
+ { value: 1, label: "20~30", age: 1 },
|
|
200
|
+ { value: 2, label: "30~40", age: 2 },
|
|
201
|
+ { value: 3, label: "40~50", age: 3 },
|
|
202
|
+ { value: 4, label: "其他", age: 4 },
|
|
203
|
+ ],
|
|
204
|
+ contagionType: 0,
|
|
205
|
+ contagionList:[
|
|
206
|
+ { id: 0, name: "全部", },
|
|
207
|
+ ],
|
|
208
|
+ contagionMap:{},
|
|
209
|
+ };
|
|
210
|
+ },
|
|
211
|
+ created() {
|
|
212
|
+ var contagionList = this.$store.getters.contagions;
|
|
213
|
+ for (const index in contagionList) {
|
|
214
|
+ if(contagionList[index].type==2) {
|
|
215
|
+ this.contagionList.push(contagionList[index]);
|
|
216
|
+ this.contagionMap[contagionList[index].id] = contagionList[index].name;
|
|
217
|
+ }
|
|
218
|
+ }
|
|
219
|
+
|
|
220
|
+ // var nowDate = new Date();
|
|
221
|
+ // var nowYear = nowDate.getFullYear();
|
|
222
|
+ // var nowMonth = nowDate.getMonth() + 1;
|
|
223
|
+ // var nowDay = nowDate.getDate();
|
|
224
|
+ // this.listQuery.end_time =
|
|
225
|
+ // nowYear +
|
|
226
|
+ // "-" +
|
|
227
|
+ // (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
|
|
228
|
+ // "-" +
|
|
229
|
+ // (nowDay < 10 ? "0" + nowDay : nowDay);
|
|
230
|
+ // nowDate.setMonth(nowDate.getMonth() - 3);
|
|
231
|
+ // nowYear = nowDate.getFullYear();
|
|
232
|
+ // nowMonth = nowDate.getMonth() + 1;
|
|
233
|
+ // nowDay = nowDate.getDate();
|
|
234
|
+ // this.listQuery.start_time =
|
|
235
|
+ // nowYear +
|
|
236
|
+ // "-" +
|
|
237
|
+ // (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
|
|
238
|
+ // "-" +
|
|
239
|
+ // (nowDay < 10 ? "0" + nowDay : nowDay);
|
|
240
|
+ this.getList();
|
|
241
|
+ },
|
|
242
|
+ methods: {
|
|
243
|
+ getList() {
|
|
244
|
+ GetPAInfectiousDiseasesData(this.listQuery).then(response => {
|
|
245
|
+ if (response.data.state == 0) {
|
|
246
|
+ this.$message.error(response.data.msg);
|
|
247
|
+ return false;
|
|
248
|
+ } else {
|
|
249
|
+ this.tableData = [];
|
|
250
|
+ this.total = response.data.data.total;
|
|
251
|
+ var patients = response.data.data.patients;
|
|
252
|
+ for (const index in patients) {
|
|
253
|
+ this.tableData.push(patients[index]);
|
|
254
|
+ }
|
|
255
|
+
|
|
256
|
+ this.CompletionOptions = {
|
|
257
|
+ xAxis:[],
|
|
258
|
+ series:[],
|
|
259
|
+ };
|
|
260
|
+
|
|
261
|
+ var dsp = response.data.data.dsp;
|
|
262
|
+ var dspMap = {};
|
|
263
|
+ for (const index in dsp) {
|
|
264
|
+ dspMap[dsp[index].diseases] = dsp[index].count;
|
|
265
|
+ }
|
|
266
|
+
|
|
267
|
+ for (const key in this.contagionMap) {
|
|
268
|
+ this.CompletionOptions.xAxis.push(this.contagionMap[key]);
|
|
269
|
+ if (key in dspMap) {
|
|
270
|
+ this.CompletionOptions.series.push(dspMap[key]);
|
|
271
|
+ }else {
|
|
272
|
+ this.CompletionOptions.series.push(0);
|
|
273
|
+ }
|
|
274
|
+ }
|
|
275
|
+ }
|
|
276
|
+ });
|
|
277
|
+ },
|
|
278
|
+ changeTime() {
|
|
279
|
+ this.getList();
|
|
280
|
+ },
|
|
281
|
+ onSearch(){
|
|
282
|
+ this.getList();
|
|
283
|
+ },
|
|
284
|
+ changeModel() {
|
|
285
|
+ this.getList();
|
|
286
|
+ },
|
|
287
|
+ handleSizeChange(val) {
|
|
288
|
+ this.listQuery.limit = val;
|
|
289
|
+ this.getList();
|
|
290
|
+ },
|
|
291
|
+ handleCurrentChange(val) {
|
|
292
|
+ this.listQuery.page = val;
|
|
293
|
+ this.getList();
|
|
294
|
+ },
|
|
295
|
+ selectAge(age) {
|
|
296
|
+ this.ageType = age;
|
|
297
|
+ this.listQuery.age = age;
|
|
298
|
+ this.getList();
|
|
299
|
+ },
|
|
300
|
+ selectLapseTo(lapseto) {
|
|
301
|
+ this.lapsetoType = lapseto;
|
|
302
|
+ this.listQuery.lapseto = lapseto;
|
|
303
|
+ this.getList();
|
|
304
|
+ },
|
|
305
|
+ selectContagionType(type) {
|
|
306
|
+ this.contagionType = type;
|
|
307
|
+ this.listQuery.contagion_type = type;
|
|
308
|
+ this.getList();
|
|
309
|
+ },
|
|
310
|
+ getTime(value, temp) {
|
|
311
|
+ if (value != undefined) {
|
|
312
|
+ return uParseTime(value, temp)
|
|
313
|
+ }
|
|
314
|
+ return ""
|
|
315
|
+ },
|
|
316
|
+ getProjectName(id) {
|
|
317
|
+ return (id in this.projectOptions) ? this.projectOptions[id].project_name:'';
|
|
318
|
+ },
|
|
319
|
+ getPatientName(id) {
|
|
320
|
+ return (id in this.patientMap) ? this.patientMap[id].name:'';
|
|
321
|
+ },
|
|
322
|
+ getPatientLapseto(lapseto) {
|
|
323
|
+ if(lapseto==1) {
|
|
324
|
+ return '留治';
|
|
325
|
+ }else if(lapseto == 2) {
|
|
326
|
+ return '转出';
|
|
327
|
+ }
|
|
328
|
+ return '--';
|
|
329
|
+ },
|
|
330
|
+ getPatientInfectiousDiseases(cs) {
|
|
331
|
+ if (typeof(cs) == 'undefined') {
|
|
332
|
+ return '';
|
|
333
|
+ }
|
|
334
|
+ var arr = [];
|
|
335
|
+ var s = ''
|
|
336
|
+ for (const key in cs) {
|
|
337
|
+ console.log('const key in cs', cs[key]);
|
|
338
|
+ if (typeof(cs[key].disease_id) == "undefined") {
|
|
339
|
+ continue;
|
|
340
|
+ }
|
|
341
|
+ var id = cs[key].disease_id;
|
|
342
|
+ if(id in this.contagionMap) {
|
|
343
|
+ arr.push(this.contagionMap[id]);
|
|
344
|
+ }
|
|
345
|
+ s = arr.join(',');
|
|
346
|
+ }
|
|
347
|
+ return s;
|
|
348
|
+ },
|
|
349
|
+ getPatientSource(srouce){
|
|
350
|
+ if(srouce==1) {
|
|
351
|
+ return '门诊';
|
|
352
|
+ }else if(srouce == 2) {
|
|
353
|
+ return '住院';
|
|
354
|
+ }
|
|
355
|
+ return '其他';
|
|
356
|
+ },
|
|
357
|
+ getPatientGender(gender) {
|
|
358
|
+ if (gender == 1) {
|
|
359
|
+ return '男';
|
|
360
|
+ } else if(gender == 2) {
|
|
361
|
+ return '女';
|
|
362
|
+ }
|
|
363
|
+ return '';
|
|
364
|
+ },
|
|
365
|
+ tranAge(birthday) {
|
|
366
|
+ var birth = uParseTime(birthday, '{y}-{m}-{d}');
|
|
367
|
+ return jsGetAge(birth, '-');
|
|
368
|
+ },
|
|
369
|
+ getPatientDialysisNo(id) {
|
|
370
|
+ return (id in this.patientMap) ? this.patientMap[id].dialysis_no:'';
|
|
371
|
+ },
|
|
372
|
+ getItemVulue(project_id, item_id, row) {
|
|
373
|
+ var key = project_id + '_' + item_id;
|
|
374
|
+ return (typeof(row.items) !== 'undefined' && (key in row.items)) ? row.items[key].inspect_value:'';
|
|
375
|
+ },
|
|
376
|
+ renderheader(h, { column, $index }) {
|
|
377
|
+ return h('span', {}, [
|
|
378
|
+ h('span', {}, column.label.split('//')[0]),
|
|
379
|
+ h('br'),
|
|
380
|
+ h('span', {}, column.label.split('//')[1])
|
|
381
|
+ ])
|
|
382
|
+ },
|
|
383
|
+ },
|
|
384
|
+ components: {
|
|
385
|
+ analysisNav,
|
|
386
|
+ BarChart,
|
|
387
|
+ BreadCrumb
|
|
388
|
+ }
|
|
389
|
+};
|
|
390
|
+</script>
|
|
391
|
+<style>
|
|
392
|
+#oictable ::-webkit-scrollbar {
|
|
393
|
+ height: 15px;
|
|
394
|
+}
|
|
395
|
+#outcome-indicators-query .el-form-item {
|
|
396
|
+ margin-bottom: 0px !important;
|
|
397
|
+}
|
|
398
|
+</style>
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
402
|
+.app-container {
|
|
403
|
+// margin: 20px;
|
|
404
|
+ font-size: 15px;
|
|
405
|
+ .filter-container {
|
|
406
|
+ padding-bottom: 5px;
|
|
407
|
+ }
|
|
408
|
+ .hui {
|
|
409
|
+ color: #909399;
|
|
410
|
+ margin-bottom: 5px;
|
|
411
|
+ }
|
|
412
|
+ .huixiao {
|
|
413
|
+ border: solid 1px #ebeef5;
|
|
414
|
+ }
|
|
415
|
+ .search-component {
|
|
416
|
+ width: 500px;
|
|
417
|
+ .searchBox {
|
|
418
|
+ width: 300px;
|
|
419
|
+ height: 36px;
|
|
420
|
+ line-height: 36px;
|
|
421
|
+ padding-left: 15px;
|
|
422
|
+ border: 1px #dcdfe6 solid;
|
|
423
|
+ border-right: none;
|
|
424
|
+ outline: none;
|
|
425
|
+ float: left;
|
|
426
|
+ border-radius: 6px 0 0 6px;
|
|
427
|
+ font-size: 14px;
|
|
428
|
+ color: #333;
|
|
429
|
+ background: #fff;
|
|
430
|
+ box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
|
|
431
|
+ }
|
|
432
|
+ .searchBtn {
|
|
433
|
+ background-color: #409eff;
|
|
434
|
+ color: #fff;
|
|
435
|
+ font-size: 15px;
|
|
436
|
+ text-align: center;
|
|
437
|
+ height: 36px;
|
|
438
|
+ line-height: 36px;
|
|
439
|
+ float: left;
|
|
440
|
+ outline: none;
|
|
441
|
+ width: 70px;
|
|
442
|
+ border: none;
|
|
443
|
+ border-radius: 0 6px 6px 0;
|
|
444
|
+ font-family: "Microsoft Yahei";
|
|
445
|
+ cursor: pointer;
|
|
446
|
+ }
|
|
447
|
+ }
|
|
448
|
+ .amount {
|
|
449
|
+ font-weight: normal;
|
|
450
|
+ padding: 10px 0 0 0;
|
|
451
|
+ color: #606266;
|
|
452
|
+ font-size: 14px;
|
|
453
|
+ span {
|
|
454
|
+ color: #ef2525;
|
|
455
|
+ font-family: "Arial";
|
|
456
|
+ padding: 0 2px;
|
|
457
|
+ }
|
|
458
|
+ }
|
|
459
|
+}
|
|
460
|
+</style>
|