wupengfei
2025-04-11 29f11797c036e8b7f66ba0337b1aaa005eb508e2
src/views/Reward/RewardGrant.vue
@@ -47,6 +47,13 @@
      </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>
@@ -67,10 +74,15 @@
  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';
@@ -149,11 +161,8 @@
  },
  {
    data: {
      enCode: 'previewBtn',
      enCode: 'checkBtn',
      name: '查看凭证',
    },
    emits: {
      onClick: (role) => handlePreview(role),
    },
    extraProps: {
      hide: (row: API.GetParkBountyApplyListOutput) =>
@@ -256,15 +265,6 @@
      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>