Browse Source

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

csx 4 years ago
parent
commit
b03d7d6ada

+ 1 - 1
src/lang/zh.js View File

99
     deviceManage: '设备管理',
99
     deviceManage: '设备管理',
100
     modemanagement: '型号管理',
100
     modemanagement: '型号管理',
101
     dialysisMachineManage: '设备管理',
101
     dialysisMachineManage: '设备管理',
102
-    workforce: '排班管理',
102
+    workforce: '患者排班',
103
     appointment: '排班管理',
103
     appointment: '排班管理',
104
     sign: '治疗签到',
104
     sign: '治疗签到',
105
     remind: '排班提醒',
105
     remind: '排班提醒',

+ 2 - 2
src/views/layout/components/TagsView.vue View File

28
     </ul>-->
28
     </ul>-->
29
     <div class="tags-view-wrapper">
29
     <div class="tags-view-wrapper">
30
       <div style="height:100%">
30
       <div style="height:100%">
31
-        <div style="height:100%" v-if="newIndex == 9">
31
+        <div style="height:100%" v-if="newIndex == 10">
32
           <div class="tagsBox" v-if="routerList.length > 0 && newNum != 999">
32
           <div class="tagsBox" v-if="routerList.length > 0 && newNum != 999">
33
             <div
33
             <div
34
               class="tagsOne"
34
               class="tagsOne"
62
             </div>
62
             </div>
63
           </div>
63
           </div>
64
         </div>
64
         </div>
65
-        <div class="tagsBox" v-if="newIndex != 9">
65
+        <div class="tagsBox" v-if="newIndex != 10">
66
           <div
66
           <div
67
             class="tagsOne"
67
             class="tagsOne"
68
             v-if="permission_routers[newIndex].meta"
68
             v-if="permission_routers[newIndex].meta"

+ 11 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue View File

382
             校对护士
382
             校对护士
383
             <span style="display: inline-block;width:100px;text-align: left;">
383
             <span style="display: inline-block;width:100px;text-align: left;">
384
               &nbsp;
384
               &nbsp;
385
-              <span v-if="setAdminUserES(check == null ? 0 : check.modifier) == ''"> {{ getAdminUser(check == null ? 0 : check.modifier) }} </span>
385
+              <span v-if="dialysisOrder ? dialysisOrder.start_nurse != check.modifier : false">
386
+              <span v-if="setAdminUserES(check == null ? 0 : check.modifier) == ''" style="height:30px;display: inline-block;">
387
+              {{ getAdminUser(check == null ? 0 : check.modifier) }}
388
+              </span>
386
               <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.modifier)" alt srcset v-else />
389
               <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.modifier)" alt srcset v-else />
387
             </span>
390
             </span>
391
+            <span v-else>
392
+              <span v-if="setAdminUserES(check == null ? 0 : check.creater) == ''" style="height:30px;display: inline-block;">
393
+              {{ getAdminUser(check == null ? 0 : check.creater) }}
394
+              </span>
395
+              <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.creater)" alt srcset v-else />
396
+            </span>
397
+            </span>
388
             医生签名
398
             医生签名
389
             <span style="display: inline-block;width:100px;text-align: left;">
399
             <span style="display: inline-block;width:100px;text-align: left;">
390
               &nbsp;
400
               &nbsp;

+ 137 - 6
src/xt_pages/medicalScheduling/class.vue View File

69
             >
69
             >
70
              <el-form :model="form" :rules="rules" ref="form" label-width="90px">
70
              <el-form :model="form" :rules="rules" ref="form" label-width="90px">
71
                 <el-form-item label="班种名称 : " required prop="class_name">
71
                 <el-form-item label="班种名称 : " required prop="class_name">
72
-                    <el-input v-model="form.class_name" placeholder="" ></el-input>
72
+                    <el-input v-model.trim="form.class_name" placeholder="" ></el-input>
73
                 </el-form-item>
73
                 </el-form-item>
74
                 <el-form-item label="班种属性 : " required  prop="class_attributes">
74
                 <el-form-item label="班种属性 : " required  prop="class_attributes">
75
                     <el-select v-model="form.class_attributes" placeholder="请选择">
75
                     <el-select v-model="form.class_attributes" placeholder="请选择">
