Browse Source

图片和句子组件显示Standard answer

liuhaidi123 20 hours ago
parent
commit
84bdbb28a0
1 changed files with 14 additions and 3 deletions
  1. 14 3
      src/components/Adult/Preview.vue

+ 14 - 3
src/components/Adult/Preview.vue

@@ -3017,9 +3017,20 @@ export default {
             });
             _this.$set(item, "table_list_phone", table_list_phone);
           }
-          item.ShowstandardAnswer = Boolean(
-            JSON.stringify(item.table_list).match(/\[JUDGE##F##JUDGE\]/g)
-          );
+          let hasSentenceInput = false;
+          item.table_list.forEach(items => {
+            items.forEach(itemss => {
+              if (itemss.data && itemss.type) {
+                if (itemss.type === "sentence_input_chs") {
+                  hasSentenceInput = true;
+                }
+              }
+            });
+          });
+          item.ShowstandardAnswer =
+            Boolean(
+              JSON.stringify(item.table_list).match(/\[JUDGE##F##JUDGE\]/g)
+            ) || hasSentenceInput;
         });
       }
       this.$forceUpdate();