表格定位到特定行


this.rowid=row._XID

 

confirm( ) {
      let CValue="";
      for (let j = 0; j < this.treeData.length; j++) {
        if (this.rowid===this.treeData[j]._XID) {--拿到指定行
          if (this.dataType == 1) {
            for (let i = 0; i < this.sampleCount; i++) {
              for (let k = 0; k < this.dataCount; k++) {
                CValue += JSON.stringify(this.sampleString[i][k].name).replace("\"", "")
              }
            }
            this.treeData[j].CHECK_VALUE = CValue.replace(/\"/g, ",")--获取每个单元格的内容
            console.log(this.treeData[j])
            this.showEdit = false
            CValue = ""
            this.sampleString = []
          } else {
            this.treeData[j].CHECK_VALUE = 'ftp://****/'
            this.$refs.upload.submit();
          }
        }
      }
    },

 

 

posted on 2021-01-14 12:17  pcyosh  阅读(117)  评论(0)    收藏  举报

导航