浏览代码

句子+单选题+看图

guanchunjie 3 年之前
父节点
当前提交
7e16dd114f

+ 28 - 1
src/components/Adult/common/data.js

@@ -1,8 +1,15 @@
 let fnData = [{
   type: "article_chs",
   name: "课文",
+  // list: [{
+  //   type: "normal_article_chs",
+  //   name: "一般课文",
+  // }, {
+  //   type: "dialog_article_chs",
+  //   name: "对话课文",
+  // }]
 }, {
-  type: "dialog_article_chs",
+  type: "dialogue_article_chs",
   name: "对话课文",
 },
 {
@@ -610,10 +617,30 @@ let fnData = [{
       type: "sentence_record",
       name: "句子录音",
     },
+    {
+      type: "sentence_input_record",
+      name: "句子填空+录音",
+    },
+
   ],
 
 },
 {
+  type: "image_question",
+  name: "看图模板",
+  list: [
+    {
+      type: "sentence_input",
+      name: "看图填空",
+    }, {
+      type: "sentence_record",
+      name: "看图录入",
+    }, {
+      type: "sentence_input_record",
+      name: "看图填空+录入",
+    }]
+},
+{
   type: "text_input_RecoedItem",
   name: "文字+录入+录音条",
   data_structure: {

+ 27 - 9
src/components/Adult/inputModules/DialogueArticleChs/components/ArticleChs.vue

@@ -1,22 +1,28 @@
 <!--  -->
 <template>
-  <div class="NPC-Dialogue-article" v-if="curOption">
+  <div class="NPC-Dialogue-article" v-if="curQue">
+    <span class="Big-Book-left-text">文章:</span>
     <el-input
+      style="width: 85%"
       class="NPC-Dialogue-input"
       type="textarea"
       :autosize="{ minRows: 10 }"
-      placeholder="请输入内容"
-      v-model="curOption.article"
-      @blur="onBlur(curOption, 'article')"
+      placeholder="请输入文章"
+      v-model="curQue.article"
+      @blur="onBlur(curQue, 'article')"
     ></el-input>
-    <el-button @click="createPara">生成段落</el-button>
+    <div>
+      <el-button type="primary" size="small" @click="createPara"
+        >生成段落</el-button
+      >
+    </div>
   </div>
 </template>
 
 <script>
 export default {
   components: {},
-  props: ["curOption", "changeActive"],
+  props: ["curQue", "changeIsPara"],
   data() {
     return {
       detailItem: {
@@ -39,15 +45,27 @@ export default {
       item[field] = item[field] ? item[field].trim() : "";
     },
     createPara() {
-      let paraArr = this.curOption.article.split(/\n+/g);
+      let paraArr = this.curQue.article.split(/\n+/g);
 
+      this.$set(this.curQue, "detail", []);
       for (let i = 0; i < paraArr.length; i++) {
         let con = paraArr[i];
         let detailItem = JSON.parse(JSON.stringify(this.detailItem));
         detailItem.para = con;
-        this.curOption.detail.push(detailItem);
+        detailItem.paraIndex = i;
+        this.curQue.detail.push(detailItem);
+        // if (this.curQue.detail.length == 0) {
+        //   detailItem.para = con;
+        //   detailItem.paraIndex = i;
+        //   this.curQue.detail.push(detailItem);
+        // } else {
+        //   if (!(this.curQue.detail[i] && this.curQue.detail[i].para == con)) {
+        //     this.$set(this.curQue.detail[i], "para", con);
+        //   }
+        // }
       }
-      this.changeActive(2);
+      this.changeIsPara();
+      this.$message.success("生成成功");
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 10 - 9
src/components/Adult/inputModules/DialogueArticleChs/components/ClauseresultChs.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="Big-Book-Maxwidth">
     <div class="Big-Book-con-top">
-      <span class="Big-Book-left-text">文章分句:</span>
+      <span class="Big-Book-left-text">分句结果:</span>
     </div>
     <div
       class="NPC-sentence-list"
@@ -11,6 +11,7 @@
     >
       <template v-if="item.para">
         <el-input
+          style="width: 85%;white-space:nowrap;"
           type="textarea"
           :autosize="{ minRows: 3 }"
           placeholder="请输入内容"
@@ -19,18 +20,17 @@
           @change="handleChange"
           @blur="onBlur(item, 'para')"
         ></el-input>
-        <el-button
-          v-if="!item.isReadonly"
-          type="primary"
-          size="small"
-          @click="sureClause(index)"
-          >确定</el-button
-        >
-        <el-button v-else type="danger" size="small" @click="editClause(item)"
+        <el-button type="danger" size="small" @click="editClause(item)"
           >编辑</el-button
         >
+        <el-button type="primary" size="small" @click="sureClause(index)"
+          >生词分词</el-button
+        >
       </template>
     </div>
+    <!-- <el-button type="primary" size="small" @click="oneClickResult"
+      >一键生成分词</el-button
+    > -->
   </div>
 </template>
 
@@ -93,6 +93,7 @@ export default {
     editClause(item) {
       item.isReadonly = false;
     },
+    oneClickResult() {},
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},

+ 21 - 15
src/components/Adult/inputModules/DialogueArticleChs/components/ParagraphChs.vue

@@ -1,25 +1,27 @@
 <!--分句组件-->
 <template>
-  <div class="Big-Book-Maxwidth" v-if="curOption">
+  <div class="Big-Book-Maxwidth">
     <div class="Big-Book-content m">
       <div class="Big-Book-main">
         <div class="Big-Book-con">
           <div class="Big-Book-con-top">
-            <span class="Big-Book-left-text">段落:</span>
+            <span class="Big-Book-left-text">文章段落:</span>
             <el-button
               type="text"
               size="small"
               @click="editPara"
               v-if="readonly"
-              >编辑文章</el-button
+              >编辑段落</el-button
             >
           </div>
           <div
             class="NPC-para-list"
-            v-for="(item, index) in curOption.detail"
+            v-for="(item, index) in curQue.detail"
             :key="'para' + index"
           >
+            <span class="NPC-para-number">{{ index + 1 }}.</span>
             <el-input
+            style="width: 82%;"
               type="textarea"
               :autosize="{ minRows: 3 }"
               placeholder="请输入内容"
@@ -27,19 +29,18 @@
               @blur="onBlur(item, 'para')"
               :readonly="readonly"
             ></el-input>
-            <template v-if="index == 0 && !readonly">
+            <template v-if="index == 0">
               <el-checkbox v-model="item.isTitle">文章标题</el-checkbox>
             </template>
             <img
-              v-if="!readonly"
               @click="deleteOption(index)"
               class="close"
               src="../../../../../assets/adult/del-close.png"
               alt=""
+              v-if="!readonly"
             />
           </div>
-          <div class="NPC-footer-btn" v-if="!readonly">
-            <div class="sureSegbtn" @click="sureSegResult">确定分句</div>
+            <el-button type="primary" size="small" @click="sureSegResult">确定分句</el-button>
           </div>
         </div>
       </div>
@@ -52,7 +53,7 @@ import "@/utils/pinyin_dict_withtone";
 import "@/utils/pinyinUtil";
 export default {
   components: {},
-  props: ["curOption", "sureSeg", "isClause", "changeIsClause"],
+  props: ["curQue", "sureSeg", "isClause", "changeIsClause"],
   data() {
     return {
       imgNumber: 10,
@@ -76,8 +77,8 @@ export default {
       item[field] = item[field] ? item[field].trim() : "";
     },
     onBlurIndex(index, field) {
-      let res = this.curOption[field][index].trim();
-      this.$set(this.curOption[field], index, res);
+      let res = this.curQue[field][index].trim();
+      this.$set(this.curQue[field], index, res);
     },
     sureSegResult() {
       let _this = this;
@@ -107,11 +108,11 @@ export default {
         this.$message.warning("不能全部删除");
         return;
       }
-      this.curOption.detail.splice(index, 1);
+      this.curQue.detail.splice(index, 1);
     },
     addOption() {
-      let leg = this.curOption.detail.length;
-      let last = this.curOption.detail[leg - 1].para;
+      let leg = this.curQue.detail.length;
+      let last = this.curQue.detail[leg - 1].para;
       if (!last) {
         this.$message.warning("数据不能全是空");
         return;
@@ -125,7 +126,7 @@ export default {
         wordsList: [],
         timeList: [],
       };
-      this.curOption.detail.push(obj);
+      this.curQue.detail.push(obj);
     },
     editPara() {
       this.$confirm("此操作需要重新校对分句分词, 是否继续?", "提示", {
@@ -187,6 +188,11 @@ export default {
     justify-content: flex-start;
     align-items: flex-start;
     margin-bottom: 10px;
+    .NPC-para-number {
+      width: 28px;
+      margin-right: 5px;
+      text-align: right;
+    }
   }
   .close {
     width: 24px;

+ 1 - 1
src/components/Adult/inputModules/DialogueArticleChs/components/SegbywordChs.vue

@@ -298,7 +298,7 @@ export default {
     save() {
       let _this = this;
       let paraCon = JSON.parse(JSON.stringify(this.paraCon));
-      _this.$set(_this.curQue.detail, _this.paraIndex, paraCon);
+      _this.$set(_this.curQue.detail, _this.proofParaIndex, paraCon);
       _this.$message.success("保存成功");
     },
     //上一句

文件差异内容过多而无法显示
+ 2843 - 93
src/components/Adult/inputModules/DialogueArticleChs/index.vue


+ 1 - 7
src/views/adultInput.vue

@@ -125,13 +125,7 @@
                         <ArticleView :curQue="topicIitem.data" />
                       </template>
                     </template>
-                    <template
-                      v-if="
-                        topicIitem.type == 'dialog_article_chs' ||
-                        (topicIitem.data &&
-                          topicIitem.data.type == 'dialog_article_chs')
-                      "
-                    >
+                    <template v-if="topicIitem.type == 'dialogue_article_chs'">
                       <template v-if="topicIitem.is_edit">
                         <DialogueArticleChs
                           :curQue="topicIitem.data"

部分文件因为文件数量过多而无法显示