Przeglądaj źródła

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

csx 4 lat temu
rodzic
commit
b82a8e712e
3 zmienionych plików z 87 dodań i 77 usunięć
  1. 2 2
      config/dev.env.js
  2. 2 2
      config/index.js
  3. 83 73
      src/xt_pages/workforce/appointment.vue

+ 2 - 2
config/dev.env.js Wyświetl plik

7
   NODE_ENV: '"development"',
7
   NODE_ENV: '"development"',
8
   ENV_CONFIG: '"dev"',
8
   ENV_CONFIG: '"dev"',
9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  //BASE_API: '"http://localhost:9531"',
10
+  // BASE_API: '"http://api.xt.test.sgjyun.com"',
11
+  BASE_API: '"http://localhost:9531"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 2 - 2
config/index.js Wyświetl plik

27
     // can be overwritten by process.env.HOST
27
     // can be overwritten by process.env.HOST
28
     // if you want dev by ip, please set host: '0.0.0.0'
28
     // if you want dev by ip, please set host: '0.0.0.0'
29
 
29
 
30
-     host: 'xt.test.sgjyun.com',
30
+     // host: 'xt.test.sgjyun.com',
31
     //  host: 'xt.kuyicloud.com',
31
     //  host: 'xt.kuyicloud.com',
32
     // host: 'xt.test.sgjyun.com',
32
     // host: 'xt.test.sgjyun.com',
33
-    // host: 'localhost',
33
+    host: 'localhost',
34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35
     autoOpenBrowser: true,
35
     autoOpenBrowser: true,
36
     errorOverlay: true,
36
     errorOverlay: true,

+ 83 - 73
src/xt_pages/workforce/appointment.vue Wyświetl plik

415
                   total: 0
415
                   total: 0
416
                 }
416
                 }
417
                 that.scheduleZone.push(thisPa)
417
                 that.scheduleZone.push(thisPa)
418
-                
418
+
419
               })
419
               })
420
             })
420
             })
421
           }
421
           }
458
 
458
 
459
             i++
459
             i++
460
           }
460
           }
461
-         
461
+
462
           const data = this.formatJson(filterVal, list)
462
           const data = this.formatJson(filterVal, list)
463
           // console.log("data",data)
463
           // console.log("data",data)
464
-        
464
+
465
           const filename = '排班模版'
465
           const filename = '排班模版'
466
           excel.export_json_to_excel({
466
           excel.export_json_to_excel({
467
             multiHeader,
467
             multiHeader,
474
         })
474
         })
475
       },
475
       },
476
       export_fileTwo:function(){
476
       export_fileTwo:function(){
477
-        
477
+
478
         import('@/vendor/Export2Excel').then(excel => {
478
         import('@/vendor/Export2Excel').then(excel => {
479
           const filterVal = [
479
           const filterVal = [
480
             '区号',
480
             '区号',
483
           const multiHeader = [['区号', '机号', '周一'+"("+this.days[0]+")" , '', '', '周二'+"("+this.days[1]+")", '', '', '周三'+"("+this.days[2]+")" , '', '', '周四'+"("+this.days[3]+")" , '', '', '周五'+"("+this.days[4]+")" , '', '', '周六'+"("+this.days[5]+")" , '', '', '周日'+"("+this.days[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
483
           const multiHeader = [['区号', '机号', '周一'+"("+this.days[0]+")" , '', '', '周二'+"("+this.days[1]+")", '', '', '周三'+"("+this.days[2]+")" , '', '', '周四'+"("+this.days[3]+")" , '', '', '周五'+"("+this.days[4]+")" , '', '', '周六'+"("+this.days[5]+")" , '', '', '周日'+"("+this.days[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
484
           const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
484
           const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
485
           const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
485
           const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
486
-      
486
+
487
           var data = []
487
           var data = []
488
          this.tableList.map(item=>{
488
          this.tableList.map(item=>{
489
            data.push(Object.values(item))
489
            data.push(Object.values(item))
490
-           
490
+
491
          })
491
          })
492
 
492
 
493
           const filename = '排班模版'
493
           const filename = '排班模版'
498
             data,
498
             data,
499
             filename
499
             filename
500
           })
500
           })
501
-          
501
+
502
         })
502
         })
503
       },
503
       },
504
       formatJson(filterVal, jsonData) {
504
       formatJson(filterVal, jsonData) {
505
        return jsonData.map(v => filterVal.map(j => v[j]))
505
        return jsonData.map(v => filterVal.map(j => v[j]))
506
       },
506
       },
507
-  
507
+
508
       //  formatJson(filterVal, jsonData) {
508
       //  formatJson(filterVal, jsonData) {
509
       //    console.log("jsonData",jsonData)
509
       //    console.log("jsonData",jsonData)
510
       //   return jsonData.map(v =>
510
       //   return jsonData.map(v =>
550
         return isShow
550
         return isShow
551
       },
551
       },
552
        handleSuccess({ results, header }) {
552
        handleSuccess({ results, header }) {
553
-     
553
+
554
         let headers = []
554
         let headers = []
555
         for (let key in results[0]) {
555
         for (let key in results[0]) {
556
           headers.push(key)
556
           headers.push(key)
775
             isHas_56 && isHas_57 && isHas_58 && isHas_59 && isHas_60 &&
775
             isHas_56 && isHas_57 && isHas_58 && isHas_59 && isHas_60 &&
776
             isHas_61 && isHas_62 && isHas_63 && isHas_64 && isHas_65)) {
776
             isHas_61 && isHas_62 && isHas_63 && isHas_64 && isHas_65)) {
777
 
777
 
778
-           
778
+           console.log("sssssss")
779
 
779
 
780
             this.dialogVisible = true
780
             this.dialogVisible = true
781
             return
781
             return
782
           }
782
           }
783
         } else {
783
         } else {
784
-          
784
+
785
+          console.log("ssssssszzzzzzz")
785
 
786
 
786
           this.dialogVisible = true
787
           this.dialogVisible = true
787
           return
788
           return
788
         }
789
         }
