搜索时修改分页为1

This commit is contained in:
joshen
2024-05-21 16:54:57 +08:00
parent 4ed5f98ea1
commit c7267a0acd

View File

@@ -28,7 +28,7 @@ export default {
query:{teacherId:teacherId} query:{teacherId:teacherId}
}) })
}, },
//列表 // 列表
getList(){ getList(){
this.params.teacherNo=this.userInfo.userNo this.params.teacherNo=this.userInfo.userNo
pageList(this.params).then(res=>{ pageList(this.params).then(res=>{
@@ -36,7 +36,12 @@ export default {
this.total=res.data.page.total this.total=res.data.page.total
}) })
}, },
//重置 // 搜索
searchList(){
this.params.pageNo = 1;
this.getList();
},
// 重置
closePageFind(){ closePageFind(){
this.params.courseName = ''; this.params.courseName = '';
this.params.pageNo = 1; this.params.pageNo = 1;
@@ -50,7 +55,7 @@ export default {
this.params.pageNo = val; this.params.pageNo = val;
this.getList(); this.getList();
}, },
//根据认证状态跳转页面 // 根据认证状态跳转页面
getView(item){ getView(item){
getCertificationProcess({teacherId:item.teacherId}).then(res=>{ getCertificationProcess({teacherId:item.teacherId}).then(res=>{
var data = res.data var data = res.data
@@ -129,15 +134,10 @@ export default {
<template> <template>
<div> <div>
<div v-if="this.couresList.length==0">
<div>
<div class="zan-wu">暂无数据</div>
</div>
</div>
<div style="display: flex;justify-content:space-between;position: relative;"> <div style="display: flex;justify-content:space-between;position: relative;">
<div style="display: flex;justify-content: flex-start; padding: 12px 32px 10px 12px;"> <div style="display: flex;justify-content: flex-start; padding: 12px 32px 10px 12px;">
<div style="margin-left:10px"><el-input v-model="params.courseName" placeholder="请输入认证课程名称" clearable ></el-input></div> <div style="margin-left:10px"><el-input v-model="params.courseName" placeholder="请输入认证课程名称" clearable ></el-input></div>
<div style="padding-left: 10px;"><el-button type="primary" icon="el-icon-search" @click="getList">搜索</el-button></div> <div style="padding-left: 10px;"><el-button type="primary" icon="el-icon-search" @click="searchList">搜索</el-button></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="closePageFind">重置</el-button></div> <div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="closePageFind">重置</el-button></div>
</div> </div>
</div> </div>
@@ -166,6 +166,11 @@ export default {
</div> </div>
</div> </div>
</div> </div>
<div v-if="this.couresList.length==0">
<div>
<div class="zan-wu">暂无数据</div>
</div>
</div>
<div v-if="couresList.length > 0" style="text-align: center; margin-top:57px;"> <div v-if="couresList.length > 0" style="text-align: center; margin-top:57px;">
<el-pagination <el-pagination
background background