模型阅览界面提交
This commit is contained in:
parent
a209efb3d3
commit
9f41faea21
Binary file not shown.
@ -39,12 +39,15 @@ import com.sini.com.spire.doc.formatting.ParagraphFormat;
|
||||
import freemarker.template.Configuration;
|
||||
import freemarker.template.Template;
|
||||
import freemarker.template.TemplateException;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import static com.sini.com.spire.doc.documents.HorizontalAlignment.*;
|
||||
|
||||
public class OutputWordUtil {
|
||||
|
||||
public static final String DEPARTMENT = "department"; // 部门
|
||||
@ -367,12 +370,6 @@ public class OutputWordUtil {
|
||||
//创建 Document 类的对象并从磁盘加载 Word 文档
|
||||
Document document = new Document(outFile.getPath());
|
||||
|
||||
/*//获取最后一节
|
||||
Section section = document.getLastSection();
|
||||
Paragraph paragraph = section.addParagraph();
|
||||
|
||||
paragraph.appendBreak(BreakType.Page_Break);*/
|
||||
|
||||
|
||||
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
|
||||
|
||||
@ -560,7 +557,7 @@ public class OutputWordUtil {
|
||||
|
||||
|
||||
ParagraphFormat paragraphFormat1 = paragraph1.getFormat();
|
||||
paragraphFormat1.setHorizontalAlignment(HorizontalAlignment.Left);
|
||||
paragraphFormat1.setHorizontalAlignment(Left);
|
||||
|
||||
TextRange tr = paragraph1.appendText("相关文件");
|
||||
tr.getCharacterFormat().setBold(true);
|
||||
@ -590,19 +587,24 @@ public class OutputWordUtil {
|
||||
Table table = section.addTable(true);
|
||||
table.resetCells(data.length + 1, header.length);
|
||||
|
||||
//自动调整表格大小
|
||||
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
|
||||
|
||||
|
||||
TableRow row = table.getRows().get(0);
|
||||
row.isHeader(true);
|
||||
row.setHeight(20);
|
||||
row.setHeightType(TableRowHeightType.Exactly);
|
||||
row.setHeightType(TableRowHeightType.Auto);
|
||||
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);
|
||||
p.getFormat().setHorizontalAlignment(Center);
|
||||
TextRange txtRange = p.appendText(header[i]);
|
||||
txtRange.getCharacterFormat().setBold(true);
|
||||
|
||||
}
|
||||
|
||||
//将数据添加到其余行
|
||||
@ -617,6 +619,9 @@ public class OutputWordUtil {
|
||||
dataRow.getCells().get(0).setWidth(150);
|
||||
dataRow.getCells().get(1).setWidth(500);
|
||||
dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
|
||||
|
||||
// cell.getCellFormat().setFitText(true); // 设置内容
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -649,7 +654,7 @@ public class OutputWordUtil {
|
||||
//添加段落,设置一级序列
|
||||
Paragraph paragraph2 = section.addParagraph();
|
||||
ParagraphFormat paragraphFormat2 = paragraph2.getFormat();
|
||||
paragraphFormat2.setHorizontalAlignment(HorizontalAlignment.Left);
|
||||
paragraphFormat2.setHorizontalAlignment(Left);
|
||||
TextRange tr2 = paragraph2.appendText("支持文件");
|
||||
tr2.getCharacterFormat().setBold(true);
|
||||
tr2.getCharacterFormat().setFontName("宋体");
|
||||
@ -676,17 +681,21 @@ public class OutputWordUtil {
|
||||
Table table = section.addTable(true);
|
||||
table.resetCells(data.length + 1, header.length);
|
||||
|
||||
|
||||
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
|
||||
|
||||
|
||||
TableRow row = table.getRows().get(0);
|
||||
row.isHeader(true);
|
||||
row.setHeight(20);
|
||||
row.setHeightType(TableRowHeightType.Exactly);
|
||||
row.setHeightType(TableRowHeightType.Auto);
|
||||
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);
|
||||
p.getFormat().setHorizontalAlignment(Center);
|
||||
TextRange txtRange = p.appendText(header[i]);
|
||||
txtRange.getCharacterFormat().setBold(true);
|
||||
}
|
||||
@ -720,7 +729,8 @@ public class OutputWordUtil {
|
||||
public int compare(UpfileModel o1, UpfileModel o2) {
|
||||
String p1 = o1.getFileName();
|
||||
String p2 = o2.getFileName();
|
||||
if (p1.substring(0, 2).equals("附件") && p2.substring(0, 2).equals("附件") && p1.contains(":") && p2.contains(":")) {
|
||||
|
||||
if (p1.substring(0, 2).equals("附件") && p2.substring(0, 2).equals("附件") && p1.contains(":") && p2.contains(":") && StringUtils.isNumeric(p1.substring(2, p1.indexOf(":"))) && StringUtils.isNumeric(p2.substring(2, p2.indexOf(":")))) {
|
||||
return Integer.parseInt(p1.substring(2, p1.indexOf(":"))) - Integer.parseInt(p2.substring(2, p2.indexOf(":")));
|
||||
|
||||
} else {
|
||||
@ -742,7 +752,7 @@ public class OutputWordUtil {
|
||||
Paragraph paragraph4 = section.addParagraph();
|
||||
|
||||
ParagraphFormat paragraphFormat4 = paragraph4.getFormat();
|
||||
paragraphFormat4.setHorizontalAlignment(HorizontalAlignment.Left);
|
||||
paragraphFormat4.setHorizontalAlignment(Left);
|
||||
|
||||
TextRange tr4 = paragraph4.appendText("附件");
|
||||
|
||||
@ -843,6 +853,7 @@ public class OutputWordUtil {
|
||||
}
|
||||
|
||||
try {
|
||||
System.out.println("生成附件路径是=================="+outFile.getPath());
|
||||
doc.saveToFile(outFile.getPath(), FileFormat.Docx_2013);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -1003,7 +1014,7 @@ public class OutputWordUtil {
|
||||
|
||||
|
||||
ParagraphFormat paragraphFormat4 = paragraph.getFormat();
|
||||
paragraphFormat4.setHorizontalAlignment(HorizontalAlignment.Left);
|
||||
paragraphFormat4.setHorizontalAlignment(Left);
|
||||
|
||||
TextRange tr4 = paragraph.appendText("表单/模板");
|
||||
|
||||
|
||||
@ -4225,6 +4225,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
else
|
||||
throw new AWSException("创建流程手册失败:" + uuid);
|
||||
} else if ("data.form".equals(model.getMethodId())) {
|
||||
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, uuid);
|
||||
JSONObject object = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object.getString("result")))
|
||||
@ -4340,10 +4341,8 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
if (file.exists()) {
|
||||
File[] fileList = file.listFiles();
|
||||
if (fileList.length > 0) {
|
||||
System.out.println("fileList==========" + fileList);
|
||||
File docFile = null;
|
||||
for (File file2 : fileList) {
|
||||
System.out.println("file2==============" + file2);
|
||||
if (file2.isFile() && "xlsx".equals((file2.getName().substring(file2.getName().lastIndexOf(".") + 1)))) {
|
||||
docFile = file2;
|
||||
break;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -819,7 +819,6 @@
|
||||
|
||||
//隐藏评论div
|
||||
function hideLayerSide() {
|
||||
debugger;
|
||||
$(".pinglun").animate({ "right": "-25%", "width": "25%", "height": "85%" });
|
||||
$(".floatBtnDiv").animate({ "right":"-1%", "width": "69px", "height": "auto" });
|
||||
}
|
||||
@ -1009,7 +1008,7 @@
|
||||
box-shadow: 0 10px 30px rgb(0, 0, 0, .2);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="newadd_body">
|
||||
@ -1191,23 +1190,23 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width:510px;display:none;" id="shapes_dialog">
|
||||
</div>
|
||||
<div style="width:510px;display:none;" id="shapes_dialog">
|
||||
<div id="content" class="dlg-content awsui-ux">
|
||||
<ul id="shape_manage_list">
|
||||
<#liStr>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="designer-version-manager" style="width:600px; display:none;">
|
||||
<div id="designer-version-manager" style="width:600px; display:none;">
|
||||
<div id='contentDiv' style='margin-top:1px;height:220px;' class="dlg-content">
|
||||
<iframe width="100%" id="designerManager" name="coeCreateUser" frameBorder="0" style="width: 100%; height: 220px;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 不支持HTML5的页面显示图片 -->
|
||||
<div id="mainDiv" style="display: none;">
|
||||
<!-- 不支持HTML5的页面显示图片 -->
|
||||
<div id="mainDiv" style="display: none;">
|
||||
<div class="view_box">
|
||||
<div id="chartDivBox" style="background: none;">
|
||||
<div id="chartDiv" style="left: 148.5px; top: 0px;">
|
||||
@ -1221,16 +1220,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div title="" style="width:550px;display:none;" id="upfile-dialog">
|
||||
<div title="" style="width:550px;display:none;" id="upfile-dialog">
|
||||
<div id='upfile-content' style='height:330px;'>
|
||||
<iframe width="100%" id="upfile-content-iframe" name="upfile-content-iframe" frameBorder="0" style="width: 100%; height:100%;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--WFVersion对话框-->
|
||||
<div id="dialog_wf_version" style="width:900px; display:none;">
|
||||
<!--WFVersion对话框-->
|
||||
<div id="dialog_wf_version" style="width:900px; display:none;">
|
||||
<div id="dialog_wf_version_area" style="height:250px;" class="dlg-content">
|
||||
<iframe id="wf_version_frame" src="" frameborder="0" width="100%" height="100%"></iframe>
|
||||
</div>
|
||||
@ -1244,14 +1243,14 @@
|
||||
<button class="button" onclick="$('#dialog_wf_version').dialog('close');return false;">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="noContent" class="awsui-message-page" style="display:none;">
|
||||
</div>
|
||||
<div id="noContent" class="awsui-message-page" style="display:none;">
|
||||
<div class="content">
|
||||
<span class="icon" message-type="no_content"></span>
|
||||
<span class="title">无数据</span>
|
||||
</div>
|
||||
</div>
|
||||
<form id="openNewModelForm" name="openNewModelForm" method="post" action="./w" target="_blank">
|
||||
</div>
|
||||
<form id="openNewModelForm" name="openNewModelForm" method="post" action="./w" target="_blank">
|
||||
<input type="hidden" name="sid" id="sid" value="<#sid>">
|
||||
<input type="hidden" name="imgPath" id="imgPath" value="<#imgPath>">
|
||||
<input type="hidden" name="openType" id="openType" value="<#openType>">
|
||||
@ -1259,7 +1258,7 @@
|
||||
<input type="hidden" name="teamId" id="teamId" value="<#teamId>">
|
||||
<input type="hidden" name="filePerms" id="filePerms" value="<#filePerms>" />
|
||||
<input type="hidden" name="defaultMoreAttrSort" id="defaultMoreAttrSort" value="<#defaultAttrSort>" />
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ function showByType() {
|
||||
if(methodId=="data.form"){
|
||||
$("#processAttr").hide();
|
||||
}else if(methodId=="control.policy"){
|
||||
$("#processAttr").text("条款");
|
||||
$("#processAttr").hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1539,7 +1539,7 @@ function initProcessDesc() {
|
||||
$('#relevantDocument').append(b);
|
||||
}
|
||||
|
||||
$('#portalDescDock').find('table').append(t);
|
||||
$('#processFileDockg').find('table').append(t);
|
||||
// $('#portalDescDock').append('<table class="awsui-table"><tr><td> </td></tr></table>');
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user