Sfoglia il codice sorgente

添加注释颜色

natasha 5 giorni fa
parent
commit
e1ef3e3f32

+ 11 - 0
src/views/book/courseware/create/components/question/article/Article.vue

@@ -17,6 +17,7 @@
           </div>
           <SvgIcon icon-class="delete-black" size="12" @click="removeFile" />
         </div>
+        <span v-if="data.content" class="tips">说明:需先点击“生成分词”按钮后,再进行文章校对或生成字幕节点</span>
         <div v-if="data.content" class="btn-box">
           <a @click="handleChangeContent">生成分词</a>
           <a @click="checkArticle">文章校对</a>
@@ -340,6 +341,7 @@ export default {
             color: '',
             matchWords: '',
             matchNotes: '',
+            notesColor: '',
             img: [],
             imgPosition: 'after',
           };
@@ -418,6 +420,7 @@ export default {
                   color: '',
                   matchWords: '',
                   matchNotes: '',
+                  notesColor: '',
                   img: [],
                   imgPosition: 'after',
                 };
@@ -487,6 +490,7 @@ export default {
       color,
       matchWords,
       matchNotes,
+      notesColor,
       img,
       imgPosition,
     ) {
@@ -497,6 +501,7 @@ export default {
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].color = color;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].matchWords = matchWords;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].matchNotes = matchNotes;
+      this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].notesColor = notesColor;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].img = img;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].imgPosition = imgPosition;
     },
@@ -817,6 +822,12 @@ export default {
   }
 }
 
+.tips {
+  margin: 0;
+  font-size: 12px;
+  color: #e82d2d;
+}
+
 .tabs-box {
   display: flex;
   column-gap: 12px;

+ 2 - 0
src/views/book/courseware/create/components/question/article/CheckArticle.vue

@@ -240,6 +240,7 @@ export default {
       color,
       matchWords,
       matchNotes,
+      notesColor,
       img,
       imgPosition,
     ) {
@@ -255,6 +256,7 @@ export default {
         color,
         matchWords,
         matchNotes,
+        notesColor,
         img,
         imgPosition,
       );

+ 3 - 0
src/views/book/courseware/create/components/question/article/CheckStyle.vue

@@ -105,6 +105,7 @@
             placeholder="请输入注释表的“内容”"
             @blur="onBlur(itemActive, 'matchNotes')"
           ></el-input>
+          <el-color-picker v-model="itemActive.notesColor"></el-color-picker>
         </div>
         <div class="btn-box">
           <el-button type="info" size="small" @click="cancleDialog">取消</el-button>
@@ -206,6 +207,7 @@ export default {
               color: itemss.color,
               matchWords: itemss.matchWords,
               matchNotes: itemss.matchNotes,
+              notesColor: itemss.notesColor,
               img: itemss.img,
               imgPosition: itemss.imgPosition,
             };
@@ -253,6 +255,7 @@ export default {
         this.itemActive.color,
         this.itemActive.matchWords,
         this.itemActive.matchNotes,
+        this.itemActive.notesColor,
         this.itemActive.img,
         this.itemActive.imgPosition,
       );

+ 5 - 0
src/views/book/courseware/create/components/question/dialogue_article/Article.vue

@@ -141,6 +141,7 @@
           </div>
           <SvgIcon icon-class="delete-black" size="12" @click="removeFile" />
         </div>
+        <span class="tips">说明:需先点击“生成分词”按钮后,再进行文章校对或生成字幕节点</span>
         <div v-if="data.detail.length > 0" class="btn-box">
           <a @click="handleChangeContent">生成分词</a>
           <a @click="checkArticle">文章校对</a>
@@ -706,6 +707,7 @@ export default {
             color: '',
             matchWords: '',
             matchNotes: '',
+            notesColor: '',
             img: [],
             imgPosition: 'after',
           };
@@ -781,6 +783,7 @@ export default {
                   color: '',
                   matchWords: '',
                   matchNotes: '',
+                  notesColor: '',
                   img: [],
                   imgPosition: 'after',
                 };
@@ -836,6 +839,7 @@ export default {
       color,
       matchWords,
       matchNotes,
+      notesColor,
       img,
       imgPosition,
     ) {
@@ -846,6 +850,7 @@ export default {
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].color = color;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].matchWords = matchWords;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].matchNotes = matchNotes;
+      this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].notesColor = notesColor;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].img = img;
       this.data.detail[paraIndex].wordsList[sentenceIndex][wordIndex].imgPosition = imgPosition;
     },

+ 1 - 0
src/views/book/courseware/create/components/question/image_text/CheckStyle.vue

@@ -160,6 +160,7 @@ export default {
               color: itemss.color,
               matchWords: itemss.matchWords,
               matchNotes: itemss.matchNotes,
+              notesColor: itemss.notesColor,
               img: itemss.img,
               imgPosition: itemss.imgPosition,
             };

+ 13 - 4
src/views/book/courseware/preview/components/article/NormalModelChs.vue

