Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
40984718
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,发现更多精彩内容 >>
提交
40984718
编写于
11月 05, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查询视图中增加全选功能
上级
2ac66c03
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
136 addition
and
67 deletion
+136
-67
o2web/source/x_component_process_FormDesigner/Module/Statement/statement.html
...nent_process_FormDesigner/Module/Statement/statement.html
+3
-1
o2web/source/x_component_process_FormDesigner/Module/StatementSelector/StatementSelector.html
...mDesigner/Module/StatementSelector/StatementSelector.html
+1
-1
o2web/source/x_component_process_Xform/Statement.js
o2web/source/x_component_process_Xform/Statement.js
+2
-1
o2web/source/x_component_process_Xform/StatementSelector.js
o2web/source/x_component_process_Xform/StatementSelector.js
+47
-46
o2web/source/x_component_query_Query/Statement.js
o2web/source/x_component_query_Query/Statement.js
+49
-15
o2web/source/x_component_query_StatementDesigner/$Statement/view.html
.../x_component_query_StatementDesigner/$Statement/view.html
+34
-3
未找到文件。
o2web/source/x_component_process_FormDesigner/Module/Statement/statement.html
浏览文件 @
40984718
...
...
@@ -64,7 +64,7 @@
<tr>
<td
class=
"editTableTitle"
>
选择文件
</td>
<td
class=
"editTableValue"
>
<select
name=
"select"
>
<select
name=
"select"
onchange=
"$('text{$.pid}selectedAbleScript').setStyle('display', this.options[this.selectedIndex].value === 'no' ? 'none' : 'block');"
>
<option
text
{($.
select
!='
single
'
&&
$.
select
!='
multi
')?'
selected
'
:
''}
value=
"no"
>
不允许
</option>
<option
text
{($
.select=
='single')?'selected':''}
value=
"single"
>
单选
</option>
<option
text
{($
.select=
='multi')?'selected':''}
value=
"multi"
>
多选
</option>
...
...
@@ -166,6 +166,8 @@
<div
class=
"fieldListAreaNode_vf"
style=
"display:none; min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"
></div>
</div>
<div
class=
"MWFScriptArea"
name=
"defaultSelectedScript"
title=
"默认选中行脚本"
></div>
<div
class=
"MWFScriptArea"
name=
"selectedAbleScript"
title=
"允许选择行脚本"
id=
"text{$.pid}selectedAbleScript"
style=
"display: text{($.select=='single' || $.select=='multi')?'':'none'}"
></div>
</div>
<div
title=
"事件"
class=
"MWFTab"
>
...
...
o2web/source/x_component_process_FormDesigner/Module/StatementSelector/StatementSelector.html
浏览文件 @
40984718
...
...
@@ -108,6 +108,7 @@
<div
class=
"MWFScriptArea"
name=
"selectedScript"
title=
"选择结果 (S)"
></div>
</div>
<div
class=
"MWFScriptArea"
name=
"defaultSelectedScript"
title=
"默认选中行脚本"
></div>
<div
class=
"MWFScriptArea"
name=
"selectedAbleScript"
title=
"允许选择行脚本"
></div>
</div>
<div
title=
"过滤"
class=
"MWFTab"
>
<div
class=
"MWFStatementFilter"
>
...
...
@@ -194,7 +195,6 @@
<div
style=
"display:none; height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee"
>
自定义过滤数据
</div>
<div
class=
"fieldListAreaNode_vf"
style=
"display:none; min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"
></div>
</div>
<div
class=
"MWFScriptArea"
name=
"defaultSelectedScript"
title=
"默认选中行脚本"
></div>
</div>
<div
title=
"事件"
class=
"MWFTab"
>
...
...
o2web/source/x_component_process_Xform/Statement.js
浏览文件 @
40984718
...
...
@@ -56,7 +56,8 @@ MWF.xApplication.process.Xform.Statement = MWF.APPStatement = new Class({
"
isExpand
"
:
this
.
json
.
isExpand
||
"
no
"
,
"
showActionbar
"
:
this
.
json
.
actionbar
===
"
show
"
,
"
filter
"
:
filter
,
"
defaultSelectedScript
"
:
this
.
json
.
defaultSelectedScript
?
this
.
json
.
defaultSelectedScript
.
code
:
null
"
defaultSelectedScript
"
:
this
.
json
.
defaultSelectedScript
?
this
.
json
.
defaultSelectedScript
.
code
:
null
,
"
selectedAbleScript
"
:
this
.
json
.
selectedAbleScript
?
this
.
json
.
selectedAbleScript
.
code
:
null
};
//MWF.xDesktop.requireApp("query.Query", "Viewer", function(){
...
...
o2web/source/x_component_process_Xform/StatementSelector.js
浏览文件 @
40984718
...
...
@@ -3,6 +3,50 @@ MWF.xDesktop.requireApp("process.Xform", "ViewSelector", null, false);
MWF
.
xApplication
.
process
.
Xform
.
StatementSelector
=
MWF
.
APPStatementSelector
=
new
Class
({
Implements
:
[
Events
],
Extends
:
MWF
.
xApplication
.
process
.
Xform
.
ViewSelector
,
doResult
:
function
(
data
){
if
(
this
.
json
.
result
===
"
script
"
){
this
.
selectedData
=
data
;
return
(
this
.
json
.
selectedScript
.
code
)
?
this
.
form
.
Macro
.
exec
(
this
.
json
.
selectedScript
.
code
,
this
)
:
""
;
}
else
{
Object
.
each
(
this
.
json
.
selectedSetValues
,
function
(
v
,
k
){
var
value
=
""
;
data
.
each
(
function
(
d
,
idx
){
// Object.each(d, function(dv, dk){
// if (dk===v) value = (value) ? (value+", "+dv) : dv;
// }.bind(this));
var
pathList
=
v
.
split
(
"
.
"
);
for
(
var
i
=
0
;
i
<
pathList
.
length
;
i
++
){
var
p
=
pathList
[
i
];
if
(
(
/
(
^
[
1-9
]\d
*$
)
/
.
test
(
p
))
)
p
=
p
.
toInt
();
if
(
d
[
p
]
){
d
=
d
[
p
];
}
else
{
d
=
""
;
break
;
}
}
if
(
typeOf
(
d
)
===
"
array
"
||
typeOf
(
d
)
===
"
object
"
)
{
d
=
JSON
.
stringify
(
d
);
}
value
=
(
value
)
?
(
value
+
"
,
"
+
d
)
:
d
;
}.
bind
(
this
));
var
field
=
this
.
form
.
all
[
k
];
if
(
field
){
field
.
setData
(
value
);
if
(
value
){
if
(
field
.
descriptionNode
)
field
.
descriptionNode
.
setStyle
(
"
display
"
,
"
none
"
);
}
else
{
if
(
field
.
descriptionNode
)
field
.
descriptionNode
.
setStyle
(
"
display
"
,
"
block
"
);
}
}
}.
bind
(
this
));
}
},
selectView
:
function
(
callback
){
var
viewData
=
this
.
json
.
queryStatement
;
...
...
@@ -28,7 +72,8 @@ MWF.xApplication.process.Xform.StatementSelector = MWF.APPStatementSelector = n
"
isExpand
"
:
this
.
json
.
isExpand
||
"
no
"
,
"
showActionbar
"
:
this
.
json
.
actionbar
===
"
show
"
,
"
filter
"
:
filter
,
"
defaultSelectedScript
"
:
this
.
json
.
defaultSelectedScript
?
this
.
json
.
defaultSelectedScript
.
code
:
null
"
defaultSelectedScript
"
:
this
.
json
.
defaultSelectedScript
?
this
.
json
.
defaultSelectedScript
.
code
:
null
,
"
selectedAbleScript
"
:
this
.
json
.
selectedAbleScript
?
this
.
json
.
selectedAbleScript
.
code
:
null
};
var
options
=
{};
var
width
=
options
.
width
||
"
850
"
;
...
...
@@ -114,50 +159,6 @@ MWF.xApplication.process.Xform.StatementSelector = MWF.APPStatementSelector = n
// }.bind(this));
}.
bind
(
this
));
}
},
doResult
:
function
(
data
){
if
(
this
.
json
.
result
===
"
script
"
){
this
.
selectedData
=
data
;
return
(
this
.
json
.
selectedScript
.
code
)
?
this
.
form
.
Macro
.
exec
(
this
.
json
.
selectedScript
.
code
,
this
)
:
""
;
}
else
{
Object
.
each
(
this
.
json
.
selectedSetValues
,
function
(
v
,
k
){
var
value
=
""
;
data
.
each
(
function
(
d
,
idx
){
// Object.each(d, function(dv, dk){
// if (dk===v) value = (value) ? (value+", "+dv) : dv;
// }.bind(this));
var
pathList
=
v
.
split
(
"
.
"
);
for
(
var
i
=
0
;
i
<
pathList
.
length
;
i
++
){
var
p
=
pathList
[
i
];
if
(
(
/
(
^
[
1-9
]\d
*$
)
/
.
test
(
p
))
)
p
=
p
.
toInt
();
if
(
d
[
p
]
){
d
=
d
[
p
];
}
else
{
d
=
""
;
break
;
}
}
if
(
typeOf
(
d
)
===
"
array
"
||
typeOf
(
d
)
===
"
object
"
)
{
d
=
JSON
.
stringify
(
d
);
}
value
=
(
value
)
?
(
value
+
"
,
"
+
d
)
:
d
;
}.
bind
(
this
));
var
field
=
this
.
form
.
all
[
k
];
if
(
field
){
field
.
setData
(
value
);
if
(
value
){
if
(
field
.
descriptionNode
)
field
.
descriptionNode
.
setStyle
(
"
display
"
,
"
none
"
);
}
else
{
if
(
field
.
descriptionNode
)
field
.
descriptionNode
.
setStyle
(
"
display
"
,
"
block
"
);
}
}
}.
bind
(
this
));
}
},
}
});
o2web/source/x_component_query_Query/Statement.js
浏览文件 @
40984718
...
...
@@ -192,26 +192,30 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
}
if
(
f
.
valueType
===
"
script
"
){
value
=
this
.
Macro
.
exec
(
f
.
valueScript
?
f
.
valueScript
.
code
:
""
,
this
);
}
else
if
(
f
.
value
.
indexOf
(
"
@
"
)
>
-
1
)
{
var
user
=
layout
.
user
;
}
else
{
//
var user = layout.user;
switch
(
f
.
value
)
{
case
"
@person
"
:
value
=
user
.
distinguishedName
;
case
"
person
"
:
//value = user.distinguishedName;
break
;
case
"
@identityList
"
:
value
=
user
.
identityList
.
map
(
function
(
d
)
{
return
d
.
distinguishedName
;
});
case
"
identityList
"
:
//value = user.identityList.map( function (d) {
// return d.distinguishedName;
//});
break
;
case
"
@unitList
"
:
o2
.
Actions
.
load
(
"
x_organization_assemble_express
"
).
UnitAction
.
listWithPerson
({
"
personList
"
:
[
user
.
distinguishedName
]
},
function
(
json
)
{
value
=
json
.
unitList
;
},
null
,
false
);
case
"
unitList
"
:
//o2.Actions.load("x_organization_assemble_express").UnitAction.listWithPerson({ "personList" : [user.distinguishedName] }, function (json) {
// value = json.unitList;
//}, null, false);
break
;
case
"
@unitAllList
"
:
o2
.
Actions
.
load
(
"
x_organization_assemble_express
"
).
UnitAction
.
listWithIdentitySupNested
({
"
personList
"
:
[
user
.
distinguishedName
]
},
function
(
json
)
{
value
=
json
.
unitList
;
},
null
,
false
);
case
"
unitAllList
"
:
//o2.Actions.load("x_organization_assemble_express").UnitAction.listWithIdentitySupNested({ "personList" : [user.distinguishedName] }, function (json) {
// value = json.unitList;
//}, null, false);
break
;
case
"
@year
"
:
value
=
(
new
Date
().
getFullYear
()).
toString
();
...
...
@@ -294,6 +298,7 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
}
this
.
gridJson
=
json
.
data
;
this
.
setSelectedableFlag
();
this
.
fireEvent
(
"
postLoadPageData
"
);
...
...
@@ -331,6 +336,16 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
},
loadData
:
function
(){
if
(
this
.
getSelectFlag
()
===
"
multi
"
&&
this
.
viewJson
.
allowSelectAll
)
{
if
(
this
.
selectTitleCell
&&
this
.
selectTitleCell
.
retrieve
(
"
selectAllLoaded
"
)){
this
.
setUnSelectAllStyle
();
}
else
{
this
.
createSelectAllNode
();
}
}
else
if
(
this
.
selectAllNode
){
this
.
clearSelectAllStyle
();
}
if
(
this
.
gridJson
.
length
){
// if( !this.options.paging ){
this
.
gridJson
.
each
(
function
(
line
,
i
){
...
...
@@ -375,7 +390,7 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
"
path
"
:
entry
.
path
,
"
value
"
:
key
,
"
formatType
"
:
entry
.
formatType
,
"
logic
"
:
"
and
"
,
"
logic
"
:
"
or
"
,
"
comparison
"
:
"
like
"
};
filterData
.
push
(
d
);
...
...
@@ -387,7 +402,7 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
"
path
"
:
entry
.
path
,
"
value
"
:
v
,
"
formatType
"
:
entry
.
formatType
,
"
logic
"
:
"
and
"
,
"
logic
"
:
"
or
"
,
"
comparison
"
:
"
like
"
};
filterData
.
push
(
d
);
...
...
@@ -483,11 +498,12 @@ 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
){
initialize
:
function
(
view
,
data
,
prev
,
i
,
category
){
this
.
view
=
view
;
this
.
data
=
data
;
this
.
css
=
this
.
view
.
css
;
this
.
isSelected
=
false
;
this
.
category
=
category
;
this
.
prev
=
prev
;
this
.
idx
=
i
;
this
.
clazzType
=
"
item
"
;
...
...
@@ -513,6 +529,24 @@ MWF.xApplication.query.Query.Statement.Item = new Class({
this
.
selectTd
=
new
Element
(
"
td
"
,
{
"
styles
"
:
viewContentTdNode
}).
inject
(
this
.
node
);
this
.
selectTd
.
setStyles
({
"
cursor
"
:
"
pointer
"
});
if
(
this
.
view
.
json
.
itemStyles
)
this
.
selectTd
.
setStyles
(
this
.
view
.
json
.
itemStyles
);
//var selectFlag = this.view.json.select || this.view.viewJson.select || "none";
var
selectFlag
=
this
.
view
.
getSelectFlag
();
if
(
this
.
data
.
$selectedEnable
&&
[
"
multi
"
,
"
single
"
].
contains
(
selectFlag
)
&&
this
.
view
.
viewJson
.
selectBoxShow
===
"
always
"
)
{
var
viewStyles
=
this
.
view
.
viewJson
.
viewStyles
;
if
(
viewStyles
)
{
if
(
selectFlag
===
"
single
"
)
{
this
.
selectTd
.
setStyles
(
viewStyles
[
"
radioNode
"
]);
}
else
{
this
.
selectTd
.
setStyles
(
viewStyles
[
"
checkboxNode
"
]);
}
}
else
{
var
iconName
=
"
checkbox
"
;
if
(
selectFlag
===
"
single
"
)
iconName
=
"
radiobox
"
;
this
.
selectTd
.
setStyles
({
"
background
"
:
"
url(
"
+
"
../x_component_query_Query/$Viewer/default/icon/
"
+
iconName
+
"
.png) center center no-repeat
"
});
}
}
if
(
this
.
view
.
isSelectTdHidden
()
){
this
.
selectTd
.
hide
();
}
...
...
o2web/source/x_component_query_StatementDesigner/$Statement/view.html
浏览文件 @
40984718
...
...
@@ -60,9 +60,38 @@
<tr>
<td
class=
"editTableTitle"
>
选择:
</td>
<td
class=
"editTableValue"
>
<input
class=
"editTableRadio"
name=
"data.select"
text
{($.
data.select
!=='
single
'
||
$.
data.select
!=='
multi
'
)?'
checked
'
:
''}
type=
"radio"
value=
"none"
/>
无
<input
class=
"editTableRadio"
name=
"data.select"
text
{($
.data.select=
=='single')?'checked':''}
type=
"radio"
value=
"single"
/>
单选
<input
class=
"editTableRadio"
name=
"data.select"
text
{($
.data.select=
=='multi')?'checked':''}
type=
"radio"
value=
"multi"
/>
多选
<input
class=
"editTableRadio"
name=
"data.select"
text
{($.
data.select
!=='
single
'
||
$.
data.select
!=='
multi
'
)?'
checked
'
:
''}
type=
"radio"
value=
"none"
onclick=
"
if (this.checked){
$('text{$.id}selectBoxShowTr').setStyle('display', 'none');
$('text{$.id}allowSelectAllTr').setStyle('display', 'none');
$('text{$.id}selectedAbleScript').setStyle('display', 'none');
}"
/>
无
<input
class=
"editTableRadio"
name=
"data.select"
text
{($
.data.select=
=='single')?'checked':''}
type=
"radio"
value=
"single"
onclick=
"
if (this.checked){
$('text{$.id}selectBoxShowTr').setStyle('display', 'table-row');
$('text{$.id}allowSelectAllTr').setStyle('display', 'none');
$('text{$.id}selectedAbleScript').setStyle('display', 'block');
}"
/>
单选
<input
class=
"editTableRadio"
name=
"data.select"
text
{($
.data.select=
=='multi')?'checked':''}
type=
"radio"
value=
"multi"
onclick=
"
if (this.checked){
$('text{$.id}selectBoxShowTr').setStyle('display', 'table-row');
$('text{$.id}allowSelectAllTr').setStyle('display', 'table-row');
$('text{$.id}selectedAbleScript').setStyle('display', 'block');
}"
/>
多选
</td>
</tr>
<tr
id=
"text{$.id}selectBoxShowTr"
style=
"display: text{($.data.select=='single' || $.data.select=='multi')?'':'none'}"
>
<td
class=
"editTableTitle"
>
选择框显示:
</td>
<td
class=
"editTableValue"
>
<input
class=
"editTableRadio"
name=
"data.selectBoxShow"
text
{($
.data.selectBoxShow=
=='always')?'checked':''}
type=
"radio"
value=
"always"
/>
一直显示
<input
class=
"editTableRadio"
name=
"data.selectBoxShow"
text
{($.
data.selectBoxShow
!=='
always
')?'
checked
'
:
''}
type=
"radio"
value=
"mouseover"
/>
鼠标经过时
</td>
</tr>
<tr
id=
"text{$.id}allowSelectAllTr"
style=
"display: text{($.data.select=='multi')?'':'none'}"
>
<td
class=
"editTableTitle"
id=
""
>
允许全选:
</td>
<td
class=
"editTableValue"
>
<input
class=
"editTableRadio"
name=
"data.allowSelectAll"
text
{($
.data.allowSelectAll=
==true)?'checked':''}
type=
"radio"
value=
"true"
/>
是
<input
class=
"editTableRadio"
name=
"data.allowSelectAll"
text
{($.
data.allowSelectAll
!==
true
)?'
checked
'
:
''}
type=
"radio"
value=
"false"
/>
否
</td>
</tr>
<tr>
...
...
@@ -85,6 +114,8 @@
</table>
<div
class=
"MWFFormulaArea"
name=
"data.defaultSelectedScript"
title=
"默认选中行脚本"
></div>
<div
class=
"MWFFormulaArea"
name=
"data.selectedAbleScript"
title=
"允许选择行脚本"
id=
"text{$.id}selectedAbleScript"
style=
"display: text{($.data.select=='single' || $.data.select=='multi')?'':'none'}"
></div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录