dusenyao 10 месяцев назад
Родитель
Сommit
6c704ba63e

+ 1 - 1
package.json

@@ -16,7 +16,7 @@
     "@tinymce/tinymce-vue": "^3.2.8",
     "awe-dnd": "^0.3.4",
     "axios": "^1.6.8",
-    "book-ui": "file:../book-ui-0.3.92.tgz",
+    "book-ui": "file:../book-ui-0.3.93.tgz",
     "core-js": "^3.36.1",
     "dayjs": "^1.11.10",
     "element-ui": "^2.15.14",

+ 9 - 1
src/components/course/CompletionView.vue

@@ -62,7 +62,15 @@
       />
     </template>
     <template v-if="category === 'NEW'">
-      <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="curCoursewareId" />
+      <BookNew
+        v-if="context"
+        ref="book"
+        :context="context"
+        :current-tree-i-d="curCoursewareId"
+        :is-show-save="false"
+        task-model="ANSWER"
+        :book-answer-content="bookAnswerContent"
+      />
     </template>
 
     <div slot="footer"></div>

+ 10 - 2
src/components/course/FinishCourseware.vue

@@ -57,7 +57,15 @@
       />
     </template>
     <template v-if="category === 'NEW'">
-      <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="coursewareId" />
+      <BookNew
+        v-if="context"
+        ref="book"
+        :context="context"
+        :current-tree-i-d="coursewareId"
+        :is-show-save="true"
+        task-model=""
+        @finishTaskMaterial="finishMyTaskMaterial_Student"
+      />
     </template>
 
     <div v-if="category !== 'NPC' && category !== 'NNPE' && category !== 'RLC' && category !== 'NEW'" slot="footer">
@@ -152,7 +160,7 @@ export default {
     }
   },
   methods: {
-    finishMyTaskMaterial_Student(content, duration) {
+    finishMyTaskMaterial_Student(content, duration = 0) {
       const loading = this.$loading();
       FinishMyTaskMaterial_Student({
         task_id: this.id,

+ 10 - 1
src/components/live/CurMaterial.vue

@@ -86,7 +86,16 @@
       </template>
 
       <template v-if="category === 'NEW'">
-        <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="material_id" />
+        <BookNew
+          v-if="context"
+          ref="book"
+          :context="context"
+          :current-tree-i-d="material_id"
+          :is-show-save="!isFinished"
+          :book-answer-content="bookAnswerContent"
+          :task-model="isFinished ? 'ANSWER' : ''"
+          @finishTaskMaterial="saveNPCAnswer"
+        />
       </template>
     </template>
 

+ 1 - 1
src/components/preview/PreviewCourse.vue

@@ -45,7 +45,7 @@
         />
       </template>
       <template v-if="category === 'NEW'">
-        <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="fileId" />
+        <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="fileId" :is-show-save="false" />
       </template>
     </template>
 

+ 1 - 1
src/components/select/SelectCourse.vue

@@ -66,7 +66,7 @@
         </template>
 
         <template v-if="category === 'NEW'">
-          <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="courseID" />
+          <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="courseID" :is-show-save="false" />
         </template>
       </div>
     </div>

+ 9 - 1
src/views/live/teacher/CompleteList.vue

@@ -97,7 +97,15 @@
           />
         </template>
         <template v-if="category === 'NEW'">
-          <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="material_id" />
+          <BookNew
+            v-if="context"
+            ref="book"
+            :context="context"
+            :current-tree-i-d="material_id"
+            task-model="ANSWER"
+            :is-show-save="false"
+            :book-answer-content="bookAnswerContent"
+          />
         </template>
       </template>
       <template v-else>

+ 9 - 1
src/views/new_live/teacher/components/CompleteList.vue

@@ -97,7 +97,15 @@
           />
         </template>
         <template v-if="category === 'NEW'">
-          <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="material_id" />
+          <BookNew
+            v-if="context"
+            ref="book"
+            :context="context"
+            :current-tree-i-d="material_id"
+            task-model="ANSWER"
+            :is-show-save="false"
+            :book-answer-content="bookAnswerContent"
+          />
         </template>
       </template>
       <template v-else>

+ 9 - 1
src/views/new_task_view/components/common/CoursewareView.vue

@@ -53,7 +53,15 @@
       />
     </template>
     <template v-if="category === 'NEW'">
-      <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="coursewareData.courseware_id" />
+      <BookNew
+        v-if="context"
+        ref="book"
+        :context="context"
+        :current-tree-i-d="coursewareData.courseware_id"
+        :is-show-save="false"
+        :task-model="isFinished ? 'ANSWER' : ''"
+        @finishTaskMaterial="saveNPCAnswer"
+      />
     </template>
   </div>
 </template>

+ 8 - 1
src/views/task_details/ShowCourseware.vue

@@ -46,7 +46,14 @@
         />
       </template>
       <template v-if="category === 'NEW'">
-        <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="coursewareId" />
+        <BookNew
+          v-if="context"
+          ref="book"
+          :context="context"
+          :current-tree-i-d="coursewareId"
+          task-model=""
+          :is-show-save="false"
+        />
       </template>
     </div>
   </div>

+ 8 - 1
src/views/teacher/create_course/step_three/components/preview/task_preview/components/CoursewareView.vue

@@ -45,7 +45,14 @@
         :is-show-title="false"
       />
       <template v-if="category === 'NEW'">
-        <BookNew v-if="context" ref="book" :context="context" :current-tree-i-d="coursewareId" />
+        <BookNew
+          v-if="context"
+          ref="book"
+          :context="context"
+          :current-tree-i-d="coursewareId"
+          task-model=""
+          :is-show-save="false"
+        />
       </template>
     </template>
   </div>