Przeglądaj źródła

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper into master

seyason 3 lat temu
rodzic
commit
2d591c61ea

+ 6 - 0
fhKeeper/formulahousekeeper/timesheet/index.html

@@ -70,6 +70,12 @@
     </head>
     <body>
         <div id="app"></div>
+        <script>
+            document.body.ondrop = function(event) {
+            event.preventDefault()
+            event.stopPropagation()
+            }
+        </script>
         <!-- 引入Vue.js -->
         <script src="https://cdn.staticfile.org/vue/2.6.10/vue.min.js"></script>
         <!-- 引入vuex.js -->

+ 315 - 142
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -8,7 +8,7 @@
             <el-radio-button label="1">显示工时</el-radio-button>
             </el-radio-group></div>
         </el-col>
-        <el-col :span="14" style="">
+        <el-col :span="14" style="display: flex;flex-wrap: wrap;">
             <el-date-picker v-show="user.timeType.fixMonthcost==0"
             v-model="dateRange" :editable="false" 
             format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
@@ -34,6 +34,10 @@
                 <el-radio-button label="人员"></el-radio-button>
                 <el-radio-button :label="namess" v-if="jichu.customDegreeActive == 1"></el-radio-button>
             </el-radio-group>
+
+            <el-select v-model="personnelValue" filterable clearable placeholder="请选择人员" style="margin-top: 10px;width: 350px" v-if="radio == '人员'" @change="personnel()">
+                <el-option v-for="item in hasReportUserList" :key="item.id" :label="item.name" :value="item.name"></el-option>
+            </el-select>
         </el-col>
         <el-col :span="4">
             <el-button @click="showExportDialog">报表导出</el-button>
@@ -42,7 +46,7 @@
         <!-- <div id="clearfix" :style="'width:'+widthHtval+'px;position: relative; height:'+containerHeight+'px;'">
              <div id="container" :style="'height:'+containerHeight+'px;width:100%'"></div>
         </div> -->
-        <div id="clearfix" :style="'overflow-x: auto;width:100%;padding-bottom: 100px; position: relative; height:'+containerHeight+'px;'">
+        <div id="clearfix" :class="radio == '人员' ? 'ryuans' : ''" :style="'overflow-x: auto;width:100%;padding-bottom: 100px; position: relative; height:'+containerHeight+'px;'">
              <div id="container" :style="'height:'+containerHeight+'px;width:100%'"></div>
         </div>
         <!-- <div>
@@ -110,6 +114,8 @@
     export default {
         data() {
             return {
+                personnelValue: '',
+                personnelAll: [],
                 yAxisValue: localStorage.yAxisValue?localStorage.yAxisValue:0,
                 parentDeptStack:[],
                 parentDeptId:null,
@@ -273,6 +279,22 @@
                         });
                     });
             },
+            // 人员筛选
+            personnel() {
+                if(this.personnelValue) {
+                    var arrlist = JSON.parse(JSON.stringify(this.personnelAll))
+                    var arr = []
+                    for(var i in arrlist.list) {
+                        if(arrlist.list[i].name == this.personnelValue) {
+                            arr.push(arrlist.list[i])
+                        }
+                    }
+                    arrlist.list = arr
+                    this.gtff(arrlist)
+                } else {
+                    this.gtff(this.personnelAll)
+                }
+            },
             //获取人员成本统计列表
             getUserCostList() {
                 this.listLoading = true;
@@ -304,150 +326,152 @@
                                 }
                             }
                         // 
+                        this.personnelAll = res.data
+                        this.gtff(res.data)
                         //工时总成本
