fix(流程表单): 修复表单无法回显

approve-sys
tony 3 years ago
parent ba170d9010
commit 2b8e2a944d

@ -267,26 +267,27 @@ export default {
}, },
mounted() { mounted() {
const that = this;
if (Array.isArray(drawingListInDB) && drawingListInDB.length > 0) { if (Array.isArray(drawingListInDB) && drawingListInDB.length > 0) {
this.drawingList = drawingListInDB that.drawingList = drawingListInDB
} else { } else {
this.drawingList = drawingDefalut that.drawingList = drawingDefalut
} }
this.activeFormItem(this.drawingList[0]) this.activeFormItem(that.drawingList[0])
// // if (formConfInDB) { // // if (formConfInDB) {
// // this.formConf = formConfInDB // // this.formConf = formConfInDB
// // } // // }
this.drawingList = []; that.drawingList = [];
const formId = this.$route.query && this.$route.query.formId; const formId = that.$route.query && that.$route.query.formId;
if (formId) { if (formId) {
getForm(formId).then(res =>{ getForm(formId).then(res =>{
this.formConf = JSON.parse(res.data.formContent); that.formConf = JSON.parse(res.data.formContent);
// this.drawingList = this.formConf.fields; that.drawingList = that.formConf.fields;
this.form = res.data; that.form = res.data;
}) })
}else { }else {
if (formConfInDB) { if (formConfInDB) {
this.formConf = formConfInDB that.formConf = formConfInDB
} }
} }
loadBeautifier(btf => { loadBeautifier(btf => {

Loading…
Cancel
Save