Commit c8298d85 authored by kewei.jia's avatar kewei.jia

修改展示bug

parent fcbabc9e
......@@ -32,7 +32,7 @@
</el-table-column>
<el-table-column label="项目->分支" align="center" width="300px">
<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>
</el-table-column>
......@@ -69,7 +69,7 @@
</el-select>
<label style="margin:20px">分支</label>
<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-button :disabled="index===0?true:false" style="margin-left:5px" @click="temp.repos.splice(index, 1)">删除</el-button>
</div>
......@@ -291,6 +291,19 @@ export default {
})
if (this.dialogStatus === '新建') {
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(() => {
this.dialogFormVisible = false
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