From 9e63ed4533fe6fbb5e81a096c9f5949c7ccf58f2 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期二, 08 四月 2025 17:34:15 +0800
Subject: [PATCH] feat: 接口
---
src/views/Reward/RewardDeclareDetail.vue | 53 +++++++++++++++++++++++++++++++++++------------------
1 files changed, 35 insertions(+), 18 deletions(-)
diff --git a/src/views/Reward/RewardDeclareDetail.vue b/src/views/Reward/RewardDeclareDetail.vue
index e3c47c4..94164c5 100644
--- a/src/views/Reward/RewardDeclareDetail.vue
+++ b/src/views/Reward/RewardDeclareDetail.vue
@@ -2,10 +2,8 @@
<LoadingLayout>
<AppContainer>
<PageFormLayout title="鐢虫姤璇︽儏">
- <DetailView :form="state.detail">
- <template #table>
- <DeclareEnterpriseTableView ref="tableRef"></DeclareEnterpriseTableView>
- </template>
+ <DetailView :form="form">
+ <DeclareEnterpriseTableView ref="tableRef"></DeclareEnterpriseTableView>
</DetailView>
<template #footer>
<el-button @click="handleBack">鍏抽棴</el-button>
@@ -20,7 +18,7 @@
import DetailView from '@/components/commonView/DetailView.vue';
import DeclareEnterpriseTableView from '@/components/commonView/DeclareEnterpriseTableView.vue';
import { useQuery } from '@tanstack/vue-query';
-import * as informationServices from '@/services/api/Information';
+import * as parkBountyApplyServices from '@/services/api/ParkBountyApply';
import { convertApi2FormUrlOnlyOne } from '@/utils';
import { useRouteView } from '@/hooks';
@@ -31,31 +29,50 @@
const route = useRoute();
const { closeViewPush } = useRouteView();
const id = route.params?.id as string;
-const state = reactive({
- detail: {
- categoryName: '',
- amount: 0,
- url: [] as UploadUserFile[],
- },
+const form = reactive({
+ searchKeyWord: '',
+ batchNo: '',
+ parkName: '',
+ parkTypeName: '',
+ applyMonth: '',
+ applySumAmount: 0,
+ enterpriseTaxSubFileUrl: [] as UploadUserFile[],
+ enterpriseOperateFileUrl: [] as UploadUserFile[],
+ bountyAssignFileUlr: [] as UploadUserFile[],
+ bountyCollectFileUrl: [] as UploadUserFile[],
});
const tableRef = ref<InstanceType<typeof DeclareEnterpriseTableView>>();
const { data: detail, isLoading } = useQuery({
- queryKey: ['informationServices/getInformationShowDetail', id],
+ queryKey: ['parkBountyApplyServices/getParkBountyApplyDetail', id],
queryFn: async () => {
- return await informationServices.getInformationShowDetail(
- { id: id },
+ return await parkBountyApplyServices.getParkBountyApplyDetail(
+ { parkBountyApplyId: id, searchKeyWord: form.searchKeyWord },
{
showLoading: false,
}
);
},
- placeholderData: () => ({} as API.InformationShowDetailDto),
+ placeholderData: () => ({} as API.GetParkBountyApplyInfoOutput),
onSuccess(data) {
- state.detail.categoryName = data.categoryName;
- state.detail.amount = data.attentionCount;
- state.detail.url = convertApi2FormUrlOnlyOne(data.avatarUrl);
+ form.batchNo = data.parkBountyApplyBaseInfo.batchNo;
+ form.parkName = data.parkBountyApplyBaseInfo.parkName;
+ form.parkTypeName = data.parkBountyApplyBaseInfo.parkTypeName;
+ form.applyMonth = data.parkBountyApplyBaseInfo.applyMonth;
+ form.applySumAmount = data.parkBountyApplyBaseInfo.applySumAmount;
+ form.enterpriseTaxSubFileUrl = convertApi2FormUrlOnlyOne(
+ data.parkBountyApplyBaseInfo?.enterpriseTaxSubFileUrl
+ );
+ form.enterpriseOperateFileUrl = convertApi2FormUrlOnlyOne(
+ data.parkBountyApplyBaseInfo?.enterpriseOperateFileUrl
+ );
+ form.bountyAssignFileUlr = convertApi2FormUrlOnlyOne(
+ data.parkBountyApplyBaseInfo?.bountyAssignFileUlr
+ );
+ form.bountyCollectFileUrl = convertApi2FormUrlOnlyOne(
+ data.parkBountyApplyBaseInfo?.bountyCollectFileUrl
+ );
tableRef.value?.getList();
},
--
Gitblit v1.9.1