-                        this.hasReportUserList = res.data.userList;
-                        var xList = [] , yList = [] , list = res.data.list, array = [] , series = [];
-                        var totalMoneyCost = res.data.totalCostMoney;
-                        var totalHours = 0.0;
-                        if (list.length > 0) {
-                            var num = list.length==0?0:list[0].project.length;
-                            for(var i in list) {
-                                xList.push(list[i].name);
-                                var pro = list[i].project;
-                                for(var j in pro) {
-                                    if(array.indexOf(pro[j].project) == -1) {
-                                        array.push(pro[j].project)
-                                    }
-                                }
-                            }
+                        // this.hasReportUserList = res.data.userList;
+                        // var xList = [] yList = [] , list = res.data.list, array = [] , series = [];
+                        // var totalMoneyCost = res.data.totalCostMoney;
+                        // var totalHours = 0.0;
+                        // if (list.length > 0) {
+                        //     var num = list.length==0?0:list[0].project.length;
+                        //     for(var i in list) {
+                        //         xList.push(list[i].name);
+                        //         var pro = list[i].project;
+                        //         for(var j in pro) {
+                        //             if(array.indexOf(pro[j].project) == -1) {
+                        //                 array.push(pro[j].project)
+                        //             }
+                        //         }
+                        //     }
 
-                            for(var i in array) {
-                                yList.push(array[i]);
-                                var dataList = [];
-                                for(var j in list) {
-                                    var project = list[j].project , num = 0;
-                                    if(project.length != 0) {
-                                        for(var k in project) {
-                                            if(project[k].project == array[i]) {
-                                                dataList.push({
-                                                    "value": this.yAxisValue==0?project[k].money:project[k].time,
-                                                    "cost": project[k].time,
-                                                     "money":project[k].money
-                                                })
-                                                totalHours += parseFloat(project[k].time);
-                                            } else {
-                                                num++;
-                                            }
-                                            if(k == project.length-1 && num != project.length-1) {
-                                                dataList.push({
-                                                    "value": 0,
-                                                    "cost": 0,
-                                                    "money":0,
-                                                })
-                                            }
-                                        }
-                                    } else {
-                                        dataList.push({
-                                            "value": 0,
-                                            "cost": 0,
-                                            "money":0,
-                                        })
-                                    }
-                                }
-                                series.push({
-                                    name: array[i],
-                                    type: 'bar',
-                                    stack:'1',
-                                    barMaxWidth: 30,
-                                    data: dataList,
-                                })
-                            }
-                        } 
+                        //     for(var i in array) {
+                        //         yList.push(array[i]);
+                        //         var dataList = [];
+                        //         for(var j in list) {
+                        //             var project = list[j].project , num = 0;
+                        //             if(project.length != 0) {
+                        //                 for(var k in project) {
+                        //                     if(project[k].project == array[i]) {
+                        //                         dataList.push({
+                        //                             "value": this.yAxisValue==0?project[k].money:project[k].time,
+                        //                             "cost": project[k].time,
+                        //                              "money":project[k].money
+                        //                         })
+                        //                         totalHours += parseFloat(project[k].time);
+                        //                     } else {
+                        //                         num++;
+                        //                     }
+                        //                     if(k == project.length-1 && num != project.length-1) {
+                        //                         dataList.push({
+                        //                             "value": 0,
+                        //                             "cost": 0,
+                        //                             "money":0,
+                        //                         })
+                        //                     }
+                        //                 }
+                        //             } else {
+                        //                 dataList.push({
+                        //                     "value": 0,
+                        //                     "cost": 0,
+                        //                     "money":0,
+                        //                 })
+                        //             }
+                        //         }
+                        //         series.push({
+                        //             name: array[i],
+                        //             type: 'bar',
+                        //             stack:'1',
+                        //             barMaxWidth: 30,
+                        //             data: dataList,
+                        //         })
+                        //     }
+                        // } 
                             
                             
-                            var myChart = echarts.init(document.getElementById("container"));
-                            totalHours = totalHours.toFixed(1);
-                            // 设置宽度
-                            myChart.resize({
-                                width: this.widthHtval
-                            })
-                            // 设置宽度
-                            _this.myChart = myChart;
-                            var option = {
-                                //总成本
-                                title: {
-                                    text: '工时成本总计' + totalMoneyCost.toFixed(2) + '元, 时长'+totalHours+'小时',
-                                    left:'left',
-                                },
-                                // 工具箱
-                                legend: {
-                                    x: 80,
-                                    y: 10,
-                                    data: yList,
-                                    show: true,
-                               top:"5%",//与上方的距离 可百分比% 可像素px
-                                },
-                                grid : {
-                                    top : 80,    //距离容器上边界40像素
-                                    // bottom: 100,   //距离容器下边界30像素
-                                    bottom: 35,   //距离容器下边界30像素
-                                    left: 150,
-                                    right: 150
-                                },
-                                toolbox: {
-                                    show: true,
-                                    feature:{
-                                        saveAsImage:{
-                                            show:true
-                                        },
-                                        restore:{
-                                            show:true
-                                        },
-                                        // dataView:{
-                                        //     show:true
-                                        // },
-                                        // dataZoom:{
-                                        //     show:true
-                                        // },
-                                        magicType:{
-                                            type:['line','bar']
-                                        }
-                                    }
-                                },
-                                tooltip:{
-                                    trigger:'axis',
-                                    formatter: function (params,ticket,callback) {
-                                        var totalTime = 0;
-                                        var totalCost = 0;
-                                        var res = "";
-                                        for(var i in params) {
-                                            if (params[i].data.value > 0) {
-                                                res += "<div style='margin-top:3px;font-size:12px;'><font color='#ddd'>项目名称:" + params[i].seriesName 
-                                                    + "</font><br/>工作成本 : " + params[i].data.money
-                                                    + "元 <br/>工作时长"+" : " + params[i].data.cost + "小时</br></div>";
-                                                totalTime += Number(params[i].data.cost);
-                                                totalCost += Number(params[i].data.money);
-                                            }
-                                        }
-                                        res = res +'<br/>'+ params[0].name+ '<br/>总计: ' + totalTime.toFixed(1)+'小时 '+totalCost.toFixed(2) + "元<br/>";
-                                        return res;
-                                    }
-                                },
-                                xAxis: {
-                                    data: xList,
-                                    axisLabel: {
-                                        interval:0,rotate:20
-                                    }
-                                },
-                                yAxis: [{
-                                    type : 'value',
-                                    axisLabel: {
-                                        formatter:this.yAxisValue==0?'{value} (元)':'{value} (小时)'
-                                    }
-                                }],
-                                series: series,
-                            };
-                            myChart.setOption(option,{notMerge:true});
+                        //     var myChart = echarts.init(document.getElementById("container"));
+                        //     totalHours = totalHours.toFixed(1);
+                        //     // 设置宽度
+                        //     myChart.resize({
+                        //         width: this.widthHtval
+                        //     })
+                        //     // 设置宽度
+                        //     _this.myChart = myChart;
+                        //     var option = {
+                        //         //总成本
+                        //         title: {
+                        //             text: '工时成本总计' + totalMoneyCost.toFixed(2) + '元, 时长'+totalHours+'小时',
+                        //             left:'left',
+                        //         },
+                        //         // 工具箱
+                        //         legend: {
+                        //             x: 80,
+                        //             y: 10,
+                        //             data: yList,
+                        //             show: true,
+                        //        top:"5%",//与上方的距离 可百分比% 可像素px
+                        //         },
+                        //         grid : {
+                        //             top : 80,    //距离容器上边界40像素
+                        //             // bottom: 100,   //距离容器下边界30像素
+                        //             bottom: 35,   //距离容器下边界30像素
+                        //             left: 150,
+                        //             right: 150
+                        //         },
+                        //         toolbox: {
+                        //             show: true,
+                        //             feature:{
+                        //                 saveAsImage:{
+                        //                     show:true
+                        //                 },
+                        //                 restore:{
+                        //                     show:true
+                        //                 },
+                        //                 // dataView:{
+                        //                 //     show:true
+                        //                 // },
+                        //                 // dataZoom:{
+                        //                 //     show:true
+                        //                 // },
+                        //                 magicType:{
+                        //                     type:['line','bar']
+                        //                 }
+                        //             }
+                        //         },
+                        //         tooltip:{
+                        //             trigger:'axis',
+                        //             formatter: function (params,ticket,callback) {
+                        //                 var totalTime = 0;
+                        //                 var totalCost = 0;
+                        //                 var res = "";
+                        //                 for(var i in params) {
+                        //                     if (params[i].data.value > 0) {
+                        //                         res += "<div style='margin-top:3px;font-size:12px;'><font color='#ddd'>项目名称:" + params[i].seriesName 
+                        //                             + "</font><br/>工作成本 : " + params[i].data.money
+                        //                             + "元 <br/>工作时长"+" : " + params[i].data.cost + "小时</br></div>";
+                        //                         totalTime += Number(params[i].data.cost);
+                        //                         totalCost += Number(params[i].data.money);
+                        //                     }
+                        //                 }
+                        //                 res = res +'<br/>'+ params[0].name+ '<br/>总计: ' + totalTime.toFixed(1)+'小时 '+totalCost.toFixed(2) + "元<br/>";
+                        //                 return res;
+                        //             }
+                        //         },
+                        //         xAxis: {
+                        //             data: xList,
+                        //             axisLabel: {
+                        //                 interval:0,rotate:20
+                        //             }
+                        //         },
+                        //         yAxis: [{
+                        //             type : 'value',
+                        //             axisLabel: {
+                        //                 formatter:this.yAxisValue==0?'{value} (元)':'{value} (小时)'
+                        //             }
+                        //         }],
+                        //         series: series,
+                        //     };
+                        //     myChart.setOption(option,{notMerge:true});
                     } else {
                         this.$message({
                         message: res.msg,
@@ -463,6 +487,152 @@
                     });
                 });
             },
