山水共长天一色 3 tahun lalu
induk
melakukan
71522ddf88

+ 37 - 26
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -813,6 +813,8 @@
             :height="500"
             highlight-current-row
             style="width: 100%"
+            v-loading="tbload"
+            :lazy="true"
           >
             <el-table-column width="75" type="index" fixed="left" label="序号">
               <template slot-scope="scope">
@@ -955,6 +957,8 @@
             :height="500"
             highlight-current-row
             style="width: 100%"
+            v-loading="tbload"
+            lazy
           >
             <el-table-column min-width="300" fixed="left" label="部门" prop="department">
             </el-table-column>
@@ -1150,6 +1154,7 @@
     export default {
         data() {
             return {
+                tbload: false,
                 exportTimeDialog: false,
                 searchKeyword: '',
                 monthworkDateS: [],
@@ -1593,7 +1598,7 @@
                 },
                 res => {
                     if (res.code == "ok") {
-                        console.log("维度",res.data);
+                        // console.log("维度",res.data);
                         this.yonghuUser = res.data
                     } 
                 },
@@ -1766,14 +1771,15 @@
       if(this.WorktimeDatepickValue.length == 0){
         let newdate = new Date();
         let nowdate = newdate.toLocaleDateString();
-        let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
+        let getauto = this.getAutoWeekDate(nowdate)
+        let nowwd = [getauto[0],getauto[6]]
         this.WorktimeDatepickValue = nowwd
       }
       this.showMonthWorkTime()
     },
 
     handleClick(t,e){
-      console.log("tabname",t.name);
+    //   console.log("tabname",t.name);
       if (t.name == "first") {
         this.showMonthWorkTime()
       }else{
@@ -1782,7 +1788,7 @@
     },
     //导出员工每日填报工时数
     exportMembWorkHours() {   
-      console.log("exportMembWorkHours",this.WorktimeDatepickValue);
+    //   console.log("exportMembWorkHours",this.WorktimeDatepickValue);
       this.http.post(
         "/report/exportUserDailyWorkTime",
         {
@@ -1793,7 +1799,7 @@
         (res) => {
           if (res.code == "ok") {
             let url = res.data;
-            console.log(res);
+            // console.log(res);
             this.downloadByA("人员每日工时统计.xls", url);
           }
         },
@@ -1819,7 +1825,7 @@
             let url = res.data;
             // console.log(res.data);
             this.downloadByA("人员每日工时统计.xls", url);
-            console.log(url);
+            // console.log(url);
           }
         },
         (error) => {
@@ -1832,7 +1838,7 @@
     },
 
     downloadByA(name, url) {
-      console.log(name,url);
+    //   console.log(name,url);
       const a = document.createElement("a"); // 创建a标签
       a.setAttribute("download", name); // download属性
       a.setAttribute("href", url); // href链接
@@ -1850,15 +1856,15 @@
         }else{
             let sedate = new Date(this.date)
             let semonth = sedate.getMonth() + 1
-            let seday = new Date(sedate.getFullYear(), semonth, 0).getDate()
+            // let seday = new Date(sedate.getFullYear(), semonth, 0).getDate()
             let sedates1 = sedate.getFullYear() + '-' + (semonth < 10 ? '0' + semonth : semonth) + '-01'
-            let sedates2 = sedate.getFullYear() + '-' + (semonth < 10 ? '0' + semonth : semonth) + '-' + seday
+            let sedates2 = sedate.getFullYear() + '-' + (semonth < 10 ? '0' + semonth : semonth) + '-07'
             return [sedates1, sedates2]
         }
     },
 
     showMonthWorkTime() {
-
+        this.tbload = true
       this.http.post(
         "/report/getUserDailyWorkTime",
         // "/report/getNoReportUserList",
@@ -1869,6 +1875,7 @@
         },
         (res) => {
           if (res.code == "ok") {
+              this.tbload = false
             this.pickDateArray = res.data.days;
             this.monthworkDate = res.data.list;
             this.monthworkDateS = this.monthworkDate
@@ -1878,6 +1885,7 @@
           }
         },
         (error) => {
+            this.tbload = false
           this.$message({
             message: error,
             type: "error",
@@ -1886,7 +1894,8 @@
       );
     },
     showMonthNotWorkTime() {
-      console.log("exportMembNotWorkHours",this.WorktimeDatepickValue);
+        this.tbload = true
+    //   console.log("exportMembNotWorkHours",this.WorktimeDatepickValue);
       this.http.post(
         // "/report/getUserDailyWorkTime",
         "/report/getNoReportUserList",
@@ -1897,6 +1906,7 @@
         },
         (res) => {
           if (res.code == "ok") {
+              this.tbload = false
             this.monthNotWorkDate = res.data;
             this.monthNotWorkDateS = this.monthNotWorkDate
             this.$forceUpdate();
@@ -1904,6 +1914,7 @@
           }
         },
         (error) => {
+            this.tbload = false
           this.$message({
             message: error,
             type: "error",
@@ -2206,7 +2217,7 @@
             },
             //项目选中了, 加载子项目
             selectProject(domain, index) {
-                console.log(domain, index, '加载')
+                // console.log(domain, index, '加载')
                 this.http.post('/sub-project/list',{
                     projectId: domain.projectId
                 },
@@ -2300,7 +2311,7 @@
                 },
                 res => {
                     if (res.code == "ok") {
-                        console.log("维度数据",res.data);
+                        // console.log("维度数据",res.data);
                         this.workForm.domains[index].wuduList = res.data
                         // this.workForm = this.workForm
                         this.$forceUpdate()
@@ -2608,9 +2619,9 @@
                     this.unFillList = this.getUserMembListFromDeptList(list, 0);
                     this.fillList = this.getUserMembListFromDeptList(list, 1)
                 } 
-                console.log(this.depData.isUser)
-                console.log(this.depData.membCount)
-                console.log(this.depData)
+                // console.log(this.depData.isUser)
+                // console.log(this.depData.membCount)
+                // console.log(this.depData)
             },
             theValues(id, item) {
                 for(var i in item) {
@@ -3079,7 +3090,7 @@
                     this.listLoading = false;
                     if (res.code == "ok") {
                         this.projectList = res.data;
-                        console.log("项目列表",this.projectList);
+                        // console.log("项目列表",this.projectList);
                     } else {
                         this.$message({
                             message: res.msg,
@@ -3260,7 +3271,7 @@
             },
             // 按周填报里内容的填写
             tianxies(item, i, names, row) {
-                console.log(item, i, names, row[0], '你好')
+                // console.log(item, i, names, row[0], '你好')
                 var idd = ''
                 var obj = {}
                 for(var l in this.projectList) {
@@ -3268,7 +3279,7 @@
                 }
                 obj.projectId = idd
                 this.selectProject(obj, 0)
-                console.log(this.workForm.domains[0], '打印出来的')
+                // console.log(this.workForm.domains[0], '打印出来的')
                 this.tianxieDialogVisible = true
                 this.scopess = item
                 var sss = {}
@@ -3280,7 +3291,7 @@
                 var that = this
                 setTimeout(() =>{
                     if(Object.keys(item).length < 5) {
-                        console.log(456)
+                        // console.log(456)
                         sss.subProjectId = that.workForm.domains[0].subProjectId
                         sss.stage = that.workForm.domains[0].stage
                         sss.subProjectList = that.workForm.domains[0].subProjectList
@@ -3297,7 +3308,7 @@
                         //只有一个审核人,自动设置上去
                         sss.projectAuditorId = sss.auditUserList[0].auditorId;
                     }
-                    console.log(sss, '数据')
+                    // console.log(sss, '数据')
                     that.zhoBaoIdx = i
                     that.zhoBaoName = names
                     that.zhoBao = sss
@@ -3424,9 +3435,9 @@
             },
             // 新增日期
             newDates() {
-                console.log(this.zhoRqi, '看卡')
+                // console.log(this.zhoRqi, '看卡')
                 this.zhoRqi[1] = this.dateChange(1, this.zhoRqi[1])
-                console.log(this.zhoRqi[1])
+                // console.log(this.zhoRqi[1])
                 var obj = {}
                 obj.zhoDataTime = this.zhoRqi[1]
                 obj.he = 0
@@ -3619,8 +3630,8 @@
             zhoAdd() {
                 var zhi = this.zhoData
                 var ll = 0
-                console.log(this.reportTimeType.type)
-                console.log(this.reportTimeType.multiWorktime)
+                // console.log(this.reportTimeType.type)
+                // console.log(this.reportTimeType.multiWorktime)
                 if(this.reportTimeType.type == 2) {
                     for(var i in zhi) {
                         this.dateAr = []
@@ -4409,7 +4420,7 @@
                 res => {
                     this.toViewloading = false;
                     if (res.code == "ok") {
-                        console.log(res.data, '数据数据')
+                        // console.log(res.data, '数据数据')
                         this.toViewList = res.data.records
                         this.toViewForm.total = res.data.total
                     } else {