|
@@ -1921,12 +1921,9 @@
|
|
|
},
|
|
|
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) {
|
|
@@ -1937,7 +1934,6 @@
|
|
|
that.monthTotalPage * that.monthTotalLages,
|
|
|
that.monthTotalLages
|
|
|
);
|
|
|
- // console.log(infoList, '将要合并的数据')
|
|
|
// 数据添加
|
|
|
that.monthworkDateS = that.monthworkDateS.concat(infoList);
|
|
|
}
|
|
@@ -1946,13 +1942,10 @@
|
|
|
},
|
|
|
showMonthNotWorkTime() {
|
|
|
this.monthTotalPage = 0,
|
|
|
- // console.log("exportMembNotWorkHours",this.WorktimeDatepickValue);
|
|
|
this.tbload = true
|
|
|
this.http.post(
|
|
|
- // "/report/getUserDailyWorkTime",
|
|
|
"/report/getNoReportUserList",
|
|
|
{
|
|
|
- // month: this.date,
|
|
|
startDate: this.WorktimeDatepickValue[0],
|
|
|
endDate: this.WorktimeDatepickValue[1],
|
|
|
},
|
|
@@ -1960,24 +1953,22 @@
|
|
|
if (res.code == "ok") {
|
|
|
this.tbload = false
|
|
|
this.monthNotWorkDate = res.data;
|
|
|
- // this.monthNotWorkDateS = this.monthNotWorkDate
|
|
|
- // console.log("data",res.data);
|
|
|
- // console.log("monthNotWorkDate", this.monthNotWorkDate);
|
|
|
this.monthnotworkDateS1 = res.data
|
|
|
this.monthnotTotal = res.data.length
|
|
|
+ // 2222111
|
|
|
+ // var infoList = []
|
|
|
if (this.monthnotworkDateS1.length > 20) {
|
|
|
this.monthNotWorkDateS = this.monthnotworkDateS1.slice(0,20);
|
|
|
} else {
|
|
|
this.monthNotWorkDateS = this.monthnotworkDateS1
|
|
|
}
|
|
|
-
|
|
|
+ this.monthNotWorkDateS = infoList;
|
|
|
// 判断
|
|
|
if (this.monthnotworkDateS1.length > 0) {
|
|
|
setTimeout(() => {
|
|
|
this.tableListenernot()
|
|
|
}, 1000);
|
|
|
}
|
|
|
- // this.$forceUpdate();
|
|
|
this.$nextTick(function(){
|
|
|
this.$refs.hasworkTbl2.doLayout();
|
|
|
});
|
|
@@ -1994,24 +1985,18 @@
|
|
|
},
|
|
|
tableListenernot(){
|
|
|
let that = this;
|
|
|
- // this.$refs.maTable.bodyWarpper
|
|
|
let dom = that.$refs.hasworkTbl2.bodyWrapper;
|
|
|
- // console.log(dom2)
|
|
|
- // 添加scroll监听事件
|
|
|
dom.addEventListener("scroll", function () {
|
|
|
// scrollHeight-scrollTop-clientHeight=0 用来判断滚动条到底部
|
|
|
const scrollDistance2 = dom.scrollHeight - dom.scrollTop - dom.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);
|
|
|
}
|
|
|
}
|