unknown 5 anni fa
parent
commit
c587af5baf

+ 2 - 1
o2web/jsdoc.conf.json

@@ -4,7 +4,8 @@
         "destination": "./o2web/jsdoc/",          //输出目标文件夹
         "recurse": true,                 //是否递归抽取sorce/include配置的文件夹
         "template" : "./node_modules/tidy-jsdoc-o2", //模板路径
-        "prism-theme": "prism-custom" //模板中的代码块样式主题
+        "prism-theme": "prism-custom", //模板中的代码块样式主题
+        "readme" : "./o2web/jsdoc_static/home/README.md" //首页
         //"tutorials": "./o2web/tutorials" //如果有教程,对应教程目录
     },
 

+ 386 - 0
o2web/jsdoc_static/home/README.md

@@ -0,0 +1,386 @@
+# O2OA前台API
+
+## 简介
+
+* O2OA 是一个高度可定制化的企业级办公平台,您可以通过脚本语言扩展平台功能。
+
+* O2OA 前端脚本基于您使用的浏览器的Javascript引擎,使用Javascript语法。
+
+* 您可以通过脚本访问和操作允许的DOM对象;也可以通过平台定义的API操作表单、业务数据、组织、视图等各种对象。
+
+
+## API总览
+
+### Modules
+
+<table>
+    <tr>
+        <td><a href="module-data.html">业务数据 - data</a></td>
+        <td><a href="module-workContext.html">流程实例 - workContext</a></td>
+        <td><a href="module-documentContext.html">内容管理实例 - documentContext</a></td>
+    </tr>
+    <tr>
+        <td><a href="module-org.html">组织 - org</a></td>
+        <td><a href="module-form.html">流程表单 - form</a></td>
+        <td><a href="module-page.html">页面 - page</a></td>
+    </tr>
+    <tr>
+        <td><a href="module-queryView.html">视图 - queryView</a></td>
+        <td><a href="module-view.html">视图执行 - view</a></td>
+        <td><a href="module-Dict.html">数据字典 - Dict</a></td>
+    </tr>
+    <tr>
+        <td><a href="module-queryStatement.html">查询视图 - queryStatement</a></td>
+        <td><a href="module-statement.html">查询执行 - statement</a></td>
+        <td><a href="module-Actions.html">Actions - Actions</a></td>
+    </tr>
+    <tr>
+        <td><a href="module-include.html">引用 - include</a></td>
+        <td><a href="module-define.html">方法定义 - define</a></td>
+        <td><a href="module-session.html">session - session</a></td>
+    </tr>
+</table>
+
+### FormComponent
+
+* FormComponent为表单组件,可以通过`this.form.get("fieldId")`获取。
+
+#### Process 流程表单组件
+<table>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Form.html">表单 - Form</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Label.html">文本 - Label</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Textfield.html">文本字段 - Textfield</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Number.html">数字字段 - Number</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Org.html">人员组织 - Org</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Calendar.html">日期选择 - Calendar</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Textarea.html">多行文本 - Textarea</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Select.html">下拉框 - Select</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Radio.html">单选框 - Radio</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Checkbox.html">多选框 - Checkbox</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Combox.html">组合框 - Combox</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Opinion.html">意见框 - Opinion</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Button.html">按钮 - Button</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Address.html">地址 - Address</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Actionbar.html">操作条 - Actionbar</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Sidebar.html">侧边操作条 - Sidebar</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Image.html">图片 - Image</a></td>
+        <td><a href="MWF.xApplication.process.Xform.ImageClipper.html">图片编辑 - ImageClipper</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Attachment.html">附件 - Attachment</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Div.html">容器 - Div</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Table.html">表格 - Table</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Table$Td.html">单元格 - Table$Td</a></td>
+        <td><a href="MWF.xApplication.process.Xform.DatagridPC.html">数据网格PC端 - DatagridPC</a></td>
+        <td><a href="MWF.xApplication.process.Xform.DatagridMobile.html">数据网格移动端 - DatagridMobile</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Subform.html">子表单 - Subform</a></td>
+        <td><a href="MWF.xApplication.process.Xform.ViewSelector.html">选择视图 - ViewSelector</a></td>
+        <td><a href="MWF.xApplication.process.Xform.View.html">嵌入视图 - View</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Stat.html">嵌入统计 - Stat</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Common.html">通用元素 - Common</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Tab.html">分页 - Tab</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Tree.html">树 - Tree</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Log.html">流程记录 - Log</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Monitor.html">流程监控 - Monitor</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Iframe.html">Iframe - Iframe</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Documenteditor.html">公文编辑器 - Documenteditor</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Htmleditor.html">HTML编辑器 - Htmleditor</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Office.html">Office控件 - Office</a></td>
+        <td><a href="MWF.xApplication.process.Xform.StatementSelector.html">选择查询视图 - StatementSelector</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Statement.html">嵌入查询视图 - Statement</a></td>
+    </tr>
+</table>
+
+
+
+#### CMS 内容管理表单组件
+<table>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Form.html">表单 - Form</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Label.html">文本 - Label</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Textfield.html">文本字段 - Textfield</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Number.html">数字字段 - Number</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Org.html">人员组织 - Org</a></td>
+        <td><a href="MWF.xApplication.cms.Xform.Reader.html">读者 - Reader</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.cms.Xform.Author.html">作者 - Author</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Calendar.html">日期选择 - Calendar</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Textarea.html">多行文本 - Textarea</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Select.html">下拉框 - Select</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Radio.html">单选框 - Radio</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Checkbox.html">多选框 - Checkbox</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Combox.html">组合框 - Combox</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Button.html">按钮 - Button</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Address.html">地址 - Address</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Actionbar.html">操作条 - Actionbar</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Image.html">图片 - Image</a></td>
+        <td><a href="MWF.xApplication.process.Xform.ImageClipper.html">图片编辑 - ImageClipper</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Attachment.html">附件 - Attachment</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Div.html">容器 - Div</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Table.html">表格 - Table</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Table$Td.html">单元格 - Table$Td</a></td>
+        <td><a href="MWF.xApplication.process.Xform.DatagridPC.html">数据网格PC端 - DatagridPC</a></td>
+        <td><a href="MWF.xApplication.process.Xform.DatagridMobile.html">数据网格移动端 - DatagridMobile</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Subform.html">子表单 - Subform</a></td>
+        <td><a href="MWF.xApplication.process.Xform.ViewSelector.html">选择视图 - ViewSelector</a></td>
+        <td><a href="MWF.xApplication.process.Xform.View.html">嵌入视图 - View</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Stat.html">嵌入统计 - Stat</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Common.html">通用元素 - Common</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Tab.html">分页 - Tab</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Tree.html">树 - Tree</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Iframe.html">Iframe - Iframe</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Htmleditor.html">HTML编辑器 - Htmleditor</a></td>
+    </tr>
+    <tr>
+        <td><a href="CMSLog.html">阅读记录 - CMSLog</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Office.html">Office控件 - Office</a></td>
+        <td><a href="MWF.xApplication.cms.Xform.Comment.html">评论 - Comment</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.StatementSelector.html">选择查询视图 - StatementSelector</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Statement.html">嵌入查询视图 - Statement</a></td>
+        <td></td>
+     </tr>
+</table>
+
+#### Portal 门户页面组件
+<table>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Form.html">表单 - Form</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Div.html">容器 - Div</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Label.html">文本 - Label</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Source.html">数据源 - Source</a></td>
+        <td><a href="MWF.xApplication.process.Xform.SubSource.html">子数据源 - SubSource</a></td>
+        <td><a href="MWF.xApplication.process.Xform.SourceText.html">数据文本 - SourceText</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Table.html">表格 - Table</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Table$Td.html">单元格 - Table$Td</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Tab.html">分页 - Tab</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Image.html">图片 - Image</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Button.html">按钮 - Button</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Iframe.html">Iframe - Iframe</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Common.html">通用元素 - Common</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Tree.html">树 - Tree</a></td>
+        <td><a href="MWF.xApplication.process.Xform.View.html">嵌入视图 - View</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Stat.html">嵌入统计 - Stat</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Textfield.html">文本字段 - Textfield</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Org.html">人员组织 - Org</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Calendar.html">日期选择 - Calendar</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Textarea.html">多行文本 - Textarea</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Select.html">下拉框 - Select</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Radio.html">单选框 - Radio</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Checkbox.html">多选框 - Checkbox</a></td>
+        <td><a href="MWF.xApplication.process.Xform.Widget.html">部件 - Widget</a></td>
+    </tr>
+    <tr>
+        <td><a href="MWF.xApplication.process.Xform.Statement.html">嵌入查询视图 - Statement</a></td>
+        <td></td>
+        <td></td>
+    </tr>
+</table>
+
+
+
+### 服务
+
+* 服务是O2OA后台提供的一系列restful服务。
+
+<table>
+    <tr>
+        <td>x_processplatform_assemble_surface</td>
+        <td>流程平台相关服务</td>
+    </tr>
+    <tr>
+         <td>x_portal_assemble_surface</td>
+         <td>门户平台相关服务</td>
+     </tr>
+    <tr>
+         <td>x_cms_assemble_control</td>
+         <td>内容管理平台相关服务</td>
+     </tr>
+    <tr>
+         <td>x_query_assemble_surface</td>
+         <td>数据平台相关服务</td>
+     </tr>
+    <tr>
+         <td>x_organization_assemble_express</td>
+         <td>组织架构相关服务</td>
+     </tr>
+    <tr>
+         <td>x_file_assemble_control</td>
+         <td>云文件相关服务</td>
+     </tr>
+    <tr>
+         <td>x_meeting_assemble_control</td>
+         <td>会议管理相关服务</td>
+     </tr>
+     <tr>
+          <td>x_bbs_assemble_control</td>
+          <td>论坛相关服务</td>
+      </tr>
+     <tr>
+          <td>x_calendar_assemble_control</td>
+          <td>日程管理相关服务</td>
+      </tr>
+     <tr>
+          <td>x_hotpic_assemble_control</td>
+          <td>热点信息相关服务</td>
+      </tr>
+     <tr>
+          <td>x_mind_assemble_control</td>
+          <td>脑图模块相关服务</td>
+      </tr>
+     <tr>
+          <td>x_organization_assemble_personal</td>
+          <td>个人设置相关服务</td>
+      </tr>
+     <tr>
+          <td>x_attendance_assemble_control</td>
+          <td>考勤模块相关服务</td>
+      </tr>
+</table>
+
+## 使用范围
+
+O2OA 可在多个位置嵌入脚本代码,用于扩展平台和实现自定义功能。嵌入脚本代码分为前端执行代码和服务端执行代码,两者语法一致,本文档指前台脚本。
+
+
+### 脚本:
+
+流程平台、门户平台和内容管理平台中,都有脚本设计元素,可以在此创建自己的脚本库。如下图:
+![脚本](img/home/script.png)
+<br/><br/>
+
+### 表单、页面、视图、查询视图及其组件事件:
+
+流程平台和内容平台的表单、门户平台的页面、数据平台的视图和查询视图中,每个设计组件包含多种事件,包括DOM对象原生事件和O2平台扩展事件。如下图:
+![事件中的脚本](img/home/script_event.png)
+<br/><br/>
+
+### 表单、页面可编辑组件默认值:
+
+流程平台和内容平台的表单和门户平台的页面中,可编辑组件或文本组件的默认值可以通过脚本指定。如下图:
+![事件中的脚本](img/home/script_defaultvalue.png)
+<br/><br/>
+
+### 表单、页面、视图、查询视图的部分属性:
+
+流程平台和内容平台的表单、门户平台的页面、数据平台的视图和查询视图中,有许多组件的相关属性可以通过脚本来定义。<br/>
+如:下拉框、单选多选按钮的可选值、人员字段的选择范围、区段依据等。如下图:<br/>
+![属性中的脚本](img/home/script_attribute.png)
+<br/><br/>
+
+### 表单及可编辑组件校验:
+
+流程平台和内容管理的表单中,可编辑的字段可以通过脚本进行有效性校验,校验通过返回true,不通过返回提示信息。如下图:
+![脚本](img/home/script_validation.png)
+<br/><br/>
+
+### 流程路由属性的扩展附签和选择附签下的脚本:
+![扩展附签脚本](img/home/script_route_extend.png)
+![选择附签脚本](img/home/script_route_select.png)
+<br/><br/>
+
+
+
+## 样例
+* 这是一个简单的样例,用于展现脚本如何编写和运行。
+* 本例中我们要实现一个表单中,两个下拉框从配置数据中获取可选数据,以及实现联动。
+* 我们需要创建一个流程应用,一个表单以及一个数据字典。在表单中创建两个下拉列表框。
+
+1. 先在表单中创建两个下拉框
+<br/>
+![下拉框](img/home/example_1_1.png)
+<br/><br/>
+
+2. 在category1和category2两个下拉框的属性中,选择通过“脚本”编辑可选值。
+<br/>
+category1脚本:
+<br/>
+![下拉框](img/home/example_1_2_1.png)
+<br/><br/>
+category2脚本:
+<br/>
+![下拉框](img/home/example_1_2_2.png)
+<br/><br/>
+
+3. 在category1和category2两个下拉框的可选值脚本如下:<br/><br/>
+category1的可选值脚本:
+```
+var dict = new this.Dict("category");   //获取名为category的数据字典 
+var categoryList = dict.get();  //获取数据字典
+var options = Object.keys(categoryList);    //获取大类,赋值给options变量
+options.unshift("(请选择大类)|");   //在options数组首位插入提示选项,并将“”作为value,“(请选择大类)”作为text
+return options; //返回列表,作为列表框的可选值 
+```    
+category2的可选值脚本:
+```  
+var dict = new this.Dict("category"); //获取名为category的数据字典 
+var categoryList = dict.get(this.data.category1); //获取数据字典,以下拉框category1的值为关键字的数据值(数组) 
+return categoryList; //返回列表,作为列表框的可选值 
+```  
+
+4. 在category1的change事件中添加如下代码:
+```  
+//获category2下拉框,并刷新可选项
+this.form.get("category2").resetOption();
+```  
+5. 设计数据字典如下图,并命名为:"分类配置",别名为:“category”。
+![下拉框](img/home/example_1_5.png)
+
+6. 预览表单,即可看到大类下拉框中选项为数据字典中的第一层数据,选择不同的大类可与小类下拉框实现联动。

