unknown 5 năm trước cách đây
mục cha
commit
543cfe5696
37 tập tin đã thay đổi với 1106 bổ sung641 xóa
  1. 1 0
      o2web/source/o2_core/o2/xScript/CMSEnvironment.js
  2. 5 0
      o2web/source/o2_core/o2/xScript/Environment.js
  3. 1 0
      o2web/source/o2_core/o2/xScript/PageEnvironment.js
  4. 515 489
      o2web/source/o2_core/o2/xScript/ViewEnvironment.js
  5. 6 2
      o2web/source/x_component_Selector/Person.js
  6. 8 4
      o2web/source/x_component_Selector/Unit.js
  7. 4 2
      o2web/source/x_component_Selector/UnitWithType.js
  8. 48 0
      o2web/source/x_component_portal_PageDesigner/Module/Org/template.json
  9. 8 0
      o2web/source/x_component_process_FormDesigner/Module/Org/template.json
  10. 15 15
      o2web/source/x_component_process_Xform/$Input.js
  11. 5 5
      o2web/source/x_component_process_Xform/$Module.js
  12. 7 0
      o2web/source/x_component_process_Xform/Actionbar.js
  13. 2 2
      o2web/source/x_component_process_Xform/Attachment.js
  14. 2 2
      o2web/source/x_component_process_Xform/Button.js
  15. 2 2
      o2web/source/x_component_process_Xform/Calendar.js
  16. 6 6
      o2web/source/x_component_process_Xform/Checkbox.js
  17. 10 10
      o2web/source/x_component_process_Xform/Combox.js
  18. 2 2
      o2web/source/x_component_process_Xform/Common.js
  19. 20 20
      o2web/source/x_component_process_Xform/DatagridMobile.js
  20. 20 20
      o2web/source/x_component_process_Xform/DatagridPC.js
  21. 2 2
      o2web/source/x_component_process_Xform/Div.js
  22. 12 12
      o2web/source/x_component_process_Xform/Documenteditor.js
  23. 15 15
      o2web/source/x_component_process_Xform/Htmleditor.js
  24. 2 2
      o2web/source/x_component_process_Xform/Iframe.js
  25. 2 2
      o2web/source/x_component_process_Xform/Image.js
  26. 5 5
      o2web/source/x_component_process_Xform/ImageClipper.js
  27. 4 4
      o2web/source/x_component_process_Xform/Label.js
  28. 2 2
      o2web/source/x_component_process_Xform/Log.js
  29. 2 2
      o2web/source/x_component_process_Xform/Number.js
  30. 4 4
      o2web/source/x_component_process_Xform/Office.js
  31. 41 1
      o2web/source/x_component_process_Xform/Opinion.js
  32. 133 3
      o2web/source/x_component_process_Xform/Org.js
  33. 53 2
      o2web/source/x_component_process_Xform/Radio.js
  34. 56 1
      o2web/source/x_component_process_Xform/Select.js
  35. 22 1
      o2web/source/x_component_process_Xform/Sidebar.js
  36. 63 1
      o2web/source/x_component_process_Xform/Source.js
  37. 1 1
      o2web/source/x_component_process_Xform/Textfield.js

+ 1 - 0
o2web/source/o2_core/o2/xScript/CMSEnvironment.js

