natasha 1 рік тому
батько
коміт
b6e25447da

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

@@ -1169,7 +1169,7 @@ export default {
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    console.log("2024-01-15 17:22");
+    console.log("2024-01-16 17:22");
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {

+ 20 - 10
src/components/Adult/preview/SentenceMulModule.vue

@@ -704,13 +704,14 @@
                             "
                             class="promax-box"
                             :TaskModel="TaskModel"
-                            :tmIndex="sdIndex"
+                            :tmIndex="indexs"
                             :answerRecordList="
                               curQue.Bookanswer[index][indeO][indexs]
                                 .recordList[sdIndex]
                             "
                             :index="index"
-                            :indexs="indexs"
+                            :indexs="indeO"
+                            :sddIndex="sdIndex"
                             :modelType="curQue.type"
                             @handleWav="handleWav"
                           />
@@ -852,14 +853,15 @@
                               : ''
                           ]"
                           :TaskModel="TaskModel"
-                          :tmIndex="sdIndex"
+                          :tmIndex="indexs"
                           :answerRecordList="
                             curQue.Bookanswer[index][indeO][indexs].recordList[
                               sdIndex
                             ]
                           "
                           :index="index"
-                          :indexs="indexs"
+                          :indexs="indeO"
+                          :sddIndex="sdIndex"
                           :modelType="curQue.type"
                           @handleWav="handleWav"
                         />
@@ -1070,16 +1072,24 @@ export default {
     handleListenRead(playFlag) {
       this.stopAudioS = playFlag;
     },
-    handleWav(list, tmIndex, index, indexs) {
+    handleWav(list, tmIndex, index, indexs, sddIndex) {
       tmIndex = tmIndex ? tmIndex : 0;
       index = index ? index : 0;
       indexs = indexs ? indexs : 0;
       let resList = list.filter((item, index) => index == list.length - 1);
-      this.$set(
-        this.curQue.Bookanswer[index][indexs].recordList,
-        tmIndex,
-        resList
-      );
+      if (sddIndex || sddIndex === 0) {
+        this.$set(
+          this.curQue.Bookanswer[index][indexs][tmIndex].recordList,
+          sddIndex,
+          resList
+        );
+      } else {
+        this.$set(
+          this.curQue.Bookanswer[index][indexs].recordList,
+          tmIndex,
+          resList
+        );
+      }
     },
     handleData() {
       let Bookanswer = [];

+ 14 - 3
src/components/Adult/preview/Soundrecord.vue

@@ -146,7 +146,8 @@ export default {
     "modelType",
     "tmsIndex",
     "index",
-    "indexs"
+    "indexs",
+    "sddIndex"
   ],
   data() {
     return {
@@ -282,7 +283,6 @@ export default {
             _this.recordList[_this.selectIndex].fileSize = fileSize;
             _this.wavblob = _this.recordList[_this.selectIndex].wavData;
             _this.$emit("getWavblob", _this.wavblob);
-            console.log(_this.modelType);
             if (_this.modelType && _this.modelType === "NewWord_chs") {
               _this.$emit(
                 "handleWav",
@@ -293,7 +293,6 @@ export default {
             } else if (
               _this.modelType &&
               (_this.modelType === "sentence_segtemp_chs" ||
-                _this.modelType === "sentence_single_chs" ||
                 _this.modelType === "sentence_set_chs")
             ) {
               _this.$emit(
@@ -303,6 +302,18 @@ export default {
                 _this.index,
                 _this.indexs
               );
+            } else if (
+              _this.modelType &&
+              _this.modelType === "sentence_single_chs"
+            ) {
+              _this.$emit(
+                "handleWav",
+                JSON.parse(JSON.stringify(_this.recordList)),
+                _this.tmIndex,
+                _this.index,
+                _this.indexs,
+                _this.sddIndex
+              );
             } else {
               _this.$emit(
                 "handleWav",