Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
3ac60bbb
o2oa
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa
通知
339
Star
10
Fork
6
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
3ac60bbb
编写于
6月 28, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
允许职务跨层级全选
上级
cd6367ee
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
14 deletion
+30
-14
o2web/source/x_component_Selector/Person.js
o2web/source/x_component_Selector/Person.js
+22
-10
o2web/source/x_component_Selector/Unit.js
o2web/source/x_component_Selector/Unit.js
+4
-2
o2web/source/x_component_Selector/UnitWithType.js
o2web/source/x_component_Selector/UnitWithType.js
+4
-2
未找到文件。
o2web/source/x_component_Selector/Person.js
浏览文件 @
3ac60bbb
...
...
@@ -17,6 +17,7 @@ MWF.xApplication.Selector.Person = new Class({
"
expand
"
:
true
,
"
embedded
"
:
false
,
//是否嵌入在其他容器中
"
selectAllEnable
"
:
false
,
//是否允许全选
"
selectAllRange
"
:
"
direct
"
,
//全选直属人员 还是 所有下级人员
"
level1Indent
"
:
10
,
//第一级的缩进
"
indent
"
:
10
,
//后续的缩进
...
...
@@ -2119,10 +2120,10 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
}).
inject
(
selectAllWrap
);
this
.
selectAllNode
.
addEvent
(
"
click
"
,
function
(
ev
){
if
(
this
.
isSelectedAll
){
this
.
unselectAll
(
ev
);
this
.
selector
.
options
.
selectAllRange
===
"
all
"
?
this
.
unselectAllNested
(
ev
)
:
this
.
unselectAll
(
ev
);
this
.
selector
.
fireEvent
(
"
unselectCatgory
"
,[
this
])
}
else
{
this
.
selectAll
(
ev
);
this
.
select
or
.
options
.
selectAllRange
===
"
all
"
?
this
.
selectAllNested
(
ev
)
:
this
.
select
All
(
ev
);
this
.
selector
.
fireEvent
(
"
selectCatgory
"
,[
this
])
}
ev
.
stopPropagation
();
...
...
@@ -2139,8 +2140,10 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
// this.textNode.setStyle("color", "#333");
//}
if
(
this
.
selectAllNode
&&
!
this
.
_hasChildItem
()
){
this
.
selectAllNode
.
setStyle
(
"
display
"
,
"
none
"
);
if
(
this
.
selectAllNode
){
if
(
this
.
selector
.
options
.
selectAllRange
===
"
direct
"
&&
!
this
.
_hasChildItem
()
){
this
.
selectAllNode
.
setStyle
(
"
display
"
,
"
none
"
);
}
}
this
.
node
.
addEvents
({
...
...
@@ -2202,10 +2205,12 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
}).
inject
(
this
.
node
);
this
.
selectAllNode
.
addEvent
(
"
click
"
,
function
(
ev
){
if
(
this
.
isSelectedAll
){
this
.
unselectAll
(
ev
);
// this.unselectAll(ev);
this
.
selector
.
options
.
selectAllRange
===
"
all
"
?
this
.
unselectAllNested
(
ev
)
:
this
.
unselectAll
(
ev
);
this
.
selector
.
fireEvent
(
"
unselectCatgory
"
,[
this
])
}
else
{
this
.
selectAll
(
ev
);
// this.selectAll(ev);
this
.
selector
.
options
.
selectAllRange
===
"
all
"
?
this
.
selectAllNested
(
ev
)
:
this
.
selectAll
(
ev
);
this
.
selector
.
fireEvent
(
"
selectCatgory
"
,[
this
])
}
ev
.
stopPropagation
();
...
...
@@ -2247,8 +2252,11 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
this
.
actionNode
.
setStyle
(
"
background
"
,
"
transparent
"
);
this
.
textNode
.
setStyle
(
"
color
"
,
"
#777
"
);
}
if
(
this
.
selectAllNode
&&
!
this
.
_hasChildItem
()
){
this
.
selectAllNode
.
setStyle
(
"
display
"
,
"
none
"
);
if
(
this
.
selectAllNode
){
if
(
this
.
selector
.
options
.
selectAllRange
===
"
direct
"
&&
!
this
.
_hasChildItem
()
){
this
.
selectAllNode
.
setStyle
(
"
display
"
,
"
none
"
);
}
}
this
.
setEvent
();
...
...
@@ -2263,6 +2271,9 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
"
styles
"
:
this
.
selector
.
css
.
selectorItemCategory
,
"
title
"
:
this
.
_getTtiteText
()
}).
inject
(
this
.
container
);
},
isSelectAllEnable
:
function
(){
},
unselectAll
:
function
(
ev
,
exclude
){
var
excludeList
=
exclude
||
[];
...
...
@@ -2291,6 +2302,7 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
}
},
selectAllNested
:
function
(){
debugger
;
this
.
selectAll
();
if
(
this
.
subCategorys
&&
this
.
subCategorys
.
length
){
this
.
subCategorys
.
each
(
function
(
category
){
...
...
@@ -2313,7 +2325,7 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
}
},
_selectAll
:
function
(
ev
){
if
(
!
this
.
subItems
||
!
this
.
subItems
.
length
)
return
;
if
(
this
.
selector
.
options
.
selectAllRange
===
"
direct
"
&&
(
!
this
.
subItems
||
!
this
.
subItems
.
length
)
)
return
;
var
count
=
this
.
selector
.
options
.
maxCount
||
this
.
selector
.
options
.
count
;
if
(
!
count
)
count
=
0
;
var
selectedSubItemCount
=
0
;
...
...
@@ -2341,7 +2353,7 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
checkSelectAll
:
function
(){
if
(
!
this
.
isSelectedAll
)
return
;
if
(
!
this
.
selectAllNode
)
return
;
if
(
!
this
.
subItems
)
return
;
if
(
!
this
.
subItems
)
return
;
var
hasSelectedItem
=
false
;
for
(
var
i
=
0
;
i
<
this
.
subItems
.
length
;
i
++
){
if
(
this
.
subItems
[
i
].
isSelected
){
...
...
o2web/source/x_component_Selector/Unit.js
浏览文件 @
3ac60bbb
...
...
@@ -280,10 +280,12 @@ MWF.xApplication.Selector.Unit.Item = new Class({
}).
inject
(
this
.
textNode
,
"
before
"
);
this
.
selectAllNode
.
addEvent
(
"
click
"
,
function
(
ev
){
if
(
this
.
isSelectedAll
){
this
.
unselectAll
(
ev
);
// this.unselectAll(ev);
this
.
selector
.
options
.
selectAllRange
===
"
all
"
?
this
.
unselectAllNested
(
ev
)
:
this
.
unselectAll
(
ev
);
this
.
selector
.
fireEvent
(
"
unselectCatgory
"
,[
this
])
}
else
{
this
.
selectAll
(
ev
);
// this.selectAll(ev);
this
.
selector
.
options
.
selectAllRange
===
"
all
"
?
this
.
selectAllNested
(
ev
)
:
this
.
selectAll
(
ev
);
this
.
selector
.
fireEvent
(
"
selectCatgory
"
,[
this
])
}
ev
.
stopPropagation
();
...
...
o2web/source/x_component_Selector/UnitWithType.js
浏览文件 @
3ac60bbb
...
...
@@ -165,10 +165,12 @@ MWF.xApplication.Selector.UnitWithType.Item = new Class({
//}.bind(this))
this
.
selectAllNode
.
addEvent
(
"
click
"
,
function
(
ev
)
{
if
(
this
.
isSelectedAll
)
{
this
.
unselectAll
(
ev
);
// this.unselectAll(ev);
this
.
selector
.
options
.
selectAllRange
===
"
all
"
?
this
.
unselectAllNested
(
ev
)
:
this
.
unselectAll
(
ev
);
this
.
selector
.
fireEvent
(
"
unselectCatgory
"
,
[
this
])
}
else
{
this
.
selectAll
(
ev
);
// this.selectAll(ev);
this
.
selector
.
options
.
selectAllRange
===
"
all
"
?
this
.
selectAllNested
(
ev
)
:
this
.
selectAll
(
ev
);
this
.
selector
.
fireEvent
(
"
selectCatgory
"
,
[
this
])
}
ev
.
stopPropagation
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录