修改文件名字和标题

This commit is contained in:
qiaomu 2024-05-06 14:34:43 +08:00
parent b0257eccea
commit cf550031fa
4 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>用电管理服务系统</title>
<title>账单查询</title>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />

View File

@ -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>

View File

@ -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

View File

@ -109,11 +109,11 @@ export default mode => {
server: {
port: 3000,
proxy: {
'/api': {
'/wxApi': {
target: `${proxyHost.Host}`,
changeOrigin: true,
secure: false,
rewrite: path => path.replace(/^\/api/, proxyHost.Path)
rewrite: path => path.replace(/^\/wxApi/, proxyHost.Path)
},
'/test': {
target: `http://127.0.0.1:8081`,