102
                         </el-option>
102
                         </el-option>
103
                     </el-select>
103
                     </el-select>
104
                     <el-time-select
104
                     <el-time-select
105
+                    @change="changtimeTwo"
105
                     style="width:140px;"
106
                     style="width:140px;"
106
                     v-model="form.timeone_end"
107
                     v-model="form.timeone_end"
107
                     :picker-options="{
108
                     :picker-options="{
121
                     style="width:140px;"
122
                     style="width:140px;"
122
                     v-model="form.timetwo_start"
123
                     v-model="form.timetwo_start"
123
                     :picker-options="{
124
                     :picker-options="{
124
-                    start: '08:00',
125
+                    start: '01:00',
125
                     step: '00:15',
126
                     step: '00:15',
126
                     end: '24:00'
127
                     end: '24:00'
127
                     }"
128
                     }"
136
                         </el-option>
137
                         </el-option>
137
                     </el-select>
138
                     </el-select>
138
                     <el-time-select
139
                     <el-time-select
140
+                    @change="changtime"
139
                     style="width:140px;"
141
                     style="width:140px;"
140
                     v-model="form.timetwo_end"
142
                     v-model="form.timetwo_end"
141
                     :picker-options="{
143
                     :picker-options="{
142
-                    start: '08:00',
144
+                    start: '01:00',
143
                     step: '00:15',
145
                     step: '00:15',
144
                     end: '24:00'
146
                     end: '24:00'
145
                     }"
147
                     }"
206
                         </el-option>
208
                         </el-option>
207
                     </el-select>
209
                     </el-select>
208
                     <el-time-select
210
                     <el-time-select
211
+                    @change="changtime"
209
                     style="width:140px;"
212
                     style="width:140px;"
210
                     v-model="form.timeone_end"
213
                     v-model="form.timeone_end"
211
                     :picker-options="{
214
                     :picker-options="{
240
                         </el-option>
243
                         </el-option>
241
                     </el-select>
244
                     </el-select>
242
                     <el-time-select
245
                     <el-time-select
246
+                    @change="changtimeTwo"
243
                     style="width:140px;"
247
                     style="width:140px;"
244
                     v-model="form.timetwo_end"
248
                     v-model="form.timetwo_end"
245
                     :picker-options="{
249
                     :picker-options="{
276
 <script>
280
 <script>
277
 import {saveDoctorSchedules,getDoctorScheduleList,getScheduleDetail,UpdateSchedule,deleteScheduleById } from '@/api/doctorSchedule'
281
 import {saveDoctorSchedules,getDoctorScheduleList,getScheduleDetail,UpdateSchedule,deleteScheduleById } from '@/api/doctorSchedule'
278
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
282
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
283
+import { parseTime } from '@/utils'
279
 export default {
284
 export default {
280
     components:{
285
     components:{
281
         BreadCrumb
286
         BreadCrumb
331
                      this.showError = true
336
                      this.showError = true
332
                      return false
337
                      return false
333
                  }
338
                  }
339
+                 
334
                  const params = {
340
                  const params = {
335
                     class_name:this.form.class_name,
341
                     class_name:this.form.class_name,
336
                     class_attributes:this.form.class_attributes,
342
                     class_attributes:this.form.class_attributes,
343
                     work_time:this.form.work_time,
349
                     work_time:this.form.work_time,
344
                     remarks:this.form.remarks
350
                     remarks:this.form.remarks
345
                  }
351
                  }
346
-                 console.log("params",params)
347
                 saveDoctorSchedules(params).then(response=>{
352
                 saveDoctorSchedules(params).then(response=>{
348
                   if(response.data.state == 1){
353
                   if(response.data.state == 1){
349
                     var schedules = response.data.data.schedules
354
                     var schedules = response.data.data.schedules
360
                     this.form.timetwo_end=""
365
                     this.form.timetwo_end=""
361
                     this.form.work_time = ""
366
                     this.form.work_time = ""
362
                     this.form.remarks = ""
367
                     this.form.remarks = ""
368
+                  }else{
369
+                     this.$message.error("班种名称已存在")
363
                   }
370
                   }
364
                })
371
                })
365
              }
372
              }
479
                  this.$message.success("修改成功")
