Quellcode durchsuchen

Merge branch 'NPC-lhd'

natasha vor 3 Jahren
Ursprung
Commit
12c8cab9ed

BIN
src/assets/NPC/selectYinjie-active.png


BIN
src/assets/NPC/selectYinjie-hover.png


+ 1 - 1
src/components/Adult/Preview.vue

@@ -613,11 +613,11 @@ export default {
     },
     initContextData() {
       const _this = this;
-      console.log(_this.context);
       _this.contextData = JSON.parse(JSON.stringify(_this.context));
       _this.queIndex = 0;
       _this.NNPENewWordList = [];
       _this.NNPENewPhraseList = [];
+      _this.NNPEAnnotationList =[]
       _this.watchIndex = _this.queIndex + new Date().getTime();
       if (_this.contextData) {
         // const list = _this.contextData;

+ 16 - 7
src/components/Adult/preview/SelectTone.vue

@@ -12,6 +12,8 @@
         :mp3="curQue.mp3_list[0].url"
         :getCurTime="getCurTime"
         :themeColor="themeColor"
+        :ed="ed"
+        type="audioLine"
         ref="audioLine"
         @handleListenRead="handleListenRead"
       />
@@ -68,6 +70,7 @@ export default {
       curTime: "",
       stopAudio: false,
       timer: null,
+      ed: null,
     };
   },
   computed: {},
@@ -87,16 +90,19 @@ export default {
     },
     handleChangeTime(time,edTime) {
       let _this = this;
+    //   if(!_this.stopAudio){
+    //       _this.timer = setInterval(() => {
+    //         if(_this.curTime >= edTime){
+    //             _this.stopAudio = false
+    //             _this.$refs.audioLine.onTimeupdateTime(_this.curTime / 1000, false);
+    //             clearInterval(_this.timer);
+    //         }
+    //     }, 200);
+    //   }
       _this.curTime = time;
       _this.stopAudio = true
       _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
-      _this.timer = setInterval(() => {
-          if(_this.curTime >= edTime){
-              _this.stopAudio = false
-              _this.$refs.audioLine.onTimeupdateTime(_this.curTime / 1000, false);
-              clearInterval(_this.timer);
-          }
-      }, 200);
+      _this.ed = edTime
     },
     getCurTime(curTime) {
       this.curTime = curTime * 1000;
@@ -107,6 +113,9 @@ export default {
           clearInterval(this.timer);
       }
     },
+    emptyEd(){
+        this.ed = null;
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {

+ 11 - 17
src/components/Adult/preview/SelectYinjie.vue

@@ -50,7 +50,8 @@ export default {
       if (this.userList[index].indexOf(indexs) > -1) {
         this.userList[index].splice(this.userList[index].indexOf(indexs), 1);
       } else {
-        this.userList[index].push(indexs);
+        // this.userList[index].push(indexs);
+        this.$set(this.userList, index, [indexs]);
       }
     },
     handleClear(index) {
@@ -121,9 +122,16 @@ export default {
         text-align: center;
         cursor: pointer;
         font-family: "GB-PINYINOK-B";
+        overflow: hidden;
+        &:hover{
+            background: rgba(0, 0, 0, 0.05) url('../../../assets/NPC/selectYinjie-hover.png') right bottom no-repeat;
+            background-size: 11px;
+            border: 1px solid rgba(0, 0, 0, 0.1);
+        }
         &.active {
-          background: #de4444;
-          color: #ffffff;
+          background: rgba(0, 188, 75, 0.05) url('../../../assets/NPC/selectYinjie-active.png') right bottom no-repeat;
+          background-size: 11px;
+          border: 1px solid #00BC4B;
         }
       }
     }
@@ -147,13 +155,6 @@ export default {
       b {
         background: #24b99e;
       }
-      .zijie-box {
-        p {
-          &.active {
-            background: #24b99e;
-          }
-        }
-      }
     }
   }
 }
@@ -163,13 +164,6 @@ export default {
       b {
         background: #bd8865;
       }
-      .zijie-box {
-        p {
-          &.active {
-            background: #bd8865;
-          }
-        }
-      }
     }
   }
 }