+            // 共同方法
+            gtff(data) {
+                var _this = this;
+                this.hasReportUserList = data.userList;
+                var xList = [] , yList = [] , list = data.list, array = [] , series = [];
+                var totalMoneyCost = data.totalCostMoney;
+                var totalHours = 0.0;
+                if (list.length > 0) {
+                    var num = list.length==0?0:list[0].project.length;
+                    for(var i in list) {
+                        xList.push(list[i].name);
+                        var pro = list[i].project;
+                        for(var j in pro) {
+                            if(array.indexOf(pro[j].project) == -1) {
+                                array.push(pro[j].project)
+                            }
+                        }
+                    }
+                    for(var i in array) {
+                        yList.push(array[i]);
+                        var dataList = [];
+                        for(var j in list) {
+                            var project = list[j].project , num = 0;
+                            if(project.length != 0) {
+                                for(var k in project) {
+                                    if(project[k].project == array[i]) {
+                                        dataList.push({
+                                            "value": this.yAxisValue==0?project[k].money:project[k].time,
+                                            "cost": project[k].time,
+                                             "money":project[k].money
+                                        })
+                                        totalHours += parseFloat(project[k].time);
+                                    } else {
+                                        num++;
+                                    }
+                                    if(k == project.length-1 && num != project.length-1) {
+                                        dataList.push({
+                                            "value": 0,
+                                            "cost": 0,
+                                            "money":0,
+                                        })
+                                    }
+                                }
+                            } else {
+                                dataList.push({
+                                    "value": 0,
+                                    "cost": 0,
+                                    "money":0,
+                                })
+                            }
+                        }
+                        series.push({
+                            name: array[i],
+                            type: 'bar',
+                            stack:'1',
+                            barMaxWidth: 30,
+                            data: dataList,
+                        })
+                    }
+                    }
+                    
+                    
+                    var myChart = echarts.init(document.getElementById("container"));
+                    totalHours = totalHours.toFixed(1);
+                    // 设置宽度
+                    myChart.resize({
+                        width: this.widthHtval
+                    })
+                    // 设置宽度
+                    _this.myChart = myChart;
+                    var option = {
+                        //总成本
+                        title: {
+                            text: '工时成本总计' + totalMoneyCost.toFixed(2) + '元, 时长'+totalHours+'小时',
+                            left:'left',
+                        },
+                        // 工具箱
+                        legend: {
+                            x: 80,
+                            y: 10,
+                            data: yList,
+                            show: true,
+                          top:"5%",//与上方的距离 可百分比% 可像素px
+                        },
+                        grid : {
+                            top : 80,    //距离容器上边界40像素
+                            // bottom: 100,   //距离容器下边界30像素
+                            bottom: 35,   //距离容器下边界30像素
+                            left: 150,
+                            right: 150
+                        },
+                        toolbox: {
+                            show: true,
+                            feature:{
+                                saveAsImage:{
+                                    show:true
+                                },
+                                restore:{
+                                    show:true
+                                },
+                                // dataView:{
+                                //     show:true
+                                // },
+                                // dataZoom:{
+                                //     show:true
+                                // },
+                                magicType:{
+                                    type:['line','bar']
+                                }
+                            }
+                        },
+                        tooltip:{
+                            trigger:'axis',
+                            formatter: function (params,ticket,callback) {
+                                var totalTime = 0;
+                                var totalCost = 0;
+                                var res = "";
+                                for(var i in params) {
+                                    if (params[i].data.value > 0) {
+                                        res += "<div style='margin-top:3px;font-size:12px;'><font color='#ddd'>项目名称:" + params[i].seriesName 
+                                            + "</font><br/>工作成本 : " + params[i].data.money
+                                            + "元 <br/>工作时长"+" : " + params[i].data.cost + "小时</br></div>";
+                                        totalTime += Number(params[i].data.cost);
+                                        totalCost += Number(params[i].data.money);
+                                    }
+                                }
+                                res = res +'<br/>'+ params[0].name+ '<br/>总计: ' + totalTime.toFixed(1)+'小时 '+totalCost.toFixed(2) + "元<br/>";
+                                return res;
+                            }
+                        },
+                        xAxis: {
+                            data: xList,
+                            axisLabel: {
+                                interval:0,rotate:20
+                            }
+                        },
+                        yAxis: [{
+                            type : 'value',
+                            axisLabel: {
+                                formatter:this.yAxisValue==0?'{value} (元)':'{value} (小时)'
+                            }
+                        }],
+                        series: series,
+                    };
+                    myChart.setOption(option,{notMerge:true});
+            },
             yanjiu() {
                 console.log('触发')
             },
