Quellcode durchsuchen

修复首次进来报表日期错误问题

seyason vor 1 Jahr
Ursprung
Commit
d35279652d

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -1326,6 +1326,12 @@ export default {
   },
 
   mounted() {
+    var myDate = new Date();
+    let year = myDate.getFullYear();
+    let month = +myDate.getMonth() + 1
+    let yue = month >= 10 ? yue = month : yue = '0' + month
+    this.monthPersonnel = year + '-' + yue
+
     this.getProjectListOvertime()
     // this.getProjectList();
     // this.getUserList()
@@ -1333,12 +1339,6 @@ export default {
     this.getcustomerList()
     // this.getcusProjectList()
     this.authorityToJudge()
-
-    var myDate = new Date();
-    let year = myDate.getFullYear();
-    let month = +myDate.getMonth() + 1
-    let yue = month >= 10 ? yue = month : yue = '0' + month
-    this.monthPersonnel = year + '-' + yue
   },
   filters: {
       numberToCurrency(value) {