natasha 1 ano atrás
pai
commit
da235fbf97

+ 13 - 3
src/views/content_manage/newspaper_manage/CheckArticle.vue

@@ -15,7 +15,7 @@
             <template v-else>
                 <div class="tokens-box">
                     <div class="sentence-box" v-for="(item,index) in tokensArr" :key="index">
-                        <span :class="[item.type,item.token[9]===' '?'marginRight':'',item.highIndex?'fontWeight':'',wordId===item.word_id&&highInclude.indexOf(item.tokenIndex)>-1?'active':'']" @click="changeWordName(item)">
+                        <span :class="[item.type,item.token[9]===' '||item.marginRight?'marginRight':'',item.highIndex?'fontWeight':'',wordId===item.word_id&&highInclude.indexOf(item.tokenIndex)>-1?'active':'']" @click="changeWordName(item)">
                             {{item.token[2]}}
                         </span>
                     </div>
@@ -302,7 +302,8 @@ export default {
                     tsno: item.tsno,
                     token: items,
                     sentences: index,
-                    tokenIndex: indexs
+                    tokenIndex: indexs,
+                    marginRight: indexs===item.tokens.length-1
                 }
                 this.allWordList.forEach((itema,indexa)=>{
                     itema.bind_sent_data.bind_sents.forEach((itemb,indexb)=>{
@@ -419,7 +420,16 @@ export default {
                 highArr.splice(highArr.indexOf(item.tokenIndex),1)
             }
             let word_name = ''
-            highArr.sort().forEach(item=>{
+            for(let i=0;i<highArr.length-1;i++){
+                for(let j=i;j<highArr.length;j++){
+                    if(highArr[i]>highArr[j]){
+                        let changeData = highArr[i]
+                        highArr[i] = highArr[j]
+                        highArr[j] = changeData
+                    }
+                }
+            }
+            highArr.forEach(item=>{
                 word_name=word_name+this.activeItem.bind_sent_data.bind_sents[0].sent_bean.tokens[item][2]+this.activeItem.bind_sent_data.bind_sents[0].sent_bean.tokens[item][9]
             })
             this.activeItem.exp_title = word_name