From 01626d694f7f59cf591224dcfe934f91b5cad8cd Mon Sep 17 00:00:00 2001 From: Eleven Date: Sun, 22 Aug 2021 00:36:57 +0800 Subject: [PATCH] update build info page --- .../jpom/controller/build/BuildInfoController.java | 11 +++++++---- web-vue/src/pages/build/list-info.vue | 12 ++++++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) 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 e9e126f6f..b3d3c6b2e 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 @@ -54,8 +54,6 @@ import java.util.Objects; @Feature(cls = ClassFeature.BUILD) public class BuildInfoController extends BaseServerController { - @Resource - private BuildService buildService; @Resource private DbBuildHistoryLogService dbBuildHistoryLogService; @Resource @@ -155,12 +153,17 @@ public class BuildInfoController extends BaseServerController { buildInfoModel = new BuildInfoModel(); buildInfoModel.setId(IdUtil.fastSimpleUUID()); } - buildInfoModel.setGroup(group); - buildInfoModel.setName(name); + // 判断 group 是否为空 + if (StrUtil.isNotEmpty(group)) { + buildInfoModel.setGroup(group); + } // 如果是 SVN if (BuildModel.RepoType.Svn.getCode() == repositoryModel.getRepoType()) { branchName = "trunk"; } + // 设置参数 + buildInfoModel.setRepositoryId(repositoryId); + buildInfoModel.setName(name); buildInfoModel.setBranchName(branchName); buildInfoModel.setResultDirFile(resultDirFile); buildInfoModel.setScript(script); diff --git a/web-vue/src/pages/build/list-info.vue b/web-vue/src/pages/build/list-info.vue index a76c5fd09..ad539fab4 100644 --- a/web-vue/src/pages/build/list-info.vue +++ b/web-vue/src/pages/build/list-info.vue @@ -9,7 +9,7 @@ 搜索 新增 - 刷新 + 刷新 - + {{ item.name }}[{{ item.gitUrl }}] @@ -419,6 +419,14 @@ export default { this.loadData(); this.loadRepositoryList(); }, + // 选择仓库 + changeRepositpry(value) { + this.repositoryList.forEach(element => { + if (element.id === value) { + this.tempRepository = element; + } + }) + }, // 添加 handleAdd() { this.temp = {