Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
2165c2ff
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,发现更多精彩内容 >>
提交
2165c2ff
编写于
1月 01, 2021
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jsdoc
上级
ebc556c5
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
351 addition
and
30 deletion
+351
-30
o2web/source/x_component_process_Xform/$Module.js
o2web/source/x_component_process_Xform/$Module.js
+1
-1
o2web/source/x_component_process_Xform/Attachment.js
o2web/source/x_component_process_Xform/Attachment.js
+1
-1
o2web/source/x_component_process_Xform/Documenteditor.js
o2web/source/x_component_process_Xform/Documenteditor.js
+5
-5
o2web/source/x_component_process_Xform/Opinion.js
o2web/source/x_component_process_Xform/Opinion.js
+1
-1
o2web/source/x_component_process_Xform/Org.js
o2web/source/x_component_process_Xform/Org.js
+1
-1
o2web/source/x_component_process_Xform/Radio.js
o2web/source/x_component_process_Xform/Radio.js
+1
-1
o2web/source/x_component_process_Xform/Select.js
o2web/source/x_component_process_Xform/Select.js
+1
-1
o2web/source/x_component_process_Xform/Sidebar.js
o2web/source/x_component_process_Xform/Sidebar.js
+2
-2
o2web/source/x_component_process_Xform/Source.js
o2web/source/x_component_process_Xform/Source.js
+6
-6
o2web/source/x_component_process_Xform/SourceText.js
o2web/source/x_component_process_Xform/SourceText.js
+11
-0
o2web/source/x_component_process_Xform/Stat.js
o2web/source/x_component_process_Xform/Stat.js
+34
-1
o2web/source/x_component_process_Xform/Statement.js
o2web/source/x_component_process_Xform/Statement.js
+52
-2
o2web/source/x_component_process_Xform/StatementSelector.js
o2web/source/x_component_process_Xform/StatementSelector.js
+11
-0
o2web/source/x_component_process_Xform/SubSource.js
o2web/source/x_component_process_Xform/SubSource.js
+24
-1
o2web/source/x_component_process_Xform/Subform.js
o2web/source/x_component_process_Xform/Subform.js
+31
-1
o2web/source/x_component_process_Xform/Tab.js
o2web/source/x_component_process_Xform/Tab.js
+29
-1
o2web/source/x_component_process_Xform/Table.js
o2web/source/x_component_process_Xform/Table.js
+33
-1
o2web/source/x_component_process_Xform/Textarea.js
o2web/source/x_component_process_Xform/Textarea.js
+18
-0
o2web/source/x_component_process_Xform/Textfield.js
o2web/source/x_component_process_Xform/Textfield.js
+1
-1
o2web/source/x_component_process_Xform/View.js
o2web/source/x_component_process_Xform/View.js
+52
-2
o2web/source/x_component_process_Xform/ViewSelector.js
o2web/source/x_component_process_Xform/ViewSelector.js
+11
-0
o2web/source/x_component_process_Xform/Widget.js
o2web/source/x_component_process_Xform/Widget.js
+25
-1
未找到文件。
o2web/source/x_component_process_Xform/$Module.js
浏览文件 @
2165c2ff
...
...
@@ -55,7 +55,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
* @member {MWF.xApplication.process.Xform.Form}
* @example
* var form = this.form.get("fieldId").form; //获取组件所在表单对象
*
form.saveFormData(); //保存表单数据
*
var container = form.container; //获取表单容器
*/
this
.
form
=
form
;
},
...
...
o2web/source/x_component_process_Xform/Attachment.js
浏览文件 @
2165c2ff
...
...
@@ -1068,7 +1068,7 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
}
*/
/** @class A
ctionbar
附件组件。
/** @class A
ttachment
附件组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
...
...
o2web/source/x_component_process_Xform/Documenteditor.js
浏览文件 @
2165c2ff
...
...
@@ -3,7 +3,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
* @example
* //可以在脚本中获取该组件
* //方法1:
* var documenteditor = this.form.get("
name
"); //获取组件
* var documenteditor = this.form.get("
fieldId
"); //获取组件
* //方法2
* var documenteditor = this.target; //在组件事件脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
...
...
@@ -2551,8 +2551,8 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
if
(
typeOf
(
data
)
!==
"
object
"
)
return
true
;
return
!
data
.
filetext
||
data
.
filetext
===
this
.
json
.
defaultValue
.
filetext
;
},
/*
* 获取公文编辑器数据
/*
*
*
@summary
获取公文编辑器数据
* @return {Object} 公文编辑器的数据
* @example
* var data = this.form.get("fieldId").getData();
...
...
@@ -2641,11 +2641,11 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}
},
/**设置公文编辑器数据
* @param
data{Object}
* @param
{Object} data
* @example
* var data = this.form.get("fieldId").getData();
* data.filetext = "测试内容";
* this.form.get("fieldId").
g
etData(data);
* this.form.get("fieldId").
s
etData(data);
*/
setData
:
function
(
data
,
diffFiletext
){
if
(
data
){
...
...
o2web/source/x_component_process_Xform/Opinion.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Input
"
,
null
,
false
);
MWF
.
xDesktop
.
requireApp
(
"
process.Work
"
,
"
lp.
"
+
o2
.
language
,
null
,
false
);
/** @class
process.
Opinion 意见输入框。
/** @class Opinion 意见输入框。
* @example
* //可以在脚本中获取该组件
* //方法1:
...
...
o2web/source/x_component_process_Xform/Org.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Input
"
,
null
,
false
);
MWF
.
xDesktop
.
requireApp
(
"
Selector
"
,
"
package
"
,
null
,
false
);
MWF
.
require
(
"
MWF.widget.O2Identity
"
,
null
,
false
);
/** @class
process.
Org 人员组织组件。
/** @class Org 人员组织组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
...
...
o2web/source/x_component_process_Xform/Radio.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Input
"
,
null
,
false
);
MWF
.
require
(
"
MWF.widget.UUID
"
,
null
,
false
);
/** @class
process.
Radio 单选按钮。
/** @class Radio 单选按钮。
* @example
* //可以在脚本中获取该组件
* //方法1:
...
...
o2web/source/x_component_process_Xform/Select.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Input
"
,
null
,
false
);
/** @class
process.
Select 下拉选择组件。
/** @class Select 下拉选择组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
...
...
o2web/source/x_component_process_Xform/Sidebar.js
浏览文件 @
2165c2ff
...
...
@@ -4,9 +4,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
* @example
* //可以在脚本中获取该组件
* //方法1:
* var sidebar = this.form.get("
name"); //获取
操作条
* var sidebar = this.form.get("
fieldId"); //获取侧边
操作条
* //方法2
* var sidebar = this.target; //在操作条和操作本身的事件脚本中获取
* var sidebar = this.target; //在
侧边
操作条和操作本身的事件脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
...
...
o2web/source/x_component_process_Xform/Source.js
浏览文件 @
2165c2ff
...
...
@@ -4,9 +4,9 @@ MWF.xDesktop.requireApp("process.Xform", "Div", null, false);
* @example
* //可以在脚本中获取该组件
* //方法1:
* var source = this.form.get("
name"); //获取操作条
* var source = this.form.get("
fieldId"); //获取数据源组件
* //方法2
* var source = this.target; //在
操作条和操作本身的事件
脚本中获取
* var source = this.target; //在
组件本身的
脚本中获取
* @extends MWF.xApplication.process.Xform.Div
* @category FormComponents
* @hideconstructor
...
...
@@ -17,13 +17,13 @@ MWF.xApplication.process.Xform.Source = MWF.APPSource = new Class(
Extends
:
MWF
.
APPDiv
,
options
:
{
/**
* 加载数据后执行,但这时还未加载
数据源及下属数据文本
,可以可以使用this.target.data获取数据进行修改。
* @event MWF.xApplication.process.Xform.
Org
#postLoadData
* 加载数据后执行,但这时还未加载
下属组件
,可以可以使用this.target.data获取数据进行修改。
* @event MWF.xApplication.process.Xform.
Source
#postLoadData
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 加载数据、
子数据源及下属数据文本
后执行。
* @event MWF.xApplication.process.Xform.
Org
#loadData
* 加载数据、
下属组件
后执行。
* @event MWF.xApplication.process.Xform.
Source
#loadData
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
"
moduleEvents
"
:
[
"
queryLoad
"
,
"
postLoad
"
,
"
load
"
,
"
postLoadData
"
,
"
loadData
"
]
...
...
o2web/source/x_component_process_Xform/SourceText.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
/** @class SourceText 数据文本组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var sourceText = this.form.get("fieldId"); //获取组件
* //方法2
* var sourceText = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
SourceText
=
MWF
.
APPSourceText
=
new
Class
({
Extends
:
MWF
.
APP$Module
,
...
...
o2web/source/x_component_process_Xform/Stat.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
//MWF.xDesktop.requireApp("process.Xform", "widget.View", null, false);
MWF
.
xApplication
.
process
.
Xform
.
Stat
=
MWF
.
APPStat
=
new
Class
({
/** @class Stat 统计组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var stat = this.form.get("fieldId"); //获取组件
* //方法2
* var stat = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Stat
=
MWF
.
APPStat
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Stat# */
{
Extends
:
MWF
.
APP$Module
,
options
:
{
/**
* 组件异步加载完成触发.
* @event MWF.xApplication.process.Xform.Stat#loadStat
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
"
moduleEvents
"
:
[
"
load
"
,
"
queryLoad
"
,
"
postLoad
"
,
"
loadStat
"
]
},
...
...
@@ -30,6 +49,13 @@ MWF.xApplication.process.Xform.Stat = MWF.APPStat = new Class({
};
MWF
.
xDesktop
.
requireApp
(
"
query.Query
"
,
"
Statistician
"
,
function
(){
/**
* @summary Statistician组件,平台使用该组件执行统计的逻辑
* @member {MWF.xApplication.query.Query.Statistician}
* @example
* //可以在脚本中获取该组件
* var field = this.form.get("moduleId").stat; //获取组件对象
*/
this
.
stat
=
new
MWF
.
xApplication
.
query
.
Query
.
Statistician
(
this
.
form
.
app
,
this
.
node
,
viewJson
,
{
"
resizeNode
"
:
(
this
.
node
.
getStyle
(
"
height
"
).
toString
().
toLowerCase
()
!==
"
auto
"
&&
this
.
node
.
getStyle
(
"
height
"
).
toInt
()
>
0
),
"
onLoaded
"
:
function
(){
...
...
@@ -39,6 +65,13 @@ MWF.xApplication.process.Xform.Stat = MWF.APPStat = new Class({
}.
bind
(
this
));
}
},
/**
* @summary 获取统计数据。
* @return {Ojbect} 统计数据.
* @example
* var data = this.form.get("fieldId").getData();
* @return {Boolean} 是否通过校验
*/
getData
:
function
(){
if
(
!
this
.
stat
)
return
null
;
if
(
!
this
.
stat
.
stat
)
return
null
;
...
...
o2web/source/x_component_process_Xform/Statement.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
//MWF.xDesktop.requireApp("process.Xform", "widget.View", null, false);
MWF
.
xApplication
.
process
.
Xform
.
Statement
=
MWF
.
APPStatement
=
new
Class
({
/** @class Statement 查询视图组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var statement = this.form.get("fieldId"); //获取组件
* //方法2
* var statement = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Statement
=
MWF
.
APPStatement
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Statement# */
{
Extends
:
MWF
.
APP$Module
,
options
:
{
/**
* 异步加载查询视图后完成。
* @event MWF.xApplication.process.Xform.Statement#loadView
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 选中查询视图中的一条记录后执行。
* @event MWF.xApplication.process.Xform.Statement#select
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 打开查询视图中的一条记录后执行。
* @event MWF.xApplication.process.Xform.Statement#openDocument
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
"
moduleEvents
"
:
[
"
load
"
,
"
loadView
"
,
"
queryLoad
"
,
"
postLoad
"
,
"
select
"
,
"
openDocument
"
]
},
...
...
@@ -15,6 +43,11 @@ MWF.xApplication.process.Xform.Statement = MWF.APPStatement = new Class({
this
.
loadView
();
}
},
/**
* @summary 重新加载查询视图
* @example
* this.form.get("fieldId").reload()
*/
reload
:
function
(){
if
(
this
.
view
){
if
(
this
.
view
.
loadViewRes
&&
this
.
view
.
loadViewRes
.
res
)
if
(
this
.
view
.
loadViewRes
.
res
.
isRunning
())
this
.
view
.
loadViewRes
.
res
.
cancel
();
...
...
@@ -23,6 +56,11 @@ MWF.xApplication.process.Xform.Statement = MWF.APPStatement = new Class({
this
.
node
.
empty
();
this
.
loadView
();
},
/**
* @summary 当查询视图被设置为延迟加载(未立即载入),通过active方法激活
* @example
* this.form.get("fieldId").active()
*/
active
:
function
(){
if
(
this
.
view
){
if
(
!
this
.
view
.
loadingAreaNode
)
this
.
view
.
loadView
();
...
...
@@ -61,6 +99,13 @@ MWF.xApplication.process.Xform.Statement = MWF.APPStatement = new Class({
};
//MWF.xDesktop.requireApp("query.Query", "Viewer", function(){
/**
* @summary Statement组件,平台使用该组件实现查询视图的功能
* @member {MWF.xApplication.query.Query.Statement}
* @example
* //可以在脚本中获取该组件
* var view = this.form.get("fieldId").view; //获取组件对象
*/
this
.
view
=
new
MWF
.
xApplication
.
query
.
Query
.
Statement
(
this
.
node
,
viewJson
,
{
"
isload
"
:
(
this
.
json
.
loadView
!==
"
no
"
),
"
resizeNode
"
:
(
this
.
node
.
getStyle
(
"
height
"
).
toString
().
toLowerCase
()
!==
"
auto
"
&&
this
.
node
.
getStyle
(
"
height
"
).
toInt
()
>
0
),
...
...
@@ -81,7 +126,12 @@ MWF.xApplication.process.Xform.Statement = MWF.APPStatement = new Class({
},
this
.
form
.
app
,
this
.
form
.
Macro
);
//}.bind(this));
},
/**
* @summary 获取查询视图被选中行的数据
* @return {Object[]} 被选中行的数据
* @example
* var data = this.form.get("fieldId").getData();
*/
getData
:
function
(){
if
(
this
.
view
.
selectedItems
.
length
){
var
arr
=
[];
...
...
o2web/source/x_component_process_Xform/StatementSelector.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
ViewSelector
"
,
null
,
false
);
/** @class ViewSelector 查询视图选择组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var statementSelector = this.form.get("fieldId"); //获取组件
* //方法2
* var statementSelector = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.ViewSelector
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
StatementSelector
=
MWF
.
APPStatementSelector
=
new
Class
({
Implements
:
[
Events
],
Extends
:
MWF
.
xApplication
.
process
.
Xform
.
ViewSelector
,
...
...
o2web/source/x_component_process_Xform/SubSource.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
//COMMON.AjaxModule.load("JSONTemplate", null, false);
MWF
.
xApplication
.
process
.
Xform
.
SubSource
=
MWF
.
APPSubSource
=
new
Class
({
/** @class SubSource 子数据源。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var subSource = this.form.get("fieldId"); //获取组件
* //方法2
* var subSource = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
SubSource
=
MWF
.
APPSubSource
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Subform# */
{
Extends
:
MWF
.
APP$Module
,
options
:
{
/**
* 加载数据后执行,但这时还未加载下属组件,可以可以使用this.target.data获取数据进行修改。
* @event MWF.xApplication.process.Xform.SubSource#postLoadData
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 加载数据、下属组件后执行。
* @event MWF.xApplication.process.Xform.SubSource#loadData
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
"
moduleEvents
"
:
[
"
queryLoad
"
,
"
postLoad
"
,
"
load
"
,
"
postLoadData
"
,
"
loadData
"
]
},
load
:
function
(){
...
...
o2web/source/x_component_process_Xform/Subform.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
MWF
.
xApplication
.
process
.
Xform
.
Subform
=
MWF
.
APPSubform
=
new
Class
({
/** @class Subform 子表单组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var subform = this.form.get("fieldId"); //获取组件
* //方法2
* var subform = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Subform
=
MWF
.
APPSubform
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Subform# */
{
Extends
:
MWF
.
APP$Module
,
_loadUserInterface
:
function
()
{
...
...
@@ -19,6 +32,15 @@ MWF.xApplication.process.Xform.Subform = MWF.APPSubform = new Class({
}.
bind
(
this
));
}
},
/**
* @summary 当子表单被设置为延迟加载,通过active方法激活
* @param {Function} callback
* @example
* var subform = this.form.get("fieldId");
* subform.active(function(){
* //do someting
* })
*/
active
:
function
(
callback
)
{
if
(
!
this
.
loaded
)
{
this
.
reload
(
callback
)
...
...
@@ -26,6 +48,14 @@ MWF.xApplication.process.Xform.Subform = MWF.APPSubform = new Class({
if
(
callback
)
callback
();
}
},
/**
* @summary 重新加载子表单
* @param {Function} callback
* @example
* this.form.get("fieldId").reload(function(){
* //do someting
* })
*/
reload
:
function
(
callback
)
{
this
.
node
.
empty
();
this
.
getSubform
(
function
()
{
...
...
o2web/source/x_component_process_Xform/Tab.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
MWF
.
require
(
"
MWF.widget.Tab
"
,
null
,
false
);
MWF
.
xApplication
.
process
.
Xform
.
Tab
=
MWF
.
APPTab
=
new
Class
({
/** @class Tab 分页组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var tab = this.form.get("fieldId"); //获取组件
* //方法2
* var tab = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Tab
=
MWF
.
APPTab
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Tab# */
{
Extends
:
MWF
.
APP$Module
,
_loadUserInterface
:
function
(){
...
...
@@ -10,6 +23,21 @@ MWF.xApplication.process.Xform.Tab = MWF.APPTab = new Class({
var
style
=
"
form
"
;
if
(
layout
.
mobile
)
style
=
"
mobileForm
"
;
/**
* @summary tab组件,平台使用该组件实现分页组件的功能
* @member {MWF.widget.Tab}
* @example
* //可以在脚本中获取该组件
* var tab = this.form.get("fieldId").tab; //获取组件对象
* var pages = tab.pages //获取每个分页
* pages[1].addEvent("queryShow", function(){
* //添加显示分页前事件
* })
* pages[1].addEvent("postShow", function(){
* //添加显示分页后事件
* })
* pages[1]._showTab(); //显示第2个分页
*/
this
.
tab
=
new
MWF
.
widget
.
Tab
(
this
.
node
,
{
"
style
"
:
style
});
this
.
_setTabWidgetStyles
();
...
...
o2web/source/x_component_process_Xform/Table.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
MWF
.
xApplication
.
process
.
Xform
.
Table
=
MWF
.
APPTable
=
new
Class
({
/** @class Table 表格组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var table = this.form.get("fieldId"); //获取组件
* //方法2
* var table = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Table
=
MWF
.
APPTable
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Table# */
{
Extends
:
MWF
.
APP$Module
,
_afterLoaded
:
function
(){
/**
* @summary table,DOM对象
* @member {Element} table
* @memberOf MWF.xApplication.process.Xform.Table#
* @example
* //可以在脚本中获取该组件
* var table = this.form.get("fieldId").table; //获取组件对象
*/
if
(
!
this
.
table
)
this
.
table
=
this
.
node
.
getElement
(
"
table
"
);
//var tds = this.node.getElements("td");
var
rows
=
this
.
table
.
rows
;
...
...
@@ -80,6 +101,17 @@ MWF.xApplication.process.Xform.Table = MWF.APPTable = new Class({
if
(
this
.
form
.
json
[
"
$version
"
]
!==
"
5.2
"
)
this
.
_loadBorderStyle
();
}
});
/** @class Table$Td 单元格组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var td = this.form.get("fieldId"); //获取组件
* //方法2
* var td = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Table$Td
=
MWF
.
APPTable$Td
=
new
Class
({
Extends
:
MWF
.
APP$Module
,
_queryLoaded
:
function
(){
...
...
o2web/source/x_component_process_Xform/Textarea.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Input
"
,
null
,
false
);
/** @class Textarea 多行文本组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var field = this.form.get("fieldId"); //获取组件对象
* //方法2
* var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
*
* var data = field.getData(); //获取值
* field.setData("字符串值"); //设置值
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.$Input
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Textarea
=
MWF
.
APPTextarea
=
new
Class
({
Implements
:
[
Events
],
Extends
:
MWF
.
APP$Input
,
...
...
o2web/source/x_component_process_Xform/Textfield.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Input
"
,
null
,
false
);
/** @class
process.
Textfield 文本输入框。
/** @class Textfield 文本输入框。
* @example
* //可以在脚本中获取该组件
* //方法1:
...
...
o2web/source/x_component_process_Xform/View.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
//MWF.xDesktop.requireApp("process.Xform", "widget.View", null, false);
MWF
.
xApplication
.
process
.
Xform
.
View
=
MWF
.
APPView
=
new
Class
({
/** @class View 视图组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var view = this.form.get("fieldId"); //获取组件
* //方法2
* var view = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
View
=
MWF
.
APPView
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.View# */
{
Extends
:
MWF
.
APP$Module
,
options
:
{
/**
* 异步加载视图后完成。
* @event MWF.xApplication.process.Xform.View#loadView
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 选中视图中的一条记录后执行。
* @event MWF.xApplication.process.Xform.View#select
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
/**
* 打开视图中的一条记录后执行。
* @event MWF.xApplication.process.Xform.View#openDocument
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
"
moduleEvents
"
:
[
"
load
"
,
"
loadView
"
,
"
queryLoad
"
,
"
postLoad
"
,
"
select
"
,
"
openDocument
"
]
},
...
...
@@ -23,6 +51,11 @@ MWF.xApplication.process.Xform.View = MWF.APPView = new Class({
}
}
},
/**
* @summary 重新加载视图
* @example
* this.form.get("fieldId").reload()
*/
reload
:
function
(){
if
(
this
.
view
){
if
(
this
.
view
.
loadViewRes
&&
this
.
view
.
loadViewRes
.
res
)
if
(
this
.
view
.
loadViewRes
.
res
.
isRunning
())
this
.
view
.
loadViewRes
.
res
.
cancel
();
...
...
@@ -31,6 +64,11 @@ MWF.xApplication.process.Xform.View = MWF.APPView = new Class({
this
.
node
.
empty
();
this
.
loadView
();
},
/**
* @summary 当视图被设置为延迟加载(未立即载入),通过active方法激活
* @example
* this.form.get("fieldId").active()
*/
active
:
function
(){
if
(
this
.
view
){
if
(
!
this
.
view
.
loadingAreaNode
)
this
.
view
.
loadView
();
...
...
@@ -142,6 +180,13 @@ MWF.xApplication.process.Xform.View = MWF.APPView = new Class({
};
MWF
.
xDesktop
.
requireApp
(
"
process.Application
"
,
"
Viewer
"
,
function
(){
/**
* @summary view组件,平台使用该组件实现视图的功能
* @member {MWF.xApplication.process.Application.Viewer}
* @example
* //可以在脚本中获取该组件
* var view = this.form.get("fieldId").view; //获取组件对象
*/
this
.
view
=
new
MWF
.
xApplication
.
process
.
Application
.
Viewer
(
this
.
node
,
viewJson
,
{
"
actions
"
:
{
"
lookup
"
:
{
"
uri
"
:
"
/jaxrs/queryview/flag/{view}/application/flag/{application}/execute
"
,
"
method
"
:
"
PUT
"
},
...
...
@@ -155,7 +200,12 @@ MWF.xApplication.process.Xform.View = MWF.APPView = new Class({
});
}.
bind
(
this
));
},
/**
* @summary 获取视图被选中行的数据
* @return {Object[]} 被选中行的数据
* @example
* var data = this.form.get("fieldId").getData();
*/
getData
:
function
(){
if
(
this
.
view
.
selectedItems
.
length
){
var
arr
=
[];
...
...
o2web/source/x_component_process_Xform/ViewSelector.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
Button
"
,
null
,
false
);
/** @class ViewSelector 视图选择组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var sourceText = this.form.get("fieldId"); //获取组件
* //方法2
* var sourceText = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.Button
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
ViewSelector
=
MWF
.
APPViewSelector
=
new
Class
({
Implements
:
[
Events
],
Extends
:
MWF
.
xApplication
.
process
.
Xform
.
Button
,
...
...
o2web/source/x_component_process_Xform/Widget.js
浏览文件 @
2165c2ff
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
MWF
.
xApplication
.
process
.
Xform
.
Widget
=
MWF
.
APPWidget
=
new
Class
({
/** @class Widget 门户的部件组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var widget = this.form.get("fieldId"); //获取组件
* //方法2
* var widget = this.target; //在组件本身的脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @category FormComponents
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Widget
=
MWF
.
APPWidget
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Widget# */
{
Extends
:
MWF
.
APP$Module
,
_loadUserInterface
:
function
(){
...
...
@@ -9,6 +22,11 @@ MWF.xApplication.process.Xform.Widget = MWF.APPWidget = new Class({
this
.
loadWidget
();
}.
bind
(
this
));
},
/**
* @summary 重新加载部件
* @example
* this.form.get("fieldId").reload()
*/
reload
:
function
(){
this
.
node
.
empty
();
this
.
getWidget
(
function
(){
...
...
@@ -172,6 +190,12 @@ MWF.xApplication.process.Xform.Widget = MWF.APPWidget = new Class({
this
.
widgetData
.
updateTime
=
data
.
updateTime
;
}
},
/**
* @summary 获取设计部件时设置的参数
* @return 设置的参数
* @example
* var param = this.form.get("fieldId").getPageParamenters()
*/
getPageParamenters
:
function
(){
var
params
=
null
;
if
(
this
.
json
.
parameterType
===
"
map
"
){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录