修改构建获取列表数量

This commit is contained in:
李道甫 2021-09-15 16:41:33 +08:00
parent ea1e116da4
commit 4586a3c214
2 changed files with 26 additions and 10 deletions

View File

@ -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) {

View File

@ -109,13 +109,7 @@
<a-form-model-item v-show="tempRepository.repoType === 0" label="分支" prop="branchName">
<a-row>
<a-col :span="10">
<custom-select
v-model="temp.branchName"
:data="branchList"
@onRefreshSelect="loadBranchList"
inputPlaceholder="自定义分支通配表达式"
selectPlaceholder="请选择构建对应的分支,必选"
>
<custom-select v-model="temp.branchName" :data="branchList" @onRefreshSelect="loadBranchList" inputPlaceholder="自定义分支通配表达式" selectPlaceholder="请选择构建对应的分支,必选">
<div slot="inputTips">
支持通配符(AntPathMatcher)
<ul>
@ -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();
},
};
</script>
<style scoped>