Przeglądaj źródła

Merge branch 'vue_statistics_branch' of http://git.shengws.com/csx/Vue_New into vue_statistics_branch

XMLWAN 5 lat temu
rodzic
commit
86cda5d70c

+ 8 - 0
src/api/common/statistics.js Wyświetl plik

210
 
210
 
211
 
211
 
212
 
212
 
213
+export function GetDefaultPatient() {
214
+  return request({
215
+    url: '/api/defalutpatient/get',
216
+    method: 'get',
217
+
218
+  })
219
+}
220
+
213
 
221
 
214
 
222
 
215
 
223
 

+ 1 - 1
src/router/modules/qcd.js Wyświetl plik

224
       name: 'weightDetails',
224
       name: 'weightDetails',
225
       meta: {
225
       meta: {
226
         title: '指标评估体重详情',
226
         title: '指标评估体重详情',
227
-        noCache: true
227
+
228
       }
228
       }
229
     },
229
     },
230
     {
230
     {

+ 2 - 3
src/xt_pages/qcd/indicatorControlAnalysis/analysis.vue Wyświetl plik

7
       <div class="page_analysis">
7
       <div class="page_analysis">
8
         <new-nav activeName="analysis"></new-nav>
8
         <new-nav activeName="analysis"></new-nav>
9
         <div class="cell clearfix">
9
         <div class="cell clearfix">
10
-          <label class="title">
11
-            <span class="name">转归状态</span> :
12
-          </label>
10
+          <!--<label class="title">-->
11
+          <!--</label>-->
13
           <div class="time">
12
           <div class="time">
14
             <ul class>
13
             <ul class>
15
               <li
14
               <li

+ 22 - 4
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressure.vue Wyświetl plik

69
         <el-container>
69
         <el-container>
70
           <div style="width:150px">
70
           <div style="width:150px">
71
             <div class="tableTitle">患者列表</div>
71
             <div class="tableTitle">患者列表</div>
72
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
72
+            <el-table :data="patientsData" ref="table" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
                       highlight-current-row
74
                       highlight-current-row
75
                       @current-change="handleChange">
75
                       @current-change="handleChange">
175
   import { getCurrentOrgPatients } from "@/api/common/common";
175
   import { getCurrentOrgPatients } from "@/api/common/common";
176
 
176
 
177
 
177
 
178
-  import {GetDialysisBloodPressureChartData,GetDialysisBloodPressureTableData} from "@/api/common/statistics"
178
+  import {GetDialysisBloodPressureChartData,GetDialysisBloodPressureTableData,GetDefalutPatient} from "@/api/common/statistics"
179
 
179
 
180
   import {
180
   import {
181
     PostSearch
181
     PostSearch
203
         ],
203
         ],
204
         loading: false,
204
         loading: false,
205
         search_value: '',
205
         search_value: '',
206
-        total: '',
206
+        total: 0,
207
         query: {
207
         query: {
208
           patient_id: '',
208
           patient_id: '',
209
           statistics_type: 1,
209
           statistics_type: 1,
458
               for (let i = 0; i < resp.data.data.length; i++) {
458
               for (let i = 0; i < resp.data.data.length; i++) {
459
                 this.tableData.push(resp.data.data[i])
459
                 this.tableData.push(resp.data.data[i])
460
               }
460
               }
461
+              this.total = resp.data.total
461
             } else {
462
             } else {
462
               this.loading = false
463
               this.loading = false
463
             }
464
             }
488
         this.query.page = 1
489
         this.query.page = 1
489
         this.GetDialysisBloodPressureChartData(this.query)
490
         this.GetDialysisBloodPressureChartData(this.query)
490
         this.GetDialysisBloodPressureTableData(this.query)
491
         this.GetDialysisBloodPressureTableData(this.query)
492
+        for (let i = 0;i < this.patientsData.length; i++){
493
+          if (this.patientsData[i].id == val.id){
494
+            this.$refs.table.setCurrentRow(this.patientsData[i])
495
+          }
496
+        }
491
 
497
 
492
       },
498
       },
493
       querySearchAsync(keyword, cb) {
499
       querySearchAsync(keyword, cb) {
512
           if(response.data.state == 1){
518
           if(response.data.state == 1){
513
             var patients = response.data.data.patients
519
             var patients = response.data.data.patients
514
             this.patientsData = patients
520
             this.patientsData = patients
521
+            // this.GetDefaultPatient()
515
           }
522
           }
516
         })
523
         })
517
-      },
524
+      },GetDefaultPatient() {
525
+        GetDefalutPatient().then(response => {
526
+          if (response.data.state == 1) {
527
+            var patient = response.data.data.patient
528
+            for (let i = 0;i < this.patientsData.length; i++){
529
+              if (this.patientsData[i].id == patient.id){
530
+                this.$refs.table.setCurrentRow(this.patientsData[i])
531
+              }
532
+            }
533
+          }
534
+        })
535
+      }
518
     }, created() {
536
     }, created() {
519
       var date = new Date()
537
       var date = new Date()
520
       var year = date.getFullYear() //获取完整的年份(4位)
538
       var year = date.getFullYear() //获取完整的年份(4位)

+ 15 - 23
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails.vue Wyświetl plik

28
         <el-container>
28
         <el-container>
29
           <div style="width:150px">
29
           <div style="width:150px">
30
             <div class="tableTitle">患者列表</div>
30
             <div class="tableTitle">患者列表</div>
31
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
31
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
32
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
32
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
33
                       highlight-current-row
33
                       highlight-current-row
34
                       @current-change="handleChange">
34
                       @current-change="handleChange">
99
                   </template>
99
                   </template>
100
                 </el-table-column>
100
                 </el-table-column>
101
 
101
 
102
-                <el-table-column label="姓名" align="center">
103
-                  <template slot-scope="scope">
104
-                    {{scope.row.patient.name}}
105
-                  </template>
106
-                </el-table-column>
107
-
108
-                <el-table-column label="状态" align="center">
109
-                  <template slot-scope="scope">
110
-                    {{scope.row.patient.lapseto == 1 ? '留治':'转出'}}
111
-                  </template>
112
-                </el-table-column>
113
-
114
                 <el-table-column label="透前血压" align="center">
102
                 <el-table-column label="透前血压" align="center">
115
                   <template slot-scope="scope">
103
                   <template slot-scope="scope">
116
                     <div v-if="scope.row.before.systolic_blood_pressure">{{scope.row.before.systolic_blood_pressure}} / {{scope.row.before.diastolic_blood_pressure}}</div>
104
                     <div v-if="scope.row.before.systolic_blood_pressure">{{scope.row.before.systolic_blood_pressure}} / {{scope.row.before.diastolic_blood_pressure}}</div>
137
                   </template>
125
                   </template>
138
                 </el-table-column>
126
                 </el-table-column>
139
 
127
 
140
-                <el-table-column fixed="right" label="趋势" align="center">
141
-                  <template slot-scope="scope">
142
-                    <el-button
143
-                      @click.native.prevent="jumpDetail(scope.row.patient.id)"
144
-                      type="text"
145
-                      size="small"
146
-                    >详情</el-button>
147
-                  </template>
148
-                </el-table-column>
149
 
128
 
150
               </el-table>
129
               </el-table>
151
 
130
 
197
       ],
