Browse Source

Merge branch '20200916_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201014_pc_vue_new_branch

csx 4 years ago
parent
commit
7594d0f87d

+ 3 - 3
package-lock.json View File

3515
       "dev": true
3515
       "dev": true
3516
     },
3516
     },
3517
     "element-ui": {
3517
     "element-ui": {
3518
-      "version": "2.13.0",
3519
-      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.0.tgz",
3520
-      "integrity": "sha512-KYsHWsBXYbLELS8cdfvgJTOMSUby3UEjvsPV1V1VmgJ/DdkOAS4z3MiOrPxrT9w2Cc5lZ4eVSQiGhYFR5NVChw==",
3518
+      "version": "2.13.2",
3519
+      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.2.tgz",
3520
+      "integrity": "sha512-r761DRPssMPKDiJZWFlG+4e4vr0cRG/atKr3Eqr8Xi0tQMNbtmYU1QXvFnKiFPFFGkgJ6zS6ASkG+sellcoHlQ==",
3521
       "requires": {
3521
       "requires": {
3522
         "async-validator": "~1.8.1",
3522
         "async-validator": "~1.8.1",
3523
         "babel-helper-vue-jsx-merge-props": "^2.0.0",
3523
         "babel-helper-vue-jsx-merge-props": "^2.0.0",

+ 1 - 1
package.json View File

46
     "driver.js": "0.5.2",
46
     "driver.js": "0.5.2",
47
     "dropzone": "5.2.0",
47
     "dropzone": "5.2.0",
48
     "echarts": "3.8.5",
48
     "echarts": "3.8.5",
49
-    "element-ui": "^2.13.0",
49
+    "element-ui": "^2.13.2",
50
     "file-saver": "^1.3.3",
50
     "file-saver": "^1.3.3",
51
     "font-awesome": "4.7.0",
51
     "font-awesome": "4.7.0",
52
     "js-cookie": "2.2.0",
52
     "js-cookie": "2.2.0",

+ 13 - 13
src/router/modules/qcd.js View File

240
       }
240
       }
241
     },
241
     },
242
     {
242
     {
243
-      path: '/qcd/workAnalysis/doctor',
244
-      component: () => import('@/xt_pages/qcd/workAnalysis/doctor'),
243
+      path: '/qcd/workAnalysis/index',
244
+      component: () => import('@/xt_pages/qcd/workAnalysis/index'),
245
       name: 'workAnalysisDoctor',
245
       name: 'workAnalysisDoctor',
246
       meta: {
246
       meta: {
247
         title: '工作量分析统计',
247
         title: '工作量分析统计',
248
         noCache: true
248
         noCache: true
249
       }
249
       }
250
     },
250
     },
251
-    {
252
-      path: '/qcd/workAnalysis/nurse',
253
-      hidden: true,
254
-      is_menu: false,
255
-      component: () => import('@/xt_pages/qcd/workAnalysis/nurse'),
256
-      name: 'workAnalysisNurse',
257
-      meta: {
258
-        title: '工作量分析统计护士',
259
-        noCache: true
260
-      }
261
-    },
251
+    // {
252
+    //   path: '/qcd/workAnalysis/nurse',
253
+    //   hidden: true,
254
+    //   is_menu: false,
255
+    //   component: () => import('@/xt_pages/qcd/workAnalysis/nurse'),
256
+    //   name: 'workAnalysisNurse',
257
+    //   meta: {
258
+    //     title: '工作量分析统计护士',
259
+    //     noCache: true
260
+    //   }
261
+    // },
262
     {
262
     {
263
       path: '/qcd/patientanalysis/checkStatistical',
263
       path: '/qcd/patientanalysis/checkStatistical',
264
       hidden: true,
264
       hidden: true,

+ 31 - 30
src/xt_pages/data/druguseTemplate.vue View File

50
               border
50
               border
51
               fit
51
               fit
52
               :row-style="{ color: '#303133' }"
52
               :row-style="{ color: '#303133' }"
53
-          :header-cell-style="{
53
+              :header-cell-style="{
54
             backgroundColor: 'rgb(245, 247, 250)',
54
             backgroundColor: 'rgb(245, 247, 250)',
55
             color: '#606266'
55
             color: '#606266'
56
           }"
56
           }"
126
                 prop="amount1"
126
                 prop="amount1"
127
                 align="center"
127
                 align="center"
128
                 label="药品规格">
128
                 label="药品规格">
