update build info page

This commit is contained in:
Eleven 2021-08-22 00:36:57 +08:00
parent cf849108cd
commit 01626d694f
2 changed files with 17 additions and 6 deletions

View File

@ -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());
}
// 判断 group 是否为空
if (StrUtil.isNotEmpty(group)) {
buildInfoModel.setGroup(group);
buildInfoModel.setName(name);
}
// 如果是 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);

View File

@ -9,7 +9,7 @@
</a-select>
<a-button type="primary" @click="handleFilter">搜索</a-button>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="primary" @click="loadData">刷新</a-button>
<a-button type="primary" @click="handleFilter">刷新</a-button>
</div>
<!-- 表格 -->
<a-table
@ -103,7 +103,7 @@
</a-row>
</a-form-model-item>
<a-form-model-item label="仓库地址" prop="repositoryId">
<a-select v-model="temp.repositoryId">
<a-select v-model="temp.repositoryId" @select="changeRepositpry">
<a-select-option v-for="item in repositoryList" :key="item.id" :value="item.id">{{ item.name }}[{{ item.gitUrl }}]</a-select-option>
</a-select>
</a-form-model-item>
@ -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 = {