176
       ],
198
       loading: false,
177
       loading: false,
199
       search_value: '',
178
       search_value: '',
200
-      total: '',
179
+      total: 0,
201
       query: {
180
       query: {
202
         patient_id: '',
181
         patient_id: '',
203
         statistics_type: 1,
182
         statistics_type: 1,
298
             for (let i = 0; i < resp.data.data.length; i++) {
277
             for (let i = 0; i < resp.data.data.length; i++) {
299
               this.tableData.push(resp.data.data[i])
278
               this.tableData.push(resp.data.data[i])
300
             }
279
             }
280
+            this.total = resp.data.total
301
           } else {
281
           } else {
302
             this.loading = false
282
             this.loading = false
303
           }
283
           }
379
       this.GetDialysisPatientBloodPressureChartData(this.query)
359
       this.GetDialysisPatientBloodPressureChartData(this.query)
380
       this.GetDialysisBloodPressureTableData(this.query)
360
       this.GetDialysisBloodPressureTableData(this.query)
381
 
361
 
362
+      for (let i = 0;i < this.patientsData.length; i++){
363
+        if (this.patientsData[i].id == val.id){
364
+          this.$refs.table.setCurrentRow(this.patientsData[i])
365
+        }
366
+      }
367
+
382
     },  querySearchAsync(keyword, cb) {
368
     },  querySearchAsync(keyword, cb) {
383
       let key = ''
369
       let key = ''
384
       if (keyword != undefined) {
370
       if (keyword != undefined) {
398
         if(response.data.state == 1){
384
         if(response.data.state == 1){
399
           var patients = response.data.data.patients
385
           var patients = response.data.data.patients
400
           this.patientsData = patients
386
           this.patientsData = patients
387
+
388
+          for (let i = 0;i < this.patientsData.length; i++){
389
+            if (this.patientsData[i].id == this.query.patient_id){
390
+              this.$refs.table.setCurrentRow(this.patientsData[i])
391
+            }
392
+          }
401
         }
393
         }
402
       })
394
       })
403
     },
395
     },

+ 1 - 1
src/xt_pages/qcd/indicatorControlAnalysis/components/NewNav.vue Wyświetl plik

2
   <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" style="margin-bottom:10px">
2
   <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" style="margin-bottom:10px">
3
     <el-tab-pane label="化验指标统计" name="analysis"></el-tab-pane>
3
     <el-tab-pane label="化验指标统计" name="analysis"></el-tab-pane>
4
     <el-tab-pane label="透析过程指标统计" name="process"></el-tab-pane>
4
     <el-tab-pane label="透析过程指标统计" name="process"></el-tab-pane>
5
-    <el-tab-pane label="透析监测信息统计" name="monitor"></el-tab-pane>
5
+    <el-tab-pane label="透析监测指标统计" name="monitor"></el-tab-pane>
6
     <el-tab-pane label="患者血压统计" name="bloodPressure"></el-tab-pane>
6
     <el-tab-pane label="患者血压统计" name="bloodPressure"></el-tab-pane>
7
     <el-tab-pane label="患者体重统计" name="weight"></el-tab-pane>
7
     <el-tab-pane label="患者体重统计" name="weight"></el-tab-pane>
8
   </el-tabs>
8
   </el-tabs>

+ 25 - 1
src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue Wyświetl plik

92
 
92
 
93
         <el-table-column :label="item_name" align="center">
93
         <el-table-column :label="item_name" align="center">
94
           <template slot-scope="scope">
94
           <template slot-scope="scope">
95
-            {{scope.row.inspect_value}}
95
+            {{getValue(scope.row)}}
96
+
96
           </template>
97
           </template>
97
         </el-table-column>
98
         </el-table-column>
98
 
99
 
152
 
153
 
153
           }
154
           }
154
         },
155
         },
156
+        total:0,
155
         item_name: '',
157
         item_name: '',
156
         query: {
158
         query: {
157
           patient_id: '',
159
           patient_id: '',
241
       }
243
       }
242
     },
244
     },