129
-                  <!-- {{drugDesc(scope.row)}} -->
130
-                  <template slot-scope="scope">
131
-                    <span v-if="scope.row.advice_desc">{{scope.row.advice_desc}}{{scope.row.drug_spec_unit}}</span>
132
-                  </template>
129
+                <!-- {{drugDesc(scope.row)}} -->
130
+                <template slot-scope="scope">
131
+                  <span v-if="scope.row.advice_desc">{{scope.row.advice_desc}}{{scope.row.drug_spec_unit}}</span>
132
+                </template>
133
               </el-table-column>
133
               </el-table-column>
134
 
134
 
135
 
135
 
254
                     </template>
254
                     </template>
255
                   </el-table-column>
255
                   </el-table-column>
256
                   <el-table-column align="center" label="药品规格">
256
                   <el-table-column align="center" label="药品规格">
257
-                      <template slot-scope="scope">
258
-                        <span v-if="scope.row.advice_desc">{{scope.row.advice_desc}}{{scope.row.drug_spec_unit}}</span>
259
-                      </template>
257
+                    <template slot-scope="scope">
258
+                      <span v-if="scope.row.advice_desc">{{scope.row.advice_desc}}{{scope.row.drug_spec_unit}}</span>
259
+                    </template>
260
                   </el-table-column>
260
                   </el-table-column>
261
                   <el-table-column prop="prescribing_number" align="center" label="开药数量">
261
                   <el-table-column prop="prescribing_number" align="center" label="开药数量">
262
                     <template slot-scope="scope" v-if="scope.row.prescribing_number != ''">
262
                     <template slot-scope="scope" v-if="scope.row.prescribing_number != ''">
483
                   </el-col>
483
                   </el-col>
484
                   <el-col :span="12">
484
                   <el-col :span="12">
485
 
485
 
486
-                  <el-form-item label="药品规格 :" prop="advice_desc">
486
+                    <el-form-item label="药品规格 :" prop="advice_desc">
487
                       <el-col :span="8">
487
                       <el-col :span="8">
488
                         <el-input v-model="templateFormEdit.advice_desc"></el-input>
488
                         <el-input v-model="templateFormEdit.advice_desc"></el-input>
489
                       </el-col>
489
                       </el-col>
664
                     </template>
664
                     </template>
665
                   </el-table-column>
665
                   </el-table-column>
666
                   <el-table-column align="center" label="药品规格">
666
                   <el-table-column align="center" label="药品规格">
667
-                      <!-- {{drugDesc(scope.row)}} -->
668
-                      <template slot-scope="scope">
669
-                        <span v-if="scope.row.advice_desc">{{scope.row.advice_desc}}{{scope.row.drug_spec_unit}}</span>
670
-                      </template>
667
+                    <!-- {{drugDesc(scope.row)}} -->
668
+                    <template slot-scope="scope">
669
+                      <span v-if="scope.row.advice_desc">{{scope.row.advice_desc}}{{scope.row.drug_spec_unit}}</span>
670
+                    </template>
671
                   </el-table-column>
671
                   </el-table-column>
672
                   <el-table-column prop="prescribing_number" align="center" label="开药数量">
672
                   <el-table-column prop="prescribing_number" align="center" label="开药数量">
673
                     <template slot-scope="scope" v-if="scope.row.prescribing_number != ''">
673
                     <template slot-scope="scope" v-if="scope.row.prescribing_number != ''">
723
                   </el-col>
723
                   </el-col>
724
                   <el-col :span="12">
724
                   <el-col :span="12">
725
 
725
 
726
-                <el-form-item label="药品规格 :" prop="advice_desc">
726
+                    <el-form-item label="药品规格 :" prop="advice_desc">
727
                       <el-col :span="9">
727
                       <el-col :span="9">
728
                         <el-input v-model="templateForm.advice_desc"></el-input>
728
                         <el-input v-model="templateForm.advice_desc"></el-input>
729
                       </el-col>
729
                       </el-col>
1030
               border
1030
               border
1031
               fit
1031
               fit
1032
               :row-style="{ color: '#303133' }"
1032
               :row-style="{ color: '#303133' }"
1033
-          :header-cell-style="{
1033
+              :header-cell-style="{
1034
             backgroundColor: 'rgb(245, 247, 250)',
1034
             backgroundColor: 'rgb(245, 247, 250)',
1035
             color: '#606266'
1035
             color: '#606266'
1036
           }"
1036
           }"
1106
               border
1106
               border
1107
               fit
1107
               fit
1108
               :row-style="{ color: '#303133' }"
1108
               :row-style="{ color: '#303133' }"
1109
-          :header-cell-style="{
1109
+              :header-cell-style="{
1110
             backgroundColor: 'rgb(245, 247, 250)',
1110
             backgroundColor: 'rgb(245, 247, 250)',
1111
             color: '#606266'
1111
             color: '#606266'
1112
           }"
1112
           }"
1376
           this.loading = true
1376
           this.loading = true
