Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
8a6dc512
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,发现更多精彩内容 >>
提交
8a6dc512
编写于
6月 08, 2021
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复流程提交时,转换word后保存附件可能出现无权限的问题
上级
7a30ec2d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
63 addition
and
18 deletion
+63
-18
o2web/source/x_component_process_Xform/Documenteditor.js
o2web/source/x_component_process_Xform/Documenteditor.js
+30
-11
o2web/source/x_component_process_Xform/Form.js
o2web/source/x_component_process_Xform/Form.js
+33
-7
未找到文件。
o2web/source/x_component_process_Xform/Documenteditor.js
浏览文件 @
8a6dc512
...
...
@@ -1032,8 +1032,17 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
if
(
this
.
json
.
toWord
==
"
y
"
){
if
(
this
.
json
.
toWordTrigger
==
"
open
"
)
this
.
docToWord
();
if
(
this
.
json
.
toWordTrigger
==
"
save
"
)
this
.
form
.
addEvent
(
"
beforeSave
"
,
this
.
docToWord
.
bind
(
this
));
if
(
this
.
json
.
toWordTrigger
==
"
submit
"
)
this
.
form
.
addEvent
(
"
beforeProcess
"
,
this
.
docToWord
.
bind
(
this
));
//if (this.json.toWordTrigger=="save") this.form.addEvent("beforeSave", this.docToWord.bind(this));
//if (this.json.toWordTrigger=="submit") this.form.addEvent("beforeProcess", this.docToWord.bind(this));
if
(
this
.
json
.
toWordTrigger
==
"
save
"
)
{
if
(
!
this
.
form
.
toWordSaveList
)
this
.
form
.
toWordSaveList
=
[];
this
.
form
.
toWordSaveList
.
push
(
this
);
}
if
(
this
.
json
.
toWordTrigger
==
"
submit
"
)
{
if
(
!
this
.
form
.
toWordSubmitList
)
this
.
form
.
toWordSubmitList
=
[];
this
.
form
.
toWordSubmitList
.
push
(
this
);
}
}
if
(
!
layout
.
mobile
)
this
.
loadSideToolbar
();
...
...
@@ -3322,7 +3331,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
* //attachmentData 转换后的附件数据
* })
*/
toWord
:
function
(
callback
,
name
){
toWord
:
function
(
callback
,
name
,
cb
){
var
docNmae
=
name
||
""
;
if
(
!
docNmae
){
...
...
@@ -3373,6 +3382,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}.
bind
(
this
));
}
}.
bind
(
this
));
if
(
cb
)
cb
();
}
else
{
var
content
=
this
.
getDocumentHtml
();
o2
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
widget.OOXML
"
,
function
(){
...
...
@@ -3397,6 +3407,8 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}
}.
bind
(
this
));
if
(
cb
)
cb
();
//
//
//
...
...
@@ -3428,14 +3440,21 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}
}.
bind
(
this
));
},
docToWord
:
function
(){
var
flag
=
true
;
if
(
this
.
json
.
toWordConditionScript
&&
this
.
json
.
toWordConditionScript
.
code
){
flag
=
!!
this
.
form
.
Macro
.
exec
(
this
.
json
.
toWordConditionScript
.
code
,
this
);
}
if
(
flag
){
this
.
toWord
();
}
docToWord
:
function
(
callback
){
try
{
var
flag
=
true
;
if
(
this
.
json
.
toWordConditionScript
&&
this
.
json
.
toWordConditionScript
.
code
){
flag
=
!!
this
.
form
.
Macro
.
exec
(
this
.
json
.
toWordConditionScript
.
code
,
this
);
}
if
(
flag
){
this
.
toWord
(
null
,
""
,
callback
);
}
else
{
if
(
callback
)
callback
();
}
}
catch
(
e
){
console
.
error
(
e
);
if
(
callback
)
callback
();
};
},
showToWord
:
function
(
att_word
){
debugger
;
...
...
o2web/source/x_component_process_Xform/Form.js
浏览文件 @
8a6dc512
...
...
@@ -1564,7 +1564,17 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class(
this
.
modifedData
=
{};
this
.
setModifedData
(
data
);
this
.
workAction
.
saveData
(
callback
||
function
()
{
},
failure
,
this
.
businessData
.
work
.
id
,
this
.
modifedData
);
if
(
this
.
toWordSaveList
&&
this
.
toWordSaveList
.
length
){
var
p
=
[];
this
.
toWordSaveList
.
each
(
function
(
editor
){
if
(
editor
.
docToWord
)
p
.
push
(
new
Promise
(
function
(
resolve
){
editor
.
docToWord
(
resolve
)
}));
});
Promise
.
all
(
p
).
then
(
function
(){
this
.
workAction
.
saveData
(
callback
||
function
()
{
},
failure
,
this
.
businessData
.
work
.
id
,
this
.
modifedData
);
}.
bind
(
this
));
}
else
{
this
.
workAction
.
saveData
(
callback
||
function
()
{
},
failure
,
this
.
businessData
.
work
.
id
,
this
.
modifedData
);
}
this
.
businessData
.
originalData
=
null
;
this
.
businessData
.
originalData
=
Object
.
clone
(
data
);
...
...
@@ -2515,12 +2525,28 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class(
medias
=
medias
.
concat
(
mds
)
}
_self
.
submitWork
(
routeName
,
opinion
,
medias
,
function
()
{
this
.
destroy
();
processNode
.
destroy
();
if
(
_self
.
processDlg
)
_self
.
processDlg
.
close
();
delete
this
;
}.
bind
(
this
),
this
,
null
,
appendTaskIdentityList
,
processorOrgList
,
callbackBeforeSave
);
var
promise
;
if
(
this
.
toWordSubmitList
&&
this
.
toWordSubmitList
.
length
){
var
p
=
[];
this
.
toWordSubmitList
.
each
(
function
(
editor
){
if
(
editor
.
docToWord
)
p
.
push
(
new
Promise
(
function
(
resolve
){
editor
.
docToWord
(
resolve
)
}));
});
Promise
.
all
(
p
).
then
(
function
(){
_self
.
submitWork
(
routeName
,
opinion
,
medias
,
function
()
{
this
.
destroy
();
processNode
.
destroy
();
if
(
_self
.
processDlg
)
_self
.
processDlg
.
close
();
delete
this
;
}.
bind
(
this
),
this
,
null
,
appendTaskIdentityList
,
processorOrgList
,
callbackBeforeSave
);
}.
bind
(
this
));
}
else
{
_self
.
submitWork
(
routeName
,
opinion
,
medias
,
function
()
{
this
.
destroy
();
processNode
.
destroy
();
if
(
_self
.
processDlg
)
_self
.
processDlg
.
close
();
delete
this
;
}.
bind
(
this
),
this
,
null
,
appendTaskIdentityList
,
processorOrgList
,
callbackBeforeSave
);
}
}
},
this
);
}.
bind
(
this
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录