guanchunjie преди 3 години
родител
ревизия
f56b1169ac

+ 49 - 12
src/components/Adult/common/SentenceModule.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="Big-Book-SentenceModule" v-if="curQueItem">
     <div class="Big-Book-top">
-      <span>序号</span>
+      <span class="NPC-lable-80">序号</span>
       <el-input
         type="textarea"
         autosize
@@ -22,15 +22,37 @@
     <div class="NPC-sentence-Segword">
       <SentenceSegwordChs :curQue="curQueItem.detail" />
     </div>
-    <div class="Big-Book-top">
-      <span>答案</span>
-      <el-input
-        type="textarea"
-        autosize
-        placeholder="请输入答案"
-        v-model="curQueItem.answer"
-        @blur="onBlur(curQueItem, 'answer')"
-      ></el-input>
+    <div class="Big-Book-top" v-if="type == 'sentence_input'">
+      <span class="NPC-lable-80">答案</span>
+      <div
+        class="NPC-sentence-input-box"
+        v-for="(ansItem, ansIndex) in curQueItem.answer"
+        :key="'answer' + ansIndex"
+      >
+        <el-input
+          class="NPC-sentence-input"
+          type="textarea"
+          autosize
+          placeholder="请输入答案"
+          v-model="curQueItem.answer[ansIndex]"
+          @blur="onBlurIndex(ansIndex, 'answer')"
+        ></el-input>
+        <i class="el-icon-circle-close"></i>
+      </div>
+    </div>
+    <div class="Big-Book-top" style="padding-left: 100px">
+      <el-button size="mini" type="primary" icon="el-icon-plus"
+        >添加答案</el-button
+      >
+    </div>
+    <div class="Big-Book-top" v-if="type == 'sentence_judge'">
+      <span class="NPC-lable-80">判断:</span>
+      <el-radio v-model="curQueItem.judge" :label="true">正确</el-radio>
+      <el-radio v-model="curQueItem.judge" :label="false">错误</el-radio>
+    </div>
+    <div class="Big-Book-top" v-if="type == 'sentence_record'">
+      <span class="NPC-lable-80">录音组件:</span>
+      <img src="../../../assets/adult/mini.png" alt="" />
     </div>
     <div class="Big-Book-top" v-if="type == 'recordHZ_inputPY_chs'">
       <span>录音</span>
@@ -44,7 +66,7 @@
       <img src="../../../assets/adult/pro-plus.png" alt="" />
     </div>
     <div class="Big-Book-top" v-if="type == 'inputItem_chs'">
-      <span>音频</span>
+      <span class="NPC-lable-80">音频</span>
       <Upload
         :changeFillId="changeMp3"
         :datafileList="fileCon.mp3_list"
@@ -118,7 +140,6 @@ export default {
     },
     //   修改正确答案
     changeIsAnswer(type) {
-      debugger;
       this.changAnswer(this.index, type);
     },
     // 点击生成拼音
@@ -243,6 +264,7 @@ export default {
       }
     }
   }
+
   &-SentenceModule {
     // display: flex;
     // justify-content: flex-start;
@@ -274,6 +296,11 @@ export default {
     }
   }
 }
+.NPC-sentence-input-box {
+  display: flex;
+  justify-content: flex-start;
+  align-items: flex-start;
+}
 </style>
 <style lang="scss">
 .Big-Book-SentenceModule {
@@ -288,4 +315,14 @@ export default {
     // margin-right: 15px;
   }
 }
+.NPC-sentence-input-box {
+  .NPC-sentence-input {
+    margin-right: 10px;
+  }
+  > i {
+    width: 24px;
+    height: 24px;
+    cursor: pointer;
+  }
+}
 </style>

+ 4 - 6
src/components/Adult/common/SentenceSegwordChs/components/SegbywordChs.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="Big-Book-Maxwidth NPC-Clauseresult">
     <div class="Big-Book-con-top">
-      <span class="Big-Book-left-text">分词结果:</span>
+      <span class="Big-Book-left-text NPC-lable-80">分词结果:</span>
     </div>
     <div class="NPC-para-list">
       <div class="NPC-sentence-list">
@@ -28,7 +28,7 @@
     >
       <div class="NPC-words" v-if="curQue">
         <div class="NPC-words-box">
-          <span class="Big-Book-left-text">原句:</span>
+          <span class="Big-Book-left-text NPC-lable-80">原句:</span>
           <el-input
             type="textarea"
             :autosize="{ minRows: 1 }"
@@ -38,7 +38,7 @@
           ></el-input>
         </div>
         <div class="NPC-words-box">
-          <span class="Big-Book-left-text">分词:</span>
+          <span class="Big-Book-left-text NPC-lable-80">分词:</span>
           <el-input
             type="textarea"
             :autosize="{ minRows: 1 }"