243
     methods: {
245
     methods: {
246
+      getValue(row) {
247
+        if (this.query.range_type == 1 ) {
248
+          if(row.inspect_value != "") {
249
+            let min_range_value = this.range_value_columns[2]
250
+            let arr = min_range_value.split("~")
251
+            if (parseFloat(row.inspect_value) > arr[1]) {
252
+              return row.inspect_value + "↑"
253
+            } else if (parseFloat(row.inspect_value) < arr[0]) {
254
+              return row.inspect_value + "↓"
255
+            } else {
256
+              return row.inspect_value
257
+            }
258
+          }else{
259
+            return row.inspect_value
260
+          }
261
+
262
+        } else if (this.query.range_type == 2) {
263
+          return row.inspect_value
264
+        }
265
+      },
244
       getTimestamp(time) {
266
       getTimestamp(time) {
245
         // 把时间日期转成时间戳
267
         // 把时间日期转成时间戳
246
         return new Date(time).getTime() / 1000;
268
         return new Date(time).getTime() / 1000;
437
               for (let i = 0; i < resp.data.data.length; i++) {
459
               for (let i = 0; i < resp.data.data.length; i++) {
438
                 this.tableData.push(resp.data.data[i])
460
                 this.tableData.push(resp.data.data[i])
439
               }
461
               }
462
+              this.total = resp.data.total
463
+              console.log(this.total)
440
 
464
 
441
             } else {
465
             } else {
442
               this.$toast({
466
               this.$toast({

+ 40 - 24
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue Wyświetl plik

44
         ></el-option>
44
         ></el-option>
45
       </el-select>
45
       </el-select>
46
 
46
 
47
-      <el-select v-model="query.range_value" placeholder="请选择" style="width:120px;margin-right:20px"
48
-                 @change="changeRangeValue">
49
-        <el-option
50
-          v-for="item in range_value_columns"
51
-          :key="item"
52
-          :label="item"
53
-          :value="item"
54
-        ></el-option>
55
-      </el-select>
47
+      <!--<el-select v-model="query.range_value" placeholder="请选择" style="width:120px;margin-right:20px"-->
48
+                 <!--@change="changeRangeValue">-->
49
+        <!--<el-option-->
50
+          <!--v-for="item in range_value_columns"-->
51
+          <!--:key="item"-->
52
+          <!--:label="item"-->
53
+          <!--:value="item"-->
54
+        <!--&gt;</el-option>-->
55
+      <!--</el-select>-->
56
 
56
 
57
       <label class="title">
57
       <label class="title">
58
         <span class="name">日期查询</span> :
58
         <span class="name">日期查询</span> :
88
     <el-container>
88
     <el-container>
89
       <div style="width:150px">
89
       <div style="width:150px">
90
         <div class="tableTitle">患者列表</div>
90
         <div class="tableTitle">患者列表</div>
91
-        <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
91
+        <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
92
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
92
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
93
                   highlight-current-row
93
                   highlight-current-row
94
                   @current-change="handleChange">
94
                   @current-change="handleChange">
358
         this.GetPatientInspectionIndexBarChart(this.query)
358
         this.GetPatientInspectionIndexBarChart(this.query)
359
         this.GetPatientInspectionIndexChart(this.query)
359
         this.GetPatientInspectionIndexChart(this.query)
360
 
360
 
361
+        for (let i = 0; i< this.patientsData.length; i++){
362
+          if(this.patientsData[i].id == val.id){
363
+            this.$refs.table.setCurrentRow(this.patientsData[i])
364
+          }
365
+        }
366
+
361
       },
367
       },
362
       querySearchAsync(keyword, cb) {
368
       querySearchAsync(keyword, cb) {
363
         let key = ''
369
         let key = ''
380
           if (response.data.state == 1) {
386
           if (response.data.state == 1) {
381
             var patients = response.data.data.patients
387
             var patients = response.data.data.patients
382
             this.patientsData = patients
388
             this.patientsData = patients
389
+
390
+            GetDefalutPatient()
391
+              .then(rs => {
392
+                var resp = rs.data
393
+                if (resp.state == 1) {
394
+                  this.query.patient_id =resp.data.patient.id
395
+                  this.patient_name  = resp.data.patient.name
396
+
397
+                  for (let i = 0; i< this.patientsData.length; i++){
398
+                    if(this.patientsData[i].id == resp.data.patient.id){
399
+                      this.$refs.table.setCurrentRow(this.patientsData[i])
400
+                    }
401
+                  }
402
+
403
+
404
+                  this.GetInspectionIndexInit()
405
+                } else {
406
+
407
+                }
408
+              })
409
+              .catch(error => {
410
+
411
+              })
412
+
383
           }
413
           }
384
         })
414
         })
385
       },
415
       },
584
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
614
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
585
       this.query.end_time = year + '-' + month + '-' + day
615
       this.query.end_time = year + '-' + month + '-' + day
586
       this.query.start_time = year + '-' + last_month + '-' + day
616
       this.query.start_time = year + '-' + last_month + '-' + day
587
-      GetDefalutPatient()
588
-        .then(rs => {
589
-          var resp = rs.data
590
-          if (resp.state == 1) {
591
-            this.query.patient_id =resp.data.patient.id
592
-            this.patient_name  = resp.data.patient.name
593
-            this.GetInspectionIndexInit()
594
-          } else {
595
-
596
-          }
597
-        })
598
-        .catch(error => {
599
-
600
-        })
601
 
617
 
602
 
618
 
603
       this.getCurrentOrgPatients()
619
       this.getCurrentOrgPatients()

+ 23 - 6
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue Wyświetl plik

69
         <el-container>
69
         <el-container>
70
           <div style="width:150px">
70
           <div style="width:150px">
71
             <div class="tableTitle">患者列表</div>
71
             <div class="tableTitle">患者列表</div>
72
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
72
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
                       highlight-current-row
74
                       highlight-current-row
75
                       @current-change="handleChange">
75
                       @current-change="handleChange">
88
             </div>
88
             </div>
89
             <div class="tableTitle">统计表</div>
89
             <div class="tableTitle">统计表</div>
90
             <div>
90
             <div>
91
-              <el-table :data="tableData" style="width: 100%" :height="tableHeight" v-loading="loading">
91
+              <el-table :data="tableData" style="width: 100%"  v-loading="loading">
92
                 <el-table-column fixed label="监测时间" align="center">
92
                 <el-table-column fixed label="监测时间" align="center">
93
                   <template slot-scope="scope">
93
                   <template slot-scope="scope">
94
                     <!--{{getTime(scope.row.operate_time)}}-->
94
                     <!--{{getTime(scope.row.operate_time)}}-->
229
           }
229
           }
230
         },
230
         },
231
         patientsData:[],
231
         patientsData:[],
232
-        tableData: [
233
-        ],
234
         loading: false,
232
         loading: false,
235
         search_value: '',
233
         search_value: '',
236
-        total: '',
234
+        total: 0,
237
         query: {
235
         query: {
238
           patient_id: '',
236
           patient_id: '',
239
           statistics_type: 1,
237
           statistics_type: 1,
499
               for (let i = 0; i < resp.data.data.length; i++) {
497
               for (let i = 0; i < resp.data.data.length; i++) {
500
                 this.tableData.push(resp.data.data[i])
498
                 this.tableData.push(resp.data.data[i])
501
               }
499
               }
500
+              this.total = resp.data.data.total
501
+
502
             } else {
502
             } else {
503
               this.loading = false
503
               this.loading = false
504
             }
504
             }
537
         this.query.page = 1
537
         this.query.page = 1
538
         this.GetDialysisWatchTableData(this.query)
538
         this.GetDialysisWatchTableData(this.query)
539
         this.GetDialysisWatchChartData(this.query)
539
         this.GetDialysisWatchChartData(this.query)
540
+        for (let i = 0;i < this.patientsData.length; i++){
541
+          if (this.patientsData[i].id == val.id){
542
+            this.$refs.table.setCurrentRow(this.patientsData[i])
543
+          }
544
+        }
540
 
