Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
03911af1
o2oa
项目概览
fuyue82
/
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,发现更多精彩内容 >>
提交
03911af1
编写于
10月 14, 2020
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
表单支持异步返回值脚本
上级
c202a061
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
270 addition
and
184 deletion
+270
-184
o2web/source/o2_core/o2.js
o2web/source/o2_core/o2.js
+4
-3
o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js
o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js
+8
-0
o2web/source/o2_core/o2/xScript/Environment.js
o2web/source/o2_core/o2/xScript/Environment.js
+138
-129
o2web/source/x_component_process_Xform/$Input.js
o2web/source/x_component_process_Xform/$Input.js
+2
-0
o2web/source/x_component_process_Xform/Calendar.js
o2web/source/x_component_process_Xform/Calendar.js
+20
-0
o2web/source/x_component_process_Xform/DatagridPC.js
o2web/source/x_component_process_Xform/DatagridPC.js
+71
-44
o2web/source/x_component_process_Xform/Radio.js
o2web/source/x_component_process_Xform/Radio.js
+14
-4
o2web/source/x_component_process_Xform/Select.js
o2web/source/x_component_process_Xform/Select.js
+13
-4
未找到文件。
o2web/source/o2_core/o2.js
浏览文件 @
03911af1
...
...
@@ -1422,7 +1422,7 @@
}
//Content-Type application/x-www-form-urlencoded; charset=utf-8
res
.
send
(
data
);
var
oReturn
=
(
callback
.
success
&&
callback
.
success
.
addResolve
)
?
callback
.
success
:
callback
;
var
oReturn
=
(
callback
.
success
&&
callback
.
success
.
isAG
)
?
callback
.
success
:
callback
;
oReturn
.
res
=
res
;
return
oReturn
;
}
else
{
...
...
@@ -1624,14 +1624,15 @@
// });
Date
.
getFromServer
=
function
(
async
){
var
d
;
var
cb
=
function
(
json
){
var
cb
=
((
async
&&
o2
.
typeOf
(
async
)
==
"
function
"
)
?
(
async
.
isAG
?
async
:
async
.
ag
())
:
null
)
||
function
(
json
){
//var cb = function(json){
d
=
Date
.
parse
(
json
.
data
.
serverTime
);
return
d
;
}.
ag
().
catch
(
function
(
json
){
return
d
;
});
o2
.
Actions
.
get
(
"
x_program_center
"
).
echo
(
cb
,
null
,
!!
async
);
return
(
!!
async
)
?
c
d
:
d
;
return
(
!!
async
)
?
c
b
:
d
;
// if (callback){
// o2.Actions.get("x_program_center").echo(function(json){
...
...
o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js
浏览文件 @
03911af1
...
...
@@ -91,11 +91,19 @@ MWF.xDesktop.Actions.RestActions = new Class({
var
async
=
(
option
.
async
===
false
)
?
false
:
true
;
if
(
option
.
failure
&&
option
.
failure
.
failure
)
option
.
failure
=
option
.
failure
.
failure
;
if
(
!
option
.
failure
&&
option
.
success
&&
option
.
success
.
failure
){
option
.
failure
=
option
.
success
.
failure
;
option
.
failure
.
owner
=
option
.
success
;
}
if
(
!
option
.
success
){
option
.
success
=
function
(
v
){
return
v
;}.
ag
();
if
(
option
.
failure
)
{
option
.
success
.
catch
(
option
.
failure
);
option
.
failure
.
owner
=
option
.
success
;
}
}
var
callback
=
new
MWF
.
xDesktop
.
Actions
.
RestActions
.
Callback
(
option
.
success
,
option
.
failure
);
if
(
action
.
enctype
&&
(
action
.
enctype
.
toLowerCase
()
==
"
formdata
"
)){
...
...
o2web/source/o2_core/o2/xScript/Environment.js
浏览文件 @
03911af1
此差异已折叠。
点击以展开。
o2web/source/x_component_process_Xform/$Input.js
浏览文件 @
03911af1
...
...
@@ -192,6 +192,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class({
debugger
;
if
(
value
&&
value
.
isAG
){
this
.
moduleValueAG
=
o2
.
AG
.
all
(
value
).
then
(
function
(
v
){
if
(
o2
.
typeOf
(
v
)
==
"
array
"
)
v
=
v
[
0
];
this
.
__setValue
(
v
);
}.
bind
(
this
));
}
else
{
...
...
@@ -258,6 +259,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class({
setData
:
function
(
data
){
if
(
data
&&
data
.
isAG
){
this
.
moduleValueAG
=
o2
.
AG
.
all
(
data
).
then
(
function
(
v
){
if
(
o2
.
typeOf
(
v
)
==
"
array
"
)
v
=
v
[
0
];
this
.
__setData
(
v
);
}.
bind
(
this
));
}
else
{
...
...
o2web/source/x_component_process_Xform/Calendar.js
浏览文件 @
03911af1
...
...
@@ -42,6 +42,15 @@ MWF.xApplication.process.Xform.Calendar = MWF.APPCalendar = new Class({
var
value
=
this
.
_getBusinessData
();
if
(
value
&&
!
isDate
)
return
value
;
if
(
!
value
)
value
=
this
.
_computeValue
();
if
(
value
.
isAG
)
return
value
;
var
d
=
(
!!
value
)
?
Date
.
parse
(
value
)
:
""
;
if
(
isDate
){
return
d
||
null
;
}
else
{
//if (d) value = Date.parse(value).format(this.json.format);
return
(
d
)
?
d
.
format
(
this
.
json
.
format
)
:
""
;
}
return
value
||
""
;
},
...
...
@@ -50,6 +59,17 @@ MWF.xApplication.process.Xform.Calendar = MWF.APPCalendar = new Class({
if
(
!
value
)
value
=
this
.
_computeValue
();
return
value
;
},
__setValue
:
function
(
value
){
var
d
=
Date
.
parse
(
value
);
var
v
=
d
.
format
(
this
.
json
.
format
);
this
.
_setBusinessData
(
value
);
if
(
this
.
node
.
getFirst
())
this
.
node
.
getFirst
().
set
(
"
value
"
,
v
||
""
);
if
(
this
.
readonly
||
this
.
json
.
isReadonly
)
this
.
node
.
set
(
"
text
"
,
v
);
this
.
moduleValueAG
=
null
;
return
value
;
},
clickSelect
:
function
(){
debugger
;
var
_self
=
this
;
...
...
o2web/source/x_component_process_Xform/DatagridPC.js
浏览文件 @
03911af1
...
...
@@ -29,6 +29,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
this
.
deleteable
=
this
.
json
.
deleteable
!==
"
no
"
;
this
.
addable
=
this
.
json
.
addable
!==
"
no
"
;
debugger
;
this
.
gridData
=
this
.
_getValue
();
this
.
totalModules
=
[];
...
...
@@ -38,19 +39,23 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
this
.
_loadDatagridDataModules
();
this
.
_addTitleActionColumn
();
this
.
_loadEditDatagrid
();
this
.
_loadEditDatagrid
(
function
(){
this
.
fireEvent
(
"
postLoad
"
);
this
.
fireEvent
(
"
load
"
);
}.
bind
(
this
));
this
.
fireEvent
(
"
postLoad
"
);
this
.
fireEvent
(
"
load
"
);
//this._loadReadDatagrid();
}
else
{
this
.
_loadDatagridDataModules
();
this
.
_getDatagridEditorTr
();
this
.
_loadReadDatagrid
();
if
(
this
.
editorTr
)
this
.
editorTr
.
setStyle
(
"
display
"
,
"
none
"
);
this
.
_loadReadDatagrid
(
function
(){
if
(
this
.
editorTr
)
this
.
editorTr
.
setStyle
(
"
display
"
,
"
none
"
);
this
.
fireEvent
(
"
postLoad
"
);
this
.
fireEvent
(
"
load
"
);
}.
bind
(
this
));
this
.
fireEvent
(
"
postLoad
"
);
this
.
fireEvent
(
"
load
"
);
}
},
_loadStyles
:
function
(){
...
...
@@ -58,14 +63,18 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
this
.
node
.
setStyles
(
this
.
json
.
styles
);
},
_getValue
:
function
(){
if
(
this
.
moduleValueAG
)
return
this
.
moduleValueAG
;
var
value
=
[];
value
=
this
.
_getBusinessData
();
if
(
!
value
){
if
(
this
.
json
.
defaultData
&&
this
.
json
.
defaultData
.
code
)
value
=
this
.
form
.
Macro
.
exec
(
this
.
json
.
defaultData
.
code
,
this
);
value
=
{
"
data
"
:
value
||
[]};
if
(
!
value
.
isAG
)
if
(
o2
.
typeOf
(
value
)
==
"
array
"
)
value
=
{
"
data
"
:
value
||
[]};
}
return
value
||
{};
},
getValue
:
function
(){
return
this
.
_getValue
();
},
_getDatagridTr
:
function
(){
this
.
_getDatagridTitleTr
();
this
.
_getDatagridEditorTr
();
...
...
@@ -109,7 +118,21 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
//}
},
_loadEditDatagrid
:
function
(){
_loadEditDatagrid
:
function
(
callback
){
debugger
;
if
(
this
.
gridData
&&
this
.
gridData
.
isAG
){
this
.
moduleValueAG
=
this
.
gridData
;
this
.
gridData
.
addResolve
(
function
(
v
){
this
.
gridData
=
v
;
this
.
_loadEditDatagrid
(
callback
);
}.
bind
(
this
));
}
else
{
if
(
o2
.
typeOf
(
this
.
gridData
)
==
"
array
"
)
this
.
gridData
=
{
"
data
"
:
this
.
gridData
};
this
.
__loadEditDatagrid
(
callback
);
this
.
moduleValueAG
=
null
;
}
},
__loadEditDatagrid
:
function
(
callback
){
var
titleThs
=
this
.
titleTr
.
getElements
(
"
th
"
);
var
editorTds
=
this
.
editorTr
.
getElements
(
"
td
"
);
...
...
@@ -129,11 +152,11 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
}.
bind
(
this
));
}.
bind
(
this
));
}
this
.
editorTr
.
setStyle
(
"
display
"
,
"
none
"
);
if
(
callback
)
callback
();
},
_getValueText
:
function
(
idx
,
value
){
debugger
;
var
module
=
this
.
editModules
[
idx
];
...
...
@@ -696,9 +719,22 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
drag
.
start
(
e
);
tr
.
setStyle
(
"
display
"
,
"
none
"
);
},
_loadReadDatagrid
:
function
(){
this
.
gridData
=
this
.
_getValue
();
_loadReadDatagrid
:
function
(
callback
){
if
(
this
.
gridData
&&
this
.
gridData
.
isAG
){
this
.
moduleValueAG
=
this
.
gridData
;
this
.
gridData
.
addResolve
(
function
(
v
){
this
.
gridData
=
v
;
this
.
_loadReadDatagrid
(
callback
);
}.
bind
(
this
));
}
else
{
if
(
o2
.
typeOf
(
this
.
gridData
)
==
"
array
"
)
this
.
gridData
=
{
"
data
"
:
this
.
gridData
};
this
.
__loadReadDatagrid
(
callback
);
this
.
moduleValueAG
=
null
;
}
},
__loadReadDatagrid
:
function
(
callback
){
//this.gridData = this._getValue();
if
(
!
this
.
titleTr
)
this
.
_getDatagridTitleTr
();
//var titleTr = this.table.getElement("tr");
var
titleHeaders
=
this
.
titleTr
.
getElements
(
"
th
"
);
...
...
@@ -728,23 +764,6 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
var
text
=
this
.
_getValueText
(
index
,
v
);
cell
.
set
(
"
text
"
,
text
);
}
// if (typeOf(v)==="array"){
// var textArray = [];
// v.each( function( item ){
// if (typeOf(item)==="object"){
// textArray.push( item.name+((item.unitName) ? "("+item.unitName+")" : "") );
// }else{
// textArray.push(item);
// }
// }.bind(this));
// cell.set("text", textArray.join(", "));
// }else if (typeOf(v)==="object"){
// cell.set("text", v.name+((v.unitName) ? "("+v.unitName+")" : ""));
// }else{
// cell.set("text", v);
// }
break
;
}
}
else
{
//Sequence
...
...
@@ -755,14 +774,9 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
}.
bind
(
this
));
}.
bind
(
this
));
}
//lastTr.destroy();
this
.
_loadTotal
();
// this._loadSequenceRead();
if
(
callback
)
callback
();
},
_loadDatagridStyle
:
function
(){
...
...
@@ -950,13 +964,27 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
this
.
setData
(
this
.
_getValue
());
},
setData
:
function
(
data
){
// if( typeOf( data ) === "object" && typeOf(data.data) === "array" ){
if
(
data
){
this
.
_setBusinessData
(
data
);
this
.
gridData
=
data
;
if
(
!
data
){
data
=
this
.
_getValue
();
}
this
.
_setData
(
data
);
},
_setData
:
function
(
data
){
if
(
data
&&
data
.
isAG
){
this
.
moduleValueAG
=
data
;
data
.
addResolve
(
function
(
v
){
this
.
setData
(
v
);
}.
bind
(
this
));
}
else
{
this
.
gridData
=
this
.
_getValue
();
if
(
o2
.
typeOf
(
data
)
==
"
array
"
)
data
=
{
"
data
"
:
data
};
this
.
__setData
(
data
);
this
.
moduleValueAG
=
null
;
}
},
__setData
:
function
(
data
){
// if( typeOf( data ) === "object" && typeOf(data.data) === "array" ){
this
.
_setBusinessData
(
data
);
this
.
gridData
=
data
;
// if (this.isEdit) this._completeLineEdit();
if
(
this
.
isEdit
){
//如果有在编辑的,取消编辑行
...
...
@@ -999,9 +1027,8 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
}
this
.
_loadDatagridStyle
();
}
},
getTotal
:
function
(){
this
.
_loadTotal
();
return
this
.
totalResaults
;
...
...
@@ -1252,4 +1279,4 @@ MWF.xApplication.process.Xform.DatagridPC$Data = new Class({
}.
bind
(
this
));
}
}
});
\ No newline at end of file
});
o2web/source/x_component_process_Xform/Radio.js
浏览文件 @
03911af1
...
...
@@ -160,6 +160,7 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio = new Class({
_setValue
:
function
(
value
){
this
.
moduleValueAG
=
o2
.
AG
.
all
(
value
).
then
(
function
(
v
){
if
(
o2
.
typeOf
(
v
)
==
"
array
"
)
v
=
v
[
0
];
if
(
this
.
moduleSelectAG
){
this
.
moduleValueAG
=
this
.
moduleSelectAG
;
this
.
moduleSelectAG
.
then
(
function
(){
...
...
@@ -232,14 +233,23 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio = new Class({
setData
:
function
(
data
){
if
(
data
&&
data
.
isAG
){
this
.
moduleValueAG
=
data
;
data
.
addResolve
(
function
(
v
){
this
.
setData
(
v
);
this
.
moduleValueAG
=
o2
.
AG
.
all
(
data
).
then
(
function
(
v
){
if
(
o2
.
typeOf
(
v
)
==
"
array
"
)
v
=
v
[
0
];
this
.
__
setData
(
v
);
}.
bind
(
this
));
}
else
{
this
.
__setData
(
data
);
this
.
moduleValueAG
=
null
;
}
// if (data && data.isAG){
// this.moduleValueAG = data;
// data.addResolve(function(v){
// this.setData(v);
// }.bind(this));
// }else{
// this.__setData(data);
// this.moduleValueAG = null;
// }
},
__setData
:
function
(
data
){
...
...
o2web/source/x_component_process_Xform/Select.js
浏览文件 @
03911af1
...
...
@@ -179,6 +179,7 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect = new Class({
_setValue
:
function
(
value
){
this
.
moduleValueAG
=
o2
.
AG
.
all
(
value
).
then
(
function
(
v
){
if
(
o2
.
typeOf
(
v
)
==
"
array
"
)
v
=
v
[
0
];
if
(
this
.
moduleSelectAG
){
this
.
moduleValueAG
=
this
.
moduleSelectAG
;
this
.
moduleSelectAG
.
then
(
function
(){
...
...
@@ -293,14 +294,22 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect = new Class({
setData
:
function
(
data
){
if
(
data
&&
data
.
isAG
){
this
.
moduleValueAG
=
data
;
data
.
addResolve
(
function
(
v
){
this
.
setData
(
v
);
this
.
moduleValueAG
=
o2
.
AG
.
all
(
data
).
then
(
function
(
v
){
if
(
o2
.
typeOf
(
v
)
==
"
array
"
)
v
=
v
[
0
];
this
.
__
setData
(
v
);
}.
bind
(
this
));
}
else
{
this
.
__setData
(
data
);
this
.
moduleValueAG
=
null
;
}
// if (data && data.isAG){
// this.moduleValueAG = data;
// data.addResolve(function(v){
// this.setData(v);
// }.bind(this));
// }else{
// this.__setData(data);
// this.moduleValueAG = null;
// }
},
__setData
:
function
(
data
){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录