|
|
@@ -11,8 +11,7 @@
|
|
11
|
11
|
<u-checkbox-group class="checkbox-group">
|
|
12
|
12
|
<list-card v-for="item in filteredList" :key="item.id" :showChecked="true"
|
|
13
|
13
|
@click="navigateToDetail(item)">
|
|
14
|
|
- <template #checkbox
|
|
15
|
|
- v-if="canShowCheckbox(item)">
|
|
|
14
|
+ <template #checkbox v-if="canShowCheckbox(item)">
|
|
16
|
15
|
<u-checkbox style="margin-top: 6rpx;" :checked="item.checked" :key="item.id"
|
|
17
|
16
|
@change="itemChange(item)" />
|
|
18
|
17
|
</template>
|
|
|
@@ -111,7 +110,7 @@
|
|
111
|
110
|
import HomeContainer from "@/components/HomeContainer.vue";
|
|
112
|
111
|
import HTabs from "@/components/h-tabs/h-tabs.vue";
|
|
113
|
112
|
import { listCheckApprovalCcDetails, listCheckPendingTasks, listCheckFinishedTasks, updateCheckApprovalCcDetails } from "@/api/myToDoList/myToDoList.js"
|
|
114
|
|
-import { approvePassBatch, approveRejectBatch,rectifyApprovePass,rectifyApproveReject } from "@/api/approve/approve.js";
|
|
|
113
|
+import { approvePassBatch, approveRejectBatch, rectifyApprovePass, rectifyApproveReject } from "@/api/approve/approve.js";
|
|
115
|
114
|
import { showMessageTabRedDot } from "@/utils/common.js"
|
|
116
|
115
|
export default {
|
|
117
|
116
|
components: { HomeContainer, HTabs },
|
|
|
@@ -168,11 +167,10 @@ export default {
|
|
168
|
167
|
methods: {
|
|
169
|
168
|
// 判断是否显示复选框的条件
|
|
170
|
169
|
canShowCheckbox(item) {
|
|
171
|
|
-
|
|
172
|
|
- return ((item.instance && item.instance.businessType === 'SEIZURE_REPORT') ||
|
|
173
|
|
- (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' &&
|
|
174
|
|
- this.userInfoRoles.includes('jingli'))) &&
|
|
175
|
|
- this.currentTab === 'todo';
|
|
|
170
|
+ // (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' &&
|
|
|
171
|
+ // this.userInfoRoles.includes('jingli'))
|
|
|
172
|
+ return (item.instance && item.instance.businessType === 'SEIZURE_REPORT') &&
|
|
|
173
|
+ this.currentTab === 'todo';
|
|
176
|
174
|
},
|
|
177
|
175
|
|
|
178
|
176
|
// 根据任务类型分组
|
|
|
@@ -183,10 +181,11 @@ export default {
|
|
183
|
181
|
selectedItems.forEach(item => {
|
|
184
|
182
|
if (item.instance && item.instance.businessType === 'SEIZURE_REPORT') {
|
|
185
|
183
|
seizureTaskIds.push(item.id);
|
|
186
|
|
- } else if (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' &&
|
|
187
|
|
- this.userInfoRoles.includes('jingli')) {
|
|
188
|
|
- departmentTaskIds.push(item.id);
|
|
189
|
|
- }
|
|
|
184
|
+ }
|
|
|
185
|
+ // else if (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' &&
|
|
|
186
|
+ // this.userInfoRoles.includes('jingli')) {
|
|
|
187
|
+ // departmentTaskIds.push(item.id);
|
|
|
188
|
+ // }
|
|
190
|
189
|
});
|
|
191
|
190
|
|
|
192
|
191
|
return { seizureTaskIds, departmentTaskIds };
|
|
|
@@ -370,13 +369,13 @@ export default {
|
|
370
|
369
|
|
|
371
|
370
|
// 分别调用不同的驳回接口
|
|
372
|
371
|
const promises = [];
|
|
373
|
|
-
|
|
|
372
|
+
|
|
374
|
373
|
if (seizureTaskIds.length > 0) {
|
|
375
|
374
|
promises.push(approveRejectBatch(seizureTaskIds));
|
|
376
|
375
|
}
|
|
377
|
|
-
|
|
|
376
|
+
|
|
378
|
377
|
if (departmentTaskIds.length > 0) {
|
|
379
|
|
- promises.push(rectifyApproveReject({taskIdList: departmentTaskIds}));
|
|
|
378
|
+ promises.push(rectifyApproveReject({ taskIdList: departmentTaskIds, comment: '审批驳回' }));
|
|
380
|
379
|
}
|
|
381
|
380
|
|
|
382
|
381
|
// 等待所有接口调用完成
|
|
|
@@ -420,15 +419,15 @@ export default {
|
|
420
|
419
|
|
|
421
|
420
|
// 分别调用不同的通过接口
|
|
422
|
421
|
const promises = [];
|
|
423
|
|
-
|
|
|
422
|
+
|
|
424
|
423
|
if (seizureTaskIds.length > 0) {
|
|
425
|
424
|
promises.push(approvePassBatch(seizureTaskIds));
|
|
426
|
425
|
}
|
|
427
|
|
-
|
|
|
426
|
+
|
|
428
|
427
|
if (departmentTaskIds.length > 0) {
|
|
429
|
|
- promises.push(rectifyApprovePass({ taskIdList: departmentTaskIds }));
|
|
|
428
|
+ promises.push(rectifyApprovePass({ taskIdList: departmentTaskIds, comment: '审批通过' }));
|
|
430
|
429
|
}
|
|
431
|
|
-debugger
|
|
|
430
|
+
|
|
432
|
431
|
// 等待所有接口调用完成
|
|
433
|
432
|
await Promise.all(promises);
|
|
434
|
433
|
|