@lambo-design-mobile/workflow-approve 1.0.0-beta.27 → 1.0.0-beta.28

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/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
  # Changelog
2
+ ## [1.0.0-beta.28](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design-mobile/workflow-approve@1.0.0-beta.27...@lambo-design-mobile/workflow-approve@1.0.0-beta.28) (2026-06-30)
3
+
4
+
5
+ ### ✨ Features | 新功能
6
+
7
+ * **审批组件:** 待办列表增加转办按钮 ([b065d49](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/b065d492c7dbef054dff327d803f179a9b9421d6))
8
+
2
9
  ## [1.0.0-beta.27](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design-mobile/workflow-approve@1.0.0-beta.26...@lambo-design-mobile/workflow-approve@1.0.0-beta.27) (2026-06-08)
3
10
 
4
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design-mobile/workflow-approve",
3
- "version": "1.0.0-beta.27",
3
+ "version": "1.0.0-beta.28",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "standard-version": "^9.5.0",
17
- "@lambo-design-mobile/shared": "^1.0.0-beta.21",
18
17
  "@lambo-design-mobile/lambo-scan-code": "^1.0.0-beta.1",
18
+ "@lambo-design-mobile/shared": "^1.0.0-beta.22",
19
19
  "@lambo-design-mobile/upload-file": "^1.0.0-beta.18"
20
20
  },
21
21
  "scripts": {
@@ -45,13 +45,14 @@
45
45
  :finished="finished"
46
46
  finished-text="没有更多了"
47
47
  @load="handleLoad">
48
- <TodoListCard ref="todoListCard" :selected-task="selectedTask" :todo-list="listData.rows" :result.sync="checkResult"
49
- :business-approval-router-name="businessApprovalRouterName"
50
- :business-details-router-name="businessDetailsRouterName"
51
- :process-approval-router-name="processApprovalRouterName"
52
- :process-details-router-name="processDetailsRouterName"/>
53
- </van-list>
54
- </div>
48
+ <TodoListCard ref="todoListCard" :selected-task="selectedTask" :todo-list="listData.rows" :result.sync="checkResult"
49
+ :business-approval-router-name="businessApprovalRouterName"
50
+ :business-details-router-name="businessDetailsRouterName"
51
+ :process-approval-router-name="processApprovalRouterName"
52
+ :process-details-router-name="processDetailsRouterName"
53
+ @refresh="resetAndLoadList"/>
54
+ </van-list>
55
+ </div>
55
56
  <div v-if="checkResult.length > 0" class="custom-bottom-bar">
56
57
  <div class="bar-item">
57
58
  <van-checkbox v-model="batchSelectChecked" @change="batchSelect" style="justify-content: center;"
@@ -143,16 +143,17 @@ export default {
143
143
  this.userRangeList = this.userList.map(item => { return{...item, organName: item.organName || item.deptName} })
144
144
  this.personList.rows = this.userRangeList
145
145
  this.personList.total = this.userRangeList.length
146
+ this.finished = true;
146
147
  return
147
- }
148
- this.useUserTransferRange = false
149
- this.personList.total = 0;
150
- this.personList.rows = [];
151
- this.finished = false;
152
- this.loading = false;
153
- if (this.orgList && this.orgList.length > 0){
154
- this.organizeIdList = this.orgList.map(item => item.orgId)
155
- this.orgTreeType = this.organTreeType;
148
+ }
149
+ this.useUserTransferRange = false
150
+ this.personList.total = 0;
151
+ this.personList.rows = [];
152
+ this.finished = false;
153
+ this.loading = false;
154
+ if (this.orgList && this.orgList.length > 0){
155
+ this.organizeIdList = this.orgList.map(item => item.orgId)
156
+ this.orgTreeType = this.organTreeType;
156
157
  this.searchForm = {
157
158
  ...this.searchForm,
158
159
  orgTreeType: this.organTreeType,
@@ -184,43 +185,43 @@ export default {
184
185
  })
185
186
  }
186
187
  },