@@ -790,6 +960,9 @@
         // width: 100% !important; 
         margin-top: 60px;
     } 
+    .ryuans {
+        top: -50px;
+    }
 </style>
 
 <style lang="scss">

+ 7 - 14
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -109,15 +109,8 @@
                             <!--每个阶段的拖拽 -->
                             <!-- <transition-group > -->
                                 <v-flex class="taskStage"  v-for="stage in stageList" :key="stage.id" :style="'height:'+stageListHeight+'px;'">
-                                    <draggable group="task"
-                                    
-                                    class="taskList" 
-                                    :id="stage.id"
-                                    dragClass="dragClass"
-                                    ghostClass="ghost"
-                                    @start="drag=true" @end="drag=false" 
-                                    @update="onChange" @add="onChange"
-                                    draggable=".taskCard">
+                                    <div :id="stage.id"
+                                    class="taskList" >
                                         
                                         <!--头部显示阶段名称,操作 -->
                                         <div slot="header" style="margin:10px 0px;cursor:move;width:300px" role="task">
@@ -138,7 +131,7 @@
                                             </el-dropdown>
                                         </div>
 
-                                        <div class="taskListin" :style="'max-height:' + taskListinH + 'px;'">
+                                        <draggable class="taskListin" :style="'max-height:' + taskListinH + 'px;'" @start="drag=true" @end="drag=false" draggable=".taskCard" ghostClass="ghost" @update="onChange" @add="onChange" group="task1" :id="stage.id">
                                             <div v-for="element in stage.taskList" :id="element.id" :key="element.id" class="taskCard" ref="tasks" @click="editTask(element)" :style="element.taskStatus==0?'':'background:#eFeFeF;'">
                                                 <!--任务卡片内容显示 -->
                                                 <div>