545
 
541
       },
546
       },
542
       querySearchAsync(keyword, cb) {
547
       querySearchAsync(keyword, cb) {
561
           if(response.data.state == 1){
566
           if(response.data.state == 1){
562
             var patients = response.data.data.patients
567
             var patients = response.data.data.patients
563
             this.patientsData = patients
568
             this.patientsData = patients
569
+            this.GetDefaultPatient()
564
           }
570
           }
565
         })
571
         })
566
-      },
572
+      }, GetDefaultPatient() {
573
+        GetDefalutPatient().then(response => {
574
+          if (response.data.state == 1) {
575
+            var patient = response.data.data.patient
576
+            for (let i = 0;i < this.patientsData.length; i++){
577
+              if (this.patientsData[i].id == patient.id){
578
+                this.$refs.table.setCurrentRow(this.patientsData[i])
579
+              }
580
+            }
581
+          }
582
+        })
583
+      }
567
     }, created() {
584
     }, created() {
568
       var date = new Date()
585
       var date = new Date()
569
       var year = date.getFullYear() //获取完整的年份(4位)
586
       var year = date.getFullYear() //获取完整的年份(4位)

+ 9 - 1
src/xt_pages/qcd/indicatorControlAnalysis/patientInspectionDetail.vue Wyświetl plik

53
       <el-container>
53
       <el-container>
54
         <div style="width:150px">
54
         <div style="width:150px">
55
           <div class="tableTitle">患者列表</div>
55
           <div class="tableTitle">患者列表</div>
56
-          <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
56
+          <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
57
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
57
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
58
                     highlight-current-row
58
                     highlight-current-row
59
                     @current-change="handleChange">
59
                     @current-change="handleChange">
316
           if (response.data.state == 1) {
316
           if (response.data.state == 1) {
317
             var patients = response.data.data.patients
317
             var patients = response.data.data.patients
318
             this.patientsData = patients
318
             this.patientsData = patients
319
+
320
+
321
+            for (let i = 0;i < this.patientsData.length; i++){
322
+              if (this.patientsData[i].id == this.query.patient_id){
323
+                this.$refs.table.setCurrentRow(this.patientsData[i])
324
+              }
325
+            }
326
+
319
           }
327
           }
320
         })
328
         })
