|
@@ -94,11 +94,21 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">字的大小:</span>
|
|
|
+ <el-radio-group v-model="scope.row.fontSize">
|
|
|
+ <el-radio label="12px">12px</el-radio>
|
|
|
+ <el-radio label="16px">16px</el-radio>
|
|
|
+ <el-radio label="20px">20px</el-radio>
|
|
|
+ <el-radio label="24px">24px</el-radio>
|
|
|
+ <el-radio label="28px">28px</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div> -->
|
|
|
<template>
|
|
|
<div class="NPC-words-box">
|
|
|
<span class="Big-Book-left-text">校对拼音:</span>
|
|
|
<div class="NPC-words-list">
|
|
|
- <SegwordConfig :data="paraCon.wordsList[sentIndex]" />
|
|
|
+ <SegwordConfig :data="paraCon.wordsList[sentIndex]" :type="type" />
|
|
|
</div>
|
|
|
<div class="yunmu">
|
|
|
<span>点击可复制</span>
|
|
@@ -136,7 +146,7 @@ import SegwordConfig from "../../../common/SegwordConfig.vue";
|
|
|
export default {
|
|
|
name: "SegbywordChs",
|
|
|
components: { SegwordConfig },
|
|
|
- props: ["curQue", "paraIndex", "createPinyin", "segList"],
|
|
|
+ props: ["curQue", "paraIndex", "createPinyin", "segList", "type"],
|
|
|
data() {
|
|
|
return {
|
|
|
proofParaIndex: 0, //校对句子所属的段落
|
|
@@ -240,28 +250,28 @@ export default {
|
|
|
//确定分词结果
|
|
|
_sureSegWord() {
|
|
|
let sentIndex = this.sentIndex;
|
|
|
- let sent_arr = this.paraCon.seg_words[sentIndex].sent_str.split(/\s+/);
|
|
|
- let res_str = "";
|
|
|
- sent_arr.forEach((item) => {
|
|
|
- if (item) {
|
|
|
- let bool = this.checkEn(item);
|
|
|
- if (bool) {
|
|
|
- res_str += item.trim() + " ";
|
|
|
- } else if (item == "(") {
|
|
|
- res_str += " " + item.trim() + " ";
|
|
|
- } else if (item == ")") {
|
|
|
- res_str += " " + item.trim() + " ";
|
|
|
- } else {
|
|
|
- res_str += item.trim();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- res_str = res_str.replace(/\s+/g, " ");
|
|
|
- let org_sent = this.paraCon.sentences[sentIndex];
|
|
|
- if (res_str.trim() != org_sent.trim()) {
|
|
|
- this.$message.warning("跟原句不一致,请检查是否误删除或新增其他内容");
|
|
|
- return;
|
|
|
- }
|
|
|
+ // let sent_arr = this.paraCon.seg_words[sentIndex].sent_str.split(/\s+/);
|
|
|
+ // let res_str = "";
|
|
|
+ // sent_arr.forEach((item) => {
|
|
|
+ // if (item) {
|
|
|
+ // let bool = this.checkEn(item);
|
|
|
+ // if (bool) {
|
|
|
+ // res_str += item.trim() + " ";
|
|
|
+ // } else if (item == "(") {
|
|
|
+ // res_str += " " + item.trim() + " ";
|
|
|
+ // } else if (item == ")") {
|
|
|
+ // res_str += " " + item.trim() + " ";
|
|
|
+ // } else {
|
|
|
+ // res_str += item.trim();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // res_str = res_str.replace(/\s+/g, " ");
|
|
|
+ // let org_sent = this.paraCon.sentences[sentIndex];
|
|
|
+ // if (res_str.trim() != org_sent.trim()) {
|
|
|
+ // this.$message.warning("跟原句不一致,请检查是否误删除或新增其他内容");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
let arr = this.paraCon.seg_words[sentIndex].sent_str.split(/\s+/);
|
|
|
this.$set(this.paraCon.segList, sentIndex, arr);
|
|
|
let wordsList = [];
|
|
@@ -282,28 +292,28 @@ export default {
|
|
|
//生成拼音
|
|
|
_createPinyin() {
|
|
|
let sentIndex = this.sentIndex;
|
|
|
- let sent_arr = this.paraCon.seg_words[sentIndex].sent_str.split(/\s+/);
|
|
|
- let res_str = "";
|
|
|
- sent_arr.forEach((item) => {
|
|
|
- if (item) {
|
|
|
- let bool = this.checkEn(item);
|
|
|
- if (bool) {
|
|
|
- res_str += item.trim() + " ";
|
|
|
- } else if (item == "(") {
|
|
|
- res_str += " " + item.trim() + " ";
|
|
|
- } else if (item == ")") {
|
|
|
- res_str += " " + item.trim() + " ";
|
|
|
- } else {
|
|
|
- res_str += item.trim();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- res_str = res_str.replace(/\s+/g, " ");
|
|
|
- let org_sent = this.paraCon.sentences[sentIndex];
|
|
|
- if (res_str.trim() != org_sent.trim()) {
|
|
|
- this.$message.warning("跟原句不一致,请检查是否误删除或新增其他内容");
|
|
|
- return;
|
|
|
- }
|
|
|
+ // let sent_arr = this.paraCon.seg_words[sentIndex].sent_str.split(/\s+/);
|
|
|
+ // let res_str = "";
|
|
|
+ // sent_arr.forEach((item) => {
|
|
|
+ // if (item) {
|
|
|
+ // let bool = this.checkEn(item);
|
|
|
+ // if (bool) {
|
|
|
+ // res_str += item.trim() + " ";
|
|
|
+ // } else if (item == "(") {
|
|
|
+ // res_str += " " + item.trim() + " ";
|
|
|
+ // } else if (item == ")") {
|
|
|
+ // res_str += " " + item.trim() + " ";
|
|
|
+ // } else {
|
|
|
+ // res_str += item.trim();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // res_str = res_str.replace(/\s+/g, " ");
|
|
|
+ // let org_sent = this.paraCon.sentences[sentIndex];
|
|
|
+ // if (res_str.trim() != org_sent.trim()) {
|
|
|
+ // this.$message.warning("跟原句不一致,请检查是否误删除或新增其他内容");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
let textListList = [];
|
|
|
let arr = this.paraCon.seg_words[sentIndex].sent_str.split(/\s+/);
|
|
|
this.$set(this.paraCon.segList, sentIndex, arr);
|
|
@@ -383,7 +393,7 @@ export default {
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
console.log("segList");
|
|
|
- console.log(this.segList);
|
|
|
+ console.log(this.paraCon);
|
|
|
this.getParaSegWordsResult();
|
|
|
},
|
|
|
beforeCreate() {}, //生命周期 - 创建之前
|