187
- handleLoad() {
188
- if (this.loading || this.finished) {
189
- return
190
- }
191
- console.log("触发加载")
192
- this.loading = true;
193
- if (this.useUserTransferRange){
194
- this.personList.rows = this.searchForm.userName ? this.userRangeList.map(item => item.userName === this.searchForm.userName) : this.userRangeList
195
- this.personList.total = this.personList.rows.length;
196
- this.finished = true;
197
- this.loading = false;
198
- return
199
- }
188
+ handleLoad() {
189
+ if (this.loading || this.finished) {
190
+ return
191
+ }
192
+ console.log("触发加载")
193
+ this.loading = true;
194
+ if (this.useUserTransferRange){
195
+ this.personList.rows = this.searchForm.userName ? this.userRangeList.filter(item => item.userName === this.searchForm.userName) : this.userRangeList
196
+ this.personList.total = this.personList.rows.length;
197
+ this.finished = true;
198
+ this.loading = false;
199
+ return
200
+ }
200
201
  const offset = this.personList.rows.length;
201
202
  const limit = 10;
202
203
 
203
- getUserList(offset, limit, this.searchForm).then(res => {
204
- const result = res.data;
205
- if (result.code === "1") {
206
- //返回的数据添加到 personList 中
207
- const newRows = Array.isArray(result.data.rows) ? result.data.rows : [];
208
- this.personList.rows = this.personList.rows.concat(newRows);
209
- const total = Number(result.data.total);
210
- if (!Number.isNaN(total)) {
211
- this.personList.total = total;
212
- }
213
- const noMoreByPage = newRows.length < limit;
214
- const noMoreByTotal = this.personList.total > 0 && this.personList.rows.length >= this.personList.total;
215
- this.finished = noMoreByPage || noMoreByTotal;
216
- }
217
-
218
- this.loading = false;
219
-
220
- }).catch(error => {
221
- console.error('Error fetching data:', error);
222
- this.loading = false;
223
- });
204
+ getUserList(offset, limit, this.searchForm).then(res => {
205
+ const result = res.data;
206
+ if (result.code === "1") {
207
+ //返回的数据添加到 personList 中
208
+ const newRows = Array.isArray(result.data.rows) ? result.data.rows : [];
209
+ this.personList.rows = this.personList.rows.concat(newRows);
210
+ const total = Number(result.data.total);
211
+ if (!Number.isNaN(total)) {
212
+ this.personList.total = total;
213
+ }
214
+ const noMoreByPage = newRows.length < limit;
215
+ const noMoreByTotal = this.personList.total > 0 && this.personList.rows.length >= this.personList.total;
216
+ this.finished = noMoreByPage || noMoreByTotal;
217
+ }
218
+
219
+ this.loading = false;
220
+
221
+ }).catch(error => {
222
+ console.error('Error fetching data:', error);
223
+ this.loading = false;
224
+ });
224
225
  },
225
226
 
226
227
  extractUsers(permScope) {
@@ -254,13 +255,13 @@ export default {
254
255
  resetSearch() {
255
256
  this.initSearch()
256
257
  },
257
- resetAndLoadPersonList() {
258
- this.personList.total = 0;
259
- this.personList.rows = [];
260
- this.finished = false;
261
- this.loading = false;
262
- this.handleLoad();
263
- },
258
+ resetAndLoadPersonList() {
259
+ this.personList.total = 0;
260
+ this.personList.rows = [];
261
+ this.finished = false;
262
+ this.loading = false;
263
+ this.handleLoad();
264
+ },
264
265
  handleSelect(handle) {
265
266
  if (handle === 'select') {
266
267
  // 触发自定义事件 'selectHandle',并传递 this.checkResult
@@ -36,6 +36,9 @@
36
36
  <van-cell v-if="selectedTask === 'pending'" :key="selectedTask" title=" ">
37
37
  <template #right-icon>
38
38
  <div class="button-group">
39
+ <van-button class="button" size="small" plain type="info" @click="derive(item)">
40
+ 转办
41
+ </van-button>
39
42
  <van-button class="button" size="small" plain type="info" @click="handleItem(item)">
40
43
  {{ item.handleName || (item.handleType === '20' ? '审批' : '办理') }}
41
44
  </van-button>
@@ -44,14 +47,22 @@
44
47
  </van-cell>
45
48
  </van-cell-group>
46
49
  </van-checkbox-group>
50
+ <van-popup v-if="selectUserPopupShow" v-model="selectUserPopupShow" closeable round position="bottom" :style="{ height: '80%' }">
51
+ <div class="select-user-popup-body">
52
+ <select-handle title="指定办理人" :procType="selectUserPopupParams.procType" :organ-tree-type="selectUserPopupParams.organTreeType"
53
+ :org-list="selectUserPopupParams.orgList" :user-list="selectUserPopupParams.userList" @selectHandle="handleSelectResult"></select-handle>
54
+ </div>
55
+ </van-popup>
47
56
  </div>
48
57
  </template>
49
58
  <script>
50
- import {getNodeData} from "../api";
51
- import {Notify} from "vant";
59
+ import {getNodeData, audit, getTransferRange} from "../api";
60
+ import {Notify, Toast} from "vant";
61
+ import SelectHandle from "./SelectHandle.vue";
52
62
 
53
63
  export default {
54
64
  name: 'TodoListCard',
65
+ components: {SelectHandle},
55
66
  props: {
56
67
  todoList: {},
57
68
  selectedTask: {
@@ -85,6 +96,19 @@ export default {
85
96
  localTodoList: this.todoList,
86
97
  detailsVisible: {}, // 用于跟踪每个项目的详细内容是否可见
87
98
  localResult: this.result, // 使用 localResult 来绑定 van-checkbox-group
99
+ selectUserPopupShow: false, // 转办弹框
100
+ selectUserPopupParams: {
101
+ procType: '',
102
+ class: '',
103
+ userList: [],
104
+ orgList: [],
105
+ organTreeType: '',
106
+ procId: '',
107
+ taskNode: '',
108
+ applyId: '',
109
+ taskId: '',
110
+ instanceId: '',
111
+ },
88
112
  }
89
113
  },
90
114
  watch: {
@@ -182,10 +206,124 @@ export default {
182
206
  toggleDetails(index) {
183
207
  this.$set(this.detailsVisible, index, !this.detailsVisible[index]);
184
208
  },
209
+ // 转办
210
+ async derive(item) {
211
+ this.resetTransferPopupData();
212
+ this.selectUserPopupParams.procType = item.procType
213
+ this.selectUserPopupParams.procId = item.procId
214
+ this.selectUserPopupParams.taskNode = item.taskNode
215
+ this.selectUserPopupParams.applyId = item.applyId
216
+ this.selectUserPopupParams.taskId = item.taskId
217
+ this.selectUserPopupParams.instanceId = item.procInstanceId || item.instanceId
218
+ const success = await this.fetchTransferRange();
219
+ if (success) {
220
+ this.selectUserPopupShow = true;
221
+ }
222
+ },
223
+ resetTransferPopupData() {
224
+ this.selectUserPopupParams = {
225
+ procType: '',
226
+ class: '',
227
+ userList: [],
228
+ orgList: [],
229
+ organTreeType: '',
230
+ procId: '',
231
+ taskNode: '',
232
+ applyId: '',
233
+ taskId: '',
234
+ instanceId: '',
235
+ };
236
+ },
237
+ async fetchTransferRange() {
238
+ try {
239
+ const params = {
240
+ procType: this.selectUserPopupParams.procType,
241
+ procId: this.selectUserPopupParams.procId,
242
+ taskNode: this.selectUserPopupParams.taskNode,
243
+ applyId: this.selectUserPopupParams.applyId,
244
+ taskId: this.selectUserPopupParams.taskId,
245
+ instanceId: this.selectUserPopupParams.instanceId,
246
+ actionType: 'auditTo82',
247
+ };
248
+ const res = await getTransferRange(params);
249
+ const result = res.data;
250
+ if (result.code == 200) {
251
+ this.selectUserPopupParams.organTreeType = result.data.organTreeType;
252
+ this.selectUserPopupParams.userList = result.data.userList;
253
+ this.selectUserPopupParams.orgList = result.data.orgList;
254
+ return true;
255
+ } else {
256
+ console.warn('获取选择人员范围失败,返回码:', result.code);
257
+ return false;
258
+ }
259
+ } catch (err) {
260
+ console.error('获取选择人员范围异常', err);
261
+ return false;
262
+ }
263
+ },
264
+ handleSelectResult(checkResult) {
265
+ const self = this
266
+ console.log('Selected result:', checkResult);
267
+ let auditParams = {
268
+ procId: self.selectUserPopupParams.procId,
269
+ applyId: self.selectUserPopupParams.applyId,
270
+ taskId: self.selectUserPopupParams.taskId,
271
+ auditResult: '82',
272
+ selectedUserId: checkResult[0].userId,
273
+ }
274
+ self.auditRequest(auditParams);
275
+ self.selectUserPopupShow = false;
276
+ },
277
+ auditRequest(auditParams) {
278
+ let self = this
279
+ Toast.loading({
280
+ duration: 0, // 持续展示 toast
281
+ forbidClick: true,
282
+ message: '处理中',
283
+ })
284
+ //确认执行审批逻辑
285
+ audit(auditParams).then((resp) => { // 使用箭头函数
286
+ let result = resp.data
287
+ if (result.code === '200') {
288
+ Toast.success(result.message);
289
+ } else {
290
+ Toast.fail(result.message);
291
+ }
292
+ this.selectUserPopupShow = false;
293
+ this.$emit('refresh');
294
+ })
295
+ },
185
296
  }
186
297
  }
187
298
  </script>
188
299
  <style scoped>
300
+ .select-user-popup-body {
301
+ height: 100%;
302
+ overflow: hidden;
303
+ }
304
+
305
+ ::v-deep .select-user-popup-body > * {
306
+ height: 100%;
307
+ display: flex;
308
+ flex-direction: column;
309
+ overflow: hidden;
310
+ min-height: 0;
311
+ }
312
+
313
+ ::v-deep .select-user-popup-body #headTitle {
314
+ flex: 0 0 auto;
315
+ }
316
+
317
+ ::v-deep .select-user-popup-body #listContent {
318
+ flex: 1;
319
+ min-height: 0;
320
+ overflow-y: auto;
321
+ }
322
+
323
+ ::v-deep .select-user-popup-body .custom-bottom-bar {
324
+ position: relative;
325
+ flex-shrink: 0;
326
+ }
189
327
 
190
328
  .button-group {
191
329
  display: flex;