Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
32f2ed9c
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,发现更多精彩内容 >>
提交
32f2ed9c
编写于
11月 30, 2021
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查询视图增加懒加载
上级
0cb7ca06
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
30 addition
and
14 deletion
+30
-14
o2web/source/x_component_query_Query/Statement.js
o2web/source/x_component_query_Query/Statement.js
+30
-14
未找到文件。
o2web/source/x_component_query_Query/Statement.js
浏览文件 @
32f2ed9c
...
...
@@ -4,6 +4,7 @@ MWF.xDesktop.requireApp("query.Query", "Viewer", null, false);
MWF
.
xApplication
.
query
.
Query
.
Statement
=
MWF
.
QStatement
=
new
Class
({
Extends
:
MWF
.
QViewer
,
options
:
{
"
lazy
"
:
false
,
"
moduleEvents
"
:
[
"
queryLoad
"
,
"
postLoad
"
,
"
postLoadPageData
"
,
"
postLoadPage
"
,
"
selectRow
"
,
"
unselectRow
"
,
"
queryLoadItemRow
"
,
"
postLoadItemRow
"
,
"
queryLoadCategoryRow
"
,
"
postLoadCategoryRow
"
,
"
export
"
,
"
exportRow
"
]
},
...
...
@@ -274,6 +275,12 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
if
(
this
.
pageloading
)
return
;
this
.
pageloading
=
true
;
if
(
this
.
io
){
this
.
items
.
each
(
function
(
item
){
this
.
io
.
unobserve
(
item
.
node
);
}.
bind
(
this
))
}
this
.
items
=
[];
var
p
=
this
.
currentPage
;
...
...
@@ -285,6 +292,12 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
while
(
this
.
viewTable
.
rows
.
length
>
1
)
{
this
.
viewTable
.
deleteRow
(
-
1
);
}
if
(
this
.
viewTable
.
rows
.
length
>
0
&&
!
this
.
viewTable
.
rows
[
0
].
hasClass
(
"
viewTitleLine
"
)
){
this
.
viewTable
.
deleteRow
(
0
);
}
this
.
contentAreaNode
.
scrollTo
(
0
,
0
);
//this.createLoadding();
this
.
loadViewRes
=
o2
.
Actions
.
load
(
"
x_query_assemble_surface
"
).
StatementAction
.
executeV2
(
...
...
@@ -352,7 +365,7 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
if
(
this
.
gridJson
.
length
)
{
// if( !this.options.paging ){
this
.
gridJson
.
each
(
function
(
line
,
i
)
{
this
.
items
.
push
(
new
MWF
.
xApplication
.
query
.
Query
.
Statement
.
Item
(
this
,
line
,
null
,
i
));
this
.
items
.
push
(
new
MWF
.
xApplication
.
query
.
Query
.
Statement
.
Item
(
this
,
line
,
null
,
i
,
null
,
this
.
options
.
lazy
));
}.
bind
(
this
));
// }else{
// this.loadPaging();
...
...
@@ -368,7 +381,7 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
var
to
=
Math
.
min
((
this
.
pageNumber
+
1
)
*
this
.
options
.
perPageCount
+
1
,
this
.
gridJson
.
length
);
this
.
isItemsLoading
=
true
;
for
(
var
i
=
from
;
i
<
to
;
i
++
)
{
this
.
items
.
push
(
new
MWF
.
xApplication
.
query
.
Query
.
Statement
.
Item
(
this
,
this
.
gridJson
[
i
],
null
,
i
));
this
.
items
.
push
(
new
MWF
.
xApplication
.
query
.
Query
.
Statement
.
Item
(
this
,
this
.
gridJson
[
i
],
null
,
i
,
null
,
this
.
options
.
lazy
));
}
this
.
isItemsLoading
=
false
;
this
.
pageNumber
++
;
...
...
@@ -664,7 +677,7 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
MWF
.
xApplication
.
query
.
Query
.
Statement
.
Item
=
new
Class
({
Extends
:
MWF
.
xApplication
.
query
.
Query
.
Viewer
.
Item
,
initialize
:
function
(
view
,
data
,
prev
,
i
,
category
)
{
initialize
:
function
(
view
,
data
,
prev
,
i
,
category
,
lazy
)
{
this
.
view
=
view
;
this
.
data
=
data
;
this
.
dataString
=
JSON
.
stringify
(
data
);
...
...
@@ -674,23 +687,18 @@ MWF.xApplication.query.Query.Statement.Item = new Class({
this
.
prev
=
prev
;
this
.
idx
=
i
;
this
.
clazzType
=
"
item
"
;
this
.
lazy
=
lazy
;
this
.
load
();
},
load
:
function
()
{
this
.
view
.
fireEvent
(
"
queryLoadItemRow
"
,
[
null
,
this
]);
_load
:
function
()
{
this
.
loading
=
true
;
if
(
!
this
.
node
)
this
.
view
.
fireEvent
(
"
queryLoadItemRow
"
,
[
null
,
this
]);
var
viewStyles
=
this
.
view
.
viewJson
.
viewStyles
;
var
viewContentTdNode
=
(
viewStyles
&&
viewStyles
[
"
contentTd
"
])
?
viewStyles
[
"
contentTd
"
]
:
this
.
css
.
viewContentTdNode
;
this
.
node
=
new
Element
(
"
tr
"
,
{
"
styles
"
:
(
viewStyles
&&
viewStyles
[
"
contentTr
"
])
?
viewStyles
[
"
contentTr
"
]
:
this
.
css
.
viewContentTrNode
});
if
(
this
.
prev
)
{
this
.
node
.
inject
(
this
.
prev
.
node
,
"
after
"
);
}
else
{
this
.
node
.
inject
(
this
.
view
.
viewTable
);
}
if
(
!
this
.
node
)
this
.
loadNode
();
//if (this.view.json.select==="single" || this.view.json.select==="multi"){
this
.
selectTd
=
new
Element
(
"
td
"
,
{
"
styles
"
:
viewContentTdNode
}).
inject
(
this
.
node
);
...
...
@@ -778,6 +786,11 @@ MWF.xApplication.query.Query.Statement.Item = new Class({
//}
}.
bind
(
this
));
if
(
this
.
placeholderTd
){
this
.
placeholderTd
.
destroy
();
this
.
placeholderTd
=
null
;
}
//默认选中
var
selectedFlag
;
...
...
@@ -815,6 +828,9 @@ MWF.xApplication.query.Query.Statement.Item = new Class({
this
.
setEvent
();
this
.
view
.
fireEvent
(
"
postLoadItemRow
"
,
[
null
,
this
]);
this
.
loading
=
false
;
this
.
loaded
=
true
;
},
selected
:
function
(
from
){
for
(
var
i
=
0
;
i
<
this
.
view
.
selectedItems
.
length
;
i
++
){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录