321
       }, handleChange(val) {
329
       }, handleChange(val) {

+ 96 - 64
src/xt_pages/qcd/indicatorControlAnalysis/process.vue Wyświetl plik

26
 
26
 
27
             </el-form-item>
27
             </el-form-item>
28
           </el-form>
28
           </el-form>
29
-          <el-select v-model="query.statistics_type" placeholder="请选择" style="width:110px;margin-right:10px" @change="changeProject">
29
+          <el-select v-model="query.statistics_type" placeholder="请选择" style="width:110px;margin-right:10px"
30
+                     @change="changeProject">
30
             <el-option
31
             <el-option
31
               v-for="item in options"
32
               v-for="item in options"
32
               :key="item.value"
33
               :key="item.value"
69
         <el-container>
70
         <el-container>
70
           <div style="width:150px">
71
           <div style="width:150px">
71
             <div class="tableTitle">患者列表</div>
72
             <div class="tableTitle">患者列表</div>
72
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
73
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
74
+                      :row-style="{ color: '#303133' }"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
75
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
                       highlight-current-row
76
                       highlight-current-row
75
                       @current-change="handleChange">
77
                       @current-change="handleChange">
84
           <div style="padding-left:10px;flex:1">
86
           <div style="padding-left:10px;flex:1">
85
             <div class="tableTitle">指标趋势</div>
87
             <div class="tableTitle">指标趋势</div>
86
             <div>
88
             <div>
87
-              <line-chart :options="chart" v-if="query.statistics_type != 9 && query.statistics_type != 10"></line-chart>
89
+              <line-chart :options="chart"
90
+                          v-if="query.statistics_type != 9 && query.statistics_type != 10"></line-chart>
88
               <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
91
               <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
89
 
92
 
90
             </div>
93
             </div>
91
             <div class="tableTitle">统计表</div>
94
             <div class="tableTitle">统计表</div>
92
             <div>
95
             <div>
93
-              <el-table :data="tableData"    v-loading="loading">
94
-                <el-table-column  fixed label="透析日期" align="center">
96
+              <el-table :data="tableData" v-loading="loading">
97
+                <el-table-column fixed label="透析日期" align="center">
95
                   <template slot-scope="scope">
98
                   <template slot-scope="scope">
96
-                    {{scope.row.schedule_date | parseTime("{y}-{m}-{d}") }}
99
+                    {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
97
                     <!--{{getTime(scope.row.schedule_date)}}-->
100
                     <!--{{getTime(scope.row.schedule_date)}}-->
98
                   </template>
101
                   </template>
99
                 </el-table-column>
102
                 </el-table-column>
118
 
121
 
119
                 <el-table-column label="透前体重" align="center">
122
                 <el-table-column label="透前体重" align="center">
120
                   <template slot-scope="scope">
123
                   <template slot-scope="scope">
121
-                    {{ scope.row.predialysis_evaluation.weight_before?scope.row.predialysis_evaluation.weight_before:''}}
124
+                    {{
125
+                    scope.row.predialysis_evaluation.weight_before?scope.row.predialysis_evaluation.weight_before:''}}
122
 
126
 
123
                   </template>
127
                   </template>
124
                 </el-table-column>
128
                 </el-table-column>
125
 
129
 
126
                 <el-table-column label="透后体重" align="center">
130
                 <el-table-column label="透后体重" align="center">
127
                   <template slot-scope="scope">
131
                   <template slot-scope="scope">
128
-                    {{ scope.row.assessment_after_dislysis.weight_after ? scope.row.assessment_after_dislysis.weight_after :''}}
132
+                    {{ scope.row.assessment_after_dislysis.weight_after ?
133
+                    scope.row.assessment_after_dislysis.weight_after :''}}
129
 
134
 
130
                   </template>
135
                   </template>
131
                 </el-table-column>
136
                 </el-table-column>
132
 
137
 
133
                 <el-table-column label="目标超滤量" align="center">
138
                 <el-table-column label="目标超滤量" align="center">
134
                   <template slot-scope="scope">
139
                   <template slot-scope="scope">
135
-                    {{ scope.row.prescription.target_ultrafiltration ? scope.row.prescription.target_ultrafiltration : ''}}
140
+                    {{ scope.row.prescription.target_ultrafiltration ? scope.row.prescription.target_ultrafiltration :
141
+                    ''}}
136
 
142
 
137
                   </template>
143
                   </template>
138
                 </el-table-column>
144
                 </el-table-column>
139
 
145
 
140
                 <el-table-column label="实际超滤量" align="center">
146
                 <el-table-column label="实际超滤量" align="center">
141
                   <template slot-scope="scope">
147
                   <template slot-scope="scope">
142
-                    {{ scope.row.assessment_after_dislysis.actual_ultrafiltration ?  scope.row.assessment_after_dislysis.actual_ultrafiltration :''}}
148
+                    {{ scope.row.assessment_after_dislysis.actual_ultrafiltration ?
149
+                    scope.row.assessment_after_dislysis.actual_ultrafiltration :''}}
143
 
150
 
144
                   </template>
151
                   </template>
145
                 </el-table-column>
152
                 </el-table-column>
147
 
154
 
148
                 <el-table-column label="透前血压" align="center">
155
                 <el-table-column label="透前血压" align="center">
149
                   <template slot-scope="scope">
156
                   <template slot-scope="scope">
150
-                    <div v-if="scope.row.predialysis_evaluation.systolic_blood_pressure && scope.row.predialysis_evaluation.diastolic_blood_pressure">{{ scope.row.predialysis_evaluation.systolic_blood_pressure}} / {{ scope.row.predialysis_evaluation.diastolic_blood_pressure}}</div>
157
+                    <div
158
+                      v-if="scope.row.predialysis_evaluation.systolic_blood_pressure && scope.row.predialysis_evaluation.diastolic_blood_pressure">
159
+                      {{ scope.row.predialysis_evaluation.systolic_blood_pressure}} / {{
160
+                      scope.row.predialysis_evaluation.diastolic_blood_pressure}}
161
+                    </div>
151
 
162
 
152
 
163
 
153
                   </template>
164
                   </template>
155
 
166
 
156
                 <el-table-column label="透后血压" align="center">
167
                 <el-table-column label="透后血压" align="center">
157
                   <template slot-scope="scope">
168
                   <template slot-scope="scope">
158
-                    <div v-if="scope.row.assessment_after_dislysis.systolic_blood_pressure&&scope.row.assessment_after_dislysis.diastolic_blood_pressure">{{ scope.row.assessment_after_dislysis.systolic_blood_pressure}} / {{ scope.row.assessment_after_dislysis.diastolic_blood_pressure}}</div>
169
+                    <div
170
+                      v-if="scope.row.assessment_after_dislysis.systolic_blood_pressure&&scope.row.assessment_after_dislysis.diastolic_blood_pressure">
171
+                      {{ scope.row.assessment_after_dislysis.systolic_blood_pressure}} / {{
172
+                      scope.row.assessment_after_dislysis.diastolic_blood_pressure}}
173
+                    </div>
159
 
174
 
160
 
175
 
161
                   </template>
176
                   </template>
164
 
179
 
165
                 <el-table-column label="透前脉率" align="center">
180
                 <el-table-column label="透前脉率" align="center">
166
                   <template slot-scope="scope">
181
                   <template slot-scope="scope">
167
-                    {{ scope.row.predialysis_evaluation.pulse_frequency?scope.row.predialysis_evaluation.pulse_frequency:''}}
182
+                    {{
183
+                    scope.row.predialysis_evaluation.pulse_frequency?scope.row.predialysis_evaluation.pulse_frequency:''}}
168
 
184
 
169
                   </template>
185
                   </template>
170
                 </el-table-column>
186
                 </el-table-column>
171
 
187
 
172
                 <el-table-column label="透后脉率" align="center">
188
                 <el-table-column label="透后脉率" align="center">
173
                   <template slot-scope="scope">
189
                   <template slot-scope="scope">
174
-                    {{ scope.row.assessment_after_dislysis.pulse_frequency?scope.row.assessment_after_dislysis.pulse_frequency:''}}
190
+                    {{
191
+                    scope.row.assessment_after_dislysis.pulse_frequency?scope.row.assessment_after_dislysis.pulse_frequency:''}}
175
 
192
 
176
                   </template>
193
                   </template>
177
                 </el-table-column>
194
                 </el-table-column>
193
 
210
 
194
                 <el-table-column label="钾" align="center">
211
                 <el-table-column label="钾" align="center">
195
                   <template slot-scope="scope">
212
                   <template slot-scope="scope">
196
-                    {{ scope.row.prescription.kalium?scope.row.prescription.kalium:""}}
213
+                    {{ scope.row.prescription.kalium?scope.row.prescription.kalium:''}}
197
 
214
 
198
                   </template>
215
                   </template>
199
                 </el-table-column>
216
                 </el-table-column>
200
 
217
 
201
 
218
 
202
-
203
                 <el-table-column label="钠" align="center">
219
                 <el-table-column label="钠" align="center">
204
                   <template slot-scope="scope">
220
                   <template slot-scope="scope">
205
-                    {{ scope.row.prescription.sodium?scope.row.prescription.sodium:""}}
221
+                    {{ scope.row.prescription.sodium?scope.row.prescription.sodium:''}}
206
 
222
 
207
                   </template>
223
                   </template>
208
                 </el-table-column>
224
                 </el-table-column>
210
 
226
 
211
                 <el-table-column label="钙" align="center">
227
                 <el-table-column label="钙" align="center">
212
                   <template slot-scope="scope">
228
                   <template slot-scope="scope">
213
-                    {{ scope.row.prescription.calcium?scope.row.prescription.calcium:""}}
229
+                    {{ scope.row.prescription.calcium?scope.row.prescription.calcium:''}}
214
 
230
 
215
                   </template>
231
                   </template>
216
                 </el-table-column>
232
                 </el-table-column>
218
 
234
 
219
                 <el-table-column label="透析时长" align="center">
235
                 <el-table-column label="透析时长" align="center">
220
                   <template slot-scope="scope">
236
                   <template slot-scope="scope">
221
-                    {{ scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':""}}
222
-                    {{ scope.row.prescription.dialysis_duration_minute?scope.row.prescription.dialysis_duration_minute+'分钟':''}}
237
+                    {{
238
+                    scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
239
+                    {{
240
+                    scope.row.prescription.dialysis_duration_minute?scope.row.prescription.dialysis_duration_minute+'分钟':''}}
223
                   </template>
241
                   </template>
224
 
242
 
225
                 </el-table-column>
243
                 </el-table-column>
265
   import NewNav from '../indicatorControlAnalysis/components/NewNav'
283
   import NewNav from '../indicatorControlAnalysis/components/NewNav'
266
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
284
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
267
   import LineChart from '../../qcd/components/LineChart'
285
   import LineChart from '../../qcd/components/LineChart'
268
-  import { getCurrentOrgPatients } from "@/api/common/common";
286
+  import { getCurrentOrgPatients } from '@/api/common/common'
269
   import {
287
   import {
270
-    GetDefalutPatient,
288
+    GetDefaultPatient,
271
     GetDialysisProcessIndexChartData,
289
     GetDialysisProcessIndexChartData,
272
     GetDialysisProcessIndexTableData
290
     GetDialysisProcessIndexTableData
273
   } from '@/api/common/statistics'
291
   } from '@/api/common/statistics'
274
 
292
 
293
+  import { PostSearch } from '@/api/patient'
275
 
294
 
276
-
277
-  import {
278
-    PostSearch
279
-  } from '@/api/patient'
280
-
281
-  import { uParseTime } from "@/utils/tools";
282
-  import { getDataConfig } from "@/utils/data";
295
+  import { uParseTime } from '@/utils/tools'
296
+  import { getDataConfig } from '@/utils/data'
283
 
297
 
284
   export default {
298
   export default {
285
     components: {
299
     components: {
291
       return {
305
       return {
292
         pickerOptions: {
306
         pickerOptions: {
293
           disabledDate(time) {
307
           disabledDate(time) {
294
-            let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
295
-            return time.getTime() > Date.now() || time.getTime() < threeMonths;;
308
+            let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
309
+            return time.getTime() > Date.now() || time.getTime() < threeMonths
310
+
296
           }
311
           }
297
         },
312
         },
298
-        patientsData:[],
299
-        tableData: [
300
-        ],
313
+        patientsData: [],
314
+        tableData: [],
301
         loading: false,
315
         loading: false,
302
         search_value: '',
316
         search_value: '',
303
-        total: '',
317
+        total: 0,
304
         query: {
318
         query: {
305
           patient_id: '',
319
           patient_id: '',
306
           statistics_type: 1,
320
           statistics_type: 1,
326
           { path: false, name: '指标评估统计' },
340
           { path: false, name: '指标评估统计' },
327
           { path: false, name: '透析过程指标统计' }
341
           { path: false, name: '透析过程指标统计' }
328
         ],
342
         ],
329
-        tableData: [],
330
         tableData1: [],
343
         tableData1: [],
331
         chart: {
344
         chart: {
332
           title: {
345
           title: {
470
     },
483
     },
471
     methods: {
484
     methods: {
472
 
485
 
473
-      changeProject(val){
486
+      changeProject(val) {
474
         this.query.statistics_type = val
487
         this.query.statistics_type = val
475
         this.query.page = 1
488
         this.query.page = 1
476
         this.GetDialysisProcessIndexChartData(this.query)
489
         this.GetDialysisProcessIndexChartData(this.query)
477
         // this.GetDialysisProcessIndexTableData(this.query)
490
         // this.GetDialysisProcessIndexTableData(this.query)
478
 
491
 
479
       },
492
       },
480
-      handleChange(val){
493
+      handleChange(val) {
481
         this.query.patient_id = val.id
494
         this.query.patient_id = val.id
482
         this.query.page = 1
495
         this.query.page = 1
483
         this.GetDialysisProcessIndexTableData(this.query)
496
         this.GetDialysisProcessIndexTableData(this.query)
484
         this.GetDialysisProcessIndexChartData(this.query)
497
         this.GetDialysisProcessIndexChartData(this.query)
485
       },
498
       },
486
       handleSizeChange(limit) {
499
       handleSizeChange(limit) {
487
-        this.query.limit = limit;
500
+        this.query.limit = limit
488
 
501
 
489
       },
502
       },
490
       handleCurrentChange(page) {
503
       handleCurrentChange(page) {
491
-        this.query.page = page;
504
+        this.query.page = page
492
 
505
 
493
       },
506
       },
494
       changeTime(val) {
507
       changeTime(val) {
495
-        var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
508
+        var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
496
         if (time > 0) {
509
         if (time > 0) {
497
-          this.$message.error("结束时间不能小于开始时间");
498
-          this.query.start_time = "";
510
+          this.$message.error('结束时间不能小于开始时间')
511
+          this.query.start_time = ''
499
         } else {
512
         } else {
500
           // this.getDialysisList()
513
           // this.getDialysisList()
501
-          this.query.page = 1;
514
+          this.query.page = 1
502
           this.GetDialysisProcessIndexChartData(this.query)
515
           this.GetDialysisProcessIndexChartData(this.query)
503
           this.GetDialysisProcessIndexTableData(this.query)
516
           this.GetDialysisProcessIndexTableData(this.query)
504
 
517
 
507
       },
520
       },
508
       changeEndTime(val) {
521
       changeEndTime(val) {
509
         var time =
522
         var time =
510
-          this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
523
+          this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
511
         if (time < 0) {
524
         if (time < 0) {
512
-          this.$message.error("结束时间不能小于开始时间");
513
-          this.query.end_time = "";
525
+          this.$message.error('结束时间不能小于开始时间')
526
+          this.query.end_time = ''
514
         } else {
527
         } else {
515
-          this.query.page = 1;
528
+          this.query.page = 1
516
           this.GetDialysisProcessIndexChartData(this.query)
529
           this.GetDialysisProcessIndexChartData(this.query)
517
           this.GetDialysisProcessIndexTableData(this.query)
530
           this.GetDialysisProcessIndexTableData(this.query)
518
 
531
 
520
       },
533
       },
521
       getTimestamp(time) {
534
       getTimestamp(time) {
522
         // 把时间日期转成时间戳
535
         // 把时间日期转成时间戳
523
-        return new Date(time).getTime() / 1000;
536
+        return new Date(time).getTime() / 1000
524
       },
537
       },
525
       QueryOperaById: function(val) {
538
       QueryOperaById: function(val) {
526
-        let vascular_access_desc_name = "";
539
+        let vascular_access_desc_name = ''
527
         let vascular_access_desc = getDataConfig(
540
         let vascular_access_desc = getDataConfig(
528
-          "hemodialysis",
529
-          "vascular_access_desc"
530
-        );
541
+          'hemodialysis',
542
+          'vascular_access_desc'
543
+        )
531
         for (let i = 0; i < vascular_access_desc.length; i++) {
544
         for (let i = 0; i < vascular_access_desc.length; i++) {
532
           if (vascular_access_desc[i].id == val) {
545
           if (vascular_access_desc[i].id == val) {
533
-            vascular_access_desc_name = vascular_access_desc[i].name;
546
+            vascular_access_desc_name = vascular_access_desc[i].name
534
           }
547
           }
535
         }
548
         }
536
 
549
 
537
-        return vascular_access_desc_name;
550
+        return vascular_access_desc_name
538
       },
551
       },
539
-      GetAnticoagulantById: function (val) {
552
+      GetAnticoagulantById: function(val) {
540
         let anticoagulan_name = ''
553
         let anticoagulan_name = ''
541
         var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
554
         var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
542
         let anticoagulant = anticoagulantsConfitTwo
555
         let anticoagulant = anticoagulantsConfitTwo
547
         }
560
         }
548
         return anticoagulan_name
561
         return anticoagulan_name
549
       },
562
       },
550
-      getModeName(mode_id){
551
-        return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
563
+      getModeName(mode_id) {
564
+        return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
552
       }, GetDialysisProcessIndexTableData(params) {
565
       }, GetDialysisProcessIndexTableData(params) {
553
         this.loading = true
566
         this.loading = true
554
         this.tableData = []
567
         this.tableData = []
561
               for (let i = 0; i < resp.data.data.length; i++) {
574
               for (let i = 0; i < resp.data.data.length; i++) {
562
                 this.tableData.push(resp.data.data[i])
575
                 this.tableData.push(resp.data.data[i])
563
               }
576
               }
577
+              this.total = resp.data.total
564
             } else {
578
             } else {
565
               this.loading = false
579
               this.loading = false
566
             }
580
             }
584
                   this.chart.series[0].data.push(resp.data.data[i].value)
598
                   this.chart.series[0].data.push(resp.data.data[i].value)
585
                 }
599
                 }
586
               } else {
600
               } else {
587
-                console.log("1111111")
588
-                console.log(this.query.statistics_type)
589
 
601
 
590
                 for (let i = 0; i < resp.data.data.length; i++) {
602
                 for (let i = 0; i < resp.data.data.length; i++) {
591
                   this.bar.xAxis.data.push(resp.data.data[i].name)
603
                   this.bar.xAxis.data.push(resp.data.data[i].name)
604
         this.GetDialysisProcessIndexChartData(this.query)
616
         this.GetDialysisProcessIndexChartData(this.query)
605
         this.GetDialysisProcessIndexTableData(this.query)
617
         this.GetDialysisProcessIndexTableData(this.query)
606
 
618
 
619
+        for (let i = 0;i < this.patientsData.length; i++){
620
+          if (this.patientsData[i].id == val.id){
621
+            this.$refs.table.setCurrentRow(this.patientsData[i])
622
+          }
623
+        }
624
+
625
+
607
       },
626
       },
608
       querySearchAsync(keyword, cb) {
627
       querySearchAsync(keyword, cb) {
609
         let key = ''
628
         let key = ''
622
       },
641
       },
623
       chooseWay(way) {
642
       chooseWay(way) {
624
         this.wayType = way
643
         this.wayType = way
625
-      }, getCurrentOrgPatients(){
626
-        getCurrentOrgPatients().then(response=>{
627
-          if(response.data.state == 1){
644
+      }, getCurrentOrgPatients() {
645
+        getCurrentOrgPatients().then(response => {
646
+          if (response.data.state == 1) {
628
             var patients = response.data.data.patients
647
             var patients = response.data.data.patients
629
             this.patientsData = patients
648
             this.patientsData = patients
649
+            this.GetDefaultPatient()
630
           }
650
           }
631
         })
651
         })
632
-      },
652
+      }, GetDefaultPatient() {
653
+        GetDefaultPatient().then(response => {
654
+          if (response.data.state == 1) {
655
+            var patient = response.data.data.patient
656
+            for (let i = 0;i < this.patientsData.length; i++){
657
+              if (this.patientsData[i].id == patient.id){
658
+                this.$refs.table.setCurrentRow(this.patientsData[i])
659
+              }
660
+            }
661
+          }
662
+        })
663
+
664
+      }
633
     }, created() {
665
     }, created() {
634
       var date = new Date()
666
       var date = new Date()
635
       var year = date.getFullYear() //获取完整的年份(4位)
667
       var year = date.getFullYear() //获取完整的年份(4位)

+ 19 - 5
src/xt_pages/qcd/indicatorControlAnalysis/weight.vue Wyświetl plik

69
         <el-container>
69
         <el-container>
70
           <div style="width:150px">
70
           <div style="width:150px">
71
             <div class="tableTitle">患者列表</div>
71
             <div class="tableTitle">患者列表</div>
72
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
72
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
                       highlight-current-row
74
                       highlight-current-row
75
                       @current-change="handleChange">
75
                       @current-change="handleChange">
138
 
138
 
139
                 <el-table-column label="体重增加" align="center">
139
                 <el-table-column label="体重增加" align="center">
140
                   <template slot-scope="scope">
140
                   <template slot-scope="scope">
141
-                    <div v-if="scope.row.weight_before && scope.row.last_after_weight">{{scope.row.weight_before - scope.row.last_after_weight}}</div>
141
+                    <div v-if="scope.row.weight_before && scope.row.last_after_weight">{{(scope.row.weight_before - scope.row.last_after_weight).toFixed(1)}}</div>
142
 
142
 
143
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
143
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
144
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
144
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
184
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
184
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
185
   import LineChart from '../../qcd/components/LineChart'
185
   import LineChart from '../../qcd/components/LineChart'
186
   import { getCurrentOrgPatients } from "@/api/common/common";
186
   import { getCurrentOrgPatients } from "@/api/common/common";
187
-  import {GetDialysisWeightChartData,GetDialysisWeightTableData} from "@/api/common/statistics"
187
+  import {GetDialysisWeightChartData,GetDialysisWeightTableData,GetDefalutPatient} from "@/api/common/statistics"
188
 
188
 
189
   import {
189
   import {
190
     PostSearch
190
     PostSearch
212
         ],
212
         ],
213
         loading: false,
213
         loading: false,
214
         search_value: '',
214
         search_value: '',
215
-        total: '',
215
+        total: 0,
216
         query: {
216
         query: {
217
           patient_id: '',
217
           patient_id: '',
218
           statistics_type: 1,
218
           statistics_type: 1,
469
               for (let i = 0; i < resp.data.data.length; i++) {
469
               for (let i = 0; i < resp.data.data.length; i++) {
470
                 this.tableData.push(resp.data.data[i])
470
                 this.tableData.push(resp.data.data[i])
471
               }
471
               }
472
+              this.total = resp.data.total
473
+
472
             } else {
474
             } else {
473
               this.loading = false
475
               this.loading = false
474
             }
476
             }
499
         this.query.page = 1
501
         this.query.page = 1
500
         this.GetDialysisWeightChartData(this.query)
502
         this.GetDialysisWeightChartData(this.query)
501
         this.GetDialysisWeightTableData(this.query)
503
         this.GetDialysisWeightTableData(this.query)
504
+        for (let i = 0;i < this.patientsData.length; i++){
505
+          if (this.patientsData[i].id == val.id){
506
+            this.$refs.table.setCurrentRow(this.patientsData[i])
507
+          }
508
+        }
502
 
509
 
503
       },
510
       },
504
       querySearchAsync(keyword, cb) {
511
       querySearchAsync(keyword, cb) {
523
           if(response.data.state == 1){
530
           if(response.data.state == 1){
524
             var patients = response.data.data.patients
531
             var patients = response.data.data.patients
525
             this.patientsData = patients
532
             this.patientsData = patients
533
+
526
           }
534
           }
527
         })
535
         })
528
-      },
536
+      },GetDefaultPatient() {
537
+        GetDefalutPatient().then(response => {
538
+          if (response.data.state == 1) {
539
+            var patient = response.data.data.patient
540
+          }
541
+        })
542
+      }
529
     }, created() {
543
     }, created() {
530
       var date = new Date()
544
       var date = new Date()
531
       var year = date.getFullYear() //获取完整的年份(4位)
545
       var year = date.getFullYear() //获取完整的年份(4位)

+ 17 - 7
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue Wyświetl plik

29
         <el-container>
29
         <el-container>
30
           <div style="width:150px">
30
           <div style="width:150px">
31
             <div class="tableTitle">患者列表</div>
31
             <div class="tableTitle">患者列表</div>
32
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
32
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
33
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
33
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
34
                       highlight-current-row
34
                       highlight-current-row
35
                       @current-change="handleChange">
35
                       @current-change="handleChange">
142
 
142
 
143
                 <el-table-column label="体重增加" align="center">
143
                 <el-table-column label="体重增加" align="center">
144
                   <template slot-scope="scope">
144
                   <template slot-scope="scope">
145
-                    <div v-if="scope.row.weight_before && scope.row.last_after_weight">{{scope.row.weight_before - scope.row.last_after_weight}}</div>
145
+                    <div v-if="scope.row.weight_before && scope.row.last_after_weight">{{(scope.row.weight_before - scope.row.last_after_weight).toFixed(1)}}</div>
146
 
146
 
147
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
147
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
148
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
148
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
196
         }
196
         }
197
       },
197
       },
198
       patientsData:[],
198
       patientsData:[],
199
-      tableData: [
200
-      ],
199
+      tableData: [],
201
       loading: false,
200
       loading: false,
202
       search_value: '',
201
       search_value: '',
203
-      total: '',
202
+      total: 0,
204
       query: {
203
       query: {
205
         patient_id: '',
204
         patient_id: '',
206
         statistics_type: 1,
205
         statistics_type: 1,
326
       return new Date(time).getTime() / 1000;
325
       return new Date(time).getTime() / 1000;
327
     },GetDialysisWeightTableData(params) {
326
     },GetDialysisWeightTableData(params) {
328
       this.loading = true
327
       this.loading = true
329
-      this.tableData = []
330
       GetDialysisWeightTableData(params)
328
       GetDialysisWeightTableData(params)
331
         .then(rs => {
329
         .then(rs => {
332
           var resp = rs.data
330
           var resp = rs.data
333
           if (resp.state == 1) {
331
           if (resp.state == 1) {
334
             this.loading = false
332
             this.loading = false
335
-
333
+            this.tableData = []
336
             for (let i = 0; i < resp.data.data.length; i++) {
334
             for (let i = 0; i < resp.data.data.length; i++) {
337
               this.tableData.push(resp.data.data[i])
335
               this.tableData.push(resp.data.data[i])
338
             }
336
             }
337
+            this.total = resp.data.total
339
           } else {
338
           } else {
340
             this.loading = false
339
             this.loading = false
341
           }
340
           }
366
       this.query.page = 1
365
       this.query.page = 1
367
       this.GetDialysisPatientWeightChartData(this.query)
366
       this.GetDialysisPatientWeightChartData(this.query)
368
       this.GetDialysisWeightTableData(this.query)
367
       this.GetDialysisWeightTableData(this.query)
368
+      for (let i = 0;i < this.patientsData.length; i++){
369
+        if (this.patientsData[i].id == val.id){
370
+          this.$refs.table.setCurrentRow(this.patientsData[i])
371
+        }
372
+      }
369
 
373
 
370
     },
374
     },
371
     querySearchAsync(keyword, cb) {
375
     querySearchAsync(keyword, cb) {
387
         if(response.data.state == 1){
391
         if(response.data.state == 1){
388
           var patients = response.data.data.patients
392
           var patients = response.data.data.patients
389
           this.patientsData = patients
393
           this.patientsData = patients
394
+          for (let i = 0;i < this.patientsData.length; i++){
395
+            if (this.patientsData[i].id == this.query.patient_id){
396
+              this.$refs.table.setCurrentRow(this.patientsData[i])
397
+            }
398
+          }
399
+
390
         }
400
         }
391
       })
401
       })
392
     },
402
     },

+ 1 - 1
src/xt_pages/qcd/workAnalysis/nurse.vue Wyświetl plik

207
           { path: false, name: "工作量分析统计" },
207
           { path: false, name: "工作量分析统计" },
208
           { path: false, name: "医生" }
208
           { path: false, name: "医生" }
209
         ],
209
         ],
210
-        activeName: "first",
210
+        activeName: "second",
211
         listQuery: {
211
         listQuery: {
212
           start_time: "",
212
           start_time: "",
213
           end_time: "",
213
           end_time: "",