修改文件名字和标题
This commit is contained in:
@@ -42,7 +42,7 @@ export const UserReport: FC = () => {
|
||||
const handlePrint = async () => {
|
||||
const opt = {
|
||||
margin: 0,
|
||||
filename: `${data?.tenement?.fullName || '报表'}.pdf`,
|
||||
filename: `${data?.comprehensive?.startDate ? dayjs(data?.comprehensive?.startDate).format("YYYY年MM月") : null}${data?.tenement?.fullName || '报表'}.pdf`,
|
||||
image: { type: "jpeg", quality: 0.98, },
|
||||
enableLinks: true,
|
||||
html2canvas: { scale: 3, useCORS: true, allowTaint: false, },
|
||||
@@ -106,11 +106,11 @@ export const UserReport: FC = () => {
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<div style={{position: 'fixed',width: '100%', height: '100%', left: 0, right: 0, top: 0, bottom: 0, margin: 'auto', zIndex: 99, background: '#fff' }}>
|
||||
<div>
|
||||
<div style={{position: 'fixed',width: '100%', height: '100%', left: 0, right: 0, top: 0, bottom: 0, margin: 'auto', zIndex: 99, background: '#fff', display: 'flex', justifyContent: 'center', alignItems: "center" }}>
|
||||
|
||||
<Button loading={downloadLoading} type='primary' tw='' onClick={() => handlePrint()}> 下载 </Button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div ref={printRef}>
|
||||
<ContentArea>
|
||||
|
||||
@@ -8,7 +8,7 @@ import { isNil } from 'ramda';
|
||||
import { MaybeMapFactory } from '@/shared/foundation';
|
||||
|
||||
let engineCache: AxiosInstance | null = null;
|
||||
export const baseUrl = '/api'
|
||||
export const baseUrl = '/wxApi'
|
||||
/**
|
||||
* 应用中所需要使用的AJAX引擎。
|
||||
* @param forceUnauthorized 是否强制丢弃用户会话令牌信息。
|
||||
|
||||
Reference in New Issue
Block a user