486
                  this.$message.success("修改成功")
480
                  this.EditNewVisible = false
487
                  this.EditNewVisible = false
481
                  this.getList()
488
                  this.getList()
482
-                 
489
+               }else{
490
+                   this.$message.error("班种名称已存在")
483
                }
491
                }
484
              })
492
              })
485
           }
493
           }
501
                 var msg = response.data.data.msg
509
                 var msg = response.data.data.msg
502
                 this.$message.success("删除成功")
510
                 this.$message.success("删除成功")
503
                 this.getList()
511
                 this.getList()
512
+              }else{
513
+                this.$message.error("该班种已存在排班,不能删除")
504
               }
514
               }
505
            }) 
515
            }) 
506
         })
516
         })
507
-      }
517
+      },
518
+     timeDifference(startTime,endTime){ 
519
+        var start1=startTime.split(":");
520
+        var startAll=parseInt(start1[0]*60)+parseInt(start1[1]);   
521
+        var end1=endTime.split(":");
522
+        var endAll=parseInt(end1[0]*60)+parseInt(end1[1]);
523
+         return endAll - startAll
524
+      },
525
+      timeStamp(StatusMinute){	
526
+        var day=parseInt(StatusMinute/60/24);
527
+        var hour=parseInt(StatusMinute/60%24);
528
+        var min= parseInt(StatusMinute % 60);
529
+        StatusMinute="";
530
+        if (day > 0)
531
+        {
532
+            StatusMinute= day + "天";
533
+        } 
534
+        if (hour>0)
535
+        {
536
+            StatusMinute += hour + "小时";
537
+        } 
538
+        // if(hour == 0){
539
+        //    StatusMinute += hour + "小时"
540
+        // }
541
+        if (min>0)
542
+        {
543
+            StatusMinute += parseFloat(min) + "分钟";
544
+        }
545
+            return StatusMinute;
546
+        },
547
+     changtime(){
548
+         //计算时长
549
+        console.log("timeone",this.form.timeone_start)
550
+        console.log("timeonend",this.form.timeone_end)
551
+        console.log("timeonetype",this.form.timeone_type)
552
+        var longtime = 0
553
+        var timeone = 0
554
+        var timetwo = 0
555
+        //时间选择1的时间差
556
+       if(this.form.timeone_type == 1){
557
+          var timeone = this.timeDifference(this.form.timeone_start,this.form.timeone_end)
558
+           timeone = timeone
559
+       }
560
+       if(this.form.timeone_type == 2){
561
+          var hour = this.form.timeone_end.split(":")
562
+          var hous = parseInt(hour[0]) + 24
563
+          var oneHours = hous.toString() +":"+ hour[1]
564
+          var timeone =  this.timeDifference(this.form.timeone_start,oneHours)
565
+         timeone = timeone
566
+        }
567
+       console.log("时间选择1时长",this.timeStamp(timeone))
568
+                
569
+        //时间选择2的时间差
570
+        if(this.form.timetwo_type == 1){
571
+            var timetwo = this.timeDifference(this.form.timetwo_start,this.form.timetwo_end)
572
+            timetwo = timetwo
573
+        }
574
+        if(this.form.timetwo_type == 2){
575
+            var hour = this.form.timetwo_end.split(":")
576
+            var hous = parseInt(hour[0]) + 24
577
+            var oneHours = hous.toString() +":"+ hour[1]
578
+            var timetwo =  this.timeDifference(this.form.timetwo_start,oneHours)
579
+            timetwo = timetwo
580
+        }
581
+          console.log("timetwo",timetwo)
582
+          console.log("时间选择2时长",this,this.timeStamp(timetwo))
583
+                  
584
+        longtime = timeone + timetwo
585
+        console.log("longtime",longtime)
586
+        this.form.work_time = this.timeStamp(longtime)
587
+     },
588
+     changtimeTwo(){
589
+           //计算时长
590
+        console.log("timeone",this.form.timeone_start)
591
+        console.log("timeonend",this.form.timeone_end)
592
+        console.log("timeonetype",this.form.timeone_type)
593
+        var longtime = 0
594
+        var timeone = 0
595
+        var timetwo = 0
596
+        //时间选择1的时间差
597
+       if(this.form.timeone_type == 1){
598
+          var timeone = this.timeDifference(this.form.timeone_start,this.form.timeone_end)
599
+           timeone = timeone
600
+       }
601
+       if(this.form.timeone_type == 2){
602
+          var hour = this.form.timeone_end.split(":")
603
+          var hous = parseInt(hour[0]) + 24
604
+          var oneHours = hous.toString() +":"+ hour[1]
605
+          var timeone =  this.timeDifference(this.form.timeone_start,oneHours)
606
+         timeone = timeone
607
+        }
608
+       console.log("时间选择1时长",this.timeStamp(timeone))
609
+                
610
+        //时间选择2的时间差
611
+        if(this.form.timetwo_type == 1){
612
+            var timetwo = this.timeDifference(this.form.timetwo_start,this.form.timetwo_end)
613
+            timetwo = timetwo
614
+        }
615
+        if(this.form.timetwo_type == 2){
616
+            var hour = this.form.timetwo_end.split(":")
617
+            var hous = parseInt(hour[0]) + 24
618
+            var oneHours = hous.toString() +":"+ hour[1]
619
+            var timetwo =  this.timeDifference(this.form.timetwo_start,oneHours)
620
+            timetwo = timetwo
621
+        }
622
+          console.log("timetwo",timetwo)
623
+          console.log("时间选择2时长",this,this.timeStamp(timetwo))
624
+                  
625
+        longtime = timeone + timetwo
626
+        console.log("longtime",longtime)
627
+        this.form.work_time = this.timeStamp(longtime) 
628
+     }
508
     },
