提交 ec56e515 编写于 作者: NoSubject's avatar NoSubject

增加OOXML对象,用于版式文件转换为word

上级 7775ae0c
......@@ -333,7 +333,7 @@ MWF.xApplication.Homepage.InforContent.AllInfor = new Class({
var cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_number");
var numberNode = new Element("div.o2_homepage_task_item_number", {"text": idxShow, "title":idx}).inject(cell);
var subject = (d.title || this.app.lp.noSubject);
var subject = o2.txt(d.title || this.app.lp.noSubject);
cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_subject");
new Element("div.o2_homepage_task_item_subject", {"html": subject, "title":subject}).inject(cell);
......@@ -584,7 +584,7 @@ MWF.xApplication.Homepage.InforContent.Infor = new Class({
var numberNode = new Element("div.o2_homepage_task_item_number", {"text": idxShow, "title":idx}).inject(cell);
//var subject = "<span>["+d.processName+"]</span> "+(d.title || this.app.lp.noSubject);
var subject = (d.title || this.app.lp.noSubject);
var subject = o2.txt(d.title || this.app.lp.noSubject);
cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_subject");
new Element("div.o2_homepage_task_item_subject", {"html": subject, "title":subject}).inject(cell);
......
......@@ -291,7 +291,7 @@ MWF.xApplication.Homepage.TaskContent.Task = new Class({
var numberNode = new Element("div.o2_homepage_task_item_number", {"text": idxShow, "title":idx}).inject(cell);
//var subject = "<span>["+d.processName+"]</span> "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+o2.txt(d.title || this.app.lp.noSubject);
cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_subject");
new Element("div.o2_homepage_task_item_subject", {"html": subject, "title":subject}).inject(cell);
......@@ -534,7 +534,7 @@ MWF.xApplication.Homepage.TaskContent.TaskCompleted = new Class({
var numberNode = new Element("div.o2_homepage_task_item_number", {"text": idxShow, "title":idx}).inject(cell);
//var subject = "<span>["+d.processName+"]</span> "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+o2.txt(d.title || this.app.lp.noSubject);
cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_subject");
new Element("div.o2_homepage_task_item_subject", {"html": subject, "title":subject}).inject(cell);
......@@ -615,7 +615,7 @@ MWF.xApplication.Homepage.TaskContent.Read = new Class({
var numberNode = new Element("div.o2_homepage_task_item_number", {"text": idxShow, "title":idx}).inject(cell);
//var subject = "<span>["+d.processName+"]</span> "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+o2.txt(d.title || this.app.lp.noSubject);
cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_subject");
new Element("div.o2_homepage_task_item_subject", {"html": subject, "title":subject}).inject(cell);
......@@ -697,7 +697,7 @@ MWF.xApplication.Homepage.TaskContent.ReadCompleted = new Class({
var numberNode = new Element("div.o2_homepage_task_item_number", {"text": idxShow, "title":idx}).inject(cell);
//var subject = "<span>["+d.processName+"]</span> "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+o2.txt(d.title || this.app.lp.noSubject);
cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_subject");
new Element("div.o2_homepage_task_item_subject", {"html": subject, "title":subject}).inject(cell);
......@@ -780,7 +780,7 @@ MWF.xApplication.Homepage.TaskContent.Draft = new Class({
var numberNode = new Element("div.o2_homepage_task_item_number", {"text": idxShow, "title":idx}).inject(cell);
//var subject = "<span>["+d.processName+"]</span> "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+o2.txt(d.title || this.app.lp.noSubject);
cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_subject");
new Element("div.o2_homepage_task_item_subject", {"html": subject, "title":subject}).inject(cell);
......@@ -869,7 +869,7 @@ MWF.xApplication.Homepage.TaskContent.ProcessDraft = new Class({
var numberNode = new Element("div.o2_homepage_task_item_number", {"text": idxShow, "title":idx}).inject(cell);
//var subject = "<span>["+d.processName+"]</span> "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+(d.title || this.app.lp.noSubject);
var subject = "["+d.processName+"] "+o2.txt(d.title || this.app.lp.noSubject);
cell = row.insertCell(-1).addClass("o2_homepage_task_item_cell_subject");
new Element("div.o2_homepage_task_item_subject", {"html": subject, "title":subject}).inject(cell);
......
......@@ -121,9 +121,7 @@
<!-- 红头 -->
<div class="doc_block">
<p class="MsoRedHeader" align=center style='text-align:center;mso-line-height-rule:exactly;'>
<span class="doc_layout_redHeader" style='font-weight:bold; font-size:42.0pt;font-family:宋体,sans-serif;color:red;letter-spacing:normal'>红头文件</span>
</p>
<div class="MsoRedHeader doc_layout_redHeader" align=center style='text-align:center;mso-line-height-rule:exactly;font-weight:bold; font-size:42.0pt;font-family:宋体,sans-serif;color:red;letter-spacing:normal''> 红头文件</div>
</div>
<div class="doc_block doc_layout_fileno_area">
......@@ -163,7 +161,7 @@
<div class="doc_block">
<P class=MsoNormal style='font-size:16.0pt;font-family:仿宋;line-height: 22pt'><span>&nbsp</span></P>
<p class=MsoNormal align=center style='text-align:center'><span class="doc_layout_subject" style='font-size:22.0pt; font-weight:bold;font-family:宋体,serif;letter-spacing:normal'>文件标题</span></p>
<p class=MsoNormal align=center style='text-align:center'><span class="doc_layout_subject" style='font-size:22.0pt; font-weight:bold;font-family: "Times New Roman",宋体;letter-spacing:normal'>文件标题</span></p>
<P class=MsoNormal style='font-size:12.0pt;font-family:仿宋;line-height: 22pt'><span>&nbsp</span></P>
</div>
......@@ -210,7 +208,7 @@
<span class="doc_layout_issuanceUnit" style='mso-bidi-font-size:16.0pt; line-height:28.0pt; font-size: 16pt;font-family:仿宋;letter-spacing:-0.4pt;'>[发文单位]</span>
</p>
</td>
<td width=47 valign=top style='width:35.4pt;border-left:none;padding:0cm 0cm 0cm 0cm'>
<td valign=top style='width:64pt;border-left:none;padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal style='mso-element:frame;mso-element-wrap:around; mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:margin; mso-element-left:right;mso-element-top:.05pt;mso-height-rule:exactly'>
<span style='mso-bidi-font-size:16.0pt;font-family:仿宋;letter-spacing:-.4pt'> </span>
</p>
......@@ -228,7 +226,7 @@
<span class="doc_layout_issuanceDate" style='mso-bidi-font-size:16.0pt; line-height:28.0pt; font-size: 16pt; font-family:"Times New Roman",仿宋;mso-fareast-font-family:仿宋;mso-ascii-font-family:"Times New Roman";letter-spacing:-0.4pt;'>[发文时间]</span>
</p>
</td>
<td width=47 valign=top style='width:32pt;padding:0cm 0cm 0cm 0cm'>
<td valign=top style='width:64pt;padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal style='mso-element:frame;mso-element-wrap: around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal: margin;mso-element-left:right;mso-element-top:.05pt;mso-height-rule:exactly'>
<span style='mso-bidi-font-size:16.0pt;font-family:仿宋;letter-spacing:-0.4pt'> </span>
</p>
......@@ -251,11 +249,11 @@
<P class=MsoNormal style='font-size:16.0pt;font-family:仿宋'><span>&nbsp</span></P>
<table class="doc_block doc_layout_edition" data-compute-style="y" border=1 cellspacing=0 cellpadding=0 style='width:100%; line-height:normal;border-collapse:collapse;border:none;mso-yfti-tbllook:2184; mso-padding-alt:0cm 0cm 0cm 0cm;mso-table-anchor-vertical:margin; mso-table-anchor-horizontal:column;mso-table-left:left;mso-table-top:bottom;'>
<tr style="page-break-inside:avoid">
<td valign="top" class="line_top_thick_bottom_thin doc_layout_edition_copyto" style='width:54pt; border-left:none;border-right:none; padding:5.4pt 0cm 5.4pt 14pt'>
<p class=MsoNormal align=left style='font-size:14.0pt;font-family:仿宋; text-align:left;line-height: normal'><span class="doc_layout_edition_copyto_title" style='font-size:14.0pt;font-family:仿宋;letter-spacing:-0.4pt; padding:0cm'>抄送:</span></p>
<td valign="top" class="line_top_thick_bottom_thin doc_layout_edition_copyto" style='width:54pt; border-left:none;border-right:none; padding:0pt 0cm 0pt 14pt'>
<p class=MsoNormal align=left style='font-size:14.0pt;font-family:仿宋; text-align:left;'><span class="doc_layout_edition_copyto_title" style='font-size:14.0pt;font-family:仿宋;letter-spacing:-0.4pt; padding:0cm'>抄送:</span></p>
</td>
<td class="line_top_thick_bottom_thin" valign="top" style='width:360pt;border-left:none;border-right:none;padding:5.4pt 14pt 5.4pt 0cm'>
<p class=MsoNormal align=left style='font-size:14.0pt;font-family:仿宋; text-align:left;line-height: normal'><span class="doc_layout_edition_copyto_content" style='font-size:14.0pt;font-family:仿宋;letter-spacing:-0.4pt; padding:0cm'></span></p>
<td class="line_top_thick_bottom_thin" valign="top" style='width:360pt;border-left:none;border-right:none;padding:0pt 14pt 0pt 0cm'>
<p class=MsoNormal align=left style='font-size:14.0pt;font-family:仿宋; text-align:left;'><span class="doc_layout_edition_copyto_content" style='font-size:14.0pt;font-family:仿宋;letter-spacing:-0.4pt; padding:0cm'></span></p>
</td>
</tr>
<tr style="page-break-inside:avoid">
......@@ -263,10 +261,10 @@
<table class=MsoTableGrid border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%;border-collapse:collapse;border:none;'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;page-break-inside:avoid'>
<td class="doc_layout_edition_issuance" valign=top style='border:none; padding: 0pt 0pt 4pt 14pt'>
<td class="doc_layout_edition_issuance" valign=top style='border:none; padding: 0pt 0pt 0pt 14pt'>
<p class=MsoNormal align=left style='line-height:24pt;text-align:left'><span class="doc_layout_edition_issuance_unit" style='font-size:14.0pt;font-family:仿宋;letter-spacing:-0.4pt'>[印发单位]</span></p>
</td>
<td valign=top style='border:none; padding: 0pt 14pt 4pt 0pt'>
<td valign=top style='border:none; padding: 0pt 14pt 0pt 0pt'>
<p class=MsoNormal align=right style='line-height:24pt;text-align:right'><span class="doc_layout_edition_issuance_date" style='font-size:14.0pt;font-family:"Times New Roman",仿宋;mso-fareast-font-family:仿宋;mso-ascii-font-family:"Times New Roman"; letter-spacing:0.4pt'>[印发时间]</span></p>
</td>
</tr>
......
......@@ -90,7 +90,7 @@ MWF.xApplication.process.TaskCenter.DraftList.Item = new Class({
Extends: MWF.xApplication.process.TaskCenter.List.Item,
setContent: function(){
this.applicationTitleNode.set("text", this.data.applicationName);
this.titleNode.set("html", "<font style=\"color: #333;\">["+this.data.processName+"]&nbsp;&nbsp;</font>"+this.data.title);
this.titleNode.set("html", "<font style=\"color: #333;\">["+this.data.processName+"]&nbsp;&nbsp;</font>"+o2.txt(this.data.title));
this.titleNode.set("title", this.data.title);
this.activityNode.set("text", "( "+this.list.app.lp.draftTab+" )");
......@@ -106,4 +106,4 @@ MWF.xApplication.process.TaskCenter.DraftList.Item = new Class({
this.list.app.desktop.openApplication(e, "process.Work", options);
// }.bind(this));
}
});
\ No newline at end of file
});
......@@ -1240,7 +1240,7 @@ MWF.xApplication.process.TaskCenter.List.Item = new Class({
setContent: function(){
this.applicationTitleNode.set("text", this.data.applicationName);
this.titleNode.set("html", "<font style=\"color: #333;\">["+this.data.processName+"]&nbsp;&nbsp;</font>"+this.data.title);
this.titleNode.set("html", "<font style=\"color: #333;\">["+this.data.processName+"]&nbsp;&nbsp;</font>"+o2.txt(this.data.title));
this.titleNode.set("title", this.data.title);
this.activityNode.set("text", "( "+(this.data.activityName || this.list.app.lp.completed)+" )");
......@@ -1327,4 +1327,4 @@ MWF.xApplication.process.TaskCenter.List.Item = new Class({
// //this.titleNode.setStyles(this.list.css.itemCell);
// //this.titleNode.set("text", this.data.title);
//}
});
\ No newline at end of file
});
......@@ -199,7 +199,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
v = this.form.businessData.data[this.json.id] || "";
}
}
if (o2.typeOf(v)==="string") v = o2.dtxt(v);
//if (o2.typeOf(v)==="string") v = o2.dtxt(v);
return v;
},
_getBusinessSectionData: function(){
......@@ -257,7 +257,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
},
_setBusinessData: function(v){
if (o2.typeOf(v)==="string") v = o2.txt(v);
//if (o2.typeOf(v)==="string") v = o2.txt(v);
if (this.json.section=="yes"){
this._setBusinessSectionData(v);
}else {
......
......@@ -717,6 +717,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
if (this.layout_issuanceUnit && this.layout_issuanceDate){
debugger;
var table = this.layout_issuanceUnit.getParent("table")
if (table && !table.hasClass("doc_layout_headIssuance")) {
var unitWidth = o2.getTextSize(this.layout_issuanceUnit.get("text"), {
......@@ -732,31 +733,58 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
// var unitWidth = this.layout_issuanceUnit.getSize().x;
// var dateWidth = this.layout_issuanceDate.getSize().x;
if (unitWidth < dateWidth) {
var flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
//日期右空四字,单位相对与日期居中
var flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
if (flagTd) {
var pt = ((dateWidth - unitWidth) / 96) * 72 + 32 + 32;
var pt = 16*4; //空四字
flagTd.setStyle("width", "" + pt + "pt");
flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
if (flagTd) flagTd.setStyle("width", "" + pt + "pt");
}
table = this.layout_issuanceDate.getParent("table");
table.setStyle("width", "auto");
flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
if (flagTd) flagTd.setStyle("width", "32pt");
var p = this.layout_issuanceDate.getParent("p");
if (p) p.setStyle("text-align", "right");
//var dateTd = this.layout_issuanceDate.getParent("td");
var unitTd = this.layout_issuanceUnit.getParent("td");
unitTd.setStyle("width", dateWidth);
var p = this.layout_issuanceUnit.getParent("p");
if (p) p.setStyle("text-align", "center");
// var flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
// if (flagTd) {
// var pt = ((dateWidth - unitWidth) / 96) * 72 + 32 + 32;
// flagTd.setStyle("width", "" + pt + "pt");
// }
// table = this.layout_issuanceDate.getParent("table");
// table.setStyle("width", "auto");
// flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
// if (flagTd) flagTd.setStyle("width", "32pt");
// var p = this.layout_issuanceDate.getParent("p");
// if (p) p.setStyle("text-align", "right");
} else {
var flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
if (flagTd) flagTd.setStyle("width", "32pt");
var table = this.layout_issuanceUnit.getParent("table");
var x = table.getSize().x;
table = this.layout_issuanceDate.getParent("table");
table.setStyle("width", "" + x + "px");
var unitTd = this.layout_issuanceUnit.getParent("td");
unitTd.setStyle("width", "auto");
flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
if (flagTd) flagTd.setStyle("width", "32pt");
if (flagTd) flagTd.setStyle("width", "64pt");
var p = this.layout_issuanceDate.getParent("p");
if (p) p.setStyle("text-align", "center");
if (p) p.setStyle("text-align", "right");
// var flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
// if (flagTd) flagTd.setStyle("width", "32pt");
// var table = this.layout_issuanceUnit.getParent("table");
// var x = table.getSize().x;
//
// table = this.layout_issuanceDate.getParent("table");
// table.setStyle("width", "" + x + "px");
//
// flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
// if (flagTd) flagTd.setStyle("width", "32pt");
// var p = this.layout_issuanceDate.getParent("p");
// if (p) p.setStyle("text-align", "center");
}
}
}
......@@ -2957,31 +2985,57 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
// var unitWidth = this.layout_issuanceUnit.getSize().x;
// var dateWidth = this.layout_issuanceDate.getSize().x;
if (unitWidth<dateWidth){
var flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
if (flagTd){
var pt = ((dateWidth-unitWidth)/96)*72 +32+32;
flagTd.setStyle("width", ""+pt+"pt");
//日期右空四字,单位相对与日期居中
var flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
if (flagTd) {
var pt = 16*4; //空四字
flagTd.setStyle("width", "" + pt + "pt");
flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
if (flagTd) flagTd.setStyle("width", "" + pt + "pt");
}
table = this.layout_issuanceDate.getParent("table");
table.setStyle("width", "auto");
flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
if (flagTd) flagTd.setStyle("width", "32pt");
var p = this.layout_issuanceDate.getParent("p");
if (p) p.setStyle("text-align", "right");
//var dateTd = this.layout_issuanceDate.getParent("td");
var unitTd = this.layout_issuanceUnit.getParent("td");
unitTd.setStyle("width", dateWidth);
var p = this.layout_issuanceUnit.getParent("p");
if (p) p.setStyle("text-align", "center");
// var flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
// if (flagTd){
// var pt = ((dateWidth-unitWidth)/96)*72 +32+32;
// flagTd.setStyle("width", ""+pt+"pt");
// }
// table = this.layout_issuanceDate.getParent("table");
// table.setStyle("width", "auto");
// flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
// if (flagTd) flagTd.setStyle("width", "32pt");
// var p = this.layout_issuanceDate.getParent("p");
// if (p) p.setStyle("text-align", "right");
}else{
var flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
if (flagTd) flagTd.setStyle("width", "32pt");
var table = this.layout_issuanceUnit.getParent("table");
var x = table.getSize().x;
table = this.layout_issuanceDate.getParent("table");
table.setStyle("width", ""+x+"px");
var unitTd = this.layout_issuanceUnit.getParent("td");
unitTd.setStyle("width", "auto");
flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
if (flagTd) flagTd.setStyle("width", "32pt");
if (flagTd) flagTd.setStyle("width", "64pt");
var p = this.layout_issuanceDate.getParent("p");
if (p) p.setStyle("text-align", "center");
if (p) p.setStyle("text-align", "right");
// var flagTd = this.layout_issuanceUnit.getParent("td").getNext("td");
// if (flagTd) flagTd.setStyle("width", "32pt");
// var table = this.layout_issuanceUnit.getParent("table");
// var x = table.getSize().x;
//
// table = this.layout_issuanceDate.getParent("table");
// table.setStyle("width", ""+x+"px");
//
// flagTd = this.layout_issuanceDate.getParent("td").getNext("td");
// if (flagTd) flagTd.setStyle("width", "32pt");
// var p = this.layout_issuanceDate.getParent("p");
// if (p) p.setStyle("text-align", "center");
}
}
}
......
......@@ -1284,11 +1284,11 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class(
// var d = this.loadPathData(id);
// if (d) data[id] = d;
var v = this.getSectionData(module, data[id]);
if (o2.typeOf(v)==="string") v = o2.txt(v);
//if (o2.typeOf(v)==="string") v = o2.txt(v);
data[id] = v
} else {
var v = module.getData();
if (o2.typeOf(v)==="string") v = o2.txt(v);
//if (o2.typeOf(v)==="string") v = o2.txt(v);
data[id] = v;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册