瀏覽代碼

Merge remote-tracking branch 'origin/update' into update_branch

csx 6 年之前
父節點
當前提交
2db7308fdc

+ 21 - 0
src/api/qcd.js 查看文件

13
         method:'get',
13
         method:'get',
14
         params:params
14
         params:params
15
     })
15
     })
16
+}
17
+export function GetOICData(params){
18
+    return request({
19
+        url:'/api/qcd/oicdata',
20
+        method:'get',
21
+        params:params
22
+    })
23
+}
24
+export function GetOIQData(params){
25
+    return request({
26
+        url:'/api/qcd/oiqdata',
27
+        method:'get',
28
+        params:params
29
+    })
30
+}
31
+export function GetPATotalData(params){
32
+    return request({
33
+        url:'/api/qcd/patotaldata',
34
+        method:'get',
35
+        params:params
36
+    })
16
 }
37
 }

+ 22 - 0
src/router/index.js 查看文件

155
     children: [
155
     children: [
156
       { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
156
       { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
157
       { path: '/qcd/processindicators', component: () => import('@/xt_pages/qcd/processIndicators'), name: 'processIndicators', meta: { title: '过程指标' }},
157
       { path: '/qcd/processindicators', component: () => import('@/xt_pages/qcd/processIndicators'), name: 'processIndicators', meta: { title: '过程指标' }},
158
+      { 
159
+        path: '/qcd/outcomeIndicators', 
160
+        name: 'outcomeIndicators', 
161
+        meta: { title: '结果指标' },
162
+        redirect: '/qcd/outcomeIndicators/control',
163
+        component: () => import('@/xt_pages/qcd/outcomeIndicators/parent'), // Parent router-view
164
+        children:[
165
+          { path: '/qcd/outcomeIndicators/control', component: () => import('@/xt_pages/qcd/outcomeIndicators/control'), name: 'outcomeIndicatorsControl', meta: { title: '指标控制' }},
166
+          { path: '/qcd/outcomeIndicators/query', component: () => import('@/xt_pages/qcd/outcomeIndicators/query'), name: 'outcomeIndicatorsQuery', meta: { title: '指标查询' }},
167
+        ]
168
+      },
169
+      { 
170
+        path: '/qcd/patientanalysis', 
171
+        name: 'patientanalysis', 
172
+        meta: { title: '患者分析' },
173
+        redirect: '/qcd/patientanalysis/total',
174
+        component: () => import('@/xt_pages/qcd/patientAnalysis/parent'), // Parent router-view
175
+        children:[
176
+          { path: '/qcd/patientanalysis/total', component: () => import('@/xt_pages/qcd/patientAnalysis/total'), name: 'patientAnalysisTotal', meta: { title: '总量分析' }},
177
+          { path: '/qcd/patientanalysis/query', component: () => import('@/xt_pages/qcd/patientAnalysis/total'), name: 'outcomeIndicatorsControl2', meta: { title: '总量分析' }},
178
+        ]
179
+      },
158
     ]
180
     ]
159
   },
181
   },
160
   {
182
   {

+ 5 - 4
src/xt_pages/dialysis/batch_print/batch_print_order.vue 查看文件

234
                                 </td>
234
                                 </td>
235
                                 <td style="padding: 0;">
235
                                 <td style="padding: 0;">
236
                                     <table class="inside_table">
236
                                     <table class="inside_table">
237
-                                        <thead>
237
+                                        <tbody>
238
+                                        <!-- <thead> -->
238
                                             <tr>
239
                                             <tr>
239
                                                 <td width="100">时间</td>
240
                                                 <td width="100">时间</td>
240
                                                 <td width="80">血压<br/>mmHg</td>
241
                                                 <td width="80">血压<br/>mmHg</td>
247
                                                 <td width="60">跨膜压<br/>mmHg</td>
248
                                                 <td width="60">跨膜压<br/>mmHg</td>
248
                                                 <td>备注</td>
249
                                                 <td>备注</td>
249
                                             </tr>
250
                                             </tr>
250
-                                        </thead>
251
-                                        <tbody>
251
+                                        <!-- </thead>
252
+                                        <tbody> -->
252
                                             <tr v-for="(monitor_record, index) in record.monitor_records" :key="index">
253
                                             <tr v-for="(monitor_record, index) in record.monitor_records" :key="index">
253
                                                 <td>{{getTime(monitor_record.operate_time,'{h}:{i}')}}</td>
254
                                                 <td>{{getTime(monitor_record.operate_time,'{h}:{i}')}}</td>
254
                                                 <td>{{monitor_record.systolic_blood_pressure?monitor_record.systolic_blood_pressure:''}} / {{monitor_record.diastolic_blood_pressure?monitor_record.diastolic_blood_pressure:''}}</td>
255
                                                 <td>{{monitor_record.systolic_blood_pressure?monitor_record.systolic_blood_pressure:''}} / {{monitor_record.diastolic_blood_pressure?monitor_record.diastolic_blood_pressure:''}}</td>
460
                                                     <span>{{advice[1].advice_desc}}</span>
461
                                                     <span>{{advice[1].advice_desc}}</span>
461
                                                     <!-- <span v-if="advice[1].drug_spec">{{advice[1].drug_spec}}{{advice[1].drug_spec_unit}}</span> -->
462
                                                     <!-- <span v-if="advice[1].drug_spec">{{advice[1].drug_spec}}{{advice[1].drug_spec_unit}}</span> -->
462
                                                     <span v-if="advice[1].prescribing_number">* {{advice[1].prescribing_number}}{{advice[1].prescribing_number_unit}}</span>
463
                                                     <span v-if="advice[1].prescribing_number">* {{advice[1].prescribing_number}}{{advice[1].prescribing_number_unit}}</span>
463
-                                                    <span v-if="advice[1].single_dose != 0">单次用量 {{advice[1].single_dose}}{{advice[1].single_dose_unit}}</span>
464
+                                                    <span v-if="advice[1].single_dose ">单次用量 {{advice[1].single_dose}}{{advice[1].single_dose_unit}}</span>
464
                                                     <span>{{advice[1].delivery_way}}</span>
465
                                                     <span>{{advice[1].delivery_way}}</span>
465
                                                     <span>{{advice[1].execution_frequency}}</span>
466
                                                     <span>{{advice[1].execution_frequency}}</span>
466
                                                     <div v-for="(child, childindex) in advice[1].children" :key="childindex" class="advice-children">
467
                                                     <div v-for="(child, childindex) in advice[1].children" :key="childindex" class="advice-children">

+ 1 - 1
src/xt_pages/dialysis/dialysisPrintOrder.vue 查看文件

1023
         },
1023
         },
