Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
3145098f
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,发现更多精彩内容 >>
提交
3145098f
编写于
12月 15, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jsdoc
上级
047fd5ce
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
7 deletion
+38
-7
o2web/source/x_component_process_Xform/$Input.js
o2web/source/x_component_process_Xform/$Input.js
+4
-5
o2web/source/x_component_process_Xform/Checkbox.js
o2web/source/x_component_process_Xform/Checkbox.js
+34
-2
未找到文件。
o2web/source/x_component_process_Xform/$Input.js
浏览文件 @
3145098f
...
...
@@ -10,9 +10,6 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
Implements
:
[
Events
],
Extends
:
MWF
.
APP$Module
,
iconStyle
:
"
personfieldIcon
"
,
/**
* @hideconstructor
*/
initialize
:
function
(
node
,
json
,
form
,
options
){
this
.
node
=
$
(
node
);
this
.
node
.
store
(
"
module
"
,
this
);
...
...
@@ -287,10 +284,12 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
return
!
data
||
!
data
.
trim
();
},
/**
* 获取组件值.
* 获取组件值。该方法和 this.data.{fieldName} 在绝大部分的时候效果一样。区别如下:
* 当使用异步函数生成器(Promise)为组件赋值的时候,getData立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。
* this.data.{fieldName} 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。{@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}
* @example
* var data = this.form.get('subject').getData();
* @return
{Array|Object|String|Number|Boolean}
组件的数据.
* @return 组件的数据.
*/
getData
:
function
(
when
){
if
(
this
.
json
.
compute
==
"
save
"
)
this
.
_setValue
(
this
.
_computeValue
());
...
...
o2web/source/x_component_process_Xform/Checkbox.js
浏览文件 @
3145098f
MWF
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Input
"
,
null
,
false
);
MWF
.
require
(
"
MWF.widget.UUID
"
,
null
,
false
);
MWF
.
xApplication
.
process
.
Xform
.
Checkbox
=
MWF
.
APPCheckbox
=
new
Class
({
/** @class process.Calendar 多选按钮组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var field = this.form.get("fieldName"); //获取组件对象
* //方法2
* var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
* @extends MWF.xApplication.process.Xform.$Input
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Checkbox
=
MWF
.
APPCheckbox
=
new
Class
(
/** @lends MWF.xApplication.process.Xform.Checkbox# */
{
Implements
:
[
Events
],
Extends
:
MWF
.
APP$Input
,
...
...
@@ -85,10 +97,21 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class({
}.
bind
(
this
));
}
},
/**
* 重新计算下拉选项,该功能通常用在下拉选项为动态计算的情况.
* @example
* this.form.get('fieldName').resetOption();
*/
resetOption
:
function
(){
this
.
node
.
empty
();
this
.
setOptions
();
},
/**
* 获取选择项数组.
* @example
* var array = this.form.get('fieldName').getOptions();
* @return {Array} 选择项数组,如果是脚本返回计算结果.
*/
getOptions
:
function
(){
if
(
this
.
json
.
itemType
==
"
values
"
){
return
this
.
json
.
itemValues
;
...
...
@@ -215,6 +238,12 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class({
radio
.
checked
=
value
.
indexOf
(
radio
.
value
)
!=
-
1
;
}
},
/**
* 获取选中的值和文本.
* @example
* var array = this.form.get('fieldName').getTextData();
* @return {Object} 返回选中项值和文本,格式为 { 'value' : value, 'text' : text }.
*/
getTextData
:
function
(){
var
inputs
=
this
.
node
.
getElements
(
"
input
"
);
var
value
=
[];
...
...
@@ -272,7 +301,10 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class({
resetData
:
function
(){
this
.
setData
(
this
.
getValue
());
},
/**
* 为字段赋值,并且使值对应的选项选中。
* @param data{String} .
*/
setData
:
function
(
data
){
return
this
.
_setValue
(
data
,
"
__setData
"
);
// if (data && data.isAG){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录