629
     },
509
     created(){
630
     created(){
510
         //获取班种列表
631
         //获取班种列表
511
         this.getList()
632
         this.getList()
633
+    },
634
+    watch: {
635
+    //  监听对象数据变化
636
+    work_time: {
637
+      handler(newVal, oldVal) {
638
+        console.log(newVal)
639
+        console,log(oldVal)
640
+      },
641
+      deep: true  // 非常非常重要,这个是深度监听,默认是false。true的时候才能监听到对象的变化
512
     }
642
     }
643
+   }
513
 }
644
 }
514
 </script>
645
 </script>
515
 <style scoped>
646
 <style scoped>

+ 26 - 21
src/xt_pages/medicalScheduling/index.vue View File

154
                             {{item.class_name}}&nbsp;({{item.timeone_start}}~{{item.timeone_type}}{{item.timeone_end}} <span v-if="item.timetwo_start!=''">{{item.timetwo_start}}~{{item.timetwo_type}}{{item.timetwo_end}}</span> )
154
                             {{item.class_name}}&nbsp;({{item.timeone_start}}~{{item.timeone_type}}{{item.timeone_end}} <span v-if="item.timetwo_start!=''">{{item.timetwo_start}}~{{item.timetwo_type}}{{item.timetwo_end}}</span> )
155
                            </p>
155
                            </p>
156
                         </div>
156
                         </div>
157
-                        <el-checkbox style="text-align:center"  v-model="isChecked" @change="toContinuous">连续排班</el-checkbox>
157
+                        <el-checkbox style="text-align:center;padding-bottom: 10px;"  v-model="isChecked" @change="toContinuous">连续排班</el-checkbox>
158
                     </div>
158
                     </div>
159
                 </div>
159
                 </div>
160
             </div>
160
             </div>
