Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
fa5321ff
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,发现更多精彩内容 >>
提交
fa5321ff
编写于
4月 08, 2020
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
版式正文痕迹保留修改
上级
e9b448d2
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
355 addition
and
183 deletion
+355
-183
o2web/source/x_component_process_Xform/$Form/default/doc.wcss
...b/source/x_component_process_Xform/$Form/default/doc.wcss
+10
-5
o2web/source/x_component_process_Xform/Documenteditor.js
o2web/source/x_component_process_Xform/Documenteditor.js
+54
-53
o2web/source/x_component_process_Xform/widget/DocumentHistory.js
...ource/x_component_process_Xform/widget/DocumentHistory.js
+291
-125
未找到文件。
o2web/source/x_component_process_Xform/$Form/default/doc.wcss
浏览文件 @
fa5321ff
...
...
@@ -156,13 +156,14 @@
"border-left": "1px solid #cccccc"
},
"historyListTitleAreaNode":{
"height": "70px",
"height": "80px",
"padding": "10px 0px"
},
"historyListTitleNode": {
"font-weight": "bold",
"font-size": "14px",
"height": "
3
0px",
"line-height": "
3
0px",
"height": "
4
0px",
"line-height": "
4
0px",
"padding": "0px 10px"
},
"historyListTitleInsertNode": {
...
...
@@ -180,9 +181,11 @@
"historyListContentAreaNode": {
"margin": "5px",
"border": "1px solid #cccccc",
"background-color": "#ffffff"
"background-color": "#ffffff",
"overflow": "auto"
},
"historyListItemNode": {
"margin-bottom": "10px",
"overflow": "hidden",
"padding": "5px 10px",
},
...
...
@@ -198,10 +201,12 @@
"overflow": "hidden",
"padding": "5px 10px",
"cursor": "pointer",
"border": "1px solid #ffffff",
"border-radius": "5px",
"background-color": "#ffffff"
},
"historyListItemDiffNode_over": {
"historyListItemDiffNode_out": {
"border": "1px solid #ffffff",
}
}
o2web/source/x_component_process_Xform/Documenteditor.js
浏览文件 @
fa5321ff
...
...
@@ -3,18 +3,6 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
Extends
:
MWF
.
APP$Module
,
options
:
{
"
moduleEvents
"
:
[
"
load
"
,
"
queryLoad
"
,
"
beforeLoad
"
,
"
postLoad
"
,
"
afterLoad
"
,
"
loadPage
"
],
"
historyColors
"
:
[
"
#d62728
"
,
"
#1f77b4
"
,
"
#ff7f0e
"
,
"
#2ca02c
"
,
"
#8c564b
"
,
"
#9467bd
"
,
"
#17becf
"
,
"
#e377c2
"
,
"
#bcbd22
"
,
"
#ff9896
"
],
"
docPageHeight
"
:
850.4
,
"
docPageFullWidth
"
:
794
,
"
pageShow
"
:
"
single
"
...
...
@@ -646,15 +634,15 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this
.
_doublePage
();
}
this
.
form
.
addEvent
(
"
beforeProcess
"
,
function
(){
this
.
resetData
();
if
(
this
.
checkSaveNewEdition
())
this
.
saveNewDataEdition
();
this
.
notSaveResetData
=
true
;
}.
bind
(
this
));
//
this.form.addEvent("beforeProcess", function(){
//
this.resetData();
//
if (this.checkSaveNewEdition()) this.saveNewDataEdition();
//
this.notSaveResetData = true;
//
}.bind(this));
this
.
form
.
addEvent
(
"
beforeSave
"
,
function
(){
//
this.resetData();
// if (this.checkSaveNewEdition()) this.saveNewData
Edition();
if
(
!
this
.
notSaveResetData
)
this
.
resetData
();
this
.
resetData
();
this
.
checkSaveNew
Edition
();
//
if (!this.notSaveResetData) this.resetData();
}.
bind
(
this
));
if
(
this
.
json
.
toWord
==
"
y
"
){
...
...
@@ -664,12 +652,15 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}
if
(
!
layout
.
mobile
)
this
.
loadSideToolbar
();
o2
.
load
(
"
/o2_lib/diff-match-patch/diff_match_patch.js
"
);
var
id
=
this
.
form
.
businessData
.
data
[
"
$work
"
].
job
;
o2
.
Actions
.
load
(
"
x_processplatform_assemble_surface
"
).
DocumentVersionAction
.
listWithJobCategory
(
id
,
this
.
json
.
id
,
function
(
json
){
this
.
historyDocumentList
=
json
.
data
;
if
(
this
.
historyDocumentList
.
length
){
o2
.
Actions
.
load
(
"
x_processplatform_assemble_surface
"
).
DocumentVersionAction
.
get
(
this
.
historyDocumentList
[
0
].
id
,
function
(
json
){
this
.
prevHistoryData
=
json
.
data
.
data
;
o2
.
Actions
.
load
(
"
x_processplatform_assemble_surface
"
).
DocumentVersionAction
.
get
(
this
.
historyDocumentList
[
this
.
historyDocumentList
.
length
-
1
].
id
,
function
(
json
){
var
data
=
JSON
.
parse
(
json
.
data
.
data
);
this
.
originaHistoryData
=
data
.
data
;
}.
bind
(
this
));
}
}.
bind
(
this
));
...
...
@@ -681,44 +672,54 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this
.
form
.
documenteditorList
.
push
(
this
);
},
checkSaveNewEdition
:
function
(){
// if (!this.allowEdit) return false;
// var originaData = this.form.businessData.originalData[this.json.id];
// if (!originaData || (originaData && originaData.filetext != this.data.filetext)){
// return true;
// }
debugger
;
if
(
this
.
allowEdit
&&
this
.
data
.
filetext
&&
(
this
.
data
.
filetext
!=
this
.
json
.
defaultValue
.
filetext
))
if
(
!
this
.
prevHistoryData
||
(
this
.
prevHistoryData
!=
this
.
data
.
filetext
))
return
true
;
return
false
;
},
saveNewDataEdition
:
function
(
callback
){
checkSaveNewEdition
:
function
(
callback
){
debugger
;
if
(
!
this
.
allowEdit
||
!
this
.
data
.
filetext
||
this
.
data
.
filetext
==
this
.
json
.
defaultValue
.
filetext
)
return
false
;
if
(
this
.
form
.
businessData
.
work
){
//var data = this.data.filetext;
var
data
=
this
.
data
.
filetext
;
// if (this.editMode && this.filetextEditor){
// data = this.filetextEditor.container.getText();
// }else{
// if (this.layout_filetext) data = this.layout_filetext.get("text");
// }
// var activity = this.form.businessData.activity;
// var job = this.form.businessData.work || this.form.businessData.workCompleted;
// var taskUser = (this.form.businessData.task) ? this.form.businessData.task.identity : "";
// var taskPerson = (this.form.businessData.task) ? this.form.businessData.task.person : layout.session.user.distinguishedName;
// var date = new Date();
var
editionData
=
{
"
category
"
:
this
.
json
.
id
,
"
data
"
:
data
};
var
originaData
=
this
.
form
.
businessData
.
originalData
[
this
.
json
.
id
];
var
editionData
=
{
"
category
"
:
this
.
json
.
id
};
if
(
!
originaData
||
!
originaData
.
filetext
||
!
this
.
originaHistoryData
){
//保存原始版本
editionData
.
data
=
JSON
.
stringify
({
"
data
"
:
this
.
data
.
filetext
});
}
else
if
(
originaData
.
filetext
!=
this
.
data
.
filetext
){
//保存历史版本
var
data
=
this
.
data
.
filetext
;
var
earlyData
=
originaData
.
filetext
;
var
dmp
=
new
diff_match_patch
();
var
diff_d
=
dmp
.
diff_main
(
earlyData
,
data
);
dmp
.
diff_cleanupSemantic
(
diff_d
);
var
patch_list
=
dmp
.
patch_make
(
earlyData
,
data
,
diff_d
);
editionData
.
data
=
JSON
.
stringify
({
"
patchs
"
:
dmp
.
patch_toText
(
patch_list
)});
}
else
{
return
false
;
}
o2
.
Actions
.
load
(
"
x_processplatform_assemble_surface
"
).
DocumentVersionAction
.
create
(
this
.
form
.
businessData
.
work
.
id
,
editionData
,
function
(
json
){
this
.
prevHistoryData
=
this
.
data
.
filetext
//originaData.filetext = this.data.filetext;
if
(
callback
)
callback
();
}.
bind
(
this
));
}
//
// if (!this.data.editions) this.data.editions = [];
// this.data.editions.push(editionData);
},
// saveNewDataEdition: function(callback){
// if (this.form.businessData.work){
// var editionData = {"category": this.json.id};
// if (this.form.businessData.originalData[this.json.id] && this.form.businessData.originalData[this.json.id].filetext){
// var data = this.data.filetext;
// var earlyData = this.form.businessData.originalData[this.json.id].filetext;
// var dmp = new diff_match_patch();
// var diff_d = dmp.diff_main(earlyData, data);
// dmp.diff_cleanupSemantic(diff_d);
// var patch_list = dmp.patch_make(earlyData, data, diff_d);
// editionData.data = {"patchs": dmp.patch_toText(patch_list)};
//
// }else{
// editionData.data = {"data": this.data.filetext};
// }
// o2.Actions.load("x_processplatform_assemble_surface").DocumentVersionAction.create(this.form.businessData.work.id, editionData, function(json){
// this.form.businessData.originalData[this.json.id] = this.data.filetext;
// if (callback) callback();
// }.bind(this));
// }
// },
resizeToolbar
:
function
(){
if
(
this
.
toolbarNode
){
var
p
=
this
.
toolNode
.
getPosition
(
this
.
form
.
app
.
content
);
...
...
o2web/source/x_component_process_Xform/widget/DocumentHistory.js
浏览文件 @
fa5321ff
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录