Просмотр исходного кода

1、整体录音条整调整到左下角。
3、禁止标记出现的时机调整。
4、逐字评分的间距先调开,排版上单字总分上下排版;横线隔开声韵母声调评分,声韵母声调和分数左右排版。
5、“评分完成,点分数可查看”改成“详情”两个字。

natasha 3 недель назад
Родитель
Сommit
b66932695c

+ 24 - 9
src/views/book/courseware/preview/common/RecordScoreSingleDetail.vue

@@ -112,10 +112,8 @@
         :style="wordScoreItem(item.score)"
       >
         <p :style="textColor(item.score)">{{ item.hz }}</p>
-        <div class="char-item">
-          <span>{{ item.pinyin }}</span>
-          <b :style="textColor(item.score)">{{ item.score }}</b>
-        </div>
+        <i class="word-pinyin">{{ item.pinyin }}</i>
+        <b class="word-score" :style="textColor(item.score)">{{ item.score }}</b>
         <div class="char-item" v-for="(items, indexs) in item.phoneme_list" :key="indexs">
           <span>{{ items.char }}</span>
           <b :style="textColor(items.score)">{{ items.score }}</b>
@@ -204,7 +202,9 @@ export default {
     wordScoreItem(score) {
       let style = {
         backgroundColor:
-          score >= 80 ? '#e7f4e7' : score <= 79 && score >= 60 ? '#fdf1d6' : score === -1 ? '#f2f3f5' : '#fbe0e0',
+          score >= 80 ? '#EAF6EE' : score <= 79 && score >= 60 ? '#FDF6E3' : score === -1 ? '#f2f3f5' : '#FCEDEC',
+        borderColor:
+          score >= 80 ? '#BFE3CB' : score <= 79 && score >= 60 ? '#F0DCA8' : score === -1 ? '#9aa5b5' : '#F3CBC8',
       };
       return style;
     },
@@ -328,19 +328,20 @@ export default {
   .word-score-box {
     display: flex;
     flex-flow: wrap;
-    gap: 3px;
+    gap: 6px;
 
     .word-score-item {
-      min-width: 40px;
-      padding: 4px 0 3px;
+      min-width: 50px;
+      padding: 4px 3px;
       color: #9aa5b5;
       text-align: center;
       background: #f2f3f5;
+      border: 1px solid #9aa5b5;
       border-radius: 6px;
 
       p {
         margin: 1px 0;
-        font-size: 17px;
+        font-size: 19px;
         font-weight: bold;
         line-height: 1.2;
         color: #2b3544;
@@ -353,6 +354,20 @@ export default {
       b {
         font-size: 13px;
       }
+
+      .word-pinyin {
+        display: block;
+        font-size: 15px;
+        font-style: normal;
+        color: #2b3544;
+      }
+
+      .word-score {
+        display: block;
+        margin-bottom: 3px;
+        font-size: 16px;
+        border-bottom: 1px solid #e9dcdc;
+      }
     }
 
     .char-item {

+ 1 - 1
src/views/book/courseware/preview/common/RecordScoreWholeBtn.vue

@@ -875,7 +875,7 @@ export default {
 
 .whole-record-btn-box {
   position: fixed;
-  bottom: 200px;
+  bottom: 300px;
   left: 0%;
   z-index: 1;
   display: flex;

+ 35 - 12
src/views/book/courseware/preview/common/RecordScoreWholeDetail.vue

@@ -130,10 +130,9 @@
             :style="wordScoreItem(item.score)"
           >
             <p :style="textColor(item.score)">{{ item.hz }}</p>
-            <div class="char-item">
-              <span>{{ item.pinyin }}</span>
-              <b :style="textColor(item.score)">{{ item.score }}</b>
-            </div>
+            <i class="word-pinyin">{{ item.pinyin }}</i>
+            <b class="word-score" :style="textColor(item.score)">{{ item.score }}</b>
+
             <div class="char-item" v-for="(items, indexs) in item.phoneme_list" :key="indexs">
               <span>{{ items.char }}</span>
               <b :style="textColor(items.score)">{{ items.score }}</b>
@@ -209,7 +208,6 @@ export default {
   computed: {},
 
   created() {
-    console.log(this.recordScoreDetail);
     let n = 0,
       score_total = 0,
       accuracy = 0,
@@ -254,12 +252,22 @@ export default {
           score === undefined
             ? '#f2f3f5'
             : score >= 80
-              ? '#e7f4e7'
+              ? '#EAF6EE'
               : score <= 79 && score >= 60
-                ? '#fdf1d6'
+                ? '#FDF6E3'
                 : score === -1
                   ? '#f2f3f5'
-                  : '#fbe0e0',
+                  : '#FCEDEC',
+        borderColor:
+          score === undefined
+            ? '#9aa5b5'
+            : score >= 80
+              ? '#BFE3CB'
+              : score <= 79 && score >= 60
+                ? '#F0DCA8'
+                : score === -1
+                  ? '#9aa5b5'
+                  : '#F3CBC8',
       };
       return style;
     },
@@ -384,19 +392,20 @@ export default {
   .word-score-box {
     display: flex;
     flex-flow: wrap;
-    gap: 3px;
+    gap: 6px;
 
     .word-score-item {
-      min-width: 40px;
-      padding: 4px 0 3px;
+      min-width: 50px;
+      padding: 4px 3px;
       color: #9aa5b5;
       text-align: center;
       background: #f2f3f5;
+      border: 1px solid #9aa5b5;
       border-radius: 6px;
 
       p {
         margin: 1px 0;
-        font-size: 17px;
+        font-size: 19px;
         font-weight: bold;
         line-height: 1.2;
         color: #2b3544;
@@ -409,6 +418,20 @@ export default {
       b {
         font-size: 13px;
       }
+
+      .word-pinyin {
+        display: block;
+        font-size: 15px;
+        font-style: normal;
+        color: #2b3544;
+      }
+
+      .word-score {
+        display: block;
+        margin-bottom: 3px;
+        font-size: 16px;
+        border-bottom: 1px solid #e9dcdc;
+      }
     }
 
     .char-item {

+ 16 - 3
src/views/book/courseware/preview/components/article/Practicechs.vue

@@ -856,7 +856,7 @@
                   ></span>
                 </template>
               </div>
-              <template v-if="wholeRecordList[wholeRecordIndex]">
+              <template v-if="wholeRecordList[wholeRecordIndex] && whileRecordScoreList[wholeRecordIndex]">
                 <a
                   v-if="
                     wholeRecordList[wholeRecordIndex][index] && wholeRecordList[wholeRecordIndex][index].detail_list
@@ -965,7 +965,14 @@
                     "
                     >{{ curQue.Bookanswer.practiceModel[index].scoreList[selectIndex].score_total }}分</span
                   >
-                  <b class="record-score-tips">评分完成,点分数可查看</b>
+                  <b
+                    class="record-score-tips"
+                    @click="
+                      recordScoreDetail = curQue.Bookanswer.practiceModel[index].scoreList[selectIndex];
+                      visibleRecordSingle = true;
+                    "
+                    >详情</b
+                  >
                 </template>
               </div>
               <span class="full-screen-icon" @click="fullScreen">
@@ -1005,7 +1012,7 @@
         </div>
       </template>
       <div
-        style="display: flex; justify-content: end"
+        style="display: flex; padding-left: 24px"
         v-if="!(curQue.property.is_enable_score && curQue.property.is_enable_score === 'false')"
       >
         <RecordScoreWholeBtn
@@ -1188,6 +1195,7 @@ export default {
       isWholeRecord: false, // 是否为全篇录音
       wholeRecordList: [], // 保存多次整篇录音数据
       wholeRecordIndex: 0, // 整偏录音索引
+      whileRecordScoreList: [], // 保存多次整篇录音每次是否已评分
     };
   },
   computed: {
@@ -1696,11 +1704,15 @@ export default {
     handleDeleteWholeRecord(index) {
       this.wholeRecordList.splice(index, 1);
       this.wholeRecordIndex = this.wholeRecordList.length - 1;
+      this.whileRecordScoreList.splice(index, 1);
     },
     // 更新全篇录音评分数据
     updataWholeRecordList(list) {
       if (list) {
         this.wholeRecordList.push(list);
+        this.whileRecordScoreList.push(false);
+      } else {
+        this.whileRecordScoreList[this.wholeRecordIndex] = true;
       }
       this.$forceUpdate();
     },
@@ -1994,6 +2006,7 @@ export default {
     margin-left: 8px;
     font-size: 12px;
     color: #2f9e78;
+    cursor: pointer;
   }
 }