Procházet zdrojové kódy

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

csx před 4 roky
rodič
revize
76c326a9f0

+ 8 - 0
src/api/common/statistics.js Zobrazit soubor

@@ -210,6 +210,14 @@ export function GetPatientInspectionIndexBarChart(params) {
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
 

+ 0 - 1
src/router/modules/qcd.js Zobrazit soubor

@@ -224,7 +224,6 @@ export default {
224 224
       name: "weightDetails",
225 225
       meta: {
226 226
         title: "指标评估体重详情",
227
-        noCache: true
228 227
       }
229 228
     },
230 229
     {

+ 2 - 3
src/xt_pages/qcd/indicatorControlAnalysis/analysis.vue Zobrazit soubor

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

+ 22 - 4
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressure.vue Zobrazit soubor

@@ -69,7 +69,7 @@
69 69
         <el-container>
70 70
           <div style="width:150px">
71 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 73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74 74
                       highlight-current-row
75 75
                       @current-change="handleChange">
@@ -175,7 +175,7 @@
175 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 180
   import {
181 181
     PostSearch
@@ -203,7 +203,7 @@
203 203
         ],
204 204
         loading: false,
205 205
         search_value: '',
206
-        total: '',
206
+        total: 0,
207 207
         query: {
208 208
           patient_id: '',
209 209
           statistics_type: 1,
@@ -458,6 +458,7 @@
458 458
               for (let i = 0; i < resp.data.data.length; i++) {
459 459
                 this.tableData.push(resp.data.data[i])
460 460
               }
461
+              this.total = resp.data.total
461 462
             } else {
462 463
               this.loading = false
463 464
             }
@@ -488,6 +489,11 @@
488 489
         this.query.page = 1
489 490
         this.GetDialysisBloodPressureChartData(this.query)
490 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 499
       querySearchAsync(keyword, cb) {
@@ -512,9 +518,21 @@
512 518
           if(response.data.state == 1){
513 519
             var patients = response.data.data.patients
514 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 536
     }, created() {
519 537
       var date = new Date()
520 538
       var year = date.getFullYear() //获取完整的年份(4位)

+ 15 - 23
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails.vue Zobrazit soubor

@@ -28,7 +28,7 @@
28 28
         <el-container>
29 29
           <div style="width:150px">
30 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 32
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
33 33
                       highlight-current-row
34 34
                       @current-change="handleChange">
@@ -99,18 +99,6 @@
99 99
                   </template>
100 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 102
                 <el-table-column label="透前血压" align="center">
115 103
                   <template slot-scope="scope">
116 104
                     <div v-if="scope.row.before.systolic_blood_pressure">{{scope.row.before.systolic_blood_pressure}} / {{scope.row.before.diastolic_blood_pressure}}</div>
@@ -137,15 +125,6 @@
137 125
                   </template>
138 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 129
               </el-table>
151 130
 
@@ -197,7 +176,7 @@ export default {
197 176
       ],
198 177
       loading: false,
199 178
       search_value: '',
200
-      total: '',
179
+      total: 0,
201 180
       query: {
202 181
         patient_id: '',
203 182
         statistics_type: 1,
@@ -298,6 +277,7 @@ export default {
298 277
             for (let i = 0; i < resp.data.data.length; i++) {
299 278
               this.tableData.push(resp.data.data[i])
300 279
             }
280
+            this.total = resp.data.total
301 281
           } else {
302 282
             this.loading = false
303 283
           }
@@ -379,6 +359,12 @@ export default {
379 359
       this.GetDialysisPatientBloodPressureChartData(this.query)
380 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 368
     },  querySearchAsync(keyword, cb) {
383 369
       let key = ''
384 370
       if (keyword != undefined) {
@@ -398,6 +384,12 @@ export default {
398 384
         if(response.data.state == 1){
399 385
           var patients = response.data.data.patients
400 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 Zobrazit soubor

@@ -2,7 +2,7 @@
2 2
   <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" style="margin-bottom:10px">
3 3
     <el-tab-pane label="化验指标统计" name="analysis"></el-tab-pane>
4 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 6
     <el-tab-pane label="患者血压统计" name="bloodPressure"></el-tab-pane>
7 7
     <el-tab-pane label="患者体重统计" name="weight"></el-tab-pane>
8 8
   </el-tabs>

+ 25 - 1
src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue Zobrazit soubor

@@ -92,7 +92,8 @@
92 92
 
93 93
         <el-table-column :label="item_name" align="center">
94 94
           <template slot-scope="scope">
95
-            {{scope.row.inspect_value}}
95
+            {{getValue(scope.row)}}
96
+
96 97
           </template>
97 98
         </el-table-column>
98 99
 
@@ -152,6 +153,7 @@
152 153
 
153 154
           }
154 155
         },
156
+        total:0,
155 157
         item_name: '',
156 158
         query: {
157 159
           patient_id: '',
@@ -241,6 +243,26 @@
241 243
       }
242 244
     },
243 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 266
       getTimestamp(time) {
245 267
         // 把时间日期转成时间戳
246 268
         return new Date(time).getTime() / 1000;
@@ -437,6 +459,8 @@
437 459
               for (let i = 0; i < resp.data.data.length; i++) {
438 460
                 this.tableData.push(resp.data.data[i])
439 461
               }
462
+              this.total = resp.data.total
463
+              console.log(this.total)
440 464
 
441 465
             } else {
442 466
               this.$toast({

+ 40 - 24
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue Zobrazit soubor

@@ -44,15 +44,15 @@
44 44
         ></el-option>
45 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 57
       <label class="title">
58 58
         <span class="name">日期查询</span> :
@@ -88,7 +88,7 @@
88 88
     <el-container>
89 89
       <div style="width:150px">
90 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 92
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
93 93
                   highlight-current-row
94 94
                   @current-change="handleChange">
@@ -358,6 +358,12 @@
358 358
         this.GetPatientInspectionIndexBarChart(this.query)
359 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 368
       querySearchAsync(keyword, cb) {
363 369
         let key = ''
@@ -380,6 +386,30 @@
380 386
           if (response.data.state == 1) {
381 387
             var patients = response.data.data.patients
382 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,20 +614,6 @@
584 614
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
585 615
       this.query.end_time = year + '-' + month + '-' + day
586 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 619
       this.getCurrentOrgPatients()

+ 23 - 6
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue Zobrazit soubor

@@ -69,7 +69,7 @@
69 69
         <el-container>
70 70
           <div style="width:150px">
71 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 73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74 74
                       highlight-current-row
75 75
                       @current-change="handleChange">
@@ -88,7 +88,7 @@
88 88
             </div>
89 89
             <div class="tableTitle">统计表</div>
90 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 92
                 <el-table-column fixed label="监测时间" align="center">
93 93
                   <template slot-scope="scope">
94 94
                     <!--{{getTime(scope.row.operate_time)}}-->
@@ -229,11 +229,9 @@
229 229
           }
230 230
         },
231 231
         patientsData:[],
232
-        tableData: [
233
-        ],
234 232
         loading: false,
235 233
         search_value: '',
236
-        total: '',
234
+        total: 0,
237 235
         query: {
238 236
           patient_id: '',
239 237
           statistics_type: 1,
@@ -499,6 +497,8 @@
499 497
               for (let i = 0; i < resp.data.data.length; i++) {
500 498
                 this.tableData.push(resp.data.data[i])
501 499
               }
500
+              this.total = resp.data.data.total
501
+
502 502
             } else {
503 503
               this.loading = false
504 504
             }
@@ -537,6 +537,11 @@
537 537
         this.query.page = 1
538 538
         this.GetDialysisWatchTableData(this.query)
539 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 547
       querySearchAsync(keyword, cb) {
@@ -561,9 +566,21 @@
561 566
           if(response.data.state == 1){
562 567
             var patients = response.data.data.patients
563 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 584
     }, created() {
568 585
       var date = new Date()
569 586
       var year = date.getFullYear() //获取完整的年份(4位)

+ 9 - 1
src/xt_pages/qcd/indicatorControlAnalysis/patientInspectionDetail.vue Zobrazit soubor

@@ -53,7 +53,7 @@
53 53
       <el-container>
54 54
         <div style="width:150px">
55 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 57
                     :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
58 58
                     highlight-current-row
59 59
                     @current-change="handleChange">
@@ -316,6 +316,14 @@
316 316
           if (response.data.state == 1) {
317 317
             var patients = response.data.data.patients
318 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 329
       }, handleChange(val) {

+ 96 - 64
src/xt_pages/qcd/indicatorControlAnalysis/process.vue Zobrazit soubor

@@ -26,7 +26,8 @@
26 26
 
27 27
             </el-form-item>
28 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 31
             <el-option
31 32
               v-for="item in options"
32 33
               :key="item.value"
@@ -69,7 +70,8 @@
69 70
         <el-container>
70 71
           <div style="width:150px">
71 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 75
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74 76
                       highlight-current-row
75 77
                       @current-change="handleChange">
@@ -84,16 +86,17 @@
84 86
           <div style="padding-left:10px;flex:1">
85 87
             <div class="tableTitle">指标趋势</div>
86 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 91
               <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
89 92
 
90 93
             </div>
91 94
             <div class="tableTitle">统计表</div>
92 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 98
                   <template slot-scope="scope">
96
-                    {{scope.row.schedule_date | parseTime("{y}-{m}-{d}") }}
99
+                    {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
97 100
                     <!--{{getTime(scope.row.schedule_date)}}-->
98 101
                   </template>
99 102
                 </el-table-column>
@@ -118,28 +121,32 @@
118 121
 
119 122
                 <el-table-column label="透前体重" align="center">
120 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 127
                   </template>
124 128
                 </el-table-column>
125 129
 
126 130
                 <el-table-column label="透后体重" align="center">
127 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 135
                   </template>
131 136
                 </el-table-column>
132 137
 
133 138
                 <el-table-column label="目标超滤量" align="center">
134 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 143
                   </template>
138 144
                 </el-table-column>
139 145
 
140 146
                 <el-table-column label="实际超滤量" align="center">
141 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 151
                   </template>
145 152
                 </el-table-column>
@@ -147,7 +154,11 @@
147 154
 
148 155
                 <el-table-column label="透前血压" align="center">
149 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 164
                   </template>
@@ -155,7 +166,11 @@
155 166
 
156 167
                 <el-table-column label="透后血压" align="center">
157 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 176
                   </template>
@@ -164,14 +179,16 @@
164 179
 
165 180
                 <el-table-column label="透前脉率" align="center">
166 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 185
                   </template>
170 186
                 </el-table-column>
171 187
 
172 188
                 <el-table-column label="透后脉率" align="center">
173 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 193
                   </template>
177 194
                 </el-table-column>
@@ -193,16 +210,15 @@
193 210
 
194 211
                 <el-table-column label="钾" align="center">
195 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 215
                   </template>
199 216
                 </el-table-column>
200 217
 
201 218
 
202
-
203 219
                 <el-table-column label="钠" align="center">
204 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 223
                   </template>
208 224
                 </el-table-column>
@@ -210,7 +226,7 @@
210 226
 
211 227
                 <el-table-column label="钙" align="center">
212 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 231
                   </template>
216 232
                 </el-table-column>
@@ -218,8 +234,10 @@
218 234
 
219 235
                 <el-table-column label="透析时长" align="center">
220 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 241
                   </template>
224 242
 
225 243
                 </el-table-column>
@@ -265,21 +283,17 @@
265 283
   import NewNav from '../indicatorControlAnalysis/components/NewNav'
266 284
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
267 285
   import LineChart from '../../qcd/components/LineChart'
268
-  import { getCurrentOrgPatients } from "@/api/common/common";
286
+  import { getCurrentOrgPatients } from '@/api/common/common'
269 287
   import {
270
-    GetDefalutPatient,
288
+    GetDefaultPatient,
271 289
     GetDialysisProcessIndexChartData,
272 290
     GetDialysisProcessIndexTableData
273 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 298
   export default {
285 299
     components: {
@@ -291,16 +305,16 @@
291 305
       return {
292 306
         pickerOptions: {
293 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 315
         loading: false,
302 316
         search_value: '',
303
-        total: '',
317
+        total: 0,
304 318
         query: {
305 319
           patient_id: '',
306 320
           statistics_type: 1,
@@ -326,7 +340,6 @@
326 340
           { path: false, name: '指标评估统计' },
327 341
           { path: false, name: '透析过程指标统计' }
328 342
         ],
329
-        tableData: [],
330 343
         tableData1: [],
331 344
         chart: {
332 345
           title: {
@@ -470,35 +483,35 @@
470 483
     },
471 484
     methods: {
472 485
 
473
-      changeProject(val){
486
+      changeProject(val) {
474 487
         this.query.statistics_type = val
475 488
         this.query.page = 1
476 489
         this.GetDialysisProcessIndexChartData(this.query)
477 490
         // this.GetDialysisProcessIndexTableData(this.query)
478 491
 
479 492
       },
480
-      handleChange(val){
493
+      handleChange(val) {
481 494
         this.query.patient_id = val.id
482 495
         this.query.page = 1
483 496
         this.GetDialysisProcessIndexTableData(this.query)
484 497
         this.GetDialysisProcessIndexChartData(this.query)
485 498
       },
486 499
       handleSizeChange(limit) {
487
-        this.query.limit = limit;
500
+        this.query.limit = limit
488 501
 
489 502
       },
490 503
       handleCurrentChange(page) {
491
-        this.query.page = page;
504
+        this.query.page = page
492 505
 
493 506
       },
494 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 509
         if (time > 0) {
497
-          this.$message.error("结束时间不能小于开始时间");
498
-          this.query.start_time = "";
510
+          this.$message.error('结束时间不能小于开始时间')
511
+          this.query.start_time = ''
499 512
         } else {
500 513
           // this.getDialysisList()
501
-          this.query.page = 1;
514
+          this.query.page = 1
502 515
           this.GetDialysisProcessIndexChartData(this.query)
503 516
           this.GetDialysisProcessIndexTableData(this.query)
504 517
 
@@ -507,12 +520,12 @@
507 520
       },
508 521
       changeEndTime(val) {
509 522
         var time =
510
-          this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
523
+          this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
511 524
         if (time < 0) {
512
-          this.$message.error("结束时间不能小于开始时间");
513
-          this.query.end_time = "";
525
+          this.$message.error('结束时间不能小于开始时间')
526
+          this.query.end_time = ''
514 527
         } else {
515
-          this.query.page = 1;
528
+          this.query.page = 1
516 529
           this.GetDialysisProcessIndexChartData(this.query)
517 530
           this.GetDialysisProcessIndexTableData(this.query)
518 531
 
@@ -520,23 +533,23 @@
520 533
       },
521 534
       getTimestamp(time) {
522 535
         // 把时间日期转成时间戳
523
-        return new Date(time).getTime() / 1000;
536
+        return new Date(time).getTime() / 1000
524 537
       },
525 538
       QueryOperaById: function(val) {
526
-        let vascular_access_desc_name = "";
539
+        let vascular_access_desc_name = ''
527 540
         let vascular_access_desc = getDataConfig(
528
-          "hemodialysis",
529
-          "vascular_access_desc"
530
-        );
541
+          'hemodialysis',
542
+          'vascular_access_desc'
543
+        )
531 544
         for (let i = 0; i < vascular_access_desc.length; i++) {
532 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 553
         let anticoagulan_name = ''
541 554
         var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
542 555
         let anticoagulant = anticoagulantsConfitTwo
@@ -547,8 +560,8 @@
547 560
         }
548 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 565
       }, GetDialysisProcessIndexTableData(params) {
553 566
         this.loading = true
554 567
         this.tableData = []
@@ -561,6 +574,7 @@
561 574
               for (let i = 0; i < resp.data.data.length; i++) {
562 575
                 this.tableData.push(resp.data.data[i])
563 576
               }
577
+              this.total = resp.data.total
564 578
             } else {
565 579
               this.loading = false
566 580
             }
@@ -584,8 +598,6 @@
584 598
                   this.chart.series[0].data.push(resp.data.data[i].value)
585 599
                 }
586 600
               } else {
587
-                console.log("1111111")
588
-                console.log(this.query.statistics_type)
589 601
 
590 602
                 for (let i = 0; i < resp.data.data.length; i++) {
591 603
                   this.bar.xAxis.data.push(resp.data.data[i].name)
@@ -604,6 +616,13 @@
604 616
         this.GetDialysisProcessIndexChartData(this.query)
605 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 627
       querySearchAsync(keyword, cb) {
609 628
         let key = ''
@@ -622,14 +641,27 @@
622 641
       },
623 642
       chooseWay(way) {
624 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 647
             var patients = response.data.data.patients
629 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 665
     }, created() {
634 666
       var date = new Date()
635 667
       var year = date.getFullYear() //获取完整的年份(4位)

+ 19 - 5
src/xt_pages/qcd/indicatorControlAnalysis/weight.vue Zobrazit soubor

@@ -69,7 +69,7 @@
69 69
         <el-container>
70 70
           <div style="width:150px">
71 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 73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74 74
                       highlight-current-row
75 75
                       @current-change="handleChange">
@@ -138,7 +138,7 @@
138 138
 
139 139
                 <el-table-column label="体重增加" align="center">
140 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 143
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
144 144
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
@@ -184,7 +184,7 @@
184 184
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
185 185
   import LineChart from '../../qcd/components/LineChart'
186 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 189
   import {
190 190
     PostSearch
@@ -212,7 +212,7 @@
212 212
         ],
213 213
         loading: false,
214 214
         search_value: '',
215
-        total: '',
215
+        total: 0,
216 216
         query: {
217 217
           patient_id: '',
218 218
           statistics_type: 1,
@@ -469,6 +469,8 @@
469 469
               for (let i = 0; i < resp.data.data.length; i++) {
470 470
                 this.tableData.push(resp.data.data[i])
471 471
               }
472
+              this.total = resp.data.total
473
+
472 474
             } else {
473 475
               this.loading = false
474 476
             }
@@ -499,6 +501,11 @@
499 501
         this.query.page = 1
500 502
         this.GetDialysisWeightChartData(this.query)
501 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 511
       querySearchAsync(keyword, cb) {
@@ -523,9 +530,16 @@
523 530
           if(response.data.state == 1){
524 531
             var patients = response.data.data.patients
525 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 543
     }, created() {
530 544
       var date = new Date()
531 545
       var year = date.getFullYear() //获取完整的年份(4位)

+ 17 - 7
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue Zobrazit soubor

@@ -29,7 +29,7 @@
29 29
         <el-container>
30 30
           <div style="width:150px">
31 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 33
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
34 34
                       highlight-current-row
35 35
                       @current-change="handleChange">
@@ -142,7 +142,7 @@
142 142
 
143 143
                 <el-table-column label="体重增加" align="center">
144 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 147
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
148 148
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
@@ -196,11 +196,10 @@ export default {
196 196
         }
197 197
       },
198 198
       patientsData:[],
199
-      tableData: [
200
-      ],
199
+      tableData: [],
201 200
       loading: false,
202 201
       search_value: '',
203
-      total: '',
202
+      total: 0,
204 203
       query: {
205 204
         patient_id: '',
206 205
         statistics_type: 1,
@@ -326,16 +325,16 @@ export default {
326 325
       return new Date(time).getTime() / 1000;
327 326
     },GetDialysisWeightTableData(params) {
328 327
       this.loading = true
329
-      this.tableData = []
330 328
       GetDialysisWeightTableData(params)
331 329
         .then(rs => {
332 330
           var resp = rs.data
333 331
           if (resp.state == 1) {
334 332
             this.loading = false
335
-
333
+            this.tableData = []
336 334
             for (let i = 0; i < resp.data.data.length; i++) {
337 335
               this.tableData.push(resp.data.data[i])
338 336
             }
337
+            this.total = resp.data.total
339 338
           } else {
340 339
             this.loading = false
341 340
           }
@@ -366,6 +365,11 @@ export default {
366 365
       this.query.page = 1
367 366
       this.GetDialysisPatientWeightChartData(this.query)
368 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 375
     querySearchAsync(keyword, cb) {
@@ -387,6 +391,12 @@ export default {
387 391
         if(response.data.state == 1){
388 392
           var patients = response.data.data.patients
389 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 Zobrazit soubor

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