Quellcode durchsuchen

feature_20250926_数字题型&单行文本题型

sunny vor 3 Wochen
Ursprung
Commit
13296d5792
1 geänderte Dateien mit 12 neuen und 9 gelöschten Zeilen
  1. 12 9
      src/views/deviceWithin/addStoreVisit.vue

+ 12 - 9
src/views/deviceWithin/addStoreVisit.vue

@@ -5642,15 +5642,18 @@ export default {
     traverseCollectionItems(items) {
       // 处理一层子项(如果有)
       if (items.collectionOptionList && items.collectionOptionList.length > 0) {
-        items.collectionOptionList.forEach((item) => {
-          // 处理二层子项(如果有)
-          if (item.collectionItems && item.collectionItems.length > 0) {
-            item.collectionItems.forEach((option) => {
-              this.filterCollectionInfos(option);
-              this.traverseCollectionItems(option);
-            });
-          }
-        });
+        if(items.answerValue == items.collectionOptionList[0].collectionOptionId ){
+          items.collectionOptionList.forEach((item) => {
+            // 处理二层子项(如果有)
+            if (item.collectionItems && item.collectionItems.length > 0) {
+              item.collectionItems.forEach((option) => {
+                this.filterCollectionInfos(option);
+                this.traverseCollectionItems(option);
+              });
+            }
+          });
+        }
+        
       }
     },
     onSubmit() {