789
-
790
         let is_system_zone = true
790
         let is_system_zone = true
791
         let is_device_number = true
791
         let is_device_number = true
792
         let zones = []
792
         let zones = []
793
         let deviceNumber = []
793
         let deviceNumber = []
794
-
795
         for (let i = 0; i < results.length; i++) {
794
         for (let i = 0; i < results.length; i++) {
796
-          if (results[i + 1]) {
795
+          if (results[i + 1] && results[i + 1]['区号'] != undefined) {
797
             zones.push(results[i + 1]['区号'])
796
             zones.push(results[i + 1]['区号'])
798
           }
797
           }
799
-          if (results[i + 1]) {
798
+          if (results[i + 1] && results[i + 1]['机号'] != undefined) {
800
             deviceNumber.push(results[i + 1]['机号'])
799
             deviceNumber.push(results[i + 1]['机号'])
801
           }
800
           }
802
-
803
         }
801
         }
804
-
805
         const obj = {}
802
         const obj = {}
806
         zones = zones.reduce((cur, next) => {
803
         zones = zones.reduce((cur, next) => {
807
           obj[next] ? '' : obj[next] = true && cur.push(next)
804
           obj[next] ? '' : obj[next] = true && cur.push(next)
831
           }
828
           }
832
         }
829
         }
833
 
830
 
831
+         console.log(zones)
834
         for (let i = 0; i < zones.length; i++) {
832
         for (let i = 0; i < zones.length; i++) {
833
+          console.log(zones[i])
834
+          console.log("err"+total_zones.includes(zones[i]))
835
+
835
           if (!total_zones.includes(zones[i])) {
836
           if (!total_zones.includes(zones[i])) {
836
             is_system_zone = false
837
             is_system_zone = false
837
           }
838
           }
838
         }
839
         }
839
-        
840
+
840
         console.log("totalzones",total_zones)
841
         console.log("totalzones",total_zones)
841
-        
842
-        
843
         console.log("number:")
842
         console.log("number:")
844
         console.log("total",total_device_number)
843
         console.log("total",total_device_number)
845
         console.log("23121212:")
844
         console.log("23121212:")
863
 
862
 
864
         let datas = []
863
         let datas = []
865
         let failed_datas = []
864
         let failed_datas = []
866
-       
867
 
865
 
868
-       
866
+
867
+
869
 
868
 
870
         console.log("结果22222222222",results)
869
         console.log("结果22222222222",results)
871
 
870
 
