fix(流程表单): 修复配置表单后无法正常显示

approve-sys
tony 3 years ago
parent 5f3d4ca76c
commit 316546b785

@ -499,8 +499,12 @@ export default {
delete data.fields delete data.fields
this.formConf = data this.formConf = data
}, },
/** 表单基本信息 */
handleForm(){ handleForm(){
this.form.formContent = JSON.stringify(this.formConf) this.formData = {
fields: deepClone(this.drawingList),
}
this.form.formContent = JSON.stringify(this.formData);
this.formOpen = true; this.formOpen = true;
this.formTitle = "添加表单"; this.formTitle = "添加表单";
}, },
@ -519,22 +523,20 @@ export default {
this.formOpen = false; this.formOpen = false;
this.reset(); this.reset();
}, },
/** 保存表单信息 */
submitForm(){ submitForm(){
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.formId != null) { if (this.form.formId != null) {
updateForm(this.form).then(response => { updateForm(this.form).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false;
this.getList();
}); });
} else { } else {
addForm(this.form).then(response => { addForm(this.form).then(response => {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false;
this.getList();
}); });
} }
this.open = false;
// //
this.$store.dispatch("tagsView/delView", this.$route); this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1) this.$router.go(-1)

Loading…
Cancel
Save