Browse Source

fix: 流程优化

liuc 3 months ago
parent
commit
c14cf649e6
1 changed files with 4 additions and 7 deletions
  1. 4 7
      src/views/flow/stFormWork/formWork.vue

+ 4 - 7
src/views/flow/stFormWork/formWork.vue

@@ -745,14 +745,11 @@ const setValue = (field, value) => {
 
   if (typeof field == 'string') {
     const fieldMapValue = fieldMap.value[field]
-    if (!fieldMapValue) {
-      console.error("没有找到字段编号:" + field)
-    }
-    if (value && fieldMapValue.type == "MULTI" && typeof value == 'string') {
+    if (fieldMapValue && value && fieldMapValue.type == "MULTI" && typeof value == 'string') {
       formData[field] = JSON.parse(value);
-    } else if (value && (fieldMapValue.type == "INTEGER" || fieldMapValue.type == "DECIMAL") && typeof value != 'string') {
+    } else if (fieldMapValue && value && (fieldMapValue.type == "INTEGER" || fieldMapValue.type == "DECIMAL") && typeof value != 'string') {
       formData[field] = value.toString();
-    } else if (value && fieldMapValue.type == "DATETIME" && typeof value != 'string') {
+    } else if (fieldMapValue && value && fieldMapValue.type == "DATETIME" && typeof value != 'string') {
       formData[field] = value.toString();
     } else {
       formData[field] = value;
@@ -1086,7 +1083,7 @@ const handleSave = () => {
           saveService();
         },
         (err) => {
-          console.log(err);
+          console.error(err);
         }
     );
   } catch (e) {