mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 08:16:44 +08:00
fix: 更新SignupModal中的搜索功能以支持重置页码和添加文档注释
This commit is contained in:
@@ -93,7 +93,8 @@
|
|||||||
<div class="tab-search">
|
<div class="tab-search">
|
||||||
<span class="label">受众名称:</span>
|
<span class="label">受众名称:</span>
|
||||||
<el-input v-model="audienceName.keyword" placeholder="请输入受众名称" size="small" clearable class="input" />
|
<el-input v-model="audienceName.keyword" placeholder="请输入受众名称" size="small" clearable class="input" />
|
||||||
<el-button type="primary" size="small" @click="searchAudience">
|
<!-- 搜索受众时,视为新查询,页码需归 1 -->
|
||||||
|
<el-button type="primary" size="small" @click="searchAudience(true)">
|
||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" @click="resetAudienceInfo">重置</el-button>
|
<el-button size="small" @click="resetAudienceInfo">重置</el-button>
|
||||||
@@ -512,7 +513,14 @@ export default {
|
|||||||
}
|
}
|
||||||
this.selectedOrgKeys = this.deptList.map((d) => d.id);
|
this.selectedOrgKeys = this.deptList.map((d) => d.id);
|
||||||
},
|
},
|
||||||
searchAudience() {
|
/**
|
||||||
|
* 搜索受众列表
|
||||||
|
* @param {Boolean} resetPage 是否重置到第 1 页(新搜索或重置时需要)
|
||||||
|
*/
|
||||||
|
searchAudience(resetPage = false) {
|
||||||
|
if (resetPage) {
|
||||||
|
this.audienceTable.pageNo = 1;
|
||||||
|
}
|
||||||
fetchUserAudiences({
|
fetchUserAudiences({
|
||||||
...this.audienceName,
|
...this.audienceName,
|
||||||
pageNo: this.audienceTable.pageNo,
|
pageNo: this.audienceTable.pageNo,
|
||||||
@@ -579,6 +587,8 @@ export default {
|
|||||||
},
|
},
|
||||||
resetAudienceInfo() {
|
resetAudienceInfo() {
|
||||||
this.audienceName.keyword = "";
|
this.audienceName.keyword = "";
|
||||||
|
// 重置后从第 1 页重新拉取
|
||||||
|
this.audienceTable.pageNo = 1;
|
||||||
this.searchAudience();
|
this.searchAudience();
|
||||||
},
|
},
|
||||||
onOrgSelectChange() { },
|
onOrgSelectChange() { },
|
||||||
@@ -699,9 +709,6 @@ export default {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-area {
|
|
||||||
}
|
|
||||||
|
|
||||||
.pager {
|
.pager {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
Reference in New Issue
Block a user