Просмотр исходного кода

校对时多个单词变短语

natasha 1 год назад
Родитель
Сommit
1a4dee3063
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      src/views/content_manage/newspaper_manage/CheckArticle.vue

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

@@ -427,13 +427,27 @@ export default {
             this.highInclude = highArr
             item.highIndex = !item.highIndex
             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
             this.changeTypes(this.activeItem)
+            this.handleData()
         }
     },
     changeTypes(item){
         let MethodName = '/PaperServer/Manager/ArticleManager/CheckWordExplainInArt'
         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'){
             data={
                 phraseExplain:{