| | |
| | | # 项目本地运行端口号 |
| | | VITE_PORT = 8388 |
| | | VITE_PORT = 8688 |
| | | |
| | | # 开发环境读取配置文件路径 |
| | | VITE_PUBLIC_PATH = / |
| | |
| | | return path ? [convertApi2FormUrl(path)] : []; |
| | | } |
| | | |
| | | export function convertApi2FormUrlBySeparator(path: string, separator = '|') { |
| | | return path.split(separator).map((x) => setOSSLink(x)); |
| | | } |
| | | |
| | | /** |
| | | * 把upload的路径转换为上传到api的路径 |
| | | */ |
| | |
| | | const { data: detail, isLoading } = useQuery({ |
| | | queryKey: ['customerServices/getParkCustomerManageBaseDetail', id], |
| | | queryFn: async () => { |
| | | return await customerServices.getParkCustomerManageBaseDetail( |
| | | { id: id }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | return await customerServices.getParkCustomerManageBaseDetail({ id: id }); |
| | | }, |
| | | placeholderData: () => ({} as API.GetParkCustomerManageDetailOutput), |
| | | enabled: !!id, |
| | |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | <template #operationBtn-checkBtn="{ data, row }"> |
| | | <PreviewBtnV2 |
| | | class="pro-table-operation-btn" |
| | | :url="convertApi2FormUrlBySeparator(row.payFileUrl ?? '')" |
| | | preview-btn-text="查看凭证" |
| | | /> |
| | | </template> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { AppContainer, useTable, ProTableV2, defineOperationBtns } from '@bole-core/components'; |
| | | import { |
| | | AppContainer, |
| | | useTable, |
| | | ProTableV2, |
| | | defineOperationBtns, |
| | | PreviewBtnV2, |
| | | } from '@bole-core/components'; |
| | | import { convertApi2FormUrlBySeparator } from '@/utils'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import * as parkRewardServices from '@/services/api/ParkReward'; |
| | | import { EnterpriseBountyPayTypeEnumText } from '@/constants'; |
| | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'previewBtn', |
| | | enCode: 'checkBtn', |
| | | name: '查看凭证', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handlePreview(role), |
| | | }, |
| | | }, |
| | | ]); |
| | |
| | | <LoadingLayout :loading="state.loading"> |
| | | <AppContainer> |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | <template #operationBtn-checkBtn="{ data, row }"> |
| | | <PreviewBtnV2 |
| | | class="pro-table-operation-btn" |
| | | :url="convertApi2FormUrlBySeparator(row.transferToFileUrl ?? '')" |
| | | preview-btn-text="查看凭证" |
| | | /> |
| | | </template> |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { AppContainer, useTable, ProTableV2, defineOperationBtns } from '@bole-core/components'; |
| | | import { |
| | | AppContainer, |
| | | useTable, |
| | | ProTableV2, |
| | | defineOperationBtns, |
| | | PreviewBtnV2, |
| | | } from '@bole-core/components'; |
| | | import { convertApi2FormUrlBySeparator } from '@/utils'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; |
| | | import { IncomeStatusEnumText } from '@/constants'; |
| | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'previewBtn', |
| | | enCode: 'checkBtn', |
| | | name: '查看凭证', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handlePreview(role), |
| | | }, |
| | | }, |
| | | ]); |
| | |
| | | </ProTableQueryFilterBar> |
| | | |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | <template #operationBtn-checkBtn="{ data, row }"> |
| | | <PreviewBtnV2 |
| | | class="pro-table-operation-btn" |
| | | :url="convertApi2FormUrlBySeparator(row.settleFileUrl ?? '')" |
| | | preview-btn-text="查看凭证" |
| | | /> |
| | | </template> |
| | | </ProTableV2> |
| | | <RewardGrantDialog v-bind="dialogProps"></RewardGrantDialog> |
| | | </AppContainer> |
| | |
| | | FieldDatePicker, |
| | | useFormDialog, |
| | | UploadUserFile, |
| | | bolePreview, |
| | | PreviewBtnV2, |
| | | } from '@bole-core/components'; |
| | | import { Message, OrderInputType } from '@bole-core/core'; |
| | | import { convertApi2FormUrl, convertApi2FormUrlOnlyOne, downloadFileByUrl, format } from '@/utils'; |
| | | import { |
| | | convertApi2FormUrl, |
| | | convertApi2FormUrlBySeparator, |
| | | downloadFileByUrl, |
| | | format, |
| | | } from '@/utils'; |
| | | import { SettleStatusEnum, SettleStatusEnumText } from '@/constants'; |
| | | import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; |
| | | import RewardGrantDialog from './components/RewardGrantDialog.vue'; |
| | |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'previewBtn', |
| | | enCode: 'checkBtn', |
| | | name: '查看凭证', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handlePreview(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetParkBountyApplyListOutput) => |
| | |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handlePreview(row?: API.GetParkBountyApplyListOutput) { |
| | | const fileList = row.settleFileUrl?.split('|').map((x) => convertApi2FormUrl(x)) ?? []; |
| | | if (fileList.length > 1) { |
| | | console.log('fileList: ', fileList); |
| | | } else { |
| | | downloadFileByUrl(fileList[0]); |
| | | } |
| | | } |
| | | </script> |
| | | |