@@ -169,9 +162,9 @@
                                                     </el-tooltip>
                                                 </div>
                                             </div>
-                                        </div>
+                                        </draggable>
                                         <el-button slot="footer" role="people" @click="addTask(stage)" style="width:300px;" size="small" icon="el-icon-plus"></el-button>
-                                    </draggable>
+                                    </div>
                                 </v-flex>
                             <!-- </transition-group > -->
                             <el-button slot="footer" v-if="selectedGroup != null" @click="addStage" class="taskList" icon="el-icon-plus" style="margin-top:30px;">新建任务列表</el-button>
@@ -1408,8 +1401,8 @@
             onChange(e) {
                 var data = {
                     id:e.item.id,
-                    oldIndex: e.oldIndex -1, 
-                    newIndex: e.newIndex -1,
+                    oldIndex: e.oldIndex , 
+                    newIndex: e.newIndex ,
                     oldStagesId: e.from.id,
                     newStagesId: e.to.id};
                 this.http.post('/task/changeOrder',data,

+ 111 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1317,7 +1317,15 @@
                     total: 0,
                 },
                 toViewloadings: false,
-                tabPositionss: 'top'
+                tabPositionss: 'top',
+                monthTotal: 0,
+                monthTotalPage: 0,
+                monthTotalLages: 20,
+                monthworkDateS1: [],
+                monthnotTotal: 0,
+                monthnotTotalPage: 0,
+                monthnotTotalLages: 20,
+                monthnotworkDateS1: []
             };
         },
         filters: {
@@ -1856,14 +1864,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) + '-07'
+            let sedates2 = sedate.getFullYear() + '-' + (semonth < 10 ? '0' + semonth : semonth) + '-' + seday
             return [sedates1, sedates2]
         }
     },
 
     showMonthWorkTime() {
+      this.monthTotalPage = 0,
         this.tbload = true
       this.http.post(
         "/report/getUserDailyWorkTime",
@@ -1878,10 +1887,31 @@
               this.tbload = false
             this.pickDateArray = res.data.days;
             this.monthworkDate = res.data.list;
-            this.monthworkDateS = this.monthworkDate
+            // this.monthworkDateS = this.monthworkDate
+            this.monthworkDateS1 = res.data.list
+            this.monthTotal = res.data.list.length
+            // console.log('列表的总数据', this.monthworkDateS)
+            var infoList = []
+
+            if (this.monthworkDateS1.length > 20) {
+                this.monthworkDateS1.forEach((val ,i) => {
+                if (i < 20) {
+                    infoList.push(val)
+                }
+                })
+            }
+            this.monthworkDateS = infoList
+            // 判断
+            if (this.monthworkDateS1.length > 0) {
+                setTimeout(() => {
+                    this.tableListener()
+                }, 1000);
+            }
+
             this.$nextTick(function(){
                 this.$refs.hasworkTbl.doLayout();
             });
+            // this.$forceUpdate()
           }
         },
         (error) => {
@@ -1893,9 +1923,35 @@
         }
       );
     },
