|
|
|
@ -129,6 +129,8 @@ export default { |
|
|
|
}, |
|
|
|
// 编辑弹窗配置 |
|
|
|
edit_rule: null, |
|
|
|
// 表单规则存储 |
|
|
|
ruleStorage: {}, |
|
|
|
// 当前编辑数据 |
|
|
|
current: null, |
|
|
|
// 是否显示编辑弹窗 |
|
|
|
@ -174,7 +176,9 @@ export default { |
|
|
|
}) |
|
|
|
// console.log(res.data.content_data); |
|
|
|
// console.log(res.data.field_info.editFields); |
|
|
|
this.edit_rule = getForm(res.data.field_info.editFields); |
|
|
|
this.ruleStorage.add = getForm(res.data.field_info.add_fields) |
|
|
|
this.ruleStorage.edit = getForm(res.data.field_info.editFields) |
|
|
|
// this.edit_rule = getForm(res.data.field_info.editFields) |
|
|
|
return { |
|
|
|
// 默认code为0是成功,比如接口code: 200是成功,可以这样改为0 |
|
|
|
code: res.code === 200 ? 0 : res.code, |
|
|
|
@ -193,8 +197,10 @@ export default { |
|
|
|
openEdit(row) { |
|
|
|
if (row) { |
|
|
|
this.current = row; |
|
|
|
this.edit_rule = this.ruleStorage.edit |
|
|
|
} else { |
|
|
|
this.current = null; |
|
|
|
this.edit_rule = this.ruleStorage.add |
|
|
|
} |
|
|
|
this.showEdit = true; |
|
|
|
}, |
|
|
|
|