浏览代码

Merge branches '2022-10-17_vue_schedule_branch' and '20220812' of http://git.shengws.com/csx/Vue_New into 20220812

XMLWAN 2 年前
父节点
当前提交
12704068d1
共有 1 个文件被更改,包括 14 次插入5 次删除
  1. 14 5
      src/xt_pages/workforce/scheduleTablePrintOne.vue

+ 14 - 5
src/xt_pages/workforce/scheduleTablePrintOne.vue 查看文件

236
         this.getAllZones()
236
         this.getAllZones()
237
         this.modeOptions = this.$store.getters.treatment_mode;
237
         this.modeOptions = this.$store.getters.treatment_mode;
238
         this.partition_id = this.$route.query.partition_id
238
         this.partition_id = this.$route.query.partition_id
239
-        this.getSolutionSchedule()
239
+        // this.getSolutionSchedule()
240
     },
240
     },
241
     methods:{
241
     methods:{
242
          getAllZones(){
242
          getAllZones(){
255
                 this.getPatientSheduleCount()
255
                 this.getPatientSheduleCount()
256
             }
256
             }
257
           })
257
           })
258
-        },
258
+        },  compare(p) { //这是比较函数
259
+        return function (m, n) {
260
+          var a = m[p];
261
+          var b = n[p];
262
+          return a - b; //升序
263
+        }
264
+      },
259
         getWeekPanels() {
265
         getWeekPanels() {
260
              this.scheduleZone = []
266
              this.scheduleZone = []
261
               var partionStr = this.partition_id
267
               var partionStr = this.partition_id
279
                 this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
285
                 this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
280
                 var that = this
286
                 var that = this
281
                 if (partitions.length > 0) {
287
                 if (partitions.length > 0) {
288
+
282
                     partitions.forEach(function(partition) {
289
                     partitions.forEach(function(partition) {
283
                         if (partition.jihaos.length == 0) {
290
                         if (partition.jihaos.length == 0) {
284
                             return false
291
                             return false
292
                             zone_type: partition.type,
299
                             zone_type: partition.type,
293
                             cut: jihao.number,
300
                             cut: jihao.number,
294
                             jihao_id: jihao.id,
301
                             jihao_id: jihao.id,
295
-                            Mon_M: {
302
+                              sort:jihao.sort,
303
+                              Mon_M: {
296
                                 schedule_id: 0,
304
                                 schedule_id: 0,
297
                                 mode_id: 0,
305
                                 mode_id: 0,
298
                                 mode_name: '',
306
                                 mode_name: '',
509
                         })
517
                         })
510
                     })
518
                     })
511
                 }
519
                 }
512
-                this.getSchedules()
520
+              this.scheduleZone.sort(this.compare('sort'))
521
+
522
+              this.getSchedules()
513
             })
523
             })
514
         },
524
         },
515
         getSchedules() {
525
         getSchedules() {
915
                     console.log("newArr222222222",newArr)
925
                     console.log("newArr222222222",newArr)
916
                     that.scheduleZone.push(...newArr)
926
                     that.scheduleZone.push(...newArr)
917
                     console.log('总数据77777777777',that.scheduleZone)
927
                     console.log('总数据77777777777',that.scheduleZone)
918
-
919
                 } else {
928
                 } else {
920
                     this.$message.error("网络错误");
929
                     this.$message.error("网络错误");
921
                     return false;
930
                     return false;