Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
699282d7
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,发现更多精彩内容 >>
提交
699282d7
编写于
11月 08, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加查询语句相关API方法
上级
c9857b39
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
224 addition
and
39 deletion
+224
-39
o2web/source/o2_core/o2/xScript/CMSEnvironment.js
o2web/source/o2_core/o2/xScript/CMSEnvironment.js
+56
-11
o2web/source/o2_core/o2/xScript/Environment.js
o2web/source/o2_core/o2/xScript/Environment.js
+56
-11
o2web/source/o2_core/o2/xScript/PageEnvironment.js
o2web/source/o2_core/o2/xScript/PageEnvironment.js
+56
-11
o2web/source/o2_core/o2/xScript/ViewEnvironment.js
o2web/source/o2_core/o2/xScript/ViewEnvironment.js
+49
-4
o2web/source/x_component_query_StatementDesigner/Main.js
o2web/source/x_component_query_StatementDesigner/Main.js
+3
-0
o2web/source/x_component_query_ViewDesigner/Main.js
o2web/source/x_component_query_ViewDesigner/Main.js
+1
-0
o2web/source/x_component_query_ViewDesigner/Property.js
o2web/source/x_component_query_ViewDesigner/Property.js
+3
-2
未找到文件。
o2web/source/o2_core/o2/xScript/CMSEnvironment.js
浏览文件 @
699282d7
...
...
@@ -697,22 +697,67 @@ MWF.xScript.CMSEnvironment = function(ev){
this
.
statement
=
{
"
execute
"
:
function
(
statement
,
callback
,
async
)
{
var
filterList
=
{
"
filterList
"
:
(
statement
.
filter
||
null
)
};
MWF
.
Actions
.
get
(
"
x_query_assemble_surface
"
).
executeStatement
(
statement
.
view
,
statement
.
application
,
filterList
,
function
(
json
)
{
var
data
=
{
"
grid
"
:
json
.
data
.
grid
,
};
if
(
callback
)
callback
(
data
);
},
null
,
async
);
var
parameter
=
this
.
parseParameter
(
statement
.
parameter
);
var
filterList
=
this
.
parseFilter
(
statement
.
filter
,
parameter
);
var
obj
=
{
"
filterList
"
:
filterList
,
"
parameter
"
:
parameter
};
MWF
.
Actions
.
load
(
"
x_query_assemble_surface
"
).
StatementAction
.
executeV2
(
statement
.
name
,
statement
.
mode
||
"
data
"
,
statement
.
page
||
1
,
statement
.
pageSize
||
20
,
obj
,
function
(
json
)
{
if
(
callback
)
callback
(
json
);
},
null
,
async
);
},
parseFilter
:
function
(
filter
,
parameter
){
if
(
typeOf
(
filter
)
!==
"
array
"
)
return
[];
var
filterList
=
[];
(
filter
||
[]
).
each
(
function
(
d
)
{
var
parameterName
=
d
.
path
.
replace
(
/
\.
/g
,
"
_
"
);
var
value
=
d
.
value
;
if
(
d
.
comparison
===
"
like
"
||
d
.
comparison
===
"
notLike
"
){
if
(
value
.
substr
(
0
,
1
)
!==
"
%
"
)
value
=
"
%
"
+
value
;
if
(
value
.
substr
(
value
.
length
-
1
,
1
)
!==
"
%
"
)
value
=
value
+
"
%
"
;
parameter
[
parameterName
]
=
value
;
//"%"+value+"%";
}
else
{
if
(
d
.
formatType
===
"
dateTimeValue
"
||
d
.
formatType
===
"
datetimeValue
"
){
value
=
"
{ts '
"
+
value
+
"
'}
"
}
else
if
(
d
.
formatType
===
"
dateValue
"
){
value
=
"
{d '
"
+
value
+
"
'}
"
}
else
if
(
d
.
formatType
===
"
timeValue
"
){
value
=
"
{t '
"
+
value
+
"
'}
"
}
parameter
[
parameterName
]
=
value
;
}
d
.
value
=
parameterName
;
filterList
.
push
(
d
);
}.
bind
(
this
));
return
filterList
;
},
parseParameter
:
function
(
obj
){
if
(
typeOf
(
obj
)
!==
"
object
"
)
return
{};
var
parameter
=
{};
//传入的参数
for
(
var
p
in
obj
){
var
value
=
obj
[
p
];
if
(
typeOf
(
value
)
===
"
date
"
){
value
=
"
{ts '
"
+
value
.
format
(
"
db
"
)
+
"
'}
"
}
parameter
[
p
]
=
value
;
}
return
parameter
;
},
"
select
"
:
function
(
statement
,
callback
,
options
)
{
if
(
statement
.
statement
)
{
if
(
statement
.
name
)
{
// var parameter = this.parseParameter(statement.parameter);
// var filterList = this.parseFilter(statement.filter, parameter);
var
statementJson
=
{
"
application
"
:
statement
.
application
||
_form
.
json
.
application
,
"
statementName
"
:
statement
.
statement
||
""
,
"
statementId
"
:
statement
.
name
||
""
,
"
isTitle
"
:
(
statement
.
isTitle
===
false
)
?
"
no
"
:
"
yes
"
,
"
select
"
:
(
statement
.
isMulti
===
false
)
?
"
single
"
:
"
multi
"
,
"
filter
"
:
statement
.
filter
"
filter
"
:
statement
.
filter
,
"
parameter
"
:
statement
.
parameter
};
if
(
!
options
)
options
=
{};
options
.
width
=
statement
.
width
;
...
...
o2web/source/o2_core/o2/xScript/Environment.js
浏览文件 @
699282d7
...
...
@@ -866,22 +866,67 @@ MWF.xScript.Environment = function(ev){
this
.
statement
=
{
"
execute
"
:
function
(
statement
,
callback
,
async
)
{
var
filterList
=
{
"
filterList
"
:
(
statement
.
filter
||
null
)
};
MWF
.
Actions
.
get
(
"
x_query_assemble_surface
"
).
execute
(
statement
.
view
,
statement
.
application
,
filterList
,
function
(
json
)
{
var
data
=
{
"
grid
"
:
json
.
data
.
grid
,
};
if
(
callback
)
callback
(
data
);
},
null
,
async
);
var
parameter
=
this
.
parseParameter
(
statement
.
parameter
);
var
filterList
=
this
.
parseFilter
(
statement
.
filter
,
parameter
);
var
obj
=
{
"
filterList
"
:
filterList
,
"
parameter
"
:
parameter
};
MWF
.
Actions
.
load
(
"
x_query_assemble_surface
"
).
StatementAction
.
executeV2
(
statement
.
name
,
statement
.
mode
||
"
data
"
,
statement
.
page
||
1
,
statement
.
pageSize
||
20
,
obj
,
function
(
json
)
{
if
(
callback
)
callback
(
json
);
},
null
,
async
);
},
parseFilter
:
function
(
filter
,
parameter
){
if
(
typeOf
(
filter
)
!==
"
array
"
)
return
[];
var
filterList
=
[];
(
filter
||
[]
).
each
(
function
(
d
)
{
var
parameterName
=
d
.
path
.
replace
(
/
\.
/g
,
"
_
"
);
var
value
=
d
.
value
;
if
(
d
.
comparison
===
"
like
"
||
d
.
comparison
===
"
notLike
"
){
if
(
value
.
substr
(
0
,
1
)
!==
"
%
"
)
value
=
"
%
"
+
value
;
if
(
value
.
substr
(
value
.
length
-
1
,
1
)
!==
"
%
"
)
value
=
value
+
"
%
"
;
parameter
[
parameterName
]
=
value
;
//"%"+value+"%";
}
else
{
if
(
d
.
formatType
===
"
dateTimeValue
"
||
d
.
formatType
===
"
datetimeValue
"
){
value
=
"
{ts '
"
+
value
+
"
'}
"
}
else
if
(
d
.
formatType
===
"
dateValue
"
){
value
=
"
{d '
"
+
value
+
"
'}
"
}
else
if
(
d
.
formatType
===
"
timeValue
"
){
value
=
"
{t '
"
+
value
+
"
'}
"
}
parameter
[
parameterName
]
=
value
;
}
d
.
value
=
parameterName
;
filterList
.
push
(
d
);
}.
bind
(
this
));
return
filterList
;
},
parseParameter
:
function
(
obj
){
if
(
typeOf
(
obj
)
!==
"
object
"
)
return
{};
var
parameter
=
{};
//传入的参数
for
(
var
p
in
obj
){
var
value
=
obj
[
p
];
if
(
typeOf
(
value
)
===
"
date
"
){
value
=
"
{ts '
"
+
value
.
format
(
"
db
"
)
+
"
'}
"
}
parameter
[
p
]
=
value
;
}
return
parameter
;
},
"
select
"
:
function
(
statement
,
callback
,
options
)
{
if
(
statement
.
statement
)
{
if
(
statement
.
name
)
{
// var parameter = this.parseParameter(statement.parameter);
// var filterList = this.parseFilter(statement.filter, parameter);
var
statementJson
=
{
"
application
"
:
statement
.
application
||
_form
.
json
.
application
,
"
statementName
"
:
statement
.
statement
||
""
,
"
statementId
"
:
statement
.
name
||
""
,
"
isTitle
"
:
(
statement
.
isTitle
===
false
)
?
"
no
"
:
"
yes
"
,
"
select
"
:
(
statement
.
isMulti
===
false
)
?
"
single
"
:
"
multi
"
,
"
filter
"
:
statement
.
filter
"
filter
"
:
statement
.
filter
,
"
parameter
"
:
statement
.
parameter
};
if
(
!
options
)
options
=
{};
options
.
width
=
statement
.
width
;
...
...
o2web/source/o2_core/o2/xScript/PageEnvironment.js
浏览文件 @
699282d7
...
...
@@ -753,22 +753,67 @@ MWF.xScript.PageEnvironment = function (ev) {
this
.
statement
=
{
"
execute
"
:
function
(
statement
,
callback
,
async
)
{
var
filterList
=
{
"
filterList
"
:
(
statement
.
filter
||
null
)
};
MWF
.
Actions
.
get
(
"
x_query_assemble_surface
"
).
execute
(
statement
.
view
,
statement
.
application
,
filterList
,
function
(
json
)
{
var
data
=
{
"
grid
"
:
json
.
data
.
grid
,
};
if
(
callback
)
callback
(
data
);
},
null
,
async
);
var
parameter
=
this
.
parseParameter
(
statement
.
parameter
);
var
filterList
=
this
.
parseFilter
(
statement
.
filter
,
parameter
);
var
obj
=
{
"
filterList
"
:
filterList
,
"
parameter
"
:
parameter
};
MWF
.
Actions
.
load
(
"
x_query_assemble_surface
"
).
StatementAction
.
executeV2
(
statement
.
name
,
statement
.
mode
||
"
data
"
,
statement
.
page
||
1
,
statement
.
pageSize
||
20
,
obj
,
function
(
json
)
{
if
(
callback
)
callback
(
json
);
},
null
,
async
);
},
parseFilter
:
function
(
filter
,
parameter
){
if
(
typeOf
(
filter
)
!==
"
array
"
)
return
[];
var
filterList
=
[];
(
filter
||
[]
).
each
(
function
(
d
)
{
var
parameterName
=
d
.
path
.
replace
(
/
\.
/g
,
"
_
"
);
var
value
=
d
.
value
;
if
(
d
.
comparison
===
"
like
"
||
d
.
comparison
===
"
notLike
"
){
if
(
value
.
substr
(
0
,
1
)
!==
"
%
"
)
value
=
"
%
"
+
value
;
if
(
value
.
substr
(
value
.
length
-
1
,
1
)
!==
"
%
"
)
value
=
value
+
"
%
"
;
parameter
[
parameterName
]
=
value
;
//"%"+value+"%";
}
else
{
if
(
d
.
formatType
===
"
dateTimeValue
"
||
d
.
formatType
===
"
datetimeValue
"
){
value
=
"
{ts '
"
+
value
+
"
'}
"
}
else
if
(
d
.
formatType
===
"
dateValue
"
){
value
=
"
{d '
"
+
value
+
"
'}
"
}
else
if
(
d
.
formatType
===
"
timeValue
"
){
value
=
"
{t '
"
+
value
+
"
'}
"
}
parameter
[
parameterName
]
=
value
;
}
d
.
value
=
parameterName
;
filterList
.
push
(
d
);
}.
bind
(
this
));
return
filterList
;
},
parseParameter
:
function
(
obj
){
if
(
typeOf
(
obj
)
!==
"
object
"
)
return
{};
var
parameter
=
{};
//传入的参数
for
(
var
p
in
obj
){
var
value
=
obj
[
p
];
if
(
typeOf
(
value
)
===
"
date
"
){
value
=
"
{ts '
"
+
value
.
format
(
"
db
"
)
+
"
'}
"
}
parameter
[
p
]
=
value
;
}
return
parameter
;
},
"
select
"
:
function
(
statement
,
callback
,
options
)
{
if
(
statement
.
statement
)
{
if
(
statement
.
name
)
{
// var parameter = this.parseParameter(statement.parameter);
// var filterList = this.parseFilter(statement.filter, parameter);
var
statementJson
=
{
"
application
"
:
statement
.
application
||
_form
.
json
.
application
,
"
statementName
"
:
statement
.
statement
||
""
,
"
statementId
"
:
statement
.
name
||
""
,
"
isTitle
"
:
(
statement
.
isTitle
===
false
)
?
"
no
"
:
"
yes
"
,
"
select
"
:
(
statement
.
isMulti
===
false
)
?
"
single
"
:
"
multi
"
,
"
filter
"
:
statement
.
filter
"
filter
"
:
statement
.
filter
,
"
parameter
"
:
statement
.
parameter
};
if
(
!
options
)
options
=
{};
options
.
width
=
statement
.
width
;
...
...
o2web/source/o2_core/o2/xScript/ViewEnvironment.js
浏览文件 @
699282d7
...
...
@@ -669,18 +669,63 @@ MWF.xScript.ViewEnvironment = function (ev) {
this
.
statement
=
{
"
execute
"
:
function
(
statement
,
callback
,
async
)
{
var
obj
=
{
"
filterList
"
:
(
statement
.
filter
||
[]),
parameter
:
(
statement
.
parameter
||
{})
};
var
parameter
=
this
.
parseParameter
(
statement
.
parameter
);
var
filterList
=
this
.
parseFilter
(
statement
.
filter
,
parameter
);
var
obj
=
{
"
filterList
"
:
filterList
,
"
parameter
"
:
parameter
};
MWF
.
Actions
.
load
(
"
x_query_assemble_surface
"
).
StatementAction
.
executeV2
(
statement
.
name
,
statement
.
mode
||
"
data
"
,
statement
.
page
||
1
,
statement
.
pageSize
||
20
,
obj
,
function
(
json
)
{
if
(
callback
)
callback
(
json
);
},
null
,
async
);
},
parseFilter
:
function
(
filter
,
parameter
){
if
(
typeOf
(
filter
)
!==
"
array
"
)
return
[];
var
filterList
=
[];
(
filter
||
[]
).
each
(
function
(
d
)
{
var
parameterName
=
d
.
path
.
replace
(
/
\.
/g
,
"
_
"
);
var
value
=
d
.
value
;
if
(
d
.
comparison
===
"
like
"
||
d
.
comparison
===
"
notLike
"
){
if
(
value
.
substr
(
0
,
1
)
!==
"
%
"
)
value
=
"
%
"
+
value
;
if
(
value
.
substr
(
value
.
length
-
1
,
1
)
!==
"
%
"
)
value
=
value
+
"
%
"
;
parameter
[
parameterName
]
=
value
;
//"%"+value+"%";
}
else
{
if
(
d
.
formatType
===
"
dateTimeValue
"
||
d
.
formatType
===
"
datetimeValue
"
){
value
=
"
{ts '
"
+
value
+
"
'}
"
}
else
if
(
d
.
formatType
===
"
dateValue
"
){
value
=
"
{d '
"
+
value
+
"
'}
"
}
else
if
(
d
.
formatType
===
"
timeValue
"
){
value
=
"
{t '
"
+
value
+
"
'}
"
}
parameter
[
parameterName
]
=
value
;
}
d
.
value
=
parameterName
;
filterList
.
push
(
d
);
}.
bind
(
this
));
return
filterList
;
},
parseParameter
:
function
(
obj
){
if
(
typeOf
(
obj
)
!==
"
object
"
)
return
{};
var
parameter
=
{};
//传入的参数
for
(
var
p
in
obj
){
var
value
=
obj
[
p
];
if
(
typeOf
(
value
)
===
"
date
"
){
value
=
"
{ts '
"
+
value
.
format
(
"
db
"
)
+
"
'}
"
}
parameter
[
p
]
=
value
;
}
return
parameter
;
},
"
select
"
:
function
(
statement
,
callback
,
options
)
{
if
(
statement
.
statement
)
{
if
(
statement
.
name
)
{
// var parameter = this.parseParameter(statement.parameter);
// var filterList = this.parseFilter(statement.filter, parameter);
var
statementJson
=
{
"
application
"
:
statement
.
application
||
_form
.
json
.
application
,
"
statementName
"
:
statement
.
statement
||
""
,
"
statementId
"
:
statement
.
name
||
""
,
"
isTitle
"
:
(
statement
.
isTitle
===
false
)
?
"
no
"
:
"
yes
"
,
"
select
"
:
(
statement
.
isMulti
===
false
)
?
"
single
"
:
"
multi
"
,
"
filter
"
:
statement
.
filter
,
...
...
o2web/source/x_component_query_StatementDesigner/Main.js
浏览文件 @
699282d7
...
...
@@ -112,12 +112,15 @@ MWF.xApplication.query.StatementDesigner.Main = new Class({
this
.
statementListNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
statementListNode
}).
inject
(
this
.
node
);
this
.
designerNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
designerNode
}).
inject
(
this
.
node
);
this
.
contentNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
contentNode
}).
inject
(
this
.
node
);
this
.
formContentNode
=
this
.
contentNode
;
},
loadStatementListNodes
:
function
(){
this
.
statementListTitleNode
=
new
Element
(
"
div
"
,
{
...
...
o2web/source/x_component_query_ViewDesigner/Main.js
浏览文件 @
699282d7
...
...
@@ -231,6 +231,7 @@ MWF.xApplication.query.ViewDesigner.Main = new Class({
this
.
contentNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
contentNode
}).
inject
(
this
.
node
);
this
.
formContentNode
=
this
.
contentNode
;
},
//loadViewListNodes-------------------------------
...
...
o2web/source/x_component_query_ViewDesigner/Property.js
浏览文件 @
699282d7
...
...
@@ -929,6 +929,7 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
}
},
loadActionArea
:
function
()
{
debugger
;
MWF
.
xApplication
.
process
=
MWF
.
xApplication
.
process
||
{};
MWF
.
APPFD
=
MWF
.
xApplication
.
process
.
FormDesigner
=
MWF
.
xApplication
.
process
.
FormDesigner
||
{};
MWF
.
xDesktop
.
requireApp
(
"
process.FormDesigner
"
,
"
lp.
"
+
o2
.
language
,
null
,
false
);
...
...
@@ -952,7 +953,7 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
// actionEditor.load(this.module.defaultToolBarsData);
var
actionEditor
=
new
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ActionsEditor
(
node
,
this
.
designer
,
this
.
data
,
{
"
maxObj
"
:
this
.
propertyNode
.
parentElement
.
parentElement
.
parentElement
,
"
maxObj
"
:
this
.
propertyNode
.
parentElement
.
parentElement
,
"
noEditShow
"
:
true
,
"
noReadShow
"
:
true
,
"
onChange
"
:
function
()
{
...
...
@@ -972,7 +973,7 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
MWF
.
xDesktop
.
requireApp
(
"
process.FormDesigner
"
,
"
widget.ActionsEditor
"
,
function
()
{
var
actionEditor
=
new
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ActionsEditor
(
node
,
this
.
designer
,
this
.
data
,
{
"
maxObj
"
:
this
.
propertyNode
.
parentElement
.
parentElement
.
parentElement
,
"
maxObj
"
:
this
.
propertyNode
.
parentElement
.
parentElement
,
"
isSystemTool
"
:
true
,
"
systemToolsAddress
"
:
"
../x_component_query_ViewDesigner/$View/toolbars.json
"
,
"
noCreate
"
:
true
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录