完善文档
This commit is contained in:
parent
d110ca4c4b
commit
545e3f202e
@ -8,6 +8,8 @@ js依赖
|
||||
|
||||
## 初始化
|
||||
|
||||
### 数据初始化
|
||||
|
||||
页面需要隐藏 `oa-form-footer-tool-bar`,由原生调用方法触发
|
||||
|
||||
> 页面加载 -> APP初始化
|
||||
@ -32,6 +34,143 @@ initObj
|
||||
|formButton|object|[表单按钮](./app.md#表单按钮)|
|
||||
|currentUser|object|[当前用户](./app.md#当前用户)|
|
||||
|
||||
附件回显
|
||||
|
||||
```javascript
|
||||
appOaFormUtil.initAppAttachments(files);
|
||||
```
|
||||
|
||||
参数
|
||||
|
||||
|名称|类型|说明|
|
||||
|-|-|-|
|
||||
|files|string|英文逗号分割的文件列表|
|
||||
|
||||
### 流程日志
|
||||
|
||||
- Method: **GET**
|
||||
|
||||
- Content-Type: `application/json`
|
||||
|
||||
- URL:`app/oa/list-process-log/process-instance-id/{processInstanceId}`
|
||||
|
||||
- PathParams:
|
||||
|
||||
|参数|说明|
|
||||
|-|-|
|
||||
|processInstanceId|流程实例ID|
|
||||
|
||||
- Headers:
|
||||
|
||||
```json
|
||||
{
|
||||
token: token
|
||||
}
|
||||
```
|
||||
|
||||
- RequestBody:
|
||||
|
||||
```json
|
||||
{
|
||||
taskId: "任务ID",
|
||||
taskName: "任务名称",
|
||||
startTime: "开始时间",
|
||||
endTime: "结束时间",
|
||||
usedTime: "耗时"
|
||||
userIds: "任务代理人ID",
|
||||
userNames: "任务代理人名称",
|
||||
taskStatus: "任务状态,needToBeDealtWith:待办,alreadyDone:已办",
|
||||
// 任务变量,内容不固定
|
||||
taskVariables: {},
|
||||
// 流程变量,内容不固定
|
||||
processVariables: {}
|
||||
// 备注
|
||||
comment: {
|
||||
type: "批注类型。SIGN:签批,JOINTLY_SIGN:会签,GO_BACK:回退,FORCED_END:强制结束,TRANSFER:转交",
|
||||
userId: "批注人ID",
|
||||
userName: "批注人名称",
|
||||
fieldName: "字段名称",
|
||||
fieldExplain: "字段说明",
|
||||
content: "批注内容",
|
||||
time: "时间"
|
||||
},
|
||||
// 转交批注
|
||||
transferComments: [
|
||||
{
|
||||
type: "批注类型。SIGN:签批,JOINTLY_SIGN:会签,GO_BACK:回退,FORCED_END:强制结束,TRANSFER:转交",
|
||||
userId: "批注人ID",
|
||||
userName: "批注人名称",
|
||||
content: "批注内容",
|
||||
time: "时间"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
说明
|
||||
|
||||
|名称|类型|说明|参数值|
|
||||
|-|-|-|-|
|
||||
|taskId|string|任务ID||
|
||||
|taskName|string|任务名称||
|
||||
|startTime|string|开始时间||
|
||||
|endTime|string|结束时间||
|
||||
|usedTime|string|耗时||
|
||||
|userIds|string|任务代理人ID||
|
||||
|userNames|string|任务代理人名称||
|
||||
|taskStatus|string|任务状态|needToBeDealtWith:待办,alreadyDone:已办|
|
||||
|taskVariables|string|任务变量,内容不固定||
|
||||
|processVariables|string|流程变量,内容不固定||
|
||||
|comment|string|[日志备注](./app.md#日志备注)||
|
||||
|transferComments|object|[日志转交批注](./app.md#日志转交批注)列表||
|
||||
|
||||
- Response
|
||||
|
||||
状态码
|
||||
|
||||
|名称|值|
|
||||
|-|-|
|
||||
|200|请求成功|
|
||||
|400|请求错误|
|
||||
|401|权限不足|
|
||||
|403|访问禁止|
|
||||
|500|系统错误|
|
||||
|
||||
Body:
|
||||
|
||||
```json
|
||||
{
|
||||
code: "错误编码",
|
||||
msg: "错误原因"
|
||||
}
|
||||
```
|
||||
|
||||
js处理代码
|
||||
|
||||
```js
|
||||
var commentText = '';
|
||||
var comment = item.comment;
|
||||
if (comment) {
|
||||
if (comment.type === 'JOINTLY_SIGN') {
|
||||
commentText = '动作:会签。批注:' + comment.content + '。时间:' + comment.time;
|
||||
} else if (comment.type === 'GO_BACK') {
|
||||
commentText = '动作:回退。批注:' + comment.content + '。时间:' + comment.time;
|
||||
} else if (comment.type === 'FORCED_END') {
|
||||
commentText = '动作:强制结束。批注:' + comment.content + '。时间:' + comment.time;
|
||||
}
|
||||
}
|
||||
// 转交记录
|
||||
var transferCommentText = '';
|
||||
var transferComments = item.transferComments;
|
||||
// 倒叙
|
||||
for(var j = transferComments.length, transferComment; transferComment = transferComments[--j];) {
|
||||
if(transferCommentText) {
|
||||
transferCommentText += '\n'
|
||||
}
|
||||
transferCommentText += (transferComments.length - j) +'. 转交人:'+ transferComment.userName +'。原因:'+ transferComment.content +'。时间:'+ transferComment.time;
|
||||
}
|
||||
```
|
||||
|
||||
## 方法
|
||||
|
||||
### 字段赋值
|
||||
@ -91,6 +230,20 @@ appOaFormUtil.submitFormReport(btnIndex);
|
||||
|-|-|-|-|
|
||||
|btnIndex|int|按钮的下标||
|
||||
|
||||
## 回调
|
||||
|
||||
页面提交成功,通知APP
|
||||
|
||||
```javascript
|
||||
appOaFormUtil.callbackAppSubmitStatus(submitStatus);
|
||||
```
|
||||
|
||||
参数
|
||||
|
||||
|名称|类型|说明|参数值|
|
||||
|-|-|-|-|
|
||||
|submitStatus|boolean|提交状态|true:成功,false;失败|
|
||||
|
||||
## 事件
|
||||
|
||||
### 回退
|
||||
@ -316,4 +469,26 @@ Body:
|
||||
|departmentParentId|string|部门上级ID||
|
||||
|departmentName|string|部门名称||
|
||||
|departmentCode|string|部门编码||
|
||||
|departmentNo|string|部门编号||
|
||||
|departmentNo|string|部门编号||
|
||||
|
||||
### 日志备注
|
||||
|
||||
|属性|类型|说明|参数值|
|
||||
|-|-|-|-|
|
||||
|type|string|批注类型|SIGN:签批,JOINTLY_SIGN:会签,GO_BACK:回退,FORCED_END:强制结束,TRANSFER:转交|
|
||||
|userId|string|批注人ID||
|
||||
|userName|string|批注人名称||
|
||||
|fieldName|string|字段名称||
|
||||
|fieldExplain|string|字段说明||
|
||||
|content|string|批注内容||
|
||||
|time|string|时间||
|
||||
|
||||
### 日志转交批注
|
||||
|
||||
|属性|类型|说明|参数值|
|
||||
|-|-|-|-|
|
||||
|type|string|批注类型|SIGN:签批,JOINTLY_SIGN:会签,GO_BACK:回退,FORCED_END:强制结束,TRANSFER:转交|
|
||||
|userId|string|批注人ID||
|
||||
|userName|string|批注人名称||
|
||||
|content|string|批注内容||
|
||||
|time|string|时间||
|
Loading…
Reference in New Issue
Block a user