|
@@ -956,7 +956,11 @@ export default {
|
|
|
this.FormNameList = [];
|
|
|
let { mainForm, subFormList } = data;
|
|
|
this.formList = [];
|
|
|
- let showValue = mainForm.showValue[0].resultMap;
|
|
|
+ let showValue = null;
|
|
|
+ if (mainForm.showValue) {
|
|
|
+ showValue = mainForm.showValue[0]?.resultMap;
|
|
|
+ }
|
|
|
+
|
|
|
if (showValue) {
|
|
|
for (const key of Object.keys(showValue)) {
|
|
|
showValue[toUnderline(key)] = showValue[key];
|
|
@@ -973,11 +977,14 @@ export default {
|
|
|
formItem: mainForm.mainFormItem,
|
|
|
relateFormItem: null,
|
|
|
formType: mainForm.showTemplate.spare == "2" ? "batch" : "normal",
|
|
|
- defaultValue: mainForm.showValue[0].resultMap,
|
|
|
+ defaultValue: mainForm.showValue ? mainForm.showValue[0].resultMap : {},
|
|
|
});
|
|
|
if (subFormList && subFormList.length > 0) {
|
|
|
subFormList.forEach((item) => {
|
|
|
- let showValue = item.showValue[0];
|
|
|
+ let showValue = null;
|
|
|
+ if (item.showValue) {
|
|
|
+ showValue = item.showValue[0];
|
|
|
+ }
|
|
|
let defaultValue = {};
|
|
|
if (showValue) {
|
|
|
if (item.showTemplate.spare == "2") {
|