872
         for (let i = 0; i < results.length; i++) {
871
         for (let i = 0; i < results.length; i++) {
873
-          
872
+
874
           for (let key in results[i + 1]) {
873
           for (let key in results[i + 1]) {
875
             let tempObjTwo = { partition_name: '', device_number_name: '' }
874
             let tempObjTwo = { partition_name: '', device_number_name: '' }
876
 
875
 
877
             if (key != '区号' && key != '机号' && results[i+1][key]!="") {
876
             if (key != '区号' && key != '机号' && results[i+1][key]!="") {
878
               let obj = {}
877
               let obj = {}
879
-             
878
+
880
               obj['name'] = results[i + 1][key].replace(/\s/g, '')
879
               obj['name'] = results[i + 1][key].replace(/\s/g, '')
881
               console.log("88888888",obj['name'])
880
               console.log("88888888",obj['name'])
882
               if (tempObj[key] == '上午') {
881
               if (tempObj[key] == '上午') {
897
 
896
 
898
               console.log("objtwo000000000000000000000",tempObjTwo)
897
               console.log("objtwo000000000000000000000",tempObjTwo)
899
             }
898
             }
900
-            
901
-           
899
+
900
+
902
             tempObjTwo['partition_name'] = results[i + 1]['区号']
901
             tempObjTwo['partition_name'] = results[i + 1]['区号']
903
             tempObjTwo['device_number_name'] = results[i + 1]['机号']
902
             tempObjTwo['device_number_name'] = results[i + 1]['机号']
904
             tempObjTwo['index'] = i + 3
903
             tempObjTwo['index'] = i + 3
931
           }
930
           }
932
 
931
 
933
           if (datas[i].device_number_name == undefined) {
932
           if (datas[i].device_number_name == undefined) {
933
+            console.log("err1"+datas[i].device_number_name)
934
+
934
             is_device_number = false
935
             is_device_number = false
935
 
936
 
936
           }
937
           }
937
 
938
 
938
           if (datas[i].partition_name == undefined) {
939
           if (datas[i].partition_name == undefined) {
939
-            
940
+            console.log("err2"+datas[i].partition_name)
941
+
940
             is_system_zone = false
942
             is_system_zone = false
941
           }
943
           }
942
 
944
 
943
           if (datas[i].schedule_date === '0') {
945
           if (datas[i].schedule_date === '0') {
946
+            console.log("err23"+datas[i].schedule_date)
947
+
944
             is_system_zone = false
948
             is_system_zone = false
945
 
949
 
946
           }
950
           }
947
 
951
 
948
           if (datas[i].schedule_week === '0') {
952
           if (datas[i].schedule_week === '0') {
953
+            console.log("err234"+datas[i].schedule_week)
954
+
949
             is_system_zone = false
955
             is_system_zone = false
950
 
956
 
951
           }
957
           }
952
 
958
 
953
           if (datas[i].schedule_type === 0) {
959
           if (datas[i].schedule_type === 0) {
960
+            console.log("err2345"+datas[i].schedule_type)
961
+
954
             is_system_zone = false
962
             is_system_zone = false
955
 
963
 
956
           }
964
           }
980
           obj[key] = value
988
           obj[key] = value
981
           tempObjArr.push(obj)
989
           tempObjArr.push(obj)
982
         }
990
         }
983
-        
991
+
984
         for (let i = 0; i < tempObjArr.length; i++) {
992
         for (let i = 0; i < tempObjArr.length; i++) {
985
           for (let key in tempObjArr[i]) {
993
           for (let key in tempObjArr[i]) {
986
             let arr = tempObjArr[i][key]
994
             let arr = tempObjArr[i][key]
989
               obj[next] ? '' : obj[next] = true && cur.push(next)
997
               obj[next] ? '' : obj[next] = true && cur.push(next)
990
               return cur
998
               return cur
991
             }, []) // 设置cur默认类型为数组,并且初始值为空的数组
999
             }, []) // 设置cur默认类型为数组,并且初始值为空的数组
992
-            
1000
+
993
             console.log("长度11111111111",tempObjArr[i][key].length)
1001
             console.log("长度11111111111",tempObjArr[i][key].length)
994
             console.log("长度22222222222",arr.length)
1002
             console.log("长度22222222222",arr.length)
995
             if (tempObjArr[i][key].length > arr.length) {    //比对原数组和去重后的原数组总数,不同的话则存在重复元素
1003
             if (tempObjArr[i][key].length > arr.length) {    //比对原数组和去重后的原数组总数,不同的话则存在重复元素
1004
 
1012
 
1005
 
1013
 
1006
         if (headers.length > 65 || !is_system_zone || !is_device_number) {
1014
         if (headers.length > 65 || !is_system_zone || !is_device_number) {
1015
+          console.log("ssssssszzzzzzzqqqqqqqq")
1016
+
1007
           this.dialogVisible = true
1017
           this.dialogVisible = true
1008
           return
1018
           return
1009
         } else {
1019
         } else {
1010
-          
1020
+
1011
           if (is_exist_repeat) {
1021
           if (is_exist_repeat) {
1012
             this.isExistRepeatVisible = true
1022
             this.isExistRepeatVisible = true
1013
             return
1023
             return
1276
 
1286
 
1277
         }
1287
         }
1278
 
1288
 
1279
-      }, 
1289
+      },
1280
       getRow(key) {
1290
       getRow(key) {
1281
         switch (key) {
1291
         switch (key) {
1282
           case '周一'+"("+this.days[0]+")" : //本周一
1292
           case '周一'+"("+this.days[0]+")" : //本周一
1913
         let next_sunday = moment().add((7 - weekOfDay) + 7 * i, 'days').format('YYYY-MM-DD');//周日日期
1923
         let next_sunday = moment().add((7 - weekOfDay) + 7 * i, 'days').format('YYYY-MM-DD');//周日日期
1914
         return next_sunday
1924
         return next_sunday
1915
        },
1925
        },
1916
-       
1926
+
1917
       getNextWeekOne(i) {
1927
       getNextWeekOne(i) {
1918
         let weekOfDay = parseInt(moment().format('E'));//计算今天是这周第几天
1928
         let weekOfDay = parseInt(moment().format('E'));//计算今天是这周第几天
1919
         let next_monday = moment().add((7 - weekOfDay) + 7 * (i - 1) + 1, 'days').format('YYYY-MM-DD');//周一日期
1929
         let next_monday = moment().add((7 - weekOfDay) + 7 * (i - 1) + 1, 'days').format('YYYY-MM-DD');//周一日期
1920
-        
1930
+
1921
         return next_monday
1931
         return next_monday
1922
        },
1932
        },
1923
-       
1924
-       
1933
+
1934
+
1925
        getThreeWeekList(){
1935
        getThreeWeekList(){
1926
           var params ={
1936
           var params ={
1927
               start_time:this.start_time,
1937
               start_time:this.start_time,
1934
            if(response.data.state == 1){
1944
            if(response.data.state == 1){
1935
              var partitions =  response.data.data.partitions
1945
              var partitions =  response.data.data.partitions
1936
              console.log("数据22222",this.partitions)
1946
              console.log("数据22222",this.partitions)
1937
-             
1947
+
1938
              const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
1948
              const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
1939
               var list = []
1949
               var list = []
1940
               let i = 0
1950
               let i = 0
1941
-              
1951
+
1942
               for (let key  in partitions) {
1952
               for (let key  in partitions) {
1943
                 var tempValue
1953
                 var tempValue
1944
                 var jihaos = partitions[key].jihaos
1954
                 var jihaos = partitions[key].jihaos
1955
                 console.log("jihaos",jihaos)
1965
                 console.log("jihaos",jihaos)
1956
                 for (let b = 0; b < jihaos.length; b++) {
1966
                 for (let b = 0; b < jihaos.length; b++) {
1957
                  var obj = {}
1967
                  var obj = {}
1958
-               
1968
+
1959
                   obj['区号'] = partitions[key].name
1969
                   obj['区号'] = partitions[key].name
1960
                   obj['机号'] = jihaos[b].number.toString()
1970
                   obj['机号'] = jihaos[b].number.toString()
1961
 
1971
 
1962
-                
1972
+
1963
                   obj['上午'] = ''
1973
                   obj['上午'] = ''
1964
                   obj['下午'] = ''
1974
                   obj['下午'] = ''
1965
                   obj['晚上'] = ''
1975
                   obj['晚上'] = ''
1979
                   obj['上午4'] = ''
1989
                   obj['上午4'] = ''
1980
                   obj['下午4'] = ''
1990
                   obj['下午4'] = ''
1981
                   obj['晚上4'] = ''
1991
                   obj['晚上4'] = ''
1982
-                 
1983
-                
1992
+
1993
+
1984
                   obj['上午5'] = ''
1994
                   obj['上午5'] = ''
1985
                   obj['下午5'] = ''
1995
                   obj['下午5'] = ''
1986
                   obj['晚上5'] = ''
1996
                   obj['晚上5'] = ''
2008
                   obj['上午11'] = ''
2018
                   obj['上午11'] = ''
2009
                   obj['下午11'] = ''
2019
                   obj['下午11'] = ''
2010
                   obj['晚上11'] = ''
2020
                   obj['晚上11'] = ''
2011
-                 
2012
-                
2021
+
2022
+
2013
                   obj['上午12'] = ''
2023
                   obj['上午12'] = ''
2014
                   obj['下午12'] = ''
2024
                   obj['下午12'] = ''
2015
                   obj['晚上12'] = ''
2025
                   obj['晚上12'] = ''
2043
                   obj['上午19'] = ''
2053
                   obj['上午19'] = ''
2044
                   obj['下午19'] = ''
2054
                   obj['下午19'] = ''
2045
                   obj['晚上19'] = ''
2055
                   obj['晚上19'] = ''
2046
-                 
2047
-                
2056
+
2057
+
2048
                   obj['上午20'] = ''
2058
                   obj['上午20'] = ''
2049
                   obj['下午20'] = ''
2059
                   obj['下午20'] = ''
2050
                   obj['晚上20'] = ''
2060
                   obj['晚上20'] = ''
2051
 
2061
 
2052
                   list.push(obj)
2062
                   list.push(obj)
2053
-                
2063
+
2054
                 }
2064
                 }
2055
                 i++
2065
                 i++
2056
               }
2066
               }
2057
-             
2058
-             
2067
+
2068
+
2059
                const start_time = moment().weekday(1).format('YYYY-MM-DD'); //本周一
2069
                const start_time = moment().weekday(1).format('YYYY-MM-DD'); //本周一
2060
                var start = this.getTimestamp(start_time)
2070
                var start = this.getTimestamp(start_time)
2061
                console.log("start",start)
2071
                console.log("start",start)
2062
               const end_time = moment().weekday(7).format('YYYY-MM-DD');
2072
               const end_time = moment().weekday(7).format('YYYY-MM-DD');
2063
               var end = this.getTimestamp(end_time)
2073
               var end = this.getTimestamp(end_time)
2064
 
2074
 
2065
-              
2075
+
2066
               console.log("end",end)
2076
               console.log("end",end)
2067
               var scheduleList = response.data.data.list
2077
               var scheduleList = response.data.data.list
2068
               console.log("排班列表22222",scheduleList)
2078
               console.log("排班列表22222",scheduleList)
2096
                  }
2106
                  }
2097
               }
2107
               }
2098
               }
2108
               }
2099
-            
2109
+
2100
             if(this.export_type == 1){
2110
             if(this.export_type == 1){
2101
                 week = scheduleList
2111
                 week = scheduleList
2102
              }
2112
              }
2103
-           
2113
+
2104
              if(week.length > 0){
2114
              if(week.length > 0){
2105
               for(let i=0;i<list.length;i++){
2115
               for(let i=0;i<list.length;i++){
2106
                for(let j=0;j<week.length;j++){
2116
                for(let j=0;j<week.length;j++){
2117
                     if( week[j].schedule_week == 1 && week[j].schedule_type == 3){
2127
                     if( week[j].schedule_week == 1 && week[j].schedule_type == 3){
2118
                         list[i].晚上 = week[j].name
2128
                         list[i].晚上 = week[j].name
2119
                     }
2129
                     }
2120
-                    
2130
+
2121
                    //周二上午
2131
                    //周二上午
2122
                     if( week[j].schedule_week == 2 && week[j].schedule_type == 1){
2132
                     if( week[j].schedule_week == 2 && week[j].schedule_type == 1){
2123
                         list[i].上午1 = week[j].name
2133
                         list[i].上午1 = week[j].name
2175
                    if( week[j].schedule_week ==6 && week[j].schedule_type == 2){
2185
                    if( week[j].schedule_week ==6 && week[j].schedule_type == 2){
2176
                         list[i].下午5 = week[j].name
2186
                         list[i].下午5 = week[j].name
2177
                     }
2187
                     }
2178
-                   //周六晚上 
2188
+                   //周六晚上
2179
                    if( week[j].schedule_week == 6 && week[j].schedule_type == 3){
2189
                    if( week[j].schedule_week == 6 && week[j].schedule_type == 3){
2180
                         list[i].晚上5 = week[j].name
2190
                         list[i].晚上5 = week[j].name
2181
                     }
2191
                     }
2192
                         list[i].晚上6 = week[j].name
2202
                         list[i].晚上6 = week[j].name
2193
                     }
2203
                     }
2194
                   }
2204
                   }
2195
-                
2205
+
2196
                }
2206
                }
2197
              }
2207
              }
2198
              }
2208
              }
2199
-             
2209
+
2200
              console.log("list5555555555",list)
2210
              console.log("list5555555555",list)
2201
-             
2211
+
2202
              if(nextWeek.length > 0 ){
2212
              if(nextWeek.length > 0 ){
2203
                for(let i=0;i<list.length;i++){
2213
                for(let i=0;i<list.length;i++){
2204
                 for(let j=0;j<nextWeek.length;j++){
2214
                 for(let j=0;j<nextWeek.length;j++){
2205
                  if(list[i].机号 == nextWeek[j].number ){
2215
                  if(list[i].机号 == nextWeek[j].number ){
2206
-                  //周一   
2216
+                  //周一
2207
                    if( nextWeek[j].schedule_week ==1&& nextWeek[j].schedule_type == 1){
2217
                    if( nextWeek[j].schedule_week ==1&& nextWeek[j].schedule_type == 1){
2208
                         list[i].上午7 = nextWeek[j].name
2218
                         list[i].上午7 = nextWeek[j].name
2209
                     }
2219
                     }
2215
                    if( nextWeek[j].schedule_week == 1 && nextWeek[j].schedule_type == 3){
2225
                    if( nextWeek[j].schedule_week == 1 && nextWeek[j].schedule_type == 3){
2216
                         list[i].晚上7 = nextWeek[j].name
2226
                         list[i].晚上7 = nextWeek[j].name
2217
                     }
2227
                     }
2218
-                  
2219
 
2228
 
2220
-                   //周二上午  
2229
+
2230
+                   //周二上午
2221
                    if( nextWeek[j].schedule_week ==2&& nextWeek[j].schedule_type == 1){
2231
                    if( nextWeek[j].schedule_week ==2&& nextWeek[j].schedule_type == 1){
2222
                         list[i].上午8 = nextWeek[j].name
2232
                         list[i].上午8 = nextWeek[j].name
2223
                     }
2233
                     }
2230
                         list[i].晚上8  = nextWeek[j].name
2240
                         list[i].晚上8  = nextWeek[j].name
2231
                     }
2241
                     }
2232
 
2242
 
2233
-                  //周三上午  
2243
+                  //周三上午
2234
                    if( nextWeek[j].schedule_week ==3&& nextWeek[j].schedule_type == 1){
2244
                    if( nextWeek[j].schedule_week ==3&& nextWeek[j].schedule_type == 1){
2235
                         list[i].上午9 = nextWeek[j].name
2245
                         list[i].上午9 = nextWeek[j].name
2236
                     }
2246
                     }
2243
                         list[i].晚上9  = nextWeek[j].name
2253
                         list[i].晚上9  = nextWeek[j].name
2244
                     }
2254
                     }
2245
 
2255
 
2246
-                   //周四上午  
2256
+                   //周四上午
2247
                    if( nextWeek[j].schedule_week ==4&& nextWeek[j].schedule_type == 1){
2257
                    if( nextWeek[j].schedule_week ==4&& nextWeek[j].schedule_type == 1){
2248
                         list[i].上午10 = nextWeek[j].name
2258
                         list[i].上午10 = nextWeek[j].name
2249
                     }
2259
                     }
2255
                    if( nextWeek[j].schedule_week == 4 && nextWeek[j].schedule_type == 3){
2265
                    if( nextWeek[j].schedule_week == 4 && nextWeek[j].schedule_type == 3){
2256
                         list[i].晚上10  = nextWeek[j].name
2266
                         list[i].晚上10  = nextWeek[j].name
2257
                     }
2267
                     }
2258
-                    
2259
-                    //周五上午  
2268
+
2269
+                    //周五上午
2260
                    if( nextWeek[j].schedule_week ==5&& nextWeek[j].schedule_type == 1){
2270
                    if( nextWeek[j].schedule_week ==5&& nextWeek[j].schedule_type == 1){
2261
                         list[i].上午11 = nextWeek[j].name
2271
                         list[i].上午11 = nextWeek[j].name
2262
                     }
2272
                     }
2269
                         list[i].晚上11  = nextWeek[j].name
2279
                         list[i].晚上11  = nextWeek[j].name
2270
                     }
2280
                     }
2271
 
2281
 
2272
-                  //周六上午  
2282
+                  //周六上午
2273
                    if( nextWeek[j].schedule_week ==6&& nextWeek[j].schedule_type == 1){
2283
                    if( nextWeek[j].schedule_week ==6&& nextWeek[j].schedule_type == 1){
2274
                         list[i].上午12 = nextWeek[j].name
2284
                         list[i].上午12 = nextWeek[j].name
2275
                     }
2285
                     }
2282
                         list[i].晚上12  = nextWeek[j].name
2292
                         list[i].晚上12  = nextWeek[j].name
2283
                     }
2293
                     }
2284
 
2294
 
2285
-                  //周日上午  
2295
+                  //周日上午
2286
                    if( nextWeek[j].schedule_week ==6&& nextWeek[j].schedule_type == 1){
2296
                    if( nextWeek[j].schedule_week ==6&& nextWeek[j].schedule_type == 1){
2287
                         list[i].上午13 = nextWeek[j].name
2297
                         list[i].上午13 = nextWeek[j].name
2288
                     }
2298
                     }
2299
                }
2309
                }
2300
               }
2310
               }
