Browse Source

修复匹配不准确

gangyj 2 years ago
parent
commit
9ca76248e4
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/views/exctab/ElementIdentification/index.vue

+ 5 - 3
src/views/exctab/ElementIdentification/index.vue

@@ -1134,7 +1134,8 @@ export default {
         this.showLeft = false;
         let trtd = target.getAttribute('trindex')+"_"+target.getAttribute('tdindex');
         for (let i = 0; i < this.tableData.length; i++) {
-          if(this.tableData[i].xys.indexOf(trtd) > -1){
+          let arr = this.tableData[i].xys.split(',')
+          if(arr.indexOf(trtd) > -1){
             this.titleIndex = i;
             break;
           }
@@ -1175,8 +1176,9 @@ export default {
         let tdEle = this.getParentTD(target);
         if(tdEle){
           let trtd = target.getAttribute('trindex')+"_"+target.getAttribute('tdindex');
-          for (let i = 0; i < this.tableData.length; i++) {
-            if(this.tableData[i].xys.indexOf(trtd) > -1){
+            for (let i = 0; i < this.tableData.length; i++) {
+            let arr = this.tableData[i].xys.split(',')
+            if(arr.indexOf(trtd) > -1){
               this.titleIndex = i;
               break;
             }