BUG 31139

This commit is contained in:
aixianling
2022-10-28 11:19:39 +08:00
parent 9dbe2fde3f
commit dbe55db84d

View File

@@ -30,7 +30,7 @@
</div> </div>
</el-table-column> </el-table-column>
</el-table> </el-table>
<ai-dialog :visible.sync="dialog.visible" width="520px" :title="dialog.title" class="editStyle" <ai-dialog :visible.sync="visible" width="520px" :title="dialog.title" class="editStyle"
@closed="dialog={}" @onConfirm="submitAdd"> @closed="dialog={}" @onConfirm="submitAdd">
<el-form ref="editListItemForm" size="small" :model="dialog" :rules="rules" label-width="100px" <el-form ref="editListItemForm" size="small" :model="dialog" :rules="rules" label-width="100px"
:validate-on-rule-change="false"> :validate-on-rule-change="false">
@@ -60,8 +60,8 @@ export default {
}, },
data() { data() {
return { return {
visible: false,
dialog: { dialog: {
visible: false,
title: "", title: "",
name: "", name: "",
changeTime: "" changeTime: ""
@@ -87,7 +87,7 @@ export default {
showDialog(v, rowIndex) { showDialog(v, rowIndex) {
this.dialog = {...this.dialog, ...v, rowIndex} this.dialog = {...this.dialog, ...v, rowIndex}
this.dialog.title = (this.dialog.rowIndex == 0 ? "编辑" : "添加") + this.currentList.dialogTitle this.dialog.title = (this.dialog.rowIndex == 0 ? "编辑" : "添加") + this.currentList.dialogTitle
this.dialog.visible = true this.visible = true
}, },
submitAdd() { submitAdd() {
this.$refs.editListItemForm.validate(v => { this.$refs.editListItemForm.validate(v => {
@@ -97,7 +97,7 @@ export default {
list.splice(this.dialog.rowIndex, 1, this.dialog) list.splice(this.dialog.rowIndex, 1, this.dialog)
} else list.push(this.dialog) } else list.push(this.dialog)
}) })
this.dialog.visible = false this.visible = false
} }
}) })
}, },