|
@@ -852,7 +852,8 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<el-table ref="hasworkTbl"
|
|
<el-table ref="hasworkTbl"
|
|
- :data="monthworkDateS"
|
|
|
|
|
|
+ :data="monthWorkDataS"
|
|
|
|
+ v-el-table-infinite-scroll="listScroll"
|
|
border
|
|
border
|
|
:height="500"
|
|
:height="500"
|
|
highlight-current-row
|
|
highlight-current-row
|
|
@@ -961,6 +962,8 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ <el-alert v-if="isFlag" title="加载中..." type="success" center :closable="false" show-icon></el-alert>
|
|
|
|
+ <el-alert v-if="isMore" title="无更多数据" type="warning" center show-icon></el-alert>
|
|
|
|
|
|
<!-- <div slot="title" class="dialog-title selectworktime_title">
|
|
<!-- <div slot="title" class="dialog-title selectworktime_title">
|
|
<label style="font-size: 16px">员工每日已填报工时数</label>
|
|
<label style="font-size: 16px">员工每日已填报工时数</label>
|
|
@@ -1021,9 +1024,9 @@
|
|
v-loading="tbload"
|
|
v-loading="tbload"
|
|
lazy
|
|
lazy
|
|
>
|
|
>
|
|
- <el-table-column min-width="300" fixed="left" label="部门" prop="department">
|
|
|
|
|
|
+ <el-table-column min-width="300" label="部门" prop="department">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column min-width="300" prop="name" fixed="left" label="姓名" >
|
|
|
|
|
|
+ <el-table-column min-width="300" prop="name" label="姓名" >
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
min-width="300"
|
|
min-width="300"
|
|
@@ -1034,7 +1037,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<el-alert v-if="isFlag" title="加载中..." type="success" center :closable="false" show-icon></el-alert>
|
|
<el-alert v-if="isFlag" title="加载中..." type="success" center :closable="false" show-icon></el-alert>
|
|
- <el-alert v-if="isMore" title="无更多数据" type="warning" center show-icon></el-alert>
|
|
|
|
|
|
+ <el-alert v-if="isMore" title="无更多数据" type="success" center show-icon></el-alert>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -1221,7 +1224,7 @@
|
|
tbload: false,
|
|
tbload: false,
|
|
exportTimeDialog: false,
|
|
exportTimeDialog: false,
|
|
searchKeyword: '',
|
|
searchKeyword: '',
|
|
- monthworkDateS: [],
|
|
|
|
|
|
+ monthWorkDataS: [],
|
|
monthNotWorkDateS: [],
|
|
monthNotWorkDateS: [],
|
|
pickDateArray:[],
|
|
pickDateArray:[],
|
|
WorktimeDatepickValue: [],
|
|
WorktimeDatepickValue: [],
|
|
@@ -1386,10 +1389,10 @@
|
|
monthTotalPage: 0,
|
|
monthTotalPage: 0,
|
|
monthTotalLages: 20,
|
|
monthTotalLages: 20,
|
|
|
|
|
|
- monthworkDate: [],
|
|
|
|
|
|
+ monthWorkData: [],
|
|
monthNotWorkDate: [],
|
|
monthNotWorkDate: [],
|
|
|
|
|
|
- monthworkDateS1: [],
|
|
|
|
|
|
+ monthWorkDataS1: [],
|
|
monthnotTotal: 0,
|
|
monthnotTotal: 0,
|
|
monthnotTotalPage: 0,
|
|
monthnotTotalPage: 0,
|
|
monthnotTotalLages: 20,
|
|
monthnotTotalLages: 20,
|
|
@@ -1452,8 +1455,8 @@
|
|
this.monthNotWorkDateS1.push(this.monthNotWorkDate[i])
|
|
this.monthNotWorkDateS1.push(this.monthNotWorkDate[i])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.monthNotWorkDateS1.length > 20) {
|
|
|
|
- this.monthNotWorkDateS = this.monthNotWorkDateS1.slice(0,20);
|
|
|
|
|
|
+ if (this.monthNotWorkDateS1.length > 50) {
|
|
|
|
+ this.monthNotWorkDateS = this.monthNotWorkDateS1.slice(0,50);
|
|
}else{
|
|
}else{
|
|
this.monthNotWorkDateS = this.monthNotWorkDateS1
|
|
this.monthNotWorkDateS = this.monthNotWorkDateS1
|
|
}
|
|
}
|
|
@@ -1463,22 +1466,22 @@
|
|
// }, 1000);
|
|
// }, 1000);
|
|
// }
|
|
// }
|
|
}else{
|
|
}else{
|
|
- this.monthworkDateS1 = []
|
|
|
|
- for (let i = 0; i < this.monthworkDate.length; i++) {
|
|
|
|
- if(this.monthworkDate[i].name.indexOf(this.searchKeyword) != -1){
|
|
|
|
- this.monthworkDateS1.push(this.monthworkDate[i])
|
|
|
|
|
|
+ this.monthWorkDataS1 = []
|
|
|
|
+ for (let i = 0; i < this.monthWorkData.length; i++) {
|
|
|
|
+ if(this.monthWorkData[i].name.indexOf(this.searchKeyword) != -1){
|
|
|
|
+ this.monthWorkDataS1.push(this.monthWorkData[i])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.monthworkDateS1.length > 20) {
|
|
|
|
- this.monthworkDateS = this.monthworkDateS1.slice(0,20);
|
|
|
|
|
|
+ if (this.monthWorkDataS1.length > 50) {
|
|
|
|
+ this.monthWorkDataS = this.monthWorkDataS1.slice(0,50);
|
|
}else{
|
|
}else{
|
|
- this.monthworkDateS = this.monthworkDateS1
|
|
|
|
- }
|
|
|
|
- if (this.monthworkDateS1.length > 0) {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.tableListener()
|
|
|
|
- }, 1000);
|
|
|
|
|
|
+ this.monthWorkDataS = this.monthWorkDataS1
|
|
}
|
|
}
|
|
|
|
+ // if (this.monthWorkDataS1.length > 0) {
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // this.tableListener()
|
|
|
|
+ // }, 1000);
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
addUpload(data) {
|
|
addUpload(data) {
|
|
@@ -1991,23 +1994,23 @@
|
|
this.tbload = false;
|
|
this.tbload = false;
|
|
this.pickDateArray = res.data.days;
|
|
this.pickDateArray = res.data.days;
|
|
console.log('dataarray',res.data.days);
|
|
console.log('dataarray',res.data.days);
|
|
- this.monthworkDate = res.data.list;
|
|
|
|
- // this.monthworkDateS = this.monthworkDate
|
|
|
|
- this.monthworkDateS1 = res.data.list
|
|
|
|
|
|
+ this.monthWorkData = res.data.list;
|
|
|
|
+ // this.monthWorkDataS = this.monthWorkData
|
|
|
|
+ // this.monthWorkDataS1 = res.data.list
|
|
this.monthTotal = res.data.list.length
|
|
this.monthTotal = res.data.list.length
|
|
- if (this.monthworkDateS1.length > 20) {
|
|
|
|
- this.monthworkDateS = this.monthworkDateS1.slice(0,20);
|
|
|
|
|
|
+ if (this.monthWorkData.length > 50) {
|
|
|
|
+ this.monthWorkDataS = this.monthWorkData.slice(0,50);
|
|
}else{
|
|
}else{
|
|
- this.monthworkDateS = this.monthworkDateS1
|
|
|
|
|
|
+ this.monthWorkDataS = this.monthWorkData
|
|
}
|
|
}
|
|
-
|
|
|
|
- // this.monthworkDateS = infoList
|
|
|
|
|
|
+ this.searchScreen(0)
|
|
|
|
+ // this.monthWorkDataS = infoList
|
|
// 判断
|
|
// 判断
|
|
- if (this.monthworkDateS1.length > 0) {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.tableListener()
|
|
|
|
- }, 1000);
|
|
|
|
- }
|
|
|
|
|
|
+ // if (this.monthWorkDataS1.length > 0) {
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // this.tableListener()
|
|
|
|
+ // }, 1000);
|
|
|
|
+ // }
|
|
|
|
|
|
this.$nextTick(function(){
|
|
this.$nextTick(function(){
|
|
this.$refs.hasworkTbl.doLayout();
|
|
this.$refs.hasworkTbl.doLayout();
|
|
@@ -2024,27 +2027,27 @@
|
|
}
|
|
}
|
|
);
|
|
);
|
|
},
|
|
},
|
|
- tableListener(){
|
|
|
|
- let that = this;
|
|
|
|
- let dom = that.$refs.hasworkTbl.bodyWrapper;
|
|
|
|
- // 添加scroll监听事件
|
|
|
|
- dom.addEventListener("scroll", function () {
|
|
|
|
- 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
|
|
|
|
- );
|
|
|
|
- // 数据添加
|
|
|
|
- that.monthworkDateS = that.monthworkDateS.concat(infoList);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ // tableListener(){
|
|
|
|
+ // let that = this;
|
|
|
|
+ // let dom = that.$refs.hasworkTbl.bodyWrapper;
|
|
|
|
+ // // 添加scroll监听事件
|
|
|
|
+ // dom.addEventListener("scroll", function () {
|
|
|
|
+ // const scrollDistance = dom.scrollHeight - dom.scrollTop - dom.clientHeight;
|
|
|
|
+ // if (scrollDistance < 2) {
|
|
|
|
+ // if (that.monthWorkDataS.length < that.monthWorkDataS1.length) {
|
|
|
|
+ // that.monthTotalPage++; //当前页数自增
|
|
|
|
+ // console.log(that.monthWorkDataS1.length, that.monthWorkDataS.length, that.monthTotalPage, that.monthTotalLages, that.monthTotalPage * that.monthTotalLages)
|
|
|
|
+ // var arrList = JSON.parse(JSON.stringify(that.monthWorkDataS1))
|
|
|
|
+ // var infoList = arrList.splice(
|
|
|
|
+ // that.monthTotalPage * that.monthTotalLages,
|
|
|
|
+ // that.monthTotalLages
|
|
|
|
+ // );
|
|
|
|
+ // // 数据添加
|
|
|
|
+ // that.monthWorkDataS = that.monthWorkDataS.concat(infoList);
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
showMonthNotWorkTime() {
|
|
showMonthNotWorkTime() {
|
|
this.monthTotalPage = 0,
|
|
this.monthTotalPage = 0,
|
|
this.tbload = true
|
|
this.tbload = true
|
|
@@ -2058,14 +2061,15 @@
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.tbload = false
|
|
this.tbload = false
|
|
this.monthNotWorkDate = res.data;
|
|
this.monthNotWorkDate = res.data;
|
|
- this.monthnotworkDateS1 = res.data
|
|
|
|
|
|
+ // this.monthNotWorkDateS1 = res.data
|
|
this.monthnotTotal = res.data.length
|
|
this.monthnotTotal = res.data.length
|
|
// 2222111
|
|
// 2222111
|
|
- if (this.monthnotworkDateS1.length > 50) {
|
|
|
|
- this.monthNotWorkDateS = this.monthnotworkDateS1.slice(0,50);
|
|
|
|
|
|
+ if (this.monthNotWorkDate.length > 50) {
|
|
|
|
+ this.monthNotWorkDateS = this.monthNotWorkDate.slice(0,50);
|
|
} else {
|
|
} else {
|
|
- this.monthNotWorkDateS = this.monthnotworkDateS1
|
|
|
|
|
|
+ this.monthNotWorkDateS = this.monthNotWorkDate
|
|
}
|
|
}
|
|
|
|
+ this.searchScreen(1)
|
|
// 判断
|
|
// 判断
|
|
// if (this.monthnotworkDateS1.length > 0) {
|
|
// if (this.monthnotworkDateS1.length > 0) {
|
|
// setTimeout(() => {
|
|
// setTimeout(() => {
|
|
@@ -2105,20 +2109,35 @@
|
|
// }
|
|
// }
|
|
// })
|
|
// })
|
|
// },
|
|
// },
|
|
|
|
+ listScroll(){
|
|
|
|
+ if(this.monthWorkDataS.length == this.monthWorkDataS1.length){
|
|
|
|
+ this.isMore = true
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.isMore = false
|
|
|
|
+ },1000)
|
|
|
|
+ }else {
|
|
|
|
+ this.isFlag = true
|
|
|
|
+ let datalist = this.monthWorkDataS1.slice(0,this.monthWorkDataS.length + 50)
|
|
|
|
+ this.monthWorkDataS = datalist
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.isFlag = false
|
|
|
|
+ },300)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
notListScroll(){
|
|
notListScroll(){
|
|
- if(this.monthNotWorkDateS.length == this.monthNotWorkDate.length){
|
|
|
|
|
|
+ if(this.monthNotWorkDateS.length == this.monthNotWorkDateS1.length){
|
|
this.isMore = true
|
|
this.isMore = true
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
this.isMore = false
|
|
this.isMore = false
|
|
},1000)
|
|
},1000)
|
|
}else {
|
|
}else {
|
|
this.isFlag = true
|
|
this.isFlag = true
|
|
- let datalist = this.monthNotWorkDate.slice(0,this.monthNotWorkDateS.length + 50)
|
|
|
|
|
|
+ let datalist = this.monthNotWorkDateS1.slice(0,this.monthNotWorkDateS.length + 50)
|
|
this.monthNotWorkDateS = datalist
|
|
this.monthNotWorkDateS = datalist
|
|
console.log('length',this.monthNotWorkDateS.length)
|
|
console.log('length',this.monthNotWorkDateS.length)
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
this.isFlag = false
|
|
this.isFlag = false
|
|
- },1000)
|
|
|
|
|
|
+ },300)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 获取默认这zhou日期参数 222
|
|
// 获取默认这zhou日期参数 222
|