fix -- 修复表单构建因本地缓存导致表单内容错误bug

This commit is contained in:
konbai
2022-03-13 16:16:07 +08:00
parent 951f810365
commit df7497ca20

View File

@@ -276,7 +276,7 @@ export default {
that.drawingList = [];
const formId = that.$route.query && that.$route.query.formId;
if (formId) {
getForm(formId).then(res =>{
getForm(formId).then(res => {
that.formConf = JSON.parse(res.data.content);
that.drawingList = that.formConf.fields;
that.form = res.data;
@@ -284,6 +284,7 @@ export default {
} else {
if (formConfInDB) {
that.formConf = formConfInDB
that.formConf.fields = null
}
}
loadBeautifier(btf => {
@@ -393,8 +394,8 @@ export default {
},
AssembleFormData() {
this.formData = {
fields: deepClone(this.drawingList),
...this.formConf
...this.formConf,
fields: deepClone(this.drawingList)
}
},
generate(data) {
@@ -502,9 +503,9 @@ export default {
/** 表单基本信息 */
handleForm() {
this.formData = {
fields: deepClone(this.drawingList),
...this.formConf
}
...this.formConf,
fields: deepClone(this.drawingList)
};
this.form.content = JSON.stringify(this.formData);
this.formOpen = true;
this.formTitle = "添加表单";