+    tableListener(){
+      let that = this;
+      // this.$refs.maTable.bodyWarpper 
+      let dom = that.$refs.hasworkTbl.bodyWrapper;
+    //   console.log(dom)
+      	  // 添加scroll监听事件
+          dom.addEventListener("scroll", function () {
+          // scrollHeight-scrollTop-clientHeight=0 用来判断滚动条到底部
+            const scrollDistance = dom.scrollHeight - dom.scrollTop - dom.clientHeight;
+            if (scrollDistance < 2) {
+              if (that.monthworkDateS.length < that.monthworkDateS1.length) {
+                that.monthTotalPage++; //当前页数自增
+                // console.log(that.monthworkDateS1.length, that.monthworkDateS.length, that.monthTotalPage, that.monthTotalLages, that.monthTotalPage * that.monthTotalLages)
+                var arrList = JSON.parse(JSON.stringify(that.monthworkDateS1))
+                var infoList = arrList.splice(
+                  that.monthTotalPage * that.monthTotalLages,
+                  that.monthTotalLages
+                );
+                // console.log(infoList, '将要合并的数据')
+                // 数据添加
+                that.monthworkDateS = that.monthworkDateS.concat(infoList);
+              }
+            }
+          })
+    },
     showMonthNotWorkTime() {
-        this.tbload = true
+      this.monthTotalPage = 0,
     //   console.log("exportMembNotWorkHours",this.WorktimeDatepickValue);
+        this.tbload = true
       this.http.post(
         // "/report/getUserDailyWorkTime",
         "/report/getNoReportUserList",
@@ -1908,9 +1964,32 @@
           if (res.code == "ok") {
               this.tbload = false
             this.monthNotWorkDate = res.data;
-            this.monthNotWorkDateS = this.monthNotWorkDate
-            this.$forceUpdate();
+            // this.monthNotWorkDateS = this.monthNotWorkDate
+            
             // console.log("monthNotWorkDate", this.monthNotWorkDate);
+            this.monthnotworkDateS1 = res.data
+            this.monthnotTotal = res.data.length
+            // console.log('列表的总数据', this.monthworkDateS)
+            var infoList = []
+
+            if (this.monthnotworkDateS1.length > 20) {
+                this.monthnotworkDateS1.forEach((val ,i) => {
+                if (i < 20) {
+                    infoList.push(val)
+                }
+                })
+            }
+            this.monthNotWorkDateS = infoList
+            // 判断
+            if (this.monthnotworkDateS1.length > 0) {
+                setTimeout(() => {
+                    this.tableListenernot()
+                }, 1000);
+            }
+            // this.$forceUpdate();
+            this.$nextTick(function(){
+                this.$refs.hasworkTbl.doLayout();
+            });
           }
         },
         (error) => {
@@ -1922,6 +2001,31 @@
         }
       );
     },
