Bläddra i källkod

3月25日杨青

杨青 2 år sedan
förälder
incheckning
fbbeb68c17
2 ändrade filer med 16 tillägg och 24 borttagningar
  1. 2 2
      config/sit.env.js
  2. 14 22
      src/xt_pages/workforce/components/historyWeekTable.vue

+ 2 - 2
config/sit.env.js Visa fil

1
 module.exports = {
1
 module.exports = {
2
   NODE_ENV: '"production"',
2
   NODE_ENV: '"production"',
3
   ENV_CONFIG: '"sit"',
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
   SSO_HOST: '"https://testsso.sgjyun.com"',
6
   SSO_HOST: '"https://testsso.sgjyun.com"',
7
   SRCM_HOST: '"http://test1.sgjyun.com"',
7
   SRCM_HOST: '"http://test1.sgjyun.com"',
8
   XT_HOST: '"https://xt.test.sgjyun.com"',
8
   XT_HOST: '"https://xt.test.sgjyun.com"',

+ 14 - 22
src/xt_pages/workforce/components/historyWeekTable.vue Visa fil

6
             v-model="weekTime"
6
             v-model="weekTime"
7
             type="week"
7
             type="week"
8
             format="第 WW 周"
8
             format="第 WW 周"
9
-            placeholder="选择周"
10
-            :picker-options="{'firstDayOfWeek': 1}"
9
+            placeholder="选择周"  
10
+            :picker-options="pickerBeginDateBefore"
11
             @change="changeWeek"
11
             @change="changeWeek"
12
         >
12
         >
13
+        <!-- "{'firstDayOfWeek': 1}" -->
13
         </el-date-picker>
14
         </el-date-picker>
14
     </div>
15
     </div>
15
     <!--   -->
16
     <!--   -->
545
   },
546
   },
546
   data() {
547
   data() {
547
     return {
548
     return {
549
+      // 禁选当前之后的日期
550
+      pickerBeginDateBefore: {
551
+        disabledDate(time) {
552
+          return time.getTime() > Date.now();
553
+        }
554
+      },
548
       tableContainHeight:null,
555
       tableContainHeight:null,
549
       value1:false,
556
       value1:false,
550
       modename_value:true,
557
       modename_value:true,
2824
       console.log('11111',val)
2831
       console.log('11111',val)
2825
       this.newDay = []
2832
       this.newDay = []
2826
       var start = this.getTimestamp(val) - 86400
2833
       var start = this.getTimestamp(val) - 86400
2827
-      // var next = start + 86400
2828
-      // var last_days =start + 172800
2829
-      // var tuesdays = start + 259200
2830
-      // var fivdays = start + 345600
2831
-      // var sixdays = start + 432000
2832
       var end = start + 518400
2834
       var end = start + 518400
2833
 
2835
 
2834
       this.start_time = this.getTime(start)
2836
       this.start_time = this.getTime(start)
2835
-      // var nest_day = this.getTime(next)
2836
-      // var last_day = this.getTime(last_days)
2837
-      // var tuesday = this.getTime(tuesdays)
2838
-      // var fiveday = this.getTime(fivdays)
2839
-      // var sixday = this.getTime(sixdays)
2840
       this.end_time = this.getTime(end)
2837
       this.end_time = this.getTime(end)
2841
 
2838
 
2842
       this.newDay.push(this.start_time)
2839
       this.newDay.push(this.start_time)
2843
-      // this.newDay.push(nest_day)
2844
-      // this.newDay.push(last_day)
2845
-      // this.newDay.push(tuesday)
2846
-      // this.newDay.push(fiveday)
2847
-      // this.newDay.push(sixday)
2848
       this.newDay.push(this.end_time)
2840
       this.newDay.push(this.end_time)
2849
 
2841
 
2850
       console.log('44444',this.start_time)
2842
       console.log('44444',this.start_time)
2871
       var month=(date.getMonth() + 1)<10 ? "0"+(date.getMonth()+1):(date.getMonth()+1)
2863
       var month=(date.getMonth() + 1)<10 ? "0"+(date.getMonth()+1):(date.getMonth()+1)
2872
       var day=(date.getDate())<10 ? "0"+(date.getDate()):(date.getDate())
2864
       var day=(date.getDate())<10 ? "0"+(date.getDate()):(date.getDate())
2873
       console.log('wqertwetwe',month);
2865
       console.log('wqertwetwe',month);
2874
-      this.start_time = date.getFullYear() + "-" + month + "-" + day;
2866
+      this.start_time = date.getFullYear() + "-" + month + "-" + day + " 00:00:00";
2875
 
2867
 
2876
       // 上上周日的日期
2868
       // 上上周日的日期
2877
       date.setDate(date.getDate() + 6);
2869
       date.setDate(date.getDate() + 6);
2878
       var month=(date.getMonth() + 1)<10 ? "0"+(date.getMonth()+1):(date.getMonth()+1)
2870
       var month=(date.getMonth() + 1)<10 ? "0"+(date.getMonth()+1):(date.getMonth()+1)
2879
       var day=(date.getDate())<10 ? "0"+(date.getDate()):(date.getDate())
2871
       var day=(date.getDate())<10 ? "0"+(date.getDate()):(date.getDate())
2880
-      this.end_time = date.getFullYear() + "-" + month + "-" + day;
2881
-      console.log('1234566',this.lastweek.start_day,this.lastweek.end_day);
2872
+      this.end_time = date.getFullYear() + "-" + month + "-" + day + ' 23:59:59';
2873
+      console.log('1234566',this.lastweek.start_day,this.lastweek.end_day) ;
2882
       this.getAllZones()
2874
       this.getAllZones()
2883
       // this.getSchedules()
2875
       // this.getSchedules()
2884
     },
2876
     },
2895
       }
2887
       }
2896
       const params = {
2888
       const params = {
2897
         is_before:1,
2889
         is_before:1,
2898
-        start_time: this.start_time  + " 00:00:00",
2899
-        end_time:this.end_time  + ' 23:59:59',
2890
+        start_time: this.start_time  ,
2891
+        end_time:this.end_time  ,
2900
         // start_time: this.lastweek.start_day + " 00:00:00",
2892
         // start_time: this.lastweek.start_day + " 00:00:00",
2901
         // end_time: this.lastweek.end_day + ' 23:59:59',
2893
         // end_time: this.lastweek.end_day + ' 23:59:59',
2902
         weekTime: this.theType,
2894
         weekTime: this.theType,