|
@@ -85,7 +85,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- v-if="sectionVisible" -->
|
|
|
- <el-dialog title="版本修改"
|
|
|
+ <el-dialog :title="isNew ? '版本添加' : '版本修改'"
|
|
|
width="400px"
|
|
|
:visible.sync="sectionVisible"
|
|
|
:before-close="resetForm">
|
|
@@ -148,7 +148,7 @@
|
|
|
</el-form>
|
|
|
<div slot="footer"
|
|
|
class="dialog-footer">
|
|
|
- <el-button @click="sectionVisible = false">取 消</el-button>
|
|
|
+ <el-button @click="resetForm">取 消</el-button>
|
|
|
<el-button v-if="isNew"
|
|
|
type="primary"
|
|
|
@click="createEdition">确 定</el-button>
|
|
@@ -243,6 +243,8 @@ export default {
|
|
|
createEdition () {
|
|
|
this.$refs.sectionForm.validate(v => {
|
|
|
if (v) {
|
|
|
+ console.log(this.sectionForm)
|
|
|
+ return
|
|
|
addAppVersionInfo(this.sectionForm).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('新增成功')
|
|
@@ -257,7 +259,9 @@ export default {
|
|
|
},
|
|
|
resetEdit (row) {
|
|
|
this.isNew = false;
|
|
|
- this.sectionForm = row;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.sectionForm = row;
|
|
|
+ })
|
|
|
this.sectionVisible = true;
|
|
|
},
|
|
|
resetEdition () {
|
|
@@ -280,7 +284,6 @@ export default {
|
|
|
status: '',
|
|
|
id: ''
|
|
|
}
|
|
|
- // console.log(this.sectionForm.status)
|
|
|
this.$refs.sectionForm.resetFields();
|
|
|
this.sectionVisible = false;
|
|
|
}
|