diff --git a/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar b/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar deleted file mode 100644 index 4cef2ff0..00000000 Binary files a/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar and /dev/null differ diff --git a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/InstitutionalTextWeb.java b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/InstitutionalTextWeb.java index 87789fe6..ea25a7e8 100644 --- a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/InstitutionalTextWeb.java +++ b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/InstitutionalTextWeb.java @@ -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]); } }