Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
e0d1215b
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,发现更多精彩内容 >>
提交
e0d1215b
编写于
8月 28, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
人员选择器增加配置,当只有一个选项时,默认选中
上级
bd972d8f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
559 addition
and
3 deletion
+559
-3
o2web/source/x_component_Selector/$Selector/default/css.wcss_back
...urce/x_component_Selector/$Selector/default/css.wcss_back
+472
-0
o2web/source/x_component_Selector/Person.js
o2web/source/x_component_Selector/Person.js
+85
-3
o2web/source/x_component_Selector/Unit.js
o2web/source/x_component_Selector/Unit.js
+2
-0
未找到文件。
o2web/source/x_component_Selector/$Selector/default/css.wcss_back
0 → 100644
浏览文件 @
e0d1215b
{
"maskNode": {
"background-color": "#666",
"opacity": 0.4,
"z-index":1000
},
"containerNode": {
"height": "510px",
"width": "700px",
"background-color": "#FFF",
"overflow": "hidden",
"border": "3px solid #666",
"border-radius": "10px",
"box-shadow": "0px 0px 15px #666",
"position": "absolute",
"z-index":1001
},
"containerNode_multiple": {
"height": "550px",
"width": "700px",
"background-color": "#FFF",
"overflow": "hidden",
"border": "3px solid #666",
"border-radius": "10px",
"box-shadow": "0px 0px 15px #666",
"position": "absolute",
"z-index":1001
},
"containerNodeSingle": {
"height": "510px",
"width": "355px",
"background-color": "#FFF",
"overflow": "hidden",
"border": "3px solid #666",
"border-radius": "10px",
"box-shadow": "0px 0px 15px #666",
"position": "absolute",
"z-index":1001
},
"containerNodeSingle_multiple": {
"height": "550px",
"width": "355px",
"background-color": "#FFF",
"overflow": "hidden",
"border": "3px solid #666",
"border-radius": "10px",
"box-shadow": "0px 0px 15px #666",
"position": "absolute",
"z-index":1001
},
"containerNodeMobile": {
"height": "100%",
"width": "100%",
"background-color": "#FFF",
"overflow": "hidden",
"position": "absolute",
"z-index":1001
},
"containerNode_embedded": {
"height": "510px",
"width": "700px",
"background-color": "#FFF",
"overflow": "hidden",
"position": "relative"
},
"containerNode_multiple_embedded": {
"height": "550px",
"width": "700px",
"background-color": "#FFF",
"overflow": "hidden",
"position": "relative"
},
"containerNodeSingle_embedded": {
"height": "510px",
"width": "355px",
"background-color": "#FFF",
"overflow": "hidden",
"position": "relative"
},
"containerNodeSingle_multiple_embedded": {
"height": "550px",
"width": "355px",
"background-color": "#FFF",
"overflow": "hidden",
"position": "relative"
},
"titleNode": {
"height": "30px",
"background-color": "#EEE",
"border-bottom": "1px solid #CCC"
},
"titleNodeMobile": {
"height": "50px",
"text-align": "center",
"background-color": "#4c6b87",
"border-bottom": "1px solid #CCC"
},
"titleTextNode": {
"margin-right": "30px",
"height": "30px",
"padding": "0px 10px",
"color": "#666",
"font-weight": "bold",
"font-size": "14px",
"line-height": "30px"
},
"titleActionNode": {
"width": "30px",
"height": "30px",
"float": "right",
"background": "url("+"../x_component_Selector/$Selector/default/icon/close.png) no-repeat center center",
"cursor": "pointer"
},
"titleTextNodeMobile": {
"margin": "0px 50px",
"height": "50px",
"padding": "0px 10px",
"color": "#FFF",
"font-weight": "bold",
"font-size": "14px",
"line-height": "50px"
},
"titleCancelActionNodeMobile": {
"height": "50px",
"width": "50px",
"text-align": "center",
"color": "#FFF",
"margin": "0px 15px",
"line-height": "50px",
"float": "left",
"font-size": "14px"
},
"titleOkActionNodeMobile": {
"height": "50px",
"width": "50px",
"text-align": "center",
"color": "#FFF",
"margin": "0px 15px",
"line-height": "50px",
"float": "right",
"font-size": "14px"
},
"contentNode": {
"overflow": "hidden"
},
"selectNode": {
"width": "331px",
"height": "410px",
"float": "left",
"margin": "10px 5px 10px 10px",
"border": "2px solid #999",
"border-radius": "6px"
},
"selectNodeSingle": {
"width": "331px",
"height": "410px",
"float": "left",
"margin": "10px",
"border": "2px solid #999",
"border-radius": "6px"
},
"selectNodeMobile":{
"margin": "0px",
"border": "0px solid #999",
"border-radius": "0px"
},
"selectedContainerNode": {
"width": "331px",
"height": "410px",
"float": "right",
"margin": "10px 10px 10px 5px",
"border": "2px solid #999",
"border-radius": "6px",
"overflow" : "hidden"
},
"selectedScrollNode": {
// "width": "331px",
// "height": "410px",
// "float": "right",
// "margin": "10px 10px 10px 5px",
// "border": "2px solid #999",
// "border-radius": "6px",
"width": "323px",
"height": "410px",
"overflow" : "hidden"
},
"selectedNode": {
//"overflow": "hidden"
},
"actionNode": {
"height": "40px",
"width": "300px",
"margin": "auto"
},
"okActionNode": {
"width": "100px",
"height": "30px",
"background": "url("+"../x_component_Selector/$Selector/default/icon/editOk_bg.png) no-repeat center center",
"border": "0px",
"color": "#FFF",
"font-size": "18px",
"padding-left": "35px",
"border-radius": "4px",
"cursor": "pointer"
},
"cancelActionNode": {
"width": "72px",
"height": "30px",
"background": "url("+"../x_component_Selector/$Selector/default/icon/editCancel_bg.png) no-repeat center center",
"border": "0px",
"color": "#FFF",
"font-size": "18px",
"padding-left": "20px",
"border-radius": "4px",
"margin-left": "15px",
"cursor": "pointer"
},
"selectedTopNode" : {
"overflow" : "hidden"
},
"selectedTopTextNode" : {
"float" : "left",
"width" : "40px",
"height": "30px",
"line-height": "30px",
"border-bottom": "1px solid #999"
},
"selectedTopActionNode" : {
"color" : "#3C76B7",
"float" : "right",
"cursor" : "pointer",
"height": "30px",
"line-height": "30px"
},
"selectTopNode" : {
"overflow" : "hidden"
},
"selectTopTextNode" : {
"float" : "left",
"width" : "40px",
"height": "30px",
"line-height": "30px",
"border-bottom": "1px solid #999"
},
"searchInputDiv": {
"height": "30px",
"border-bottom": "1px solid #999"
},
"searchInput": {
"width": "325px",
"height": "24px",
"border": "0px",
"margin": "3px",
"outline": "none"
},
"searchInputSingle": {
"width": "325px",
"height": "24px",
"border": "0px",
"margin": "3px"
},
"letterAreaMobileNode": {
"padding": "0px 9px",
"height": "50px",
"border-bottom": "1px solid #999",
"background-color": "#EEE"
},
"letterAreaNode": {
"width": "312px",
"padding": "0px 9px",
"height": "40px",
"border-bottom": "1px solid #999",
"background-color": "#EEE",
},
"letterNode": {
"height": "20px",
"width": "24px",
"text-align": "center",
"font-weight": "bold",
"float": "left",
"cursor": "pointer",
"font-size": "12px",
"background": "transparent"
},
"letterNode_mobile": {
"height": "22px",
"line-height": "22px",
"width": "15px",
"text-align": "center",
"font-weight": "bold",
"float": "left",
"cursor": "pointer",
"font-size": "11px",
"color": "#666666",
"background": "transparent"
},
"letterNode_over": {
"height": "20px",
"width": "24px",
"text-align": "center",
"font-weight": "bold",
"float": "left",
"cursor": "pointer",
"font-size": "16px",
"background": "#FFF"
},
"itemAreaScrollNode": {
"overflow": "hidden",
"height": "338px"
},
"itemAreaNode": {
"overflow": "hidden"
},
"letterShowNode": {
"text-align": "center",
"font-size": "48px",
"font-weight": "bold",
"position": "absolute",
"color": "#333",
"opacity": 0.6
},
"selectorItem": {
"height": "28px",
"line-height": "28px",
"padding": "0px 10px",
"overflow": "hidden",
"cursor": "pointer",
"border-bottom": "1px solid #FFF",
"background": "transparent"
},
"selectorItemCategory": {
"height": "28px",
"line-height": "28px",
"padding": "0px 10px",
"overflow": "hidden",
"cursor": "pointer",
"border-bottom": "1px solid #FFF",
"background": "#DDD"
},
"selectorItemCategory_department": {
"height": "28px",
"line-height": "28px",
"padding": "0px 10px",
"overflow": "hidden",
"cursor": "pointer",
"border-bottom": "1px solid #FFF",
"background": "#E9E9E9"
},
"selectorItem_over": {
//"height": "28px",
"line-height": "28px",
"padding": "0px 10px",
"overflow": "hidden",
"cursor": "pointer",
"border-bottom": "1px solid #FFF",
"background-color": "#cbdcee"
},
"selectorItem_selected": {
//"height": "28px",
"line-height": "28px",
"padding": "0px 10px",
"overflow": "hidden",
"cursor": "pointer",
"border-bottom": "1px solid #FFF",
"background-color": "#87acd6",
},
"selectorItemLevelNode": {
"width": "0px",
"height": "28px",
"float": "left"
},
"selectorItemLevelNode_expand":{
"background": "url("+"../x_component_Selector/$Selector/default/icon/expand.png) no-repeat center right"
},
"selectorItemLevelNode_collapse":{
"background": "url("+"../x_component_Selector/$Selector/default/icon/collapse.png) no-repeat center right"
},
"selectorItemIconNode": {
"width": "28px",
"height": "28px",
"float": "left",
"background-repeat": "no-repeat",
"background-position": "center center"
},
"selectorItemActionNode": {
"width": "28px",
"height": "28px",
"float": "right",
"background": "transparent"
},
"selectorItemActionNode_selected_over": {
"width": "28px",
"height": "28px",
"float": "right",
"background": "url("+"../x_component_Selector/$Selector/default/icon/remove.png) no-repeat center center"
},
"selectorItemActionNode_over": {
"width": "28px",
"height": "28px",
"float": "right",
"background": "url("+"../x_component_Selector/$Selector/default/icon/right.png) no-repeat center center"
},
"selectorItemActionNode_selected": {
"width": "28px",
"height": "28px",
"float": "right",
"background": "url("+"../x_component_Selector/$Selector/default/icon/check.png) no-repeat center center"
},
"selectorItemCategoryActionNode_expand": {
"width": "28px",
"height": "28px",
"float": "right",
"background": "url("+"../x_component_Selector/$Selector/default/icon/minus.png) no-repeat center center"
},
"selectorItemCategoryActionNode_collapse": {
"width": "28px",
"height": "28px",
"float": "right",
"background": "url("+"../x_component_Selector/$Selector/default/icon/add.png) no-repeat center center"
},
"selectorItemCategoryActionNode_selectAll": {
"width": "28px",
"height": "28px",
"float": "right",
"background": "url("+"../x_component_Selector/$Selector/default/icon/selectall.png) no-repeat center center"
},
"selectorItemTextNode": {
"height": "28px",
"margin": "0px 28px",
"word-wrap": "break-word",
"color": "#000"
},
"selectorItemCategoryTextNode": {
"height": "28px",
"margin": "0px 28px",
"color": "#000",
"font-weight": "bold"
},
"selectorItemTextNode_selected": {
"height": "28px",
"margin-left": "28px",
"color": "#FFF"
},
"selectorItemCategoryChildrenNode": {
"overflow": "hidden",
"margin-left": "0px"
},
"dutyInputDialog":{
"height": "56px",
"clear": "both"
},
"dutyInputNode": {
"border": "1px solid #eee",
"background": "#FFF",
"height": "18px"
},
"filePreviewNode": {
"overflow": "hidden",
"max-width": "300px",
"max-height": "200px"
}
}
\ No newline at end of file
o2web/source/x_component_Selector/Person.js
浏览文件 @
e0d1215b
...
...
@@ -31,6 +31,7 @@ MWF.xApplication.Selector.Person = new Class({
"
noSelectedContainer
"
:
false
,
//是否隐藏右侧已选区域
"
contentUrl
"
:
""
,
//和默认的页面布局不一样的话,可以传入页面布局HTML URL
"
injectToBody
"
:
false
,
//当传入HTML URL的时候是否插入到document.body, false的时候插入到this.container
"
selectSingleItem
"
:
false
,
//当只有一个候选项的时候,是否默认选中
"
flatCategory
"
:
false
,
//扁平化展现分类
...
...
@@ -922,7 +923,8 @@ MWF.xApplication.Selector.Person = new Class({
})
},
loadSelectedNode
:
function
(){
loadSelectedNode
:
function
(
callback
){
if
(
this
.
selectedContainerNode
)
return
;
this
.
selectedContainerNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
selectedContainerNode
}).
inject
(
this
.
contentNode
);
...
...
@@ -988,6 +990,8 @@ MWF.xApplication.Selector.Person = new Class({
this
.
setSelectedItem
();
this
.
loadSelectedNodeScroll
();
if
(
callback
)
callback
();
},
emptySelectedItems
:
function
(){
while
(
this
.
selectedItems
.
length
){
...
...
@@ -1026,7 +1030,6 @@ MWF.xApplication.Selector.Person = new Class({
},
setSelectedItem
:
function
(){
debugger
;
if
(
this
.
options
.
values
.
length
){
this
.
options
.
values
.
each
(
function
(
v
,
i
){
if
(
typeOf
(
v
)
===
"
object
"
){
...
...
@@ -1362,12 +1365,92 @@ MWF.xApplication.Selector.Person = new Class({
}
},
afterLoadSelectItem
:
function
(){
if
(
!
this
.
selectedContainerNode
){
if
(
this
.
options
.
contentUrl
){
}
else
{
if
(
layout
.
mobile
){
}
else
{
this
.
loadSelectedNode
(
function
()
{
this
.
_afterLoadSelectItem
();
}.
bind
(
this
));
}
}
}
else
{
this
.
_afterLoadSelectItem
();
}
},
_afterLoadSelectItem
:
function
(){
if
(
this
.
items
.
length
===
0
&&
this
.
subItems
.
length
===
0
&&
this
.
subCategorys
.
length
===
0
){
this
.
noSelectableItemTextDiv
=
new
Element
(
"
div
"
,
{
text
:
MWF
.
SelectorLP
.
noSelectableItemText
,
styles
:
this
.
css
.
noSelectableItemText
}).
inject
(
this
.
itemAreaNode
);
}
if
(
this
.
options
.
selectSingleItem
){
var
checkItem
=
function
()
{
if
(
this
.
items
.
length
===
1
||
this
.
subItems
.
length
===
1
){
if
(
this
.
items
.
length
===
1
&&
this
.
subItems
.
length
===
0
){
if
(
!
this
.
items
[
0
].
isSelected
)
this
.
items
[
0
].
clickItem
();
}
else
if
(
this
.
items
.
length
===
0
&&
this
.
subItems
.
length
===
1
){
if
(
!
this
.
items
[
0
].
isSelected
)
this
.
subItems
[
0
].
clickItem
();
}
else
if
(
this
.
items
.
length
===
1
&&
this
.
subItems
.
length
===
1
){
if
(
this
.
items
[
0
]
===
this
.
subItems
[
0
]
){
if
(
!
this
.
items
[
0
].
isSelected
)
this
.
items
[
0
].
clickItem
();
}
}
}
}.
bind
(
this
);
var
checkCategoryItem
=
function
(
category
)
{
if
(
!
category
.
subCategorys
||
category
.
subCategorys
.
length
===
0
){
if
(
category
.
subItems
&&
category
.
subItems
.
length
===
1
){
if
(
!
category
.
subItems
[
0
].
isSelected
)
category
.
subItems
[
0
].
clickItem
();
}
}
else
if
(
category
.
subCategorys
.
length
===
1
){
if
(
!
category
.
subCategorys
[
0
].
_hasChild
||
!
category
.
subCategorys
[
0
].
_hasChild
()
){
//category.subCategorys[0].isItem &&
if
(
!
category
.
subItems
[
0
].
isSelected
)
category
.
subItems
[
0
].
clickItem
();
}
else
{
checkCategory
(
category
.
subCategorys
[
0
]
)
}
}
else
{
var
list
=
[];
for
(
var
i
=
0
;
i
<
category
.
subCategorys
.
length
;
i
++
){
if
(
category
.
subCategorys
[
i
].
_hasChild
&&
category
.
subCategorys
[
i
].
_hasChild
()
){
list
.
push
(
category
.
subCategorys
[
i
]
);
}
}
if
(
list
.
length
===
1
){
if
(
!
category
.
subItems
||
category
.
subItems
.
length
===
0
){
checkCategory
(
list
[
0
]
);
}
}
if
(
list
.
length
===
0
){
if
(
category
.
subItems
&&
category
.
subItems
.
length
===
1
){
if
(
!
category
.
subItems
[
0
].
isSelected
)
category
.
subItems
[
0
].
clickItem
();
}
}
}
};
var
checkCategory
=
function
(
category
)
{
if
(
category
.
loaded
){
checkCategoryItem
(
category
)
}
else
if
(
category
.
loading
){
window
.
setTimeout
(
function
()
{
checkCategory
(
category
)
},
100
)
}
};
if
(
this
.
subCategorys
.
length
===
1
)
{
checkCategory
(
this
.
subCategorys
[
0
]
);
}
else
if
(
this
.
subCategorys
.
length
===
0
){
checkItem
();
}
}
this
.
fireEvent
(
"
afterLoadSelectItem
"
,
[
this
]);
},
setSize
:
function
(){
...
...
@@ -2352,7 +2435,6 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
}
},
selectAllNested
:
function
(
ev
,
checkValid
,
selectedNode
){
debugger
;
var
node
;
if
(
selectedNode
)
node
=
new
Element
(
"
div.categorySelectedNode
"
).
inject
(
selectedNode
);
this
.
selectAll
(
ev
,
checkValid
,
node
);
...
...
o2web/source/x_component_Selector/Unit.js
浏览文件 @
e0d1215b
...
...
@@ -798,6 +798,8 @@ MWF.xApplication.Selector.Unit.ItemCategory = new Class({
subJson
.
data
.
each
(
function
(
subData
){
if
(
!
this
.
selector
.
isExcluded
(
subData
)
)
{
var
category
=
this
.
selector
.
_newItem
(
subData
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
);
category
.
isItem
=
true
;
category
.
isCategory
=
true
;
this
.
selector
.
items
.
push
(
category
);
if
(
this
.
subItems
)
this
.
subItems
.
push
(
category
);
this
.
subCategorys
.
push
(
category
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录