@@ -202,7 +202,9 @@
                                       curTime < item.timeList[pItem.sentIndex].ed &&
                                       attrib
                                         ? attrib.topic_color
-                                        : pItem.config.color,
+                                        : pItem.notesColor
+                                          ? pItem.notesColor
+                                          : pItem.config.color,
                                   }"
                                   @click.stop="
                                     viewNotes(
@@ -335,7 +337,9 @@
                                   curTime <= item.timeList[pItem.sentIndex].ed &&
                                   attrib
                                     ? attrib.topic_color
-                                    : item.wordsList[pIndex + 1].config.color,
+                                    : item.wordsList[pIndex + 1].notesColor
+                                      ? item.wordsList[pIndex + 1].notesColor
+                                      : item.wordsList[pIndex + 1].config.color,
                               }"
                               @click.stop="
                                 viewNotes(
@@ -477,7 +481,9 @@
                                   curTime <= item.timeList[pItem.sentIndex].ed &&
                                   attrib
                                     ? attrib.topic_color
-                                    : item.wordsList[pIndex + 2].config.color,
+                                    : item.wordsList[pIndex + 2].notesColor
+                                      ? item.wordsList[pIndex + 2].notesColor
+                                      : item.wordsList[pIndex + 2].config.color,
                               }"
                               @click.stop="
                                 viewNotes(
@@ -619,7 +625,9 @@
                                     curTime < item.timeList[pItem.sentIndex].ed &&
                                     attrib
                                       ? attrib.topic_color
-                                      : pItem.config.color,
+                                      : pItem.notesColor
+                                        ? pItem.notesColor
+                                        : pItem.config.color,
                                 }"
                                 @click.stop="
                                   viewNotes(
@@ -1548,6 +1556,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 22 - 8
src/views/book/courseware/preview/components/article/PhraseModelChs.vue

@@ -154,7 +154,9 @@
                                     ? attrib
                                       ? attrib.topic_color
                                       : pItem.config.color
-                                    : pItem.config.color,
+                                    : pItem.notesColor
+                                      ? pItem.notesColor
+                                      : pItem.config.color,
                               }"
                               ><span
                                 v-for="(wItem, wIndex) in pItem.leg"
@@ -175,7 +177,9 @@
                                     curTime < item.timeList[pItem.sentIndex].ed &&
                                     attrib
                                       ? attrib.topic_color
-                                      : pItem.config.color,
+                                      : pItem.notesColor
+                                        ? pItem.notesColor
+                                        : pItem.config.color,
                                 }"
                                 @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs, pItem)"
                                 >{{ convertText(pItem.chs[wIndex]) }}</span
@@ -236,7 +240,9 @@
                                 textDecoration: item.wordsList[pIndex + 1].config.textDecoration,
                                 borderBottom: item.wordsList[pIndex + 1].config.border === 'dotted' ? '1px dotted' : '',
                                 fontWeight: item.wordsList[pIndex + 1].config.fontWeight,
-                                color: item.wordsList[pIndex + 1].config.color,
+                                color: item.wordsList[pIndex + 1].notesColor
+                                  ? item.wordsList[pIndex + 1].notesColor
+                                  : item.wordsList[pIndex + 1].config.color,
                                 height:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
@@ -330,7 +336,9 @@
                                 textDecoration: item.wordsList[pIndex + 2].config.textDecoration,
                                 borderBottom: item.wordsList[pIndex + 2].config.border === 'dotted' ? '1px dotted' : '',
                                 fontWeight: item.wordsList[pIndex + 2].config.fontWeight,
-                                color: item.wordsList[pIndex + 2].config.color,
+                                color: item.wordsList[pIndex + 2].notesColor
+                                  ? item.wordsList[pIndex + 2].notesColor
+                                  : item.wordsList[pIndex + 2].config.color,
                                 height:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
@@ -425,7 +433,9 @@
                                   ? attrib
                                     ? attrib.topic_color
                                     : pItem.config.color
-                                  : pItem.config.color,
+                                  : pItem.notesColor
+                                    ? pItem.notesColor
+                                    : pItem.config.color,
                             }"
                             ><span
                               v-for="(wItem, wIndex) in pItem.leg"
@@ -446,7 +456,9 @@
                                   curTime < item.timeList[pItem.sentIndex].ed &&
                                   attrib
                                     ? attrib.topic_color
-                                    : pItem.config.color,
+                                    : pItem.notesColor
+                                      ? pItem.notesColor
+                                      : pItem.config.color,
                               }"
                               @click.stop="viewNotes($event, pItem.chs[wIndex], pItem.chs, pItem)"
                               >{{ convertText(pItem.chs[wIndex]) }}</span
@@ -603,7 +615,7 @@
                                   textDecoration: pItem.config.textDecoration,
                                   borderBottom: pItem.config.border === 'dotted' ? '1px dotted' : '',
                                   fontWeight: pItem.config.fontWeight,
