| | |
| | | <template> |
| | | <div class="data-board-home-content-center-top"> |
| | | <DataBoardCenterDataItem |
| | | :value="detail?.currentMonthSumBountyReleaseAmount" |
| | | v-model:value="currentMonthSumBountyReleaseAmountValue" |
| | | label="当月发放额" |
| | | :image="DataBoardCenterIcon1" |
| | | ></DataBoardCenterDataItem> |
| | | <DataBoardCenterDataItem |
| | | :value="detail?.currentMonthSumBountyUseAmount" |
| | | v-model:value="currentMonthSumBountyUseAmountValue" |
| | | label="当月使用额" |
| | | :image="DataBoardCenterIcon2" |
| | | ></DataBoardCenterDataItem> |
| | | <DataBoardCenterDataItem |
| | | :value="detail?.currentMonthInsurePeopleCount" |
| | | v-model:value="currentMonthInsurePeopleCountValue" |
| | | label="当月投保人数" |
| | | :precision="0" |
| | | :image="DataBoardCenterIcon3" |
| | |
| | | import DataBoardCenterIcon2 from '@/assets/dataBoard/data-board-center-icon2.png'; |
| | | import DataBoardCenterIcon3 from '@/assets/dataBoard/data-board-center-icon3.png'; |
| | | import DataBoardCenterDataItem from './DataBoardCenterDataItem.vue'; |
| | | import { useGetDataBoardOverview } from '../hooks'; |
| | | import * as dataBoardServices from '@/services/api/DataBoard'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { useIntervalValue } from '../hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'DataBoardCenterDataContent', |
| | | }); |
| | | |
| | | const { detail } = useGetDataBoardOverview(); |
| | | const form = reactive({ |
| | | currentMonthSumBountyReleaseAmount: 0, |
| | | currentMonthSumBountyUseAmount: 0, |
| | | currentMonthInsurePeopleCount: 0, |
| | | }); |
| | | |
| | | const { data: detail, isLoading } = useQuery({ |
| | | queryKey: ['dataBoardServices/getDataBoardOverview'], |
| | | queryFn: async () => { |
| | | return await dataBoardServices.getDataBoardOverview( |
| | | {}, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.GetDataBoardOverviewOutput), |
| | | onSuccess(data) { |
| | | form.currentMonthSumBountyReleaseAmount = data.currentMonthSumBountyReleaseAmount; |
| | | changeCurrentMonthSumBountyReleaseAmount(data.currentMonthSumBountyReleaseAmount); |
| | | form.currentMonthSumBountyUseAmount = data.currentMonthSumBountyUseAmount; |
| | | changeCurrentMonthSumBountyUseAmount(data.currentMonthSumBountyUseAmount); |
| | | form.currentMonthInsurePeopleCount = data.currentMonthInsurePeopleCount; |
| | | changeCurrentMonthInsurePeopleCount(data.currentMonthInsurePeopleCount); |
| | | }, |
| | | }); |
| | | |
| | | const { |
| | | value: currentMonthSumBountyReleaseAmountValue, |
| | | changeValue: changeCurrentMonthSumBountyReleaseAmount, |
| | | } = useIntervalValue(form.currentMonthSumBountyReleaseAmount); |
| | | const { |
| | | value: currentMonthSumBountyUseAmountValue, |
| | | changeValue: changeCurrentMonthSumBountyUseAmount, |
| | | } = useIntervalValue(form.currentMonthSumBountyUseAmount); |
| | | const { |
| | | value: currentMonthInsurePeopleCountValue, |
| | | changeValue: changeCurrentMonthInsurePeopleCount, |
| | | } = useIntervalValue(form.currentMonthInsurePeopleCount); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |