Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
8046ff02
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8046ff02
编写于
6月 02, 2021
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加OOXML对象,用于版式文件转换为word
上级
ec56e515
变更
16
展开全部
隐藏空白更改
内联
并排
Showing
16 changed file
with
556 addition
and
229 deletion
+556
-229
gulpfile.js
gulpfile.js
+3
-1
o2web/gulpfile.js
o2web/gulpfile.js
+2
-0
o2web/source/o2_core/o2.js
o2web/source/o2_core/o2.js
+24
-6
o2web/source/o2_core/polyfill.js
o2web/source/o2_core/polyfill.js
+4
-0
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/documenteditor.html
...ss_FormDesigner/Module/Documenteditor/documenteditor.html
+7
-0
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/combine.html
..._FormDesigner/Module/Documenteditor/templete/combine.html
+1
-3
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/command.html
..._FormDesigner/Module/Documenteditor/templete/command.html
+1
-3
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/letter.html
...s_FormDesigner/Module/Documenteditor/templete/letter.html
+1
-3
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/meeting.html
..._FormDesigner/Module/Documenteditor/templete/meeting.html
+1
-3
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/party-meeting.html
...esigner/Module/Documenteditor/templete/party-meeting.html
+1
-3
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/party.html
...ss_FormDesigner/Module/Documenteditor/templete/party.html
+1
-4
o2web/source/x_component_process_FormDesigner/lp/en.js
o2web/source/x_component_process_FormDesigner/lp/en.js
+2
-0
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
+2
-0
o2web/source/x_component_process_Xform/Documenteditor.js
o2web/source/x_component_process_Xform/Documenteditor.js
+39
-23
o2web/source/x_component_process_Xform/widget/$OOXML/WordprocessingML/template/word/document.xml
...widget/$OOXML/WordprocessingML/template/word/document.xml
+1
-0
o2web/source/x_component_process_Xform/widget/OOXML.js
o2web/source/x_component_process_Xform/widget/OOXML.js
+466
-180
未找到文件。
gulpfile.js
浏览文件 @
8046ff02
...
...
@@ -413,6 +413,7 @@ exports.build_web_move = build_web_move;
function
build_concat_o2
(){
var
src
=
[
'
o2web/source/o2_core/polyfill.js
'
,
'
o2web/source/o2_lib/mootools/mootools-1.6.0_all.js
'
,
'
o2web/source/o2_lib/mootools/plugin/mBox.js
'
,
'
o2web/source/o2_core/o2.js
'
...
...
@@ -436,7 +437,7 @@ function build_concat_base(){
var
dest
=
'
target/o2server/servers/webServer/x_desktop/js/
'
;
return
gulp
.
src
(
src
,
{
sourcemaps
:
true
})
//.pipe(sourceMap.init())
//.pipe(concat('o2
.js'))
.
pipe
(
concat
(
'
base
.js
'
))
.
pipe
(
gulp
.
dest
(
dest
))
.
pipe
(
concat
(
'
base.min.js
'
))
.
pipe
(
uglify
())
...
...
@@ -606,6 +607,7 @@ function build_concat_cms_xform(){
function
build_bundle
(){
let
path
=
"
o2_core
"
;
var
src
=
[
'
o2web/source/o2_core/polyfill.js
'
,
'
o2web/source/o2_lib/mootools/mootools-1.6.0_all.js
'
,
'
o2web/source/o2_lib/mootools/plugin/mBox.js
'
,
'
o2web/source/o2_core/o2.js
'
,
...
...
o2web/gulpfile.js
浏览文件 @
8046ff02
...
...
@@ -340,6 +340,7 @@ function createO2ConcatTask(path, isMin, thisOptions) {
gulp
.
task
(
path
+
"
: concat
"
,
function
(){
var
option
=
thisOptions
||
options
;
var
src
=
[
'
source/
'
+
path
+
'
/polyfill.js
'
,
'
source/o2_lib/mootools/mootools-1.6.0_all.js
'
,
'
source/o2_lib/mootools/plugin/mBox.js
'
,
'
source/
'
+
path
+
'
/o2.js
'
...
...
@@ -450,6 +451,7 @@ function createO2ConcatTask(path, isMin, thisOptions) {
gulp
.
task
(
path
+
"
: bundle
"
,
function
(){
var
option
=
thisOptions
||
options
;
var
src
=
[
'
source/
'
+
path
+
'
/polyfill.js
'
,
'
source/o2_lib/mootools/mootools-1.6.0_all.js
'
,
'
source/o2_lib/mootools/plugin/mBox.js
'
,
'
source/
'
+
path
+
'
/o2.js
'
,
...
...
o2web/source/o2_core/o2.js
浏览文件 @
8046ff02
此差异已折叠。
点击以展开。
o2web/source/o2_core/polyfill.js
0 → 100644
浏览文件 @
8046ff02
此差异已折叠。
点击以展开。
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/documenteditor.html
浏览文件 @
8046ff02
...
...
@@ -163,6 +163,13 @@
</table>
<div
id=
"text{$.pid}toWordArea"
style=
"display: text{($.toWord=='y')?'block':'none'}"
>
<table
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.wordConversionType}}:
</td>
<td
class=
"editTableValue"
>
<input
class=
"editTableRadio"
name=
"wordConversionType"
text
{($.
wordConversionType
!='
service
')?'
checked
'
:
''}
type=
"radio"
value=
"ooxml"
/>
OOXML
<input
class=
"editTableRadio"
name=
"wordConversionType"
text
{($
.wordConversionType=
='service')?'checked':''}
type=
"radio"
value=
"service"
/>
Service
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.fileName}}:
</td>
<td
class=
"editTableValue"
><input
type=
"text"
name=
"toWordFilename"
value=
"text{$.toWordFilename}"
class=
"editTableInput"
/></td>
...
...
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/combine.html
浏览文件 @
8046ff02
...
...
@@ -110,9 +110,7 @@
<!-- 红头 -->
<div
class=
"doc_block"
>
<p
class=
"MsoRedHeader"
align=
center
style=
'text-align:center;line-height:auto; mso-line-height-rule:exactly;'
><b>
<span
class=
"doc_layout_redHeader"
style=
'font-size:42.0pt;font-family:宋体;color:red;letter-spacing:normal'
>
红头文件
</span>
</b></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"
>
...
...
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/command.html
浏览文件 @
8046ff02
...
...
@@ -99,9 +99,7 @@
<!-- 红头 -->
<div
class=
"doc_block"
>
<p
class=
"MsoRedHeader"
align=
center
style=
'text-align:center;line-height:auto; mso-line-height-rule:exactly;'
><b>
<span
class=
"doc_layout_redHeader"
style=
'font-size:42.0pt;font-family:宋体;color:red;letter-spacing:normal'
>
XXXXXX令
</span>
</b></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'
'
>
XXXXXX令
</div>
</div>
<div
class=
"doc_block"
>
...
...
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/letter.html
浏览文件 @
8046ff02
...
...
@@ -130,9 +130,7 @@ AAAAAAAAAAAAAAAnBAAAZHJzL2Rvd25yZXYueG1sUEsFBgAAAAAEAAQA8wAAAC4FAAAAAA==
<!-- 红头 -->
<div
class=
"doc_block"
>
<p
class=
"MsoRedHeader"
align=
center
style=
'text-align:center;line-height:auto; mso-line-height-rule:exactly;'
><b>
<span
class=
"doc_layout_redHeader"
style=
'font-size:42.0pt;font-family:宋体;color:red;letter-spacing:normal'
>
×××××公司函
</span>
</b></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>
<!--[if gte vml 1]>
...
...
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/meeting.html
浏览文件 @
8046ff02
...
...
@@ -110,9 +110,7 @@
<!-- 红头 -->
<div
class=
"doc_block"
>
<p
class=
"MsoRedHeader"
align=
center
style=
'text-align:center;line-height:auto; mso-line-height-rule:exactly;'
><b>
<span
class=
"doc_layout_redHeader"
style=
'font-size:42.0pt;font-family:宋体;color:red;letter-spacing:normal'
>
××××××纪要
</span>
</b></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"
>
...
...
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/party-meeting.html
浏览文件 @
8046ff02
...
...
@@ -110,9 +110,7 @@
<!-- 红头 -->
<div
class=
"doc_block"
>
<p
class=
"MsoRedHeader"
align=
center
style=
'text-align:center;line-height:auto; mso-line-height-rule:exactly;'
><b>
<span
class=
"doc_layout_redHeader"
style=
'font-size:42.0pt;font-family:宋体;color:red;letter-spacing:normal'
>
××××××纪要
</span>
</b></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"
>
...
...
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/party.html
浏览文件 @
8046ff02
...
...
@@ -107,10 +107,7 @@
<!-- 红头 -->
<div
class=
"doc_block"
>
<p
class=
"MsoRedHeader"
align=
center
style=
'text-align:center;line-height:auto; mso-line-height-rule:exactly;'
><b>
<span
class=
"doc_layout_redHeader"
style=
'font-size:64.0pt;font-family:华文中宋;color:red;letter-spacing:normal'
>
<span
style=
'transform-origin: 50% 0%; height: 74pt; color: red; font-family:华文中宋; font-size: 46.8pt; mso-ansi-font-size:72pt; display: block; transform: scale(1, 1.538); mso-font-kerning: 0pt; mso-font-width:65%;'
>
纪 委 文 件
</span></span>
</b></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"
>
...
...
o2web/source/x_component_process_FormDesigner/lp/en.js
浏览文件 @
8046ff02
...
...
@@ -764,6 +764,8 @@ MWF.xApplication.process.FormDesigner.LP = {
"
fullScreen
"
:
"
Full Screen
"
,
"
fullScreenInfo
"
:
"
Whether to allow full screen display
"
,
"
wordConversion
"
:
"
Convert to word
"
,
"
wordConversionType
"
:
"
Convert Type
"
,
"
wordConversionWithService
"
:
"
By Service
"
,
"
fileName
"
:
"
Filename
"
,
"
fileSite
"
:
"
Attachment site
"
,
"
addPageNumber
"
:
"
Page Number
"
,
...
...
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
浏览文件 @
8046ff02
...
...
@@ -768,6 +768,8 @@ MWF.xApplication.process.FormDesigner.LP = {
"
fullScreen
"
:
"
全屏
"
,
"
fullScreenInfo
"
:
"
是否允许全屏显示
"
,
"
wordConversion
"
:
"
WORD转换
"
,
"
wordConversionType
"
:
"
转换方式
"
,
"
wordConversionWithService
"
:
"
使用服务
"
,
"
fileName
"
:
"
文件名
"
,
"
fileSite
"
:
"
附件site
"
,
"
addPageNumber
"
:
"
添加页码
"
,
...
...
o2web/source/x_component_process_Xform/Documenteditor.js
浏览文件 @
8046ff02
...
...
@@ -2195,7 +2195,8 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
editorConfig
.
extraPlugins
=
"
quicktable,tableresize
"
;
//editorConfig.mathJaxLib = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML',
editorConfig
.
removeButtons
=
'
NumberedList,Source,Save,NewPage,Preview,Print,Templates,Paste,PasteFromWord,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Bold,Italic,Underline,Strike,Subscript,Superscript,CopyFormatting,RemoveFormat,BulletedList,Outdent,Indent,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,HorizontalRule,Smiley,SpecialChar,PageBreak,Iframe,TextColor,BGColor,Maximize,ShowBlocks,About,Styles,Font,FontSize
'
;
//editorConfig.removeButtons = 'NumberedList,Source,Save,NewPage,Preview,Print,Templates,Paste,PasteFromWord,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Bold,Italic,Underline,Strike,Subscript,Superscript,CopyFormatting,RemoveFormat,BulletedList,Outdent,Indent,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,HorizontalRule,Smiley,SpecialChar,PageBreak,Iframe,TextColor,BGColor,Maximize,ShowBlocks,About,Styles,Font,FontSize';
editorConfig
.
removeButtons
=
'
Source,Save,NewPage,Preview,Print,Templates,Paste,PasteFromWord,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Bold,Italic,Underline,Strike,Subscript,Superscript,CopyFormatting,RemoveFormat,Outdent,Indent,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,HorizontalRule,Smiley,SpecialChar,PageBreak,Iframe,TextColor,BGColor,Maximize,ShowBlocks,About,Styles,Font,FontSize
'
;
//editorConfig.extraAllowedContent = mathElements.join(' ') + '(*)[*]{*};img[data-mathml,data-custom-editor,role](Wirisformula)';
...
...
@@ -2361,6 +2362,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}
else
{
this
.
filetextEditor
=
CKEDITOR
.
replace
(
this
.
layout_filetext
,
this
.
_getEditorConfig
());
}
this
.
filetextEditor
.
on
(
"
instanceReady
"
,
function
(
e
){
if
(
callback
)
callback
(
e
);
}.
bind
(
this
));
...
...
@@ -2373,7 +2375,16 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this
.
filetextEditor
.
element
.
$
.
store
(
"
scale
"
,
this
.
scale
);
}.
bind
(
this
)
);
this
.
filetextEditor
.
on
(
'
afterPaste
'
,
function
(
e
)
{
debugger
;
}.
bind
(
this
));
this
.
filetextEditor
.
on
(
'
afterPasteFromWord
'
,
function
(
e
)
{
debugger
;
}.
bind
(
this
));
this
.
filetextEditor
.
on
(
'
paste
'
,
function
(
e
)
{
debugger
;
var
html
=
e
.
data
.
dataValue
;
//if (this.json.fullWidth=="y") html = html.replace(/\x20/g, " ");
var
rexbr
=
/
\<
br
\>
|
\<
br
\/\>
|
\<
br
\/\>
/g
;
...
...
@@ -3330,32 +3341,37 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
"
height
"
:
"
auto
"
});
}.
bind
(
this
),
function
(){
var
content
=
encodeURIComponent
(
this
.
getDocumentHtml
());
//var content = "<html xmlns:v=\"urn:schemas-microsoft-com:vml\"><head><meta charset=\"UTF-8\" /></head><body>"+tmpNode.get("html")+"</body></html>";
var
fileName
=
docNmae
||
this
.
json
.
toWordFilename
||
"
$doc
"
;
var
n
=
fileName
.
lastIndexOf
(
"
.
"
);
if
(
n
==-
1
)
fileName
=
fileName
+
"
.doc
"
;
var
body
=
{
"
fileName
"
:
fileName
,
"
site
"
:
this
.
json
.
toWordSite
||
"
$doc
"
,
"
content
"
:
content
};
o2
.
Actions
.
get
(
"
x_processplatform_assemble_surface
"
).
docToWord
(
this
.
form
.
businessData
.
work
.
id
,
body
,
function
(
json
){
if
(
this
.
form
.
businessData
.
workCompleted
){
o2
.
Actions
.
get
(
"
x_processplatform_assemble_surface
"
).
getAttachmentWorkcompleted
(
json
.
data
.
id
,
this
.
form
.
businessData
.
workCompleted
.
id
,
function
(
attjson
){
if
(
callback
)
callback
(
attjson
.
data
);
this
.
showToWord
(
attjson
.
data
);
}.
bind
(
this
));
}
else
{
o2
.
Actions
.
get
(
"
x_processplatform_assemble_surface
"
).
getAttachment
(
json
.
data
.
id
,
this
.
form
.
businessData
.
work
.
id
,
function
(
attjson
){
if
(
callback
)
callback
(
attjson
.
data
);
this
.
showToWord
(
attjson
.
data
);
}.
bind
(
this
));
}
}.
bind
(
this
));
//tmpNode.destroy();
if
(
this
.
json
.
wordConversionType
===
"
service
"
){
var
content
=
encodeURIComponent
(
this
.
getDocumentHtml
());
var
body
=
{
"
fileName
"
:
fileName
,
"
site
"
:
this
.
json
.
toWordSite
||
"
$doc
"
,
"
content
"
:
content
};
o2
.
Actions
.
get
(
"
x_processplatform_assemble_surface
"
).
docToWord
(
this
.
form
.
businessData
.
work
.
id
,
body
,
function
(
json
){
if
(
this
.
form
.
businessData
.
workCompleted
){
o2
.
Actions
.
get
(
"
x_processplatform_assemble_surface
"
).
getAttachmentWorkcompleted
(
json
.
data
.
id
,
this
.
form
.
businessData
.
workCompleted
.
id
,
function
(
attjson
){
if
(
callback
)
callback
(
attjson
.
data
);
this
.
showToWord
(
attjson
.
data
);
}.
bind
(
this
));
}
else
{
o2
.
Actions
.
get
(
"
x_processplatform_assemble_surface
"
).
getAttachment
(
json
.
data
.
id
,
this
.
form
.
businessData
.
work
.
id
,
function
(
attjson
){
if
(
callback
)
callback
(
attjson
.
data
);
this
.
showToWord
(
attjson
.
data
);
}.
bind
(
this
));
}
}.
bind
(
this
));
}
else
{
var
content
=
this
.
getDocumentHtml
();
o2
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
widget.OOXML
"
,
function
(){
(
new
o2
.
OOXML
.
WML
()).
load
(
content
);
});
}
if
(
!
toEdit
){
this
.
_readFiletext
();
...
...
o2web/source/x_component_process_Xform/widget/$OOXML/WordprocessingML/template/word/document.xml
浏览文件 @
8046ff02
...
...
@@ -30,6 +30,7 @@
xmlns:wpi=
"http://schemas.microsoft.com/office/word/2010/wordprocessingInk"
xmlns:wne=
"http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wps=
"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
xmlns:a=
"http://schemas.openxmlformats.org/drawingml/2006/main"
mc:Ignorable=
"w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"
>
<w:body>
<w:p>
...
...
o2web/source/x_component_process_Xform/widget/OOXML.js
浏览文件 @
8046ff02
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录