From ae671e401db4b158b6bd4292fb99fab58e40844c Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 11 四月 2025 09:14:04 +0800
Subject: [PATCH] feat: 接口
---
src/views/Reward/RewardGrant.vue | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/views/Reward/RewardGrant.vue b/src/views/Reward/RewardGrant.vue
index 2fe06d7..18093e7 100644
--- a/src/views/Reward/RewardGrant.vue
+++ b/src/views/Reward/RewardGrant.vue
@@ -69,8 +69,8 @@
UploadUserFile,
bolePreview,
} from '@bole-core/components';
-import { OrderInputType } from '@bole-core/core';
-import { convertApi2FormUrlOnlyOne, format } from '@/utils';
+import { Message, OrderInputType } from '@bole-core/core';
+import { convertApi2FormUrl, convertApi2FormUrlOnlyOne, downloadFileByUrl, format } from '@/utils';
import { SettleStatusEnum, SettleStatusEnumText } from '@/constants';
import * as parkBountyApplyServices from '@/services/api/ParkBountyApply';
import RewardGrantDialog from './components/RewardGrantDialog.vue';
@@ -142,6 +142,10 @@
emits: {
onClick: (role) => openDialog(role),
},
+ extraProps: {
+ hide: (row: API.GetParkBountyApplyListOutput) =>
+ row.settleStatus === SettleStatusEnum.HasSettle,
+ },
},
{
data: {
@@ -150,6 +154,10 @@
},
emits: {
onClick: (role) => handlePreview(role),
+ },
+ extraProps: {
+ hide: (row: API.GetParkBountyApplyListOutput) =>
+ row.settleStatus === SettleStatusEnum.WaitForSettle,
},
},
]);
@@ -240,16 +248,23 @@
try {
let params: API.ParkBountyApplySettleInput = {
parkBountyApplyId: editForm.parkBountyApplyId,
- settleFileUrl: editForm.settleFileUrl[0].path,
+ settleFileUrl: editForm.settleFileUrl.map((x) => x.path).join('|'),
};
let res = await parkBountyApplyServices.parkBountyApplySettle(params);
+ if (res) {
+ Message.successMessage('鎿嶄綔鎴愬姛');
+ getList(paginationState.pageIndex);
+ }
} catch (error) {}
}
function handlePreview(row?: API.GetParkBountyApplyListOutput) {
- bolePreview({
- fileUrl: row.parkName,
- });
+ const fileList = row.settleFileUrl?.split('|').map((x) => convertApi2FormUrl(x)) ?? [];
+ if (fileList.length > 1) {
+ console.log('fileList: ', fileList);
+ } else {
+ downloadFileByUrl(fileList[0]);
+ }
}
</script>
--
Gitblit v1.9.1