|
|
@ -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 => {
|
|
|
|