252
             getDoctorList().then(response=>{
252
             getDoctorList().then(response=>{
253
                 if(response.data.state == 1){
253
                 if(response.data.state == 1){
254
                     var list =  response.data.data.list
254
                     var list =  response.data.data.list
255
-                    console.log("医护列表",list)
255
+                    // console.log("医护列表",list)
256
                     this.tableData = list
256
                     this.tableData = list
257
                     this.doctorlist = list
257
                     this.doctorlist = list
258
                     //获取班种列表
258
                     //获取班种列表
264
             getScheduleList().then(response=>{
264
             getScheduleList().then(response=>{
265
                 if(response.data.state == 1){
265
                 if(response.data.state == 1){
266
                     var schedulelist = response.data.data.scheduleList
266
                     var schedulelist = response.data.data.scheduleList
267
-                    console.log("schedulelist",schedulelist)
267
+                    // console.log("schedulelist",schedulelist)
268
                     for(let i=0;i<schedulelist.length;i++){
268
                     for(let i=0;i<schedulelist.length;i++){
269
                     if(schedulelist[i].timeone_type == 1){
269
                     if(schedulelist[i].timeone_type == 1){
270
                         schedulelist[i].timeone_type = "当日"
270
                         schedulelist[i].timeone_type = "当日"
284
             }) 
284
             }) 
285
         },
285
         },
286
         hangdleClick(val,index,num){
286
         hangdleClick(val,index,num){
287
-         console.log("val",val)
287
+        //  console.log("val",val)
288
          this.docobj = val
288
          this.docobj = val
289
          if(this.getTimestamp(this.weekDayArr[num]) < this.timeNow){
289
          if(this.getTimestamp(this.weekDayArr[num]) < this.timeNow){
290
-            this.$message.warning("过去日期不可以编辑")
290
+            this.$message.error("过去日期不可以编辑")
291
             return
291
             return
292
          }
292
          }
293
         },
293
         },
297
             // console.log("日期",this.weekDayArr)
297
             // console.log("日期",this.weekDayArr)
298
             var week = (column.label).split('');
298
             var week = (column.label).split('');
299
             var weeks = week[0]+week[1]
299
             var weeks = week[0]+week[1]
300
-            console.log("weeks",weeks)
300
+            // console.log("weeks",weeks)
301
             if(weeks == "周日"){
301
             if(weeks == "周日"){
302
             this.schedule_week = 0
302
             this.schedule_week = 0
303
             this.schedule_date = this.weekDayArr[6]
303
             this.schedule_date = this.weekDayArr[6]
335
             }
335
             }
336
             }
336
             }
337
             let arr = [...this.tableData]
337
             let arr = [...this.tableData]
338
-            console.log("arr===",arr)
338
+            // console.log("arr===",arr)
339
             for(let i=0;i<arr.length;i++){
339
             for(let i=0;i<arr.length;i++){
340
             if(this.docobj.id == arr[i].id){
340
             if(this.docobj.id == arr[i].id){
341
                 arr[i].class_name = class_name
341
                 arr[i].class_name = class_name
342
                 arr[i].class_index = this.schedule_week
342
                 arr[i].class_index = this.schedule_week
343
             }
343
             }
344
             }
344
             }
345
-            console.log("arr",arr)
345
+            // console.log("arr",arr)
346
             this.tableData = arr
346
             this.tableData = arr
347
             const params = {
347
             const params = {
348
             doctor_id:this.docobj.admin_user_id,
348
             doctor_id:this.docobj.admin_user_id,
353
             end_time:this.getTimestamp(this.weekDayArr[6]),
353
             end_time:this.getTimestamp(this.weekDayArr[6]),
354
             schedule_date:this.getTimestamp(this.schedule_date)
354
             schedule_date:this.getTimestamp(this.schedule_date)
355
             }
355
             }
356
-            console.log("params",params)
356
+            // console.log("params",params)
357
             
357
             
358
             addSchedule(params).then(response=>{
358
             addSchedule(params).then(response=>{
359
             if(response.data.state == 1){
359
             if(response.data.state == 1){
360
                 var schedule = response.data.data.schedule
360
                 var schedule = response.data.data.schedule
361
-                console.log("schedule",schedule)
361
+                // console.log("schedule",schedule)
362
                 this.$message.success("保存成功")
362
                 this.$message.success("保存成功")
363
                 this.getStaffScheduleList()
363
                 this.getStaffScheduleList()
364
                 }
364
                 }
450
             getStaffScheduleList(params).then(response=>{
450
             getStaffScheduleList(params).then(response=>{
451
                 if(response.data.state == 1){
451
                 if(response.data.state == 1){
452
                     var staffList =  response.data.data.staffList
452
                     var staffList =  response.data.data.staffList
453
-                    console.log("所有排班数据",staffList)
453
+                   console.log("所有排班数据",staffList)
454
                     for(let i=0;i<staffList.length;i++){
454
                     for(let i=0;i<staffList.length;i++){
455
                     if(staffList[i].schedule_week == 0){
455
                     if(staffList[i].schedule_week == 0){
456
                         staffList[i].class_index = 0
456
                         staffList[i].class_index = 0
478
                     let tempArr = [], newArr = []
478
                     let tempArr = [], newArr = []
479
                     for (let i = 0; i < staffList.length; i++) {
479
                     for (let i = 0; i < staffList.length; i++) {
480
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
480
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
481
-                            console.log("触发了没")
482
                             newArr.push({
481
                             newArr.push({
483
                                 user_name: staffList[i].user_name,
482
                                 user_name: staffList[i].user_name,
484
                                 admin_user_id:staffList[i].admin_user_id,
483
                                 admin_user_id:staffList[i].admin_user_id,
487
                             })
486
                             })
488
                             tempArr.push(staffList[i].user_name);
487
                             tempArr.push(staffList[i].user_name);
489
                         } else {
488
                         } else {
490
-                            console.log("hheh")
491
                             for (let j = 0; j < newArr.length; j++) {
489
                             for (let j = 0; j < newArr.length; j++) {
492
                                 if (newArr[j].user_name == staffList[i].user_name) {
490
                                 if (newArr[j].user_name == staffList[i].user_name) {
493
-                                    newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week})
491
+                                    newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week,user_type:staffList[i].doctor_type})
494
                                 }
492
                                 }
495
                             }
493
                             }
496
                         }
494
                         }
502
                       if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
500
                       if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
503
                     
501
                     
504
                       }else{
502
                       }else{
505
-                        arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: []})
503
+                        arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
506
                         // console.log("arr",arr)
504
                         // console.log("arr",arr)
507
                       }
505
                       }
508
                     })
506
                     })
507
+                    console.log("arr=======",arr)
508
+                    arr.sort(this.compare('user_type'))
509
                     this.tableData = arr
509
                     this.tableData = arr
510
         
510
         
511
                 
511
                 
555
                         newArr.push({
555
                         newArr.push({
556
                             user_name: staffList[i].user_name,
556
                             user_name: staffList[i].user_name,
557
                             admin_user_id:staffList[i].admin_user_id,
557
                             admin_user_id:staffList[i].admin_user_id,
558
+                            user_type:staffList[i].doctor_type,
558
                             list: [{class_name:staffList[i].class_name,schedule_week:staffList[i].schedule_week}]
559
                             list: [{class_name:staffList[i].class_name,schedule_week:staffList[i].schedule_week}]
559
                         })
560
                         })
560
                         tempArr.push(staffList[i].user_name);
561
                         tempArr.push(staffList[i].user_name);
561
                         } else {
562
                         } else {
562
                         for (let j = 0; j < newArr.length; j++) {
563
                         for (let j = 0; j < newArr.length; j++) {
563
                             if (newArr[j].user_name == staffList[i].user_name) {
564
                             if (newArr[j].user_name == staffList[i].user_name) {
564
-                            newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week})
565
+                            newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week, user_type:staffList[i].doctor_type,})
565
                             }
566
                             }
566
                         }
567
                         }
567
                         }
568
                         }
573
                       if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
574
                       if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
574
                     
575
                     
575
                       }else{
576
                       }else{
576
-                        arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: []})
577
+                        arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
577
                         // console.log("arr",arr)
578
                         // console.log("arr",arr)
578
                       }
579
                       }
