% var rowFlag = -1, preGridRowCol, txtGridRowCol; if (table.optionMap['formColNum'] == "1") { txtGridRowCol = ['col-xs-12', 'col-sm-2', 'col-sm-8']; } else if (table.optionMap['formColNum'] == "3") { txtGridRowCol = ['col-xs-12', 'col-sm-2 col-sm-9-1', 'col-sm-10 col-sm-9-8']; } else { txtGridRowCol = ['col-xs-12', 'col-sm-2', 'col-sm-10']; } for (c in table.columnList){ if (c.isEdit == '1' || c.isPk == '1'){ // 如果是树结构的字段,则自动忽略 if(table.isTreeEntity && @StringUtils.inStringIgnoreCase(c.columnName, 'parent_code', 'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')){ } // 如果是隐藏域 else if (c.showType == 'hidden'){ %> <${'#'}form:hidden path="${c.attrName}"/> <% } // 输出表单字段 else{ // 栅格参数获取 var gridRowCol = null; if (c.showType == 'textarea') { gridRowCol = txtGridRowCol; } else if (table.optionMap['formColNum'] == "1") { gridRowCol = ['col-xs-12', 'col-sm-2', 'col-sm-4']; } else if (table.optionMap['formColNum'] == "3") { gridRowCol = ['col-xs-4', 'col-sm-4', 'col-sm-8']; } else { gridRowCol = ['col-xs-6', 'col-sm-4', 'col-sm-8']; } // 是否强制新行获取,生成字段界面用户设定的 var isNewLine = @Global.YES.equals(c.optionMap['isNewLine']); if (isBlank(c.optionMap['isNewLine'])){ if (c.showType == 'textarea'){ isNewLine = true; } } // 如果上一个控件占12列,则强制新行算了 if (isNotEmpty(preGridRowCol) && preGridRowCol[0] == 'col-xs-12'){ isNewLine = true; } // 保存上一个控件输出栅格对象 preGridRowCol = gridRowCol; // 如果完成输出2列,则换行 if(rowFlag == 2){ //isNewLine = true; } // 如果是扩展字段,则输出子标题,并且强制换行 if (@StringUtils.equalsIgnoreCase(c.columnName, 'extend_s1')){ isNewLine = true; } // 如果是第一个控件 if (rowFlag == -1){ %>