+ 13 - 6
src/components/Adult/preview/SentenceInput.vue

@@ -89,17 +89,17 @@
                 :key="conIndex + 'con'"
               >
                 <template v-if="items.detail.pyPosition == 'top'">
-                  <div
+                  <!-- <div
                     v-if="conent.pinyin == '__'"
                     contenteditable="true"
                     class="input pinyin"
                     v-html="answerList[indexs].pinyin"
                     @change="changeAnswerList($event, indexs, 'pinyin')"
-                  ></div>
+                  ></div> -->
                   <!-- 
                     v-model="answerList[indexs].pinyin"
                    -->
-                  <p class="pinyin" v-else>
+                  <p class="pinyin" v-if="conent.pinyin != '__'">
                     {{ conent.pinyin }}
                   </p>
                 </template>
@@ -109,6 +109,9 @@
                     class="input chs"
                     v-html="answerList[indexs].chs"
                     @change="changeAnswerList($event, indexs, 'chs')"
+                    @copy.native.capture.prevent="handleFalse"
+                    @paste.native.capture.prevent="handleFalse"
+                    @cut.native.capture.prevent="handleFalse"
                   ></div>
                 </template>
                 <template v-else>
@@ -120,14 +123,14 @@
                 <template
                   v-if="items.detail.pyPosition == 'bottom' && conent.pinyin"
                 >
-                  <div
+                  <!-- <div
                     v-if="conent.pinyin == '__'"
                     contenteditable="true"
                     class="input pinyin"
                     v-html="answerList[indexs].pinyin"
                     @change="changeAnswerList($event, indexs, 'pinyin')"
-                  ></div>
-                  <p class="pinyin" v-else>
+                  ></div> -->
+                  <p class="pinyin" v-if="conent.pinyin != '__'">
                     {{ conent.pinyin }}
                   </p>
                 </template>
@@ -290,8 +293,12 @@ export default {
         this.answerList[index].pinyin += e.target.innerHTML;
       } else {
         this.answerList[index].chs += e.target.innerHTML;
+        console.log(e.target.innerHTML)
       }
     },
+    handleFalse(){
+        return false;
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {

+ 2 - 2
src/components/Adult/preview/components/Practice.vue

@@ -83,7 +83,7 @@
                   <Strockred
                     :Book_text="cur.stem[0].con"
                     :hanzicolor="hanzicolor"
-                    :playStorkes="playStorkes"
+                    :playStorkes="true"
                     :targetDiv="'write-pra' + cur.stem[0].con"
                   />
                 </template>
@@ -173,7 +173,7 @@
                   <Strockred
                     :Book_text="cur.stem[0].TChinese"
                     :hanzicolor="hanzicolor"
-                    :playStorkes="playStorkes"
+                    :playStorkes="true"
                     :targetDiv="'write-praT' + cur.stem[0].TChinese"
                   />
                 </template>

+ 20 - 1
src/components/Adult/preview/components/Strockred.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="strockredBox">
     <div class="strockred">
-      <div @click="resetHanzi" class="strock-play-box" v-if="playStorkes">
+      <div @click="resetHanzi" class="strock-play-box" v-if="1==2">
         <!-- <img src="../../assets/common/strock-play.png" class="strock-play" /> -->
       </div>
       <div
@@ -10,6 +10,7 @@
         :id="targetDiv"
         class="character-target-div"
       ></div>
+      <a @click="resetHanzi" class="clean-btn" v-if="playStorkes"></a>
     </div>
   </div>
 </template>
@@ -138,4 +139,22 @@ export default {
     }
   }
 }
+.clean-btn {
+    position: absolute;
+    bottom: 8px;
+    right: 8px;
+    width: 16px;
+    height: 16px;
+    margin: 0 4px;
+    cursor: pointer;
+    background: url("../../../../assets/icon/Undo-16-disable-Black.png") center
+      no-repeat;
+    background-size: cover;
+    display: block;
+    &:hover {
+      background: url("../../../../assets/icon/Undo-16-normal-Black.png") center
+        no-repeat;
+      background-size: cover;
+    }
+  }
 </style>