1377
           PostInitAdviceTemplate(params).then(response => {
1377
           PostInitAdviceTemplate(params).then(response => {
1378
             if (response.data.state == 1) {
1378
             if (response.data.state == 1) {
1379
-                this.is_init = response.data.data.init_config.is_init
1379
+              this.is_init = response.data.data.init_config.is_init
1380
               this.getAdviceConfig()
1380
               this.getAdviceConfig()
1381
               this.loading = false
1381
               this.loading = false
1382
 
1382
 
1531
         const params = {
1531
         const params = {
1532
           'data': this.adviceTableData
1532
           'data': this.adviceTableData
1533
         }
1533
         }
1534
-        this.form.name =  encodeURIComponent(this.form.name)
1535
-        postAdviceTemplate(params, this.form.name, this.form.advice_type).then(response => {
1534
+        // this.form.name =  encodeURIComponent(this.form.name)
1535
+        let name = encodeURIComponent(this.form.name)
1536
+        postAdviceTemplate(params, name, this.form.advice_type).then(response => {
1536
           if (response.data.state == 0) {
1537
           if (response.data.state == 0) {
1537
             this.$message.error(response.data.msg)
1538
             this.$message.error(response.data.msg)
1538
             return false
1539
             return false
2532
           }
2533
           }
2533
         })
2534
         })
2534
 
2535
 
2535
-      }
2536
+      },
2536
     }
2537
     }
2537
   }
2538
   }
2538
 </script>
2539
 </script>
2546
     text-align: left;
2547
     text-align: left;
2547
   }
2548
   }
2548
   .el-table td,
2549
   .el-table td,
2549
-.el-table th.is-leaf,
2550
-.el-table--border,
2551
-.el-table--group {
2552
-  border-color: #d0d3da;
2553
-}
2554
-.el-table--border::after,
2555
-.el-table--group::after,
2556
-.el-table::before {
2557
-  background-color: #d0d3da;
2558
-}
2550
+  .el-table th.is-leaf,
2551
+  .el-table--border,
2552
+  .el-table--group {
2553
+    border-color: #d0d3da;
2554
+  }
2555
+  .el-table--border::after,
2556
+  .el-table--group::after,
2557
+  .el-table::before {
2558
+    background-color: #d0d3da;
2559
+  }
2559
 </style>
2560
 </style>
2560
 
2561
 

+ 47 - 1
src/xt_pages/dialysis/details/index.vue View File

623
       treat_state: [
623
       treat_state: [
624
         { value: 0, label: '全部治疗' },
624
         { value: 0, label: '全部治疗' },
625
         { value: 1, label: '待开处方' },
625
         { value: 1, label: '待开处方' },
626
-        { value: 2, label: '待开小结' }
626
+        { value: 2, label: '待开小结' },
627
+        { value: 3, label: '待医嘱核对' },
627
       ],
628
       ],
628
       treatStateVal: 0,
629
       treatStateVal: 0,
629
       schedule_options: [
630
       schedule_options: [
1296
             }
1297
             }
1297
           }
1298
           }
1298
           arr2 = arr
1299
           arr2 = arr
1300
+        } else if(this.treatStateVal == 3){
1301
+          let arr = []
1302
+          arr = JSON.parse(JSON.stringify(arr1))
1303
+          for (let i = 0; i < arr.length; i++) {
1304
+            for (let j = 0; j < arr[i].schedules.length; j++) {
1305
+              if(arr[i].schedules[j].doctor_advice.length == 0){
1306
+                arr[i].schedules.splice(j--, 1)
1307
+              }
1308
+              if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
1309
+                let sign = 0
1310
+                arr[i].schedules[j].doctor_advice.map(item => {
1311
+                  if(item.check_state == 1){
1312
+                    sign++
1313
+                  }
1314
+                })
1315
+                if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
1316
+                  arr[i].schedules.splice(j--, 1)
1317
+                }
1318
+              }
1319
+            }
1320
+          }
1321
+          arr2 = arr
1299
         }
1322
         }
1300
 
1323
 
1301
         let arr3 = []
1324
         let arr3 = []
1437
             }
1460
             }
1438
           }
1461
           }
1439
           arr2 = arr
1462
           arr2 = arr
1463
+        } else if(this.treatStateVal == 3){
1464
+          let arr = []
1465
+          arr = JSON.parse(JSON.stringify(arr1))
1466
+          for (let i = 0; i < arr.length; i++) {
1467
+            for (let j = 0; j < arr[i].schedules.length; j++) {
1468
+              console.log(77777777777,arr[i].schedules)
1469
+              if(arr[i].schedules[j].doctor_advice.length == 0){
1470
+                arr[i].schedules.splice(j--, 1)
1471
+              }
1472
+              if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
1473
+                let sign = 0
1474
+                arr[i].schedules[j].doctor_advice.map(item => {
1475
+                  if(item.check_state == 1){
1476
+                    sign++
1477
+                  }
1478
+                })
1479
+                if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
1480
+                  arr[i].schedules.splice(j--, 1)
1481
+                }
1482
+              }
1483
+            }
1484
+          }
1485
+          arr2 = arr
1440
         }
