Merge remote-tracking branch 'origin/apps_dev' into apps_dev
This commit is contained in:
commit
c0968c16e4
Binary file not shown.
@ -561,16 +561,22 @@ public class InstitutionalTextWeb extends ActionWeb {
|
||||
|
||||
//添加表格
|
||||
Table table = section.addTable(true);
|
||||
|
||||
|
||||
table.resetCells(data.length + 1, header.length);
|
||||
|
||||
|
||||
TableRow row = table.getRows().get(0);
|
||||
row.isHeader(true);
|
||||
row.setHeight(20);
|
||||
row.setHeightType(TableRowHeightType.Auto);
|
||||
|
||||
row.setHeightType(TableRowHeightType.Exactly);
|
||||
|
||||
//循环表头
|
||||
for (int i = 0; i < header.length; i++) {
|
||||
row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
|
||||
//设置固定列宽
|
||||
row.getCells().get(0).setWidth(150);
|
||||
row.getCells().get(1).setWidth(500);
|
||||
Paragraph p = row.getCells().get(i).addParagraph();
|
||||
p.getFormat().setHorizontalAlignment(HorizontalAlignment.Center);
|
||||
TextRange txtRange = p.appendText(header[i]);
|
||||
@ -589,6 +595,8 @@ public class InstitutionalTextWeb extends ActionWeb {
|
||||
dataRow.getRowFormat().setBackColor(Color.white);
|
||||
for (int c = 0; c < data[r].length; c++) {
|
||||
dataRow.getCells().get(c).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
|
||||
dataRow.getCells().get(0).setWidth(150);
|
||||
dataRow.getCells().get(1).setWidth(500);
|
||||
dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
|
||||
|
||||
}
|
||||
@ -639,7 +647,7 @@ public class InstitutionalTextWeb extends ActionWeb {
|
||||
|
||||
|
||||
//定义表格数据
|
||||
String[] orgheader = {"组织", "职责"};
|
||||
String[] orgheader = {"组织/角色与名称", "职责"};
|
||||
if (organizationTable != null && !organizationTable.isEmpty()) {
|
||||
String[][] strArray2 = new String[organizationTable.size()][];
|
||||
|
||||
@ -661,15 +669,15 @@ public class InstitutionalTextWeb extends ActionWeb {
|
||||
table.resetCells(data.length + 1, orgheader.length);
|
||||
|
||||
|
||||
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Contents);
|
||||
|
||||
|
||||
TableRow row = table.getRows().get(0);
|
||||
row.isHeader(true);
|
||||
row.setHeight(20);
|
||||
row.setHeightType(TableRowHeightType.Exactly);
|
||||
for (int i = 0; i < orgheader.length; i++) {
|
||||
row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
|
||||
//设置固定列宽
|
||||
row.getCells().get(0).setWidth(150);
|
||||
row.getCells().get(1).setWidth(500);
|
||||
Paragraph p = row.getCells().get(i).addParagraph();
|
||||
p.getFormat().setHorizontalAlignment(HorizontalAlignment.Center);
|
||||
TextRange txtRange = p.appendText(orgheader[i]);
|
||||
@ -684,6 +692,9 @@ public class InstitutionalTextWeb extends ActionWeb {
|
||||
dataRow.getRowFormat().setBackColor(Color.white);
|
||||
for (int c = 0; c < data[r].length; c++) {
|
||||
dataRow.getCells().get(c).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
|
||||
//设置固定列宽
|
||||
dataRow.getCells().get(0).setWidth(150);
|
||||
dataRow.getCells().get(1).setWidth(500);
|
||||
dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user