1024
         operatorMaps: {},
1024
         operatorMaps: {},
1025
         complications: ['低血压', '高血压', '心律失常', '头晕', '头痛', '呕吐', '抽搐', '出血', '心衰', '腹痛'],
1025
         complications: ['低血压', '高血压', '心律失常', '头晕', '头痛', '呕吐', '抽搐', '出血', '心衰', '腹痛'],
1026
-        jilurow: 10,
1026
+        jilurow: 0,
1027
         loading: false,
1027
         loading: false,
1028
         orgname: '',
1028
         orgname: '',
1029
         patientInfo_gender_1: false,
1029
         patientInfo_gender_1: false,

+ 527 - 0
src/xt_pages/qcd/outcomeIndicators/control.vue 查看文件

1
+<template>
2
+  <div class="app-container">
3
+    <el-tabs v-model="tabActiveName" @tab-click="handleTabClick">
4
+        <el-tab-pane label="指标控制" name="control"></el-tab-pane>
5
+        <el-tab-pane label="指标查询" name="query"></el-tab-pane>
6
+    </el-tabs>
7
+
8
+    <div class="cell">
9
+      <label class="title">
10
+        <span class="name">日期查询</span> :
11
+      </label>
12
+      <el-date-picker
13
+        v-model="listQuery.start_time"
14
+        prefix-icon="el-icon-date"
15
+        @change="changeTime"
16
+        :editable="false"
17
+        style="width: 196px;"
18
+        type="date"
19
+        placeholder="选择日期时间"
20
+        align="right"
21
+        :picker-options="pickerOptions"
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
+        :picker-options="pickerOptions"
36
+        format="yyyy-MM-dd"
37
+        value-format="yyyy-MM-dd"
38
+      ></el-date-picker>
39
+    </div>
40
+    <div class="cell clearfix">
41
+      <label class="title">
42
+        <span class="name">透析龄</span> :
43
+      </label>
44
+      <div class="time">
45
+        <ul class>
46
+          <li
47
+            :class="item.value==dialysisAge?'active':''"
48
+            @click="selectdialysisAges(item.value)"
49
+            v-for="item in dialysisAgeOptions"
50
+            :key="item.value"
51
+          >{{item.label}}</li>
52
+        </ul>
53
+      </div>
54
+    </div>
55
+    <div class="cell clearfix">
56
+      <label class="title">
57
+        <span class="name">转归状态</span> :
58
+      </label>
59
+      <div class="time">
60
+        <ul class>
61
+          <li
62
+            :class="item.lapseto==lapsetoType?'active':''"
63
+            @click="selectLapseTo( item.lapseto)"
64
+            v-for="item in lapsetoState"
65
+            :key="item.value"
66
+          >{{item.label}}</li>
67
+        </ul>
68
+      </div>
69
+    </div>
70
+
71
+    <div class="cell">
72
+      <label class="title">
73
+        <span class="name">检验项目</span> :
74
+      </label>
75
+      <el-select v-model="listQuery.project_id" placeholder="请选择" @change="changeModel()">
76
+        <el-option label="全部" value=""></el-option>
77
+        <el-option v-for="item in projectOptions" :key="item.project_id" :label="item.project_name" :value="item.project_id"></el-option>
78
+      </el-select>
79
+      &nbsp;&nbsp;&nbsp;&nbsp;
80
+      <label class="title">
81
+        <span class="name">监测指标</span> :
82
+      </label>
83
+      <el-select v-model="listQuery.item_id" placeholder="请选择" @change="changeItem()">
84
+        <el-option label="全部" value=""></el-option>
85
+        <el-option v-for="item in itemOptions" :key="item.id" :label="item.item_name" :value="item.id"></el-option>
86
+      </el-select>
87
+    </div>
88
+
89
+    <h4 class="hui">统计图</h4>
90
+    <hr class="huixiao">
91
+    <el-row :gutter="32">
92
+      <el-col :xs="24" :sm="24" :lg="24">
93
+        <div class="chart-wrapper">
94
+            <pie-chart title="指标控制" :options="CompletionOptions"/>
95
+        </div>
96
+      </el-col>
97
+    </el-row>
98
+
99
+    <h4 class="hui">统计表</h4>
100
+    <hr class="huixiao">
101
+    <el-table
102
+      ref="multipleTable"
103
+      :data="tableData"
104
+      id="oictable"
105
+      border
106
+      fit
107
+      highlight-current-row
108
+      style="width: 100%;margin-top: 10px;"
109
+    >
110
+      
111
+      <el-table-column fixed label="透析号" width="80" property="patient_id" align="center">
112
+        <template slot-scope="scope"><span>{{getPatientDialysisNo(scope.row.patient_id)}}</span></template>
113
+      </el-table-column>
114
+      <el-table-column fixed label="姓名" width="100" property="patient_id" align="center">
115
+        <template slot-scope="scope"><span>{{getPatientName(scope.row.patient_id)}}</span></template>
116
+      </el-table-column>
117
+      <el-table-column fixed label="检查日期" width="100" property="inspect_date" align="center">
118
+        <template slot-scope="scope"><span>{{getTime(scope.row.inspect_date, '{y}{m}{d}')}}</span></template>
119
+      </el-table-column>
120
+      
121
+      <el-table-column :label="reference.item_name+'//'+reference.unit" min-width="120" align="center" v-if="showTableColumn(reference)" v-for="(reference, index) in references" :key="index"  :render-header="renderheader">
122
+        <template slot-scope="scope"><span>{{getItemVulue(reference.project_id, reference.id, scope.row)}}</span></template>
123
+      </el-table-column>
124
+    </el-table>
125
+
126
+    <!-- <pagi-nation title="分页"></pagi-nation> -->
127
+
128
+    <el-pagination
129
+      @size-change="handleSizeChange"
130
+      @current-change="handleCurrentChange"
131
+      :current-page="listQuery.pate"
132
+      :page-sizes="[10, 20, 50, 100]"
133
+      :page-size="10"
134
+      background
135
+      style="margin-top:20px;"
136
+      layout="total, sizes, prev, pager, next, jumper"
137
+      :total="total"
138
+    ></el-pagination>
139
+  </div>
140
+</template>
141
+
142
+
143
+<script>
144
+import { GetOICData  } from "@/api/qcd";
145
+import PieChart from '../components/PieChart'
146
+import {uParseTime} from "@/utils/tools";
147
+export default {
148
+  name: "dialysisTotal",
149
+  data() {
150
+    return {
151
+      tabActiveName:'control',
152
+      total: 0,
153
+      projectOptions:{},
154
+      itemOptions:[],
155
+      patientMap:{},
156
+        CompletionOptions:{
157
+            legend:[],
158
+            series:[],
159
+        },
160
+      listQuery: {
161
+        start_time: "",
162
+        end_time: "",
163
+        page: 1,
164
+        limit: 10,
165
+        lapseto: 0,
166
+        project_id:'',
167
+        item_id:'',
168
+        dialysis_age:0,
169
+      },
170
+      tableData: [],
171
+      references:[],
172
+      lapsetoType: 0,
173
+      lapsetoState: [
174
+        { value: 0, label: "全部", source: 0, lapseto: 0 },
175
+        { value: 1, label: "转出", source: 0, lapseto: 2 },
176
+        { value: 2, label: "留治", source: 0, lapseto: 1 }
177
+      ],
178
+      dialysisAge: 0,
179
+      dialysisAgeOptions: [
180
+        { value: 0, label: "全部" },
181
+        { value: 1, label: "大于三个月" },
182
+        { value: 2, label: "小于三个月" }
183
+      ],
184
+      pickerOptions: {
185
+        shortcuts: [
186
+          {
187
+            text: "今天",
188
+            onClick(picker) {
189
+              picker.$emit("pick", new Date());
190
+            }
191
+          },
192
+          {
193
+            text: "昨天",
194
+            onClick(picker) {
195
+              const date = new Date();
196
+              date.setTime(date.getTime() - 3600 * 1000 * 24);
197
+              picker.$emit("pick", date);
198
+            }
199
+          },
200
+          {
201
+            text: "一周前",
202
+            onClick(picker) {
203
+              const date = new Date();
204
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
205
+              picker.$emit("pick", date);
206
+            }
207
+          },
208
+          {
209
+            text: "清空",
210
+            onClick(picker) {
211
+              picker.$emit("pick");
212
+            }
213
+          }
214
+        ]
215
+      }
216
+    };
217
+  },
218
+  created() {
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
+      GetOICData(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 unfinishedcount = response.data.data.unfinishedcount;
252
+          var finishedcount = this.total - unfinishedcount;
253
+          this.CompletionOptions = {
254
+            legend:[],
255
+            series:[],
256
+          };
257
+          this.CompletionOptions.legend.push('达标人次');
258
+          this.CompletionOptions.series.push({
259
+                value:finishedcount,name:'达标人次'
260
+            });
261
+          this.CompletionOptions.legend.push('未达标人次');
262
+          this.CompletionOptions.series.push({
263
+                value:unfinishedcount,name:'未达标人次'
264
+            });
265
+
266
+          
267
+        
268
+          var references = response.data.data.references;
269
+          this.references = response.data.data.references;
270
+          this.projectOptions = {};
271
+          for (const index in references) {
272
+            if (!(references[index].project_id in this.projectOptions)) {
273
+              this.$set(this.projectOptions, references[index].project_id, {project_id:references[index].project_id, project_name:references[index].project_name}); 
274
+            }
275
+            if (!('children' in this.projectOptions[references[index].project_id])) {
276
+                this.projectOptions[references[index].project_id]['children'] = [];
277
+            }
278
+            this.projectOptions[references[index].project_id]['children'].push(references[index]);
279
+          }
280
+
281
+          var patients = response.data.data.patients;
282
+          for (const index in patients) {
283
+            if (patients[index].id in this.patientMap) {
284
+              continue;  
285
+            }
286
+            this.$set(this.patientMap, patients[index].id, patients[index]);
287
+          }
288
+
289
+          var temInspections = {};
290
+          var inspections = response.data.data.inspections;
291
+          
292
+          for (const index in inspections) {
293
+            var key = inspections[index].inspect_date + '_' + inspections[index].patient_id;
294
+            if (!(key in temInspections)) {
295
+              temInspections[key] = {patient_id:inspections[index].patient_id, inspect_date:inspections[index].inspect_date, items:{}};
296
+            }
297
+            var itemKey = inspections[index].project_id + '_' + inspections[index].item_id;
298
+            
299
+            temInspections[key].items[itemKey] = inspections[index];
300
+          }
301
+          for (const key in temInspections) {
302
+              this.tableData.push(temInspections[key]);
303
+          }
304
+        }
305
+      });
306
+    },
307
+    changeTime() {
308
+      this.getList();
309
+    },
310
+    selectLapseTo(lapseto) {
311
+      this.lapsetoType = lapseto;
312
+      this.listQuery.lapseto = lapseto;
313
+      this.getList();
314
+    },
315
+    selectdialysisAges(type) {
316
+      this.dialysisAge = type;
317
+      this.listQuery.dialysis_age = type;
318
+      this.getList();
319
+    },
320
+    changeModel() {
321
+        this.listQuery.item_id = '';
322
+        if(this.listQuery.project_id == '') {
323
+            this.itemOptions = [];
324
+        }else {
325
+            this.itemOptions = this.projectOptions[this.listQuery.project_id].children;
326
+        }
327
+        
328
+      this.getList();
329
+    },
330
+    changeItem() {
331
+      this.getList();
332
+    },
333
+    
334
+    handleSizeChange(val) {
335
+      this.listQuery.limit = val;
336
+      this.getList();
337
+    },
338
+    handleCurrentChange(val) {
339
+      this.listQuery.page = val;
340
+      this.getList();
341
+    },
342
+    getTime(value, temp) {
343
+        if (value != undefined) {
344
+          return uParseTime(value, temp)
345
+        }
346
+        return ""
347
+    },
348
+    getProjectName(id) {
349
+      return (id in this.projectOptions) ? this.projectOptions[id].project_name:'';
350
+    },
351
+    getPatientName(id) {
352
+      return (id in this.patientMap) ? this.patientMap[id].name:'';
353
+    },
354
+    getPatientDialysisNo(id) {
355
+      return (id in this.patientMap) ? this.patientMap[id].dialysis_no:'';
356
+    },
357
+    getItemVulue(project_id, item_id, row) {
358
+        var key = project_id + '_' + item_id;
359
+        return (typeof(row.items) !== 'undefined' && (key in row.items)) ? row.items[key].inspect_value:'';
360
+    },
361
+    showTableColumn(reference) {
362
+        if(this.listQuery.project_id == '') {
363
+            return true;
364
+        }else if (this.listQuery.item_id == '') {
365
+            if(reference.project_id == this.listQuery.project_id) {
366
+                return true;
367
+            } else {
368
+                return false;
369
+            }
370
+        }else {
371
+            if (reference.id == this.listQuery.item_id) {
372
+                return true;
373
+            }else {
374
+                return false;
375
+            }
376
+        }
377
+    },
378
+    renderheader(h, { column, $index }) {
379
+        return h('span', {}, [
380
+            h('span', {}, column.label.split('//')[0]),
381
+            h('br'),
382
+            h('span', {}, column.label.split('//')[1])
383
+        ])
384
+    },
385
+    handleTabClick(tab, event) {
386
+        if (this.tabActiveName == 'query') {
387
+            this.$router.push({ path: "/qcd/outcomeIndicators/query" });
388
+        }
389
+
390
+    }
391
+  },
392
+  components: {
393
+      PieChart
394
+  }
395
+};
396
+</script>
397
+<style>
398
+#oictable ::-webkit-scrollbar {
399
+  height: 15px;
400
+}
401
+</style>
402
+
403
+
404
+<style rel="stylesheet/scss" lang="scss" scoped>
405
+.app-container {
406
+//   margin: 20px;
407
+    margin-bottom: 50px;
408
+  font-size: 15px;
409
+  .filter-container {
410
+    padding-bottom: 5px;
411
+  }
412
+  .hui {
413
+    color: #909399;
414
+    margin-bottom: 5px;
415
+  }
416
+  .huixiao {
417
+    border: solid 1px #ebeef5;
418
+  }
419
+  .el-pagination {
420
+    float: right !important;
421
+  }
422
+  .search-component {
423
+    width: 500px;
424
+    .searchBox {
425
+      width: 300px;
426
+      height: 36px;
427
+      line-height: 36px;
428
+      padding-left: 15px;
429
+      border: 1px #dcdfe6 solid;
430
+      border-right: none;
431
+      outline: none;
432
+      float: left;
433
+      border-radius: 6px 0 0 6px;
434
+      font-size: 14px;
435
+      color: #333;
436
+      background: #fff;
437
+      box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
438
+    }
439
+    .searchBtn {
440
+      background-color: #409eff;
441
+      color: #fff;
442
+      font-size: 15px;
443
+      text-align: center;
444
+      height: 36px;
445
+      line-height: 36px;
446
+      float: left;
447
+      outline: none;
448
+      width: 70px;
449
+      border: none;
450
+      border-radius: 0 6px 6px 0;
451
+      font-family: "Microsoft Yahei";
452
+      cursor: pointer;
453
+    }
454
+  }
455
+  .cell {
456
+    margin: 0px 0 15px 0;
457
+    -moz-box-sizing: border-box;
458
+    -webkit-box-sizing: border-box;
459
+    -o-box-sizing: border-box;
460
+    -ms-box-sizing: border-box;
461
+    box-sizing: border-box;
462
+    display: -webkit-box;
463
+    display: -ms-flexbox;
464
+    // display: flex;
465
+    -webkit-box-align: flex-start;
466
+    -ms-flex-align: flex-start;
467
+    align-items: flex-start;
468
+    text-align: left;
469
+    justify-content: flex-start;
470
+    color: #333;
471
+    .title {
472
+      width: 80px;
473
+      display: inline-block;
474
+      font-weight: normal;
475
+      color: #909399;
476
+      padding: 6px 0;
477
+      font-weight: 700;
478
+      .name {
479
+        width: 60px;
480
+        text-align: justify;
481
+        text-justify: distribute-all-lines;
482
+        text-align-last: justify;
483
+        -moz-text-align-last: justify;
484
+        -webkit-text-align-last: justify;
485
+        display: inline-block;
486
+      }
487
+    }
488
+    .time {
489
+      -webkit-box-flex: 1;
490
+      -ms-flex: 1;
491
+      flex: 1;
492
+      ul {
493
+        padding: 0;
494
+        margin: 0;
495
+        li {
496
+          float: left;
497
+          list-style: none;
498
+          cursor: pointer;
499
+          padding: 6px 10px;
500
+          color: #606266;
501
+          border-radius: 4px;
502
+          margin: 0 4px 0 0;
503
+          &:hover {
504
+            background: #409eff;
505
+            color: #fff;
506
+          }
507
+        }
508
+        .active {
509
+          background: #409eff;
510
+          color: #fff;
511
+        }
512
+      }
513
+    }
514
+  }
515
+  .amount {
516
+    font-weight: normal;
517
+    padding: 10px 0 0 0;
518
+    color: #606266;
519
+    font-size: 14px;
520
+    span {
521
+      color: #ef2525;
522
+      font-family: "Arial";
523
+      padding: 0 2px;
524
+    }
525
+  }
526
+}
527
+</style>