-                                  color: pItem.config.color,
+                                  color: pItem.notesColor ? pItem.notesColor : pItem.config.color,
                                   height:
                                     attrib && attrib.font_size
                                       ? attrib.font_size.replace('pt', '') * 1.4 + 'pt'
@@ -848,7 +860,7 @@
                                 textDecoration: pItem.config.textDecoration,
                                 borderBottom: pItem.config.border === 'dotted' ? '1px dotted' : '',
                                 fontWeight: pItem.config.fontWeight,
-                                color: pItem.config.color,
+                                color: pItem.notesColor ? pItem.notesColor : pItem.config.color,
                                 height:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
@@ -1280,6 +1292,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };
@@ -1349,6 +1362,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/article/Practicechs.vue

@@ -972,6 +972,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/article/WordModelChs.vue

@@ -1135,6 +1135,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/article/index.vue

@@ -593,6 +593,7 @@ export default {
 
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 13 - 4
src/views/book/courseware/preview/components/dialogue_article/NormalModelChs.vue

@@ -203,7 +203,9 @@
                                         curTime < item.timeList[pItem.sentIndex].ed &&
                                         attrib
                                           ? attrib.topic_color
-                                          : pItem.config.color,
+                                          : pItem.notesColor
+                                            ? pItem.notesColor
+                                            : pItem.config.color,
                                       fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                       lineHeight:
                                         attrib && attrib.font_size
@@ -312,7 +314,9 @@
                                     curTime <= item.timeList[pItem.sentIndex].ed &&
                                     attrib
                                       ? attrib.topic_color
-                                      : item.wordsList[pIndex + 1].config.color,
+                                      : item.wordsList[pIndex + 1].notesColor
+                                        ? item.wordsList[pIndex + 1].notesColor
+                                        : item.wordsList[pIndex + 1].config.color,
                                   fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                   lineHeight:
                                     attrib && attrib.font_size
@@ -435,7 +439,9 @@
                                     curTime <= item.timeList[pItem.sentIndex].ed &&
                                     attrib
                                       ? attrib.topic_color
-                                      : item.wordsList[pIndex + 2].config.color,
+                                      : item.wordsList[pIndex + 2].notesColor
+                                        ? item.wordsList[pIndex + 2].notesColor
+                                        : item.wordsList[pIndex + 2].config.color,
                                   fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                   lineHeight:
                                     attrib && attrib.font_size
@@ -561,7 +567,9 @@
                                       curTime <= item.timeList[pItem.sentIndex].ed &&
                                       attrib
                                         ? attrib.topic_color
-                                        : pItem.config.color,
+                                        : pItem.notesColor
+                                          ? pItem.notesColor
+                                          : pItem.config.color,
                                     fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                     lineHeight:
                                       attrib && attrib.font_size
@@ -989,6 +997,7 @@ export default {
 
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 13 - 4
src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue

@@ -168,7 +168,9 @@
                                       ? attrib
                                         ? attrib.topic_color
                                         : pItem.config.color
-                                      : pItem.config.color,
+                                      : pItem.notesColor
+                                        ? pItem.notesColor
+                                        : pItem.config.color,
                                 }"
                                 @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs, pItem)"
                                 >{{ convertText(pItem.chs) }}</span
@@ -241,7 +243,9 @@
                                       ? attrib
                                         ? attrib.topic_color
                                         : item.wordsList[pIndex + 1].config.color
-                                      : item.wordsList[pIndex + 1].config.color,
+                                      : item.wordsList[pIndex + 1].notesColor
+                                        ? item.wordsList[pIndex + 1].notesColor
+                                        : item.wordsList[pIndex + 1].config.color,
                                 }"
                                 @click.stop="
                                   viewNotes(
@@ -343,7 +347,9 @@
                                       ? attrib
                                         ? attrib.topic_color
                                         : item.wordsList[pIndex + 2].config.color
-                                      : item.wordsList[pIndex + 2].config.color,
+                                      : item.wordsList[pIndex + 2].notesColor
+                                        ? item.wordsList[pIndex + 2].notesColor
+                                        : item.wordsList[pIndex + 2].config.color,
                                 }"
                                 @click.stop="
                                   viewNotes(
@@ -423,7 +429,9 @@
                                     ? attrib
                                       ? attrib.topic_color
                                       : pItem.config.color
-                                    : pItem.config.color,
+                                    : pItem.notesColor
+                                      ? pItem.notesColor
+                                      : pItem.config.color,
                               }"
                               @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs, pItem)"
                               >{{ convertText(pItem.chs) }}</span
@@ -873,6 +881,7 @@ export default {
 
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue

@@ -1084,6 +1084,7 @@ export default {
 
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/dialogue_article/WordModelChs.vue

@@ -775,6 +775,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };

+ 1 - 0
src/views/book/courseware/preview/components/dialogue_article/index.vue

@@ -591,6 +591,7 @@ export default {
               },
               matchWords: wItem.matchWords,
               matchNotes: wItem.matchNotes,
+              notesColor: wItem.notesColor,
               img: wItem.img,
               imgPosition: wItem.imgPosition,
             };