Browse Source

ppt优化

SanHQin 3 months ago
parent
commit
86e63efcbc
1 changed files with 12 additions and 6 deletions
  1. 12 6
      src/views/Student/components/choiceQuestionDetailDialog.vue

+ 12 - 6
src/views/Student/components/choiceQuestionDetailDialog.vue

@@ -80,7 +80,7 @@
               <div>{{ item.name }}</div>
             </div>
             <div class="c_t15_c_i_bottom">
-              <span>{{ item.content.answer }}</span>
+              <span v-html="item.content.answer"></span>
             </div>
           </div>
         </div>
@@ -95,7 +95,7 @@
             <div>{{ lookWorkData.name }}</div>
           </div>
           <div class="c_t15_wd_content">
-            <span>{{ lookWorkData.content.answer }}</span>
+            <span v-html="lookWorkData.content.answer"></span>
             <div
               class="c_t15_wd_c_imageList"
               v-if="lookWorkData.content.fileList.length > 0"
@@ -244,6 +244,7 @@ const props = defineProps<{
   slideHeight: number;
   slideIndex: number;
   showData: any;
+  workArray: any[];
 }>()
 
 const emit = defineEmits<{
@@ -270,8 +271,8 @@ const md = new MarkdownIt()
 
 const workArray = computed(() => {
   let _result = []
-  if (props.showData && props.showData.workArray) {
-    const _workArray = JSON.parse(JSON.stringify(props.showData.workArray))
+  if (props.workArray) {
+    const _workArray = JSON.parse(JSON.stringify(props.workArray))
     if ([45, 15].includes(props.showData.toolType)) {
       _workArray.forEach((i: any) => {
         i.content = JSON.parse(decodeURIComponent(i.content))
@@ -588,14 +589,19 @@ watch(
 // 监听作业变化
 watch(
   () => props.showData?.choiceQuestionListData,
-  (newVal) => {
+  (newVal, oldVal) => {
     console.log('choiceQuestionListData变化了')
     if (
       (newVal || newVal === 0) &&
       props.showData.workDetail &&
       props.showData.workDetail.type === '45'
     ) {
-      setEchartsArea1()
+      if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
+        setEchartsArea1()
+      }
+      else {
+        console.log('choiceQuestionListData没有变化')
+      }
     }
     else {
       myChart.value = null