| | |
| | | var token = ""; |
| | | if (Root) { |
| | | token = Root.getToken(); |
| | | |
| | | if (url.indexOf('rootbr/') != -1) { |
| | | token = "0" |
| | | if (url.indexOf("?") > 0) { |
| | | url = url + "&" + "userId=" + token; |
| | | } |
| | | else { |
| | | url = url + "?" + "userId=" + token; |
| | | } |
| | | } |
| | | // if(localStorage.getItem("hdtoken") != token) { |
| | | // window.top.location.href = config.page_timeout; |
| | | // return |
| | |
| | | itemMap.formatter_percent = formatter_percent; |
| | | itemMap.formatter_split = formatter_split; |
| | | itemMap.formatter_password = formatter_password; |
| | | itemMap.formatter_replace = formatter_replace; |
| | | itemMap.formatter_replace = formatter_replace; |
| | | itemMap.formatter_replace_val = formatter_replace_val; |
| | | |
| | | |
| | | itemMap.prefixorunit = formatter_prefixorunit; |
| | |
| | | } |
| | | return cellValue; |
| | | }; |
| | | // //拼接的字段格式 format = "#{name}-{name}%" |
| | | function formatter_replace(row, column, cellValue, index, format) { |
| | | // 未完成 |
| | | // if (cellValue) { |
| | | // return toPercent(cellValue, digit); |
| | | // } |
| | | return cellValue; |
| | | }; |
| | | // 替换 |
| | | function formatter_replace(row, column, cellValue, index, replacefield) { |
| | | return row[replacefield]; |
| | | }; |
| | | // 有值替换 cellValue 有值才替换 |
| | | function formatter_replace_val(row, column, cellValue, index, replacefield) { |
| | | if (cellValue) { |
| | | return row[replacefield] |
| | | } |
| | | return cellValue; |
| | | }; |
| | | |
| | | ////////////////非通用的格式化//////////////// |
| | | function formatter_earlyWarning(row, column, cellValue, index) { |