Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
47ad4768
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
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,发现更多精彩内容 >>
提交
47ad4768
编写于
8月 22, 2022
作者:
NoSubject
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/ie' into 'develop'
ie兼容性修改 See merge request o2oa/o2oa!901
上级
97802122
ab8165fe
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
140 addition
and
118 deletion
+140
-118
gulpfile.js
gulpfile.js
+7
-1
o2web/gulpfile.js
o2web/gulpfile.js
+7
-1
o2web/source/o2_core/o2/xDesktop/Default.js
o2web/source/o2_core/o2/xDesktop/Default.js
+3
-3
o2web/source/x_component_process_Xform/WpsOffice2.js
o2web/source/x_component_process_Xform/WpsOffice2.js
+112
-102
o2web/source/x_desktop/js/base_loader.js
o2web/source/x_desktop/js/base_loader.js
+4
-4
o2web/source/x_desktop/js/ddsso.js
o2web/source/x_desktop/js/ddsso.js
+7
-7
未找到文件。
gulpfile.js
浏览文件 @
47ad4768
...
...
@@ -510,7 +510,13 @@ function build_concat_xform(){
'
o2web/source/
'
+
path
+
'
/*.js
'
,
'
o2web/source/x_component_process_Work/Processor.js
'
,
'
!o2web/source/
'
+
path
+
'
/Documenteditor.js
'
,
'
!o2web/source/
'
+
path
+
'
/Office.js
'
'
!o2web/source/
'
+
path
+
'
/Office.js
'
,
'
!o2web/source/
'
+
path
+
'
/WpsOffice.js
'
,
'
!o2web/source/
'
+
path
+
'
/WpsOffice2.js
'
,
'
!o2web/source/
'
+
path
+
'
/YozoOffice.js
'
,
'
!o2web/source/
'
+
path
+
'
/IWebOffice.js
'
,
'
!o2web/source/
'
+
path
+
'
/OnlyOffice.js
'
,
'
!o2web/source/
'
+
path
+
'
/TinyMCEEditor.js
'
];
var
dest
=
'
target/o2server/servers/webServer/
'
+
path
+
'
/
'
;
return
gulp
.
src
(
src
,
{
sourcemaps
:
true
})
...
...
o2web/gulpfile.js
浏览文件 @
47ad4768
...
...
@@ -213,7 +213,13 @@ function createXFormConcatTask(path, isMin, thisOptions) {
'
source/
'
+
path
+
'
/*.js
'
,
'
source/x_component_process_Work/Processor.js
'
,
'
!source/
'
+
path
+
'
/Documenteditor.js
'
,
'
!source/
'
+
path
+
'
/Office.js
'
'
!source/
'
+
path
+
'
/Office.js
'
,
'
!source/
'
+
path
+
'
/WpsOffice.js
'
,
'
!source/
'
+
path
+
'
/WpsOffice2.js
'
,
'
!source/
'
+
path
+
'
/YozoOffice.js
'
,
'
!source/
'
+
path
+
'
/IWebOffice.js
'
,
'
!source/
'
+
path
+
'
/OnlyOffice.js
'
,
'
!source/
'
+
path
+
'
/TinyMCEEditor.js
'
];
var
dest
=
option
.
dest
+
'
/
'
+
path
+
'
/
'
;
return
gulp
.
src
(
src
,
{
sourcemaps
:
true
})
...
...
o2web/source/o2_core/o2/xDesktop/Default.js
浏览文件 @
47ad4768
...
...
@@ -365,7 +365,7 @@ o2.xDesktop.Default = new Class({
loadDefaultLnk
:
function
(){
if
(
this
.
status
&&
this
.
status
.
flatLnks
&&
this
.
status
.
flatLnks
.
length
){
this
.
status
.
flatLnks
.
each
(
function
(
lnkJson
){
console
.
log
(
lnkJson
.
name
)
//
console.log(lnkJson.name)
this
.
addLnk
(
lnkJson
);
}.
bind
(
this
));
}
else
{
...
...
@@ -2038,7 +2038,7 @@ o2.xDesktop.Default.StartMenu.Item = new Class({
}
},
_drag_leave
:
function
(
el
,
inObj
){
console
.
log
(
"
_drag_leave
"
);
//
console.log("_drag_leave");
if
(
inObj
.
hasClass
(
"
layout_start_content_appContent
"
)){
//this.node.inject(this.menu.appContentNode);
}
else
if
(
inObj
.
hasClass
(
"
layout_start_groupItem_menu_content
"
)){
...
...
@@ -2066,7 +2066,7 @@ o2.xDesktop.Default.StartMenu.Item = new Class({
},
_drag_cancel
:
function
(
dragging
){
console
.
log
(
"
_drag_cancel
"
);
//
console.log("_drag_cancel");
dragging
.
hide
();
if
(
this
.
layout
.
positionNode
)
this
.
layout
.
positionNode
.
hide
();
if
(
this
.
dragRemoveNode
)
this
.
dragRemoveNode
.
hide
();
...
...
o2web/source/x_component_process_Xform/WpsOffice2.js
浏览文件 @
47ad4768
...
...
@@ -422,96 +422,99 @@ console.log("wps:" + this.mode);
});
}.
bind
(
this
));
},
startRevisions
:
async
function
(){
startRevisions
:
function
(){
//开启修订模式
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
// 将当前文档的编辑状态切换成修订模式
app
.
ActiveDocument
.
TrackRevisions
=
true
;
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 将当前文档的编辑状态切换成修订模式
app
.
ActiveDocument
.
TrackRevisions
=
true
;
}.
bind
(
this
))
;
},
stopRevisions
:
async
function
(){
stopRevisions
:
function
(){
//关闭修订模式
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 将当前文档的编辑状态切换成修订模式
app
.
ActiveDocument
.
TrackRevisions
=
false
;
}.
bind
(
this
));
// 将当前文档的编辑状态切换成修订模式
app
.
ActiveDocument
.
TrackRevisions
=
false
;
},
acceptAllRevisions
:
async
function
(
callback
){
acceptAllRevisions
:
function
(
callback
){
//接受所有修订
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
// 获取修订对象
const
revisions
=
await
app
.
ActiveDocument
.
Revisions
;
// 接受对指定文档的所有修订
await
revisions
.
AcceptAll
();
if
(
callback
)
callback
();
},
rejectAllRevisions
:
async
function
(
callback
){
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 获取修订对象
app
.
ActiveDocument
.
Revisions
.
then
(
function
(
revisions
){
// 接受对指定文档的所有修订
revisions
.
AcceptAll
().
then
(
function
(){
if
(
callback
)
callback
();
});
}.
bind
(
this
));
}.
bind
(
this
));
},
rejectAllRevisions
:
function
(
callback
){
//拒绝所有修订
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
// 获取修订对象
const
revisions
=
await
app
.
ActiveDocument
.
Revisions
;
// 拒绝所有修订
await
revisions
.
RejectAll
();
if
(
callback
)
callback
();
},
showRevisions
:
async
function
(){
debugger
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 获取修订对象
app
.
ActiveDocument
.
Revisions
.
then
(
function
(
revisions
){
// 拒绝所有修订
revisions
.
RejectAll
().
then
(
function
(){
if
(
callback
)
callback
();
});
}.
bind
(
this
));
}.
bind
(
this
));
},
showRevisions
:
function
(){
//显示痕迹
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
// 获取节对象
const
View
=
await
app
.
ActiveDocument
.
ActiveWindow
.
View
;
// 设置修订状态为最终状态
View
.
RevisionsView
=
0
;
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 获取节对象
app
.
ActiveDocument
.
ActiveWindow
.
View
.
then
(
function
(
View
){
// 设置修订状态为最终状态
View
.
RevisionsView
=
0
;
// 设置修订状态为 显示标记的最终状态
View
.
ShowRevisionsAndComments
=
true
;
// 设置修订状态为 显示标记的最终状态
View
.
ShowRevisionsAndComments
=
true
;
});
}.
bind
(
this
));
},
hideRevisions
:
async
function
(){
debugger
hideRevisions
:
function
(){
//隐藏
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
// 获取节对象
const
View
=
await
app
.
ActiveDocument
.
ActiveWindow
.
View
;
// 设置修订状态为最终状态
View
.
RevisionsView
=
0
;
// 设置修订状态为 显示标记的最终状态
View
.
ShowRevisionsAndComments
=
false
;
},
addControlButton
:
async
function
(
text
,
callback
){
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
controls
=
await
app
.
CommandBars
(
'
StartTab
'
).
Controls
;
const
controlButton
=
await
controls
.
Add
(
1
);
controlButton
.
Caption
=
text
;
controlButton
.
OnAction
=
callback
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 获取节对象
app
.
ActiveDocument
.
ActiveWindow
.
View
.
then
(
function
(
View
){
// 设置修订状态为最终状态
View
.
RevisionsView
=
0
;
// 设置修订状态为 显示标记的最终状态
View
.
ShowRevisionsAndComments
=
false
;
});
}.
bind
(
this
));
},
print
:
async
function
(){
debugger
addControlButton
:
function
(
text
,
callback
){
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
app
.
CommandBars
(
'
StartTab
'
).
Controls
.
then
(
function
(
controls
){
controls
.
Add
(
1
).
then
(
function
(
controlButton
){
controlButton
.
Caption
=
text
;
controlButton
.
OnAction
=
callback
});
});
}.
bind
(
this
));
},
print
:
function
(){
//隐藏
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
// 页面定制对象:更多菜单
const
printMenu
=
await
app
.
CommandBars
(
'
TabPrintPreview
'
);
await
printMenu
.
Execute
();
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 页面定制对象:更多菜单
app
.
CommandBars
(
'
TabPrintPreview
'
).
then
(
function
(
printMenu
){
printMenu
.
Execute
();
});
}.
bind
(
this
));
},
exportPDF
:
function
(){
var
p1
=
this
.
wpsOffice
.
ready
();
...
...
@@ -649,35 +652,42 @@ console.log("wps:" + this.mode);
this
.
destroy
();
this
.
loadDocument
();
},
hasComments
:
async
function
(
callback
){
hasComments
:
function
(
callback
){
//是否有评论
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
var
hasComments
;
switch
(
this
.
json
.
officeType
){
case
"
word
"
:
hasComments
=
await
app
.
ActiveDocument
.
HasComments
();
break
;
case
"
excel
"
:
hasCommentsconst
=
await
app
.
ActiveWorkbook
.
HasComments
();
break
;
case
"
ppt
"
:
hasComments
=
await
app
.
ActivePresentation
.
HasComments
();
}
if
(
callback
)
callback
(
hasComments
);
},
showComments
:
async
function
(){
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
// 控制评论显示与否
app
.
ActiveDocument
.
ActiveWindow
.
View
.
ShowComments
=
true
;
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
var
hasComments
;
switch
(
this
.
json
.
officeType
){
case
"
word
"
:
hasComments
=
app
.
ActiveDocument
.
HasComments
();
break
;
case
"
excel
"
:
hasComments
=
app
.
ActiveWorkbook
.
HasComments
();
break
;
case
"
ppt
"
:
hasComments
=
app
.
ActivePresentation
.
HasComments
();
}
Promise
.
resolve
(
hasComments
).
then
(
function
(
comments
){
if
(
callback
)
callback
(
comments
);
});
}.
bind
(
this
));
},
showComments
:
function
(){
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 控制评论显示与否
app
.
ActiveDocument
.
ActiveWindow
.
View
.
ShowComments
=
true
;
}.
bind
(
this
));
},
hideComments
:
async
function
(
callback
){
await
this
.
wpsOffice
.
ready
();
const
app
=
this
.
wpsOffice
.
Application
;
// 控制评论显示与否
app
.
ActiveDocument
.
ActiveWindow
.
View
.
ShowComments
=
false
;
hideComments
:
function
(
callback
){
this
.
wpsOffice
.
ready
().
then
(
function
(){
const
app
=
this
.
wpsOffice
.
Application
;
// 控制评论显示与否
app
.
ActiveDocument
.
ActiveWindow
.
View
.
ShowComments
=
false
;
}.
bind
(
this
));
},
getComments
:
function
(
callback
){
var
p1
=
this
.
wpsOffice
.
ready
();
...
...
o2web/source/x_desktop/js/base_loader.js
浏览文件 @
47ad4768
...
...
@@ -188,10 +188,10 @@ if (!layout.isReady) {
};
layout
.
openLoginQywx
=
function
()
{
console
.
log
(
"
开始login。。。。。。。。。。。。。
"
);
//
console.log("开始login。。。。。。。。。。。。。");
var
uri
=
locate
.
href
.
toURI
();
console
.
log
(
"
执行单点。。。。。。。。。。
"
);
//
console.log("执行单点。。。。。。。。。。");
var
action
=
new
MWF
.
xDesktop
.
Actions
.
RestActions
(
""
,
"
x_organization_assemble_authentication
"
,
""
);
action
.
getActions
=
function
(
actionCallback
)
{
this
.
actions
=
{
"
sso
"
:
{
"
uri
"
:
"
/jaxrs/qiyeweixin/code/{code}
"
,
"
method
"
:
"
GET
"
}};
...
...
@@ -202,8 +202,8 @@ if (!layout.isReady) {
"
async
"
:
true
,
"
parameter
"
:
{
"
code
"
:
uri
.
getData
(
"
code
"
)},
"
success
"
:
function
(
json
)
{
console
.
log
(
"
单点成功。
"
);
console
.
log
(
json
);
//
console.log("单点成功。");
//
console.log(json);
//基础数据。。。。
layout
.
session
.
user
=
json
.
data
;
//
...
...
o2web/source/x_desktop/js/ddsso.js
浏览文件 @
47ad4768
...
...
@@ -52,7 +52,7 @@ o2.addReady(function () {
action
.
invoke
({
"
name
"
:
"
auth
"
,
"
async
"
:
true
,
"
parameter
"
:
{
"
code
"
:
info
.
code
},
"
success
"
:
function
(
json
)
{
console
.
debug
(
json
);
//
console.debug(json);
layout
.
session
.
user
=
json
.
data
;
// var ua = navigator.userAgent.toLowerCase();
// console.log(ua);
...
...
@@ -61,18 +61,18 @@ o2.addReady(function () {
// console.log(dd.ios);
// 如果有参数 开始启动流程
if
(
processId
&&
applicationId
)
{
console
.
debug
(
'
获取到了流程信息 processId:
'
+
processId
+
'
, applicationId:
'
+
applicationId
);
//
console.debug('获取到了流程信息 processId:'+processId+', applicationId:'+applicationId);
o2
.
Actions
.
load
(
"
x_processplatform_assemble_surface
"
).
ProcessAction
.
getWithProcessWithApplication
(
processId
,
applicationId
,
function
(
json
)
{
console
.
debug
(
json
);
//
console.debug(json);
if
(
json
.
data
)
{
MWF
.
xDesktop
.
requireApp
(
"
process.TaskCenter
"
,
"
ProcessStarter
"
,
function
()
{
console
.
debug
(
'
启动流程
'
);
//
console.debug('启动流程');
var
starter
=
new
MWF
.
xApplication
.
process
.
TaskCenter
.
ProcessStarter
(
json
.
data
,
layout
.
app
,
{
"
workData
"
:
{},
"
identity
"
:
null
,
"
latest
"
:
false
,
"
onStarted
"
:
function
(
data
,
title
,
processName
)
{
console
.
debug
(
'
启动流程成功。。。。
'
);
//
console.debug('启动流程成功。。。。');
var
currentTask
=
[];
data
.
each
(
function
(
work
)
{
if
(
work
.
currentTaskIndex
!=
-
1
)
currentTask
.
push
(
work
.
taskList
[
work
.
currentTaskIndex
].
work
);
...
...
@@ -84,11 +84,11 @@ o2.addReady(function () {
history
.
replaceState
(
null
,
"
startProcess
"
,
uri
);
if
(
currentTask
.
length
==
1
)
{
var
options
=
{
"
workId
"
:
currentTask
[
0
],
"
appId
"
:
"
process.Work
"
+
currentTask
[
0
]};
console
.
debug
(
options
);
//
console.debug(options);
layout
.
mobile
=
true
;
layout
.
openApplication
(
null
,
"
process.Work
"
,
options
);
}
else
{
console
.
error
(
'
没有task
'
);
//
console.error('没有task');
uri
.
toURI
().
go
();
}
}.
bind
(
this
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录