This commit is contained in:
zhaofang
2022-09-25 12:40:59 +08:00
parent b0810123e0
commit e15c24b6d1
3 changed files with 74 additions and 38 deletions

View File

@@ -80,6 +80,15 @@
</div>
</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageIndex"
:page-sizes="[10, 20, 30, 40]"
:page-size="paegSize"
layout="total, sizes, prev, pager, next, jumper"
:total="count">
</el-pagination>
</div>
<el-dialog
width="860px"
@@ -137,6 +146,7 @@ export default {
components:{interactBar},
data(){
return{
count:0,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
options: [{
value: '选项1',
@@ -149,7 +159,7 @@ export default {
num :null,
dialogVisible: false,
pageIndex:1,
paegSize:1,
paegSize:10,
orderType:true,
orderField:'',
courseId:'',
@@ -238,18 +248,30 @@ export default {
endTime:this.endTime,
}
apiNote.query(data).then(res=>{
this.datalist = res.result.list
this.datalist = res.result.list;
this.count = res.result.count;
})
},
// 根据秒数转换成对应的时分秒
getHMS(time) {
const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600)
const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60)
const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60)
// console.log(hour + ':' + min + ':' + sec)
return hour + ':' + min + ':' + sec
}
const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600)
const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60)
const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60)
// console.log(hour + ':' + min + ':' + sec)
return hour + ':' + min + ':' + sec
},
handleSizeChange(val) {
this.paegSize = val;
this.pageIndex = 1;
this.noteData(this.num);
console.log(`每页 ${val}`);
},
handleCurrentChange(val) {
this.pageIndex = val;
this.noteData(this.num);
console.log(`当前页: ${val}`);
}
}
}