浏览代码

Merge remote-tracking branch 'origin/superman' into superman

csx 6 年前
父节点
当前提交
b6a7bd1510

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

@@ -41,4 +41,18 @@ export function GetPADialysisAgeData(params) {
41 41
     method: 'get',
42 42
     params: params
43 43
   })
44
+}
45
+export function GetPAWeightData(params) {
46
+  return request({
47
+    url: '/api/qcd/paweightdata',
48
+    method: 'get',
49
+    params: params
50
+  })
51
+}
52
+export function GetPABloodPressureData(params) {
53
+  return request({
54
+    url: '/api/qcd/pabloodpressuredata',
55
+    method: 'get',
56
+    params: params
57
+  })
44 58
 }

文件差异内容过多而无法显示
+ 522 - 495
src/router/index.js


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

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
 <div>
3 3
   <!-- <router-link to="/dialysis/details"> -->
4
-    <div class="patient" v-for="schedule in schedules" :class="borderColor(schedule)"  @click="detailAction(schedule)" :key="schedule.id"> 
4
+    <div class="patient" v-for="schedule in schedules" v-if="schedule.patient" :class="borderColor(schedule)"  @click="detailAction(schedule)" :key="schedule.id"> 
5 5
         <div class="kehu" >
6 6
           <div class="tx">
7 7
             <img :src="schedule.patient.avatar.length > 0 ? schedule.patient.avatar : '../../assets/home/analyze.png'" alt="">

+ 1 - 1
src/xt_pages/qcd/components/BarChart.vue 查看文件

@@ -21,7 +21,7 @@ export default {
21 21
     },
22 22
     height: {
23 23
       type: String,
24
-      default: '300px'
24
+      default: '350px'
25 25
     },
