Commit 570128d4 authored by 智勇's avatar 智勇
parents b2a16980 e95767d1
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</el-table-column> </el-table-column>
<el-table-column label="项目->分支" align="center" width="300px"> <el-table-column label="项目->分支" align="center" width="300px">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="item in scope.row.repos" :key="item.id"><b>{{ item.repository }}</b> -> {{ item.ref.name | replaceeRef }}</div> <div v-for="item in scope.row.repos" :key="item.id"><b>{{ item.repository }}</b> -> {{ item.ref.name }}</div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</el-select> </el-select>
<label style="margin:20px">分支</label> <label style="margin:20px">分支</label>
<el-select v-model="repoAndRefItem.ref.name" filterable value-key="id" style="width:30%" class="filter-item"> <el-select v-model="repoAndRefItem.ref.name" filterable value-key="id" style="width:30%" class="filter-item">
<el-option v-for="item in refs[repoAndRefItem.repository]" :value="item" :label="item.name" :key="item.name" /> <el-option v-for="item in refs[repoAndRefItem.repository]" :value="item.name" :label="item.name" :key="item.name" />
</el-select> </el-select>
<el-button :disabled="index===0?true:false" style="margin-left:5px" @click="temp.repos.splice(index, 1)">删除</el-button> <el-button :disabled="index===0?true:false" style="margin-left:5px" @click="temp.repos.splice(index, 1)">删除</el-button>
</div> </div>
...@@ -291,6 +291,19 @@ export default { ...@@ -291,6 +291,19 @@ export default {
}) })
if (this.dialogStatus === '新建') { if (this.dialogStatus === '新建') {
this.temp.new_user = this.$store.getters.name this.temp.new_user = this.$store.getters.name
let flag = true
this.temp.repos.forEach((item) => {
if (item.ref.name == null || item.ref.name === '请选择') {
this.$notify({
title: 'error',
message: '请仔细检查项目和分支名称是否填写正确',
type: 'error',
duration: 2000
})
flag = false
}
})
if (!flag) return false
saveApplication(this.temp).then(() => { saveApplication(this.temp).then(() => {
this.dialogFormVisible = false this.dialogFormVisible = false
this.$notify({ this.$notify({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment