Browse Source

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

csx 4 years ago
parent
commit
e673fcfd19

+ 2 - 3
src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue View File

@@ -75,13 +75,13 @@
75 75
       <el-table :data="tableData" style="width: 100%" :height="tableHeight">
76 76
 
77 77
 
78
-        <el-table-column label="姓名" align="center">
78
+        <el-table-column fixed label="姓名" align="center">
79 79
           <template slot-scope="scope">
80 80
             {{scope.row.patient.name}}
81 81
           </template>
82 82
         </el-table-column>
83 83
 
84
-        <el-table-column fixed label="检查日期" align="center">
84
+        <el-table-column  label="检查日期" align="center">
85 85
           <template slot-scope="scope">
86 86
             <!--{{getTime(scope.row.inspect_date)}}-->
87 87
             {{scope.row.inspect_date | parseTime('{y}-{m}-{d}') }}
@@ -474,7 +474,6 @@
474 474
                 this.tableData.push(resp.data.data[i])
475 475
               }
476 476
               this.total = resp.data.total
477
-              console.log(this.total)
478 477
 
479 478
             } else {
480 479
               this.$toast({

+ 15 - 1
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue View File

@@ -141,6 +141,8 @@
141 141
     },
142 142
     data() {
143 143
       return {
144
+        percent:[],
145
+
144 146
         pickerOptions: {
145 147
           disabledDate(time) {
146 148
             let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
@@ -197,7 +199,17 @@
197 199
                 normal: {
198 200
                   show: true,
199 201
                   position: 'top',
200
-                  formatter: '{c}'
202
+                  formatter: (params) => {
203
+                    if(this.percent.length > 0){
204
+                      let str = ''
205
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
206
+                      return str
207
+                    }else{
208
+                      let str = ''
209
+                      str = params.data
210
+                      return str
211
+                    }
212
+                  }
201 213
                 }
202 214
               },
203 215
               //配置样式
@@ -568,6 +580,8 @@
568 580
               for (let i = 0; i < resp.data.data.length; i++) {
569 581
                 this.options.xAxis.data.push(resp.data.data[i].name)
570 582
                 this.options.series[0].data.push(resp.data.data[i].total)
583
+                this.percent.push(resp.data.data[i].ratio)
584
+
571 585
               }
572 586
 
573 587
             } else {

+ 1 - 1
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue View File

@@ -356,7 +356,7 @@ export default {
356 356
           if (resp.state == 1) {
357 357
             for (let i = 0; i < resp.data.data.length; i++) {
358 358
               this.chart.xAxis.data.push(resp.data.data[i].date)
359
-              this.chart.series[0].data.push(resp.data.data[i].value)
359
+              this.chart.series[0].data.push(parseFloat(resp.data.data[i].value).toFixed(1))
360 360
             }
361 361
           } else {
362 362
           }

+ 23 - 1
src/xt_pages/qcd/workAnalysis/doctor.vue View File

@@ -132,6 +132,8 @@ export default {
132 132
   },
133 133
   data() {
134 134
     return {
135
+      percent:[],
136
+
135 137
       pickerOptions: {
136 138
         disabledDate(time) {
137 139
           let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
@@ -200,7 +202,17 @@ export default {
200 202
               normal: {
201 203
                 show: true,
202 204
                 position: "top",
203
-                formatter: "{c}人次"
205
+                formatter: (params) => {
206
+                  if(this.percent.length > 0){
207
+                    let str = ''
208
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
209
+                    return str
210
+                  }else{
211
+                    let str = ''
212
+                    str = params.data
213
+                    return str
214
+                  }
215
+                }
204 216
               }
205 217
             },
206 218
             //配置样式
@@ -300,6 +312,10 @@ export default {
300 312
 
301 313
         })
302 314
     },
315
+    getTimestamp(time) {
316
+      // 把时间日期转成时间戳
317
+      return new Date(time).getTime() / 1000;
318
+    },
303 319
     changeTime(val) {
304 320
       var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
305 321
       if (time > 0) {
@@ -327,12 +343,18 @@ export default {
327 343
               if(this.query.statistics_type == 1){
328 344
 
329 345
                 this.bar.series[0].data.push(resp.data.data[i].p_count)
346
+                this.percent.push(resp.data.data[i].p_ratio)
347
+
330 348
 
331 349
               }else if(this.query.statistics_type == 2){
332 350
                 this.bar.series[0].data.push(resp.data.data[i].course_count)
351
+                this.percent.push(resp.data.data[i].course_ratio)
352
+
333 353
 
334 354
               }else if(this.query.statistics_type == 3){
335 355
                 this.bar.series[0].data.push(resp.data.data[i].rescue_count)
356
+                this.percent.push(resp.data.data[i].rescue_ratio)
357
+
336 358
 
337 359
               }
338 360
             }

+ 20 - 1
src/xt_pages/qcd/workAnalysis/nurse.vue View File

@@ -175,6 +175,7 @@
175 175
     },
176 176
     data() {
177 177
       return {
178
+        percent:[],
178 179
         pickerOptions: {
179 180
           disabledDate(time) {
180 181
             let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
@@ -244,7 +245,17 @@
244 245
                 normal: {
245 246
                   show: true,
246 247
                   position: "top",
247
-                  formatter: "{c}人次"
248
+                  formatter: (params) => {
249
+                    if(this.percent.length > 0){
250
+                      let str = ''
251
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
252
+                      return str
253
+                    }else{
254
+                      let str = ''
255
+                      str = params.data
256
+                      return str
257
+                    }
258
+                  }
248 259
                 }
249 260
               },
250 261
               //配置样式
@@ -344,6 +355,10 @@
344 355
 
345 356
           })
346 357
       },
358
+      getTimestamp(time) {
359
+        // 把时间日期转成时间戳
360
+        return new Date(time).getTime() / 1000;
361
+      },
347 362
       changeTime(val) {
348 363
         var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
349 364
         if (time > 0) {
@@ -371,17 +386,21 @@
371 386
                 if(this.query.statistics_type == 1){
372 387
 
373 388
                   this.bar.series[0].data.push(resp.data.data[i].puncture_count)
389
+                  this.percent.push(resp.data.data[i].puncture_ratio)
374 390
 
375 391
                 }else if(this.query.statistics_type == 2){
376 392
 
377 393
                   this.bar.series[0].data.push(resp.data.data[i].change_medicine_count)
394
+                  this.percent.push(resp.data.data[i].change_medicine_ratio)
378 395
 
379 396
 
380 397
                 }else if(this.query.statistics_type == 3){
381 398
                   this.bar.series[0].data.push(resp.data.data[i].cure_count)
399
+                  this.percent.push(resp.data.data[i].cure_ratio)
382 400
 
383 401
                 }else if(this.query.statistics_type == 4){
384 402
                   this.bar.series[0].data.push(resp.data.data[i].mission_count)
403
+                  this.percent.push(resp.data.data[i].mission_ratio)
385 404
 
386 405
                 }
387 406
               }