1486
         }
1441
 
1487
 
1442
         let arr3 = []
1488
         let arr3 = []

+ 23 - 0
src/xt_pages/dialysis/schedualPatient.vue View File

163
           {value: 0,label: '全部'},
163
           {value: 0,label: '全部'},
164
           {value: 1,label: '待开处方'},
164
           {value: 1,label: '待开处方'},
165
           {value: 2,label: '待开小结'},
165
           {value: 2,label: '待开小结'},
166
+          {value: 3,label: '待医嘱核对'},
166
         ],
167
         ],
167
         treatStateVal: 0,
168
         treatStateVal: 0,
168
         allPatient:[]
169
         allPatient:[]
514
             }
515
             }
515
           }
516
           }
516
           arr2 = arr
517
           arr2 = arr
518
+        }else if(this.treatStateVal == 3){
519
+          let arr = []
520
+          arr = JSON.parse(JSON.stringify(arr1))
521
+          for (let i = 0; i < arr.length; i++) {
522
+            for (let j = 0; j < arr[i].schedules.length; j++) {
523
+              if(arr[i].schedules[j].doctor_advice.length == 0){
524
+                arr[i].schedules.splice(j--, 1)
525
+              }
526
+              if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
527
+                let sign = 0
528
+                arr[i].schedules[j].doctor_advice.map(item => {
529
+                  if(item.check_state == 1){
530
+                    sign++
531
+                  }
532
+                })
533
+                if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
534
+                  arr[i].schedules.splice(j--, 1)
535
+                }
536
+              }
537
+            }
538
+          }
539
+          arr2 = arr
517
         }
540
         }
518
 
541
 
519
 
542
 

+ 94 - 16
src/xt_pages/qcd/workAnalysis/doctor.vue View File

1
 <template>
1
 <template>
2
-  <div class="main-contain">
3
-    <div class="position">
4
-      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
-    </div>
6
-    <div class="app-container">
7
-      <div class="page_workAnalysis">
8
-        <el-tabs v-model="activeName" @tab-click="handleClick">
9
-          <el-tab-pane label="医生" name="first"></el-tab-pane>
10
-          <el-tab-pane label="护士" name="second"></el-tab-pane>
11
-        </el-tabs>
2
+  <div>
12
         <div class="cell clearfix">
3
         <div class="cell clearfix">
13
           <el-select v-model="query.admin_user_id" placeholder="请选择" style="width:120px;margin-right:10px"               @change="changeDoctor"
4
           <el-select v-model="query.admin_user_id" placeholder="请选择" style="width:120px;margin-right:10px"               @change="changeDoctor"
14
           >
5
           >
32
               :value="item.value"
23
               :value="item.value"
33
             ></el-option>
24
             ></el-option>
34
           </el-select>
25
           </el-select>
26
+          <label class="title">
27
+            <span class="name">月份查询</span> :
28
+          </label>
29
+          <el-date-picker
30
+            @change='changeMonth'
31
+            v-model="monthValue"
32
+            type="month"
33
+            placeholder="选择月">
34
+          </el-date-picker>
35
           <label class="title">
35
           <label class="title">
36
             <span class="name">日期查询</span> :
36
             <span class="name">日期查询</span> :
37
           </label>
37
           </label>
38
           <el-date-picker
38
           <el-date-picker
39
-            v-model="query.start_time"
39
+            v-model="start_time"
40
             prefix-icon="el-icon-date"
40
             prefix-icon="el-icon-date"
41
             @change="changeTime"
41
             @change="changeTime"
42
             :editable="false"
42
             :editable="false"
50
           ></el-date-picker>
50
           ></el-date-picker>
51
           <span class>-</span>
51
           <span class>-</span>
52
           <el-date-picker
52
           <el-date-picker
53
-            v-model="query.end_time"
53
+            v-model="end_time"
54
             prefix-icon="el-icon-date"
54
             prefix-icon="el-icon-date"
55
             @change="changeEndTime"
55
             @change="changeEndTime"
56
             :editable="false"
56
             :editable="false"
113
           </el-table>
113
           </el-table>
114
 
114
 
115
         </div>
115
         </div>
116
-      </div>
117
-    </div>
118
   </div>
116
   </div>
119
 </template>
117
 </template>
120
 
118
 
