修改文件名字和标题
This commit is contained in:
parent
b0257eccea
commit
cf550031fa
@ -5,7 +5,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<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="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||||
<meta http-equiv="Pragma" content="no-cache" />
|
<meta http-equiv="Pragma" content="no-cache" />
|
||||||
<meta http-equiv="Expires" content="0" />
|
<meta http-equiv="Expires" content="0" />
|
||||||
|
@ -42,7 +42,7 @@ export const UserReport: FC = () => {
|
|||||||
const handlePrint = async () => {
|
const handlePrint = async () => {
|
||||||
const opt = {
|
const opt = {
|
||||||
margin: 0,
|
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, },
|
image: { type: "jpeg", quality: 0.98, },
|
||||||
enableLinks: true,
|
enableLinks: true,
|
||||||
html2canvas: { scale: 3, useCORS: true, allowTaint: false, },
|
html2canvas: { scale: 3, useCORS: true, allowTaint: false, },
|
||||||
@ -106,11 +106,11 @@ export const UserReport: FC = () => {
|
|||||||
`
|
`
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div style={{position: 'fixed',width: '100%', height: '100%', left: 0, right: 0, top: 0, bottom: 0, margin: 'auto', zIndex: 99, background: '#fff' }}>
|
<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" }}>
|
||||||
<div>
|
|
||||||
<Button loading={downloadLoading} type='primary' tw='' onClick={() => handlePrint()}> 下载 </Button>
|
<Button loading={downloadLoading} type='primary' tw='' onClick={() => handlePrint()}> 下载 </Button>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div ref={printRef}>
|
<div ref={printRef}>
|
||||||
<ContentArea>
|
<ContentArea>
|
||||||
|
@ -8,7 +8,7 @@ import { isNil } from 'ramda';
|
|||||||
import { MaybeMapFactory } from '@/shared/foundation';
|
import { MaybeMapFactory } from '@/shared/foundation';
|
||||||
|
|
||||||
let engineCache: AxiosInstance | null = null;
|
let engineCache: AxiosInstance | null = null;
|
||||||
export const baseUrl = '/api'
|
export const baseUrl = '/wxApi'
|
||||||
/**
|
/**
|
||||||
* 应用中所需要使用的AJAX引擎。
|
* 应用中所需要使用的AJAX引擎。
|
||||||
* @param forceUnauthorized 是否强制丢弃用户会话令牌信息。
|
* @param forceUnauthorized 是否强制丢弃用户会话令牌信息。
|
||||||
|
@ -109,11 +109,11 @@ export default mode => {
|
|||||||
server: {
|
server: {
|
||||||
port: 3000,
|
port: 3000,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/wxApi': {
|
||||||
target: `${proxyHost.Host}`,
|
target: `${proxyHost.Host}`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false,
|
secure: false,
|
||||||
rewrite: path => path.replace(/^\/api/, proxyHost.Path)
|
rewrite: path => path.replace(/^\/wxApi/, proxyHost.Path)
|
||||||
},
|
},
|
||||||
'/test': {
|
'/test': {
|
||||||
target: `http://127.0.0.1:8081`,
|
target: `http://127.0.0.1:8081`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user