Переглянути джерело

校对时多个单词变短语

natasha 1 рік тому
батько
коміт
1a4dee3063

+ 14 - 0
src/views/content_manage/newspaper_manage/CheckArticle.vue

@@ -427,13 +427,27 @@ export default {
             this.highInclude = highArr
             this.highInclude = highArr
             item.highIndex = !item.highIndex
             item.highIndex = !item.highIndex
             item.word_id = this.activeItem.id
             item.word_id = this.activeItem.id
+            // if(highArr.length===1){
+            //     this.activeItem.type = 'newWord'
+            // }else if(highArr.length>1&&this.activeItem.type === 'newWord'){
+            //     this.activeItem.type = 'phrase'
+            // }
             item.type = this.activeItem.type
             item.type = this.activeItem.type
             this.changeTypes(this.activeItem)
             this.changeTypes(this.activeItem)
+            this.handleData()
         }
         }
     },
     },
     changeTypes(item){
     changeTypes(item){
         let MethodName = '/PaperServer/Manager/ArticleManager/CheckWordExplainInArt'
         let MethodName = '/PaperServer/Manager/ArticleManager/CheckWordExplainInArt'
         let data = null
         let data = null
+        let length = item.exp_title.trim().split(' ').length
+        if(length===0){
+            return
+        }else if(length===1){
+            item.type = 'newWord'
+        }else if(length>1&&item.type === 'newWord'){
+            item.type = 'phrase'
+        }
         if(item.type==='phrase'){
         if(item.type==='phrase'){
             data={
             data={
                 phraseExplain:{
                 phraseExplain:{