全选表格除了某项

全选表格除了某项

 init() {
      let obj_get = {
        taskId: this.value1,
        formName: this.formTableName,
      }
      GetFormData(obj_get).then((res) => {
        this.result = res.data.data
        if (this.result.length == 0) {
          this.tableData.forEach((el) => {
            if (el.name != '交接表') {
              this.$refs.dataTable.toggleRowSelection(el);
              delete el.ishow;
            }
          })
          return false
        }
        this.$refs.dataTable.clearSelection()
        this.tableData = this.result[0].value.list
        this.tableData.forEach(item => {
          if (item.ishow == 1) {
            this.$refs.dataTable.toggleRowSelection(item);
            delete item.ishow
          }
        })
      })
    },

你可能感兴趣的:(vue.js)