579
                     })
580
                     })
581
+                    arr.sort(this.compare('user_type'))
580
                     this.tableData = arr
582
                     this.tableData = arr
581
                 }
583
                 }
582
             })
584
             })
597
                     for (let i = 0; i < staffList.length; i++) {
599
                     for (let i = 0; i < staffList.length; i++) {
598
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
600
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
599
                             newArr.push({
601
                             newArr.push({
602
+                                user_type:staffList[i].doctor_type,
600
                                 user_name: staffList[i].user_name,
603
                                 user_name: staffList[i].user_name,
601
                                 admin_user_id:staffList[i].admin_user_id,
604
                                 admin_user_id:staffList[i].admin_user_id,
602
                                 list: [{class_name:staffList[i].class_name,schedule_week:staffList[i].schedule_week}]
605
                                 list: [{class_name:staffList[i].class_name,schedule_week:staffList[i].schedule_week}]
605
                         } else {
608
                         } else {
606
                             for (let j = 0; j < newArr.length; j++) {
609
                             for (let j = 0; j < newArr.length; j++) {
607
                                 if (newArr[j].user_name == staffList[i].user_name) {
610
                                 if (newArr[j].user_name == staffList[i].user_name) {
608
-                                    newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week})
611
+                                    newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week, user_type:staffList[i].doctor_type})
609
                                 }
612
                                 }
610
                             }
613
                             }
611
                         }
614
                         }