+ 3 - 0
src/xt_pages/qcd/outcomeIndicators/parent.vue 查看文件

1
+<template>
2
+    <router-view />
3
+</template>

+ 454 - 0
src/xt_pages/qcd/outcomeIndicators/query.vue 查看文件

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

+ 32 - 0
src/xt_pages/qcd/patientAnalysis/components/analysisNav.vue 查看文件

1
+<template>
2
+    <el-tabs v-model="tabActiveName" @tab-click="handleTabClick">
3
+        <el-tab-pane label="总量分析" name="total"></el-tab-pane>
4
+        <el-tab-pane label="指标查询" name="query"></el-tab-pane>
5
+    </el-tabs>
6
+</template>
7
+<script>
8
+export default {
9
+    props:{
10
+        activeName:{
11
+            type:String,
12
+            default: 'total'
13
+        }
14
+    },
15
+    data(){
16
+        return{
17
+            tabActiveName:'total',
18
+        }
19
+    }, 
20
+    methods:{
21
+        handleTabClick(tab, event) {
22
+            this.$router.push({ path: "/qcd/patientanalysis/"+this.tabActiveName });
23
+        }
24
+    },
25
+    watch:{
26
+        'activeName':function(){
27
+            this.tabActiveName = this.activeName;
28
+        }
29
+    }
30
+}
31
+</script>
32
+

