Browse Source

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

test_user 2 years ago
parent
commit
73b42a0734

+ 2 - 2
config/sit.env.js View File

@@ -1,8 +1,8 @@
1 1
 module.exports = {
2 2
   NODE_ENV: '"production"',
3 3
   ENV_CONFIG: '"sit"',
4
-  BASE_API: '"http://new_mobile.xt.api.sgjyun.com"',
5
-  // BASE_API:'"https://api.xt.test.sgjyun.com"',
4
+  // BASE_API: '"http://new_mobile.xt.api.sgjyun.com"',
5
+  BASE_API:'"https://api.xt.test.sgjyun.com"',
6 6
   SSO_HOST: '"https://testsso.sgjyun.com"',
7 7
   SRCM_HOST: '"http://test1.sgjyun.com"',
8 8
   XT_HOST: '"https://xt.test.sgjyun.com"',

+ 3 - 6
src/xt_pages/workforce/appointment.vue View File

@@ -333,7 +333,8 @@ export default {
333 333
         this.showtable=true
334 334
         this.showtableOne=false
335 335
         this.$nextTick(() => {
336
-          this.$refs.tableDataZero.getgetSchedules()
336
+
337
+          this.$refs.tableDataZero.start()
337 338
         })
338 339
         console.log('12343545',this.$refs.tableDataZero);
339 340
       }else{
@@ -341,10 +342,6 @@ export default {
341 342
         this.showtableOne=true
342 343
       }
343 344
 
344
-      // if(e.name == 'thisWeek'){
345
-      //    this.$refs.tableData.getWeekPanels()
346
-      // }
347
-      // console.log(getgetSchedules);
348 345
     },
349 346
     dragstart(event, item) {
350 347
       // console.log('start的索引',item.moveIndex)
@@ -439,7 +436,7 @@ export default {
439 436
         this.theWeek.lastWeek = response.data.data.theLastWeek
440 437
         this.theWeek.nextWeek = response.data.data.theNextWeek
441 438
         this.theWeek.nextTwoWeek = response.data.data.theNextSecWeek
442
-        // this.theWeek.historyWeek = response.data.data.theWeek - 2
439
+        this.theWeek.historyWeek = response.data.data.theWeek - 2
443 440
         // 在控制变量改变的时候进行 强制渲染更新
444 441
         let childrenRefs = this.$refs.elTabs.$children
445 442
         this.$nextTick(() => {

+ 410 - 296
src/xt_pages/workforce/components/historyWeekTable.vue View File

@@ -5,11 +5,12 @@
5 5
       <el-date-picker
6 6
             v-model="weekTime"
7 7
             type="week"
8
-            format="yyyy 第 WW 周"
9
-            placeholder="选择周"
10
-            :picker-options="{'firstDayOfWeek': 1}"
8
+            format="第 WW 周"
9
+            placeholder="选择周"  
10
+            :picker-options="pickerBeginDateBefore"
11 11
             @change="changeWeek"
12 12
         >
13
+        <!-- "{'firstDayOfWeek': 1}" -->
13 14
         </el-date-picker>
14 15
     </div>
15 16
     <!--   -->
@@ -533,10 +534,10 @@ export default {
533 534
       dafault: []
534 535
     },
535 536
     // 分区
536
-    partitionsProp: {
537
-      type: Object,
538
-      dafault: {}
539
-    },
537
+    // partitionsProp: {
538
+    //   type: Object,
539
+    //   dafault: {}
540
+    // },
540 541
     config: {
541 542
       type: Object,
542 543
       dafault: {}
@@ -545,6 +546,12 @@ export default {
545 546
   },
546 547
   data() {
547 548
     return {
549
+      // 禁选当前之后的日期
550
+      pickerBeginDateBefore: {
551
+        disabledDate(time) {
552
+          return time.getTime() > Date.now();
553
+        }
554
+      },
548 555
       tableContainHeight:null,
549 556
       value1:false,
550 557
       modename_value:true,
@@ -616,6 +623,7 @@ export default {
616 623
       },
617 624
       start_time:'',//开始时间
618 625
       end_time:'',//结束时间
626
+      lastweek:{},//上两周的第一天和最后一天
619 627
       tiaozhengclass: "tiaozhengclass",
620 628
       changeRules: {
621 629
         mode_id: [{ required: true, message: "请选择模式", trigger: "blur" }],
@@ -739,20 +747,17 @@ export default {
739 747
         this.isShowSix = true
740 748
         this.isShowSeven = true
741 749
       }
742
-
743
-
744
-
745 750
     },
746 751
     weekTime: function() {
747 752
       var theType = this.weekType(this.weekTime);
748 753
       // console.log("999999999",theType)
749 754
       this.theType = theType
750
-      this.getgetSchedules()
755
+      this.getSchedules()
751 756
     },
752 757
     scheduleZoneRow: function() {
753 758
       var theType = this.weekType(this.weekTime);
754 759
       this.theType = theType
755
-      this.getgetSchedules()
760
+      this.getSchedules()
756 761
     },
757 762
     tableHeight(val) {
758 763
       if (!this.timer) {
@@ -789,7 +794,7 @@ export default {
789 794
     rowNumber = 0;
790 795
     this.modeOptions = this.$store.getters.treatment_mode;
791 796
 
792
-    this.partitions = this.partitionsProp;
797
+    // this.partitions = this.partitionsProp;
793 798
 
794 799
 
795 800
     var contagions = this.$store.getters.contagions;
@@ -823,273 +828,274 @@ export default {
823 828
           return a - b; //升序
824 829
       }
825 830
      },
826
-    //  getWeekPanels() {
827
-    //      this.scheduleZone=[]
828
-    //      var partionStr = this.partition_id
829
-    //      var arr = this.zoneIdList.join(',')
830
-
831
-    //      var str = ""
832
-    //      if(partionStr == 0){
833
-    //         str = arr
834
-    //      }
835
-    //      if(partionStr != 0){
836
-    //         str = partionStr.join(',')
837
-    //      }
838
-    //     // 第几周,星期几
839
-    //     getWeekPanelsOne(1,str).then(response => {
840
-    //       console.log('wertwetr',response.data.data);
841
-    //       if (response.data.state == 0) {
842
-    //         return false
843
-    //       }
844
-    //       var partitions = response.data.data.partitions
845
-    //       this.theWeek.thisWeek = response.data.data.theWeek
846
-    //       this.theWeek.historyWeek = this.theWeek.thisWeek -2
847
-    //       this.theWeek.lastWeek = this.theWeek.thisWeek - 1
848
-    //       this.theWeek.nextWeek = this.theWeek.thisWeek + 1
849
-    //       this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
850
-    //       var that = this
851
-    //       if (partitions.length > 0) {
852
-    //         partitions.forEach(function(partition) {
853
-    //           if (partition.jihaos.length == 0) {
854
-    //             return false
855
-    //           }
856
-    //           that.scheduleZoneRow.push(partition.jihaos.length)
857
-
858
-    //           that.partitions[partition.id] = partition
859
-
860
-    //           partition.jihaos.forEach(function(jihao) {
861
-    //             var thisPa = {
862
-    //               area: partition.name,
863
-    //               zone_id: partition.id,
864
-    //               zone_type: partition.type,
865
-    //               cut: jihao.number,
866
-    //               jihao_id: jihao.id,
867
-    //               sort:jihao.sort,
868
-
869
-    //               Mon_M: {
870
-    //                 schedule_id: 0,
871
-    //                 mode_id: 0,
872
-    //                 mode_name: '',
873
-    //                 patient_id: 0,
874
-    //                 patient: '',
875
-    //                 dialysis_machine_name:'',
876
-    //                 schedule_date:"",
877
-    //                 Count:0,
878
-    //               },
879
-    //               Mon_A: {
880
-    //                 schedule_id: 0,
881
-    //                 mode_id: 0,
882
-    //                 mode_name: '',
883
-    //                 patient_id: 0,
884
-    //                 patient: '',
885
-    //                 dialysis_machine_name:'',
886
-    //                 schedule_date:"",
887
-    //                 Count:0,
888
-    //               },
889
-    //               Mon_N: {
890
-    //                 schedule_id: 0,
891
-    //                 mode_id: 0,
892
-    //                 mode_name: '',
893
-    //                 patient_id: 0,
894
-    //                 patient: '',
895
-    //                 dialysis_machine_name:'',
896
-    //                 schedule_date:"",
897
-    //                 Count:0,
898
-    //               },
899
-    //               Tue_M: {
900
-    //                 schedule_id: 0,
901
-    //                 mode_id: 0,
902
-    //                 mode_name: '',
903
-    //                 patient_id: 0,
904
-    //                 patient: '',
905
-    //                 dialysis_machine_name:'',
906
-    //                 schedule_date:"",
907
-    //                 Count:0,
908
-    //               },
909
-    //               Tue_A: {
910
-    //                 schedule_id: 0,
911
-    //                 mode_id: 0,
912
-    //                 mode_name: '',
913
-    //                 patient_id: 0,
914
-    //                 patient: '',
915
-    //                 dialysis_machine_name:'',
916
-    //                 schedule_date:"",
917
-    //                 Count:0,
918
-    //               },
919
-    //               Tue_N: {
920
-    //                 schedule_id: 0,
921
-    //                 mode_id: 0,
922
-    //                 mode_name: '',
923
-    //                 patient_id: 0,
924
-    //                 patient: '',
925
-    //                 dialysis_machine_name:'',
926
-    //                 schedule_date:"",
927
-    //                 Count:0,
928
-    //               },
929
-    //               Wed_M: {
930
-    //                 schedule_id: 0,
931
-    //                 mode_id: 0,
932
-    //                 mode_name: '',
933
-    //                 patient_id: 0,
934
-    //                 patient: '',
935
-    //                 dialysis_machine_name:'',
936
-    //                 schedule_date:"",
937
-    //                 Count:0,
938
-    //               },
939
-    //               Wed_A: {
940
-    //                 schedule_id: 0,
941
-    //                 mode_id: 0,
942
-    //                 mode_name: '',
943
-    //                 patient_id: 0,
944
-    //                 patient: '',
945
-    //                 dialysis_machine_name:'',
946
-    //                 schedule_date:"",
947
-    //                 Count:0,
948
-    //               },
949
-    //               Wed_N: {
950
-    //                 schedule_id: 0,
951
-    //                 mode_id: 0,
952
-    //                 mode_name: '',
953
-    //                 patient_id: 0,
954
-    //                 patient: '',
955
-    //                 dialysis_machine_name:'',
956
-    //                 schedule_date:"",
957
-    //                 Count:0,
958
-    //               },
959
-    //               Thurs_M: {
960
-    //                 schedule_id: 0,
961
-    //                 mode_id: 0,
962
-    //                 mode_name: '',
963
-    //                 patient_id: 0,
964
-    //                 patient: '',
965
-    //                 dialysis_machine_name:'',
966
-    //                 schedule_date:"",
967
-    //                 Count:0,
968
-    //               },
969
-    //               Thurs_A: {
970
-    //                 schedule_id: 0,
971
-    //                 mode_id: 0,
972
-    //                 mode_name: '',
973
-    //                 patient_id: 0,
974
-    //                 patient: '',
975
-    //                 dialysis_machine_name:'',
976
-    //                 schedule_date:"",
977
-    //                 Count:0,
978
-    //               },
979
-    //               Thurs_N: {
980
-    //                 schedule_id: 0,
981
-    //                 mode_id: 0,
982
-    //                 mode_name: '',
983
-    //                 patient_id: 0,
984
-    //                 patient: '',
985
-    //                 dialysis_machine_name:'',
986
-    //                 schedule_date:"",
987
-    //                 Count:0,
988
-    //               },
989
-    //               Fri_M: {
990
-    //                 schedule_id: 0,
991
-    //                 mode_id: 0,
992
-    //                 mode_name: '',
993
-    //                 patient_id: 0,
994
-    //                 patient: '',
995
-    //                 dialysis_machine_name:'',
996
-    //                 schedule_date:"",
997
-    //                 Count:0,
998
-    //               },
999
-    //               Fri_A: {
1000
-    //                 schedule_id: 0,
1001
-    //                 mode_id: 0,
1002
-    //                 mode_name: '',
1003
-    //                 patient_id: 0,
1004
-    //                 patient: '',
1005
-    //                 dialysis_machine_name:'',
1006
-    //                 schedule_date:"",
1007
-    //                 Count:0,
1008
-    //               },
1009
-    //               Fri_N: {
1010
-    //                 schedule_id: 0,
1011
-    //                 mode_id: 0,
1012
-    //                 mode_name: '',
1013
-    //                 patient_id: 0,
1014
-    //                 patient: '',
1015
-    //                 dialysis_machine_name:'',
1016
-    //                 schedule_date:"",
1017
-    //                 Count:0,
1018
-    //               },
1019
-    //               Sat_M: {
1020
-    //                 schedule_id: 0,
1021
-    //                 mode_id: 0,
1022
-    //                 mode_name: '',
1023
-    //                 patient_id: 0,
1024
-    //                 patient: '',
1025
-    //                 dialysis_machine_name:'',
1026
-    //                 schedule_date:"",
1027
-    //                 Count:0,
1028
-    //               },
1029
-    //               Sat_A: {
1030
-    //                 schedule_id: 0,
1031
-    //                 mode_id: 0,
1032
-    //                 mode_name: '',
1033
-    //                 patient_id: 0,
1034
-    //                 patient: '',
1035
-    //                 dialysis_machine_name:'',
1036
-    //                 schedule_date:"",
1037
-    //                 Count:0,
1038
-    //               },
1039
-    //               Sat_N: {
1040
-    //                 schedule_id: 0,
1041
-    //                 mode_id: 0,
1042
-    //                 mode_name: '',
1043
-    //                 patient_id: 0,
1044
-    //                 patient: '',
1045
-    //                 dialysis_machine_name:'',
1046
-    //                 schedule_date:"",
1047
-    //                 Count:0,
1048
-    //               },
1049
-    //               Sun_A: {
1050
-    //                 schedule_id: 0,
1051
-    //                 mode_id: 0,
1052
-    //                 mode_name: '',
1053
-    //                 patient_id: 0,
1054
-    //                 patient: '',
1055
-    //                 dialysis_machine_name:'',
1056
-    //                 schedule_date:"",
1057
-    //                 Count:0,
1058
-    //               },
1059
-    //               Sun_N: {
1060
-    //                 schedule_id: 0,
1061
-    //                 mode_id: 0,
1062
-    //                 mode_name: '',
1063
-    //                 patient_id: 0,
1064
-    //                 patient: '',
1065
-    //                 dialysis_machine_name:'',
1066
-    //                 schedule_date:"",
1067
-    //                 Count:0,
1068
-    //               },
1069
-    //               Sun_M: {
1070
-    //                 schedule_id: 0,
1071
-    //                 mode_id: 0,
1072
-    //                 mode_name: '',
1073
-    //                 patient_id: 0,
1074
-    //                 patient: '',
1075
-    //                 dialysis_machine_name:'',
1076
-    //                 schedule_date:"",
1077
-    //                 Count:0,
1078
-    //               },
1079
-    //               total: 0
1080
-    //             }
1081
-
1082
-    //             that.scheduleZone.push(thisPa)
1083
-
1084
-    //           })
1085
-    //         })
1086
-    //       }
1087
-
1088
-    //       this.scheduleZone.sort(this.compare('sort'))
1089
-    //       this.source_scheduleZone = this.scheduleZone
1090
-    //       console.log("34455555566666",this.source_scheduleZone)
1091
-    //     })
1092
-    //  },
831
+     getWeekPanels() {
832
+         this.scheduleZone=[]
833
+         var partionStr = this.partition_id
834
+         var arr = this.zoneIdList.join(',')
835
+
836
+         var str = ""
837
+         if(partionStr == 0){
838
+            str = arr
839
+         }
840
+         if(partionStr != 0){
841
+            str = partionStr.join(',')
842
+         }
843
+        // 第几周,星期几
844
+        getWeekPanelsOne(1,str).then(response => {
845
+          console.log('wertwetr',response.data.data);
846
+          if (response.data.state == 0) {
847
+            return false
848
+          }
849
+          var partitions = response.data.data.partitions
850
+          this.theWeek.thisWeek = response.data.data.theWeek
851
+          this.theWeek.historyWeek = this.theWeek.thisWeek -2
852
+          this.theWeek.lastWeek = this.theWeek.thisWeek - 1
853
+          this.theWeek.nextWeek = this.theWeek.thisWeek + 1
854
+          this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
855
+          var that = this
856
+          if (partitions.length > 0) {
857
+            partitions.forEach(function(partition) {
858
+              if (partition.jihaos.length == 0) {
859
+                return false
860
+              }
861
+              that.scheduleZoneRow.push(partition.jihaos.length)
862
+
863
+              that.partitions[partition.id] = partition
864
+
865
+              partition.jihaos.forEach(function(jihao) {
866
+                var thisPa = {
867
+                  area: partition.name,
868
+                  zone_id: partition.id,
869
+                  zone_type: partition.type,
870
+                  cut: jihao.number,
871
+                  jihao_id: jihao.id,
872
+                  sort:jihao.sort,
873
+
874
+                  Mon_M: {
875
+                    schedule_id: 0,
876
+                    mode_id: 0,
877
+                    mode_name: '',
878
+                    patient_id: 0,
879
+                    patient: '',
880
+                    dialysis_machine_name:'',
881
+                    schedule_date:"",
882
+                    Count:0,
883
+                  },
884
+                  Mon_A: {
885
+                    schedule_id: 0,
886
+                    mode_id: 0,
887
+                    mode_name: '',
888
+                    patient_id: 0,
889
+                    patient: '',
890
+                    dialysis_machine_name:'',
891
+                    schedule_date:"",
892
+                    Count:0,
893
+                  },
894
+                  Mon_N: {
895
+                    schedule_id: 0,
896
+                    mode_id: 0,
897
+                    mode_name: '',
898
+                    patient_id: 0,
899
+                    patient: '',
900
+                    dialysis_machine_name:'',
901
+                    schedule_date:"",
902
+                    Count:0,
903
+                  },
904
+                  Tue_M: {
905
+                    schedule_id: 0,
906
+                    mode_id: 0,
907
+                    mode_name: '',
908
+                    patient_id: 0,
909
+                    patient: '',
910
+                    dialysis_machine_name:'',
911
+                    schedule_date:"",
912
+                    Count:0,
913
+                  },
914
+                  Tue_A: {
915
+                    schedule_id: 0,
916
+                    mode_id: 0,
917
+                    mode_name: '',
918
+                    patient_id: 0,
919
+                    patient: '',
920
+                    dialysis_machine_name:'',
921
+                    schedule_date:"",
922
+                    Count:0,
923
+                  },
924
+                  Tue_N: {
925
+                    schedule_id: 0,
926
+                    mode_id: 0,
927
+                    mode_name: '',
928
+                    patient_id: 0,
929
+                    patient: '',
930
+                    dialysis_machine_name:'',
931
+                    schedule_date:"",
932
+                    Count:0,
933
+                  },
934
+                  Wed_M: {
935
+                    schedule_id: 0,
936
+                    mode_id: 0,
937
+                    mode_name: '',
938
+                    patient_id: 0,
939
+                    patient: '',
940
+                    dialysis_machine_name:'',
941
+                    schedule_date:"",
942
+                    Count:0,
943
+                  },
944
+                  Wed_A: {
945
+                    schedule_id: 0,
946
+                    mode_id: 0,
947
+                    mode_name: '',
948
+                    patient_id: 0,
949
+                    patient: '',
950
+                    dialysis_machine_name:'',
951
+                    schedule_date:"",
952
+                    Count:0,
953
+                  },
954
+                  Wed_N: {
955
+                    schedule_id: 0,
956
+                    mode_id: 0,
957
+                    mode_name: '',
958
+                    patient_id: 0,
959
+                    patient: '',
960
+                    dialysis_machine_name:'',
961
+                    schedule_date:"",
962
+                    Count:0,
963
+                  },
964
+                  Thurs_M: {
965
+                    schedule_id: 0,
966
+                    mode_id: 0,
967
+                    mode_name: '',
968
+                    patient_id: 0,
969
+                    patient: '',
970
+                    dialysis_machine_name:'',
971
+                    schedule_date:"",
972
+                    Count:0,
973
+                  },
974
+                  Thurs_A: {
975
+                    schedule_id: 0,
976
+                    mode_id: 0,
977
+                    mode_name: '',
978
+                    patient_id: 0,
979
+                    patient: '',
980
+                    dialysis_machine_name:'',
981
+                    schedule_date:"",
982
+                    Count:0,
983
+                  },
984
+                  Thurs_N: {
985
+                    schedule_id: 0,
986
+                    mode_id: 0,
987
+                    mode_name: '',
988
+                    patient_id: 0,
989
+                    patient: '',
990
+                    dialysis_machine_name:'',
991
+                    schedule_date:"",
992
+                    Count:0,
993
+                  },
994
+                  Fri_M: {
995
+                    schedule_id: 0,
996
+                    mode_id: 0,
997
+                    mode_name: '',
998
+                    patient_id: 0,
999
+                    patient: '',
1000
+                    dialysis_machine_name:'',
1001
+                    schedule_date:"",
1002
+                    Count:0,
1003
+                  },
1004
+                  Fri_A: {
1005
+                    schedule_id: 0,
1006
+                    mode_id: 0,
1007
+                    mode_name: '',
1008
+                    patient_id: 0,
1009
+                    patient: '',
1010
+                    dialysis_machine_name:'',
1011
+                    schedule_date:"",
1012
+                    Count:0,
1013
+                  },
1014
+                  Fri_N: {
1015
+                    schedule_id: 0,
1016
+                    mode_id: 0,
1017
+                    mode_name: '',
1018
+                    patient_id: 0,
1019
+                    patient: '',
1020
+                    dialysis_machine_name:'',
1021
+                    schedule_date:"",
1022
+                    Count:0,
1023
+                  },
1024
+                  Sat_M: {
1025
+                    schedule_id: 0,
1026
+                    mode_id: 0,
1027
+                    mode_name: '',
1028
+                    patient_id: 0,
1029
+                    patient: '',
1030
+                    dialysis_machine_name:'',
1031
+                    schedule_date:"",
1032
+                    Count:0,
1033
+                  },
1034
+                  Sat_A: {
1035
+                    schedule_id: 0,
1036
+                    mode_id: 0,
1037
+                    mode_name: '',
1038
+                    patient_id: 0,
1039
+                    patient: '',
1040
+                    dialysis_machine_name:'',
1041
+                    schedule_date:"",
1042
+                    Count:0,
1043
+                  },
1044
+                  Sat_N: {
1045
+                    schedule_id: 0,
1046
+                    mode_id: 0,
1047
+                    mode_name: '',
1048
+                    patient_id: 0,
1049
+                    patient: '',
1050
+                    dialysis_machine_name:'',
1051
+                    schedule_date:"",
1052
+                    Count:0,
1053
+                  },
1054
+                  Sun_A: {
1055
+                    schedule_id: 0,
1056
+                    mode_id: 0,
1057
+                    mode_name: '',
1058
+                    patient_id: 0,
1059
+                    patient: '',
1060
+                    dialysis_machine_name:'',
1061
+                    schedule_date:"",
1062
+                    Count:0,
1063
+                  },
1064
+                  Sun_N: {
1065
+                    schedule_id: 0,
1066
+                    mode_id: 0,
1067
+                    mode_name: '',
1068
+                    patient_id: 0,
1069
+                    patient: '',
1070
+                    dialysis_machine_name:'',
1071
+                    schedule_date:"",
1072
+                    Count:0,
1073
+                  },
1074
+                  Sun_M: {
1075
+                    schedule_id: 0,
1076
+                    mode_id: 0,
1077
+                    mode_name: '',
1078
+                    patient_id: 0,
1079
+                    patient: '',
1080
+                    dialysis_machine_name:'',
1081
+                    schedule_date:"",
1082
+                    Count:0,
1083
+                  },
1084
+                  total: 0
1085
+                }
1086
+
1087
+                that.scheduleZone.push(thisPa)
1088
+
1089
+              })
1090
+            })
1091
+          }
1092
+
1093
+          this.scheduleZone.sort(this.compare('sort'))
1094
+          this.source_scheduleZone = this.scheduleZone
1095
+          console.log("34455555566666",this.source_scheduleZone)
1096
+          this.getSchedules()
1097
+        })
1098
+     },
1093 1099
 
1094 1100
     cellClass({ row, column, rowIndex, columnIndex }) {
1095 1101
 
@@ -2781,7 +2787,7 @@ export default {
2781 2787
     getAllZones() {
2782 2788
       getAllZones().then(response => {
2783 2789
         if (response.data.state == 1) {
2784
-          console.log('getAllZones的数据',response.data.data);
2790
+          // console.log('getAllZones的数据',response.data.data);
2785 2791
           var zones = response.data.data.zones
2786 2792
           for (let i = 0; i < zones.length; i++) {
2787 2793
             this.zoneIdList.push(zones[i].id)
@@ -2791,7 +2797,6 @@ export default {
2791 2797
 
2792 2798
           this.strArr = strArr
2793 2799
           this.getWeekPanels()
2794
-          this.getgetSchedules()
2795 2800
         }
2796 2801
       })
2797 2802
     },
@@ -2800,13 +2805,18 @@ export default {
2800 2805
       this.partition_id = val
2801 2806
       this.getWeekPanels()
2802 2807
 
2803
-      this.getgetSchedules()
2808
+      // this.getSchedules()
2809
+      // this.getWeekPanels()
2810
+
2811
+     
2804 2812
     },
2805 2813
     changeSchedule_type(val) {
2806 2814
       this.$emit('event2', val)
2807 2815
       this.schedule_type = val
2808 2816
 
2809
-      this.getgetSchedules()
2817
+      this.getSchedules()
2818
+
2819
+     
2810 2820
     },
2811 2821
     changeWeekDay(val) {
2812 2822
       this.$emit('event3', val)
@@ -2819,20 +2829,53 @@ export default {
2819 2829
     },
2820 2830
     changeWeek(val) {
2821 2831
       console.log('11111',val)
2822
-      this.start_time = ""
2823
-      this.end_time = ""
2824 2832
       this.newDay = []
2825 2833
       var start = this.getTimestamp(val) - 86400
2826 2834
       var end = start + 518400
2827
-      console.log('222222',start)
2828
-      console.log('333333',end )
2835
+
2829 2836
       this.start_time = this.getTime(start)
2830 2837
       this.end_time = this.getTime(end)
2838
+
2839
+      this.newDay.push(this.start_time)
2840
+      this.newDay.push(this.end_time)
2841
+
2831 2842
       console.log('44444',this.start_time)
2832 2843
       console.log('555555',this.end_time )
2833
-      this.getgetSchedules()
2844
+      console.log('666666',this.newDay);
2845
+      this.getSchedules()
2846
+    },
2847
+    // 选择周次
2848
+    start(){
2849
+      var thisweek = {};
2850
+      var date = new Date();
2851
+    // 本周一的日期
2852
+      date.setDate(date.getDate() - date.getDay() + 1);
2853
+      thisweek.start_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() ;
2854
+
2855
+    // 本周日的日期
2856
+      date.setDate(date.getDate() + 6);
2857
+      thisweek.end_day = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
2858
+      console.log('asdfgdsafg',thisweek.start_day,thisweek.end_day);
2859
+
2860
+      var date = new Date();
2861
+      // 上上周一的日期
2862
+      date.setDate(date.getDate()-14 - date.getDay() + 1);
2863
+      var month=(date.getMonth() + 1)<10 ? "0"+(date.getMonth()+1):(date.getMonth()+1)
2864
+      var day=(date.getDate())<10 ? "0"+(date.getDate()):(date.getDate())
2865
+      console.log('wqertwetwe',month);
2866
+      this.start_time = date.getFullYear() + "-" + month + "-" + day + " 00:00:00";
2867
+
2868
+      // 上上周日的日期
2869
+      date.setDate(date.getDate() + 6);
2870
+      var month=(date.getMonth() + 1)<10 ? "0"+(date.getMonth()+1):(date.getMonth()+1)
2871
+      var day=(date.getDate())<10 ? "0"+(date.getDate()):(date.getDate())
2872
+      this.end_time = date.getFullYear() + "-" + month + "-" + day + ' 23:59:59';
2873
+      console.log('1234566',this.lastweek.start_day,this.lastweek.end_day) ;
2874
+      this.getAllZones()
2875
+      // this.getSchedules()
2834 2876
     },
2835
-    getgetSchedules(){
2877
+    getSchedules(){
2878
+
2836 2879
       var partionStr = this.partition_id
2837 2880
       var arr = this.zoneIdList.join(',')
2838 2881
       var str = ""
@@ -2844,20 +2887,68 @@ export default {
2844 2887
       }
2845 2888
       const params = {
2846 2889
         is_before:1,
2847
-        // start_time: this.start_time + " 00:00:00",
2848
-        // end_time:this.end_time + ' 23:59:59',
2849
-        start_time: '2023-03-20' + " 00:00:00",
2850
-        end_time:'2023-03-26' + ' 23:59:59',
2890
+        start_time: this.start_time  ,
2891
+        end_time:this.end_time  ,
2892
+        // start_time: this.lastweek.start_day + " 00:00:00",
2893
+        // end_time: this.lastweek.end_day + ' 23:59:59',
2851 2894
         weekTime: this.theType,
2852 2895
         patitionid: str,
2853 2896
         schedule_type: this.schedule_type,
2854 2897
       }
2855
-
2898
+     console.log("str--------",str)
2856 2899
       getSchedulesOne(params).then(response => {
2900
+        console.log('getSchedulesOne',response.data.data);
2857 2901
         if (response.data.state == 1) {
2858 2902
           this.weekTitle = response.data.data.weekTitle;
2903
+          this.weekTitle = []
2904
+
2905
+
2906
+
2907
+
2908
+          var first = this.getTimestamp(this.start_time)
2909
+          var first_day =  this.getTime(first, "{y}-{m}-{d}")
2910
+          this.weekTitle.push(first_day)
2911
+
2912
+
2913
+          var second = this.getTimestamp(this.start_time) + 86400
2914
+          var soncond_day =  this.getTime(second, "{y}-{m}-{d}")
2915
+           this.weekTitle.push(soncond_day)
2916
+
2917
+          var three = this.getTimestamp(this.start_time) + 172800
2918
+          var three_day =  this.getTime(three, "{y}-{m}-{d}")
2919
+          this.weekTitle.push(three_day)
2920
+
2921
+
2922
+          var four = this.getTimestamp(this.start_time) + 259200
2923
+          var four_day =  this.getTime(four, "{y}-{m}-{d}")
2924
+
2925
+           this.weekTitle.push(four_day)
2926
+
2927
+          var five = this.getTimestamp(this.start_time) + 345600
2928
+          var five_day =  this.getTime(five, "{y}-{m}-{d}")
2929
+
2930
+          this.weekTitle.push(five_day)
2931
+
2932
+          var six = this.getTimestamp(this.start_time) + 432000
2933
+          var six_day =  this.getTime(six, "{y}-{m}-{d}")
2934
+
2935
+          this.weekTitle.push(six_day)
2936
+
2937
+
2938
+          var seven = this.getTimestamp(this.start_time) + 518400
2939
+          var seven_day =  this.getTime(seven, "{y}-{m}-{d}")
2940
+
2941
+          this.weekTitle.push(seven_day)
2942
+
2943
+
2944
+
2945
+
2946
+          console.log("this.weekTitle",this.weekTitle)
2947
+
2948
+
2859 2949
 
2860 2950
           this.weekDays = response.data.data.days;
2951
+
2861 2952
           this.toDay = response.data.data.today;
2862 2953
           var theSchedules = response.data.data.schdules;
2863 2954
           var schedulesGroup = response.data.data.schedulesGroup
@@ -2865,7 +2956,10 @@ export default {
2865 2956
 
2866 2957
           var that = this;
2867 2958
 
2868
-          this.scheduleZone.forEach(function (zone, index) {
2959
+       
2960
+
2961
+
2962
+         this.scheduleZone.forEach(function (zone, index) {
2869 2963
 
2870 2964
             that.scheduleZone[index].Mon_M = {
2871 2965
               mode_id: 0,
@@ -3101,6 +3195,26 @@ export default {
3101 3195
         }
3102 3196
       });
3103 3197
     },
3198
+    getTimestamp(time) {
3199
+      //把时间日期转成时间戳
3200
+      console.log("日期", new Date(time));
3201
+      return new Date(time).getTime() / 1000;
3202
+    },
3203
+
3204
+    getTimestampToTime (timestamp) {
3205
+      let date = new Date(timestamp)
3206
+      let Y = date.getFullYear() + '-'
3207
+      let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
3208
+      let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate())
3209
+      let time = Y + M + D
3210
+      return time
3211
+   },
3212
+    getTime(value, temp) {
3213
+      if (value != undefined) {
3214
+        return uParseTime(value, temp)
3215
+      }
3216
+      return ''
3217
+    },
3104 3218
   },
3105 3219
   components: {
3106 3220
     ScheduleItem