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
d475cdd7
Commit
d475cdd7
authored
Feb 22, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDF优化,限制增大
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
1608b66d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
7 deletions
+48
-7
PdfUpload.tsx
src/components/Form/PdfUpload.tsx
+31
-4
CellList.ts
src/models/CommunityManagement/CellList.ts
+13
-2
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+3
-1
Details.tsx
src/pages/CommunityManagement/CellList/Details.tsx
+1
-0
No files found.
src/components/Form/PdfUpload.tsx
View file @
d475cdd7
/*
* @Author: your name
* @Date: 2021-02-01 14:54:48
* @LastEditTime: 2021-02-2
0 15:59:43
* @LastEditTime: 2021-02-2
2 16:54:18
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\PdfUpload.tsx
...
...
@@ -33,7 +33,28 @@ const PdfUpload: React.FC<PriceInputProps> = ({
action
,
data
,
})
=>
{
const
[
loading
,
setLoading
]
=
useState
([
false
,
false
,
false
,
false
,
false
]);
// 上传中控制
const
[
loading
,
setLoading
]
=
useState
([
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
]);
// 上传中控制
const
[
idx
,
setIdx
]
=
useState
(
0
);
// 点击的第几个
const
[
imgList
,
setImgList
]
=
useState
([]
as
any
);
// 列表
...
...
@@ -62,6 +83,7 @@ const PdfUpload: React.FC<PriceInputProps> = ({
],
tip
:
false
,
message
:
'Required'
,
descriptionId
:
detailvalue
[
i
].
descriptionId
,
};
// 抽取相同的属性合并
if
(
obj
.
length
>
0
)
{
...
...
@@ -70,13 +92,18 @@ const PdfUpload: React.FC<PriceInputProps> = ({
});
if
(
filterValue
.
length
>
0
)
{
obj
.
forEach
((
n
:
any
)
=>
{
if
(
n
.
name
==
detailvalue
[
i
].
description
)
{
if
(
n
.
name
==
detailvalue
[
i
].
description
&&
n
.
descriptionId
==
detailvalue
[
i
].
descriptionId
)
{
n
.
fileList
.
push
({
uid
:
i
,
name
:
detailvalue
[
i
].
pdfName
,
status
:
'done'
,
url
:
detailvalue
[
i
].
pdfUrl
,
});
}
else
{
obj
.
push
(
item
);
}
});
}
else
{
...
...
@@ -323,7 +350,7 @@ const PdfUpload: React.FC<PriceInputProps> = ({
);
})
}
{
imgList
.
length
<
5
?
(
{
imgList
.
length
<
20
?
(
<
div
className=
"pdf-add"
>
<
Button
type=
"dashed"
...
...
src/models/CommunityManagement/CellList.ts
View file @
d475cdd7
...
...
@@ -48,16 +48,27 @@ export default {
//标准请求
*
RA
({
playload
},
{
call
,
put
})
{
const
resp
=
yield
call
(
service
.
RA
,
playload
);
if
(
resp
.
error_code
!=
'0000'
)
{
if
(
resp
.
error_code
!=
'0000'
&&
resp
.
error_code
!=
'0002'
)
{
getObjectInfo
(
playload
.
body
);
printf
(
playload
,
resp
);
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
}
else
if
(
resp
.
error_code
==
'0002'
)
{
// 小区被关闭后清空小区列表和缓存并返回列表重新获取
// 列表
let
Data
=
null
;
let
village
=
null
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnVillage'
,
village
});
// 小区
let
CommunityList
=
null
;
yield
put
({
type
:
'Init/returnCommunityList'
,
CommunityList
});
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
history
.
push
(
'/CommunityManagement/CellList'
);
}
else
{
switch
(
playload
.
index
)
{
case
24
:
{
let
CommunityList
=
null
;
yield
put
({
type
:
'Init/returnCommunityList'
,
CommunityList
});
let
Data
=
resp
.
data
;
CommunityList
=
resp
.
data
.
communityList
;
yield
put
({
type
:
'returnPage'
,
Data
});
...
...
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
d475cdd7
...
...
@@ -207,7 +207,7 @@ const Adds = (props: any) => {
:
values
.
residentialPhone
;
values
.
residentialHotlineName
=
residentialHotlineName
?
undeFi
(
residentialHotlineName
)
:
values
.
residentialManagerUserName
;
:
'Community Hotline'
;
// 没选的话就上面小区时间
if
(
time
)
{
...
...
@@ -413,6 +413,7 @@ const Adds = (props: any) => {
extends
:
codename
,
}
}
limitNums=
{
1
}
over=
{
codeStrat
}
CommunityValue=
{
Data
&&
detailData
&&
detailData
.
banner
?
detailData
.
banner
:
null
}
// imgs={ImageSrc}
// disabled={codeStrat}
...
...
@@ -487,6 +488,7 @@ const Adds = (props: any) => {
name=
{
'formsPdfList'
}
label=
""
colon=
{
false
}
wrapperCol=
{
{
span
:
24
}
}
style=
{
{
marginBottom
:
0
}
}
>
<
PdfUpload
...
...
src/pages/CommunityManagement/CellList/Details.tsx
View file @
d475cdd7
...
...
@@ -235,6 +235,7 @@ const Detail = (props: any) => {
// extends: codename,
}
}
limitNums=
{
1
}
over=
{
true
}
CommunityValue=
{
detailData
&&
detailData
.
banner
?
detailData
.
banner
:
null
}
// imgs=
{
ImageSrc
}
// disabled=
{
codeStrat
}
...
...
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