+ 3 - 0
src/xt_pages/qcd/patientAnalysis/parent.vue 查看文件

1
+<template>
2
+    <router-view />
3
+</template>

+ 460 - 0
src/xt_pages/qcd/patientAnalysis/total.vue 查看文件

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

+ 437 - 0
src/xt_pages/qcd/processIndicators.1.vue 查看文件

1
+<template>
2
+  <div class="app-container">
3
+    <div class="cell">
4
+      <label class="title">
5
+        <span class="name">日期查询</span> :
6
+      </label>
7
+      <el-date-picker
8
+        v-model="listQuery.start_time"
9
+        prefix-icon="el-icon-date"
10
+        @change="changeTime"
11
+        :editable="false"
12
+        style="width: 196px;"
13
+        type="date"
14
+        placeholder="选择日期时间"
15
+        align="right"
16
+        :picker-options="pickerOptions"
17
+        format="yyyy-MM-dd"
18
+        value-format="yyyy-MM-dd"
19
+      ></el-date-picker>
20
+      <span class>-</span>
21
+      <el-date-picker
22
+        v-model="listQuery.end_time"
23
+        prefix-icon="el-icon-date"
24
+        @change="changeTime"
25
+        :editable="false"
26
+        style="width: 196px;"
27
+        type="date"
28
+        placeholder="选择日期时间"
29
+        align="right"
30
+        :picker-options="pickerOptions"
31
+        format="yyyy-MM-dd"
32
+        value-format="yyyy-MM-dd"
33
+      ></el-date-picker>
34
+    </div>
35
+    <div class="cell clearfix">
36
+      <label class="title">
37
+        <span class="name">透析龄</span> :
38
+      </label>
39
+      <div class="time">
40
+        <ul class>
41
+          <li
42
+            :class="item.value==dialysisAge?'active':''"
43
+            @click="selectdialysisAges(item.value)"
44
+            v-for="item in dialysisAgeOptions"
45
+            :key="item.value"
46
+          >{{item.label}}</li>
47
+        </ul>
48
+      </div>
49
+    </div>
50
+    <div class="cell clearfix">
51
+      <label class="title">
52
+        <span class="name">转归状态</span> :
53
+      </label>
54
+      <div class="time">
55
+        <ul class>
56
+          <li
57
+            :class="item.lapseto==lapsetoType?'active':''"
58
+            @click="selectLapseTo( item.lapseto)"
59
+            v-for="item in lapsetoState"
60
+            :key="item.value"
61
+          >{{item.label}}</li>
62
+        </ul>
63
+      </div>
64
+    </div>
65
+
66
+    <div class="cell">
67
+      <label class="title">
68
+        <span class="name">检验项目</span> :
69
+      </label>
70
+      <el-select v-model="listQuery.project_id" placeholder="请选择" @change="changeModel()">
71
+        <el-option label="全部" value=""></el-option>
72
+        <el-option v-for="item in projectOptions" :key="item.project_id" :label="item.project_name" :value="item.project_id"></el-option>
73
+      </el-select>
74
+    </div>
75
+
76
+    <h4 class="hui">统计表</h4>
77
+    <hr class="huixiao">
78
+    <el-table
79
+      ref="multipleTable"
80
+      :data="tableData"
81
+      :span-method="mergeSpan"
82
+      border
83
+      fit
84
+      highlight-current-row
85
+      style="width: 100%;margin-top: 10px;"
86
+    >
87
+      <el-table-column label="透析号" min-width="80" property="patient_id" align="center">
88
+         <template slot-scope="scope">{{getPatientDialysisNo(scope.row.patient_id)}}</template>
89
+      </el-table-column>
90
+      <el-table-column label="姓名" min-width="80" property="patient_id" align="center">
91
+         <template slot-scope="scope">{{getPatientName(scope.row.patient_id)}}</template>
92
+      </el-table-column>
93
+      <el-table-column label="检查项目" min-width="80" property="project_id" align="center">
94
+         <template slot-scope="scope">{{getProjectName(scope.row.project_id)}}</template>
95
+      </el-table-column>
96
+      <el-table-column label="检查日期" min-width="80" property="inspect_date" align="center">
97
+        <template slot-scope="scope">{{getTime(scope.row.inspect_date, '{y}{m}{d}')}}</template>
98
+      </el-table-column>
99
+    </el-table>
100
+
101
+    <el-pagination
102
+      @size-change="handleSizeChange"
103
+      @current-change="handleCurrentChange"
104
+      :current-page="listQuery.pate"
105
+      :page-sizes="[10, 20, 50, 100]"
106
+      :page-size="10"
107
+      background
108
+      style="margin-top:20px;"
109
+      layout="total, sizes, prev, pager, next, jumper"
110
+      :total="total"
111
+    ></el-pagination>
112
+  </div>
113
+</template>
114
+
115
+
116
+<script>
117
+import { GetProcessIndicatorsData } from "@/api/qcd";
118
+import {uParseTime} from "@/utils/tools";
119
+export default {
120
+  name: "processIndicators",
121
+  data() {
122
+    return {
123
+      total: 0,
124
+      modesData: {
125
+        xAxis:[],
126
+        series:[],
127
+      },
128
+      listQuery: {
129
+        start_time: "",
130
+        end_time: "",
131
+        page: 1,
132
+        limit: 10,
133
+        lapseto: 0,
134
+        dialysis_age: 0,
135
+        project_id:0,
136
+      },
137
+      projectOptions: {},
138
+      patientMap:{},
139
+      tableData: [],
140
+      tableRowData:[],
141
+      dialysisAge: 0,
142
+      dialysisAgeOptions: [
143
+        { value: 0, label: "全部" },
144
+        { value: 1, label: "大于三个月" },
145
+        { value: 2, label: "小于三个月" }
146
+      ],
147
+      lapsetoType: 0,
148
+      lapsetoState: [
149
+        { value: 0, label: "全部", source: 0, lapseto: 0 },
150
+        { value: 1, label: "转出", source: 0, lapseto: 2 },
151
+        { value: 2, label: "留治", source: 0, lapseto: 1 }
152
+      ],
153
+      pickerOptions: {
154
+        shortcuts: [
155
+          {
156
+            text: "今天",
157
+            onClick(picker) {
158
+              picker.$emit("pick", new Date());
159
+            }
160
+          },
161
+          {
162
+            text: "昨天",
163
+            onClick(picker) {
164
+              const date = new Date();
165
+              date.setTime(date.getTime() - 3600 * 1000 * 24);
166
+              picker.$emit("pick", date);
167
+            }
168
+          },
169
+          {
170
+            text: "一周前",
171
+            onClick(picker) {
172
+              const date = new Date();
173
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
174
+              picker.$emit("pick", date);
175
+            }
176
+          },
177
+          {
178
+            text: "清空",
179
+            onClick(picker) {
180
+              picker.$emit("pick");
181
+            }
182
+          }
183
+        ]
184
+      }
185
+    };
186
+  },
187
+  created() {
188
+    var nowDate = new Date();
189
+    var nowYear = nowDate.getFullYear();
190
+    var nowMonth = nowDate.getMonth() + 1;
191
+    var nowDay = nowDate.getDate();
192
+    this.listQuery.end_time = nowYear + "-" + (nowMonth < 10 ? "0" + nowMonth : nowMonth) + "-" + (nowDay < 10 ? "0" + nowDay : nowDay);
193
+    nowDate.setMonth(nowDate.getMonth() - 3);
194
+    nowYear = nowDate.getFullYear();
195
+    nowMonth = nowDate.getMonth() + 1;
196
+    nowDay = nowDate.getDate();
197
+    this.listQuery.start_time =  nowYear + "-" + (nowMonth < 10 ? "0" + nowMonth : nowMonth) + "-" + (nowDay < 10 ? "0" + nowDay : nowDay);
198
+    this.getList();
199
+  },
200
+  methods: {
201
+    getList() {
202
+      GetProcessIndicatorsData(this.listQuery).then(response => {
203
+        if (response.data.state == 0) {
204
+          this.$message.error(response.data.msg);
205
+          return false;
206
+        } else {
207
+          
208
+          this.tableData = [];
209
+          this.tableRowData = []
210
+
211
+
212
+          var references = response.data.data.references;
213
+          for (const index in references) {
214
+            if (references[index].project_id in this.projectOptions) {
215
+              continue;  
216
+            }
217
+            this.$set(this.projectOptions, references[index].project_id, references[index]);
218
+          }
219
+
220
+          var patients = response.data.data.patients;
221
+          for (const index in patients) {
222
+            if (patients[index].id in this.patientMap) {
223
+              continue;  
224
+            }
225
+            this.$set(this.patientMap, patients[index].id, patients[index]);
226
+          }
227
+
228
+          //
229
+          var temInspections = {};
230
+          var inspections = response.data.data.inspections;
231
+          for (const index in inspections) {
232
+            var key = inspections[index].inspect_date + '_' + inspections[index].patient_id;
233
+            if (!(key in temInspections)) {
234
+              temInspections[key] = {};
235
+            }
236
+            if (inspections[index].project_id in temInspections[key]) {
237
+              continue;
238
+            }
239
+            temInspections[key][inspections[index].project_id] = inspections[index];
240
+          }
241
+          this.total = response.data.data.total;
242
+          var rowIndex = 0;
243
+          var childIndex = 0;
244
+          for (const key in temInspections) {
245
+            this.tableRowData.push(1);
246
+            var parentIndex = rowIndex;
247
+            childIndex = 0;
248
+            for (const child in temInspections[key]) {
249
+              this.tableData.push(temInspections[key][child]);
250
+              if(childIndex>0) {
251
+                this.tableRowData[parentIndex] += 1;
252
+                this.tableRowData.push(0);
253
+              }
254
+              childIndex++;
255
+              rowIndex++;
256
+            }
257
+          }
258
+        }
259
+      });
260
+    },
261
+    mergeSpan({row, column, rowIndex, columnIndex}) {
262
+      if (columnIndex === 0 || columnIndex === 1 || columnIndex === 3) {
263
+        const _row = this.tableRowData[rowIndex];
264
+        const _col = _row > 0 ? 1 : 0;
265
+        return {
266
+          rowspan: _row,
267
+          colspan: _col
268
+        }
269
+      }
270
+    },
271
+    changeTime() {
272
+      this.getList();
273
+    },
274
+    selectdialysisAges(type) {
275
+      this.dialysisAge = type;
276
+      this.listQuery.dialysis_age = type;
277
+      this.getList();
278
+    },
279
+    selectLapseTo(lapseto) {
280
+      this.lapsetoType = lapseto;
281
+      this.listQuery.lapseto = lapseto;
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
+    getTime(value, temp) {
296
+        if (value != undefined) {
297
+          return uParseTime(value, temp)
298
+        }
299
+        return ""
300
+    },
301
+    getProjectName(id) {
302
+      return (id in this.projectOptions) ? this.projectOptions[id].project_name:'';
303
+    },
304
+    getPatientName(id) {
305
+      return (id in this.patientMap) ? this.patientMap[id].name:'';
306
+    },
307
+    getPatientDialysisNo(id) {
308
+      return (id in this.patientMap) ? this.patientMap[id].dialysis_no:'';
309
+    }
310
+  }
311
+};
312
+</script>
313
+
314
+<style rel="stylesheet/scss" lang="scss" scoped>
315
+.app-container {
316
+//   margin: 20px;
317
+    margin-bottom: 50px;
318
+  font-size: 15px;
319
+  .filter-container {
320
+    padding-bottom: 5px;
321
+  }
322
+  .hui {
323
+    color: #909399;
324
+    margin-bottom: 5px;
325
+  }
326
+  .huixiao {
327
+    border: solid 1px #ebeef5;
328
+  }
329
+  .el-pagination {
330
+    float: right !important;
331
+  }
332
+  .search-component {
333
+    width: 500px;
334
+    .searchBox {
335
+      width: 300px;
336
+      height: 36px;
337
+      line-height: 36px;
338
+      padding-left: 15px;
339
+      border: 1px #dcdfe6 solid;
340
+      border-right: none;
341
+      outline: none;
342
+      float: left;
343
+      border-radius: 6px 0 0 6px;
344
+      font-size: 14px;
345
+      color: #333;
346
+      background: #fff;
347
+      box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
348
+    }
349
+    .searchBtn {
350
+      background-color: #409eff;
351
+      color: #fff;
352
+      font-size: 15px;
353
+      text-align: center;
354
+      height: 36px;
355
+      line-height: 36px;
356
+      float: left;
357
+      outline: none;
358
+      width: 70px;
359
+      border: none;
360
+      border-radius: 0 6px 6px 0;
361
+      font-family: "Microsoft Yahei";
362
+      cursor: pointer;
363
+    }
364
+  }
365
+  .cell {
366
+    margin: 0px 0 15px 0;
367
+    -moz-box-sizing: border-box;
368
+    -webkit-box-sizing: border-box;
369
+    -o-box-sizing: border-box;
370
+    -ms-box-sizing: border-box;
371
+    box-sizing: border-box;
372
+    display: -webkit-box;
373
+    display: -ms-flexbox;
374
+    // display: flex;
375
+    -webkit-box-align: flex-start;
376
+    -ms-flex-align: flex-start;
377
+    align-items: flex-start;
378
+    text-align: left;
379
+    justify-content: flex-start;
380
+    color: #333;
381
+    .title {
382
+      width: 80px;
383
+      display: inline-block;
384
+      font-weight: normal;
385
+      color: #909399;
386
+      padding: 6px 0;
387
+      font-weight: 700;
388
+      .name {
389
+        width: 60px;
390
+        text-align: justify;
391
+        text-justify: distribute-all-lines;
392
+        text-align-last: justify;
393
+        -moz-text-align-last: justify;
394
+        -webkit-text-align-last: justify;
395
+        display: inline-block;
396
+      }
397
+    }
398
+    .time {
399
+      -webkit-box-flex: 1;
400
+      -ms-flex: 1;
401
+      flex: 1;
402
+      ul {
403
+        padding: 0;
404
+        margin: 0;
405
+        li {
406
+          float: left;
407
+          list-style: none;
408
+          cursor: pointer;
409
+          padding: 6px 10px;
410
+          color: #606266;
411
+          border-radius: 4px;
412
+          margin: 0 4px 0 0;
413
+          &:hover {
414
+            background: #409eff;
415
+            color: #fff;
416
+          }
417
+        }
418
+        .active {
419
+          background: #409eff;
420
+          color: #fff;
421
+        }
422
+      }
423
+    }
424
+  }
425
+  .amount {
426
+    font-weight: normal;
427
+    padding: 10px 0 0 0;
428
+    color: #606266;
429
+    font-size: 14px;
430
+    span {
431
+      color: #ef2525;
432
+      font-family: "Arial";
433
+      padding: 0 2px;
434
+    }
435
+  }
436
+}
437
+</style>