Przeglądaj źródła

fix: 子表赋值删除报错问题修复

johnsen 7 miesięcy temu
rodzic
commit
bdfe0fcf96
1 zmienionych plików z 8 dodań i 8 usunięć
  1. 8 8
      src/business/platform/form/utils/formUtil.js

+ 8 - 8
src/business/platform/form/utils/formUtil.js

@@ -594,7 +594,7 @@ const FormUtil = {
             .then((response) => {
               result = response.data
             })
-            .catch(() => {})
+            .catch(() => { })
         }
       } else if (
         fieldType === 'currentUser' ||
@@ -761,7 +761,7 @@ const FormUtil = {
           this.CACHE_DYNAMIC_VALUE[value] = data
           resolve(data)
         })
-        .catch(() => {})
+        .catch(() => { })
     })
   },
   setResponseLinkages: function (responseLinkages, model, code) {
@@ -964,11 +964,11 @@ const FormUtil = {
         format:
           field.field_type === 'editor'
             ? (v) => {
-                let content = v.replace(/<\/?[^>]*>/g, '') // 去除HTML Tag
-                content = content.replace(/[|]*\n/, '') // 去除行尾空格
-                content = content.replace(/&npsp;/gi, '') // 去掉npsp
-                return content
-              }
+              let content = v.replace(/<\/?[^>]*>/g, '') // 去除HTML Tag
+              content = content.replace(/[|]*\n/, '') // 去除行尾空格
+              content = content.replace(/&npsp;/gi, '') // 去掉npsp
+              return content
+            }
             : false,
         min: fieldOptions['is_min_length'] ? fieldOptions['min_length'] : null,
         max: fieldOptions['is_max_length'] ? fieldOptions['max_length'] : null
@@ -1164,7 +1164,7 @@ const FormUtil = {
                   : data[changeName] || ''
             } else {
               // val = (data[changeName] || '')
-              val = data[code][row][changeName]
+              val = data[code][row] ? data[code][row][changeName] : ''
             }
           } else {
             // 弹窗模式