@@ -55,7 +55,7 @@
         </div>
         <template>
           <div class="NPC-words-box">
-            <span class="Big-Book-left-text">校对拼音:</span>
+            <span class="Big-Book-left-text NPC-lable-80">校对拼音:</span>
             <div class="NPC-words-list">
               <el-table :data="curQue.wordsList" border style="width: 400px">
                 <el-table-column prop="chs" label="词" width="180">
@@ -232,8 +232,6 @@ export default {
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    console.log("====分词结果====");
-    console.log(this.curQue.detail);
     this.getParaSegWordsResult();
   },
   beforeCreate() {}, //生命周期 - 创建之前

+ 1 - 1
src/components/Adult/common/SentenceSegwordChs/index.vue

@@ -6,7 +6,7 @@
     v-loading="loading"
   >
     <div class="NPC-Book-model">
-      <span class="Big-Book-left-text">拼音位置:</span>
+      <span class="Big-Book-left-text NPC-lable-80">拼音位置:</span>
       <el-radio-group v-model="curQue.pyPosition">
         <el-radio :label="'top'">字上面</el-radio>
         <el-radio :label="'bottom'">字下面</el-radio>

+ 7 - 12
src/components/Adult/inputModules/Sentence.vue

@@ -6,9 +6,8 @@
       style="margin-left: 20px; margin-top: 20px"
     >
       <div class="Big-Book-con">
-        <span>标题</span>
+        <span class="NPC-lable-80">标题</span>
         <el-input
-          style="width: 300px"
           type="textarea"
           autosize
           placeholder="请输入标题"
@@ -101,23 +100,23 @@ export default {
               seg_words: "",
               wordsList: [],
             },
-            answer: "",
+            answer: [""],
             judge: true,
           },
         ],
         fn_list: [
           {
-            type: "record",
+            type: "sentence_record",
             name: "录音",
             isFn: false,
           },
           {
-            type: "input",
+            type: "sentence_input",
             name: "输入",
             isFn: false,
           },
           {
-            type: "judge",
+            type: "sentence_judge",
             name: "判断",
             isFn: false,
           },
@@ -180,6 +179,7 @@ export default {
     },
     //处理数据
     handleStructure(type) {
+      debugger;
       let data = JSON.parse(JSON.stringify(this.data_structure_sentence));
       data.fn_list.map((item) => {
         if (item.type == type) {
@@ -196,9 +196,7 @@ export default {
       } else if (this.type == "inputItem_chs") {
         data = JSON.parse(JSON.stringify(this.data_structure2));
       } else if (this.type.indexOf("sentence_") > -1) {
-        let child_type_arr = this.type.split("_");
-        let child_type = child_type_arr[1];
-        data = this.handleStructure(child_type);
+        data = this.handleStructure(this.type);
       }
       this.changeCurQue(data);
     },
@@ -293,9 +291,6 @@ export default {
   .Big-Book-con {
     display: flex;
     align-items: center;
-    > span {
-      width: 50px;
-    }
   }
 }
 </style>

+ 48 - 0
src/styles/index.scss

@@ -191,4 +191,52 @@ input:-moz-placeholder {
 
 input:-ms-input-placeholder {
     color: rgba($color: #000000, $alpha: 0.3);
+}
+
+.adult-book-input-sty{
+  .flex-start{
+    display: flex;
+    justify-content: flex-start;
+    align-items: flex-start;
+  }
+  .flex-center{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .flex-align-center{
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+  }
+  .flex-justify-center{
+    display: flex;
+    justify-content: center;
+    align-items: flex-start;
+  }
+  .adult-book-lable{
+    width: 70px;
+    font-size: 14px;
+    display: block;
+  }
+  .adult-book-input{
+    width:500px;
+    margin-right: 10px;
+  }
+}
+
+.adult-book-preview-sty{
+
+}
+//新实用汉语
+.adult-book-NPC{
+
+}
+//发展新汉语
+.adult-book-DNC{
+
+}
+//HSK
+.adult-book-HSK{
+  
 }

+ 8 - 3
src/views/adultInput.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div class="Big-Book-container">
+  <div class="Big-Book-container NPC-Book-input-Sty">
     <Header />
     <div class="Big-Book-content">
       <div class="content-tree">
@@ -364,8 +364,6 @@ import Sudoku from "@/components/Adult/inputModules/Sudoku.vue";
 import ToneSelect from "@/components/Adult/inputModules/ToneSelect.vue";
 import NumberCombination from "@/components/Adult/inputModules/NumberCombination.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";
@@ -1000,4 +998,11 @@ export default {
     }
   }
 }
+</style>
+<style lang="scss">
+.NPC-Book-input-Sty {
+  .NPC-lable-80 {
+    width: 80px;
+  }
+}
 </style>