|
@@ -1312,7 +1312,11 @@
|
|
|
total: 0,
|
|
|
},
|
|
|
toViewloadings: false,
|
|
|
- tabPositionss: 'top'
|
|
|
+ tabPositionss: 'top',
|
|
|
+ monthTotal: 0,
|
|
|
+ monthTotalPage: 0,
|
|
|
+ monthTotalLages: 20,
|
|
|
+ monthworkDateS1: []
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
@@ -1858,7 +1862,7 @@
|
|
|
},
|
|
|
|
|
|
showMonthWorkTime() {
|
|
|
-
|
|
|
+ this.monthTotalPage = 0,
|
|
|
this.http.post(
|
|
|
"/report/getUserDailyWorkTime",
|
|
|
// "/report/getNoReportUserList",
|
|
@@ -1871,7 +1875,27 @@
|
|
|
if (res.code == "ok") {
|
|
|
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();
|
|
|
});
|
|
@@ -1885,7 +1909,33 @@
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ 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 <= 1) {
|
|
|
+ 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.monthTotalPage = 0,
|
|
|
console.log("exportMembNotWorkHours",this.WorktimeDatepickValue);
|
|
|
this.http.post(
|
|
|
// "/report/getUserDailyWorkTime",
|