26 26
     title:{
27 27
       type: String,

+ 1 - 1
src/xt_pages/qcd/components/PieChart.vue 查看文件

@@ -19,7 +19,7 @@ export default {
19 19
     },
20 20
     height: {
21 21
       type: String,
22
-      default: '320px'
22
+      default: '350px'
23 23
     },
24 24
     title:{
25 25
       type: String,

+ 146 - 42
src/xt_pages/qcd/patientAnalysis/bloodPressure.vue 查看文件

@@ -36,16 +36,17 @@
36 36
           value-format="yyyy-MM-dd"
37 37
         ></el-date-picker>
38 38
       </div>
39
+      
39 40
       <div class="cell clearfix">
40 41
         <label class="title">
41
-          <span class="name">转归状态</span> :
42
+          <span class="name">透析阶段</span> :
42 43
         </label>
43 44
         <div class="time">
44 45
           <ul class>
45 46
             <li
46
-              :class="item.lapseto==lapsetoType?'active':''"
47
-              @click="selectLapseTo( item.lapseto)"
48
-              v-for="item in lapsetoState"
47
+              :class="item.value==dialysisStageType?'active':''"
48
+              @click="selectDialysisStage( item.value)"
49
+              v-for="item in dialysisStage"
49 50
               :key="item.value"
50 51
             >{{item.label}}</li>
51 52
           </ul>
@@ -53,14 +54,14 @@
53 54
       </div>
54 55
       <div class="cell clearfix">
55 56
         <label class="title">
56
-          <span class="name">年龄</span> :
57
+          <span class="name">转归状态</span> :
57 58
         </label>
58 59
         <div class="time">
59 60
           <ul class>
60 61
             <li
61
-              :class="item.age==ageType?'active':''"
62
-              @click="selectAge( item.age)"
63
-              v-for="item in ageOptions"
62
+              :class="item.lapseto==lapsetoType?'active':''"
63
+              @click="selectLapseTo( item.lapseto)"
64
+              v-for="item in lapsetoState"
64 65
               :key="item.value"
65 66
             >{{item.label}}</li>
66 67
           </ul>
@@ -73,7 +74,7 @@
73 74
       <el-row :gutter="32">
74 75
         <el-col :xs="24" :sm="24" :lg="24">
75 76
           <div class="chart-wrapper">
76
-              <pie-chart title="留治情况" :options="CompletionOptions"/>
77
+              <pie-chart title="血压(从次)" :options="CompletionOptions"/>
77 78
           </div>
78 79
         </el-col>
79 80
       </el-row>
@@ -90,17 +91,37 @@
90 91
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
91 92
       >
92 93
         
93
-        <el-table-column  label="透析号" min-width="100" property="dialysis_no" align="center">
94
+        
95
+        <el-table-column  label="透析日期" min-width="80" property="schedule_date" align="center">
96
+          <template slot-scope="scope"><span>{{getTime(scope.row.schedule_date, '{y}{m}{d}')}}</span></template>
94 97
         </el-table-column>
95
-        <el-table-column  label="患者姓名" min-width="100" property="name" align="center">
98
+        <el-table-column  label="透析号" min-width="100" property="patient" align="center">
99
+          <template slot-scope="scope"><span>{{scope.row.patient.dialysis_no}}</span></template>
96 100
         </el-table-column>
97
-        <el-table-column  label="性别" min-width="80" property="gender" align="center">
98
-          <template slot-scope="scope"><span>{{getPatientGender(scope.row.gender)}}</span></template>
101
+        <el-table-column  label="患者姓名" min-width="100" property="patient" align="center">
102
+          <template slot-scope="scope"><span>{{scope.row.patient.name}}</span></template>
99 103
         </el-table-column>
100
-        <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
101
-          <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
104
+        <el-table-column  label="性别" min-width="80" property="patient" align="center">
105
+          <template slot-scope="scope"><span>{{getPatientGender(scope.row.patient.gender)}}</span></template>
106
+        </el-table-column>
107
+        <el-table-column  label="年龄" min-width="80" property="patient" align="center">
108
+          <template slot-scope="scope"><span>{{tranAge(scope.row.patient.birthday)}}</span></template>
109
+        </el-table-column>
110
+        <el-table-column  label="转归状态" min-width="80" property="patient" align="center">
111
+          <template slot-scope="scope"><span>{{tranLapseto(scope.row.patient.lapseto)}}</span></template>
112
+        </el-table-column>
113
+        <el-table-column  label="透前血压//mmHg" min-width="80" property="assessment_before_dislysis" align="center" :render-header="renderheader">
114
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis&&scope.row.assessment_before_dislysis.systolic_blood_pressure&&scope.row.assessment_before_dislysis.diastolic_blood_pressure? scope.row.assessment_before_dislysis.systolic_blood_pressure +'/'+scope.row.assessment_before_dislysis.diastolic_blood_pressure:'--'}}</span></template>
115
+        </el-table-column>
116
+        <el-table-column  label="透析中最低血压//mmHg" min-width="80" property="monitor_records" align="center" :render-header="renderheader">
117
+          <template slot-scope="scope"><span>{{minBloodPressure(scope.row.monitor_records)}}</span></template>
118
+        </el-table-column>
119
+        <el-table-column  label="透析中最高血压//mmHg" min-width="80" property="monitor_records" align="center" :render-header="renderheader">
120
+          <template slot-scope="scope"><span>{{maxBloodPressure(scope.row.monitor_records)}}</span></template>
121
+        </el-table-column>
122
+        <el-table-column  label="透后血压//mmHg" min-width="80" property="assessment_after_dislysis" align="center" :render-header="renderheader">
123
+          <template slot-scope="scope"><span>{{scope.row.assessment_after_dislysis&&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:'--'}}</span></template>
102 124
         </el-table-column>
103
-        
104 125
       </el-table>
105 126
 
106 127
       <!-- <pagi-nation title="分页"></pagi-nation> -->
@@ -123,7 +144,7 @@
123 144
 
124 145
 
125 146
 <script>
126
-import { GetPATotalData  } from "@/api/qcd";
147
+import { GetPABloodPressureData  } from "@/api/qcd";
127 148
 import PieChart from '../components/PieChart'
128 149
 import {jsGetAge, uParseTime} from "@/utils/tools";
129 150
 import analysisNav from './components/analysisNav'
