diff --git a/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java b/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java index 3167cf3d4..40cd43a5c 100644 --- a/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java +++ b/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java @@ -88,7 +88,7 @@ public class BuildInfoController extends BaseServerController { public String getBuildList(String group, @ValidatorConfig(value = { @ValidatorItem(value = ValidatorRule.POSITIVE_INTEGER, msg = "limit error") - }, defaultVal = "10") int limit, + }, defaultVal = "1000") int limit, @ValidatorConfig(value = { @ValidatorItem(value = ValidatorRule.POSITIVE_INTEGER, msg = "page error") }, defaultVal = "1") int page) { diff --git a/web-vue/src/pages/build/list-info.vue b/web-vue/src/pages/build/list-info.vue index 6eeb76e0b..8a12ea3a8 100644 --- a/web-vue/src/pages/build/list-info.vue +++ b/web-vue/src/pages/build/list-info.vue @@ -109,13 +109,7 @@ - +
支持通配符(AntPathMatcher)
    @@ -256,11 +250,12 @@ export default { return { releaseMethodMap: releaseMethodMap, loading: false, - listQuery: {}, + listQuery: { }, tableHeight: "70vh", // 动态列表参数 groupList: [], list: [], + total: 0, repositoryList: [], // 当前仓库信息 tempRepository: {}, @@ -351,6 +346,21 @@ export default { }; }, computed: { + pagination() { + return { + total: this.total, + current: this.listQuery.page || 1, + pageSize: this.listQuery.limit || 10, + pageSizeOptions: ["10", "20", "50", "100"], + showSizeChanger: true, + showTotal: (total) => { + if (total <= this.listQuery.limit) { + return ""; + } + return `总计 ${total} 条`; + }, + }; + }, ...mapGetters(["getGuideFlag"]), }, watch: { @@ -364,7 +374,6 @@ export default { this.handleFilter(); }, methods: { - // 页面引导 introGuide() { if (this.getGuideFlag) { @@ -405,6 +414,7 @@ export default { getBuildList(this.listQuery).then((res) => { if (res.code === 200) { this.list = res.data; + this.total = res.total; } this.loading = false; }); @@ -717,6 +727,12 @@ export default { this.handleFilter(); }, }, + // 分页、排序、筛选变化时触发 + changePage(pagination) { + this.listQuery.page = pagination.current; + this.listQuery.limit = pagination.pageSize; + this.loadData(); + }, };