@@ -64,6 +64,7 @@ MWF.xScript.CMSEnvironment = function(ev){
     /**
     /**
      * 你可以通过documentContext获取内容管理实例相关的对象数据。
      * 你可以通过documentContext获取内容管理实例相关的对象数据。
      * @module documentContext
      * @module documentContext
+     * @ordernumber 30
      * @example
      * @example
      * //您可以在内容管理表单中,通过this来获取当前实例的documentContext对象,如下:
      * //您可以在内容管理表单中,通过this来获取当前实例的documentContext对象,如下:
      * var context = this.documentContext;
      * var context = this.documentContext;

+ 5 - 0
o2web/source/o2_core/o2/xScript/Environment.js

@@ -252,6 +252,7 @@ MWF.xScript.Environment = function(ev){
          * 这些数据一般情况下是通过您创建的表单收集而来的,也可以通过脚本创建和增删改查。<br/>
          * 这些数据一般情况下是通过您创建的表单收集而来的,也可以通过脚本创建和增删改查。<br/>
          * data对象基本上是一个JSON对象,您可以用访问JSON对象的方法访问他对象的所有数据,但增加和删除数据时略有不同。
          * data对象基本上是一个JSON对象,您可以用访问JSON对象的方法访问他对象的所有数据,但增加和删除数据时略有不同。
          * @module data
          * @module data
+         * @ordernumber 10
          * @example
          * @example
          * //您可以在表单或流程的各个嵌入脚本中,通过this来获取当前实例的业务数据,如下:
          * //您可以在表单或流程的各个嵌入脚本中,通过this来获取当前实例的业务数据,如下:
          * var data = this.data;
          * var data = this.data;
@@ -399,6 +400,7 @@ MWF.xScript.Environment = function(ev){
     /**
     /**
      * 你可以通过workContext获取和流程相关的流程实例对象数据。
      * 你可以通过workContext获取和流程相关的流程实例对象数据。
      * @module workContext
      * @module workContext
+     * @ordernumber 20
      * @example
      * @example
      * //您可以在表单或流程的各个嵌入脚本中,通过this来获取当前流程实例数据,如下:
      * //您可以在表单或流程的各个嵌入脚本中,通过this来获取当前流程实例数据,如下:
      * var context = this.workContext;
      * var context = this.workContext;
@@ -1988,6 +1990,7 @@ MWF.xScript.Environment = function(ev){
      * this.include是一个方法,当您在流程、门户或者内容管理中创建了脚本配置,可以使用this.include()用来引用脚本配置。<br/>
      * this.include是一个方法,当您在流程、门户或者内容管理中创建了脚本配置,可以使用this.include()用来引用脚本配置。<br/>
      * <b>(建议使用表单中的预加载脚本,需要判断加载的时候才使用本方法加载脚本,此时建议异步加载有助于表单加载速度。)</b><br/>
      * <b>(建议使用表单中的预加载脚本,需要判断加载的时候才使用本方法加载脚本,此时建议异步加载有助于表单加载速度。)</b><br/>
      * @module include
      * @module include
+     * @ordernumber 140
      * @param {(String|Object|String[]|Object[])} optionsOrName 可以是脚本标识字符串(数组)或者是对象(数组)。
      * @param {(String|Object|String[]|Object[])} optionsOrName 可以是脚本标识字符串(数组)或者是对象(数组)。
      * <pre><code class='language-js'>
      * <pre><code class='language-js'>
      * //如果需要引用本应用的脚本配置,将options设置为String或者String Array。
      * //如果需要引用本应用的脚本配置,将options设置为String或者String Array。
@@ -2150,6 +2153,7 @@ MWF.xScript.Environment = function(ev){
      * this.define是一个方法,您可以在流程、门户或者内容管理中创建脚本配置,在脚本配置中您可以通过this.define()来定义自己的方法。<br/>
      * this.define是一个方法,您可以在流程、门户或者内容管理中创建脚本配置,在脚本配置中您可以通过this.define()来定义自己的方法。<br/>
      * 通过这种方式定义方法,在不同的应用使用相同的方法名称也不会造成冲突。
      * 通过这种方式定义方法,在不同的应用使用相同的方法名称也不会造成冲突。
      * @module define
      * @module define
+     * @ordernumber 150
      * @param {(String)} name 定义的方法名称。
      * @param {(String)} name 定义的方法名称。
      * @param {Function} fun  定义的方法
      * @param {Function} fun  定义的方法
      * @param {Boolean} [overwrite] 定义的方法是否能被覆盖重写。默认值为true。
      * @param {Boolean} [overwrite] 定义的方法是否能被覆盖重写。默认值为true。
@@ -2220,6 +2224,7 @@ MWF.xScript.Environment = function(ev){
     /**
     /**
      * form对象可在流程表单或内容管理表单中可用。(仅前端脚本可用)。
      * form对象可在流程表单或内容管理表单中可用。(仅前端脚本可用)。
      * @module form
      * @module form
+     * @ordernumber 40
      * @example
      * @example
      * //您可以在流程表单和内容管理的前端脚本中,通过this来获取form对象,如下:
      * //您可以在流程表单和内容管理的前端脚本中,通过this来获取form对象,如下:
      * var form = this.form;
      * var form = this.form;

+ 1 - 0
o2web/source/o2_core/o2/xScript/PageEnvironment.js

@@ -1427,6 +1427,7 @@ MWF.xScript.PageEnvironment = function (ev) {
     /**
     /**
      * page对象可在门户页面中可用。它的很多方法与form类似。<b>(仅前端脚本可用)</b><br/>
      * page对象可在门户页面中可用。它的很多方法与form类似。<b>(仅前端脚本可用)</b><br/>
      * @module page
      * @module page
+     * @ordernumber 50
      * @example
      * @example
      * //您可以在门户表单中,通过this来获取page对象,如下:
      * //您可以在门户表单中,通过this来获取page对象,如下:
      * var page = this.page;
      * var page = this.page;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 515 - 489
o2web/source/o2_core/o2/xScript/ViewEnvironment.js


+ 6 - 2
o2web/source/x_component_Selector/Person.js

@@ -2363,10 +2363,12 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
             this.selectAllNode.addEvent( "click", function(ev){
             this.selectAllNode.addEvent( "click", function(ev){
                 if( this.isSelectedAll ){
                 if( this.isSelectedAll ){
                     this.selector.options.selectAllRange === "all" ? this.unselectAllNested(ev, null, true ) : this.unselectAll(ev, null, true);
                     this.selector.options.selectAllRange === "all" ? this.unselectAllNested(ev, null, true ) : this.unselectAll(ev, null, true);
-                    this.selector.fireEvent("unselectCatgory",[this])
+                    this.selector.fireEvent("unselectCatgory",[this]);
+                    this.selector.fireEvent("unselectCatgeory",[this]);
                 }else{
                 }else{
                     this.selector.options.selectAllRange === "all" ? this.selectAllNested(ev, true) : this.selectAll(ev, true);
                     this.selector.options.selectAllRange === "all" ? this.selectAllNested(ev, true) : this.selectAll(ev, true);
-                    this.selector.fireEvent("selectCatgory",[this])
+                    this.selector.fireEvent("selectCatgory",[this]);
+                    this.selector.fireEvent("selectCatgeory",[this]);
                 }
                 }
                 ev.stopPropagation();
                 ev.stopPropagation();
             }.bind(this));
             }.bind(this));
@@ -2455,6 +2457,7 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
                     // this.unselectAll(ev);
                     // this.unselectAll(ev);
                     this.selector.options.selectAllRange === "all" ? this.unselectAllNested(ev, null, true ) : this.unselectAll(ev, null, true);
                     this.selector.options.selectAllRange === "all" ? this.unselectAllNested(ev, null, true ) : this.unselectAll(ev, null, true);
                     this.selector.fireEvent("unselectCatgory",[this]);
                     this.selector.fireEvent("unselectCatgory",[this]);
+                    this.selector.fireEvent("unselectCategory",[this]);
                 }else{
                 }else{
                     // this.selectAll(ev);
                     // this.selectAll(ev);
                     if( this.selector.options.selectAllRange === "all" ){
                     if( this.selector.options.selectAllRange === "all" ){
@@ -2464,6 +2467,7 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
                         this.selectAll(ev, true)
                         this.selectAll(ev, true)
                     }
                     }
                     this.selector.fireEvent("selectCatgory",[this]);
                     this.selector.fireEvent("selectCatgory",[this]);
+                    this.selector.fireEvent("selectCategory",[this]);
                 }
                 }
                 ev.stopPropagation();
                 ev.stopPropagation();
             }.bind(this));
             }.bind(this));

+ 8 - 4
o2web/source/x_component_Selector/Unit.js

@@ -343,7 +343,8 @@ MWF.xApplication.Selector.Unit.Item = new Class({
                     if( this.isSelectedAll ){
                     if( this.isSelectedAll ){
                         // this.unselectAll(ev);
                         // this.unselectAll(ev);
                         this.selector.options.selectAllRange === "all" ? this.unselectAllNested(ev, null, true) : this.unselectAll(ev, null, true);
                         this.selector.options.selectAllRange === "all" ? this.unselectAllNested(ev, null, true) : this.unselectAll(ev, null, true);
-                        this.selector.fireEvent("unselectCatgory",[this])
+                        this.selector.fireEvent("unselectCatgory",[this]);
+                        this.selector.fireEvent("unselectCategory",[this])
                     }else{
                     }else{
                         // this.selectAll(ev);
                         // this.selectAll(ev);
                         if( this.selector.options.selectAllRange === "all" ){
                         if( this.selector.options.selectAllRange === "all" ){
@@ -352,7 +353,8 @@ MWF.xApplication.Selector.Unit.Item = new Class({
                         }else{
                         }else{
                             this.selectAll(ev ,true)
                             this.selectAll(ev ,true)
                         }
                         }
-                        this.selector.fireEvent("selectCatgory",[this])
+                        this.selector.fireEvent("selectCatgory",[this]);
+                        this.selector.fireEvent("selectCategory",[this])
                     }
                     }
                     ev.stopPropagation();
                     ev.stopPropagation();
                 }.bind(this));
                 }.bind(this));
@@ -614,10 +616,12 @@ MWF.xApplication.Selector.Unit.Item = new Class({
             this.selectAllNode.addEvent( "click", function(ev){
             this.selectAllNode.addEvent( "click", function(ev){
                 if( this.isSelectedAll ){
                 if( this.isSelectedAll ){
                     this.unselectAll(ev);
                     this.unselectAll(ev);
-                    this.selector.fireEvent("unselectCatgory",[this])
+                    this.selector.fireEvent("unselectCatgory",[this]);
+                    this.selector.fireEvent("unselectCategory",[this])
                 }else{
                 }else{
                     this.selectAll(ev);
                     this.selectAll(ev);
-                    this.selector.fireEvent("selectCatgory",[this])
+                    this.selector.fireEvent("selectCatgory",[this]);
+                    this.selector.fireEvent("selectCategory",[this]);
                 }
                 }
                 ev.stopPropagation();
                 ev.stopPropagation();
             }.bind(this));
             }.bind(this));

+ 4 - 2
o2web/source/x_component_Selector/UnitWithType.js

@@ -181,11 +181,13 @@ MWF.xApplication.Selector.UnitWithType.Item = new Class({
                     if (this.isSelectedAll) {
                     if (this.isSelectedAll) {
                         // this.unselectAll(ev);
                         // this.unselectAll(ev);
                         this.selector.options.selectAllRange === "all" ? this.unselectAllNested(ev, null, true) : this.unselectAll(ev, null, true);
                         this.selector.options.selectAllRange === "all" ? this.unselectAllNested(ev, null, true) : this.unselectAll(ev, null, true);
-                        this.selector.fireEvent("unselectCatgory", [this])
+                        this.selector.fireEvent("unselectCatgory", [this]);
+                        this.selector.fireEvent("unselectCategory", [this])
                     } else {
                     } else {
                         // this.selectAll(ev);
                         // this.selectAll(ev);
                         this.selector.options.selectAllRange === "all" ? this.selectAllNested(ev, true) : this.selectAll(ev, true);
                         this.selector.options.selectAllRange === "all" ? this.selectAllNested(ev, true) : this.selectAll(ev, true);
-                        this.selector.fireEvent("selectCatgory", [this])
+                        this.selector.fireEvent("selectCatgory", [this]);
+                        this.selector.fireEvent("selectCategory", [this])
                     }
                     }
                     ev.stopPropagation();
                     ev.stopPropagation();
                 });
                 });

+ 48 - 0
o2web/source/x_component_portal_PageDesigner/Module/Org/template.json

@@ -92,6 +92,54 @@
 		"blur": {
 		"blur": {
 			"code": "",
 			"code": "",
 			"html": ""
 			"html": ""
+		},
+		"queryLoadSelector" : {
+			"code": "",
+			"html": ""
+		},
+		"postLoadSelector" : {
+			"code": "",
+			"html": ""
+		},
+		"queryLoadCategory" : {
+			"code": "",
+			"html": ""
+		},
+		"postLoadCategory" : {
+			"code": "",
+			"html": ""
+		},
+		"selectCategory": {
+			"code": "",
+			"html": ""
+		},
+		"unselectCategory": {
+			"code": "",
+			"html": ""
+		},
+		"expand": {
+			"code": "",
+			"html": ""
+		},
+		"collapse": {
+			"code": "",
+			"html": ""
+		},
+		"queryLoadItem" : {
+			"code": "",
+			"html": ""
+		},
+		"postLoadItem" : {
+			"code": "",
+			"html": ""
+		},
+		"selectItem" : {
+			"code": "",
+			"html": ""
+		},
+		"unselectItem" : {
+			"code": "",
+			"html": ""
 		}
 		}
 	},
 	},
 	"properties": {},
 	"properties": {},

+ 8 - 0
o2web/source/x_component_process_FormDesigner/Module/Org/template.json

@@ -117,6 +117,14 @@
 			"code": "",
 			"code": "",
 			"html": ""
 			"html": ""
 		},
 		},
+		"expand": {
+			"code": "",
+			"html": ""
+		},
+		"collapse": {
+			"code": "",
+			"html": ""
+		},
 		"queryLoadItem" : {
 		"queryLoadItem" : {
 			"code": "",
 			"code": "",
 			"html": ""
 			"html": ""

+ 15 - 15
o2web/source/x_component_process_Xform/$Input.js

@@ -293,27 +293,27 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
 	    return !data || !data.trim();
 	    return !data || !data.trim();
     },
     },
     /**
     /**
-     * 在脚本中使用 this.data[fieldName] 也可以获取组件值。
+     * 在脚本中使用 this.data[fieldId] 也可以获取组件值。
      * 区别如下:<br/>
      * 区别如下:<br/>
      * 1、当使用Promise的时候<br/>
      * 1、当使用Promise的时候<br/>
      * 使用异步函数生成器(Promise)为组件赋值的时候,用getData方法立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。<br/>
      * 使用异步函数生成器(Promise)为组件赋值的时候,用getData方法立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。<br/>
-     * this.data[fieldName] 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。<br/>
+     * this.data[fieldId] 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。<br/>
      * {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}<br/>
      * {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}<br/>
-     * 2、当表单上没有对应组件的时候,可以使用this.data[fieldName]获取值,但是this.form.get('fieldName')无法获取到组件。
+     * 2、当表单上没有对应组件的时候,可以使用this.data[fieldId]获取值,但是this.form.get('fieldId')无法获取到组件。
      * @summary 获取组件值。
      * @summary 获取组件值。
      * @example
      * @example
-     * var data = this.form.get('fieldName').getData(); //没有使用promise的情况、
+     * var data = this.form.get('fieldId').getData(); //没有使用promise的情况、
      * @example
      * @example
      *  //如果无法确定表单上是否有组件,需要判断
      *  //如果无法确定表单上是否有组件,需要判断
      *  var data;
      *  var data;
-     *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-     *      data = this.form.get('fieldName').getData();
+     *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+     *      data = this.form.get('fieldId').getData();
      *  }else{
      *  }else{
-     *      data = this.data['fieldName']; //直接从数据中获取字段值
+     *      data = this.data['fieldId']; //直接从数据中获取字段值
      *  }
      *  }
      * @example
      * @example
      *  //使用Promise的情况
      *  //使用Promise的情况
-     *  var field = this.form.get("fieldName");
+     *  var field = this.form.get("fieldId");
      *  var dict = new this.Dict("test"); //test为数据字典名称
      *  var dict = new this.Dict("test"); //test为数据字典名称
      *  var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
      *  var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
      *  promise.then( function(){
      *  promise.then( function(){
@@ -342,21 +342,21 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
         this.setData(this.getValue());
         this.setData(this.getValue());
     },
     },
     /**当参数为Promise的时候,请参考文档: {@link  https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}<br/>
     /**当参数为Promise的时候,请参考文档: {@link  https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}<br/>
-     * 当表单上没有对应组件的时候,可以使用this.data[fieldName] = data赋值。
+     * 当表单上没有对应组件的时候,可以使用this.data[fieldId] = data赋值。
      * @summary 为组件赋值。
      * @summary 为组件赋值。
      * @param data{String|Promise} .
      * @param data{String|Promise} .
      * @example
      * @example
-     *  this.form.get("fieldName").setData("test"); //赋文本值
+     *  this.form.get("fieldId").setData("test"); //赋文本值
      * @example
      * @example
      *  //如果无法确定表单上是否有组件,需要判断
      *  //如果无法确定表单上是否有组件,需要判断
-     *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-     *      this.form.get('fieldName').setData( data );
+     *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+     *      this.form.get('fieldId').setData( data );
      *  }else{
      *  }else{
-     *      this.data['fieldName'] = data;
+     *      this.data['fieldId'] = data;
      *  }
      *  }
      * @example
      * @example
      *  //使用Promise
      *  //使用Promise
-     *  var field = this.form.get("fieldName");
+     *  var field = this.form.get("fieldId");
      *  var dict = new this.Dict("test"); //test为数据字典名称
      *  var dict = new this.Dict("test"); //test为数据字典名称
      *  var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
      *  var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
      *  field.setData( promise );
      *  field.setData( promise );
@@ -595,7 +595,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
      * @summary 根据组件的校验设置进行校验。
      * @summary 根据组件的校验设置进行校验。
      *  @param {String} [routeName] - 可选,路由名称.
      *  @param {String} [routeName] - 可选,路由名称.
      *  @example
      *  @example
-     *  if( !this.form.get('fieldName').validation() ){
+     *  if( !this.form.get('fieldId').validation() ){
      *      return false;
      *      return false;
      *  }
      *  }
      *  @return {Boolean} 是否通过校验
      *  @return {Boolean} 是否通过校验

+ 5 - 5
o2web/source/x_component_process_Xform/$Module.js

@@ -33,7 +33,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
          * @member {Element}
          * @member {Element}
          * @example
          * @example
          *  //可以在脚本中获取该组件
          *  //可以在脚本中获取该组件
-         * var field = this.form.get("fieldName"); //获取组件对象
+         * var field = this.form.get("moduleId"); //获取组件对象
          * field.node.setStyle("font-size","12px"); //给节点设置样式
          * field.node.setStyle("font-size","12px"); //给节点设置样式
          */
          */
         this.node = $(node);
         this.node = $(node);
@@ -44,7 +44,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
          * @member {JsonObject}
          * @member {JsonObject}
          * @example
          * @example
          *  //可以在脚本中获取该组件
          *  //可以在脚本中获取该组件
-         * var json = this.form.get("fieldName").json; //获取组件对象
+         * var json = this.form.get("fieldId").json; //获取组件对象
          * var id = json.id; //获取组件的id
          * var id = json.id; //获取组件的id
          * var type = json.type; //获取组件的类型,如Textfield 为文本输入组件,Select为下拉组件
          * var type = json.type; //获取组件的类型,如Textfield 为文本输入组件,Select为下拉组件
          */
          */
@@ -54,7 +54,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
          * @summary 组件的所在表单对象.
          * @summary 组件的所在表单对象.
          * @member {MWF.xApplication.process.Xform.Form}
          * @member {MWF.xApplication.process.Xform.Form}
          * @example
          * @example
-         * var form = this.form.get("fieldName").form; //获取组件所在表单对象
+         * var form = this.form.get("fieldId").form; //获取组件所在表单对象
          * form.saveFormData(); //保存表单数据
          * form.saveFormData(); //保存表单数据
          */
          */
         this.form = form;
         this.form = form;
@@ -71,7 +71,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
     /**
     /**
      * @summary 隐藏组件.
      * @summary 隐藏组件.
      * @example
      * @example
-     * this.form.get("fieldName").hide(); //隐藏组件
+     * this.form.get("fieldId").hide(); //隐藏组件
      */
      */
     hide: function(){
     hide: function(){
         var dsp = this.node.getStyle("display");
         var dsp = this.node.getStyle("display");
@@ -82,7 +82,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
     /**
     /**
      * @summary 显示组件.
      * @summary 显示组件.
      * @example
      * @example
-     * this.form.get("fieldName").show(); //显示组件
+     * this.form.get("fieldId").show(); //显示组件
      */
      */
     show: function(){
     show: function(){
         var dsp = this.node.retrieve("mwf_display", dsp);
         var dsp = this.node.retrieve("mwf_display", dsp);

+ 7 - 0
o2web/source/x_component_process_Xform/Actionbar.js

@@ -60,6 +60,13 @@ MWF.xApplication.process.Xform.Actionbar = MWF.APPActionbar =  new Class(
             this.toolbarNode.empty();
             this.toolbarNode.empty();
 
 
             MWF.require("MWF.widget.Toolbar", function(){
             MWF.require("MWF.widget.Toolbar", function(){
+                /**
+                 * @summary Toolbar组件,平台使用该组件生成操作条。
+                 * @member {o2.widget.Toolbar}
+                 * @example
+                 *  //可以在脚本中获取该组件
+                 * var toolbarWidget = this.form.get("fieldId").toolbarWidget; //获取组件对象
+                 */
                 this.toolbarWidget = new MWF.widget.Toolbar(this.toolbarNode, {
                 this.toolbarWidget = new MWF.widget.Toolbar(this.toolbarNode, {
                     "style": this.json.style,
                     "style": this.json.style,
                     "onPostLoad" : function(){
                     "onPostLoad" : function(){

+ 2 - 2
o2web/source/x_component_process_Xform/Attachment.js

@@ -1184,7 +1184,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
          * @summary 附件容器.
          * @summary 附件容器.
          * @member {MWF.xApplication.process.Xform.AttachmentController}
          * @member {MWF.xApplication.process.Xform.AttachmentController}
          * @example
          * @example
-         * var attachmentController = this.form.get("fieldName").AttachmentController; //获取附件容器
+         * var attachmentController = this.form.get("fieldId").AttachmentController; //获取附件容器
          * var attachmentList = attachmentController.attachments; //获取所有的附件
          * var attachmentList = attachmentController.attachments; //获取所有的附件
          * var attachmentData = attachment[0].data; //获取第一个附件的数据
          * var attachmentData = attachment[0].data; //获取第一个附件的数据
          */
          */
@@ -1865,7 +1865,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
      * @summary 根据组件的校验设置进行校验。
      * @summary 根据组件的校验设置进行校验。
      *  @param {String} [routeName] - 可选,路由名称.
      *  @param {String} [routeName] - 可选,路由名称.
      *  @example
      *  @example
-     *  if( !this.form.get('fieldName').validation() ){
+     *  if( !this.form.get('fieldId').validation() ){
      *      return false;
      *      return false;
      *  }
      *  }
      *  @return {Boolean} 是否通过校验
      *  @return {Boolean} 是否通过校验

+ 2 - 2
o2web/source/x_component_process_Xform/Button.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var button = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var button = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor

+ 2 - 2
o2web/source/x_component_process_Xform/Calendar.js

@@ -3,7 +3,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var field = this.form.get("fieldName"); //获取组件对象
+ * var field = this.form.get("fieldId"); //获取组件对象
  * //方法2
  * //方法2
  * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
  * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
  * @extends MWF.xApplication.process.Xform.$Input
  * @extends MWF.xApplication.process.Xform.$Input
@@ -188,7 +188,7 @@ MWF.xApplication.process.Xform.Calendar = MWF.APPCalendar =  new Class(
                  * @summary 日期弹出选择界面,只读情况下无此成员.
                  * @summary 日期弹出选择界面,只读情况下无此成员.
                  * @member {MWF.widget.Calendar}
                  * @member {MWF.widget.Calendar}
                  * @example
                  * @example
-                 * var calendar = this.form.get("fieldName").calendar; //获取组件
+                 * var calendar = this.form.get("fieldId").calendar; //获取组件
                  * if(calendar)calendar.show(); //弹出选择组件
                  * if(calendar)calendar.show(); //弹出选择组件
                  */
                  */
                 this.calendar = new MWF.widget.Calendar(this.node.getFirst(), options);
                 this.calendar = new MWF.widget.Calendar(this.node.getFirst(), options);

+ 6 - 6
o2web/source/x_component_process_Xform/Checkbox.js

@@ -4,7 +4,7 @@ MWF.require("MWF.widget.UUID", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var field = this.form.get("fieldName"); //获取组件对象
+ * var field = this.form.get("fieldId"); //获取组件对象
  * //方法2
  * //方法2
  * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
  * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
  * @extends MWF.xApplication.process.Xform.$Input
  * @extends MWF.xApplication.process.Xform.$Input
@@ -101,7 +101,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class(
     /**
     /**
      * @summary 重新计算下拉选项,该功能通常用在下拉选项为动态计算的情况.
      * @summary 重新计算下拉选项,该功能通常用在下拉选项为动态计算的情况.
      * @example
      * @example
-     * this.form.get('fieldName').resetOption();
+     * this.form.get('fieldId').resetOption();
      */
      */
     resetOption: function(){
     resetOption: function(){
         this.node.empty();
         this.node.empty();
@@ -110,7 +110,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class(
     /**
     /**
      * @summary 获取选择项数组.
      * @summary 获取选择项数组.
      * @example
      * @example
-     * var array = this.form.get('fieldName').getOptions();
+     * var array = this.form.get('fieldId').getOptions();
      * @return {Array} 选择项数组,如果配置为脚本返回计算结果.
      * @return {Array} 选择项数组,如果配置为脚本返回计算结果.
      */
      */
 	getOptions: function(){
 	getOptions: function(){
@@ -242,7 +242,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class(
     /**
     /**
      * @summary 获取选中的值和文本.
      * @summary 获取选中的值和文本.
      * @example
      * @example
-     * var array = this.form.get('fieldName').getTextData();
+     * var array = this.form.get('fieldId').getTextData();
      * @return {Object} 返回选中项值和文本,格式为 { 'value' : value, 'text' : text }.
      * @return {Object} 返回选中项值和文本,格式为 { 'value' : value, 'text' : text }.
      */
      */
 	getTextData: function(){
 	getTextData: function(){
@@ -306,10 +306,10 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class(
      * @summary 为字段赋值,并且使值对应的选项选中。
      * @summary 为字段赋值,并且使值对应的选项选中。
      *  @param data{String|Promise} .
      *  @param data{String|Promise} .
      *  @example
      *  @example
-     *  this.form.get("fieldName").setData("test"); //赋文本值
+     *  this.form.get("fieldId").setData("test"); //赋文本值
      *  @example
      *  @example
      *  //使用Promise
      *  //使用Promise
-     *  var field = this.form.get("fieldName");
+     *  var field = this.form.get("fieldId");
      *  var dict = new this.Dict("test"); //test为数据字典名称
      *  var dict = new this.Dict("test"); //test为数据字典名称
      *  var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
      *  var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
      *  field.setData( promise );
      *  field.setData( promise );

+ 10 - 10
o2web/source/x_component_process_Xform/Combox.js

@@ -3,7 +3,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var field = this.form.get("fieldName"); //获取组件对象
+ * var field = this.form.get("fieldId"); //获取组件对象
  * //方法2
  * //方法2
  * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
  * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
  * @extends MWF.xApplication.process.Xform.$Input
  * @extends MWF.xApplication.process.Xform.$Input
@@ -106,7 +106,7 @@ MWF.xApplication.process.Xform.Combox = MWF.APPCombox =  new Class(
     /**
     /**
      * @summary 获取选择项数组.
      * @summary 获取选择项数组.
      * @example
      * @example
-     * var array = this.form.get('fieldName').getOptions();
+     * var array = this.form.get('fieldId').getOptions();
      * @return {Array} 选择项数组,如果配置为脚本返回计算结果.
      * @return {Array} 选择项数组,如果配置为脚本返回计算结果.
      */
      */
     getOptions: function(){
     getOptions: function(){
@@ -156,17 +156,17 @@ MWF.xApplication.process.Xform.Combox = MWF.APPCombox =  new Class(
         return [];
         return [];
     },
     },
     /**
     /**
-     * 当表单上没有对应组件的时候,可以使用this.data[fieldName] = data赋值。
+     * 当表单上没有对应组件的时候,可以使用this.data[fieldId] = data赋值。
      * @summary 为组件赋值。
      * @summary 为组件赋值。
      * @param value{String} .
      * @param value{String} .
      * @example
      * @example
-     *  this.form.get("fieldName").setData("test"); //赋文本值
+     *  this.form.get("fieldId").setData("test"); //赋文本值
      * @example
      * @example
      *  //如果无法确定表单上是否有组件,需要判断
      *  //如果无法确定表单上是否有组件,需要判断
-     *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-     *      this.form.get('fieldName').setData( data );
+     *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+     *      this.form.get('fieldId').setData( data );
      *  }else{
      *  }else{
-     *      this.data['fieldName'] = data;
+     *      this.data['fieldId'] = data;
      *  }
      *  }
      */
      */
     setData: function(value){
     setData: function(value){
@@ -212,7 +212,7 @@ MWF.xApplication.process.Xform.Combox = MWF.APPCombox =  new Class(
     /**
     /**
      * @summary 重新计算下拉选项,该功能通常用在下拉选项为动态计算的情况.
      * @summary 重新计算下拉选项,该功能通常用在下拉选项为动态计算的情况.
      * @example
      * @example
-     * this.form.get('fieldName').resetOption();
+     * this.form.get('fieldId').resetOption();
      */
      */
     resetOption: function(){
     resetOption: function(){
         if (this.combox){
         if (this.combox){
@@ -225,7 +225,7 @@ MWF.xApplication.process.Xform.Combox = MWF.APPCombox =  new Class(
      * @param text  {String} 下拉选项文本
      * @param text  {String} 下拉选项文本
      * @param value {String} 下拉选项值
      * @param value {String} 下拉选项值
      * @example
      * @example
-     * this.form.get('fieldName').addOption("秘密","level1");
+     * this.form.get('fieldId').addOption("秘密","level1");
      */
      */
 	addOption: function(text, value){
 	addOption: function(text, value){
         if (this.combox){
         if (this.combox){
@@ -252,7 +252,7 @@ MWF.xApplication.process.Xform.Combox = MWF.APPCombox =  new Class(
     /**
     /**
      * @summary 获取选中的值和文本.
      * @summary 获取选中的值和文本.
      * @example
      * @example
-     * var array = this.form.get('fieldName').getTextData();
+     * var array = this.form.get('fieldId').getTextData();
      * @return {Object} 返回选中项值和文本,格式为 { 'value' : value, 'text' : text }.
      * @return {Object} 返回选中项值和文本,格式为 { 'value' : value, 'text' : text }.
      */
      */
     getTextData: function(){
     getTextData: function(){

+ 2 - 2
o2web/source/x_component_process_Xform/Common.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var el = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var el = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor

+ 20 - 20
o2web/source/x_component_process_Xform/DatagridMobile.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var datagrid = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var datagrid = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor
@@ -1377,27 +1377,27 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class(
     /**
     /**
      * @summary 重置数据网格的值为默认值或置空。
      * @summary 重置数据网格的值为默认值或置空。
      *  @example
      *  @example
-     * this.form.get('fieldName').resetData();
+     * this.form.get('fieldId').resetData();
      */
      */
     resetData: function(){
     resetData: function(){
         this.setData(this._getValue());
         this.setData(this._getValue());
     },
     },
     /**当参数为Promise的时候,请查看文档: {@link  https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}<br/>
     /**当参数为Promise的时候,请查看文档: {@link  https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}<br/>
-     * 当表单上没有对应组件的时候,可以使用this.data[fieldName] = data赋值。
+     * 当表单上没有对应组件的时候,可以使用this.data[fieldId] = data赋值。
      * @summary 为数据网格赋值。
      * @summary 为数据网格赋值。
      * @param data{DatagridData|Promise|Array} 必选,数组或Promise.
      * @param data{DatagridData|Promise|Array} 必选,数组或Promise.
      * @example
      * @example
-     *  this.form.get("fieldName").setData([]); //赋空值
+     *  this.form.get("fieldId").setData([]); //赋空值
      * @example
      * @example
      *  //如果无法确定表单上是否有组件,需要判断
      *  //如果无法确定表单上是否有组件,需要判断
-     *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-     *      this.form.get('fieldName').setData( data );
+     *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+     *      this.form.get('fieldId').setData( data );
      *  }else{
      *  }else{
-     *      this.data['fieldName'] = data;
+     *      this.data['fieldId'] = data;
      *  }
      *  }
      *@example
      *@example
      *  //使用Promise
      *  //使用Promise
-     *  var field = this.form.get("fieldName");
+     *  var field = this.form.get("fieldId");
      *  var promise = new Promise(function(resolve, reject){ //发起异步请求
      *  var promise = new Promise(function(resolve, reject){ //发起异步请求
      *    var oReq = new XMLHttpRequest();
      *    var oReq = new XMLHttpRequest();
      *    oReq.addEventListener("load", function(){ //绑定load事件
      *    oReq.addEventListener("load", function(){ //绑定load事件
@@ -1539,7 +1539,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class(
     /**
     /**
      * @summary 获取总计数据.
      * @summary 获取总计数据.
      * @example
      * @example
-     * var totalObject = this.form.get('fieldName').getTotal();
+     * var totalObject = this.form.get('fieldId').getTotal();
      * @return {Object} 总计数据
      * @return {Object} 总计数据
      */
      */
     getTotal: function(){
     getTotal: function(){
@@ -1549,7 +1549,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class(
     /**
     /**
      * @summary 判断数据网格是否为空.
      * @summary 判断数据网格是否为空.
      * @example
      * @example
-     * if( this.form.get('fieldName').isEmpty() ){
+     * if( this.form.get('fieldId').isEmpty() ){
      *     this.form.notice('至少需要添加一条数据', 'warn');
      *     this.form.notice('至少需要添加一条数据', 'warn');
      * }
      * }
      * @return {Boolean} 是否为空
      * @return {Boolean} 是否为空
@@ -1564,27 +1564,27 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class(
         return false;
         return false;
     },
     },
     /**
     /**
-     * 在脚本中使用 this.data[fieldName] 也可以获取组件值。
+     * 在脚本中使用 this.data[fieldId] 也可以获取组件值。
      * 区别如下:<br/>
      * 区别如下:<br/>
      * 1、当使用Promise的时候<br/>
      * 1、当使用Promise的时候<br/>
      * 使用异步函数生成器(Promise)为组件赋值的时候,用getData方法立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。<br/>
      * 使用异步函数生成器(Promise)为组件赋值的时候,用getData方法立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。<br/>
-     * this.data[fieldName] 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。<br/>
+     * this.data[fieldId] 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。<br/>
      * {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}<br/>
      * {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}<br/>
-     * 2、当表单上没有对应组件的时候,可以使用this.data[fieldName]获取值,但是this.form.get('fieldName')无法获取到组件。
+     * 2、当表单上没有对应组件的时候,可以使用this.data[fieldId]获取值,但是this.form.get('fieldId')无法获取到组件。
      * @summary 获取数据网格数据.
      * @summary 获取数据网格数据.
      * @example
      * @example
-     * var data = this.form.get('fieldName').getData();
+     * var data = this.form.get('fieldId').getData();
      *@example
      *@example
      *  //如果无法确定表单上是否有组件,需要判断
      *  //如果无法确定表单上是否有组件,需要判断
      *  var data;
      *  var data;
-     *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-     *      data = this.form.get('fieldName').getData();
+     *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+     *      data = this.form.get('fieldId').getData();
      *  }else{
      *  }else{
-     *      data = this.data['fieldName']; //直接从数据中获取字段值
+     *      data = this.data['fieldId']; //直接从数据中获取字段值
      *  }
      *  }
      *  @example
      *  @example
      *  //使用Promise
      *  //使用Promise
-     *  var field = this.form.get("fieldName");
+     *  var field = this.form.get("fieldId");
      *  var promise = new Promise(function(resolve, reject){ //发起异步请求
      *  var promise = new Promise(function(resolve, reject){ //发起异步请求
      *    var oReq = new XMLHttpRequest();
      *    var oReq = new XMLHttpRequest();
      *    oReq.addEventListener("load", function(){ //绑定load事件
      *    oReq.addEventListener("load", function(){ //绑定load事件
@@ -1760,7 +1760,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class(
      * @summary 根据组件的校验设置进行校验。
      * @summary 根据组件的校验设置进行校验。
      *  @param {String} [routeName] - 可选,路由名称.
      *  @param {String} [routeName] - 可选,路由名称.
      *  @example
      *  @example
-     *  if( !this.form.get('fieldName').validation() ){
+     *  if( !this.form.get('fieldId').validation() ){
      *      return false;
      *      return false;
      *  }
      *  }
      *  @return {Boolean} 是否通过校验
      *  @return {Boolean} 是否通过校验

+ 20 - 20
o2web/source/x_component_process_Xform/DatagridPC.js

@@ -70,9 +70,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var datagrid = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var datagrid = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor
@@ -1214,27 +1214,27 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
 	/**
 	/**
 	 * @summary 重置数据网格的值为默认值或置空。
 	 * @summary 重置数据网格的值为默认值或置空。
 	 *  @example
 	 *  @example
-	 * this.form.get('fieldName').resetData();
+	 * this.form.get('fieldId').resetData();
 	 */
 	 */
 	resetData: function(){
 	resetData: function(){
 		this.setData(this._getValue());
 		this.setData(this._getValue());
 	},
 	},
 	/**当参数为Promise的时候,请查看文档: {@link  https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}<br/>
 	/**当参数为Promise的时候,请查看文档: {@link  https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}<br/>
-	 * 当表单上没有对应组件的时候,可以使用this.data[fieldName] = data赋值。
+	 * 当表单上没有对应组件的时候,可以使用this.data[fieldId] = data赋值。
 	 * @summary 为数据网格赋值。
 	 * @summary 为数据网格赋值。
 	 * @param data{DatagridData|Promise|Array} 必选,数组或Promise.
 	 * @param data{DatagridData|Promise|Array} 必选,数组或Promise.
 	 * @example
 	 * @example
-	 *  this.form.get("fieldName").setData([]); //赋空值
+	 *  this.form.get("fieldId").setData([]); //赋空值
 	 * @example
 	 * @example
 	 *  //如果无法确定表单上是否有组件,需要判断
 	 *  //如果无法确定表单上是否有组件,需要判断
-	 *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-	 *      this.form.get('fieldName').setData( data );
+	 *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+	 *      this.form.get('fieldId').setData( data );
 	 *  }else{
 	 *  }else{
-	 *      this.data['fieldName'] = data;
+	 *      this.data['fieldId'] = data;
 	 *  }
 	 *  }
 	 *@example
 	 *@example
 	 *  //使用Promise
 	 *  //使用Promise
-	 *  var field = this.form.get("fieldName");
+	 *  var field = this.form.get("fieldId");
 	 *  var promise = new Promise(function(resolve, reject){ //发起异步请求
 	 *  var promise = new Promise(function(resolve, reject){ //发起异步请求
 	 *    var oReq = new XMLHttpRequest();
 	 *    var oReq = new XMLHttpRequest();
 	 *    oReq.addEventListener("load", function(){ //绑定load事件
 	 *    oReq.addEventListener("load", function(){ //绑定load事件
@@ -1332,7 +1332,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
 	/**
 	/**
 	 * @summary 获取总计数据.
 	 * @summary 获取总计数据.
 	 * @example
 	 * @example
-	 * var totalObject = this.form.get('fieldName').getTotal();
+	 * var totalObject = this.form.get('fieldId').getTotal();
 	 * @return {Object} 总计数据
 	 * @return {Object} 总计数据
 	 */
 	 */
 	getTotal: function(){
 	getTotal: function(){
@@ -1342,7 +1342,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
 	/**
 	/**
 	 * @summary 判断数据网格是否为空.
 	 * @summary 判断数据网格是否为空.
 	 * @example
 	 * @example
-	 * if( this.form.get('fieldName').isEmpty() ){
+	 * if( this.form.get('fieldId').isEmpty() ){
 	 *     this.form.notice('至少需要添加一条数据', 'warn');
 	 *     this.form.notice('至少需要添加一条数据', 'warn');
 	 * }
 	 * }
 	 * @return {Boolean} 是否为空
 	 * @return {Boolean} 是否为空
@@ -1358,27 +1358,27 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
 	},
 	},
 
 
 	/**
 	/**
-	 * 在脚本中使用 this.data[fieldName] 也可以获取组件值。
+	 * 在脚本中使用 this.data[fieldId] 也可以获取组件值。
 	 * 区别如下:<br/>
 	 * 区别如下:<br/>
 	 * 1、当使用Promise的时候<br/>
 	 * 1、当使用Promise的时候<br/>
 	 * 使用异步函数生成器(Promise)为组件赋值的时候,用getData方法立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。<br/>
 	 * 使用异步函数生成器(Promise)为组件赋值的时候,用getData方法立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。<br/>
-	 * this.data[fieldName] 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。<br/>
+	 * this.data[fieldId] 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。<br/>
 	 * {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}<br/>
 	 * {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}<br/>
-	 * 2、当表单上没有对应组件的时候,可以使用this.data[fieldName]获取值,但是this.form.get('fieldName')无法获取到组件。
+	 * 2、当表单上没有对应组件的时候,可以使用this.data[fieldId]获取值,但是this.form.get('fieldId')无法获取到组件。
 	 * @summary 获取数据网格数据.
 	 * @summary 获取数据网格数据.
 	 * @example
 	 * @example
-	 * var data = this.form.get('fieldName').getData();
+	 * var data = this.form.get('fieldId').getData();
 	 *@example
 	 *@example
 	 *  //如果无法确定表单上是否有组件,需要判断
 	 *  //如果无法确定表单上是否有组件,需要判断
 	 *  var data;
 	 *  var data;
-	 *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-	 *      data = this.form.get('fieldName').getData();
+	 *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+	 *      data = this.form.get('fieldId').getData();
 	 *  }else{
 	 *  }else{
-	 *      data = this.data['fieldName']; //直接从数据中获取字段值
+	 *      data = this.data['fieldId']; //直接从数据中获取字段值
 	 *  }
 	 *  }
 	 *  @example
 	 *  @example
 	 *  //使用Promise
 	 *  //使用Promise
-	 *  var field = this.form.get("fieldName");
+	 *  var field = this.form.get("fieldId");
 	 *  var promise = new Promise(function(resolve, reject){ //发起异步请求
 	 *  var promise = new Promise(function(resolve, reject){ //发起异步请求
 	 *    var oReq = new XMLHttpRequest();
 	 *    var oReq = new XMLHttpRequest();
 	 *    oReq.addEventListener("load", function(){ //绑定load事件
 	 *    oReq.addEventListener("load", function(){ //绑定load事件
@@ -1553,7 +1553,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
 	 * @summary 根据组件的校验设置进行校验。
 	 * @summary 根据组件的校验设置进行校验。
 	 *  @param {String} [routeName] - 可选,路由名称.
 	 *  @param {String} [routeName] - 可选,路由名称.
 	 *  @example
 	 *  @example
-	 *  if( !this.form.get('fieldName').validation() ){
+	 *  if( !this.form.get('fieldId').validation() ){
 	 *      return false;
 	 *      return false;
 	 *  }
 	 *  }
 	 *  @return {Boolean} 是否通过校验
 	 *  @return {Boolean} 是否通过校验

+ 2 - 2
o2web/source/x_component_process_Xform/Div.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var div = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var div = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor

+ 12 - 12
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var documenteditor = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var documenteditor = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor
@@ -63,7 +63,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
     /**
     /**
      * 激活公文编辑器编辑。设置了延迟加载的时候,可以通过这个方法来激活
      * 激活公文编辑器编辑。设置了延迟加载的时候,可以通过这个方法来激活
      * @example
      * @example
-     * this.form.get("fieldName").active();
+     * this.form.get("fieldId").active();
     */
     */
     active: function(){
     active: function(){
         this._loadModuleEvents();
         this._loadModuleEvents();
@@ -1714,7 +1714,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
     /**缩放文件内容
     /**缩放文件内容
      * @param scale{Number} 缩放的比率
      * @param scale{Number} 缩放的比率
      * @example
      * @example
-     * this.form.get("fieldName").scaleTo(0.5);
+     * this.form.get("fieldId").scaleTo(0.5);
     */
     */
     scaleTo: function(scale){
     scaleTo: function(scale){
         this._returnScale();
         this._returnScale();
@@ -2514,7 +2514,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
     /**重新计算公文编辑器的所有字段,当字段是脚本时可以使用该方法立即更新
     /**重新计算公文编辑器的所有字段,当字段是脚本时可以使用该方法立即更新
      * @summary 重新计算公文编辑器的所有字段
      * @summary 重新计算公文编辑器的所有字段
      * @example
      * @example
-     * this.form.get("fieldName").reload();
+     * this.form.get("fieldId").reload();
      */
      */
     reload: function(){
     reload: function(){
         this.resetData();
         this.resetData();
@@ -2542,7 +2542,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
      * @summary 判断公文编辑器的正文内容是否已经填写
      * @summary 判断公文编辑器的正文内容是否已经填写
      * @return {Boolean} 是否为空
      * @return {Boolean} 是否为空
      * @example
      * @example
-     * if( this.form.get("fieldName").isEmpty() ){
+     * if( this.form.get("fieldId").isEmpty() ){
      *     this.form.notice('请填写正文内容')
      *     this.form.notice('请填写正文内容')
      * }
      * }
      */
      */
@@ -2555,7 +2555,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
     * 获取公文编辑器数据
     * 获取公文编辑器数据
      * @return {Object} 公文编辑器的数据
      * @return {Object} 公文编辑器的数据
      * @example
      * @example
-     * var data = this.form.get("fieldName").getData();
+     * var data = this.form.get("fieldId").getData();
     */
     */
     getData: function(){
     getData: function(){
         //if (this.editMode){
         //if (this.editMode){
@@ -2643,9 +2643,9 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
     /**设置公文编辑器数据
     /**设置公文编辑器数据
      * @param data{Object}
      * @param data{Object}
      * @example
      * @example
-     * var data = this.form.get("fieldName").getData();
+     * var data = this.form.get("fieldId").getData();
      * data.filetext = "测试内容";
      * data.filetext = "测试内容";
-     * this.form.get("fieldName").getData(data);
+     * this.form.get("fieldId").getData(data);
     */
     */
     setData: function(data, diffFiletext){
     setData: function(data, diffFiletext){
         if (data){
         if (data){
@@ -2925,7 +2925,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
      * @summary 根据组件的校验设置进行校验。
      * @summary 根据组件的校验设置进行校验。
      *  @param {String} [routeName] - 可选,路由名称.
      *  @param {String} [routeName] - 可选,路由名称.
      *  @example
      *  @example
-     *  if( !this.form.get('fieldName').validation() ){
+     *  if( !this.form.get('fieldId').validation() ){
      *      return false;
      *      return false;
      *  }
      *  }
      *  @return {Boolean} 是否通过校验
      *  @return {Boolean} 是否通过校验
@@ -2964,7 +2964,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
     /**将公文编辑器内容以html形式输出
     /**将公文编辑器内容以html形式输出
      * @return {String}
      * @return {String}
      * @example
      * @example
-     * var html = this.form.get("fieldName").getDocumentHtml();
+     * var html = this.form.get("fieldId").getDocumentHtml();
     */
     */
     getDocumentHtml: function(){
     getDocumentHtml: function(){
         var tmpNode = this.contentNode.getFirst().getFirst().clone(true);
         var tmpNode = this.contentNode.getFirst().getFirst().clone(true);
@@ -2995,7 +2995,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
      * @param {Function} [callback] 转换后的回调方法,参数是附件数据.
      * @param {Function} [callback] 转换后的回调方法,参数是附件数据.
      * @param {string} [name] - 如果为空或者不传,转换的文件名和格式等信息与配置有关.
      * @param {string} [name] - 如果为空或者不传,转换的文件名和格式等信息与配置有关.
      * @example
      * @example
-     * this.form.get("fieldName").toWord( function(attachmentData){
+     * this.form.get("fieldId").toWord( function(attachmentData){
      *     //attachmentData 转换后的附件数据
      *     //attachmentData 转换后的附件数据
      * })
      * })
     */
     */

+ 15 - 15
o2web/source/x_component_process_Xform/Htmleditor.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var htmlEditor = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var htmlEditor = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor
@@ -392,7 +392,7 @@ MWF.xApplication.process.Xform.Htmleditor = MWF.APPHtmleditor =  new Class(
     /**
     /**
      * @summary 重置组件的值为默认值或置空。
      * @summary 重置组件的值为默认值或置空。
      *  @example
      *  @example
-     * this.form.get('fieldName').resetData();
+     * this.form.get('fieldId').resetData();
      */
      */
     resetData: function(){
     resetData: function(){
         this.setData(this._getBusinessData());
         this.setData(this._getBusinessData());
@@ -400,7 +400,7 @@ MWF.xApplication.process.Xform.Htmleditor = MWF.APPHtmleditor =  new Class(
     /**
     /**
      * @summary 判断组件值是否为空.
      * @summary 判断组件值是否为空.
      * @example
      * @example
-     * if( this.form.get('fieldName').isEmpty() ){
+     * if( this.form.get('fieldId').isEmpty() ){
      *     this.form.notice('HTML编辑器不能为空', 'warn');
      *     this.form.notice('HTML编辑器不能为空', 'warn');
      * }
      * }
      * @return {Boolean} 值是否为空.
      * @return {Boolean} 值是否为空.
@@ -409,17 +409,17 @@ MWF.xApplication.process.Xform.Htmleditor = MWF.APPHtmleditor =  new Class(
         return !this.getData().trim();
         return !this.getData().trim();
     },
     },
     /**
     /**
-     * 当表单上没有对应组件的时候,可以使用this.data[fieldName]获取值,但是this.form.get('fieldName')无法获取到组件。
+     * 当表单上没有对应组件的时候,可以使用this.data[fieldId]获取值,但是this.form.get('fieldId')无法获取到组件。
      * @summary 获取组件值。
      * @summary 获取组件值。
      * @example
      * @example
-     * var data = this.form.get('fieldName').getData();
+     * var data = this.form.get('fieldId').getData();
      * @example
      * @example
      *  //如果无法确定表单上是否有组件,需要判断
      *  //如果无法确定表单上是否有组件,需要判断
      *  var data;
      *  var data;
-     *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-     *      data = this.form.get('fieldName').getData();
+     *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+     *      data = this.form.get('fieldId').getData();
      *  }else{
      *  }else{
-     *      data = this.data['fieldName']; //直接从数据中获取字段值
+     *      data = this.data['fieldId']; //直接从数据中获取字段值
      *  }
      *  }
      * @return 组件的数据.
      * @return 组件的数据.
      */
      */
@@ -428,17 +428,17 @@ MWF.xApplication.process.Xform.Htmleditor = MWF.APPHtmleditor =  new Class(
         return this.editor ? this.editor.getData() : "";
         return this.editor ? this.editor.getData() : "";
     },
     },
     /**
     /**
-     * 当表单上没有对应组件的时候,可以使用this.data[fieldName] = data赋值。
+     * 当表单上没有对应组件的时候,可以使用this.data[fieldId] = data赋值。
      * @summary 为组件赋值。
      * @summary 为组件赋值。
      * @param data{String} .
      * @param data{String} .
      * @example
      * @example
-     *  this.form.get("fieldName").setData("test"); //赋文本值
+     *  this.form.get("fieldId").setData("test"); //赋文本值
      * @example
      * @example
      *  //如果无法确定表单上是否有组件,需要判断
      *  //如果无法确定表单上是否有组件,需要判断
-     *  if( this.form.get('fieldName') ){ //判断表单是否有无对应组件
-     *      this.form.get('fieldName').setData( data );
+     *  if( this.form.get('fieldId') ){ //判断表单是否有无对应组件
+     *      this.form.get('fieldId').setData( data );
      *  }else{
      *  }else{
-     *      this.data['fieldName'] = data;
+     *      this.data['fieldId'] = data;
      *  }
      *  }
      */
      */
     setData: function(data){
     setData: function(data){
@@ -578,7 +578,7 @@ MWF.xApplication.process.Xform.Htmleditor = MWF.APPHtmleditor =  new Class(
      * @summary 根据组件的校验设置进行校验。
      * @summary 根据组件的校验设置进行校验。
      *  @param {String} [routeName] - 可选,路由名称.
      *  @param {String} [routeName] - 可选,路由名称.
      *  @example
      *  @example
-     *  if( !this.form.get('fieldName').validation() ){
+     *  if( !this.form.get('fieldId').validation() ){
      *      return false;
      *      return false;
      *  }
      *  }
      *  @return {Boolean} 是否通过校验
      *  @return {Boolean} 是否通过校验

+ 2 - 2
o2web/source/x_component_process_Xform/Iframe.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var iframe = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var iframe = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor

+ 2 - 2
o2web/source/x_component_process_Xform/Image.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var img = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var img = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor

+ 5 - 5
o2web/source/x_component_process_Xform/ImageClipper.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var imageClipper = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var imageClipper = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor
@@ -102,7 +102,7 @@ MWF.xApplication.process.Xform.ImageClipper = MWF.APPImageClipper =  new Class(
     /**
     /**
      * @summary 判断组件值是否为空.
      * @summary 判断组件值是否为空.
      * @example
      * @example
-     * if( this.form.get('fieldName').isEmpty() ){
+     * if( this.form.get('fieldId').isEmpty() ){
      *     this.form.notice('请上传图片', 'warn');
      *     this.form.notice('请上传图片', 'warn');
      * }
      * }
      * @return {Boolean} 值是否为空.
      * @return {Boolean} 值是否为空.
@@ -114,7 +114,7 @@ MWF.xApplication.process.Xform.ImageClipper = MWF.APPImageClipper =  new Class(
      * 获取上传的图片ID。
      * 获取上传的图片ID。
      * @summary 获取上传的图片ID。
      * @summary 获取上传的图片ID。
      * @example
      * @example
-     * var id = this.form.get('fieldName').getData(); //获取上传的图片id
+     * var id = this.form.get('fieldId').getData(); //获取上传的图片id
      * var url = MWF.xDesktop.getImageSrc( id ); //获取图片的url
      * var url = MWF.xDesktop.getImageSrc( id ); //获取图片的url
      */
      */
     getData: function( data ){
     getData: function( data ){
@@ -311,7 +311,7 @@ MWF.xApplication.process.Xform.ImageClipper = MWF.APPImageClipper =  new Class(
      * @summary 根据组件的校验设置进行校验。
      * @summary 根据组件的校验设置进行校验。
      *  @param {String} [routeName] - 可选,路由名称.
      *  @param {String} [routeName] - 可选,路由名称.
      *  @example
      *  @example
-     *  if( !this.form.get('fieldName').validation() ){
+     *  if( !this.form.get('fieldId').validation() ){
      *      return false;
      *      return false;
      *  }
      *  }
      *  @return {Boolean} 是否通过校验
      *  @return {Boolean} 是否通过校验

+ 4 - 4
o2web/source/x_component_process_Xform/Label.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var label = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var label = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor
@@ -72,10 +72,10 @@ MWF.xApplication.process.Xform.Label = MWF.APPLabel =  new Class(
      * @summary 为组件设置文本,该文本不会被保存到后台。
      * @summary 为组件设置文本,该文本不会被保存到后台。
      * @param text{String|Promise} .
      * @param text{String|Promise} .
      * @example
      * @example
-     *  this.form.get("fieldName").setText("test"); //赋文本值
+     *  this.form.get("fieldId").setText("test"); //赋文本值
      * @example
      * @example
      *  //使用Promise
      *  //使用Promise
-     *  var field = this.form.get("fieldName");
+     *  var field = this.form.get("fieldId");
      *  var dict = new this.Dict("test"); //test为数据字典名称
      *  var dict = new this.Dict("test"); //test为数据字典名称
      *  var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
      *  var promise = dict.get("tools", true); //异步使用数据字典的get方法时返回Promise,参数true表示异步
      *  field.setText( promise );
      *  field.setText( promise );

+ 2 - 2
o2web/source/x_component_process_Xform/Log.js

@@ -4,9 +4,9 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var log = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var log = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.$Module
  * @extends MWF.xApplication.process.Xform.$Module
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor

+ 2 - 2
o2web/source/x_component_process_Xform/Number.js

@@ -3,9 +3,9 @@ MWF.xDesktop.requireApp("process.Xform", "Textfield", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var attachment = this.form.get("name"); //获取组件
+ * var field = this.form.get("name"); //获取组件
  * //方法2
  * //方法2
- * var attachment = this.target; //在组件事件脚本中获取
+ * var field = this.target; //在组件事件脚本中获取
  * @extends MWF.xApplication.process.Xform.Textfield
  * @extends MWF.xApplication.process.Xform.Textfield
  * @category FormComponents
  * @category FormComponents
  * @hideconstructor
  * @hideconstructor

+ 4 - 4
o2web/source/x_component_process_Xform/Office.js

@@ -334,7 +334,7 @@ MWF.xApplication.process.Xform.Office = MWF.APPOffice =  new Class(
     /**
     /**
      * @summary 允许编辑Office文档
      * @summary 允许编辑Office文档
      * @example
      * @example
-     * this.form.get("fieldName").editEnabled();
+     * this.form.get("fieldId").editEnabled();
      */
      */
     editEnabled: function(){
     editEnabled: function(){
         try {
         try {
@@ -344,7 +344,7 @@ MWF.xApplication.process.Xform.Office = MWF.APPOffice =  new Class(
     /**
     /**
      * @summary 设置Office文档为只读
      * @summary 设置Office文档为只读
      * @example
      * @example
-     * this.form.get("fieldName").docReadonly();
+     * this.form.get("fieldId").docReadonly();
      */
      */
     docReadonly: function(){
     docReadonly: function(){
         this.protect(3);
         this.protect(3);
@@ -352,7 +352,7 @@ MWF.xApplication.process.Xform.Office = MWF.APPOffice =  new Class(
     /**
     /**
      * @summary 设置Office文档状态
      * @summary 设置Office文档状态
      * @example
      * @example
-     * this.form.get("fieldName").protect(1);
+     * this.form.get("fieldId").protect(1);
      * @param {Number} type 1(批注),2(填写窗体),3(只读),0(修订),-1(限制编辑样式)
      * @param {Number} type 1(批注),2(填写窗体),3(只读),0(修订),-1(限制编辑样式)
      */
      */
     protect: function(type){
     protect: function(type){
@@ -1287,7 +1287,7 @@ MWF.xApplication.process.Xform.Office = MWF.APPOffice =  new Class(
         @summary Ntko Office 控件对象, 第三方控件
         @summary Ntko Office 控件对象, 第三方控件
         @see {@link http://ieoffice.ntko.com/pro/show/mid/1_8/pid/2731|NTKO官网 }
         @see {@link http://ieoffice.ntko.com/pro/show/mid/1_8/pid/2731|NTKO官网 }
          @example
          @example
-         var officeOCX = this.form.get("fieldName").officeOCX;
+         var officeOCX = this.form.get("fieldId").officeOCX;
          var activeDocument = officeOCX.ActiveDocument //返回一个Office Document 对象,该对象代表活动文档。
          var activeDocument = officeOCX.ActiveDocument //返回一个Office Document 对象,该对象代表活动文档。
          */
          */
         this.officeOCX = this.officeNode.getFirst().getFirst();
         this.officeOCX = this.officeNode.getFirst().getFirst();

+ 41 - 1
o2web/source/x_component_process_Xform/Opinion.js

@@ -1,6 +1,26 @@
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
 MWF.xDesktop.requireApp("process.Work", "lp."+o2.language, null, false);
 MWF.xDesktop.requireApp("process.Work", "lp."+o2.language, null, false);
-MWF.xApplication.process.Xform.Opinion = MWF.APPOpinion =  new Class({
+/** @class process.Opinion 意见输入框。
+ * @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.Opinion = MWF.APPOpinion =  new Class(
+    /** @lends MWF.xApplication.process.Xform.Opinion# */
+    {
 	Implements: [Events],
 	Implements: [Events],
 	Extends: MWF.APP$Input,
 	Extends: MWF.APP$Input,
 	
 	
@@ -119,6 +139,10 @@ MWF.xApplication.process.Xform.Opinion = MWF.APPOpinion =  new Class({
         this.mediaActionArea = new Element("div", {"styles": this.form.css.inputOpinionMediaActionArea}).inject(this.node);
         this.mediaActionArea = new Element("div", {"styles": this.form.css.inputOpinionMediaActionArea}).inject(this.node);
 
 
         if (this.json.isHandwriting!=="no"){
         if (this.json.isHandwriting!=="no"){
+            /**
+             * @summary 手写意见按钮按钮。
+             * @member {Element}
+             */
             this.handwritingAction = new Element("div", {"styles": this.form.css.inputOpinionHandwritingAction, "text": MWF.xApplication.process.Work.LP.handwriting}).inject(this.mediaActionArea);
             this.handwritingAction = new Element("div", {"styles": this.form.css.inputOpinionHandwritingAction, "text": MWF.xApplication.process.Work.LP.handwriting}).inject(this.mediaActionArea);
             this.handwritingAction.addEvent("click", function(){
             this.handwritingAction.addEvent("click", function(){
                 this.handwriting();
                 this.handwriting();
@@ -127,6 +151,10 @@ MWF.xApplication.process.Xform.Opinion = MWF.APPOpinion =  new Class({
 
 
         if (this.json.isAudio!=="no"){
         if (this.json.isAudio!=="no"){
             if (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia){
             if (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia){
+                /**
+                 * @summary 音频按钮.在浏览器支持HTML5的getUserMedia才可用。
+                 * @member {Element}
+                 */
                 this.audioRecordAction = new Element("div", {"styles": this.form.css.inputOpinionAudioRecordAction, "text": MWF.xApplication.process.Work.LP.audioRecord}).inject(this.mediaActionArea);
                 this.audioRecordAction = new Element("div", {"styles": this.form.css.inputOpinionAudioRecordAction, "text": MWF.xApplication.process.Work.LP.audioRecord}).inject(this.mediaActionArea);
                 this.audioRecordAction.addEvent("click", function(){
                 this.audioRecordAction.addEvent("click", function(){
                     this.audioRecord();
                     this.audioRecord();
@@ -217,6 +245,10 @@ MWF.xApplication.process.Xform.Opinion = MWF.APPOpinion =  new Class({
 
 
         this.soundFile = {};
         this.soundFile = {};
         MWF.require("MWF.widget.AudioRecorder", function () {
         MWF.require("MWF.widget.AudioRecorder", function () {
+            /**
+             * @summary 音频意见组件.
+             * @member {o2.widget.AudioRecorder}
+             */
             this.audioRecorder = new MWF.widget.AudioRecorder(this.audioRecordNode, {
             this.audioRecorder = new MWF.widget.AudioRecorder(this.audioRecordNode, {
                 "onSave" : function(audioFile){
                 "onSave" : function(audioFile){
                     this.soundFile[layout.session.user.distinguishedName] = audioFile;
                     this.soundFile[layout.session.user.distinguishedName] = audioFile;
@@ -281,6 +313,10 @@ MWF.xApplication.process.Xform.Opinion = MWF.APPOpinion =  new Class({
         });
         });
     },
     },
     createHandwriting: function(){
     createHandwriting: function(){
+        /**
+         * @summary 手写板容器.
+         * @member {Element}
+         */
         this.handwritingNode = new Element("div", {"styles": this.form.css.handwritingNode}).inject(this.node, "after");
         this.handwritingNode = new Element("div", {"styles": this.form.css.handwritingNode}).inject(this.node, "after");
         var size = this.node.getSize();
         var size = this.node.getSize();
         var x = Math.max( this.json.tabletWidth || size.x , 500);
         var x = Math.max( this.json.tabletWidth || size.x , 500);
@@ -308,6 +344,10 @@ MWF.xApplication.process.Xform.Opinion = MWF.APPOpinion =  new Class({
 
 
         this.handwritingFile = {};
         this.handwritingFile = {};
         MWF.require("MWF.widget.Tablet", function () {
         MWF.require("MWF.widget.Tablet", function () {
+            /**
+             * @summary 手写板组件.
+             * @member {o2.widget.Tablet}
+             */
             this.tablet = new MWF.widget.Tablet(this.handwritingAreaNode, {
             this.tablet = new MWF.widget.Tablet(this.handwritingAreaNode, {
                 "style": "default",
                 "style": "default",
                 "contentWidth" : this.json.tabletWidth || 0,
                 "contentWidth" : this.json.tabletWidth || 0,

+ 133 - 3
o2web/source/x_component_process_Xform/Org.js

@@ -1,13 +1,130 @@
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
 MWF.xDesktop.requireApp("Selector", "package", null, false);
 MWF.xDesktop.requireApp("Selector", "package", null, false);
 MWF.require("MWF.widget.O2Identity", null, false);
 MWF.require("MWF.widget.O2Identity", null, false);
-MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
+/** @class process.Org 人员组织组件。
+ * @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.Org = MWF.APPOrg =  new Class(
+    /** @lends MWF.xApplication.process.Xform.Org# */
+    {
     Implements: [Events],
     Implements: [Events],
     Extends: MWF.APP$Input,
     Extends: MWF.APP$Input,
     options: {
     options: {
+        /**
+         * 组件加载前触发。
+         * @event MWF.xApplication.process.Xform.Org#queryLoad
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 组件加载时触发.
+         * @event MWF.xApplication.process.Xform.Org#load
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 组件加载后触发.
+         * @event MWF.xApplication.process.Xform.Org#postLoad
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 当组件值改变时触发。
+         * @event MWF.xApplication.process.Xform.Org#change
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 当组件不允许输入(使用人员选择框)时,完成选择人员,并且给组件赋值后执行。
+         * @event MWF.xApplication.process.Xform.Org#select
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
         "moduleEvents": ["load", "queryLoad", "postLoad", "change", "select"],
         "moduleEvents": ["load", "queryLoad", "postLoad", "change", "select"],
-        "selectorEvents" : ["queryLoadSelector","postLoadSelector","postLoadContent","queryLoadCategory","postLoadCategory",
-            "selectCategory", "unselectCategory","queryLoadItem","postLoadItem","selectItem", "unselectItem","change"],
+        /**
+         * 人员选择框事件:加载前执行。this.target指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#queryLoadSelector
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:加载后执行,由于选择项为异步加载,此时选择项并未加载完成。this.target指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#postLoadSelector
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:加载选择框容器节点前执行。this.target指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#queryLoadCategory
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:加载选择框容器节点后执行。this.target指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#postLoadContent
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+
+        /**
+         * 人员选择框事件:加载分类前执行。this.target指向分类,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#queryLoadCategory
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:加载分类后执行。this.target指向分类,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#postLoadCategory
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:选择分类后执行。this.target指向分类,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#selectCategory
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:取消选择分类后执行。this.target指向分类,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#unselectCategory
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:展开分类后执行。this.target指向分类,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#expand
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:折叠分类后执行。this.target指向分类,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#collapse
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+
+        /**
+         * 人员选择框事件:加载选择项前执行。this.target指向选择项,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#queryLoadItem
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:加载选择项后执行。this.target指向选择项,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#postLoadItem
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:选择选择项后执行。this.target指向选择项,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#selectItem
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 人员选择框事件:取消选择选择项后执行。this.target指向选择项,this.target.selector指向人员选择框。
+         * @event MWF.xApplication.process.Xform.Org#unselectItem
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        "selectorEvents" : ["queryLoadSelector","postLoadSelector","queryLoadContent","postLoadContent","queryLoadCategory","postLoadCategory",
+            "selectCategory", "unselectCategory","queryLoadItem","postLoadItem","selectItem", "unselectItem","change","expand","collapse"],
         "readonly": true
         "readonly": true
     },
     },
 
 
@@ -468,6 +585,11 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
         if (!v || !v.length) if (this.descriptionNode)  this.descriptionNode.setStyle("display", "block");
         if (!v || !v.length) if (this.descriptionNode)  this.descriptionNode.setStyle("display", "block");
     },
     },
 
 
+    /**
+     * @summary 弹出选择界面.
+     * @example
+     * this.form.get('org').clickSelect();
+     */
     clickSelect: function( ev ){
     clickSelect: function( ev ){
         if (this.readonly)return;
         if (this.readonly)return;
         if( layout.mobile ){
         if( layout.mobile ){
@@ -477,6 +599,14 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
                     if( this.selector && this.selector.loading ) {
                     if( this.selector && this.selector.loading ) {
                     }else if( this.selector && this.selector.selector && this.selector.selector.active ){
                     }else if( this.selector && this.selector.selector && this.selector.selector.active ){
                     }else{
                     }else{
+                        /**
+                         * @summary 人员选择框package的对象
+                         * @member {o2.O2Selector}
+                         * @example
+                         *  //可以在脚本中获取该组件
+                         * var selector = this.form.get("fieldId").selector.selector; //获取人员选择框对象
+                         * var options = selector.options; //获取人员选择框的选项
+                         */
                         this.selector = new MWF.O2Selector(this.form.app.content, options);
                         this.selector = new MWF.O2Selector(this.form.app.content, options);
                     }
                     }
                 }
                 }

+ 53 - 2
o2web/source/x_component_process_Xform/Radio.js

@@ -1,9 +1,33 @@
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
 MWF.require("MWF.widget.UUID", null, false);
 MWF.require("MWF.widget.UUID", null, false);
-MWF.xApplication.process.Xform.Radio = MWF.APPRadio =  new Class({
+/** @class process.Radio 单选按钮。
+ * @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.Radio = MWF.APPRadio =  new Class(
+    /** @lends MWF.xApplication.process.Xform.Radio# */
+    {
 	Implements: [Events],
 	Implements: [Events],
 	Extends: MWF.APP$Input,
 	Extends: MWF.APP$Input,
-
+    /**
+     * @ignore
+     * @member {Element} descriptionNode
+     * @memberOf MWF.xApplication.process.Xform.Radio#
+     */
     loadDescription: function(){},
     loadDescription: function(){},
     _loadNode: function(){
     _loadNode: function(){
         if (this.readonly || this.json.isReadonly ){
         if (this.readonly || this.json.isReadonly ){
@@ -92,10 +116,21 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio =  new Class({
             }.bind(this));
             }.bind(this));
         }
         }
     },
     },
+    /**
+     * @summary 刷新选择项,如果选择项是脚本,重新计算。
+     * @example
+     * this.form.get('fieldId').resetOption();
+     */
     resetOption: function(){
     resetOption: function(){
         this.node.empty();
         this.node.empty();
         this.setOptions();
         this.setOptions();
     },
     },
+    /**
+     * @summary 获取选择项。
+     * @return {Array} 返回选择项数组,如果使用选择项脚本,根据脚本返回决定
+     * @example
+     * this.form.get('fieldId').getOptions();
+     */
 	getOptions: function(){
 	getOptions: function(){
 		if (this.json.itemType == "values"){
 		if (this.json.itemType == "values"){
 			return this.json.itemValues;
 			return this.json.itemValues;
@@ -279,6 +314,16 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio =  new Class({
 			}
 			}
 		}
 		}
 	},
 	},
+    /**
+     * @summary 获取选中项的value和text。
+     * @return {Object} 返回选中项的value和text,如:
+     * <pre><code class='language-js'>{"value": ["male"], "text": ["男"]}
+     * {"value": [""], "text": [""]}
+     * </code></pre>
+     * @example
+     * var data = this.form.get('fieldId').getTextData();
+     * var text = data.text[0] //获取选中项的文本
+     */
 	getTextData: function(){
 	getTextData: function(){
 		var inputs = this.node.getElements("input");
 		var inputs = this.node.getElements("input");
 		var value = "";
 		var value = "";
@@ -316,6 +361,12 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio =  new Class({
     resetData: function(){
     resetData: function(){
         this.setData(this.getValue());
         this.setData(this.getValue());
     },
     },
+    /**
+     * @summary 获取选中的Dom对象。
+     * @return {Element} 返回选中的Dom对象
+     * @example
+     * var input = this.form.get('fieldId').getSelectedInput();
+     */
     getSelectedInput: function(){
     getSelectedInput: function(){
         var inputs = this.node.getElements("input");
         var inputs = this.node.getElements("input");
         if (inputs.length){
         if (inputs.length){

+ 56 - 1
o2web/source/x_component_process_Xform/Select.js

@@ -1,9 +1,34 @@
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
-MWF.xApplication.process.Xform.Select = MWF.APPSelect =  new Class({
+/** @class process.Select 下拉选择组件。
+ * @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.Select = MWF.APPSelect =  new Class(
+	/** @lends MWF.xApplication.process.Xform.Select# */
+	{
 	Implements: [Events],
 	Implements: [Events],
 	Extends: MWF.APP$Input,
 	Extends: MWF.APP$Input,
 	iconStyle: "selectIcon",
 	iconStyle: "selectIcon",
 
 
+	/**
+	 * @ignore
+	 * @member {Element} descriptionNode
+	 * @memberOf MWF.xApplication.process.Xform.Select#
+	 */
     initialize: function(node, json, form, options){
     initialize: function(node, json, form, options){
         this.node = $(node);
         this.node = $(node);
         this.node.store("module", this);
         this.node.store("module", this);
@@ -120,11 +145,22 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect =  new Class({
         }.bind(this));
         }.bind(this));
 
 
 	},
 	},
+	/**
+	 * @summary 刷新选择项,如果选择项是脚本,重新计算。
+	 * @example
+	 * this.form.get('fieldId').resetOption();
+	 */
     resetOption: function(){
     resetOption: function(){
         this.node.empty();
         this.node.empty();
         this.setOptions();
         this.setOptions();
 		this.fireEvent("resetOption")
 		this.fireEvent("resetOption")
     },
     },
+	/**
+	 * @summary 获取选择项。
+	 * @return {Array} 返回选择项数组,如果使用选择项脚本,根据脚本返回决定
+	 * @example
+	 * this.form.get('fieldId').getOptions();
+	 */
 	getOptions: function(){
 	getOptions: function(){
 		if (this.json.itemType == "values"){
 		if (this.json.itemType == "values"){
 			return this.json.itemValues;
 			return this.json.itemValues;
@@ -294,6 +330,17 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect =  new Class({
     //     }
     //     }
 	// 	//this.node.set("value", value);
 	// 	//this.node.set("value", value);
 	// },
 	// },
+
+	/**
+	 * @summary 获取选中项的value和text。
+	 * @return {Object} 返回选中项的value和text,如:
+	 * <pre><code class='language-js'>{"value": ["male"], "text": ["男"]}
+	 * {"value": [""], "text": [""]}
+	 * </code></pre>
+	 * @example
+	 * var data = this.form.get('fieldId').getTextData();
+	 * var text = data.text[0] //获取选中项的文本
+	 */
 	getTextData: function(){
 	getTextData: function(){
 		var value = [];
 		var value = [];
 		var text = [];
 		var text = [];
@@ -341,6 +388,14 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect =  new Class({
 
 
         this.setData(this.getValue());
         this.setData(this.getValue());
     },
     },
+	/**
+	 * @summary 获取整理后的选择项。
+	 * @return {Object} 返回整理后的选择项,如:
+	 * <pre><code class='language-js'>{"value": ["","female","male"], "text": ["","女","男"]}
+	 * </code></pre>
+	 * @example
+	 * var optionData = this.form.get('fieldId').getOptionsObj();
+	 */
 	getOptionsObj : function(){
 	getOptionsObj : function(){
 		var textList = [];
 		var textList = [];
 		var valueList = [];
 		var valueList = [];

+ 22 - 1
o2web/source/x_component_process_Xform/Sidebar.js

@@ -1,6 +1,19 @@
 MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
 MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
 //MWF.require("MWF.widget.Tree", null, false);
 //MWF.require("MWF.widget.Tree", null, false);
-MWF.xApplication.process.Xform.Sidebar = MWF.APPSidebar =  new Class({
+/** @class Sidebar 侧边操作条。
+ * @example
+ * //可以在脚本中获取该组件
+ * //方法1:
+ * var sidebar = this.form.get("name"); //获取操作条
+ * //方法2
+ * var sidebar = this.target; //在操作条和操作本身的事件脚本中获取
+ * @extends MWF.xApplication.process.Xform.$Module
+ * @category FormComponents
+ * @hideconstructor
+ */
+MWF.xApplication.process.Xform.Sidebar = MWF.APPSidebar =  new Class(
+    /** @lends MWF.xApplication.process.Xform.Sidebar# */
+{
 	Extends: MWF.APP$Module,
 	Extends: MWF.APP$Module,
 
 
     _loadUserInterface: function(){
     _loadUserInterface: function(){
@@ -43,6 +56,14 @@ MWF.xApplication.process.Xform.Sidebar = MWF.APPSidebar =  new Class({
                 }.bind(this));
                 }.bind(this));
                 this.json.defaultTools = toolbars.concat(this.json.defaultTools);
                 this.json.defaultTools = toolbars.concat(this.json.defaultTools);
                 //this.json.defaultTools.unshift(o);
                 //this.json.defaultTools.unshift(o);
+
+                /**
+                 * @summary Toolbar组件,平台使用该组件生成操作条。
+                 * @member {o2.widget.Toolbar}
+                 * @example
+                 *  //可以在脚本中获取该组件
+                 * var toolbarWidget = this.form.get("fieldId").toolbarWidget; //获取组件对象
+                 */
                 this.toolbarWidget = new MWF.widget.Toolbar(this.toolbarNode, {"style": this.json.style}, this);
                 this.toolbarWidget = new MWF.widget.Toolbar(this.toolbarNode, {"style": this.json.style}, this);
                 //alert(this.readonly)
                 //alert(this.readonly)
 
 

+ 63 - 1
o2web/source/x_component_process_Xform/Source.js

@@ -1,7 +1,31 @@
 MWF.xDesktop.requireApp("process.Xform", "Div", null, false);
 MWF.xDesktop.requireApp("process.Xform", "Div", null, false);
-MWF.xApplication.process.Xform.Source = MWF.APPSource =  new Class({
+
+/** @class Source 数据源组件。
+ * @example
+ * //可以在脚本中获取该组件
+ * //方法1:
+ * var source = this.form.get("name"); //获取操作条
+ * //方法2
+ * var source = this.target; //在操作条和操作本身的事件脚本中获取
+ * @extends MWF.xApplication.process.Xform.Div
+ * @category FormComponents
+ * @hideconstructor
+ */
+MWF.xApplication.process.Xform.Source = MWF.APPSource =  new Class(
+    /** @lends MWF.xApplication.process.Xform.Source# */
+    {
 	Extends: MWF.APPDiv,
 	Extends: MWF.APPDiv,
     options: {
     options: {
+        /**
+         * 加载数据后执行,但这时还未加载数据源及下属数据文本,可以可以使用this.target.data获取数据进行修改。
+         * @event MWF.xApplication.process.Xform.Org#postLoadData
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
+        /**
+         * 加载数据、子数据源及下属数据文本后执行。
+         * @event MWF.xApplication.process.Xform.Org#loadData
+         * @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
+         */
         "moduleEvents": ["queryLoad","postLoad","load", "postLoadData", "loadData"]
         "moduleEvents": ["queryLoad","postLoad","load", "postLoadData", "loadData"]
     },
     },
 
 
@@ -92,11 +116,42 @@ MWF.xApplication.process.Xform.Source = MWF.APPSource =  new Class({
     setBody: function(data){
     setBody: function(data){
         this.body = data;
         this.body = data;
     },
     },
+    /**
+     * @summary 替换全部的url参数,但不刷新组件
+     * @param {Object} url参数
+     * @example
+     * //如,原来的组件url参数为:
+     * { "page" : 1, "count" : 10  }
+     *
+     * this.form.get("fieldId").setParameters({"id":"662ede34-4e21-428a-9c3b-f1bf14d15650"});
+     *
+     * //执行后变为
+     * {"id":"662ede34-4e21-428a-9c3b-f1bf14d15650"}
+     */
     setParameters: function(json){
     setParameters: function(json){
         this.json.parameters = json;
         this.json.parameters = json;
         this._getO2Address();
         this._getO2Address();
         this._getO2Uri();
         this._getO2Uri();
     },
     },
+    /**
+     * @summary 新增url参数,但不刷新组件。如果该参数key已经存在,则覆盖
+     * @param {Object} url参数
+     * @example
+     * * //如,原来的组件url参数为:
+     * { "page" : 1, "count" : 10  }
+     *
+     * this.form.get("fieldId").addParameters({
+     *  "page" : 2,
+     *  "id":"662ede34-4e21-428a-9c3b-f1bf14d15650"
+     *  });
+     *
+     * //执行后变为
+     * {
+     *  "page" : 2,
+     *  "count" : 10
+     *  "id":"662ede34-4e21-428a-9c3b-f1bf14d15650"
+     *  }
+     */
     addParameters: function(json){
     addParameters: function(json){
         if (!this.json.parameters) this.json.parameters={};
         if (!this.json.parameters) this.json.parameters={};
         Object.each(json, function(v, k){
         Object.each(json, function(v, k){
@@ -105,6 +160,13 @@ MWF.xApplication.process.Xform.Source = MWF.APPSource =  new Class({
         this._getO2Address();
         this._getO2Address();
         this._getO2Uri();
         this._getO2Uri();
     },
     },
+    /**
+     * @summary 重新加载组件。会触发loadData事件
+     * @param {Boolean} notInit - false表示不重新初始化子数据源和数据文本,true表示重新初始化,默认为false
+     * @param {Function} callback 加载完成后的回调
+     * @example
+     * this.form.get("fieldId").reload(); //重新加载组件
+     */
     reload: function(notInit, callback){
     reload: function(notInit, callback){
 	    this._getO2Uri();
 	    this._getO2Uri();
         this._invoke(function(){
         this._invoke(function(){

+ 1 - 1
o2web/source/x_component_process_Xform/Textfield.js

@@ -3,7 +3,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
  * @example
  * @example
  * //可以在脚本中获取该组件
  * //可以在脚本中获取该组件
  * //方法1:
  * //方法1:
- * var field = this.form.get("fieldName"); //获取组件对象
+ * var field = this.form.get("fieldId"); //获取组件对象
  * //方法2
  * //方法2
  * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
  * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等
  *
  *

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác