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

+ 1 - 2
src/components/Adult/phonePreview/NewWordShow.vue

@@ -408,9 +408,8 @@ export default {
     },
     },
     closeifFreeShow(data, rowIndex, colIndex) {
     closeifFreeShow(data, rowIndex, colIndex) {
       this.curQue.option[rowIndex].imgarr[colIndex] = data;
       this.curQue.option[rowIndex].imgarr[colIndex] = data;
-      this.ifFreeShow = false;
       this.freeWrite(data, rowIndex, colIndex);
       this.freeWrite(data, rowIndex, colIndex);
-      this.ifFreeShow = false;
+      // this.ifFreeShow = false;
       this.$forceUpdate();
       this.$forceUpdate();
     },
     },
     freeWrite(imgUrl, index, indexs) {
     freeWrite(imgUrl, index, indexs) {

+ 19 - 5
src/components/Adult/phonePreview/components/Freewrite.vue

@@ -22,7 +22,7 @@
       </div>
       </div>
     </div>
     </div>
 
 
-    <!-- <div class="imgsave">
+    <div class="imgsave">
       <div class="image">
       <div class="image">
         <div
         <div
           :class="['character-target-div', i == imgIndex ? 'select' : '']"
           :class="['character-target-div', i == imgIndex ? 'select' : '']"
@@ -43,17 +43,31 @@
         >
         >
           <img src="../../../../assets/NPC/word-remove.png" alt="" />
           <img src="../../../../assets/NPC/word-remove.png" alt="" />
         </div>
         </div>
-        
+        <!-- 
+                  @mouseover="saveShow = true"
+          @mouseout="saveShow = false"
+         -->
+        <div :class="['xj', saveShow ? 'click' : '']">
+          <img
+            @click="handleGenerate"
+            :src="
+              saveShow
+                ? require('../../../../assets/NPC/xj-xz.png')
+                : require('../../../../assets/NPC/xj.png')
+            "
+            alt=""
+          />
+        </div>
       </div>
       </div>
-    </div> -->
+    </div>
     <div class="record-notice" v-if="isNotice">最多保存5条记录</div>
     <div class="record-notice" v-if="isNotice">最多保存5条记录</div>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import vueEsign from "vue-esign";
 import vueEsign from "vue-esign";
-// import FreeWriteQP from "./FreeWriteQP.vue";
-import FreeWriteQP from "./FreewriteWord.vue";
+import FreeWriteQP from "./FreeWriteQP.vue";
+// import FreeWriteQP from "./FreewriteWord.vue";
 import { LearnWebSI } from "../../../../api/ajax";
 import { LearnWebSI } from "../../../../api/ajax";
 export default {
 export default {
   components: {
   components: {

+ 19 - 25
src/components/Adult/phonePreview/components/FreewriteLettle.vue

@@ -40,12 +40,12 @@
         ></a>
         ></a>
       </div>
       </div>
       <ul class="nav-list">
       <ul class="nav-list">
-        <!-- <li
+        <li
           @click="play()"
           @click="play()"
           :class="currenHzData && currenHzData.history ? '' : 'disabled'"
           :class="currenHzData && currenHzData.history ? '' : 'disabled'"
         >
         >
           播放
           播放
-        </li> -->
+        </li>
         <li
         <li
           @click="handleWriteImg"
           @click="handleWriteImg"
           :class="TaskModel == 'ANSWER' ? 'disabled' : ''"
           :class="TaskModel == 'ANSWER' ? 'disabled' : ''"
@@ -61,7 +61,7 @@
 import vueEsign from "vue-esign";
 import vueEsign from "vue-esign";
 import Strockplayredline from "./Strockplayredline.vue";
 import Strockplayredline from "./Strockplayredline.vue";
 import Strockred from "./Strockred.vue";
 import Strockred from "./Strockred.vue";
-import FreeWriteQP from "./FreewriteWord.vue";
+import FreeWriteQP from "./FreeWriteQP.vue";
 // import ChinaDict from "./ChinaDict";
 // import ChinaDict from "./ChinaDict";
 // import Audio from "./AudioRed.vue";
 // import Audio from "./AudioRed.vue";
 import { LearnWebSI } from "../../../../api/ajax";
 import { LearnWebSI } from "../../../../api/ajax";
@@ -220,28 +220,21 @@ export default {
       if (this.TaskModel == "ANSWER") {
       if (this.TaskModel == "ANSWER") {
         return;
         return;
       }
       }
-      localStorage.removeItem("bookImg");
-      this.$nextTick(() => {
-        this.$refs.esign.handleGenerate();
-        setTimeout(() => {
-          let Book_img = localStorage
-            .getItem("bookImg")
-            .replace("data:image/png;base64,", "");
-          let write_img = "data:image/png;base64," + Book_img;
-          let answer = {};
-          answer = {
-            hz: this.currentHz,
-            strokes_content: JSON.stringify(this.$refs.esign.history),
-            strokes_image_url: write_img
-          };
-          console.log(this.$refs.esign);
-          this.$emit("changeCurQue", answer, this.colIndex);
-          let obj = {
-            history: this.$refs.esign.history,
-            strokes_image_url: write_img
-          };
-          this.closeifFreeShow(obj, this.rowIndex, this.colIndex);
-        }, 500);
+      this.$refs.esign.generate().then(res => {
+        let Book_img = res.replace("data:image/png;base64,", "");
+        let write_img = "data:image/png;base64," + Book_img;
+        let answer = {};
+        answer = {
+          hz: this.currentHz,
+          strokes_content: JSON.stringify(this.$refs.esign.history),
+          strokes_image_url: write_img
+        };
+        this.$emit("changeCurQue", answer, this.colIndex);
+        let obj = {
+          history: this.$refs.esign.history,
+          strokes_image_url: write_img
+        };
+        this.closeifFreeShow(obj, this.rowIndex, this.colIndex);
       });
       });
     },
     },
     //保存到记录列表
     //保存到记录列表
@@ -395,6 +388,7 @@ export default {
       padding: 0;
       padding: 0;
       list-style: none;
       list-style: none;
       margin-top: 16px;
       margin-top: 16px;
+      gap: 10px;
       > li {
       > li {
         height: 34px;
         height: 34px;
         // width: 124px;
         // width: 124px;

+ 9 - 6
src/components/Adult/phonePreview/components/Practice.vue

@@ -140,7 +140,7 @@
                   <div class="footer">
                   <div class="footer">
                     <div class="pen-colors"></div>
                     <div class="pen-colors"></div>
                   </div>
                   </div>
-                  <!-- <a @click="resetHuahua(index)" class="clean-btn"></a> -->
+                  <a @click="resetHuahua(index)" class="clean-btn"></a>
                 </template>
                 </template>
               </div>
               </div>
 
 
@@ -266,7 +266,7 @@
                   <div class="footer">
                   <div class="footer">
                     <div class="pen-colors"></div>
                     <div class="pen-colors"></div>
                   </div>
                   </div>
-                  <!-- <a @click="resetHuahua(index)" class="clean-btn"></a> -->
+                  <a @click="resetHuahua(index)" class="clean-btn"></a>
                 </template>
                 </template>
               </div>
               </div>
 
 
@@ -561,7 +561,7 @@ export default {
     margin: 0 4px;
     margin: 0 4px;
     position: absolute;
     position: absolute;
     right: 8px;
     right: 8px;
-    bottom: 8px;
+    bottom: 44px;
     cursor: pointer;
     cursor: pointer;
     background: url("../../../../assets/icon/Undo-16-disable-Black.png") center
     background: url("../../../../assets/icon/Undo-16-disable-Black.png") center
       no-repeat;
       no-repeat;
@@ -852,12 +852,15 @@ export default {
         padding: 4px 16px;
         padding: 4px 16px;
         .right-strockred {
         .right-strockred {
           width: 256px;
           width: 256px;
-          height: 256px;
+          height: 292px;
           :deep .character-target-div {
           :deep .character-target-div {
-            height: 100%;
+            height: 256px;
           }
           }
           :deep .strockred {
           :deep .strockred {
-            height: 100%;
+            height: 256px;
+          }
+          ::v-deep .strockredBox {
+            height: 256px;
           }
           }
         }
         }
       }
       }

+ 1 - 2
src/components/Adult/preview/NewWordShow.vue

@@ -509,9 +509,8 @@ export default {
     },
     },
     closeifFreeShow(data, rowIndex, colIndex) {
     closeifFreeShow(data, rowIndex, colIndex) {
       this.curQue.option[rowIndex].imgarr[colIndex] = data;
       this.curQue.option[rowIndex].imgarr[colIndex] = data;
-      this.ifFreeShow = false;
       this.freeWrite(data, rowIndex, colIndex);
       this.freeWrite(data, rowIndex, colIndex);
-      this.ifFreeShow = false;
+      // this.ifFreeShow = false;
       this.$forceUpdate();
       this.$forceUpdate();
     },
     },
     freeWrite(imgUrl, index, indexs) {
     freeWrite(imgUrl, index, indexs) {

+ 4 - 4
src/components/Adult/preview/components/Freewrite.vue

@@ -47,7 +47,7 @@
                   @mouseover="saveShow = true"
                   @mouseover="saveShow = true"
           @mouseout="saveShow = false"
           @mouseout="saveShow = false"
          -->
          -->
-        <!-- <div :class="['xj', saveShow ? 'click' : '']">
+        <div :class="['xj', saveShow ? 'click' : '']">
           <img
           <img
             @click="handleGenerate"
             @click="handleGenerate"
             :src="
             :src="
@@ -57,7 +57,7 @@
             "
             "
             alt=""
             alt=""
           />
           />
-        </div> -->
+        </div>
       </div>
       </div>
     </div>
     </div>
     <div class="record-notice" v-if="isNotice">最多保存5条记录</div>
     <div class="record-notice" v-if="isNotice">最多保存5条记录</div>
@@ -66,8 +66,8 @@
 
 
 <script>
 <script>
 import vueEsign from "vue-esign";
 import vueEsign from "vue-esign";
-// import FreeWriteQP from "./FreeWriteQP.vue";
-import FreeWriteQP from "./FreewriteWord.vue";
+import FreeWriteQP from "./FreeWriteQP.vue";
+// import FreeWriteQP from "./FreewriteWord.vue";
 import { LearnWebSI } from "../../../../api/ajax";
 import { LearnWebSI } from "../../../../api/ajax";
 export default {
 export default {
   components: {
   components: {

+ 43 - 27
src/components/Adult/preview/components/FreewriteLettle.vue

@@ -37,12 +37,12 @@
         ></a>
         ></a>
       </div>
       </div>
       <ul class="nav-list">
       <ul class="nav-list">
-        <!-- <li
+        <li
           @click="play()"
           @click="play()"
           :class="currenHzData && currenHzData.history ? '' : 'disabled'"
           :class="currenHzData && currenHzData.history ? '' : 'disabled'"
         >
         >
           播放
           播放
-        </li> -->
+        </li>
         <li
         <li
           @click="handleWriteImg"
           @click="handleWriteImg"
           :class="TaskModel == 'ANSWER' ? 'disabled' : ''"
           :class="TaskModel == 'ANSWER' ? 'disabled' : ''"
@@ -58,7 +58,7 @@
 import vueEsign from "vue-esign";
 import vueEsign from "vue-esign";
 import Strockplayredline from "./Strockplayredline.vue";
 import Strockplayredline from "./Strockplayredline.vue";
 import Strockred from "./Strockred.vue";
 import Strockred from "./Strockred.vue";
-import FreeWriteQP from "./FreewriteWord.vue";
+import FreeWriteQP from "./FreeWriteQP.vue";
 // import ChinaDict from "./ChinaDict";
 // import ChinaDict from "./ChinaDict";
 // import Audio from "./AudioRed.vue";
 // import Audio from "./AudioRed.vue";
 import { LearnWebSI } from "../../../../api/ajax";
 import { LearnWebSI } from "../../../../api/ajax";
@@ -216,28 +216,44 @@ export default {
       if (this.TaskModel == "ANSWER") {
       if (this.TaskModel == "ANSWER") {
         return;
         return;
       }
       }
-      localStorage.removeItem("bookImg");
-      this.$nextTick(() => {
-        this.$refs.esign.handleGenerate();
-        setTimeout(() => {
-          let Book_img = localStorage
-            .getItem("bookImg")
-            .replace("data:image/png;base64,", "");
-          let write_img = "data:image/png;base64," + Book_img;
-          let answer = {};
-          answer = {
-            hz: this.currentHz,
-            strokes_content: JSON.stringify(this.$refs.esign.history),
-            strokes_image_url: write_img
-          };
-          console.log(this.$refs.esign);
-          this.$emit("changeCurQue", answer, this.colIndex);
-          let obj = {
-            history: this.$refs.esign.history,
-            strokes_image_url: write_img
-          };
-          this.closeifFreeShow(obj, this.rowIndex, this.colIndex);
-        }, 500);
+      this.$refs.esign.generate().then(res => {
+        let Book_img = res.replace("data:image/png;base64,", "");
+        let write_img = "data:image/png;base64," + Book_img;
+        let answer = {};
+        answer = {
+          hz: this.currentHz,
+          strokes_content: JSON.stringify(this.$refs.esign.history),
+          strokes_image_url: write_img
+        };
+        this.$emit("changeCurQue", answer, this.colIndex);
+        let obj = {
+          history: this.$refs.esign.history,
+          strokes_image_url: write_img
+        };
+        this.closeifFreeShow(obj, this.rowIndex, this.colIndex);
+        // this.$message.warning("请先书写在保存");
+        //   localStorage.removeItem("bookImg");
+        //   this.$nextTick(() => {
+        //     this.$refs.esign.handleGenerate();
+        //     setTimeout(() => {
+        //       let Book_img = localStorage
+        //         .getItem("bookImg")
+        //         .replace("data:image/png;base64,", "");
+        //       let write_img = "data:image/png;base64," + Book_img;
+        //       let answer = {};
+        //       answer = {
+        //         hz: this.currentHz,
+        //         strokes_content: JSON.stringify(this.$refs.esign.history),
+        //         strokes_image_url: write_img
+        //       };
+        //       console.log(this.$refs.esign);
+        //       this.$emit("changeCurQue", answer, this.colIndex);
+        //       let obj = {
+        //         history: this.$refs.esign.history,
+        //         strokes_image_url: write_img
+        //       };
+        //       this.closeifFreeShow(obj, this.rowIndex, this.colIndex);
+        //     }, 500);
       });
       });
     },
     },
     //保存到记录列表
     //保存到记录列表
@@ -393,8 +409,8 @@ export default {
       margin-top: 16px;
       margin-top: 16px;
       > li {
       > li {
         height: 34px;
         height: 34px;
-        // width: 124px;
-        width: 100%;
+        width: 124px;
+        // width: 100%;
         text-align: center;
         text-align: center;
         font-style: normal;
         font-style: normal;
         font-weight: bold;
         font-weight: bold;

+ 0 - 1
src/components/Adult/preview/components/WordPhraseDetail.vue

@@ -248,7 +248,6 @@
                   v-if="CurrentList.length === 0"
                   v-if="CurrentList.length === 0"
                   :style="{
                   :style="{
                     textAlign: 'center',
                     textAlign: 'center',
-                    fontSize: baseSizePhone - 2 + 'px',
                     margin: '0',
                     margin: '0',
                     padding: ' 16px 0 0 24px'
                     padding: ' 16px 0 0 24px'
                   }"
                   }"