From 316546b785d349dcc8e6fc94aeba59afc095336b Mon Sep 17 00:00:00 2001 From: tony <846249920@qq.com> Date: Tue, 13 Apr 2021 22:24:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=81=E7=A8=8B=E8=A1=A8=E5=8D=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE=E8=A1=A8=E5=8D=95=E5=90=8E?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/tool/build/index.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/ruoyi-ui/src/views/tool/build/index.vue index d5bebd7..54f4c02 100644 --- a/ruoyi-ui/src/views/tool/build/index.vue +++ b/ruoyi-ui/src/views/tool/build/index.vue @@ -499,8 +499,12 @@ export default { delete data.fields this.formConf = data }, + /** 表单基本信息 */ 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.formTitle = "添加表单"; }, @@ -519,22 +523,20 @@ export default { this.formOpen = false; this.reset(); }, + /** 保存表单信息 */ submitForm(){ this.$refs["form"].validate(valid => { if (valid) { if (this.form.formId != null) { updateForm(this.form).then(response => { this.msgSuccess("修改成功"); - this.open = false; - this.getList(); }); } else { addForm(this.form).then(response => { this.msgSuccess("新增成功"); - this.open = false; - this.getList(); }); } + this.open = false; // 关闭当前标签页并返回上个页面 this.$store.dispatch("tagsView/delView", this.$route); this.$router.go(-1)