Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
bwcx_jzy 2021-09-15 17:06:12 +08:00
commit caf4332617
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, public String getBuildList(String group,
@ValidatorConfig(value = { @ValidatorConfig(value = {
@ValidatorItem(value = ValidatorRule.POSITIVE_INTEGER, msg = "limit error") @ValidatorItem(value = ValidatorRule.POSITIVE_INTEGER, msg = "limit error")
}, defaultVal = "10") int limit, }, defaultVal = "1000") int limit,
@ValidatorConfig(value = { @ValidatorConfig(value = {
@ValidatorItem(value = ValidatorRule.POSITIVE_INTEGER, msg = "page error") @ValidatorItem(value = ValidatorRule.POSITIVE_INTEGER, msg = "page error")
}, defaultVal = "1") int page) { }, defaultVal = "1") int page) {

View File

@ -109,13 +109,7 @@
<a-form-model-item v-show="tempRepository.repoType === 0" label="分支" prop="branchName"> <a-form-model-item v-show="tempRepository.repoType === 0" label="分支" prop="branchName">
<a-row> <a-row>
<a-col :span="10"> <a-col :span="10">
<custom-select <custom-select v-model="temp.branchName" :data="branchList" @onRefreshSelect="loadBranchList" inputPlaceholder="自定义分支通配表达式" selectPlaceholder="请选择构建对应的分支,必选">
v-model="temp.branchName"
:data="branchList"
@onRefreshSelect="loadBranchList"
inputPlaceholder="自定义分支通配表达式"
selectPlaceholder="请选择构建对应的分支,必选"
>
<div slot="inputTips"> <div slot="inputTips">
支持通配符(AntPathMatcher) 支持通配符(AntPathMatcher)
<ul> <ul>
@ -256,11 +250,12 @@ export default {
return { return {
releaseMethodMap: releaseMethodMap, releaseMethodMap: releaseMethodMap,
loading: false, loading: false,
listQuery: {}, listQuery: { },
tableHeight: "70vh", tableHeight: "70vh",
// //
groupList: [], groupList: [],
list: [], list: [],
total: 0,
repositoryList: [], repositoryList: [],
// //
tempRepository: {}, tempRepository: {},
@ -351,6 +346,21 @@ export default {
}; };
}, },
computed: { 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"]), ...mapGetters(["getGuideFlag"]),
}, },
watch: { watch: {
@ -364,7 +374,6 @@ export default {
this.handleFilter(); this.handleFilter();
}, },
methods: { methods: {
// //
introGuide() { introGuide() {
if (this.getGuideFlag) { if (this.getGuideFlag) {
@ -405,6 +414,7 @@ export default {
getBuildList(this.listQuery).then((res) => { getBuildList(this.listQuery).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.list = res.data; this.list = res.data;
this.total = res.total;
} }
this.loading = false; this.loading = false;
}); });
@ -717,6 +727,12 @@ export default {
this.handleFilter(); this.handleFilter();
}, },
}, },
//
changePage(pagination) {
this.listQuery.page = pagination.current;
this.listQuery.limit = pagination.pageSize;
this.loadData();
},
}; };
</script> </script>
<style scoped> <style scoped>