Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
77a80fae
Commit
77a80fae
authored
Dec 14, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改物业费详情pdf展示
parent
388f05b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
7 deletions
+29
-7
ChargeDetail.tsx
src/pages/PropertyManagement/ChargeDetail.tsx
+29
-7
No files found.
src/pages/PropertyManagement/ChargeDetail.tsx
View file @
77a80fae
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./ChargeDetail.less'
;
import
styles
from
'./ChargeDetail.less'
;
import
{
Pagination
,
Tooltip
}
from
'antd'
;
import
{
Pagination
,
Tooltip
,
Spin
}
from
'antd'
;
import
{
useIntl
,
connect
}
from
'umi'
;
import
{
useIntl
,
connect
}
from
'umi'
;
...
@@ -12,19 +12,39 @@ import { timestampToTime } from '../../utils/time';
...
@@ -12,19 +12,39 @@ import { timestampToTime } from '../../utils/time';
import
TitleBack
from
'../../components/TitleBack/TitleBack'
;
import
TitleBack
from
'../../components/TitleBack/TitleBack'
;
const
ChargeDetail
=
(
props
:
any
)
=>
{
const
ChargeDetail
=
(
props
:
any
)
=>
{
const
{
CurData
}
=
props
;
const
{
CurData
,
dispatch
,
FileImg
}
=
props
;
const
[
scale
,
setState
]
=
useState
(
1.3
);
const
[
scale
,
setState
]
=
useState
(
1.3
);
const
[
pages
,
setPages
]
=
useState
(
1
);
const
[
pages
,
setPages
]
=
useState
(
1
);
const
[
curpage
,
setCurpage
]
=
useState
(
1
);
const
[
curpage
,
setCurpage
]
=
useState
(
1
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
CurData
);
if
(
CurData
)
{
if
(
!
CurData
)
{
dispatch
({
type
:
'Contract/RA'
,
playload
:
{
index
:
47
,
body
:
{
type
:
'tosAccountPreview'
,
fileName
:
CurData
.
billName
,
extends
:
CurData
.
communityName
,
},
},
});
setLoading
(
true
);
}
else
{
history
.
back
();
history
.
back
();
}
}
},
[]);
},
[]);
useEffect
(()
=>
{
if
(
FileImg
)
{
setLoading
(
false
);
}
},
[
FileImg
]);
const
pdfpages
=
(
pages
:
any
)
=>
{
const
pdfpages
=
(
pages
:
any
)
=>
{
setPages
(
pages
);
setPages
(
pages
);
};
};
...
@@ -64,7 +84,7 @@ const ChargeDetail = (props: any) => {
...
@@ -64,7 +84,7 @@ const ChargeDetail = (props: any) => {
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
Pagination
simple
defaultCurrent=
{
curpage
}
total=
{
pages
*
10
}
onChange=
{
pageChange
}
/>
<
Pagination
simple
defaultCurrent=
{
curpage
}
total=
{
pages
*
10
}
onChange=
{
pageChange
}
/>
</
div
>
</
div
>
<>
<
Spin
spinning=
{
loading
}
>
<
Tooltip
title=
{
scale
==
1.3
?
'点击放大查看'
:
'还原视图'
}
>
<
Tooltip
title=
{
scale
==
1.3
?
'点击放大查看'
:
'还原视图'
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3out
:
null
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3out
:
null
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3
:
styles
.
box3of
}
onClick=
{
lookup
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3
:
styles
.
box3of
}
onClick=
{
lookup
}
>
...
@@ -72,7 +92,7 @@ const ChargeDetail = (props: any) => {
...
@@ -72,7 +92,7 @@ const ChargeDetail = (props: any) => {
// key="pdfjs"
// key="pdfjs"
file=
{
file=
{
// 'data:application/pdf;base64,' + stringSplit(CurData.billFileUrl, 'm/cash')
// 'data:application/pdf;base64,' + stringSplit(CurData.billFileUrl, 'm/cash')
stringSplit
(
CurData
.
billFileUrl
,
'm/cash'
)
stringSplit
(
CurData
.
billFileUrl
||
FileImg
[
0
].
fileUrl
,
'm/cash'
)
}
}
// workerSrc="//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js"
// workerSrc="//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js"
scale=
{
scale
}
scale=
{
scale
}
...
@@ -82,7 +102,7 @@ const ChargeDetail = (props: any) => {
...
@@ -82,7 +102,7 @@ const ChargeDetail = (props: any) => {
</
div
>
</
div
>
</
div
>
</
div
>
</
Tooltip
>
</
Tooltip
>
</>
</
Spin
>
</>
</>
)
:
null
}
)
:
null
}
</
div
>
</
div
>
...
@@ -91,8 +111,10 @@ const ChargeDetail = (props: any) => {
...
@@ -91,8 +111,10 @@ const ChargeDetail = (props: any) => {
function
mapStateToProps
(
state
:
any
)
{
function
mapStateToProps
(
state
:
any
)
{
const
{
CurData
}
=
state
.
PropertyManagement
;
const
{
CurData
}
=
state
.
PropertyManagement
;
const
{
FileImg
}
=
state
.
Contract
;
return
{
return
{
CurData
,
CurData
,
FileImg
,
};
};
}
}
export
default
connect
(
mapStateToProps
)(
ChargeDetail
);
export
default
connect
(
mapStateToProps
)(
ChargeDetail
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment