Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
04304920
o2oa
项目概览
fuyue82
/
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,发现更多精彩内容 >>
提交
04304920
编写于
7月 11, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
自定义表单样式
上级
534a8760
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
157 addition
and
64 deletion
+157
-64
o2web/source/x_component_Selector/FormStyle.js
o2web/source/x_component_Selector/FormStyle.js
+87
-22
o2web/source/x_component_process_FormDesigner/Module/Form.js
o2web/source/x_component_process_FormDesigner/Module/Form.js
+6
-3
o2web/source/x_component_process_FormDesigner/Module/Form/form.html
...ce/x_component_process_FormDesigner/Module/Form/form.html
+8
-2
o2web/source/x_component_process_FormDesigner/Property.js
o2web/source/x_component_process_FormDesigner/Property.js
+46
-34
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
+1
-0
o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js
...omponent_process_ProcessDesigner/widget/PersonSelector.js
+8
-2
o2web/source/x_component_process_Xform/Htmleditor.js
o2web/source/x_component_process_Xform/Htmleditor.js
+1
-1
未找到文件。
o2web/source/x_component_Selector/FormStyle.js
浏览文件 @
04304920
...
...
@@ -16,28 +16,26 @@ MWF.xApplication.Selector.FormStyle = new Class({
var
stylesUrl
=
"
../x_component_process_FormDesigner/Module/Form/skin/config.json
"
;
MWF
.
getJSON
(
stylesUrl
,{
"
onSuccess
"
:
function
(
json
){
var
category
=
this
.
_newItemCategory
({
name
:
"
系统样式
"
,
id
:
"
stystem
"
},
this
,
this
.
itemAreaNode
);
debugger
;
var
subItemList
=
[];
Object
.
each
(
json
,
function
(
s
,
key
){
if
(
s
.
mode
.
contains
(
this
.
options
.
mode
)
){
var
d
=
{
subItemList
.
push
(
{
name
:
s
.
name
,
id
:
key
};
var
item
=
this
.
_newItem
(
d
,
this
,
category
.
children
);
this
.
items
.
push
(
item
);
});
}
}.
bind
(
this
));
var
category
=
this
.
_newItemCategory
({
name
:
"
脚本
"
,
id
:
"
script
"
name
:
"
系统样式
"
,
id
:
"
stystem
"
,
subItemList
:
subItemList
},
this
,
this
.
itemAreaNode
);
var
json
=
{};
var
appJs
=
{};
var
array
=
[];
o2
.
Actions
.
load
(
"
x_processplatform_assemble_designer
"
).
ScriptAction
.
listNext
(
"
(0)
"
,
500
,
function
(
scriptJson
)
{
o2
.
Actions
.
load
(
"
x_processplatform_assemble_designer
"
).
ApplicationAction
.
list
(
function
(
appJson
)
{
appJson
.
data
.
each
(
function
(
app
)
{
...
...
@@ -54,12 +52,16 @@ MWF.xApplication.Selector.FormStyle = new Class({
json
[
script
.
application
].
scriptList
.
push
(
script
)
}.
bind
(
this
));
for
(
var
application
in
json
){
var
category
=
this
.
_newItemCategory
(
json
[
application
],
this
,
category
.
children
);
json
[
application
].
scriptList
.
each
(
function
(
d
){
var
item
=
this
.
_newItem
(
d
,
this
,
category
.
children
);
this
.
items
.
push
(
item
);
}.
bind
(
this
));
if
(
json
[
application
].
scriptList
&&
json
[
application
].
scriptList
.
length
){
array
.
push
(
json
[
application
]
);
}
}
var
category
=
this
.
_newItemCategory
({
name
:
"
自定义样式(脚本)
"
,
id
:
"
script
"
,
applicationList
:
array
},
this
,
this
.
itemAreaNode
);
}.
bind
(
this
))
}.
bind
(
this
));
}.
bind
(
this
)
...
...
@@ -87,7 +89,7 @@ MWF.xApplication.Selector.FormStyle = new Class({
return
true
;
},
_getChildrenItemIds
:
function
(
data
){
return
data
.
scriptList
||
[]
;
return
data
.
scriptList
||
data
.
subItemList
||
data
.
applicationList
;
},
_newItemCategory
:
function
(
data
,
selector
,
item
,
level
){
return
new
MWF
.
xApplication
.
Selector
.
FormStyle
.
ItemCategory
(
data
,
selector
,
item
,
level
)
...
...
@@ -143,8 +145,6 @@ MWF.xApplication.Selector.FormStyle.Item = new Class({
var
selectedItem
=
this
.
selector
.
selectedItems
.
filter
(
function
(
item
,
index
){
if
(
item
.
data
.
id
&&
this
.
data
.
id
){
return
item
.
data
.
id
===
this
.
data
.
id
;
}
else
{
return
item
.
data
.
name
===
this
.
data
.
name
;
}
//return (item.data.id === this.data.id) || (item.data.name === this.data.name);
}.
bind
(
this
));
...
...
@@ -171,8 +171,6 @@ MWF.xApplication.Selector.FormStyle.ItemSelected = new Class({
//return (item.data.id === this.data.id) || (item.data.name === this.data.name);
if
(
item
.
data
.
id
&&
this
.
data
.
id
){
return
item
.
data
.
id
===
this
.
data
.
id
;
}
else
{
return
item
.
data
.
name
===
this
.
data
.
name
;
}
}.
bind
(
this
));
this
.
items
=
items
;
...
...
@@ -188,9 +186,69 @@ MWF.xApplication.Selector.FormStyle.ItemSelected = new Class({
MWF
.
xApplication
.
Selector
.
FormStyle
.
ItemCategory
=
new
Class
({
Extends
:
MWF
.
xApplication
.
Selector
.
Person
.
ItemCategory
,
clickItem
:
function
(
callback
)
{
if
(
this
.
_hasChild
()
)
{
var
firstLoaded
=
!
this
.
loaded
;
this
.
loadSub
(
function
()
{
if
(
firstLoaded
&&
this
.
_hasChild
()
)
{
if
(
!
this
.
selector
.
isFlatCategory
)
{
this
.
children
.
setStyles
({
"
display
"
:
"
block
"
,
"
height
"
:
"
auto
"
});
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_expand
);
this
.
isExpand
=
true
;
}
// this.checkSelectAll();
}
else
{
var
display
=
this
.
children
.
getStyle
(
"
display
"
);
if
(
display
===
"
none
"
)
{
// this.selector.fireEvent("expand", [this] );
this
.
children
.
setStyles
({
"
display
"
:
"
block
"
,
"
height
"
:
"
auto
"
});
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_expand
);
this
.
isExpand
=
true
;
}
else
{
// this.selector.fireEvent("collapse", [this] );
this
.
children
.
setStyles
({
"
display
"
:
"
none
"
,
"
height
"
:
"
0px
"
});
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_collapse
);
this
.
isExpand
=
false
;
}
}
if
(
callback
)
callback
();
}.
bind
(
this
));
}
},
loadSub
:
function
(
callback
)
{
if
(
!
this
.
loaded
)
{
if
(
this
.
data
.
subItemList
){
this
.
data
.
subItemList
.
each
(
function
(
subItem
,
index
)
{
var
item
=
this
.
selector
.
_newItem
(
subItem
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
);
this
.
selector
.
items
.
push
(
item
);
if
(
this
.
subItems
)
this
.
subItems
.
push
(
item
);
}.
bind
(
this
));
}
if
(
this
.
data
.
scriptList
){
this
.
data
.
scriptList
.
each
(
function
(
subItem
,
index
)
{
var
item
=
this
.
selector
.
_newItem
(
subItem
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
);
this
.
selector
.
items
.
push
(
item
);
if
(
this
.
subItems
)
this
.
subItems
.
push
(
item
);
}.
bind
(
this
));
}
if
(
this
.
data
.
applicationList
)
{
this
.
data
.
applicationList
.
each
(
function
(
subCategory
,
index
)
{
var
category
=
this
.
selector
.
_newItemCategory
(
subCategory
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
);
this
.
subCategorys
.
push
(
category
);
}.
bind
(
this
));
}
this
.
loaded
=
true
;
if
(
callback
)
callback
();
}
else
{
if
(
callback
)
callback
();
}
},
_getShowName
:
function
(){
return
this
.
data
.
name
;
},
_getTtiteText
:
function
()
{
return
this
.
data
.
name
;
},
createNode
:
function
(){
this
.
node
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
selector
.
css
.
selectorItemCategory_department
...
...
@@ -200,7 +258,14 @@ MWF.xApplication.Selector.FormStyle.ItemCategory = new Class({
this
.
iconNode
.
setStyle
(
"
background-image
"
,
"
url(
"
+
"
../x_component_Selector/$Selector/default/icon/applicationicon.png)
"
);
},
_hasChild
:
function
(){
return
(
this
.
data
.
scriptList
&&
this
.
data
.
scriptList
.
length
);
return
(
this
.
data
.
scriptList
&&
this
.
data
.
scriptList
.
length
)
||
(
this
.
data
.
subItemList
&&
this
.
data
.
subItemList
.
length
)
||
(
this
.
data
.
applicationList
&&
this
.
data
.
applicationList
.
length
);
},
afterLoad
:
function
(){
if
(
this
.
_hasChild
()
){
this
.
clickItem
();
}
},
check
:
function
(){}
});
o2web/source/x_component_process_FormDesigner/Module/Form.js
浏览文件 @
04304920
...
...
@@ -214,16 +214,19 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({
// "application": script.application
// }
this
.
designer
.
actions
.
getScriptByName
(
scriptObject
.
name
,
scriptObject
.
application
,
function
(
json
)
{
debugger
;
try
{
var
f
=
eval
(
"
(function(){
\n
return
"
+
json
.
data
.
text
+
"
\n
})
"
);
var
j
=
f
();
if
(
callback
)
callback
(
j
);
if
(
typeOf
(
j
)
!==
"
object
"
){
this
.
designer
.
notice
(
MWF
.
APPFD
.
LP
.
notValidJson
,
"
error
"
);
}
else
{
if
(
callback
)
callback
(
j
);
}
}
catch
(
e
)
{
this
.
designer
.
notice
(
e
.
message
,
"
error
"
)
}
}.
bind
(
this
),
function
(
responseJSON
){
this
.
designer
.
notice
(
JSON
.
parse
(
responseJSON
.
responseText
).
message
,
"
error
"
)
this
.
designer
.
notice
(
JSON
.
parse
(
responseJSON
.
responseText
).
message
,
"
error
"
)
;
if
(
callback
)
callback
({});
}.
bind
(
this
))
},
...
...
o2web/source/x_component_process_FormDesigner/Module/Form/form.html
浏览文件 @
04304920
...
...
@@ -42,9 +42,15 @@
<!-- <div class="MWFScriptSelectRefresh"></div>-->
<!-- </td>-->
<!-- </tr>-->
<tr
id=
"text{$.pid}formStyleTypeTr"
style=
"display: text{(typeOf($.currentFormStyle)!='object')?'':'none'}"
>
<td
class=
"editTableValue"
>
<!-- <tr id="text{$.pid}formStyleTypeTr" style="display: text{(typeOf($.currentFormStyle)!='object')?'':'none'}">--
>
<!-- <td class="editTableValue">--
>
<!-- <select class="MWFFormStyle" name="formStyleType"></select>-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td
class=
"editTableTitle"
>
表单样式:
</td>
<td
class=
"editTableValue"
>
<!-- <select class="MWFFormStyle" name="formStyleType"></select>-->
<div
class=
"MWFFormStyleSelect"
name=
"formStyleType"
></div>
<div
class=
"MWFScriptSelectRefresh"
></div>
</td>
...
...
o2web/source/x_component_process_FormDesigner/Property.js
浏览文件 @
04304920
...
...
@@ -1325,6 +1325,7 @@ debugger;
var
_self
=
this
;
formStyleNodes
.
each
(
function
(
node
){
debugger
;
var
data
=
this
.
data
[
node
.
get
(
"
name
"
)];
if
(
typeOf
(
data
)
===
"
string
"
){
for
(
var
key
in
this
.
module
.
form
.
stylesList
){
...
...
@@ -1342,15 +1343,54 @@ debugger;
"
type
"
:
"
FormStyle
"
,
"
count
"
:
1
,
"
names
"
:
[
data
],
"
onChange
"
:
function
(
ids
){
"
selectorOptions
"
:
{
"
mode
"
:
(
this
.
form
.
options
.
mode
||
""
).
toLowerCase
()
===
"
mobile
"
?
"
mobile
"
:
"
pc
"
},
"
validFun
"
:
function
(
ids
)
{
var
flag
=
true
;
if
(
ids
.
length
===
0
){
this
.
designer
.
notice
(
MWF
.
APPFD
.
LP
.
mustSelectFormStyle
,
"
error
"
,
this
.
module
.
form
.
designer
.
propertyContentArea
,
{
x
:
"
right
"
,
y
:
"
bottom
"
});
this
.
designer
.
notice
(
MWF
.
APPFD
.
LP
.
mustSelectFormStyle
,
"
error
"
);
flag
=
false
;
}
else
if
(
ids
[
0
].
data
.
type
===
"
script
"
){
this
.
designer
.
actions
.
getScriptByName
(
ids
[
0
].
data
.
name
,
ids
[
0
].
data
.
application
,
function
(
json
)
{
debugger
;
try
{
var
f
=
eval
(
"
(function(){
\n
return
"
+
json
.
data
.
text
+
"
\n
})
"
);
var
j
=
f
();
if
(
typeOf
(
j
)
!==
"
object
"
){
this
.
designer
.
notice
(
MWF
.
APPFD
.
LP
.
notValidJson
,
"
error
"
);
flag
=
false
;
}
}
catch
(
e
)
{
this
.
designer
.
notice
(
MWF
.
APPFD
.
LP
.
notValidJson
+
"
:
"
+
e
.
message
,
"
error
"
);
flag
=
false
;
}
}.
bind
(
this
),
function
()
{
flag
=
false
;
},
false
);
}
return
flag
;
}.
bind
(
this
),
"
onChange
"
:
function
(
ids
){
var
d
=
ids
[
0
].
data
;
var
data
;
if
(
d
.
type
===
"
script
"
){
data
=
{
"
type
"
:
"
script
"
,
"
name
"
:
d
.
name
,
"
alias
"
:
d
.
alias
,
"
id
"
:
d
.
id
,
"
appName
"
:
d
.
appName
||
d
.
applicationName
,
"
appId
"
:
d
.
appId
,
"
application
"
:
d
.
application
};
}
else
{
this
.
saveFormStyleItem
(
node
,
ids
)
;
data
=
d
.
id
;
}
var
name
=
node
.
get
(
"
name
"
);
var
oldValue
=
this
.
data
[
name
];
this
.
data
[
name
]
=
data
;
this
.
changeData
(
name
,
node
,
oldValue
);
}.
bind
(
this
)
});
...
...
@@ -1459,34 +1499,6 @@ debugger;
// this.data[node.get("name")] = null;
}
},
saveFormStyleItem
:
function
(
node
,
ids
){
debugger
;
if
(
ids
[
0
]){
var
d
=
ids
[
0
].
data
;
if
(
d
.
type
===
"
script
"
){
var
data
=
d
;
}
else
{
var
data
=
{
"
type
"
:
"
script
"
,
"
name
"
:
d
.
name
,
"
alias
"
:
d
.
alias
,
"
id
"
:
d
.
id
,
"
appName
"
:
d
.
appName
||
d
.
applicationName
,
"
appId
"
:
d
.
appId
,
"
application
"
:
d
.
application
};
}
var
name
=
node
.
get
(
"
name
"
);
var
oldValue
=
this
.
data
[
name
];
this
.
data
[
name
]
=
data
;
// this.changeJsonDate(name, data );
this
.
changeData
(
name
,
node
,
oldValue
);
}
else
{
// this.data[node.get("name")] = null;
}
},
removeDutyItem
:
function
(
node
,
item
){
if
(
item
.
data
.
id
){
var
values
=
JSON
.
decode
(
this
.
data
[
node
.
get
(
"
name
"
)]
||
[]);
...
...
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
浏览文件 @
04304920
...
...
@@ -146,6 +146,7 @@ MWF.xApplication.process.FormDesigner.LP = {
"
cancel
"
:
"
取消
"
,
"
newCategory
"
:
"
新分类
"
,
"
mustSelectFormStyle
"
:
"
必须选择一种表单样式
"
,
"
notValidJson
"
:
"
错误的json格式
"
,
"
imageClipper
"
:
"
图片编辑
"
,
...
...
o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js
浏览文件 @
04304920
...
...
@@ -89,7 +89,7 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
processfile
"
)
this
.
identitys
.
push
(
new
MWF
.
widget
.
O2File
(
data
,
this
.
node
));
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
script
"
)
this
.
identitys
.
push
(
new
MWF
.
widget
.
O2Other
(
data
,
this
.
node
));
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
form
S
tyle
"
)
this
.
identitys
.
push
(
new
MWF
.
widget
.
O2Other
(
data
,
this
.
node
));
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
form
s
tyle
"
)
this
.
identitys
.
push
(
new
MWF
.
widget
.
O2Other
(
data
,
this
.
node
));
}.
bind
(
this
));
}
}.
bind
(
this
));
...
...
@@ -128,6 +128,9 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
"
isImage
"
:
this
.
options
.
isImage
,
"
include
"
:
include
,
"
onComplete
"
:
function
(
items
){
if
(
typeOf
(
this
.
options
.
validFun
)
===
"
function
"
&&
!
this
.
options
.
validFun
(
items
)
){
return
;
}
this
.
identitys
=
[];
if
(
this
.
options
.
type
.
toLowerCase
()
!==
"
duty
"
)
this
.
node
.
empty
();
MWF
.
require
(
"
MWF.widget.O2Identity
"
,
function
(){
...
...
@@ -152,7 +155,7 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
processfile
"
)
this
.
identitys
.
push
(
new
MWF
.
widget
.
O2File
(
item
.
data
,
this
.
node
));
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
script
"
)
this
.
identitys
.
push
(
new
MWF
.
widget
.
O2Other
(
item
.
data
,
this
.
node
));
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
form
S
tyle
"
)
this
.
identitys
.
push
(
new
MWF
.
widget
.
O2Other
(
item
.
data
,
this
.
node
));
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
form
s
tyle
"
)
this
.
identitys
.
push
(
new
MWF
.
widget
.
O2Other
(
item
.
data
,
this
.
node
));
}.
bind
(
this
));
if
(
this
.
options
.
type
.
toLowerCase
()
===
"
duty
"
)
{
items
.
each
(
function
(
item
){
...
...
@@ -164,6 +167,9 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
}.
bind
(
this
)
};
if
(
this
.
options
.
title
)
options
.
title
=
this
.
options
.
title
;
if
(
this
.
options
.
selectorOptions
){
options
=
Object
.
merge
(
options
,
this
.
options
.
selectorOptions
);
}
var
selector
=
new
MWF
.
O2Selector
(
this
.
app
.
content
,
options
);
}.
bind
(
this
));
}
...
...
o2web/source/x_component_process_Xform/Htmleditor.js
浏览文件 @
04304920
...
...
@@ -37,7 +37,7 @@ MWF.xApplication.process.Xform.Htmleditor = MWF.APPHtmleditor = new Class({
var
config
=
Object
.
clone
(
this
.
json
.
editorProperties
);
if
(
this
.
json
.
config
){
if
(
this
.
json
.
config
.
code
){
var
obj
=
MWF
.
Macro
.
exec
(
this
.
json
.
config
.
code
,
this
);
var
obj
=
this
.
form
.
Macro
.
exec
(
this
.
json
.
config
.
code
,
this
);
Object
.
each
(
obj
,
function
(
v
,
k
){
config
[
k
]
=
v
;
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录