2301
              }
2311
              }
2302
-              
2312
+
2303
              console.log("lastWeek",lastWeek)
2313
              console.log("lastWeek",lastWeek)
2304
 
2314
 
2305
-             if(lastWeek.length > 0 ){ 
2315
+             if(lastWeek.length > 0 ){
2306
                for(let i=0;i<list.length;i++){
2316
                for(let i=0;i<list.length;i++){
2307
                  for(let j=0;j<lastWeek.length;j++){
2317
                  for(let j=0;j<lastWeek.length;j++){
2308
-                   if(list[i].机号 == lastWeek[j].number ){ 
2309
-                     //周一   
2318
+                   if(list[i].机号 == lastWeek[j].number ){
2319
+                     //周一
2310
                     if( lastWeek[j].schedule_week ==1&& lastWeek[j].schedule_type == 1){
2320
                     if( lastWeek[j].schedule_week ==1&& lastWeek[j].schedule_type == 1){
2311
                           list[i].上午14 = lastWeek[j].name
2321
                           list[i].上午14 = lastWeek[j].name
2312
                       }
2322
                       }
2345
                           list[i].晚上16 = lastWeek[j].name
2355
                           list[i].晚上16 = lastWeek[j].name
2346
                      }
2356
                      }
2347
 
2357
 
2348
-                    
2358
+
2349
                      //周四
2359
                      //周四
2350
                     if( lastWeek[j].schedule_week ==4&& lastWeek[j].schedule_type == 1){
2360
                     if( lastWeek[j].schedule_week ==4&& lastWeek[j].schedule_type == 1){
2351
                           list[i].上午17 = lastWeek[j].name
2361
                           list[i].上午17 = lastWeek[j].name
2397
                     if( lastWeek[j].schedule_week == 7 && lastWeek[j].schedule_type == 3){
2407
                     if( lastWeek[j].schedule_week == 7 && lastWeek[j].schedule_type == 3){
2398
                           list[i].晚上20 = lastWeek[j].name
2408
                           list[i].晚上20 = lastWeek[j].name
2399
                      }
2409
                      }
2400
-                   }  
2410
+                   }
2401
 
2411
 
2402
                   }
2412
                   }
2403
                 }
2413
                 }
2404
-             } 
2414
+             }
2405
              this.tableList = list
2415
              this.tableList = list
2406
            }
2416
            }
2407
          })
2417
          })
2437
       getTime(val) {
2447
       getTime(val) {
2438
         return uParseTime(val, '{y}-{m}-{d}')
2448
         return uParseTime(val, '{y}-{m}-{d}')
2439
       },
2449
       },
2440
-       
2450
+
2441
 
2451
 
2442
     },
2452
     },
2443
     created() {
2453
     created() {