+    tableListenernot(){
+      let that = this;
+      // this.$refs.maTable.bodyWarpper 
+      let dom2 = that.$refs.hasworkTbl2.bodyWrapper;
+    //   console.log(dom2)
+      	  // 添加scroll监听事件
+          dom2.addEventListener("scroll", function () {
+          // scrollHeight-scrollTop-clientHeight=0 用来判断滚动条到底部
+            const scrollDistance2 = dom2.scrollHeight - dom2.scrollTop - dom2.clientHeight;
+            if (scrollDistance2 < 2) {
+              if (that.monthNotWorkDateS.length < that.monthnotworkDateS1.length) {
+                that.monthnotTotalPage++; //当前页数自增
+                // console.log(that.monthnotworkDateS1.length, that.monthNotWorkDateS.length, that.monthnotTotalPage, that.monthnotTotalLages, that.monthnotTotalPage * that.monthnotTotalLages)
+                var arrList = JSON.parse(JSON.stringify(that.monthnotworkDateS1))
+                var infoList = arrList.splice(
+                  that.monthnotTotalPage * that.monthnotTotalLages,
+                  that.monthnotTotalLages
+                );
+                // console.log(infoList, '将要合并的数据')
+                // 数据添加
+                that.monthNotWorkDateS = that.monthNotWorkDateS.concat(infoList);
+              }
+            }
+          })
+    },
     // 获取默认这zhou日期参数 222
     getLastWeek(e){
       let newdate = new Date()

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <van-nav-bar title="填写日报1" left-text="返回" @click-left="back" fixed left-arrow/>
+        <van-nav-bar title="填写日报" left-text="返回" @click-left="back" fixed left-arrow/>
 
         <van-form class="login_form" @submit="submitReport">
             <van-field readonly clickable name="datetimePicker" :value="form.createDate" label="时间选择" placeholder="点击选择时间"