ddy-process-pc-vue2 1.0.1-beta.28 → 1.0.1-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,140 @@
1
1
  # 流程组件接入文档
2
2
 
3
+ ## 新流程接入文档
4
+
5
+ ### 安装
6
+ ```
7
+ npm install ddy-process-pc-vue2
8
+ ```
9
+
10
+ ### 基础用法
11
+
12
+ ```js
13
+ // 导入依赖
14
+ import process, {
15
+ ProcessAPI,
16
+ beforeCreate,
17
+ reactivate,
18
+ ProcessEnums
19
+ } from 'ddy-process-pc-vue2';
20
+
21
+ // 设置请求函数
22
+ ProcessAPI.setAjax(ajaxFuc);
23
+ ```
24
+
25
+ > 说明: ajaxFuc 为函数类型
26
+ >>``` js
27
+ >>ajaxFuc(obj)
28
+ >>
29
+ >>obj {
30
+ >> type: String, //请求方式('get'||'post')
31
+ >> url: String,
32
+ >> param: Any
33
+ >>}
34
+ >>// 调用时会传入上述参数
35
+ >>```
36
+
37
+ ``` js
38
+ // 创建并启动流程
39
+ <template>
40
+ <beforeCreate ref="beforeCreateRef"></beforeCreate>
41
+ </template>
42
+
43
+ <script>
44
+
45
+ export default {
46
+ components: {
47
+ beforeCreate
48
+ ...
49
+
50
+ this.$refs.beforeCreateRef.selectShow({
51
+ appId: 'com.awspaas.user.apps.top.study.project',
52
+ processGroupName: this.beType
53
+ }).then((createAndStart) => {
54
+ // ...业务保存的相关逻辑
55
+
56
+ // 业务保存成功后调用
57
+ let p = {
58
+ processBusinessKey: res.data.id, //业务ID
59
+ businessType: 26, //流程类型
60
+ title: '标题' //流程标题
61
+ };
62
+ createAndStart(p).then((res)=>{
63
+ if (res.code == ProcessEnums.apiCode.success) {
64
+ // 创建成功
65
+ }else{
66
+ // 创建失败
67
+ }
68
+ }).finally(()=>{
69
+ // 创建失败
70
+ })
71
+ })
72
+
73
+
74
+ ```
75
+
76
+ ``` js
77
+ // 复活流程
78
+ <beforeCreate ref="beforeCreateRef"></beforeCreate>
79
+
80
+
81
+ export default {
82
+ components: {
83
+ beforeCreate
84
+ ...
85
+
86
+ this.$refs.beforeCreateRef.revivalShow(BusinessKey).then((revivalFlow) => {
87
+ // ...业务保存的相关逻辑
88
+
89
+ // 业务保存成功后调用
90
+ revivalFlow().then((res)=>{
91
+ if (res.code == ProcessEnums.apiCode.success) {
92
+ // 复活成功
93
+ }else{
94
+ // 复活失败
95
+ }
96
+ }).finally(()=>{
97
+ // 复活失败
98
+ })
99
+ })
100
+
101
+
102
+ ```
103
+
104
+
105
+ ``` js
106
+ // 查看及流程审批相关操作
107
+ <process
108
+ :processId="processInstId"
109
+ :processDefId="processDefId"
110
+ :task="task"
111
+ @Complete="
112
+ //操作成功回调
113
+ "
114
+ :userId="userId"
115
+ :isView="
116
+ //是否只查看
117
+ ">
118
+ </process>
119
+
120
+
121
+ task {
122
+ activityDefId: 节点id,
123
+ processInstId: 流程实例id,
124
+ processDefId: 流程定义id,
125
+ id: 任务id,
126
+ }
127
+
128
+
129
+
130
+
131
+ ```
132
+
133
+
134
+
135
+
136
+ ## yanhuang流程接入文档
137
+
3
138
  ### 安装
4
139
  ```
5
140
  npm install ui-process-pc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddy-process-pc-vue2",
3
- "version": "1.0.1-beta.28",
3
+ "version": "1.0.1-beta.30",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bundleDependencies": false,