Data merge processing function cells

combineCell (List) {
  for (var in List Field [0]) {// get the data fields in the column is in the table, where one need only take it record
    var k = 0; // definition data the list index
    the while (K <List.length) {
      list [K] [field + 'span'] =. 1; // increase the field - for counting the number of duplicate values
      list [k] [field + ' dis'] = ''; // increase the field - for controlling the displaying and hiding
      for (var = k + I. 1; I <= List.length -. 1; I ++) {
        // determined k-th field of data fields, and whether the next repeat
        IF '{(List [K] [Field] List === [I] [Field] && List [K] [Field] =='!)
          List [K] [Field + span '] ++'; / / If duplication, the k-th +1 field data
          list [k] [field + ' dis'] = ''; // set to display the
          list [i] [field + ' span'] = 1; // repeat recording, is set to 1, indicating that no cross-bank
          list [i] [field + ' dis'] ='none '; // and this field is set to hide
        } else {
          BREAK;
        }
      }
    K = i; // jump to the index of the i-th data
    }
  }
  the console.log (111, List);
},

Guess you like

Origin www.cnblogs.com/dongyuezhuang/p/11416862.html