@@ -156,13 +177,11 @@ export default {
156 177
         { value: 1, label: "转出", source: 0, lapseto: 2 },
157 178
         { value: 2, label: "留治", source: 0, lapseto: 1 }
158 179
       ],
159
-      ageType: 0,
160
-      ageOptions: [
161
-        { value: 0, label: "全部", age: 0 },
162
-        { value: 1, label: "20~30", age: 1 },
163
-        { value: 2, label: "30~40", age: 2 },
164
-        { value: 3, label: "40~50", age: 3 },
165
-        { value: 4, label: "其他", age: 4 },
180
+      dialysisStageType:0,
181
+      dialysisStage: [
182
+        { value: 0, label: "全部", },
183
+        { value: 1, label: "透前",  },
184
+        { value: 2, label: "透后", }
166 185
       ],
167 186
     };
168 187
   },
@@ -192,31 +211,52 @@ export default {
192 211
   },
193 212
   methods: {
194 213
     getList() {
195
-      GetPATotalData(this.listQuery).then(response => {
214
+      GetPABloodPressureData(this.listQuery).then(response => {
196 215
         if (response.data.state == 0) {
197 216
           this.$message.error(response.data.msg);
198 217
           return false;
199 218
         } else {
200 219
             this.tableData = [];
201 220
             this.total = response.data.data.total;
202
-            var patients = response.data.data.patients;
203
-            for (const index in patients) {
204
-                this.tableData.push(patients[index]);
221
+            var blood_pressures = response.data.data.blood_pressures;
222
+            for (const index in blood_pressures) {
223
+                this.tableData.push(blood_pressures[index]);
205 224
             }
206
-            var lapsetoIn = response.data.data.lapsetoIn;
207
-            var lapsetoOut = response.data.data.lapsetoOut;
208 225
             this.CompletionOptions = {
209 226
                 legend:[],
210 227
                 series:[],
211 228
             };
212
-            this.CompletionOptions.legend.push('留治病人');
213
-            this.CompletionOptions.series.push({
214
-                value:lapsetoIn,name:'留治病人'
215
-            });
216
-            this.CompletionOptions.legend.push('转出病人');
217
-            this.CompletionOptions.series.push({
218
-                value:lapsetoOut,name:'转出病人'
219
-            });
229
+            
230
+            var bpOptions = [
231
+              { blood:1, name:'< 140 /90mmHg' },
232
+              { blood:2, name:'>160 /100mmHg' },
233
+              { blood:3, name:'140~160mmHg/90~100mmHg' },
234
+            ];
235
+            var other = response.data.data.total;
236
+            var bps = response.data.data.bps;
237
+            var bpsMap = {};
238
+            for (const index in bps) {
239
+              bpsMap[bps[index].blood] = bps[index].count;
240
+              other -= bps[index].count;
241
+            }
242
+            for (const index in bpOptions) {
243
+              this.CompletionOptions.legend.push(bpOptions[index].name);
244
+              if(bpOptions[index].blood in bpsMap) {
245
+                this.CompletionOptions.series.push({
246
+                    value:bpsMap[bpOptions[index].blood],name:bpOptions[index].name
247
+                });
248
+              }else {
249
+                this.CompletionOptions.series.push({
250
+                    value:0,name:bpOptions[index].name
251
+                });
252
+              }
253
+            }
254
+            if (other > 0) {
255
+              this.CompletionOptions.legend.push('其他');
256
+              this.CompletionOptions.series.push({
257
+                  value:other,name:'其他'
258
+              });
259
+            }
220 260
         }
221 261
       });
222 262
     },
@@ -239,12 +279,11 @@ export default {
239 279
       this.listQuery.lapseto = lapseto;
240 280
       this.getList();
241 281
     },
242
-    selectAge(age) {
243
-      this.ageType = age;
244
-      this.listQuery.age = age;
282
+    selectDialysisStage(dialysis_stage) {
283
+      this.dialysisStageType = dialysis_stage;
284
+      this.listQuery.dialysis_stage = dialysis_stage;
245 285
       this.getList();
246 286
     },
247
-    
248 287
     getTime(value, temp) {
249 288
         if (value != undefined) {
250 289
           return uParseTime(value, temp)
@@ -257,6 +296,14 @@ export default {
257 296
     getPatientName(id) {
258 297
       return (id in this.patientMap) ? this.patientMap[id].name:'';
259 298
     },
299
+    tranLapseto(lapseto) {
300
+      if (lapseto == 1) {
301
+        return '留治';
302
+      } else if(lapseto == 2) {
303
+        return '转出';
304
+      }
305
+      return '';
306
+    },
260 307
     getPatientGender(gender) {
261 308
       if (gender == 1) {
262 309
         return '男';
@@ -283,6 +330,63 @@ export default {
283 330
             h('span', {}, column.label.split('//')[1])
284 331
         ])
285 332
     },
333
+    maxBloodPressure(records){
334
+      if (typeof(records) == "undefined" || !records || records.length == 0) {
335
+        return '--';
336
+      }
337
+      var arr = [];
338
+      for (const key in records) {
339
+        arr.push(records[key]);
340
+      }
341
+      if(arr.length == 0) {
342
+        return '--';
343
+      }
344
+
345
+      var sortData = this.selectionSort(arr);
346
+      arr = [];
347
+      for (const key in sortData) {
348
+        arr.push(sortData[key]);
349
+      }
350
+      var index = arr.length - 1;
351
+      return arr[index].systolic_blood_pressure + '/' + arr[index].diastolic_blood_pressure
352
+    },
353
+    minBloodPressure(records){
354
+      
355
+      if (typeof(records) == "undefined" || !records || records.length == 0) {
356
+        return '--';
357
+      }
358
+      var arr = [];
359
+      for (const key in records) {
360
+        arr.push(records[key]);
361
+      }
362
+      if(arr.length == 0) {
363
+        return '--';
364
+      }
365
+
366
+      var sortData = this.selectionSort(arr);
367
+      arr = [];
368
+      for (const key in sortData) {
369
+        arr.push(sortData[key]);
370
+      }
371
+      var index = 0;
372
+      return arr[index].systolic_blood_pressure + '/' + arr[index].diastolic_blood_pressure
373
+    },
374
+    selectionSort(arr) {
375
+      var len = arr.length;
376
+      var minIndex, temp;
377
+      for (var i = 0; i < len - 1; i++) {
378
+          minIndex = i;
379
+          for (var j = i + 1; j < len; j++) {
380
+              if (arr[j].systolic_blood_pressure < arr[minIndex].systolic_blood_pressure || (arr[j].systolic_blood_pressure == arr[minIndex].systolic_blood_pressure && arr[j].diastolic_blood_pressure < arr[minIndex].diastolic_blood_pressure)) {     //寻找最小的数
381
+                  minIndex = j;                 //将最小数的索引保存
382
+              }
383
+          }
384
+          temp = arr[i];
385
+          arr[i] = arr[minIndex];
386
+          arr[minIndex] = temp;
387
+      }
388
+      return arr;
389
+    },
286 390
   },
287 391
   components: {
288 392
       analysisNav,

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/dialysisAge.vue 查看文件

@@ -115,7 +115,7 @@
115 115
         <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
116 116
           <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
117 117
         </el-table-column>
118
-        <el-table-column  label="转状态" min-width="80" property="lapseto" align="center">
118
+        <el-table-column  label="转状态" min-width="80" property="lapseto" align="center">
119 119
           <template slot-scope="scope"><span>{{tranLapseto(scope.row.lapseto)}}</span></template>
120 120
         </el-table-column>
121 121
         <el-table-column  label="首次透析日期" min-width="80" property="first_dialysis_date" align="center">

+ 169 - 24
src/xt_pages/qcd/patientAnalysis/weight.vue 查看文件

@@ -71,9 +71,19 @@
71 71
       <h4 class="hui">统计图</h4>
72 72
       <hr class="huixiao">
73 73
       <el-row :gutter="32">
74
-        <el-col :xs="24" :sm="24" :lg="24">
74
+        <el-col :xs="24" :sm="24" :lg="8">
75 75
           <div class="chart-wrapper">
76
-              <pie-chart title="留治情况" :options="CompletionOptions"/>
76
+              <pie-chart title="干体重(人次)" :options="CompletionOptions"/>
77
+          </div>
78
+        </el-col>
79
+        <el-col :xs="24" :sm="24" :lg="8">
80
+          <div class="chart-wrapper">
81
+              <pie-chart title="体重增加(人次)" :options="WeightIncrOptions"/>
82
+          </div>
83
+        </el-col>
84
+        <el-col :xs="24" :sm="24" :lg="8">
85
+          <div class="chart-wrapper">
86
+              <pie-chart title="透后体重(人次)" :options="WeightAfterOptions"/>
77 87
           </div>
78 88
         </el-col>
79 89
       </el-row>
@@ -89,16 +99,36 @@
89 99
         style="width: 100%;margin-top: 10px;"
90 100
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
91 101
       >
92
-        
93
-        <el-table-column  label="透析号" min-width="100" property="dialysis_no" align="center">
102
+      
103
+        <el-table-column  label="透析日期" min-width="80" property="schedule_date" align="center">
104
+          <template slot-scope="scope"><span>{{getTime(scope.row.schedule_date, '{y}{m}{d}')}}</span></template>
105
+        </el-table-column>
106
+        <el-table-column  label="透析号" min-width="100" property="patient" align="center">
107
+          <template slot-scope="scope"><span>{{scope.row.patient.dialysis_no}}</span></template>
108
+        </el-table-column>
109
+        <el-table-column  label="患者姓名" min-width="100" property="patient" align="center">
110
+          <template slot-scope="scope"><span>{{scope.row.patient.name}}</span></template>
111
+        </el-table-column>
112
+        <el-table-column  label="性别" min-width="80" property="patient" align="center">
113
+          <template slot-scope="scope"><span>{{getPatientGender(scope.row.patient.gender)}}</span></template>
114
+        </el-table-column>
115
+        <el-table-column  label="年龄" min-width="80" property="patient" align="center">
116
+          <template slot-scope="scope"><span>{{tranAge(scope.row.patient.birthday)}}</span></template>
94 117
         </el-table-column>
95
-        <el-table-column  label="患者姓名" min-width="100" property="name" align="center">
118
+        <el-table-column  label="转归状态" min-width="80" property="patient" align="center">
119
+          <template slot-scope="scope"><span>{{tranLapseto(scope.row.patient.lapseto)}}</span></template>
96 120
         </el-table-column>
97
-        <el-table-column  label="性别" min-width="80" property="gender" align="center">
98
-          <template slot-scope="scope"><span>{{getPatientGender(scope.row.gender)}}</span></template>
121
+        <el-table-column  label="干体重" min-width="80" property="assessment_before_dislysis" align="center">
122
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.dry_weight + 'Kg':'--'}}</span></template>
99 123
         </el-table-column>
100
-        <el-table-column  label="年龄" min-width="80" property="birthday" align="center">
101
-          <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
124
+        <el-table-column  label="透前体重" min-width="80" property="assessment_before_dislysis" align="center">
125
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.weight_before + 'Kg':'--'}}</span></template>
126
+        </el-table-column>
127
+        <el-table-column  label="体重增加" min-width="80" property="assessment_before_dislysis" align="center">
128
+          <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis?scope.row.assessment_before_dislysis.weight_before - scope.row.assessment_before_dislysis.dry_weight + 'Kg':'--'}}</span></template>
129
+        </el-table-column>
130
+        <el-table-column  label="透后体重" min-width="80" property="assessment_after_dislysis" align="center">
131
+          <template slot-scope="scope"><span>{{scope.row.assessment_after_dislysis?scope.row.assessment_after_dislysis.weight_after+ 'Kg':'--'}}</span></template>
102 132
         </el-table-column>
103 133
         
104 134
       </el-table>
@@ -123,7 +153,7 @@
123 153
 
124 154
 
125 155
 <script>
126
-import { GetPATotalData  } from "@/api/qcd";
156
+import { GetPAWeightData  } from "@/api/qcd";
127 157
 import PieChart from '../components/PieChart'
128 158
 import {jsGetAge, uParseTime} from "@/utils/tools";
129 159
 import analysisNav from './components/analysisNav'
@@ -149,6 +179,14 @@ export default {
149 179
         legend:[],
150 180
         series:[],
151 181
       },
182
+      WeightIncrOptions:{
183
+        legend:[],
184
+        series:[],
185
+      },
186
+      WeightAfterOptions:{
187
+        legend:[],
188
+        series:[],
189
+      },
152 190
       tableData: [],
153 191
       lapsetoType: 0,
154 192
       lapsetoState: [
@@ -192,31 +230,130 @@ export default {
192 230
   },
193 231
   methods: {
194 232
     getList() {
195
-      GetPATotalData(this.listQuery).then(response => {
233
+      GetPAWeightData(this.listQuery).then(response => {
196 234
         if (response.data.state == 0) {
197 235
           this.$message.error(response.data.msg);
198 236
           return false;
199 237
         } else {
200 238
             this.tableData = [];
201 239
             this.total = response.data.data.total;
202
-            var patients = response.data.data.patients;
203
-            for (const index in patients) {
204
-                this.tableData.push(patients[index]);
240
+            var weights = response.data.data.weights;
241
+            for (const index in weights) {
242
+                this.tableData.push(weights[index]);
205 243
             }
206
-            var lapsetoIn = response.data.data.lapsetoIn;
207
-            var lapsetoOut = response.data.data.lapsetoOut;
244
+
208 245
             this.CompletionOptions = {
209 246
                 legend:[],
210 247
                 series:[],
211 248
             };
212
-            this.CompletionOptions.legend.push('留治病人');
213
-            this.CompletionOptions.series.push({
214
-                value:lapsetoIn,name:'留治病人'
215
-            });
216
-            this.CompletionOptions.legend.push('转出病人');
217
-            this.CompletionOptions.series.push({
218
-                value:lapsetoOut,name:'转出病人'
219
-            });
249
+            var dryweightOptions = [
250
+              { weight:1, name:'<40Kg' },
251
+              { weight:2, name:'40~50Kg' },
252
+              { weight:3, name:'50~60Kg' },
253
+              { weight:4, name:'60~70Kg' },
254
+              { weight:5, name:'>=70Kg' },
255
+            ];
256
+            var other = response.data.data.total;
257
+            var dryweight = response.data.data.dryweight;
258
+            var dryweightMap = {};
259
+            for (const index in dryweight) {
260
+              dryweightMap[dryweight[index].weight] = dryweight[index].count;
261
+              other -= dryweight[index].count;
262
+            }
263
+            for (const index in dryweightOptions) {
264
+              this.CompletionOptions.legend.push(dryweightOptions[index].name);
265
+              if(dryweightOptions[index].weight in dryweightMap) {
266
+                this.CompletionOptions.series.push({
267
+                    value:dryweightMap[dryweightOptions[index].weight],name:dryweightOptions[index].name
268
+                });
269
+              }else {
270
+                this.CompletionOptions.series.push({
271
+                    value:0,name:dryweightOptions[index].name
272
+                });
273
+              }
274
+            }
275
+            if (other > 0) {
276
+              this.CompletionOptions.legend.push('其他');
277
+              this.CompletionOptions.series.push({
278
+                  value:other,name:'其他'
279
+              });
280
+            }
281
+
282
+            this.WeightIncrOptions = {
283
+                legend:[],
284
+                series:[],
285
+            };
286
+            var weightOptions = [
287
+              { weight:1, name:'<1Kg' },
288
+              { weight:2, name:'1~2Kg' },
289
+              { weight:3, name:'2~3Kg' },
290
+              { weight:4, name:'3~4Kg' },
291
+              { weight:5, name:'>=4Kg' },
292
+            ];
293
+            var other = response.data.data.total;
294
+            var weightincrease = response.data.data.weightincrease;
295
+            var weightincreaseMap = {};
296
+            for (const index in weightincrease) {
297
+              weightincreaseMap[weightincrease[index].weight] = weightincrease[index].count;
298
+              other -= weightincrease[index].count;
299
+            }
300
+            for (const index in weightOptions) {
301
+              this.WeightIncrOptions.legend.push(weightOptions[index].name);
302
+              if(weightOptions[index].weight in weightincreaseMap) {
303
+                this.WeightIncrOptions.series.push({
304
+                    value:weightincreaseMap[weightOptions[index].weight],name:weightOptions[index].name
305
+                });
306
+              }else {
307
+                this.WeightIncrOptions.series.push({
308
+                    value:0,name:weightOptions[index].name
309
+                });
310
+              }
311
+            }
312
+            if (other > 0) {
313
+              this.WeightIncrOptions.legend.push('其他');
314
+              this.WeightIncrOptions.series.push({
315
+                  value:other,name:'其他'
316
+              });
317
+            }
318
+
319
+            this.WeightAfterOptions = {
320
+                legend:[],
321
+                series:[],
322
+            };
323
+            var afterWeightOptions = [
324
+              { weight:1, name:'<40Kg' },
325
+              { weight:2, name:'40~50Kg' },
326
+              { weight:3, name:'50~60Kg' },
327
+              { weight:4, name:'60~70Kg' },
328
+              { weight:5, name:'>=70Kg' },
329
+            ];
330
+            var other = response.data.data.total;
331
+            var afterweight = response.data.data.afterweight;
332
+            var afterweightMap = {};
333
+            for (const index in afterweight) {
334
+              afterweightMap[afterweight[index].weight] = afterweight[index].count;
335
+              other -= afterweight[index].count;
336
+            }
337
+            for (const index in weightOptions) {
338
+              this.WeightAfterOptions.legend.push(weightOptions[index].name);
339
+              if(weightOptions[index].weight in afterweightMap) {
340
+                this.WeightAfterOptions.series.push({
341
+                    value:afterweightMap[weightOptions[index].weight],name:weightOptions[index].name
342
+                });
343
+              }else {
344
+                this.WeightAfterOptions.series.push({
345
+                    value:0,name:weightOptions[index].name
346
+                });
347
+              }
348
+            }
349
+            if (other > 0) {
350
+              this.WeightAfterOptions.legend.push('其他');
351
+              this.WeightAfterOptions.series.push({
352
+                  value:other,name:'其他'
353
+              });
354
+            }
355
+
356
+            
220 357
         }
221 358
       });
222 359
     },
@@ -257,6 +394,14 @@ export default {
257 394
     getPatientName(id) {
258 395
       return (id in this.patientMap) ? this.patientMap[id].name:'';
259 396
     },
397
+    tranLapseto(lapseto) {
398
+      if (lapseto == 1) {
399
+        return '留治';
400
+      } else if(lapseto == 2) {
401
+        return '转出';
402
+      }
403
+      return '';
404
+    },
260 405
     getPatientGender(gender) {
261 406
       if (gender == 1) {
262 407
         return '男';

+ 13 - 13
src/xt_permission.js 查看文件

@@ -10,19 +10,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
10 10
 
11 11
 router.beforeEach((to, from, next) => {
12 12
   // 线上注释
13
-  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
-    store.dispatch('VerifyConfigList', []).then(() => {
15
-      next()
16
-    })
17
-  }
18
-  if (store.getters.permission_routers === undefined) {
19
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
20
-      next()
21
-    })
22
-  } else {
23
-    next()
24
-  }
25
-  return
13
+  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
+  //   store.dispatch('VerifyConfigList', []).then(() => {
15
+  //     next()
16
+  //   })
17
+  // }
18
+  // if (store.getters.permission_routers === undefined) {
19
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
20
+  //     next()
21
+  //   })
22
+  // } else {
23
+  //   next()
24
+  // }
25
+  // return
26 26
   // 线上注释
27 27
 
28 28
   NProgress.start()