Browse Source

adjust time

EthnaYeh 6 years ago
parent
commit
d24c7eea63

+ 6 - 6
src/views/agnetManagement/gambleMemberManagement/index.vue

158
       listQuery: {
158
       listQuery: {
159
         // page: 1,
159
         // page: 1,
160
         // limit: 20,
160
         // limit: 20,
161
-        startAt: moment.utc(moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)).format(),
162
-        endAt: moment.utc(moment().day(7).hour(11).minute(59).second(59)).format()
161
+        startAt: moment.utc(moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)).format(),
162
+        endAt: moment.utc(moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)).format()
163
       },
163
       },
164
       pickerOptions: {
164
       pickerOptions: {
165
         shortcuts: [{
165
         shortcuts: [{
166
           text: '本週',
166
           text: '本週',
167
           onClick(picker) {
167
           onClick(picker) {
168
-            const end = moment().day(7).hour(11).minute(59).second(59)
169
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
168
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
169
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
170
             picker.$emit('pick', [start, end])
170
             picker.$emit('pick', [start, end])
171
           }
171
           }
172
         }, {
172
         }, {
173
           text: '上週',
173
           text: '上週',
174
           onClick(picker) {
174
           onClick(picker) {
175
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
176
-            const start = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
175
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
176
+            const start = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
177
             picker.$emit('pick', [start, end])
177
             picker.$emit('pick', [start, end])
178
           }
178
           }
179
         }]
179
         }]

+ 2 - 2
src/views/agnetManagement/index.vue

84
       listQuery: {
84
       listQuery: {
85
         page: 1,
85
         page: 1,
86
         limit: 20,
86
         limit: 20,
87
-        startAt: moment.utc(moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)).format(),
88
-        endAt: moment.utc(moment().day(7).hour(11).minute(59).second(59)).format()
87
+        startAt: moment.utc(moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)).format(),
88
+        endAt: moment.utc(moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)).format()
89
       },
89
       },
90
       dialogCreateFormVisible: false,
90
       dialogCreateFormVisible: false,
91
       dialogStatus: '',
91
       dialogStatus: '',

+ 4 - 4
src/views/gambleGameBucket/index.vue

80
         shortcuts: [{
80
         shortcuts: [{
81
           text: '本週',
81
           text: '本週',
82
           onClick(picker) {
82
           onClick(picker) {
83
-            const end = moment().day(7).hour(11).minute(59).second(59)
84
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
83
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
84
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
85
             picker.$emit('pick', [start, end])
85
             picker.$emit('pick', [start, end])
86
           }
86
           }
87
         }, {
87
         }, {
88
           text: '上週',
88
           text: '上週',
89
           onClick(picker) {
89
           onClick(picker) {
90
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
91
-            const start = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
90
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
91
+            const start = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
92
             picker.$emit('pick', [start, end])
92
             picker.$emit('pick', [start, end])
93
           }
93
           }
94
         }]
94
         }]

+ 4 - 4
src/views/room/chipsHistory/index.vue

83
         shortcuts: [{
83
         shortcuts: [{
84
           text: '本週',
84
           text: '本週',
85
           onClick(picker) {
85
           onClick(picker) {
86
-            const end = moment().day(7).hour(11).minute(59).second(59)
87
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
86
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
87
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
88
             picker.$emit('pick', [start, end])
88
             picker.$emit('pick', [start, end])
89
           }
89
           }
90
         }, {
90
         }, {
91
           text: '上週',
91
           text: '上週',
92
           onClick(picker) {
92
           onClick(picker) {
93
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
94
-            const start = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
93
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
94
+            const start = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
95
             picker.$emit('pick', [start, end])
95
             picker.$emit('pick', [start, end])
96
           }
96
           }
97
         }]
97
         }]

+ 4 - 4
src/views/room/gameHistory/index.vue

126
         shortcuts: [{
126
         shortcuts: [{
127
           text: '本週',
127
           text: '本週',
128
           onClick(picker) {
128
           onClick(picker) {
129
-            const end = moment().day(7).hour(11).minute(59).second(59)
130
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
129
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
130
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
131
             picker.$emit('pick', [start, end])
131
             picker.$emit('pick', [start, end])
132
           }
132
           }
133
         }, {
133
         }, {
134
           text: '上週',
134
           text: '上週',
135
           onClick(picker) {
135
           onClick(picker) {
136
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
137
-            const startAt = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
136
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
137
+            const startAt = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
138
             picker.$emit('pick', [start, end])
138
             picker.$emit('pick', [start, end])
139
           }
139
           }
140
         }]
140
         }]

+ 4 - 4
src/views/studio/index.vue

58
         shortcuts: [{
58
         shortcuts: [{
59
           text: '本週',
59
           text: '本週',
60
           onClick(picker) {
60
           onClick(picker) {
61
-            const end = moment().day(7).hour(11).minute(59).second(59)
62
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
61
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
62
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
63
             picker.$emit('pick', [start, end])
63
             picker.$emit('pick', [start, end])
64
           }
64
           }
65
         }, {
65
         }, {
66
           text: '上週',
66
           text: '上週',
67
           onClick(picker) {
67
           onClick(picker) {
68
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
69
-            const start = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
68
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
69
+            const start = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
70
             picker.$emit('pick', [start, end])
70
             picker.$emit('pick', [start, end])
71
           }
71
           }
72
         }]
72
         }]