Browse Source

Merge branch 'master' into NPC-lhd

natasha 3 năm trước cách đây
mục cha
commit
3a078324a5

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

@@ -29,8 +29,8 @@
               :key="indexss"
             >
               <template v-if="itemss.data">
-                <template v-if="itemss.type == 'ligature'">
-                  <Ligature :curQue="itemss.que" />
+                <template v-if="itemss.type == 'ligature_chs'">
+                  <Ligature :curQue="itemss.data" />
                 </template>
                 <template v-if="itemss.data.type == 'image'">
                   <Picture :curQue="itemss.data" :ChildType='itemss.type' />
@@ -240,10 +240,10 @@ export default {
     handleNNPEprev() {
       const _this = this;
       if (_this.queIndex == 0) {
-        // this.$message({
-        //   message: "已经是第一题",
-        //   type: "success",
-        // });
+        this.$message({
+          message: "已经是第一题",
+          type: "success",
+        });
       } else {
         _this.queIndex = _this.queIndex - 1;
         _this.watchIndex = _this.queIndex + new Date().getTime();
@@ -254,10 +254,10 @@ export default {
     handleNNPEnext() {
       const _this = this;
       if (_this.queIndex == _this.queTotal - 1) {
-        // this.$message({
-        //   message: "已经是最后一题",
-        //   type: "success",
-        // });
+        this.$message({
+          message: "已经是最后一题",
+          type: "success",
+        });
       } else {
         _this.queIndex = _this.queIndex + 1;
         _this.watchIndex = _this.queIndex + new Date().getTime();

+ 18 - 2
src/components/Adult/common/HzModule.vue

@@ -12,7 +12,7 @@
         :uploadType="'image'"
       />
     </div>
-    <template v-if="type != 'imgage_image'">
+    <template>
       <div class="adult-book-input-item">
         <span class="adult-book-lable">内容:</span>
         <el-input
@@ -65,7 +65,7 @@
         <span class="adult-book-lable">文字位置:</span>
         <el-radio-group v-model="curQueItem.hanziSite">
           <el-radio label="top">图片上方</el-radio>
-          <el-radio label="bottom">图片下方下方</el-radio>
+          <el-radio label="bottom">图片下方</el-radio>
         </el-radio-group>
       </div>
       <div class="adult-book-input-item">
@@ -124,6 +124,22 @@
       ></el-input>
     </div>
     <div class="adult-book-input-item">
+      <span class="adult-book-lable">录音控件:</span>
+      <el-radio-group v-model="curQueItem.RecordControl">
+        <el-radio label="mini">mini</el-radio>
+        <el-radio label="normal">normal</el-radio>
+        <el-radio label="pro">pro</el-radio>
+        <el-radio label="pro-max">pro-max</el-radio>
+      </el-radio-group>
+    </div>
+    <div class="adult-book-input-item" v-if="curQueItem.RecordControl">
+      <span class="adult-book-lable">控件展示:</span>
+      <img v-if="curQueItem.RecordControl=='mini'" src="../../../assets/adult/mini.png" alt="">
+      <img v-else-if="curQueItem.RecordControl=='normal'" src="../../../assets/adult/normal.png" alt="">
+      <img v-else-if="curQueItem.RecordControl=='pro'" src="../../../assets/adult/pro.png" alt="">
+      <img v-else-if="curQueItem.RecordControl=='pro-max'" src="../../../assets/adult/pro-max.png" alt="">
+    </div>
+    <div class="adult-book-input-item">
       <span class="adult-book-lable">音频:</span>
       <Upload
         :changeFillId="changeMp3"

+ 2 - 2
src/components/Adult/common/data3.js

@@ -251,8 +251,8 @@ let fnData = [{
                 name: "固定词语",
             },
             {
-                type: 'image_wordInput',
-                name: "单词+输入",
+                type: 'image_input',
+                name: "单输入",
             },
             {
                 type: "imgage_image",

+ 1 - 0
src/components/Adult/inputModules/Picture.vue

@@ -69,6 +69,7 @@ export default {
             correctInput: "",
             pinyinSite:"",
             hanziSite:"",
+            RecordControl:"", //选择 音频控件
           },
         ],
         correct: [

+ 58 - 3
src/components/Adult/inputModules/Sentence.vue

@@ -188,10 +188,15 @@ export default {
       });
       if (this.curQue.taskId) {
         let verseList = [];
-        this.curQue.detail.forEach((item,i) => {
-          // verseList = verseList.concat(`${i+1}`+item.sentence);
-          verseList = verseList.concat(item.sentence);
+        let numberArr = [];
+        this.curQue.detail.forEach((item, i) => {
+          numberArr.push(this.numberToChinese(i + 1));
         });
+        for (let i = 0; i < this.curQue.detail.length; i++) {
+          verseList = verseList.concat(
+            `${numberArr[i]}` + this.curQue.detail[i].sentence
+          );
+        }
         if (verseList.length > 0) {
           this.isWordTime = true;
           let data = {
@@ -211,6 +216,56 @@ export default {
       this.isWordTime = false;
       this.$set(this.curQue, "wordTime", []);
     },
+    numberToChinese(num) {
+      var AA = new Array(
+        "零",
+        "一",
+        "二",
+        "三",
+        "四",
+        "五",
+        "六",
+        "七",
+        "八",
+        "九",
+        "十"
+      );
+      var BB = new Array("", "十", "百", "仟", "萬", "億", "点", "");
+      var a = ("" + num).replace(/(^0*)/g, "").split("."),
+        k = 0,
+        re = "";
+      for (var i = a[0].length - 1; i >= 0; i--) {
+        switch (k) {
+          case 0:
+            re = BB[7] + re;
+            break;
+          case 4:
+            if (
+              !new RegExp("0{4}//d{" + (a[0].length - i - 1) + "}$").test(a[0])
+            )
+              re = BB[4] + re;
+            break;
+          case 8:
+            re = BB[5] + re;
+            BB[7] = BB[5];
+            k = 0;
+            break;
+        }
+        if (k % 4 == 2 && a[0].charAt(i + 2) != 0 && a[0].charAt(i + 1) == 0)
+          re = AA[0] + re;
+        if (a[0].charAt(i) != 0) re = AA[a[0].charAt(i)] + BB[k % 4] + re;
+        k++;
+      }
+
+      if (a.length > 1) {
+        // 加上小数部分(如果有小数部分)
+        re += BB[6];
+        for (var i = 0; i < a[1].length; i++) re += AA[a[1].charAt(i)];
+      }
+      if (re == "一十") re = "十";
+      if (re.match(/^一/) && re.length == 3) re = re.replace("一", "");
+      return re;
+    },
     // 上传音频文件
     handleChange(file, fileList) {
       let _this = this;

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

@@ -343,6 +343,7 @@ export default {
           }
         }
       }
+      console.log(this.data);
       if (this.data.length > 0) {
         this.data.forEach((item) => {
           this.jsPlumb.connect({

+ 1 - 3
src/views/adultInput3.vue

@@ -357,7 +357,7 @@
                         topicIitem.type == 'image_single' ||
                         topicIitem.type == 'image_dobleinput' ||
                         topicIitem.type == 'image_gdcy' ||
-                        topicIitem.type == 'image_wordInput'
+                        topicIitem.type == 'image_input'
                       "
                     >
                       <template v-if="topicIitem.is_edit">
@@ -535,7 +535,6 @@ import Drag from "@/components/Adult/inputModules/Drag.vue";
 import SelfAssessment from "@/components/Adult/inputModules/SelfAssessment.vue";
 import Sort from "@/components/Adult/inputModules/Sort.vue";
 
-
 import Textdes from "@/components/Adult/inputModules/Textdes.vue";
 import Record from "@/components/Adult/inputModules/Record.vue";
 import Hanzi from "@/components/Adult/inputModules/Hanzi.vue";
@@ -867,7 +866,6 @@ export default {
         this.$message.warning("请先选择添加模板的位置");
         return;
       }
-
       if (
         this.question_list[this.tabIndex].cur_fn_data[this.TopicIndex]
           .table_list[this.RowIndex][this.LineIndex].data