619
                           if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
622
                           if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
620
                         
623
                         
621
                           }else{
624
                           }else{
622
-                            arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: []})
625
+                            arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
623
                             // console.log("arr",arr)
626
                             // console.log("arr",arr)
624
                           }
627
                           }
625
                         })
628
                         })
629
+                        console.log("全部=======",arr)
630
+                        arr.sort(this.compare('user_type'))
626
                         this.tableData = arr
631
                         this.tableData = arr
627
                     }
632
                     }
628
                     if(id == 2){
633
                     if(id == 2){
833
             return function(a,b){
838
             return function(a,b){
834
                 var value1 = a[property];
839
                 var value1 = a[property];
835
                 var value2 = b[property];
840
                 var value2 = b[property];
836
-                return value1 - value2;
841
+                return value2 - value1;
837
             }
842
             }
838
         },
843
         },
839
     },
844
     },
892
 .classBox{
897
 .classBox{
893
     width:28%;
898
     width:28%;
894
     height: 100%;
899
     height: 100%;
895
-    border: 1px solid #EBEEF5;
900
+    border: 1px solid #d0d3da;
896
     .classTitle{
901
     .classTitle{
897
         height: 42px;
902
         height: 42px;
898
         text-align: center;
903
         text-align: center;

+ 6 - 4
src/xt_pages/medicalScheduling/medical_print.vue View File

107
               for (let i = 0; i < staffList.length; i++) {
107
               for (let i = 0; i < staffList.length; i++) {
108
                 if(tempArr.indexOf(staffList[i].user_name) === -1) {
108
                 if(tempArr.indexOf(staffList[i].user_name) === -1) {
109
                   newArr.push({
109
                   newArr.push({
110
+                    user_type:staffList[i].doctor_type,
110
                     user_name: staffList[i].user_name,
111
                     user_name: staffList[i].user_name,
111
                     admin_user_id:staffList[i].admin_user_id,
112
                     admin_user_id:staffList[i].admin_user_id,
112
                     list: [{class_name:staffList[i].class_name,schedule_week:staffList[i].schedule_week}]
113
                     list: [{class_name:staffList[i].class_name,schedule_week:staffList[i].schedule_week}]
115
                 } else {
116
                 } else {
116
                   for (let j = 0; j < newArr.length; j++) {
117
                   for (let j = 0; j < newArr.length; j++) {
117
                     if (newArr[j].user_name == staffList[i].user_name) {
118
                     if (newArr[j].user_name == staffList[i].user_name) {
118
-                      newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week})
119
+                      newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week,user_type:staffList[i].doctor_type})
119
                     }
120
                     }
120
                   }
121
                   }
121
                 }
122
                 }
127
                 if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
128
                 if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
128
               
129
               
129
                 }else{
130
                 }else{
130
-                  arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: []})
131
+                  arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
131
                   // console.log("arr",arr)
132
                   // console.log("arr",arr)
132
                 }
133
                 }
133
               })
134
               })
135
+              arr.sort(this.compare('user_type'))
134
               this.tableData = arr
136
               this.tableData = arr
135
               
137
               
136
             }
138
             }
172
         return function(a,b){
174
         return function(a,b){
173
             var value1 = a[property];
175
             var value1 = a[property];
174
             var value2 = b[property];
176
             var value2 = b[property];
175
-            return value1 - value2;
177
+            return value2 - value1;
176
         }
178
         }
177
       },
179
       },
178
     },
180
     },
218
           td {
220
           td {
219
             border: 1px solid;
221
             border: 1px solid;
220
             text-align: center;
222
             text-align: center;
221
-            font-size: 20px;
223
+            font-size: 18px;
222
             padding: 15px 5px;
224
             padding: 15px 5px;
223
           }
225
           }
224
         }
226
         }