Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Laurel Lee
O2OA
Commits
328dc44a
Commit
328dc44a
authored
3 years ago
by
unknown
Browse files
Options
Download
Email Patches
Plain Diff
修复api中获取附件的描述
parent
2192dd12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
o2web/source/o2_core/o2/xScript/Environment.js
+14
-4
o2web/source/o2_core/o2/xScript/Environment.js
with
14 additions
and
4 deletions
+14
-4
o2web/source/o2_core/o2/xScript/Environment.js
+
14
-
4
View file @
328dc44a
...
...
@@ -678,17 +678,25 @@ MWF.xScript.Environment = function(ev){
* @summary 获取当前流程实例的附件对象列表。
* @method getAttachmentList
* @static
* @param {Function|boolean} [callback] 如果传入Funcation, 则作为正确获取附件对象数组的异步调用的回调;如果传入true,则发起同步请求获取附件列表;如果不传入参数,则直接返回本地缓存中的attachmentList对象。
* @param {Function|boolean} [callback] 如果传入Funcation, 则作为正确获取附件对象数组的异步调用的回调;
* 如果传入true,则发起异步请求获取附件列表,返回Promise对象;如果传入false, 则发起同步请求获取附件列表;
* 如果不传入参数,则直接返回本地缓存中的attachmentList对象。
* @param {Function} [error] 获取附件对象数组出错时的回调。
* @return {(Review[])} 当前流程实例的所有附件对象数组,异步请求时返回请求的Promise对象.
* @return {WorkAttachmentData[]} 附件数据.
* @o2ActionOut x_processplatform_assemble_surface.AttachmentAction.getWithWorkOrWorkCompleted|example=Attachment
* @o2syntax
* //获取附件列表
* //
从本地缓存
获取附件列表
* var attachmentList = this.workContext.getAttachmentList();
*
* //同步请求获取附件列表
* var attachmentList = this.workContext.getAttachmentList(true);
* var attachmentList = this.workContext.getAttachmentList(false);
*
* //异步请求获取附件列表
* var promise = this.workContext.getAttachmentList(true);
* promise.then(function(attachmentList){
* //attachmentList 附件对象数组
* })
*
* //异步请求获取附件列表
* this.workContext.getAttachmentList( function(attachmentList){
...
...
@@ -696,7 +704,9 @@ MWF.xScript.Environment = function(ev){
* });
*/
"
getAttachmentList
"
:
function
(
callback
,
error
){
if
(
!
callback
)
return
ev
.
attachmentList
;
if
(
!
callback
&&
callback
!==
false
)
{
return
ev
.
attachmentList
;
}
var
cb
=
(
callback
&&
o2
.
typeOf
(
callback
)
===
"
function
"
)
?
callback
:
null
;
var
ecb
=
(
error
&&
o2
.
typeOf
(
error
)
===
"
function
"
)
?
error
:
null
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment