Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
759eceb2
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,发现更多精彩内容 >>
提交
759eceb2
编写于
12月 15, 2020
作者:
蔡
蔡祥熠
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'wrdp' into 'develop'
Wrdp See merge request o2oa/o2oa!2529
上级
5aec55c6
a63284f4
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
41 addition
and
24 deletion
+41
-24
o2web/source/x_component_process_Xform/$Input.js
o2web/source/x_component_process_Xform/$Input.js
+26
-8
o2web/source/x_component_process_Xform/$Module.js
o2web/source/x_component_process_Xform/$Module.js
+0
-1
o2web/source/x_component_process_Xform/Attachment.js
o2web/source/x_component_process_Xform/Attachment.js
+4
-4
o2web/source/x_component_process_Xform/Calendar.js
o2web/source/x_component_process_Xform/Calendar.js
+1
-1
o2web/source/x_component_process_Xform/Checkbox.js
o2web/source/x_component_process_Xform/Checkbox.js
+4
-4
o2web/source/x_component_process_Xform/DatagridPC.js
o2web/source/x_component_process_Xform/DatagridPC.js
+6
-6
未找到文件。
o2web/source/x_component_process_Xform/$Input.js
浏览文件 @
759eceb2
...
...
@@ -90,7 +90,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
}
/**
*
描述信息节点,select\radio\checkbox无
此节点,只读情况下无此节点.
*
@summary 描述信息节点,允许用户手工输入的组件才有
此节点,只读情况下无此节点.
* @member {Element}
*/
this
.
descriptionNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
form
.
css
.
descriptionNode
,
"
text
"
:
this
.
json
.
description
}).
inject
(
this
.
node
);
...
...
@@ -284,12 +284,22 @@ 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|具体差异请查看链接}
* 该方法和 this.data.{fieldName} 在绝大部分的时候效果一样。区别如下:<br/>
* 当使用异步函数生成器(Promise)为组件赋值的时候,getData立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。<br/>
* this.data.{fieldName} 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。<br/>
* {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}
* @summary 获取组件值。
* @example
* var data = this.form.get('subject').getData();
* var data = this.form.get('subject').getData(); //没有使用promise的情况
* @example
* //使用Promise的情况
* var field = this.form.get("fieldName");
* var dict = new this.Dict("test"); //test为数据字典名称
* var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
* promise.then( function(){
* var data = field.getData(); //此时由于异步请求已经执行完毕,getData方法获取到了数据字典的值
* })
* field.setData( promise );
* @return 组件的数据.
*/
getData
:
function
(
when
){
...
...
@@ -311,9 +321,17 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
resetData
:
function
(){
this
.
setData
(
this
.
getValue
());
},
/**
* @summary 为控件赋值。
* @param data{String|Number|JsonObject|Array} .
/**当参数为Promise的时候,请查看文档: {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}
* @summary 为组件赋值。
* @param data{String|Promise} .
* @example
* this.form.get("fieldName").setData("test"); //赋文本值
* @example
* //使用Promise
* var field = this.form.get("fieldName");
* var dict = new this.Dict("test"); //test为数据字典名称
* var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
* field.setData( promise );
*/
setData
:
function
(
data
){
// if (data && data.isAG){
...
...
o2web/source/x_component_process_Xform/$Module.js
浏览文件 @
759eceb2
MWF
.
require
(
"
MWF.widget.Common
"
,
null
,
false
);
/** @classdesc process.$Module 组件类,此类为所有组件的父类。
* @class
...
...
o2web/source/x_component_process_Xform/Attachment.js
浏览文件 @
759eceb2
...
...
@@ -1121,7 +1121,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
//this.attachmentController = new MWF.widget.ATTER(this.node, this, options);
/**
* 附件容器.
*
@summary
附件容器.
* @member {MWF.xApplication.process.Xform.AttachmentController}
* @example
* var attachmentController = this.form.get("fieldName").AttachmentController; //获取附件容器
...
...
@@ -1176,7 +1176,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
}
},
/**
* 获取当前组件所有附件的标题.如果没有附件返回null
*
@summary
获取当前组件所有附件的标题.如果没有附件返回null
* @example
* var getAttachmentNames = this.form.get("name").getData();
* @return {StringArray|Null} 附件标题.
...
...
@@ -1659,7 +1659,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
return
data
;
},
/**
* 为组件重新设置附件,该附件必须已经上传。
*
@summary
为组件重新设置附件,该附件必须已经上传。
* @param data{AttachmentData} .
*/
setData
:
function
(
data
){
...
...
@@ -1802,7 +1802,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
return
true
;
},
/**
* 根据组件的校验设置进行校验。
*
@summary
根据组件的校验设置进行校验。
* @param {String} routeName - 可选,路由名称.
* @example
* if( !this.form.get('fieldName').validation() ){
...
...
o2web/source/x_component_process_Xform/Calendar.js
浏览文件 @
759eceb2
...
...
@@ -154,7 +154,7 @@ MWF.xApplication.process.Xform.Calendar = MWF.APPCalendar = new Class(
};
options
.
baseDate
=
this
.
getBaseDate
();
/**
*
日期弹出选择组件,只读情况下无此节点
.
*
@summary 日期弹出选择界面,只读情况下无此成员
.
* @member {MWF.widget.Calendar}
* @example
* var calendar = this.form.get("fieldName").calendar; //获取组件
...
...
o2web/source/x_component_process_Xform/Checkbox.js
浏览文件 @
759eceb2
...
...
@@ -98,7 +98,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class(
}
},
/**
* 重新计算下拉选项,该功能通常用在下拉选项为动态计算的情况.
*
@summary
重新计算下拉选项,该功能通常用在下拉选项为动态计算的情况.
* @example
* this.form.get('fieldName').resetOption();
*/
...
...
@@ -107,7 +107,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class(
this
.
setOptions
();
},
/**
* 获取选择项数组.
*
@summary
获取选择项数组.
* @example
* var array = this.form.get('fieldName').getOptions();
* @return {Array} 选择项数组,如果是脚本返回计算结果.
...
...
@@ -239,7 +239,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class(
}
},
/**
* 获取选中的值和文本.
*
@summary
获取选中的值和文本.
* @example
* var array = this.form.get('fieldName').getTextData();
* @return {Object} 返回选中项值和文本,格式为 { 'value' : value, 'text' : text }.
...
...
@@ -302,7 +302,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class(
this
.
setData
(
this
.
getValue
());
},
/**
* 为字段赋值,并且使值对应的选项选中。
*
@summary
为字段赋值,并且使值对应的选项选中。
* @param data{String} .
*/
setData
:
function
(
data
){
...
...
o2web/source/x_component_process_Xform/DatagridPC.js
浏览文件 @
759eceb2
...
...
@@ -1114,7 +1114,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
}
},
/**
*
重置组件
的值为默认值或置空。
*
@summary 重置数据网格
的值为默认值或置空。
* @example
* this.form.get('fieldName').resetData();
*/
...
...
@@ -1122,7 +1122,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
this
.
setData
(
this
.
_getValue
());
},
/**
* 为数据网格赋值。
*
@summary
为数据网格赋值。
* @param data{Array} - 必选,数组.
*/
setData
:
function
(
data
){
...
...
@@ -1207,7 +1207,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
}
},
/**
* 获取总计数据.
*
@summary
获取总计数据.
* @example
* var totalObject = this.form.get('fieldName').getTotal();
* @return {Object} 总计数据
...
...
@@ -1217,7 +1217,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
return
this
.
totalResaults
;
},
/**
* 判断数据网格是否为空.
*
@summary
判断数据网格是否为空.
* @example
* if( this.form.get('fieldName').isEmpty() ){
* this.form.notice('至少需要添加一条数据', 'warn');
...
...
@@ -1234,7 +1234,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
return
false
;
},
/**
* 获取数据网格数据.
*
@summary
获取数据网格数据.
* @example
* var data = this.form.get('fieldName').getData();
* @return {Object} - 格式如下{ data : [] }.
...
...
@@ -1396,7 +1396,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
return
true
;
},
/**
* 根据组件的校验设置进行校验。
*
@summary
根据组件的校验设置进行校验。
* @param {String} routeName - 可选,路由名称.
* @example
* if( !this.form.get('fieldName').validation() ){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录