121
 <script>
119
 <script>
120
+const moment = require('moment')
122
 import echarts from "echarts";
121
 import echarts from "echarts";
123
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
122
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
124
 import LineChart from "../../qcd/components/LineChart";
123
 import LineChart from "../../qcd/components/LineChart";
152
         limit:20,
151
         limit:20,
153
         page:1,
152
         page:1,
154
       },
153
       },
155
-
154
+      start_time:'',
155
+      end_time:'',
156
+      monthValue:'',
156
 
157
 
157
       doctor_options:[
158
       doctor_options:[
158
         {id:0,user_name:"全部",admin_user_id:0}
159
         {id:0,user_name:"全部",admin_user_id:0}
354
       return new Date(time).getTime() / 1000;
355
       return new Date(time).getTime() / 1000;
355
     },
356
     },
356
     changeTime(val) {
357
     changeTime(val) {
358
+      this.query.end_time = ''
357
       var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
359
       var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
358
       if (time > 0) {
360
       if (time > 0) {
359
         this.$message.error("结束时间不能小于开始时间");
361
         this.$message.error("结束时间不能小于开始时间");
361
       } else {
363
       } else {
362
         // this.getDialysisList()
364
         // this.getDialysisList()
363
         this.query.page = 1;
365
         this.query.page = 1;
366
+        this.query.start_time = val
367
+        this.query.end_time = this.end_time
368
+        this.monthValue = ''
369
+        sessionStorage.setItem("doctor_start_time", val)
370
+        sessionStorage.removeItem("doctorMonth");
364
         this.GetDoctorWorkloadChartData(this.query)
371
         this.GetDoctorWorkloadChartData(this.query)
365
         this.GetDoctorWorkloadTableData(this.query)
372
         this.GetDoctorWorkloadTableData(this.query)
366
 
373
 
411
         this.$message.error("结束时间不能小于开始时间");
418
         this.$message.error("结束时间不能小于开始时间");
412
         this.query.end_time = "";
419
         this.query.end_time = "";
413
       } else {
420
       } else {
421
+        this.query.start_time = this.start_time
422
+        this.query.end_time = val
423
+        this.monthValue = ''
414
         this.query.page = 1;
424
         this.query.page = 1;
425
+        sessionStorage.setItem("doctor_end_time", val)
426
+        sessionStorage.removeItem("doctorMonth");
415
         this.GetDoctorWorkloadChartData(this.query)
427
         this.GetDoctorWorkloadChartData(this.query)
416
         this.GetDoctorWorkloadTableData(this.query)
428
         this.GetDoctorWorkloadTableData(this.query)
417
 
429
 
430
         var dataZoom_end = 100;
442
         var dataZoom_end = 100;
431
         this.bar.dataZoom[0].end = dataZoom_end
443
         this.bar.dataZoom[0].end = dataZoom_end
432
       }
444
       }
433
-    }
445
+    },
446
+    changeMonth(value){
447
+      sessionStorage.removeItem("doctor_start_time");
448
+      sessionStorage.removeItem("doctor_end_time");
449
+      let monthStartTime = value.getTime() / 1000
450
+      var nowDate = new Date(value);
451
+      var cloneNowDate = new Date(value);
452
+      var fullYear = nowDate.getFullYear();
453
+      var month = nowDate.getMonth() + 1; // getMonth 方法返回 0-11,代表1-12月
454
+      var endOfMonth = new Date(fullYear, month, 0).getDate(); // 获取本月最后一天
455
+      let monthEndTime = this.getFullDate(cloneNowDate.setDate(endOfMonth))
456
+      this.query.start_time = moment(new Date(monthStartTime * 1000)).format('YYYY-MM-DD')
457
+      this.query.end_time = moment(new Date(monthEndTime)).format('YYYY-MM-DD')
458
+      this.end_time = ''
459
+      this.start_time = ''
460
+      sessionStorage.setItem("doctorMonth", monthStartTime);
461
+      this.GetDoctorWorkloadChartData(this.query)
462
+      this.GetDoctorWorkloadTableData(this.query)
463
+    },
464
+    getFullDate(targetDate) {
465
+      var D, y, m, d;
466
+      if (targetDate) {
467
+        D = new Date(targetDate);
468
+        y = D.getFullYear();
469
+        m = D.getMonth() + 1;
470
+        d = D.getDate();
471
+      } else {
472
+        y = fullYear;
473
+        m = month;
474
+        d = date;
475
+      }
476
+      m = m > 9 ? m : '0' + m;
477
+      d = d > 9 ? d : '0' + d;
478
+      return y + '-' + m + '-' + d;
479
+    },
434
   },created(){
480
   },created(){
435
     var date = new Date()
481
     var date = new Date()
436
     var year = date.getFullYear() //获取完整的年份(4位)
482
     var year = date.getFullYear() //获取完整的年份(4位)
441
     this.query.end_time = year + '-' + month + '-' + day
487
     this.query.end_time = year + '-' + month + '-' + day
442
     this.query.start_time = year + '-' + last_month + '-' + day
488
     this.query.start_time = year + '-' + last_month + '-' + day
443
     this.query.statistics_type = 1
489
     this.query.statistics_type = 1
490
+
491
+    this.start_time = this.query.start_time
492
+    this.end_time = this.query.end_time
493
+
494
+
495
+    if(sessionStorage.getItem("doctor_start_time") == null){
496
+      sessionStorage.setItem("doctor_start_time", this.start_time);
497
+    }else{
498
+      this.start_time = sessionStorage.getItem("doctor_start_time")
499
+      this.query.start_time = sessionStorage.getItem("doctor_start_time")
500
+    }
501
+    if(sessionStorage.getItem("doctor_end_time") == null){
502
+      sessionStorage.setItem("doctor_end_time", this.end_time);
503
+    }else{
504
+      this.end_time = sessionStorage.getItem("doctor_end_time")
505
+      this.query.end_time = sessionStorage.getItem("doctor_end_time")
506
+    }
507
+    if(sessionStorage.getItem("doctorMonth") != null){
508
+      let value = parseInt(sessionStorage.getItem("doctorMonth")) * 1000
509
+      let monthStartTime = new Date(value)
510
+      this.monthValue = monthStartTime
511
+      var nowDate = new Date(value);
512
+      var cloneNowDate = new Date(value);
513
+      var fullYear = nowDate.getFullYear();
514
+      var month = nowDate.getMonth() + 1; // getMonth 方法返回 0-11,代表1-12月
515
+      var endOfMonth = new Date(fullYear, month, 0).getDate(); // 获取本月最后一天
516
+      let monthEndTime = this.getFullDate(cloneNowDate.setDate(endOfMonth))
517
+      this.query.start_time = moment(new Date(monthStartTime)).format('YYYY-MM-DD')
518
+      this.query.end_time = moment(new Date(monthEndTime)).format('YYYY-MM-DD')
519
+      this.start_time = ''
520
+      this.end_time = ''
521
+    }
444
     this.GetAllDoctor()
522
     this.GetAllDoctor()
445
     this.GetDoctorWorkloadChartData(this.query)
523
     this.GetDoctorWorkloadChartData(this.query)
446
     this.GetDoctorWorkloadTableData(this.query)
524
     this.GetDoctorWorkloadTableData(this.query)

+ 42 - 0
src/xt_pages/qcd/workAnalysis/index.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div class="page_workAnalysis">
8
+        <el-tabs v-model="activeName">
9
+          <el-tab-pane label="医生" name="first">
10
+              <doctor v-if="activeName == 'first'"></doctor>
11
+          </el-tab-pane>
12
+          <el-tab-pane label="护士" name="second">
13
+              <nurse v-if="activeName == 'second'"></nurse>
14
+          </el-tab-pane>
15
+        </el-tabs>
16
+      </div>
17
+    </div>
18
+  </div>
19
+</template>
20
+
21
+
22
+<script>
23
+import doctor from './doctor'
24
+import nurse from './nurse'
25
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
26
+export default {
27
+    components:{
28
+        doctor,
29
+        nurse,
30
+        BreadCrumb
31
+    },
32
+    data(){
33
+        return{
34
+            crumbs: [
35
+                { path: false, name: "质控管理" },
36
+                { path: false, name: "工作量分析统计" }
37
+            ],
38
+            activeName:'first'
39
+        }
40
+    }
41
+}
42
+</script>

+ 98 - 16
src/xt_pages/qcd/workAnalysis/nurse.vue View File

1
 <template>
1
 <template>
2
-  <div class="main-contain">
3
-    <div class="position">
4
-      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
-    </div>
6
-    <div class="app-container">
7
-      <div class="page_workAnalysis">
8
-        <el-tabs v-model="activeName" @tab-click="handleClick">
9
-          <el-tab-pane label="医生" name="first"></el-tab-pane>
10
-          <el-tab-pane label="护士" name="second"></el-tab-pane>
11
-        </el-tabs>
2
+    <div>
12
         <div class="cell clearfix">
3
         <div class="cell clearfix">
13
           <el-select v-model="query.admin_user_id" placeholder="请选择" style="width:120px;margin-right:10px"               @change="changeNurse"
4
           <el-select v-model="query.admin_user_id" placeholder="请选择" style="width:120px;margin-right:10px"               @change="changeNurse"
14
           >
5
           >
32
               :value="item.value"
23
               :value="item.value"
33
             ></el-option>
24
             ></el-option>
34
           </el-select>
25
           </el-select>
26
+          <label class="title">
27
+            <span class="name">月份查询</span> :
28
+          </label>
29
+          <el-date-picker
30
+            @change='changeMonth'
31
+            v-model="monthValue"
32
+            type="month"
33
+            placeholder="选择月">
34
+          </el-date-picker>
35
           <label class="title">
35
           <label class="title">
36
             <span class="name">日期查询</span> :
36
             <span class="name">日期查询</span> :
37
           </label>
37
           </label>
38
           <el-date-picker
38
           <el-date-picker
39
-            v-model="query.start_time"
39
+            v-model="start_time"
40
             prefix-icon="el-icon-date"
40
             prefix-icon="el-icon-date"
41
             @change="changeTime"
41
             @change="changeTime"
42
             :editable="false"
42
             :editable="false"
50
           ></el-date-picker>
50
           ></el-date-picker>
51
           <span class>-</span>
51
           <span class>-</span>
52
           <el-date-picker
52
           <el-date-picker
53
-            v-model="query.end_time"
53
+            v-model="end_time"
54
             prefix-icon="el-icon-date"
54
             prefix-icon="el-icon-date"
55
             @change="changeEndTime"
55
             @change="changeEndTime"
56
             :editable="false"
56
             :editable="false"
148
               </template>
148
               </template>
149
             </el-table-column>
149
             </el-table-column>
150
           </el-table>
150
           </el-table>
151
-
152
-        </div>
153
-      </div>
154
     </div>
151
     </div>
155
   </div>
152
   </div>
156
 </template>
153
 </template>
157
 <script>
154
 <script>
155
+  const moment = require('moment')
158
   import echarts from "echarts";
156
   import echarts from "echarts";
159
   import BreadCrumb from "@/xt_pages/components/bread-crumb";
157
   import BreadCrumb from "@/xt_pages/components/bread-crumb";
160
   import LineChart from "../../qcd/components/LineChart";
158
   import LineChart from "../../qcd/components/LineChart";
187
           limit:20,
185
           limit:20,
188
           page:1,
186
           page:1,
189
         },
