Browse Source

nnpe 增加答案

dusenyao 3 years ago
parent
commit
6130b3e9e0

File diff suppressed because it is too large
+ 13 - 22717
package-lock.json


+ 17 - 17
package.json

@@ -16,9 +16,9 @@
     "ailp-book-question-ui": "file:../ailp-book-question-ui-0.1.1.tgz",
     "awe-dnd": "^0.3.4",
     "axios": "^0.26.1",
-    "book-ui": "file:../book-ui-0.2.27.tgz",
+    "book-ui": "file:../book-ui-0.2.33.tgz",
     "core-js": "^3.21.1",
-    "dayjs": "^1.10.8",
+    "dayjs": "^1.11.0",
     "element-ui": "^2.15.6",
     "gcls-book-question-ui": "file:../gcls-book-question-ui-0.1.0.tgz",
     "jquery": "^3.6.0",
@@ -27,43 +27,43 @@
     "normalize.css": "^8.0.1",
     "nprogress": "^0.2.0",
     "vue": "^2.6.14",
-    "vue-i18n": "^8.27.0",
+    "vue-i18n": "^8.27.1",
     "vue-pdf": "^4.3.0",
     "vue-router": "^3.5.3",
     "vue-video-player": "^5.0.2",
     "vuex": "^3.6.2"
   },
   "devDependencies": {
-    "@babel/core": "^7.17.5",
+    "@babel/core": "^7.17.8",
     "@babel/eslint-parser": "^7.17.0",
     "@babel/preset-env": "^7.16.11",
-    "@rushstack/eslint-patch": "^1.1.0",
-    "@vue/cli-plugin-babel": "~4.5.15",
-    "@vue/cli-plugin-eslint": "~4.5.15",
-    "@vue/cli-plugin-router": "~4.5.15",
-    "@vue/cli-plugin-unit-jest": "^4.5.15",
-    "@vue/cli-plugin-vuex": "~4.5.15",
-    "@vue/cli-service": "~4.5.15",
+    "@rushstack/eslint-patch": "^1.1.1",
+    "@vue/cli-plugin-babel": "~4.5.17",
+    "@vue/cli-plugin-eslint": "~4.5.17",
+    "@vue/cli-plugin-router": "~4.5.17",
+    "@vue/cli-plugin-unit-jest": "^4.5.17",
+    "@vue/cli-plugin-vuex": "~4.5.17",
+    "@vue/cli-service": "~4.5.17",
     "@vue/eslint-config-prettier": "^7.0.0",
     "@vue/test-utils": "^1.3.0",
     "babel-jest": "^27.5.1",
-    "babel-loader": "^8.2.3",
+    "babel-loader": "^8.2.4",
     "babel-plugin-dynamic-import-node": "^2.3.3",
     "compression-webpack-plugin": "^6.1.1",
     "eslint": "^7.32.0",
     "eslint-plugin-prettier": "^4.0.0",
     "eslint-plugin-vue": "^8.5.0",
     "html-webpack-plugin": "^5.3.1",
-    "postcss": "^8.4.8",
+    "postcss": "^8.4.12",
     "postcss-html": "^1.3.0",
-    "prettier": "2.5.1",
-    "sass": "^1.49.9",
+    "prettier": "2.6.1",
+    "sass": "^1.49.10",
     "sass-loader": "^10.2.1",
     "script-ext-html-webpack-plugin": "^2.1.5",
-    "stylelint": "14.5.3",
+    "stylelint": "14.6.1",
     "stylelint-config-prettier": "^9.0.3",
     "stylelint-config-recess-order": "^3.0.0",
-    "stylelint-config-recommended-vue": "^1.3.0",
+    "stylelint-config-recommended-vue": "^1.4.0",
     "stylelint-config-standard-scss": "^3.0.0",
     "stylelint-declaration-block-no-ignored-properties": "^2.5.0",
     "stylelint-webpack-plugin": "^3.1.0",

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

@@ -37,7 +37,15 @@
       />
     </template>
     <template v-if="category == 'NNPE'">
-      <booknnpe v-if="context" :context="context" :theme-color="themeColor" />
+      <booknnpe
+        v-if="context"
+        :context="context"
+        :theme-color="themeColor"
+        task-model="ANSWER"
+        :is-show-title="true"
+        :is-show-save="false"
+        :book-answer-content="bookAnswerContent"
+      />
     </template>
 
     <div slot="footer" />

+ 11 - 3
src/components/course/FinishCourseware.vue

@@ -31,12 +31,20 @@
         task-model=""
         :context="context"
         :theme-color="themeColor"
-        @finishTaskMaterial="saveNPCAnswer"
+        @finishTaskMaterial="finishMyTaskMaterial_Student"
       />
     </template>
 
     <template v-if="category == 'NNPE'">
-      <booknnpe v-if="context" :context="context" :theme-color="themeColor" />
+      <booknnpe
+        v-if="context"
+        :context="context"
+        :theme-color="themeColor"
+        :is-show-title="true"
+        task-model=""
+        :is-show-save="true"
+        @finishTaskMaterial="finishMyTaskMaterial_Student"
+      />
     </template>
 
     <div v-if="category !== 'NPC'" slot="footer">
@@ -126,7 +134,7 @@ export default {
     }
   },
   methods: {
-    saveNPCAnswer(content, duration) {
+    finishMyTaskMaterial_Student(content, duration) {
       const loading = this.$loading();
       FinishMyTaskMaterial_Student({
         task_id: this.id,

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

@@ -62,7 +62,16 @@
         />
       </template>
       <template v-if="category == 'NNPE'">
-        <booknnpe v-if="context" :context="context" :theme-color="themeColor" />
+        <booknnpe
+          v-if="context"
+          :context="context"
+          :theme-color="themeColor"
+          :task-model="isFinished ? 'ANSWER' : ''"
+          :is-show-save="!isFinished"
+          :is-show-title="true"
+          :book-answer-content="bookAnswerContent"
+          @finishTaskMaterial="saveNPCAnswer"
+        />
       </template>
     </template>
 

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

@@ -32,7 +32,14 @@
         </template>
 
         <template v-if="category == 'NNPE'">
-          <booknnpe v-if="context" :context="context" :theme-color="themeColor" />
+          <booknnpe
+            v-if="context"
+            :context="context"
+            :theme-color="themeColor"
+            task-model=""
+            :is-show-save="false"
+            :is-show-title="true"
+          />
         </template>
       </div>
     </div>

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

@@ -76,7 +76,15 @@
           />
         </template>
         <template v-if="category == 'NNPE'">
-          <booknnpe v-if="context" :context="context" :theme-color="themeColor" />
+          <booknnpe
+            v-if="context"
+            :context="context"
+            :theme-color="themeColor"
+            :is-show-title="true"
+            task-model="ANSWER"
+            :is-show-save="false"
+            :book-answer-content="bookAnswerContent"
+          />
         </template>
       </template>
       <template v-else>

+ 9 - 2
src/views/task_details/ShowCourseware.vue

@@ -17,10 +17,17 @@
         />
       </template>
       <template v-else-if="category === 'NPC'">
-        <booknpc v-if="context" :is-show-save="false" :context="context" :theme-color="themeColor" />
+        <booknpc v-if="context" task-model="" :is-show-save="false" :context="context" :theme-color="themeColor" />
       </template>
       <template v-if="category == 'NNPE'">
-        <booknnpe v-if="context" :context="context" :theme-color="themeColor" />
+        <booknnpe
+          v-if="context"
+          :context="context"
+          task-model=""
+          :theme-color="themeColor"
+          :is-show-title="true"
+          :is-show-save="false"
+        />
       </template>
     </div>
   </div>

Some files were not shown because too many files changed in this diff