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
1421fe2b
Commit
1421fe2b
authored
Nov 24, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文字更改,小区列表上传模块重做
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
f7f8ea16
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
315 additions
and
248 deletions
+315
-248
AvatarDropdown.tsx
src/components/GlobalHeader/AvatarDropdown.tsx
+11
-11
index.jsx
src/components/SelectOptions/index.jsx
+4
-4
index.jsx
src/components/ShowOptions/index.jsx
+225
-170
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+74
-62
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+1
-1
No files found.
src/components/GlobalHeader/AvatarDropdown.tsx
View file @
1421fe2b
...
...
@@ -61,7 +61,7 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
<
Menu
.
Item
key=
"logout"
>
<
LogoutOutlined
/>
退出登录
Sign Out
</
Menu
.
Item
>
</
Menu
>
);
...
...
@@ -73,16 +73,16 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
</
span
>
</
HeaderDropdown
>
)
:
(
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Spin
size=
"small"
style=
{
{
marginLeft
:
8
,
marginRight
:
8
,
}
}
/>
</
span
>
);
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Spin
size=
"small"
style=
{
{
marginLeft
:
8
,
marginRight
:
8
,
}
}
/>
</
span
>
);
}
}
...
...
src/components/SelectOptions/index.jsx
View file @
1421fe2b
...
...
@@ -138,15 +138,15 @@ class SelectOptions extends React.PureComponent {
});
}
else
{
this
.
setState
({
selectoptionsOpen
:
'
Open
'
,
selectoptionsPutItAway
:
'
Put It Away
'
,
selectoptionsOpen
:
'
Collapse
'
,
selectoptionsPutItAway
:
'
Close
'
,
selectoptionsSelected
:
'Selected'
,
selectoptionsSelectAll
:
'Select All'
,
selectoptionsSelectNone
:
'Unselect All'
,
selectoptionsAll
:
'All'
,
selectoptionsSearchCell
:
'Search cell'
,
selectoptionsAllCell
:
'
All Ce
ll'
,
componetVisible
:
'
Put It Away
'
,
selectoptionsAllCell
:
'
A
ll'
,
componetVisible
:
'
Close
'
,
});
}
// console.log("初始化2")
...
...
src/components/ShowOptions/index.jsx
View file @
1421fe2b
This diff is collapsed.
Click to expand it.
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
1421fe2b
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
LeftOutlined
,
EditOutlined
,
UploadOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
LeftOutlined
,
EditOutlined
,
UploadOutlined
,
LinkOutlined
,
PlusOutlined
,
}
from
'@ant-design/icons'
;
import
{
Form
,
Input
,
Button
,
TimePicker
,
Checkbox
,
Upload
,
message
,
Spin
}
from
'antd'
;
// 样式
import
'./celllist.less'
;
...
...
@@ -10,6 +16,7 @@ import { village } from '@/utils/tip';
import
moment
from
'moment'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
imgs
from
'@/assets/logo_icon_bg.png'
;
const
{
RangePicker
}
=
TimePicker
;
...
...
@@ -90,11 +97,11 @@ const Adds = (props: any) => {
},
[
Data
]);
// 返回上传格式 和 地址
function
backUpload
(
str
:
string
,
index
:
number
)
{
function
backUpload
(
str
:
string
,
index
:
number
,
url
?:
any
)
{
let
a
=
{
uid
:
str
+
index
,
name
:
str
,
url
:
'http://'
,
url
:
url
?
url
:
imgs
,
};
return
a
;
}
...
...
@@ -109,63 +116,50 @@ const Adds = (props: any) => {
// 楼巴上传
const
upload1
=
{
onChange
(
info
:
any
)
{
if
(
codename
!==
''
)
{
let
po
=
new
Array
();
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
// 给楼巴上传列表值
console
.
log
(
po
);
setLouba
(
po
);
onChange
({
file
,
fileList
}:
any
)
{
console
.
log
(
file
);
console
.
log
(
fileList
);
if
(
file
.
status
===
'done'
)
{
setLouba
(
fileList
);
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
// 结果
uploadMsg
(
info
);
}
else
{
message
.
warning
(
'Please Fill In The Community Name'
);
}
// 结果
uploadMsg
(
file
);
},
};
// 指南上传
const
upload2
=
{
onChange
(
info
:
any
)
{
if
(
codename
!==
''
)
{
let
po
=
new
Array
();
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
// 给楼巴上传列表值
setGuide
(
po
);
onChange
({
file
,
fileList
}:
any
)
{
if
(
file
.
status
===
'done'
)
{
setGuide
(
fileList
);
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
// 结果
uploadMsg
(
info
);
}
else
{
message
.
warning
(
'Please Fill In The Community Name'
);
}
// 结果
uploadMsg
(
file
);
},
};
// 保质期上传
const
upload3
=
{
onChange
(
info
:
any
)
{
if
(
codename
!==
''
)
{
let
po
=
new
Array
();
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
// 给楼巴上传列表值 以及禁止修改小区名
setPeriod
(
po
);
onChange
({
file
,
fileList
}:
any
)
{
if
(
file
.
status
===
'done'
)
{
setPeriod
(
fileList
);
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
// 结果
uploadMsg
(
info
);
}
else
{
message
.
warning
(
'Please Fill In The Community Name'
);
}
// 结果
uploadMsg
(
file
);
},
};
// 上传提示
function
uploadMsg
(
info
:
any
)
{
if
(
info
.
file
.
status
===
'done'
)
{
message
.
success
(
`
${
info
.
file
.
name
}
File Uploaded Successfully`
);
}
else
if
(
info
.
file
.
status
===
'error'
)
{
message
.
error
(
`
${
info
.
file
.
name
}
File Upload Failed.`
);
function
uploadMsg
(
file
:
any
)
{
if
(
file
.
status
===
'done'
)
{
message
.
success
(
`
${
file
.
name
}
File Uploaded Successfully`
);
}
else
if
(
file
.
status
===
'error'
)
{
message
.
error
(
`
${
file
.
name
}
File Upload Failed.`
);
}
}
...
...
@@ -263,7 +257,7 @@ const Adds = (props: any) => {
};
// 小区名输入监听ant
function
insdInp
(
value
:
string
,
prevValue
,
prevValues
)
{
function
insdInp
(
value
:
string
)
{
setCodeName
(
value
);
return
value
;
}
...
...
@@ -278,13 +272,21 @@ const Adds = (props: any) => {
e
.
target
.
value
=
keyup_tool
(
e
.
target
.
value
);
};
// 上传按钮
const
uploadButton
=
(
<
div
>
<
PlusOutlined
/>
<
div
style=
{
{
marginTop
:
8
}
}
>
Upload
</
div
>
</
div
>
);
return
(
<>
<
Spin
spinning=
{
loading
}
tip=
"loading..."
size=
"large"
>
<
div
className=
"form"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
{
Data
?
'edit'
:
'
establish
'
}
community
{
Data
?
'edit'
:
'
Create New
'
}
community
<
div
className=
"back"
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
...
...
@@ -363,7 +365,7 @@ const Adds = (props: any) => {
</
Form
.
Item
>
<
Form
.
Item
label=
"Administrator
s
"
label=
"Administrator"
name=
"residentialManagerUserName"
rules=
{
village
[
6
]
as
any
}
>
...
...
@@ -393,54 +395,64 @@ const Adds = (props: any) => {
<
hr
/>
{
/* 上传部分 */
}
<
Form
.
Item
label=
"
Louba
Timetable"
label=
"
Shuttle Bus
Timetable"
name=
"balouscheduleFile"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Upload
{
...
uploads
}
{
...
upload1
}
fileList=
{
loubaUpload
}
showUploadList=
{
false
}
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
<
Upload
{
...
uploads
}
{
...
upload1
}
fileList=
{
loubaUpload
}
listType=
"picture-card"
disabled=
{
codename
==
''
?
true
:
false
}
>
{
loubaUpload
.
length
>=
1
?
null
:
uploadButton
}
</
Upload
>
<
div
className=
"tip"
>
<
p
className=
{
loubaUpload
.
length
>
0
?
'show'
:
''
}
>
<
LinkOutlined
color=
"#409EFF"
/>
{
loubaUpload
.
length
>
0
?
loubaUpload
[
0
].
name
:
''
}
</
p
>
<
span
>
Support Files:.jpg, .png, .pdf
</
span
>
</
div
>
</
Form
.
Item
>
{
/* 上传部分 */
}
<
Form
.
Item
label=
"Property Guide"
name=
"serviceGuideFile"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Upload
{
...
uploads
}
{
...
upload2
}
fileList=
{
guideUpload
}
showUploadList=
{
false
}
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
<
Upload
{
...
uploads
}
{
...
upload2
}
fileList=
{
guideUpload
}
listType=
"picture-card"
disabled=
{
codename
==
''
?
true
:
false
}
>
{
guideUpload
.
length
>=
1
?
null
:
uploadButton
}
</
Upload
>
<
div
className=
"tip"
>
<
p
className=
{
guideUpload
.
length
>
0
?
'show'
:
''
}
>
<
LinkOutlined
color=
"#409EFF"
/>
{
guideUpload
.
length
>
0
?
guideUpload
[
0
].
name
:
''
}
</
p
>
<
span
>
Support Files:.jpg, .png, .pdf
</
span
>
</
div
>
</
Form
.
Item
>
{
/* 上传部分 */
}
<
Form
.
Item
label=
"
Period Of
Service"
label=
"
Warranty Period
Service"
name=
"lifeServiceFile"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Upload
{
...
uploads
}
{
...
upload3
}
fileList=
{
periodUpload
}
showUploadList=
{
false
}
>
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
<
Upload
{
...
uploads
}
{
...
upload3
}
fileList=
{
periodUpload
}
listType=
"picture-card"
disabled=
{
codename
==
''
?
true
:
false
}
>
{
periodUpload
.
length
>=
1
?
null
:
uploadButton
}
</
Upload
>
<
div
className=
"tip"
>
<
p
className=
{
periodUpload
.
length
>
0
?
'show'
:
''
}
>
<
LinkOutlined
color=
"#409EFF"
/>
{
periodUpload
.
length
>
0
?
periodUpload
[
0
].
name
:
''
}
</
p
>
<
span
>
Support Files:.jpg, .png, .pdf
</
span
>
</
div
>
</
Form
.
Item
>
<
hr
/>
{
/* 帮助中心 */
}
<
Form
.
Item
label=
"Help Center"
name=
"help"
>
<
Input
.
Group
compact
>
...
...
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
1421fe2b
...
...
@@ -169,7 +169,7 @@ const CellLists = (props: any) => {
toolBarRender=
{
()
=>
[
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToAdd
}
>
<
PlusOutlined
/>
Create
n
ew Community
Create
N
ew Community
</
Button
>,
]
}
options=
{
{
...
...
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