Commit 2b7b5125 authored by 智勇's avatar 智勇

删除第一行

parent bd03075d
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<!-- <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> --> <!-- <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> -->
<el-dialog :title="dialogStatus" :visible.sync="dialogFormVisible"> <el-dialog :title="dialogStatus" :visible.sync="dialogFormVisible" :show-close="showClose">
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="80px" style="width: 90%; margin-left:40px;"> <el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="80px" style="width: 90%; margin-left:40px;">
<el-form-item label="应用名称" prop="application_name" > <el-form-item label="应用名称" prop="application_name" >
<el-input v-model="temp.application_name"/> <el-input v-model="temp.application_name"/>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<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.name" :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 && temp.repos.length===1" style="margin-left:5px" @click="temp.repos.splice(index, 1)">删除</el-button>
</div> </div>
<div style="width:100%;margin-bottom:20px" > <div style="width:100%;margin-bottom:20px" >
<el-button type="primary" style="width:100%" @click="newRepoAndRef()"> + 新增项目&分支</el-button> <el-button type="primary" style="width:100%" @click="newRepoAndRef()"> + 新增项目&分支</el-button>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">{{ $t('table.cancel') }}</el-button> <el-button @click="handleFilter">{{ $t('table.cancel') }}</el-button>
<el-button type="primary" @click="createData()">{{ $t('table.confirm') }}</el-button> <el-button type="primary" @click="createData()">{{ $t('table.confirm') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -175,7 +175,8 @@ export default { ...@@ -175,7 +175,8 @@ export default {
refs: {}, refs: {},
ref: undefined, ref: undefined,
clusterArray: [], clusterArray: [],
nsArray: [] nsArray: [],
showClose: false
} }
}, },
computed: { computed: {
...@@ -242,6 +243,7 @@ export default { ...@@ -242,6 +243,7 @@ export default {
}, },
handleFilter() { handleFilter() {
this.dialogFormVisible = false
this.getApplications() this.getApplications()
}, },
...@@ -299,7 +301,6 @@ export default { ...@@ -299,7 +301,6 @@ export default {
} }
})) }))
this.refs[repo].push({ id: '0', name: '请选择' }) this.refs[repo].push({ id: '0', name: '请选择' })
console.log(this.refs)
this.refs[repo].reverse() this.refs[repo].reverse()
} }
}) })
...@@ -316,7 +317,6 @@ export default { ...@@ -316,7 +317,6 @@ export default {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.temp.repos.forEach(item => { this.temp.repos.forEach(item => {
console.log(item)
this.repos.forEach(value => { this.repos.forEach(value => {
if (item.repository === value.project_name) { if (item.repository === value.project_name) {
this.$set(item, 'type', value.type) this.$set(item, 'type', value.type)
......
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