mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 14:26:43 +08:00
提交
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user