@lambo-design-mobile/workflow-approve 1.0.0-beta.1

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/.versionrc ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "tagPrefix": "@lambo-design-mobile/workflow-approve@",
3
+ "releaseCommitMessageFormat": "chore(release): @lambo-design-mobile/workflow-approve@{{currentTag}}",
4
+ "path": ".",
5
+ "header": "# Changelog",
6
+ "types": [
7
+ {"type": "chore", "section":"'🎫 Chores | 其他更新", "hidden": false},
8
+ {"type": "revert", "section":"⏪ Reverts | 回退", "hidden": false},
9
+ {"type": "feat", "section": "✨ Features | 新功能", "hidden": false},
10
+ {"type": "fix", "section": "🐛 Bug Fixes | Bug 修复", "hidden": false},
11
+ {"type": "improvement", "section": "Feature Improvements", "hidden": false},
12
+ {"type": "docs", "section":"📝 Documentation | 文档", "hidden": false},
13
+ {"type": "style", "section":"💄 Styles | 风格", "hidden": false},
14
+ {"type": "refactor", "section":"♻️ Code Refactoring | 代码重构", "hidden": false},
15
+ {"type": "perf", "section":"⚡ Performance Improvements | 性能优化", "hidden": false},
16
+ {"type": "test", "section":"✅ Tests | 测试", "hidden": false},
17
+ {"type": "build", "section":"👷‍ Build System | 构建", "hidden": false},
18
+ {"type": "ci", "section":"🔧 Continuous Integration | CI 配置", "hidden":false}
19
+ ],
20
+ "commitUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/{{hash}}",
21
+ "compareUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/{{previousTag}}...{{currentTag}}",
22
+ "issueUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/issues/{{id}}"
23
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+ ## 1.0.0-beta.1 (2024-10-09)
3
+
4
+
5
+ ### ✨ Features | 新功能
6
+
7
+ * **@lambo-design-mobile/workflow-approve:** 新增流程中心移动端组件 ([bcdf45c](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/bcdf45cb682e1ea5f3205b473a2c04060a660460))
8
+ * **@lambo-design-mobile/workflow-approve:** 新增流程中心移动端组件 ([14df440](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/14df44002a9b20f6cb979bebc8902b5cd78bb57f))
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # 工作流
2
+
3
+ ### 介绍
4
+
5
+
6
+
7
+ ### 引入
8
+
9
+ ``` javascript
10
+
11
+ ```
12
+
13
+ ## 代码演示
14
+
15
+ ### 基础用法
16
+
17
+ ```html
18
+ ```
19
+
20
+ ```javascript
21
+
22
+
23
+ ```
24
+
25
+
26
+
27
+
28
+ ### Props
29
+
30
+ | 参数 | 说明 | 类型 | 默认值 | 版本 |
31
+ |------------------|-------------------|---------|------------------|----|
32
+
33
+
34
+
35
+ ### Events
36
+
37
+ | 事件名 | 说明 | 回调参数 |
38
+ |------------------|------------|-------|
39
+
package/api.js ADDED
@@ -0,0 +1,277 @@
1
+ import ajax from '@lambo-design-mobile/shared/utils/ajax'
2
+ import {Toast} from "vant";
3
+
4
+ export const config = {
5
+ smartFlowServerContext: process.env.VUE_APP_SMART_FLOW_SERVER ? process.env.VUE_APP_SMART_FLOW_SERVER : '/api/smart-flow-server',
6
+ upmsServerContext: process.env.VUE_APP_UPMS_SERVER ? process.env.VUE_APP_UPMS_SERVER : '/ibp-upms-server',
7
+ ossFilePutUrl: process.env.VUE_APP_OSS_FILE_PUT ? process.env.VUE_APP_OSS_FILE_PUT : '/manage/oss/file/put',
8
+ ossFileGetUrl: process.env.VUE_APP_OSS_FILE_GET ? process.env.VUE_APP_OSS_FILE_GET : '/manage/oss/file/get/'
9
+ }
10
+
11
+ // 创建一个计数器来跟踪当前正在进行的请求数量
12
+ let activeRequests = 0;
13
+
14
+ // 显示加载提示
15
+ const showLoading = () => {
16
+ if (activeRequests === 0) {
17
+ Toast.loading({
18
+ message: '加载中...',
19
+ forbidClick: true,
20
+ duration: 0
21
+ });
22
+ }
23
+ activeRequests++;
24
+ };
25
+
26
+ // 隐藏加载提示
27
+ const hideLoading = () => {
28
+ activeRequests--;
29
+ if (activeRequests === 0) {
30
+ Toast.clear();
31
+ }
32
+ };
33
+
34
+ // 创建一个包装函数来处理请求
35
+ const handleRequest = (requestPromise) => {
36
+ showLoading();
37
+ return requestPromise
38
+ .then(response => {
39
+ hideLoading();
40
+ return response;
41
+ })
42
+ .catch(error => {
43
+ hideLoading();
44
+ throw error;
45
+ });
46
+ };
47
+
48
+ // 获取待办数据
49
+ export const getProcessTodoList = (offset, limit, searchForm = {}) => {
50
+
51
+ // 处理 searchForm 的各个字段,确保即使未传值也有默认空字符串
52
+ const params = {
53
+ offset: offset,
54
+ limit: limit,
55
+ detailName: searchForm.detailName || '',
56
+ applyId: searchForm.applyId || '',
57
+ startDate: searchForm.startDate || '',
58
+ procName: searchForm.procName || '',
59
+ taskName: searchForm.taskName || '',
60
+ procType: searchForm.procType || '',
61
+ businessTopic: searchForm.businessTopic || '',
62
+ };
63
+ return ajax.request({
64
+ url: config.smartFlowServerContext + "/manage/processTodo/list",
65
+ method: 'get',
66
+ params: params
67
+ })
68
+ }
69
+
70
+ // 获取已办数据
71
+ export const getProcessDoneList = (offset, limit, searchForm = {}) => {
72
+ const params = {
73
+ offset: offset,
74
+ limit: limit,
75
+ detailName: searchForm.detailName || '',
76
+ applyId: searchForm.applyId || '',
77
+ startDate: searchForm.startDate || '',
78
+ procName: searchForm.procName || '',
79
+ taskName: searchForm.taskName || '',
80
+ procType: searchForm.procType || '',
81
+ businessTopic: searchForm.businessTopic || '',
82
+ };
83
+ return ajax.request({
84
+ url: config.smartFlowServerContext + "/manage/processDone/list",
85
+ method: 'get',
86
+ params: params
87
+ })
88
+ }
89
+
90
+ //获取节点信息
91
+ export const getNodeData = (procId, taskNode) => {
92
+
93
+ const data = {
94
+ procId: procId,
95
+ taskNode: taskNode,
96
+ }
97
+
98
+ return ajax.request({
99
+ url: config.smartFlowServerContext + "/manage/approvalCenter/getNodeData",
100
+ method: 'post',
101
+ data
102
+ })
103
+
104
+ }
105
+
106
+ //获取审批历史
107
+ export const getProcessHis = (applyId, instanceId, procId, taskId) => {
108
+ const params = {
109
+ applyId: applyId,
110
+ instanceId: instanceId,
111
+ procId: procId,
112
+ taskId: taskId,
113
+ }
114
+ return ajax.request({
115
+ url: config.smartFlowServerContext + "/manage/processTodo/getProcessHis",
116
+ method: 'get',
117
+ params: params,
118
+ })
119
+ }
120
+
121
+
122
+ // 获取流程图xml
123
+ export const printData = (applyId, instanceId, procId) => {
124
+ const params = {
125
+ applyId: applyId,
126
+ instanceId: instanceId,
127
+ procId: procId
128
+ };
129
+ return ajax.request({
130
+ url: config.smartFlowServerContext + "/manage/processTodo/printData",
131
+ method: 'get',
132
+ params: params,
133
+ })
134
+ }
135
+
136
+ export const getPrintData = (applyId, procId) => {
137
+ const params = {
138
+ applyId: applyId,
139
+ procId: procId
140
+ };
141
+ return ajax.request({
142
+ url: config.smartFlowServerContext + "/manage/processTodo/getPrintData",
143
+ method: 'get',
144
+ params: params,
145
+ })
146
+ }
147
+
148
+ export const getHisAudit = (applyId, procId) => {
149
+ const params = {
150
+ applyId: applyId,
151
+ procId: procId
152
+ };
153
+ return ajax.request({
154
+ url: config.smartFlowServerContext + "/manage/processTodo/getHisAudit",
155
+ method: 'get',
156
+ params: params,
157
+ })
158
+ }
159
+
160
+
161
+ export const getNextNodes = (procId, taskNode) => {
162
+ const params = {
163
+ procId: procId,
164
+ taskNode: taskNode,
165
+ };
166
+ return ajax.request({
167
+ url: config.smartFlowServerContext + "/manage/processTodo/getNextNodes",
168
+ method: 'get',
169
+ params: params,
170
+ })
171
+ }
172
+
173
+ export const getPreNode = (data) => {
174
+ return ajax.request({
175
+ url: config.smartFlowServerContext + "/manage/processTodo/getPreNode",
176
+ method: 'post',
177
+ data
178
+ })
179
+ }
180
+
181
+ export const audit = (data) => {
182
+ return ajax.request({
183
+ url: config.smartFlowServerContext + "/manage/processTodo/audit",
184
+ method: 'post',
185
+ data
186
+ })
187
+ }
188
+
189
+ export const getAttachmentList = (procId, applyId) => {
190
+ const params = {
191
+ procId: procId,
192
+ applyId: applyId,
193
+ };
194
+ return ajax.request({
195
+ url: config.smartFlowServerContext + "/manage/processDone/getAttachmentList",
196
+ method: 'get',
197
+ params: params,
198
+ })
199
+ }
200
+
201
+ export const getApprovalType = () => {
202
+ return ajax.request({
203
+ url: config.smartFlowServerContext + "/manage/approvalCenter/getApprovalType",
204
+ method: 'post',
205
+ })
206
+ }
207
+
208
+ export const getNodesBehind = (processDefId, taskId) => {
209
+ const params = {
210
+ processDefId: processDefId,
211
+ taskId: taskId,
212
+ };
213
+ return handleRequest(ajax.request({
214
+ url: config.smartFlowServerContext + "/manage/processTodo/getNodesBehind",
215
+ method: 'get',
216
+ params: params,
217
+ }));
218
+ }
219
+
220
+ export const getAllPreNodes = (processDefId, taskId) => {
221
+ const params = {
222
+ processDefId: processDefId,
223
+ taskId: taskId,
224
+ };
225
+ return handleRequest(ajax.request({
226
+ url: config.smartFlowServerContext + "/manage/processTodo/getAllPreNodes",
227
+ method: 'get',
228
+ params: params,
229
+ }));
230
+ }
231
+
232
+ //批量通过和驳回
233
+ export const batchApproval = (status, flowIds, auditOpinion) => {
234
+ const data = {
235
+ status: status,
236
+ flowIds: flowIds,
237
+ auditOpinion: auditOpinion,
238
+ }
239
+ return handleRequest(ajax.request({
240
+ url: config.smartFlowServerContext + "/manage/approvalCenter/batchApproval",
241
+ method: 'post',
242
+ data
243
+ }));
244
+ }
245
+
246
+ export const getUserList = (offset, limit, searchForm = {}) => {
247
+
248
+ // 处理 searchForm 的各个字段,确保即使未传值也有默认空字符串
249
+ const params = {
250
+ offset: offset,
251
+ limit: limit,
252
+ orgTreeType: "00",
253
+ permScopeList: "all",
254
+ userId: searchForm.userId || '',
255
+ userName: searchForm.userName || '',
256
+ organId: searchForm.organId || '',
257
+ organTitle: searchForm.organTitle || '',
258
+ directChild: searchForm.directChild || 'false',
259
+ isAdmin: searchForm.isAdmin || '',
260
+ };
261
+ return ajax.request({
262
+ url: config.smartFlowServerContext + "/manage/processDesign/getAssigneeList",
263
+ method: 'get',
264
+ params: params
265
+ })
266
+ }
267
+
268
+ export const getOrgRootTree = () => {
269
+ const params = {
270
+ treeTypeId: "00",
271
+ };
272
+ return ajax.request({
273
+ url: config.upmsServerContext + "/manage/ucOrgan/getOrgRootTree",
274
+ method: 'get',
275
+ params: params,
276
+ });
277
+ }
package/demo/index.vue ADDED
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <demo-section>
3
+ <demo-block title="基础用法">
4
+ </demo-block>
5
+ </demo-section>
6
+ </template>
7
+ <script>
8
+
9
+ export default {
10
+ components: {},
11
+ data() {
12
+ return {}
13
+ },
14
+ methods: {}
15
+ }
16
+ </script>
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+ import FlowTodoList from './src/FlowTodoList.vue';
2
+ import FlowDownList from './src/FlowDownList.vue';
3
+ import FlowApproval from './src/FlowApproval.vue';
4
+ import WorkflowDiagram from './src/WorkflowDiagram.vue';
5
+
6
+ export {
7
+ FlowTodoList,
8
+ FlowDownList,
9
+ FlowApproval,
10
+ WorkflowDiagram
11
+ };
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@lambo-design-mobile/workflow-approve",
3
+ "version": "1.0.0-beta.1",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "author": "lambo",
7
+ "license": "ISC",
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "registry": "https://registry.npmjs.org/"
11
+ },
12
+ "dependencies": {
13
+ "bpmn-js": "^7.3.1"
14
+ },
15
+ "devDependencies": {
16
+ "@lambo-design-mobile/lambo-scan-code": "^1.0.0-beta.1",
17
+ "@lambo-design-mobile/upload-file": "^1.0.0-beta.9",
18
+ "@lambo-design-mobile/shared": "^1.0.0-beta.8"
19
+ },
20
+ "scripts": {
21
+ "release": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
22
+ "release-major": "standard-version --release-as major",
23
+ "release-minor": "standard-version --release-as minor",
24
+ "release-patch": "standard-version --release-as patch",
25
+ "release-beta": "standard-version --prerelease beta",
26
+ "re-publish": "pnpm publish --access public --no-git-checks"
27
+ }
28
+ }