0.1.0 • Published 6 months ago
gt-approvalflow v0.1.0
gt-approvalflow
Project setup
npm uninstall gt-approvalflow
npm install --save git+http://git.china95059.com/gt-components/gt-approvalflow.git
或dependencies里加
"gt-approvalflow": "git+ssh://git@git.china95059.com:gt-components/gt-approvalflow.git",
1、发起审批:
参数 | 类型 | 默认 | 是否必传 | 描述 |
---|---|---|---|---|
type | Srting | '1' | true | 1 为发起流程 |
nodes | Array | [] | true | 节点列表 |
token | Srting | '' | false | 业务方的 token,不传则拿 window.parent.APP_CONFIG 的 token |
baseURL | Srting | '' | false | 业务方的 baseURL,不传则拿 window.parent.APP_CONFIG 的 baseURL |
发起审批-已选择的人对象:通过 this.\$refs.gtApprovalflow.result 获取 {message:'',optionalPerson:{"approver_b742ebb6be674d1aa7d534dfa01548f3": "111,222,333"}},如果 message 有值,就是没选人,需要把 message 报出来并且 return
2、审批详情:
参数 | 类型 | 默认 | 是否必传 | 描述 |
---|---|---|---|---|
type | Srting | '2' | true | 2 为审批详情,type 为 2 时可写按钮插槽<div slot="operate"><a-button>撤回</a-button></div> |
nodes | Array | [] | true | 节点列表 |
token | Srting | '' | false | 业务方的 token,不传则拿 window.parent.APP_CONFIG 的 token |
baseURL | Srting | '' | false | 业务方的 baseURL,不传则拿 window.parent.APP_CONFIG 的 baseURL |
showUpload | Boolean | true | false | 是否显示上传附件 |
事件名称 | 说明 | 回调参数 |
---|---|---|
approvalResult | 审批结果 | result = { status: 1, optionalPerson: null, reason: '', fileList: [] } |
审批详情-审批通过拒绝:通过 this.$refs.gtApprovalflow.$refs.approvalFlow.loading 控制 loading
0.1.0
6 months ago