mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-04 21:08:30 +08:00
update build page
This commit is contained in:
parent
5049d3ea54
commit
fe2ac8d4df
@ -56,10 +56,26 @@ export function getBranchList(params) {
|
||||
* } params
|
||||
*/
|
||||
export function editBuild(params) {
|
||||
const data = {
|
||||
id: params.id,
|
||||
name: params.name,
|
||||
gitUrl: params.gitUrl,
|
||||
userName: params.userName,
|
||||
password: params.password,
|
||||
resultDirFile: params.resultDirFile,
|
||||
script: params.script,
|
||||
releaseMethod: params.releaseMethod,
|
||||
branchName: params.branchName,
|
||||
group: params.group,
|
||||
repoType: params.repoType,
|
||||
// 其他参数
|
||||
releaseMethodDataId_2_node: params.releaseMethodDataId_2_node,
|
||||
releaseMethodDataId_2_project: params.releaseMethodDataId_2_project,
|
||||
}
|
||||
return axios({
|
||||
url: '/build/updateBuild',
|
||||
method: 'post',
|
||||
data: params
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item v-if="temp.releaseMethod === 2" label="发布项目" prop="releaseMethodDataId">
|
||||
<a-cascader :options="cascaderList" placeholder="Please select" @change="onChangeProject" />
|
||||
<a-cascader v-model="temp.releaseMethodDataIdList" :options="cascaderList" placeholder="Please select" @change="onChangeProject" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
@ -253,6 +253,9 @@ export default {
|
||||
handleEdit(record) {
|
||||
this.temp = Object.assign(record);
|
||||
this.temp.tempGroup = '';
|
||||
if (record.releaseMethodDataId) {
|
||||
this.temp.releaseMethodDataIdList = record.releaseMethodDataId.split(':');
|
||||
}
|
||||
this.loadBranchList();
|
||||
this.loadNodeProjectList();
|
||||
this.editBuildVisible = true;
|
||||
@ -285,8 +288,8 @@ export default {
|
||||
})
|
||||
},
|
||||
// 选择节点项目
|
||||
onChangeProject() {
|
||||
|
||||
onChangeProject(value) {
|
||||
console.log(value)
|
||||
},
|
||||
// 提交节点数据
|
||||
handleEditBuildOk() {
|
||||
@ -295,6 +298,18 @@ export default {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 设置参数
|
||||
if (this.temp.releaseMethod === 2) {
|
||||
if (this.temp.releaseMethodDataIdList.length < 2) {
|
||||
this.$notification.warn({
|
||||
message: '请选择节点项目',
|
||||
duration: 2
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.temp.releaseMethodDataId_2_node = this.temp.releaseMethodDataIdList[0];
|
||||
this.temp.releaseMethodDataId_2_project = this.temp.releaseMethodDataIdList[1];
|
||||
}
|
||||
// 提交数据
|
||||
editBuild(this.temp).then(res => {
|
||||
if (res.code === 200) {
|
||||
|
Loading…
Reference in New Issue
Block a user