187
         },
188
+        start_time:'',
189
+        end_time:'',
190
+        monthValue:'',
190
         nurse_options:[
191
         nurse_options:[
191
           {id:0,user_name:"全部",admin_user_id:0}
192
           {id:0,user_name:"全部",admin_user_id:0}
192
         ],
193
         ],
383
         return new Date(time).getTime() / 1000;
384
         return new Date(time).getTime() / 1000;
384
       },
385
       },
385
       changeTime(val) {
386
       changeTime(val) {
387
+        this.query.end_time = ''
386
         var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
388
         var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
387
         if (time > 0) {
389
         if (time > 0) {
388
           this.$message.error("结束时间不能小于开始时间");
390
           this.$message.error("结束时间不能小于开始时间");
389
           this.query.start_time = "";
391
           this.query.start_time = "";
390
         } else {
392
         } else {
391
           // this.getDialysisList()
393
           // this.getDialysisList()
394
+          console.log(val)
392
           this.query.page = 1;
395
           this.query.page = 1;
396
+          this.query.start_time = val
397
+          this.query.end_time = this.end_time
398
+          this.monthValue = ''
399
+          sessionStorage.setItem("nurse_start_time", val)
400
+          sessionStorage.removeItem("nurseMonth");
393
           this.GetNurseWorkloadChartData(this.query)
401
           this.GetNurseWorkloadChartData(this.query)
394
           this.GetNurseWorkloadTableData(this.query)
402
           this.GetNurseWorkloadTableData(this.query)
395
 
403
 
433
           this.$message.error("结束时间不能小于开始时间");
441
           this.$message.error("结束时间不能小于开始时间");
434
           this.query.end_time = "";
442
           this.query.end_time = "";
435
         } else {
443
         } else {
444
+          this.query.start_time = this.start_time
445
+          this.query.end_time = val
446
+          this.monthValue = ''
436
           this.query.page = 1;
447
           this.query.page = 1;
448
+          sessionStorage.setItem("nurse_end_time", val)
449
+          sessionStorage.removeItem("nurseMonth");
437
           this.GetNurseWorkloadChartData(this.query)
450
           this.GetNurseWorkloadChartData(this.query)
438
           this.GetNurseWorkloadTableData(this.query)
451
           this.GetNurseWorkloadTableData(this.query)
439
 
452
 
452
           var dataZoom_end = 100;
465
           var dataZoom_end = 100;
453
           this.bar.dataZoom[0].end = dataZoom_end
466
           this.bar.dataZoom[0].end = dataZoom_end
454
         }
467
         }
455
-      }
468
+      },
469
+      changeMonth(value){
470
+        // console.log('monthStartTime',value.getTime() / 1000)
471
+        sessionStorage.removeItem("nurse_start_time");
472
+        sessionStorage.removeItem("nurse_end_time");
473
+        let monthStartTime = value.getTime() / 1000
474
+        var nowDate = new Date(value);
475
+        var cloneNowDate = new Date(value);
476
+        var fullYear = nowDate.getFullYear();
477
+        var month = nowDate.getMonth() + 1; // getMonth 方法返回 0-11,代表1-12月
478
+        var endOfMonth = new Date(fullYear, month, 0).getDate(); // 获取本月最后一天
479
+        let monthEndTime = this.getFullDate(cloneNowDate.setDate(endOfMonth))
480
+        this.query.start_time = moment(new Date(monthStartTime * 1000)).format('YYYY-MM-DD')
481
+        this.query.end_time = moment(new Date(monthEndTime)).format('YYYY-MM-DD')
482
+        this.end_time = ''
483
+        this.start_time = ''
484
+        sessionStorage.setItem("nurseMonth", monthStartTime);
485
+        this.GetNurseWorkloadChartData(this.query)
486
+        this.GetNurseWorkloadTableData(this.query)
487
+      },
488
+      getFullDate(targetDate) {
489
+        var D, y, m, d;
490
+        if (targetDate) {
491
+          D = new Date(targetDate);
492
+          y = D.getFullYear();
493
+          m = D.getMonth() + 1;
494
+          d = D.getDate();
495
+        } else {
496
+          y = fullYear;
497
+          m = month;
498
+          d = date;
499
+        }
500
+        m = m > 9 ? m : '0' + m;
501
+        d = d > 9 ? d : '0' + d;
502
+        return y + '-' + m + '-' + d;
503
+      },
456
     },created(){
504
     },created(){
457
       var date = new Date()
505
       var date = new Date()
458
       var year = date.getFullYear() //获取完整的年份(4位)
506
       var year = date.getFullYear() //获取完整的年份(4位)
463
       this.query.end_time = year + '-' + month + '-' + day
511
       this.query.end_time = year + '-' + month + '-' + day
464
       this.query.start_time = year + '-' + last_month + '-' + day
512
       this.query.start_time = year + '-' + last_month + '-' + day
465
       this.query.statistics_type = 1
513
       this.query.statistics_type = 1
514
+      
515
+      this.start_time = year + '-' + last_month + '-' + day
516
+      this.end_time = year + '-' + month + '-' + day
517
+
518
+      if(sessionStorage.getItem("nurse_start_time") == null){
519
+        sessionStorage.setItem("nurse_start_time", this.start_time);
520
+      }else{
521
+        this.start_time = sessionStorage.getItem("nurse_start_time")
522
+        this.query.start_time = sessionStorage.getItem("nurse_start_time")
523
+      }
524
+      if(sessionStorage.getItem("nurse_end_time") == null){
525
+        sessionStorage.setItem("nurse_end_time", this.end_time);
526
+      }else{
527
+        this.end_time = sessionStorage.getItem("nurse_end_time")
528
+        this.query.end_time = sessionStorage.getItem("nurse_end_time")
529
+      }
530
+      if(sessionStorage.getItem("nurseMonth") != null){
531
+        console.log("tjos")
532
+        let value = parseInt(sessionStorage.getItem("nurseMonth")) * 1000
533
+        let monthStartTime = new Date(value)
534
+        this.monthValue = monthStartTime
535
+        var nowDate = new Date(value);
536
+        var cloneNowDate = new Date(value);
537
+        var fullYear = nowDate.getFullYear();
538
+        var month = nowDate.getMonth() + 1; // getMonth 方法返回 0-11,代表1-12月
539
+        var endOfMonth = new Date(fullYear, month, 0).getDate(); // 获取本月最后一天
540
+        let monthEndTime = this.getFullDate(cloneNowDate.setDate(endOfMonth))
541
+        this.query.start_time = moment(new Date(monthStartTime)).format('YYYY-MM-DD')
542
+        this.query.end_time = moment(new Date(monthEndTime)).format('YYYY-MM-DD')
543
+        this.start_time = ''
544
+        this.end_time = ''
545
+      }
546
+      // console.log('this.query2',this.query)
547
+      
466
       this.GetAllNurse()
548
       this.GetAllNurse()
467
       this.GetNurseWorkloadChartData(this.query)
549
       this.GetNurseWorkloadChartData(this.query)
468
       this.GetNurseWorkloadTableData(this.query)
550
       this.GetNurseWorkloadTableData(this.query)