BIN
o2web/jsdoc_static/img/home/example_1_1.png


BIN
o2web/jsdoc_static/img/home/example_1_2_1.png


BIN
o2web/jsdoc_static/img/home/example_1_2_2.png


BIN
o2web/jsdoc_static/img/home/example_1_5.png


BIN
o2web/jsdoc_static/img/home/script.png


BIN
o2web/jsdoc_static/img/home/script_attribute.png


BIN
o2web/jsdoc_static/img/home/script_defaultvalue.png


BIN
o2web/jsdoc_static/img/home/script_event.png


BIN
o2web/jsdoc_static/img/home/script_route_extend.png


BIN
o2web/jsdoc_static/img/home/script_route_select.png


BIN
o2web/jsdoc_static/img/home/script_validation.png


+ 4 - 4
o2web/source/o2_core/o2/xScript/CMSEnvironment.js

@@ -76,7 +76,7 @@ MWF.xScript.CMSEnvironment = function(ev){
          * @method getDocument
          * @static
          * @return {Document} 内容管理实例对象.
-         * @example
+         * @o2syntax
          * var doc = this.documentContext.getDocument();
          */
         "getDocument": function(){return ev.document },
@@ -85,7 +85,7 @@ MWF.xScript.CMSEnvironment = function(ev){
          * @method getControl
          * @static
          * @return {DocumentControl} 当前人对内容管理实例的所拥有的权限.
-         * @example
+         * @o2syntax
          * var control = this.documentContext.getControl();
          */
         "getControl": function(){return ev.control;},
@@ -94,7 +94,7 @@ MWF.xScript.CMSEnvironment = function(ev){
          * @method getAttachmentList
          * @static
          * @return {DocumentAttachment[]} 当前人对内容管理实例的所拥有的权限.
-         * @example
+         * @o2syntax
          * var attachmentList = this.documentContext.getAttachmentList();
          */
         "getAttachmentList": function(){return ev.attachmentList;}
@@ -1561,7 +1561,7 @@ MWF.xScript.CMSEnvironment = function(ev){
         /**发布当前文档。<b>(仅内容管理表单中可用)</b>
          * @method publish
          * @memberOf module:form
-         * @example
+         * @o2syntax
          this.form.publish();
          */
         "publish": function(option){

+ 140 - 36
o2web/source/o2_core/o2/xScript/Environment.js

@@ -338,7 +338,7 @@ MWF.xScript.Environment = function(ev){
          * @param {(String|Number|Array|JsonObject)} value - 新的数据节点的值。
          * @param {Boolean} [overwrite] - 如果要添加的节点已经存在,是否覆盖。默认为 false。
          * @return {(String|Number|Array|JsonObject)} 新添加的数据节点或原有的同名节点。
-         * @example
+         * @o2syntax
          * var newData = this.data.add(key, value, overwrite);
          * @example
          * //为data添加一个名为"remark"值为"I am remark"的数据
@@ -372,6 +372,8 @@ MWF.xScript.Environment = function(ev){
          * @static
          * @memberOf module:data
          * @param {Function} [callback] - 保存成功后的回调函数。
+         * @o2syntax
+         * this.data.save(callback);
          * @example
          * this.data.save(function(json){
          *   this.form.notice("save success!", "success")
@@ -402,7 +404,7 @@ MWF.xScript.Environment = function(ev){
      * @module workContext
      * @o2range {Process}
      * @o2ordernumber 20
-     * @example
+     * @o2syntax
      * //您可以在表单或流程的各个嵌入脚本中,通过this来获取当前流程实例数据,如下:
      * var context = this.workContext;
      */
@@ -410,9 +412,65 @@ MWF.xScript.Environment = function(ev){
         /**
          * 获取当前流程实例对象:work对象或workCompleted对象。
          * @method getWork
+         * @o2ActionOut x_processplatform_assemble_surface.WorkAction.V2GetWorkOrWorkCompleted
          * @static
          * @return {(Work|WorkCompleted)} 流程实例对象;如果流程已结束,返回已结束的流程实例对象.
-         * @example
+         * <div>Work对象:</div>
+         * <pre><code class='language-js'>{
+         *     "id": "854e2c22-718e-48bb-98db-96f4b43e7ee8",   //流程实例ID
+         *     "splitValue": "xxxxxxxxxxxxxx", //流程拆分后的拆分依据
+         *     "title": "xx7月北京出差报销审批",               //流程实例名称
+         *     "startTime": "2018-09-07 14:03:22",             //流程启动时间
+         *     "startTimeMonth": "2018-09",                    //流程启动的月份
+         *     "creatorPerson": "xx@huqi@P",                   //流程实例创建人
+         *     "creatorIdentity": "xx@481c9edc-5fb5-41f1-b5c2-6ea609082cdb@I", //流程实例创建人身份
+         *     "creatorUnit": "xx@c448d8bb-98b8-4305-9d3f-12537723cfcc@U",     //流程实例创建人所在组织
+         *     "creatorUnitLevelName": "浙江兰德纵横/开发部",          //流程实例创建人所在组织层次
+         *     "application": "1dc23336-6be6-402b-bed6-36e707a1dd17",  //流程应用ID
+         *     "applicationName": "财务管理",                          //流程应用名称
+         *     "applicationAlias": "finance",                          //流程应用别名
+         *     "process": "2207db11-dddf-4ebd-864d-3819f3e173c6",      //流程ID
+         *     "processName": "报销审批流程",                          //流程名称
+         *     "processAlias": "",                                     //流程别名
+         *     "activity": "13d15daf-2ac5-4c1b-a669-1607a0e5ed15",     //当前活动ID
+         *     "activityType": "manual",                               //当前活动类型
+         *     "activityName": "部门领导审核",                         //当前活动名称
+         *     "activityAlias": "",                                    //当前活动别名
+         *     "activityDescription": "",                              //当前活动描述
+         *     "activityArrivedTime": "2018-09-27 22:49:21",           //当前活动到达时间
+         *     "serial": "",                                           //编号
+         *     "workStatus": "processing",                             //流程实例状态
+         *     "errorRetry": 0,                                        //流转失败重试次数
+         *     "splitting": false,                                     //流程是否拆分
+         *     "form": "db3b2766-93a1-4058-b522-0edb922bd84f",          //流程展现所使用的表单
+         *     "manualTaskIdentityList" : "张三@db3b2766-93a1-4058-b522-0edb922bd84f@I", //预期的处理人
+         *     "manualTaskIdentityText" : "张三" //当前处理人身份合并文本,用','分割,超长截断,此字段仅用于显示当前工作的处理人,不索引.
+         * }
+         * </pre></code>
+         * WorkCompleted对象:
+         * <pre><code class='language-js'>
+         * {
+         *    "id": "be0195f1-f2e2-4eac-911c-99897a43ff8f",   //流程实例ID
+         *    "title": "xx7月北京出差报销审批",               //流程实例名称
+         *    "startTime": "2018-09-19 16:14:16",             //流程启动时间
+         *    "startTimeMonth": "2018-09",                    //流程启动的月份
+         *    "completedTime": "2018-09-19 16:15:28",         //流程完成时间
+         *    "completedTimeMonth": "2018-09",                //流程完成的月份
+         *    "creatorPerson": "xx@huqi@P",                   //流程实例创建人
+         *    "creatorIdentity": "xx@481c9edc-5fb5-41f1-b5c2-6ea609082cdb@I", //流程实例创建人身份
+         *    "creatorUnit": "xx@c448d8bb-98b8-4305-9d3f-12537723cfcc@U",     //流程实例创建人所在组织
+         *    "creatorUnitLevelName": "浙江兰德纵横/开发部",  //流程实例创建人所在组织层次
+         *     "application": "1dc23336-6be6-402b-bed6-36e707a1dd17",  //流程应用ID
+         *     "applicationName": "财务管理",                          //流程应用名称
+         *     "applicationAlias": "finance",                          //流程应用别名
+         *     "process": "2207db11-dddf-4ebd-864d-3819f3e173c6",      //流程ID
+         *     "processName": "报销审批流程",                          //流程名称
+         *     "processAlias": "",                                     //流程别名
+         *     "serial": "",                                           //编号
+         *     "form": "320be1ca-ee49-478f-a751-f65ab67cf818",         //流程展现所使用的表单
+         * }
+         * </pre></code>
+         * @o2syntax
          * var work = this.workContext.getWork();
          */
         "getWork": function(){return ev.work || ev.workCompleted;},
@@ -421,7 +479,17 @@ MWF.xScript.Environment = function(ev){
          * @method getActivity
          * @static
          * @return {(Activity|Null)} 当前流程实例所在的活动节点对象,如果当前流程实例已流转完成,则返回null.
-         * @example
+         * <pre><code class='language-js'>{
+         *      "id": "801087c5-a4e6-4b91-bf4d-a81cdaa04471", //节点ID
+         *      "name": "办理",  //节点名称
+         *      "description": "", //节点描述
+         *      "alias": "",  //节点别名
+         *      "resetRange": "department", //重置处理人范围
+         *      "resetCount": 0,  //重置处理人数字
+         *      "allowReset": true, //是否允许重置
+         *      "manualMode": "single" //处理方式 单人single, 并行parallel, 串行queue, grab抢办
+         * }</pre></code>
+         * @o2syntax
          * var activity = this.workContext.getActivity();
          */
         "getActivity": function(){return ev.activity || null;},
@@ -433,7 +501,7 @@ MWF.xScript.Environment = function(ev){
          * @method getTask
          * @static
          * @return {(Task|Null)} 当前用户的待办任务对象:task。当前用户没有对此流程实例的待办时,或流程实例已经流转结束,返回null.
-         * @example
+         * @o2syntax
          * var task = this.workContext.getTask();
          */
         "getTask": function(){return ev.task || null;},
@@ -441,14 +509,15 @@ MWF.xScript.Environment = function(ev){
         /**
          * 获取当前流程实例的所有待办对象。如果流程实例已流转完成,则返回一个空数组。
          * @method getTaskList
+         * @o2ActionOut x_processplatform_assemble_surface.TaskAction.listWithWork
          * @static
          * @param {Function} [callback] 正确获取待办数组的回调,如果有此参数,本方法以异步执行,否则同步执行
          * @param {Function} [error] 获取待办数组出错时的回调。
          * @return {(Task[])} 待办任务列表.
-         * @example
+         * @o2syntax
          * //本样例以同步执行
          * var taskList = this.workContext.getTaskList();
-         * @example
+         * @o2syntax
          * //本样例以异步执行
          * this.workContext.getTaskList( function(taskList){
          *     //taskList 为待办数组
@@ -467,14 +536,15 @@ MWF.xScript.Environment = function(ev){
         /**
          * 根据当前工作的job获取当前流程实例的所有待办对象。如果流程实例已流转完成,则返回一个空数组。
          * @method getTaskListByJob
+         * @o2ActionOut x_processplatform_assemble_surface.TaskAction.listWithJob
          * @static
          * @param {Function} [callback] 正确获取待办数组的回调,如果有此参数,本方法以异步执行,否则同步执行
          * @param {Function} [error] 获取待办数组出错时的回调。
          * @return {(Task[])} 待办任务列表.
-         * @example
+         * @o2syntax
          * //本样例以同步执行
          * var taskList = this.workContext.getTaskListByJob();
-         * @example
+         * @o2syntax
          * //本样例以异步执行
          * this.workContext.getTaskListByJob( function(taskList){
          *     //taskList 为待办数组
@@ -498,10 +568,11 @@ MWF.xScript.Environment = function(ev){
          * @param {Function} [callback] 正确获取已办数组的回调,如果有此参数,本方法以异步执行,否则同步执行
          * @param {Function} [error] 获取已办数组出错时的回调。
          * @return {(TaskCompleted[])} 已办任务列表.
-         * @example
+         * @o2ActionOut x_processplatform_assemble_surface.TaskCompletedAction.listWithWork
+         * @o2syntax
          * //本样例以同步执行
          * var taskCompletedList = this.workContext.getTaskCompletedList();
-         * @example
+         * @o2syntax
          * //本样例以异步执行
          * this.workContext.getTaskCompletedList( function(taskCompletedList){
          *     //taskCompletedList 为待办数组
@@ -525,10 +596,11 @@ MWF.xScript.Environment = function(ev){
          * @param {Function} [callback] 正确获取已办数组的回调,如果有此参数,本方法以异步执行,否则同步执行
          * @param {Function} [error] 获取已办数组出错时的回调。
          * @return {(TaskCompleted[])} 已办任务列表.
-         * @example
+         * @o2ActionOut x_processplatform_assemble_surface.TaskCompletedAction.listWithJob
+         * @o2syntax
          * //本样例以同步执行
          * var taskCompletedList = this.workContext.getTaskCompletedListByJob();
-         * @example
+         * @o2syntax
          * //本样例以异步执行
          * this.workContext.getTaskCompletedListByJob( function(taskCompletedList){
          *     //taskCompletedList 为待办数组
@@ -552,10 +624,11 @@ MWF.xScript.Environment = function(ev){
          * @param {Function} [callback] 正确获取待阅数组的回调,如果有此参数,本方法以异步执行,否则同步执行
          * @param {Function} [error] 获取待阅数组出错时的回调。
          * @return {(Read[])} 当前流程实例的所有待阅对象数组.
-         * @example
+         * @o2ActionOut x_processplatform_assemble_surface.ReadAction.get
+         * @o2syntax
          * //本样例以同步执行
          * var readList = this.workContext.getReadList();
-         * @example
+         * @o2syntax
          * //本样例以异步执行
          * this.workContext.getReadList( function(readList){
          *     //readList 为待阅数组
@@ -578,10 +651,11 @@ MWF.xScript.Environment = function(ev){
          * @param {Function} [callback] 正确获取待阅数组的回调,如果有此参数,本方法以异步执行,否则同步执行
          * @param {Function} [error] 获取待阅数组出错时的回调。
          * @return {(Read[])} 当前流程实例的所有待阅对象数组.
-         * @example
+         * @o2ActionOut x_processplatform_assemble_surface.ReadAction.listWithJob
+         * @o2syntax
          * //本样例以同步执行
          * var readList = this.workContext.getReadListByJob();
-         * @example
+         * @o2syntax
          * //本样例以异步执行
          * this.workContext.getReadListByJob( function(readList){
          *     //readList 为待阅数组
@@ -605,10 +679,11 @@ MWF.xScript.Environment = function(ev){
          * @param {Function} [callback] 正确获取已阅数组的回调,如果有此参数,本方法以异步执行,否则同步执行
          * @param {Function} [error] 获取已阅数组出错时的回调。
          * @return {(ReadCompleted[])} 当前流程实例的所有已阅对象数组.
-         * @example
+         * @o2ActionOut x_processplatform_assemble_surface.ReadCompletedAction.listWithWork
+         * @o2syntax
          * //本样例以同步执行
          * var readCompletedList = this.workContext.getReadCompletedList();
-         * @example
+         * @o2syntax
          * //本样例以异步执行
          * this.workContext.getReadCompletedList( function(readCompletedList){
          *     //readCompletedList 为已阅数组
@@ -631,10 +706,11 @@ MWF.xScript.Environment = function(ev){
          * @param {Function} [callback] 正确获取已阅数组的回调,如果有此参数,本方法以异步执行,否则同步执行
          * @param {Function} [error] 获取已阅数组出错时的回调。
          * @return {(ReadCompleted[])} 当前流程实例的所有已阅对象数组.
-         * @example
+         * @o2ActionOut x_processplatform_assemble_surface.ReadCompletedAction.listWithJob
+         * @o2syntax
          * //本样例以同步执行
          * var readCompletedList = this.workContext.getReadCompletedListByJob();
-         * @example
+         * @o2syntax
          * //本样例以异步执行
          * this.workContext.getReadCompletedListByJob( function(readCompletedList){
          *     //readCompletedList 为已阅数组
@@ -660,7 +736,20 @@ MWF.xScript.Environment = function(ev){
          * @method getControl
          * @static
          * @return {WorkControl} 流程实例权限对象.
-         * @example
+         * <pre><code class='language-js'>{
+         *        "allowVisit": true,             //是否允许访问
+         *        "allowProcessing": true,        //是否允许流转
+         *        "allowReadProcessing": false,   //是否有待阅
+         *        "allowSave": true,              //是否允许保存业务数据
+         *        "allowReset": false,            //是否允许重置处理人
+         *        "allowRetract": false,          //是否允许撤回
+         *        "allowReroute": false,          //是否允许调度
+         *        "allowDelete": true,             //是否允许删除流程实例
+         *        "allowRollback": false,         //是否允许流程回溯
+         *        "allowAddSplit": false,         //是否允许增加分支
+         *        "allowPress": false,             //是否允许催办
+         * }</pre></code>
+         * @o2syntax
          * var control = this.workContext.getControl();
          */
         "getControl": function(){return ev.control;},
@@ -669,16 +758,18 @@ MWF.xScript.Environment = function(ev){
          * @method getWorkLogList
          * @static
          * @return {WorkLog[]} 流程记录对象.
-         * @example
+         * @o2ActionOut x_processplatform_assemble_surface.WorkLogAction.listWithJob
+         * @o2syntax
          * var workLogList = this.workContext.getWorkLogList();
          */
         "getWorkLogList": function(){return ev.workLogList;},
         /**
          * @summary 获取当前流程实例的所有流程记录(Record)。
          * @method getRecordList
+         * @o2ActionOut x_processplatform_assemble_surface.RecordAction.listWithJob
          * @static
          * @return {Record[]} 流程记录(Record)对象.
-         * @example
+         * @o2syntax
          * var workLogList = this.workContext.getRecordList();
          */
         "getRecordList": function(){return ev.recordList;},
@@ -687,7 +778,8 @@ MWF.xScript.Environment = function(ev){
          * @method getAttachmentList
          * @static
          * @return {WorkAttachmentData[]} 附件数据.
-         * @example
+         * @o2ActionOut x_processplatform_assemble_surface.AttachmentAction.getWithWorkOrWorkCompleted
+         * @o2syntax
          * var attachmentList = this.workContext.getAttachmentList();
          */
         "getAttachmentList": function(){return ev.attachmentList;},
@@ -696,7 +788,7 @@ MWF.xScript.Environment = function(ev){
          * @method getRouteList
          * @static
          * @return {String[]} 路由字符串数组.
-         * @example
+         * @o2syntax
          * var routeList = this.workContext.getRouteList();
          */
         "getRouteList": function(){return (ev.task) ? ev.task.routeNameList: null;},
@@ -706,6 +798,8 @@ MWF.xScript.Environment = function(ev){
          * @method setTitle
          * @static
          * @param {String} title - 路由字符串数组.
+         * @o2syntax
+         * this.workContext.setTitle(title);
          * @example
          * this.workContext.setTitle("标题");
          */
@@ -2019,7 +2113,7 @@ MWF.xScript.Environment = function(ev){
      * </pre></code>
      * @param {Function} [callback] 加载后执行的回调方法
      * @param {Boolean} [async] 是否异步加载
-     * @example
+     * @o2syntax
      * //您可以在表单、流程或内容管理的各个嵌入脚本中,通过this.include()来引用本应用或其他应用的脚本配置,如下:
      * this.include( optionsOrName, callback, async )
      * @example
@@ -2159,7 +2253,7 @@ MWF.xScript.Environment = function(ev){
      * @param {(String)} name 定义的方法名称。
      * @param {Function} fun  定义的方法
      * @param {Boolean} [overwrite] 定义的方法是否能被覆盖重写。默认值为true。
-     * @example
+     * @o2syntax
      * this.define(name, fun, overwrite)
      * @example
      * <caption>
@@ -2228,7 +2322,7 @@ MWF.xScript.Environment = function(ev){
      * @module form
      * @o2range {Process|CMS}
      * @o2ordernumber 40
-     * @example
+     * @o2syntax
      * //您可以在流程表单和内容管理的前端脚本中,通过this来获取form对象,如下:
      * var form = this.form;
      */
@@ -2238,7 +2332,7 @@ MWF.xScript.Environment = function(ev){
          * @method getInfor
          * @static
          * @return {FormInfor} 表单的基本信息.
-         * @example
+         * @o2syntax
          * var form = this.form.getInfor();
          */
         "getInfor": function(){return ev.formInfor;},
@@ -2250,6 +2344,8 @@ MWF.xScript.Environment = function(ev){
          * @method getApp
          * @static
          * @return {x_component_process_Work}打开当前文档的component对象.
+         * @o2syntax
+         * var app = this.form.getApp();
          * @example
          * var app = this.form.getApp();
         //所有component对象都有以下方法。
@@ -2284,7 +2380,7 @@ MWF.xScript.Environment = function(ev){
          * @method node
          * @static
          * @return {HTMLDivElement} 当前form对应的div对象.
-         * @example
+         * @o2syntax
          * var node = this.form.node();
          */
         "node": function(){return _form.node;},
@@ -2294,7 +2390,7 @@ MWF.xScript.Environment = function(ev){
          * @member readonly
          * @static
          * @return {Boolean} 是否只读.
-         * @example
+         * @o2syntax
          * var readonly = this.form.readonly;
          */
         "readonly": _form.options.readonly,
@@ -2316,6 +2412,8 @@ MWF.xScript.Environment = function(ev){
          * @static
          * @return {FormComponent} 请查看本文档的Classes导航下的FormComponents。
          * @param {String} name 字段标识
+         * @o2syntax
+         * var field = this.form.get(name);
          * @example
          * var field = this.form.get("subject");
          */
@@ -2333,6 +2431,8 @@ MWF.xScript.Environment = function(ev){
          * @static
          * @return {FormComponent} 请查看本文档的Classes导航下的FormComponents。
          * @param {String} name 字段标识
+         * @o2syntax
+         * var field = this.form.getField(name);
          * @example
          * var field = this.form.getField("subject");
          */
@@ -2345,7 +2445,7 @@ MWF.xScript.Environment = function(ev){
          * @method getData
          * @static
          * @see module:data
-         * @example
+         * @o2syntax
          *  var data = this.form.getData();
          * @return {Object} 返回表单绑定的业务数据。
          */
@@ -2357,6 +2457,8 @@ MWF.xScript.Environment = function(ev){
          * @static
          * @param {Function} [callback] - 保存后的回调
          * @param {Boolean} [silent] - 是否静默,否提示保存成功,默认为false
+         * @o2syntax
+         * this.form.save(callback, silent);
          * @example
          *  this.form.save(function(){
          *      //do someting
@@ -2377,6 +2479,8 @@ MWF.xScript.Environment = function(ev){
          * @summary 根据表单中所有组件的校验设置和“流转校验”脚本进行校验。
          * @method verify
          * @static
+         * @o2syntax
+         * this.form.verify()
          *  @example
          *  if( !this.form.verify() ){
          *      return false;
@@ -3149,7 +3253,7 @@ MWF.xScript.Environment = function(ev){
      * @memberOf module:form
      * @static
      * @return {String} 用户选择的路由。
-     * @example
+     * @o2syntax
      * var currentRouteName = this.form.currentRouteName;
      */
     this.form.currentRouteName = _form.json.currentRouteName;
@@ -3160,7 +3264,7 @@ MWF.xScript.Environment = function(ev){
      * @memberOf module:form
      * @static
      * @return {String} 用户填写的意见.
-     * @example
+     * @o2syntax
      * var opinion = this.form.opinion;
      */
     this.form.opinion = _form.json.opinion;
@@ -3171,7 +3275,7 @@ MWF.xScript.Environment = function(ev){
      * @memberOf module:form
      * @static
      * @return {Blob[]} 手写意见以及录音意见数组。手写意见和录音意见都是 HTML5的blob类型文件。
-     * @example
+     * @o2syntax
      * var medias = this.form.medias;
      */
     this.form.medias = [];

+ 8 - 4
o2web/source/o2_core/o2/xScript/PageEnvironment.js

@@ -1429,7 +1429,7 @@ MWF.xScript.PageEnvironment = function (ev) {
      * @module page
      * @o2range {Portal}
      * @o2ordernumber 50
-     * @example
+     * @o2syntax
      * //您可以在门户表单中,通过this来获取page对象,如下:
      * var page = this.page;
      */
@@ -1440,7 +1440,7 @@ MWF.xScript.PageEnvironment = function (ev) {
          * @param {String} name - 要跳转的页面名称
          * @param {Object} [par] - 要传入被打开页面的数据。在被打开的页面可以用this.page.parameters获取
          * @param {Boolean} [par] - 页面条件的时候,不往History里增加历史状态,默认为false
-         * @example
+         * @o2syntax
          * //跳转到当前门户的指定页面。
          * this.page.toPage( name, par );
          * @example
@@ -1459,7 +1459,7 @@ MWF.xScript.PageEnvironment = function (ev) {
          * @param {String} portal - 要跳转的门户名称。
          * @param {String} [page] - 要打开的门户的页面名称。为空则打开指定门户的默认首页。
          * @param {String} [par] - 在被打开的页面可以用this.page.parameters获取。
-         * @example
+         * @o2syntax
          * this.page.toPortal( portal, page, par );
          * @example
          * this.page.toPortal("公文门户", "列表页面", {"key": "发文列表"});//打开“公文门户”的“列表页面”,并传入一个json数据。
@@ -1505,6 +1505,8 @@ MWF.xScript.PageEnvironment = function (ev) {
          * @param {String} moduleName  - 部件元素标识。
          * @return {FormComponent} 请查看本文档的Classes导航下的FormComponents。
          * @see module:form.get
+         * @o2syntax
+         * this.page.getWidgetModule( widget, moduleName );
          * @example
          * <caption>
          * 1、设计了一个部件,包含一个设计元素subject。<br/>
@@ -1909,6 +1911,8 @@ MWF.xScript.PageEnvironment = function (ev) {
          * @member parameters
          * @static
          * @return {Boolean} 任意数据类型,根据传入的参数决定。
+         * @o2syntax
+         * var par = this.page.parameters
          * @example
          * //打开页面时传入参数:
          * this.form.openPortal(id, "", {"type": "my type"});
@@ -1924,7 +1928,7 @@ MWF.xScript.PageEnvironment = function (ev) {
          * @method getWidgetPrameters
          * @static
          * @return {Object} 任意数据类型,根据传入的参数决定。
-         * @example
+         * @o2syntax
          * var par = this.page.getWidgetPrameters();
          * @example
          * //在主页面嵌入部件的地方传入参数:

+ 89 - 86
o2web/source/o2_core/o2/xScript/ViewEnvironment.js

@@ -395,7 +395,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * });
      * </pre></code>
      * @return {Object} Dict对象
-     * @example
+     * @o2syntax
      * //您可以在页面、表单、流程各个嵌入脚本中,通过this.Dict()对本应用或其他应用的数据字典中的数据进行增删改查,如下:
      * var dict = new this.Dict( options )
      */
@@ -413,7 +413,8 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @return {(Promise|Object|Array|String|Number|Boolean)}
      * 当async为true时返回Promise({@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise说明});
      * 否则返回数据字典的数据,类型和配置数据字典时候指定的一致。
-     *
+     * @o2syntax
+     * var data = dict.get( path, success, failure, async, refresh )
      * @example
      * var dict = new this.Dict("bulletinDictionary");
      *
@@ -509,7 +510,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @param {(Object|Array|String|Number|Boolean)} data 需要新增的数据
      * @param {Function} [success] 增加数据成功时的回调函数。
      * @param {Function} [failure] 增加数据成功时的回调函数。
-     * @example
+     * @o2syntax
      * dict.add( path, data, success, failure )
      * @example
      * var dict = new this.Dict("bulletinDictionary");
@@ -629,7 +630,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @param {(Object|Array|String|Number|Boolean)} data 修改后的数据
      * @param {Function} [success] 设置数据成功时的回调函数。
      * @param {Function} [failure] 设置数据成功时的回调函数。
-     * @example
+     * @o2syntax
      * dict.set( path, data, success, failure )
      * @example
      * var dict = new this.Dict("bulletinDictionary");
@@ -746,7 +747,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @param {String} path 数据字典中的数据路径,允许使用中文。当路径为多级时,用点号(.)分隔。如果数据路径不存在,则报错。
      * @param {Function} [success] 删除数据成功时的回调函数。
      * @param {Function} [failure] 删除数据成功时的回调函数。
-     * @example
+     * @o2syntax
      * dict.delete( path, success, failure )
      * @example
      * var dict = new this.Dict("bulletinDictionary");
@@ -866,7 +867,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * 你可以通过this.org获取组织中的人员、人员属性、组织、组织属性、身份、群组和角色。
      * @module org
      * @o2ordernumber 100
-     * @example
+     * @o2syntax
      * //您可以在流程表单、内容管理表单和门户页面中,通过this来获取当前实例的org对象,如下:
      * var org = this.org;
      */
@@ -884,7 +885,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|IdentityData|IdentityData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回身份,单个是Object,多个是Array。
-         * @example
+         * @o2syntax
          * //同步执行,返回身份,单个是对象,多个是数组。
          * var identityList = this.org.getIdentity( name );
          *
@@ -925,7 +926,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|IdentityData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回身份对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回身份对象数组。
          * var identityList = this.org.listIdentityWithPerson( person );
          *
@@ -967,7 +968,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|IdentityData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回身份对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回直接组织身份对象数组。
          * var identityList = this.org.listIdentityWithUnit( unit );
          *
@@ -1029,7 +1030,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回组织,单个是Object,多个是Array。
-         * @example
+         * @o2syntax
          * //同步执行,返回组织,单个是对象,多个是数组。
          * var unitList = this.org.getUnit( name );
          *
@@ -1072,7 +1073,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回组织数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回嵌套下级组织数组。
          * var unitList = this.org.listSubUnit( name, true );
          *
@@ -1120,7 +1121,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回组织数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回嵌套上级组织数组。
          * var unitList = this.org.listSupUnit( name, true );
          *
@@ -1186,7 +1187,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回对应组织,单个为对象,多个为数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回直接所在组织,单个为对象,多个为数组。
          * var unitList = this.org.getUnitByIdentity( name );
          *
@@ -1281,7 +1282,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回组织数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回组织数组。
          * var unitList = this.org.listAllSupUnitWithIdentity( name );
          *
@@ -1321,7 +1322,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回组织数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回组织数组。
          * var unitList = this.org.listUnitWithPerson( name );
          *
@@ -1361,7 +1362,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回个人所在组织及所有上级组织。
-         * @example
+         * @o2syntax
          * //同步执行,返回组织数组。
          * var unitList = this.org.listAllSupUnitWithPerson( name );
          *
@@ -1402,7 +1403,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回组织数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回组织数组。
          * var unitList = this.org.listUnitWithAttribute( attributeName, attributeName );
          *
@@ -1443,7 +1444,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回组织数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回组织数组。
          * var unitList = this.org.listUnitWithDuty( dutyName, identity );
          *
@@ -1482,7 +1483,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|UnitData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回顶层组织数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回顶层组织数组。
          * var unitList = this.org.listTopUnit();
          *
@@ -1523,7 +1524,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|PersonData|PersonData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员,单个是Object,多个是Array。
-         * @example
+         * @o2syntax
          * //同步执行,返回人员,单个是对象,多个是数组。
          * var personList = this.org.getPerson( name );
          *
@@ -1570,7 +1571,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|PersonData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回嵌套下级人员数组。
          * var personList = this.org.listSubPerson( name, true );
          *
@@ -1618,7 +1619,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|PersonData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回嵌套上级人员数组。
          * var personList = this.org.listSupPerson( name, true );
          *
@@ -1663,7 +1664,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|PersonData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回人员数组。
          * var personList = this.org.listPersonWithGroup( group );
          *
@@ -1704,7 +1705,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|PersonData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回人员数组。
          * var personList = this.org.listPersonWithRole( role );
          *
@@ -1745,7 +1746,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|PersonData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回人员数组。
          * var personList = this.org.listPersonWithIdentity( identity );
          *
@@ -1802,7 +1803,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|PersonData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回组织的直接人员数组。
          * var personList = this.org.listPersonWithUnit( unit );
          *
@@ -1853,7 +1854,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|PersonData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回拥有对应属性名和属性值人员数组。
          * var personList = this.org.listPersonWithAttribute( name, value );
          *
@@ -1912,7 +1913,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|IdentityData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回身份数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回身份数组。
          * var identityList = this.org.getDuty( dutyName, unit );
          *
@@ -1953,7 +1954,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|String[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回职务名称数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回职务名称数组。
          * var dutyNameList = this.org.listDutyNameWithIdentity( identity );
          *
@@ -1993,7 +1994,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|String[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回职务名称数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回职务名称数组。
          * var dutyNameList = this.org.listDutyNameWithUnit( unit );
          *
@@ -2052,7 +2053,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          *    ]
          * }
          * </pre></code>
-         * @example
+         * @o2syntax
          * //同步执行,返回职务数组。
          * var dutyList = this.org.listUnitAllDuty( unit );
          *
@@ -2094,7 +2095,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|GroupData|GroupData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回群组,单个是Object,多个是Array。
-         * @example
+         * @o2syntax
          * //同步执行,返回群组,单个是Object,多个是Array。
          * var groupList = this.org.getGroup( name );
          *
@@ -2143,7 +2144,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|GroupData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回群组数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回嵌套下级群组数组。
          * var groupList = this.org.listSubGroup( name, true );
          *
@@ -2203,7 +2204,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|GroupData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回群组数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回嵌套上级群组数组。
          * var groupList = this.org.listSupGroup( name, true );
          *
@@ -2256,7 +2257,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|GroupData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回群组对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回群组数组。
          * var groupList = this.org.listGroupWithPerson( name );
          *
@@ -2302,7 +2303,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|RoleData|RoleData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回角色,单个为Object,多个为Array。
-         * @example
+         * @o2syntax
          * //同步执行,返回角色,单个为对象,多个为数组。
          * var roleList = this.org.getRole( name );
          *
@@ -2348,7 +2349,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|RoleData[]} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回角色对象数组。
-         * @example
+         * @o2syntax
          * //同步执行,返回角色数组。
          * var roleList = this.org.listRoleWithPerson( name );
          *
@@ -2395,7 +2396,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|Boolean} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则如果人员拥有角色返回true, 否则返回false。
-         * @example
+         * @o2syntax
          * //同步执行,返回判断结果。
          * var groupList = this.org.personHasRole( name, roleList );
          *
@@ -2442,7 +2443,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @return {Promise|Boolean} 当async为true时,返回
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则如果群组拥有角色返回true, 否则返回false。
-         * @example
+         * @o2syntax
          * //同步执行,返回判断结果。
          * var groupList = this.org.groupHasRole( name, roleList );
          *
@@ -2491,7 +2492,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @param {Function} [success] 执行成功的回调。
          * @param {Function} [failure] 执行失败的回调。
          * @param {(Boolean)} [async] 当参数为boolean,表示是否异步执行,默认为false。
-         * @example
+         * @o2syntax
          * //同步执行
          * this.org.appendPersonAttribute( person, attribute, valueArray);
          *
@@ -2526,7 +2527,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @param {Function} [success] 执行成功的回调。
          * @param {Function} [failure] 执行失败的回调。
          * @param {(Boolean)} [async] 当参数为boolean,表示是否异步执行,默认为false。
-         * @example
+         * @o2syntax
          * //同步执行
          * this.org.setPersonAttribute( person, attribute, valueArray);
          *
@@ -2562,7 +2563,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回属性值数组,
          * 如:<pre><code class='language-js'>[ value1, value2 ]</code></pre>
-         * @example
+         * @o2syntax
          * //同步执行,返回该人员的属性值数组。
          * var attributeList = this.org.getPersonAttribute( person, attr );
          *
@@ -2604,7 +2605,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回人员属性名称数组,
          * 如:<pre><code class='language-js'>[ attributeName1, attributeName2 ]</code></pre>
-         * @example
+         * @o2syntax
          * //同步执行,返回人员所有属性的名称数组。
          * var attributeNameList = this.org.listPersonAttributeName( person );
          *
@@ -2651,7 +2652,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          *        "杭州市","绍兴市"
          *    ]
          * }]</code></pre>
-         * @example
+         * @o2syntax
          * //同步执行,返回人员所有属性的对象数组。
          * var attributeObjectList = this.org.listPersonAllAttribute( person );
          *
@@ -2694,7 +2695,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @param {Function} [success] 执行成功的回调。
          * @param {Function} [failure] 执行失败的回调。
          * @param {(Boolean)} [async] 当参数为boolean,表示是否异步执行,默认为false。
-         * @example
+         * @o2syntax
          * //同步执行
          * this.org.appendUnitAttribute( unit, attribute, valueArray);
          *
@@ -2739,7 +2740,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @param {Function} [success] 执行成功的回调。
          * @param {Function} [failure] 执行失败的回调。
          * @param {(Boolean)} [async] 当参数为boolean,表示是否异步执行,默认为false。
-         * @example
+         * @o2syntax
          * //同步执行
          * this.org.setUnitAttribute( unit, attribute, valueArray);
          *
@@ -2784,7 +2785,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回属性值数组,
          * 如:<pre><code class='language-js'>[ value1, value2 ]</code></pre>
-         * @example
+         * @o2syntax
          * //同步执行,返回该组织的属性值数组。
          * var attributeList = this.org.getUnitAttribute( unit, attr );
          *
@@ -2826,7 +2827,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。
          * 否则返回组织属性名称数组,
          * 如:<pre><code class='language-js'>[ attributeName1, attributeName2 ]</code></pre>
-         * @example
+         * @o2syntax
          * //同步执行,返回组织所有属性的名称数组。
          * var attributeNameList = this.org.listUnitAttributeName( unit );
          *
@@ -2874,7 +2875,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          *        "二级部门"
          *    ]
          * }]</code></pre>
-         * @example
+         * @o2syntax
          * //同步执行,返回组织所有属性的对象数组。
          * var attributeObjectList = this.org.listUnitAllAttribute( unit );
          *
@@ -2948,7 +2949,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * 你可以通过view对象,获取视图数据或选择视图数据。<br/>
      * @module view
      * @o2ordernumber 70
-     * @example
+     * @o2syntax
      * //您可以在流程表单、内容管理表单或门户页面中,通过this来获取view对象,如下:
      * var view = this.view;
      */
@@ -2976,7 +2977,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * </pre></code>
          * @param {Function} callback - 访问成功后的回调函数
          * @param {Boolean} [async] - 同步或异步调用。true:异步;false:同步。默认为true。
-         * @example
+         * @o2syntax
          * this.view.lookup(view, callback, async);
          * @example
          * //获取“财务管理”应用中“报销审批数据”视图中的数据
@@ -3077,7 +3078,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * }
          * </pre></code>
          * @param {Function} callback - 必选,当选择完成,点击“确定”之后的回调函数。
-         * @example
+         * @o2syntax
          * this.view.select(view, callback);
          * @example
          * this.view.select({
@@ -3188,7 +3189,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * 你可以通过statement对象,获取执行查询语句或者对查询结果进行选择。<br/>
      * @module statement
      * @o2ordernumber 90
-     * @example
+     * @o2syntax
      * //您可以在流程表单、内容管理表单、门户页面或视图中,通过this来获取statement对象,如下:
      * var statement = this.statement;
      */
@@ -3224,7 +3225,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * </pre></code>
          * @param {Function} callback - 访问成功后的回调函数
          * @param {Boolean} [async] - 同步或异步调用。true:异步;false:同步。默认为true。
-         * @example
+         * @o2syntax
          * this.statement.execute(statement, callback, async);
          * @example
          * //获取“task”查询中的数据
@@ -3339,7 +3340,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * }
          * </pre></code>
          * @param {Function} callback - 访问成功后的回调函数
-         * @example
+         * @o2syntax
          * this.statement.select(statement, callback);
          * @example
          * this.statement.select({
@@ -3565,7 +3566,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @borrows module:queryView.openApplication as openApplication
      * @borrows module:queryView.createDocument as createDocument
      * @borrows module:queryView.startProcess as startProcess
-     * @example
+     * @o2syntax
      * //您可以在查询视图中,通过this来获取queryStatement对象,如下:
      * var queryStatement = this.queryStatement;
      */
@@ -3576,7 +3577,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @memberOf module:queryStatement
      * @static
      * @return {MWF.xScript.Environment|MWF.xScript.CMSEnvironment} 页面或表单的上下文.
-     * @example
+     * @o2syntax
      * this.queryStatement.getParentEnvironment();
      * @example
      * var env = this.queryStatement.getParentEnvironment(); //当视图被嵌入到页面的时候,可以在视图里获取页面的上下文
@@ -3595,7 +3596,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      *     "currentPageNumber": 1 // 当前页数
      * }
      * </pre></code>
-     * @example
+     * @o2syntax
      * this.queryStatement.getPageInfor();
      */
 
@@ -3626,7 +3627,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      ...
      *]
      *</pre></code>
-     * @example
+     * @o2syntax
      * var data = this.queryStatement.getPageData();
      */
 
@@ -3637,7 +3638,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @static
      * @param {Number} pageNumber - 需要跳转的页码。
      * @param {Function} [callback ] - 跳转的页面数据加载完成以后的回调方法。
-     * @example
+     * @o2syntax
      * var data = this.queryStatement.toPage( pageNumber, callback );
      * @example
      * // 跳转到第2页并且获取该页的数据。
@@ -3651,7 +3652,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @method selectAll
      * @memberOf module:queryStatement
      * @static
-     * @example
+     * @o2syntax
      * this.queryStatement.selectAll();
      */
 
@@ -3660,7 +3661,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @method unSelectAll
      * @memberOf module:queryStatement
      * @static
-     * @example
+     * @o2syntax
      * this.queryStatement.unSelectAll();
      */
 
@@ -3691,7 +3692,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      ...
      *]
      *</pre></code>
-     * @example
+     * @o2syntax
      * var data = this.queryStatement.getSelectedData();
      */
 
@@ -3708,7 +3709,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * @module queryView
      * @o2range {QueryView}
      * @o2ordernumber 60
-     * @example
+     * @o2syntax
      * //您可以在视图中,通过this来获取queryView对象,如下:
      * var queryView = this.queryView;
      */
@@ -3718,7 +3719,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @method getParentEnvironment
          * @static
          * @return {MWF.xScript.Environment|MWF.xScript.CMSEnvironment} 页面或表单的上下文.
-         * @example
+         * @o2syntax
          * this.queryView.getParentEnvironment();
          * @example
          * var env = this.queryView.getParentEnvironment(); //当视图被嵌入到页面的时候,可以在视图里获取页面的上下文
@@ -3732,7 +3733,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @memberOf module:queryStatement
          * @static
          * @return {StatementInfor} 查询的配置信息.
-         * @example
+         * @o2syntax
          * this.queryStatement.getStatementInfor();
          */
         "getStatementInfor" : function () { return _form.getStatementInfor ? _form.getStatementInfor() : null; },
@@ -3743,7 +3744,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @memberOf module:queryView
          * @static
          * @return {ViewInfor} 视图的配置信息.
-         * @example
+         * @o2syntax
          * this.queryView.getViewInfor();
          */
         "getViewInfor" : function () { return _form.getViewInfor(); },
@@ -3760,7 +3761,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          *     "currentPageNumber": 1 // 当前页数
          * }
          * </pre></code>
-         * @example
+         * @o2syntax
          * this.queryView.getPageInfor();
          */
         "getPageInfor" : function () { return _form.getPageInfor(); },
@@ -3802,7 +3803,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          *  ...
          *]
          *</pre></code>
-         * @example
+         * @o2syntax
          * var data = this.queryView.getPageData();
          */
         "getPageData" : function () { return _form.getPageData(); },
@@ -3814,7 +3815,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @static
          * @param {Number} pageNumber - 需要跳转的页码。
          * @param {Function} [callback ] - 跳转的页面数据加载完成以后的回调方法。
-         * @example
+         * @o2syntax
          * var data = this.queryView.toPage( pageNumber, callback );
          * @example
          * // 跳转到第2页并且获取该页的数据。
@@ -3829,7 +3830,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @method selectAll
          * @memberOf module:queryView
          * @static
-         * @example
+         * @o2syntax
          * this.queryView.selectAll();
          */
         "selectAll" : function () { return _form.selectAll(); },
@@ -3839,7 +3840,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @method unSelectAll
          * @memberOf module:queryView
          * @static
-         * @example
+         * @o2syntax
          * this.queryView.unSelectAll();
          */
         "unSelectAll" : function () { return _form.unSelectAll(); },
@@ -3863,7 +3864,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          ...
          * ]
          </pre></code>
-         * @example
+         * @o2syntax
          * var data = this.queryView.getSelectedData();
          */
         "getSelectedData" : function () { return _form.getSelectedData(); },
@@ -3887,7 +3888,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          *]
          * </pre></code>
          * @param {Function} [callback] 过滤完成并重新加载数据后的回调方法。
-         * @example
+         * @o2syntax
          * this.queryView.setFilter( filter );
          */
         "setFilter" : function ( filter, callback ) { return _form.setFilter(filter, callback); },
@@ -3921,7 +3922,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * }
          * </pre></code>
          * @param {Function} [callback] 过滤完成并重新加载数据后的回调方法。
-         * @example
+         * @o2syntax
          * this.queryStatement.setStatementFilter( filter, parameter, callback );
          */
         "setStatementFilter" : function ( filter , parameter, callback) { return _form.setFilter(filter, parameter, callback); },
@@ -3958,7 +3959,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          *     "isExpand": "no", //可选,默认是否展开分类,如果不传,则使用原视图的配置, 可选值有:yes no
          *   }
          * </pre></code>
-         * @example
+         * @o2syntax
          * this.queryView.switchView( options );
          */
         "switchView" : function ( options ) { return _form.switchView(options); },
@@ -3995,7 +3996,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          *     }
          *   })
          * </pre></code>
-         * @example
+         * @o2syntax
          * this.queryStatement.switchStatement( options );
          */
         "switchStatement" : function ( options ) { if(_form.switchStatement)_form.switchStatement(options) ; },
@@ -4005,7 +4006,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
          * @method reload
          * @methodOf module:queryView
          * @static
-         * @example
+         * @o2syntax
          * this.queryView.reload();
          */
         "reload" : function () { _form.reload(); },
@@ -4445,6 +4446,8 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * 在前端脚本中,可以通过this.session.user来获取当前用户信息。<br/>
      * @module session
      * @o2ordernumber 110
+     * @o2syntax
+     * var user = this.session.user;
      * @example
      * //获取当前用户信息
      * var user = this.session.user
@@ -4513,7 +4516,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      * 通过访问以下地址来查询服务列表:http://server:20030/x_program_center/jest/list.html
      * @module Actions
      * @o2ordernumber 130
-     * @example
+     * @o2syntax
      * //获取Actions
      * this.Actions
      * //或者
@@ -4530,7 +4533,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      *  "x_processplatform_assemble_surface" //流程平台相关服务根
      * </pre></code>
      * @return {String} 对应服务根的host。如:http://127.0.0.1:20020
-     * @example
+     * @o2syntax
      * var actions = this.Actions.getHost( root );
      */
 
@@ -4545,14 +4548,14 @@ MWF.xScript.ViewEnvironment = function (ev) {
      *  "x_processplatform_assemble_surface" //流程平台相关服务根
      * </pre></code>
      * @return {Object} 返回action对象,用于后续服务调用
-     * @example
+     * @o2syntax
      * var actions = o2.Actions.load( root );
      * //或
      * var actions = this.Actions.load( root );
-     * @example
+     * @o2syntax
      * //获取流程平台服务对象。
      * var processAction = this.Actions.load("x_processplatform_assemble_surface");
-     * @example
+     * @o2syntax
      * <caption>
      *     通过this.Actions.load(root)方法得到的action对象,就可以访问此服务下的方法了。<br/>
      *     访问方法的规则如下:
@@ -4592,7 +4595,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
      *      此参数可以省略,如果省略,系统会自动弹出错误信息。
      *
      *      async : 方法同步或者异步执行,默认为true。
-     *  @example
+     *  @o2syntax
      *  <caption>
      *  处理返回的数据有两种方式,二选一即可:<br/>
      *  1、该方法return的结果是Promise对象,可以通过 promise.then() 方法来处理。<br/>
@@ -4698,14 +4701,14 @@ MWF.xScript.ViewEnvironment = function (ev) {
      *  "x_processplatform_assemble_surface" //流程平台相关服务根
      * </pre></code>
      * @return {String} 对应服务根的host。如:http://127.0.0.1:20020
-     * @example
+     * @o2syntax
      * var actions = o2.Actions.get( root );
      * actions[ methodName ]( arguements );
      *
      * or
      *
      * o2.Actions.get( root )[methodName]( arguements );
-     * @example
+     * @o2syntax
      * methodName :(string)方法名称。
      * arguements : 见load方法的arguements说明
      * @example

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

@@ -55,7 +55,7 @@ MWF.xApplication.process.Xform.Stat = MWF.APPStat =  new Class(
                  * @member {MWF.xApplication.query.Query.Statistician}
                  * @example
                  *  //可以在脚本中获取该组件
-                 * var field = this.form.get("moduleId").stat; //获取组件对象
+                 * var field = this.form.get("fieldId").stat; //获取组件对象
                  */
                 this.stat = new MWF.xApplication.query.Query.Statistician(this.form.app, this.node, viewJson, {
                     "resizeNode": (this.node.getStyle("height").toString().toLowerCase()!=="auto" && this.node.getStyle("height").toInt()>0),