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
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> {
...
@@ -61,7 +61,7 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
<
Menu
.
Item
key=
"logout"
>
<
Menu
.
Item
key=
"logout"
>
<
LogoutOutlined
/>
<
LogoutOutlined
/>
退出登录
Sign Out
</
Menu
.
Item
>
</
Menu
.
Item
>
</
Menu
>
</
Menu
>
);
);
...
@@ -73,16 +73,16 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
...
@@ -73,16 +73,16 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
</
span
>
</
span
>
</
HeaderDropdown
>
</
HeaderDropdown
>
)
:
(
)
:
(
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Spin
<
Spin
size=
"small"
size=
"small"
style=
{
{
style=
{
{
marginLeft
:
8
,
marginLeft
:
8
,
marginRight
:
8
,
marginRight
:
8
,
}
}
}
}
/>
/>
</
span
>
</
span
>
);
);
}
}
}
}
...
...
src/components/SelectOptions/index.jsx
View file @
1421fe2b
...
@@ -138,15 +138,15 @@ class SelectOptions extends React.PureComponent {
...
@@ -138,15 +138,15 @@ class SelectOptions extends React.PureComponent {
});
});
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
selectoptionsOpen
:
'
Open
'
,
selectoptionsOpen
:
'
Collapse
'
,
selectoptionsPutItAway
:
'
Put It Away
'
,
selectoptionsPutItAway
:
'
Close
'
,
selectoptionsSelected
:
'Selected'
,
selectoptionsSelected
:
'Selected'
,
selectoptionsSelectAll
:
'Select All'
,
selectoptionsSelectAll
:
'Select All'
,
selectoptionsSelectNone
:
'Unselect All'
,
selectoptionsSelectNone
:
'Unselect All'
,
selectoptionsAll
:
'All'
,
selectoptionsAll
:
'All'
,
selectoptionsSearchCell
:
'Search cell'
,
selectoptionsSearchCell
:
'Search cell'
,
selectoptionsAllCell
:
'
All Ce
ll'
,
selectoptionsAllCell
:
'
A
ll'
,
componetVisible
:
'
Put It Away
'
,
componetVisible
:
'
Close
'
,
});
});
}
}
// console.log("初始化2")
// console.log("初始化2")
...
...
src/components/ShowOptions/index.jsx
View file @
1421fe2b
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Table
,
Tag
,
Space
,
Button
,
Radio
,
Row
,
Col
,
Input
,
Checkbox
}
from
'antd'
;
import
{
Table
,
Tag
,
Space
,
Button
,
Radio
,
Row
,
Col
,
Input
,
Checkbox
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
{
connect
}
from
'dva'
;
import
{
gray
}
from
'chalk'
;
import
{
gray
}
from
'chalk'
;
...
@@ -7,197 +7,252 @@ import { gray } from 'chalk';
...
@@ -7,197 +7,252 @@ import { gray } from 'chalk';
import
{
StarOutlined
,
StarFilled
,
StarTwoTone
}
from
'@ant-design/icons'
;
import
{
StarOutlined
,
StarFilled
,
StarTwoTone
}
from
'@ant-design/icons'
;
import
{
indexOf
}
from
'lodash'
;
import
{
indexOf
}
from
'lodash'
;
import
{
useIntl
,
getLocale
}
from
'umi'
;
import
{
useIntl
,
getLocale
}
from
'umi'
;
import
{
import
{
DownOutlined
,
UpOutlined
}
from
'@ant-design/icons'
;
DownOutlined
,
var
ArrayToPingYin
=
require
(
'./ArrayToPingYin'
);
UpOutlined
,
}
from
'@ant-design/icons'
;
var
ArrayToPingYin
=
require
(
'./ArrayToPingYin'
);
const
CheckboxGroup
=
Checkbox
.
Group
;
const
CheckboxGroup
=
Checkbox
.
Group
;
const
menuListNormal
=
[
"A"
,
"B"
,
"C"
,
"D"
,
"E"
,
"F"
,
"G"
,
"H"
,
"I"
,
"J"
,
"K"
,
"L"
,
"M"
,
"N"
,
"O"
,
"P"
,
"Q"
,
"R"
,
"S"
,
"T"
,
"U"
,
"V"
,
"W"
,
"X"
,
"Y"
,
"Z"
]
const
menuListNormal
=
[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
,
];
function
getDotText
(
arr
)
{
function
getDotText
(
arr
)
{
if
(
arr
){
if
(
arr
)
{
var
str
=
""
;
var
str
=
''
;
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
str
+=
arr
[
i
]
+
","
;
str
+=
arr
[
i
]
+
','
;
}
if
(
str
.
length
>
0
)
{
str
=
str
.
substr
(
0
,
str
.
length
-
1
);
}
return
str
;
}
}
if
(
str
.
length
>
0
)
{
str
=
str
.
substr
(
0
,
str
.
length
-
1
);
}
return
str
;
}
}
}
class
ShowOptions
extends
React
.
Component
{
class
ShowOptions
extends
React
.
Component
{
state
=
{};
state
=
{
componentDidMount
()
{
var
name
=
getLocale
();
};
//console.log(name)
componentDidMount
(){
if
(
name
==
'zh-CN'
)
{
var
name
=
getLocale
();
this
.
setState
({
//console.log(name)
selectoptionsOpen
:
'展开'
,
if
(
name
==
"zh-CN"
){
selectoptionsPutItAway
:
'收起'
,
this
.
setState
({
selectoptionsSelected
:
'已选'
,
selectoptionsOpen
:
'展开'
,
selectoptionsSelectAll
:
'全选'
,
selectoptionsPutItAway
:
'收起'
,
selectoptionsSelectNone
:
'全不选'
,
selectoptionsSelected
:
'已选'
,
selectoptionsAll
:
'所有'
,
selectoptionsSelectAll
:
'全选'
,
selectoptionsSearchCell
:
'搜索小区'
,
selectoptionsSelectNone
:
'全不选'
,
selectoptionsAllCell
:
'全部小区'
,
selectoptionsAll
:
'所有'
,
componetVisible
:
'收起'
,
selectoptionsSearchCell
:
'搜索小区'
,
});
selectoptionsAllCell
:
'全部小区'
,
}
else
{
componetVisible
:
'收起'
,
this
.
setState
({
})
selectoptionsOpen
:
'Open'
,
}
else
{
selectoptionsPutItAway
:
'Put It Away'
,
this
.
setState
({
selectoptionsSelected
:
'Selected'
,
selectoptionsOpen
:
'Open'
,
selectoptionsSelectAll
:
'Select All'
,
selectoptionsPutItAway
:
'Put It Away'
,
selectoptionsSelectNone
:
'Unselect All'
,
selectoptionsSelected
:
'Selected'
,
selectoptionsAll
:
'All'
,
selectoptionsSelectAll
:
'Select All'
,
selectoptionsSearchCell
:
'Search cell'
,
selectoptionsSelectNone
:
'Unselect All'
,
selectoptionsAllCell
:
'All Cell'
,
selectoptionsAll
:
'All'
,
componetVisible
:
'Put It Away'
,
selectoptionsSearchCell
:
'Search cell'
,
});
selectoptionsAllCell
:
'All Cell'
,
componetVisible
:
'Put It Away'
,
})
}
};
constructor
(
props
)
{
super
(
props
);
const
{
list
,
dispatch
,
defaultValue
}
=
this
.
props
;
if
(
list
==
null
){
console
.
error
(
"组件错误:没有数据导入"
)
}
else
{
// console.log("显示组件")
// console.log(list)
}
this
.
state
=
{
selectoptionsOpen
:
'Open'
,
selectoptionsPutItAway
:
'Put It Away'
,
selectoptionsSelected
:
'Selected'
,
selectoptionsSelectNone
:
'Select None'
,
selectoptionsAll
:
'All'
,
selectoptionsSearchCell
:
'Search cell'
,
menuList
:
ArrayToPingYin
.
get
(
list
),
componetVisible
:
'Open'
,
checkedListOptions
:
list
,
checkedList
:
list
,
indeterminate
:
false
,
checkAll
:
true
,
checkNone
:
false
,
resultList
:
list
,
};
}
}
}
constructor
(
props
)
{
super
(
props
);
const
{
list
,
dispatch
,
defaultValue
}
=
this
.
props
;
if
(
list
==
null
)
{
console
.
error
(
'组件错误:没有数据导入'
);
}
else
{
// console.log("显示组件")
// console.log(list)
}
this
.
state
=
{
selectoptionsOpen
:
'Open'
,
selectoptionsPutItAway
:
'Put It Away'
,
selectoptionsSelected
:
'Selected'
,
selectoptionsSelectNone
:
'Select None'
,
selectoptionsAll
:
'All'
,
selectoptionsSearchCell
:
'Search cell'
,
hideAndexpand
=
()
=>
{
menuList
:
ArrayToPingYin
.
get
(
list
),
if
(
this
.
state
.
componetVisible
==
this
.
state
.
selectoptionsOpen
){
componetVisible
:
'Open'
,
this
.
setState
({
componetVisible
:
this
.
state
.
selectoptionsPutItAway
})
checkedListOptions
:
list
,
}
else
{
checkedList
:
list
,
this
.
setState
({
componetVisible
:
this
.
state
.
selectoptionsOpen
})
indeterminate
:
false
,
}
checkAll
:
true
,
checkNone
:
false
,
resultList
:
list
,
};
};
}
hideAndexpand
=
()
=>
{
if
(
this
.
state
.
componetVisible
==
this
.
state
.
selectoptionsOpen
)
{
this
.
setState
({
componetVisible
:
this
.
state
.
selectoptionsPutItAway
});
}
else
{
this
.
setState
({
componetVisible
:
this
.
state
.
selectoptionsOpen
});
}
};
itemSelectAll
=
(
e
)
=>
{
itemSelectAll
=
(
e
)
=>
{
this
.
setState
({
this
.
setState
({
checkedListOptions
:
this
.
props
.
list
,
checkedListOptions
:
this
.
props
.
list
,
checkedList
:
this
.
state
.
resultList
,
checkedList
:
this
.
state
.
resultList
,
});
});
}
};
itemSelect
=
(
item
,
e
)
=>
{
itemSelect
=
(
item
,
e
)
=>
{
var
arraylist
=
this
.
props
.
list
var
arraylist
=
this
.
props
.
list
;
var
array
=
ArrayToPingYin
.
get
(
this
.
props
.
list
)
var
array
=
ArrayToPingYin
.
get
(
this
.
props
.
list
);
var
tempAarry
=
new
Array
();
var
tempAarry
=
new
Array
();
if
(
array
){
if
(
array
)
{
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
array
[
i
]
==
item
){
if
(
array
[
i
]
==
item
)
{
tempAarry
.
push
(
arraylist
[
i
]);
tempAarry
.
push
(
arraylist
[
i
]);
}
}
}
}
this
.
setState
({
}
checkedListOptions
:
tempAarry
,
}
checkedList
:
tempAarry
,
this
.
setState
({
});
checkedListOptions
:
tempAarry
,
};
checkedList
:
tempAarry
,
});
getSearchValue
=
(
item
,
e
)
=>
{
};
var
list
=
this
.
props
.
list
var
tempAarry
=
new
Array
()
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
){
if
((
list
[
i
].
toLowerCase
()).
indexOf
(
item
.
toLowerCase
())
!=-
1
){
tempAarry
.
push
(
list
[
i
]);
}
}
this
.
setState
({
checkedList
:
tempAarry
})
getSearchValue
=
(
item
,
e
)
=>
{
var
list
=
this
.
props
.
list
;
};
var
tempAarry
=
new
Array
();
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
toLowerCase
().
indexOf
(
item
.
toLowerCase
())
!=
-
1
)
{
tempAarry
.
push
(
list
[
i
]);
}
}
this
.
setState
({
checkedList
:
tempAarry
});
};
render
()
{
render
()
{
return
(
return
(
<
div
style=
{
{
minWidth
:
800
,
marginBottom
:
16
}
}
>
<
div
style=
{
{
minWidth
:
800
,
marginBottom
:
16
}
}
>
{
{
this
.
state
.
componetVisible
==
this
.
state
.
selectoptionsOpen
?
(
this
.
state
.
componetVisible
==
this
.
state
.
selectoptionsOpen
?
<
div
style=
{
{
width
:
'100%'
,
height
:
48
,
position
:
'relative'
}
}
>
<
div
style=
{
{
width
:
"100%"
,
height
:
48
,
position
:
"relative"
}
}
>
<
div
style=
{
{
position
:
'absolute'
,
left
:
5
,
top
:
5
}
}
>
<
div
style=
{
{
position
:
"absolute"
,
left
:
5
,
top
:
5
}
}
>
{
this
.
state
.
selectoptionsSelected
}
...
</
div
>
{
this
.
state
.
selectoptionsSelected
}
...
<
div
style=
{
{
position
:
"absolute"
,
right
:
16
,
top
:
5
,
cursor
:
"pointer"
}
}
onClick=
{
()
=>
this
.
hideAndexpand
()
}
>
{
this
.
state
.
componetVisible
}
<
DownOutlined
/></
div
>
</
div
>
</
div
>
<
div
:
style=
{
{
position
:
'absolute'
,
right
:
16
,
top
:
5
,
cursor
:
'pointer'
}
}
<
div
style=
{
{
width
:
"100%"
,
backgroundColor
:
"#eeeeee"
}
}
>
onClick=
{
()
=>
this
.
hideAndexpand
()
}
<
div
style=
{
{
width
:
"100%"
,
height
:
48
,
position
:
"relative"
}
}
>
>
<
div
style=
{
{
position
:
"absolute"
,
left
:
5
,
top
:
5
}
}
>
{
this
.
state
.
resultList
.
length
==
0
?
this
.
state
.
selectoptionsSelectNone
:(
this
.
state
.
selectoptionsSelected
+
" "
+
this
.
state
.
resultList
.
length
)
}
</
div
>
{
this
.
state
.
componetVisible
}
<
div
style=
{
{
position
:
"absolute"
,
right
:
16
,
top
:
5
,
cursor
:
"pointer"
}
}
onClick=
{
()
=>
this
.
hideAndexpand
()
}
>
{
this
.
state
.
componetVisible
}
<
UpOutlined
/></
div
>
<
DownOutlined
/>
</
div
>
</
div
>
<
div
style=
{
{
width
:
"100%"
,
backgroundColor
:
"#eeeeee"
,
userSelect
:
"none"
}
}
>
</
div
>
<
div
style=
{
{
width
:
"100%"
,
height
:
40
,
position
:
"relative"
}
}
>
)
:
(
<
div
style=
{
{
fontSize
:
14
,
position
:
"absolute"
}
}
>
<
div
style=
{
{
width
:
'100%'
,
backgroundColor
:
'#eeeeee'
}
}
>
<
a
style=
{
{
marginLeft
:
16
}
}
onClick=
{
this
.
itemSelectAll
.
bind
(
this
)
}
>
{
this
.
state
.
selectoptionsAll
}
</
a
>
<
div
style=
{
{
width
:
'100%'
,
height
:
48
,
position
:
'relative'
}
}
>
{
<
div
style=
{
{
position
:
'absolute'
,
left
:
5
,
top
:
5
}
}
>
menuListNormal
.
map
((
item
,
index
)
=>
{
{
this
.
state
.
resultList
.
length
==
0
if
(
this
.
state
.
menuList
.
indexOf
(
item
)
>-
1
){
?
this
.
state
.
selectoptionsSelectNone
return
(<
a
key=
{
item
}
style=
{
{
marginLeft
:
10
,
userSelect
:
"none"
}
}
onClick=
{
this
.
itemSelect
.
bind
(
this
,
item
)
}
>
{
item
}
</
a
>)
:
this
.
state
.
selectoptionsSelected
+
' '
+
this
.
state
.
resultList
.
length
}
}
else
{
</
div
>
return
(<
a
key=
{
item
}
style=
{
{
marginLeft
:
10
,
userSelect
:
"none"
}
}
disabled
>
{
item
}
</
a
>)
<
div
}
style=
{
{
position
:
'absolute'
,
right
:
16
,
top
:
5
,
cursor
:
'pointer'
}
}
})
onClick=
{
()
=>
this
.
hideAndexpand
()
}
}
>
</
div
>
{
this
.
state
.
componetVisible
}
<
UpOutlined
/>
</
div
>
</
div
>
<
div
style=
{
{
width
:
"100%"
,
paddingLeft
:
16
,
paddingRight
:
16
}
}
>
</
div
>
<
div
style=
{
{
width
:
"100%"
,
backgroundColor
:
"#ffffff"
,
border
:
"1px solid #cfcfcf"
,
padding
:
5
}
}
>
<
div
style=
{
{
width
:
'100%'
,
backgroundColor
:
'#eeeeee'
,
userSelect
:
'none'
}
}
>
<
div
style=
{
{
width
:
'100%'
,
height
:
40
,
position
:
'relative'
}
}
>
<
Input
.
Search
placeholder=
{
this
.
state
.
selectoptionsSearchCell
}
onSearch=
{
this
.
getSearchValue
.
bind
(
this
)
}
style=
{
{
width
:
200
,
margin
:
16
}
}
/>
<
div
style=
{
{
fontSize
:
14
,
position
:
'absolute'
}
}
>
<
div
><
h1
>
</
h1
></
div
>
<
a
style=
{
{
marginLeft
:
16
}
}
onClick=
{
this
.
itemSelectAll
.
bind
(
this
)
}
>
<
div
style=
{
{
margin
:
16
}
}
>
{
this
.
state
.
selectoptionsAll
}
{
(
this
.
state
.
checkedList
).
map
((
tag
,
index
)
=>
{
</
a
>
return
(
{
menuListNormal
.
map
((
item
,
index
)
=>
{
<
Tag
color=
"blue"
key=
{
"Tag_"
+
index
}
>
{
tag
}
</
Tag
>
if
(
this
.
state
.
menuList
.
indexOf
(
item
)
>
-
1
)
{
);
return
(
})
}
<
a
</
div
>
key=
{
item
}
<
div
><
h1
>
</
h1
></
div
>
style=
{
{
marginLeft
:
10
,
userSelect
:
'none'
}
}
</
div
>
onClick=
{
this
.
itemSelect
.
bind
(
this
,
item
)
}
</
div
>
>
<
br
/>
{
item
}
</
div
>
</
a
>
</
div
>
);
}
}
else
{
return
(
<
a
key=
{
item
}
style=
{
{
marginLeft
:
10
,
userSelect
:
'none'
}
}
disabled
>
{
item
}
</
a
>
);
}
})
}
</
div
>
</
div
>
<
div
style=
{
{
width
:
'100%'
,
paddingLeft
:
16
,
paddingRight
:
16
}
}
>
<
div
style=
{
{
width
:
'100%'
,
backgroundColor
:
'#ffffff'
,
border
:
'1px solid #cfcfcf'
,
padding
:
5
,
}
}
>
<
Input
.
Search
placeholder=
{
this
.
state
.
selectoptionsSearchCell
}
onSearch=
{
this
.
getSearchValue
.
bind
(
this
)
}
style=
{
{
width
:
200
,
margin
:
16
}
}
/>
<
div
>
<
h1
>
</
h1
>
</
div
>
<
div
style=
{
{
margin
:
16
}
}
>
{
this
.
state
.
checkedList
.
map
((
tag
,
index
)
=>
{
return
(
<
Tag
color=
"blue"
key=
{
'Tag_'
+
index
}
>
{
tag
}
</
Tag
>
);
})
}
</
div
>
<
div
>
<
h1
>
</
h1
>
</
div
>
</
div
>
</
div
>
<
br
/>
</
div
>
</
div
>
)
}
</
div
>
</
div
>
);
);
}
}
}
};
export
default
ShowOptions
;
export
default
ShowOptions
;
\ No newline at end of file
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
1421fe2b
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
connect
}
from
'dva'
;
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
{
Form
,
Input
,
Button
,
TimePicker
,
Checkbox
,
Upload
,
message
,
Spin
}
from
'antd'
;
// 样式
// 样式
import
'./celllist.less'
;
import
'./celllist.less'
;
...
@@ -10,6 +16,7 @@ import { village } from '@/utils/tip';
...
@@ -10,6 +16,7 @@ import { village } from '@/utils/tip';
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
imgs
from
'@/assets/logo_icon_bg.png'
;
const
{
RangePicker
}
=
TimePicker
;
const
{
RangePicker
}
=
TimePicker
;
...
@@ -90,11 +97,11 @@ const Adds = (props: any) => {
...
@@ -90,11 +97,11 @@ const Adds = (props: any) => {
},
[
Data
]);
},
[
Data
]);
// 返回上传格式 和 地址
// 返回上传格式 和 地址
function
backUpload
(
str
:
string
,
index
:
number
)
{
function
backUpload
(
str
:
string
,
index
:
number
,
url
?:
any
)
{
let
a
=
{
let
a
=
{
uid
:
str
+
index
,
uid
:
str
+
index
,
name
:
str
,
name
:
str
,
url
:
'http://'
,
url
:
url
?
url
:
imgs
,
};
};
return
a
;
return
a
;
}
}
...
@@ -109,63 +116,50 @@ const Adds = (props: any) => {
...
@@ -109,63 +116,50 @@ const Adds = (props: any) => {
// 楼巴上传
// 楼巴上传
const
upload1
=
{
const
upload1
=
{
onChange
(
info
:
any
)
{
onChange
({
file
,
fileList
}:
any
)
{
if
(
codename
!==
''
)
{
console
.
log
(
file
);
let
po
=
new
Array
();
console
.
log
(
fileList
);
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
if
(
file
.
status
===
'done'
)
{
// 给楼巴上传列表值
setLouba
(
fileList
);
console
.
log
(
po
);
setLouba
(
po
);
setcodeStrat
(
true
);
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
// 结果
uploadMsg
(
info
);
}
else
{
message
.
warning
(
'Please Fill In The Community Name'
);
}
}
// 结果
uploadMsg
(
file
);
},
},
};
};
// 指南上传
// 指南上传
const
upload2
=
{
const
upload2
=
{
onChange
(
info
:
any
)
{
onChange
({
file
,
fileList
}:
any
)
{
if
(
codename
!==
''
)
{
if
(
file
.
status
===
'done'
)
{
let
po
=
new
Array
();
setGuide
(
fileList
);
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
// 给楼巴上传列表值
setGuide
(
po
);
setcodeStrat
(
true
);
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
// 结果
uploadMsg
(
info
);
}
else
{
message
.
warning
(
'Please Fill In The Community Name'
);
}
}
// 结果
uploadMsg
(
file
);
},
},
};
};
// 保质期上传
// 保质期上传
const
upload3
=
{
const
upload3
=
{
onChange
(
info
:
any
)
{
onChange
({
file
,
fileList
}:
any
)
{
if
(
codename
!==
''
)
{
if
(
file
.
status
===
'done'
)
{
let
po
=
new
Array
();
setPeriod
(
fileList
);
po
.
push
(
info
.
fileList
[
info
.
fileList
.
length
-
1
]);
// 给楼巴上传列表值 以及禁止修改小区名
setPeriod
(
po
);
setcodeStrat
(
true
);
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
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
)
{
function
uploadMsg
(
file
:
any
)
{
if
(
info
.
file
.
status
===
'done'
)
{
if
(
file
.
status
===
'done'
)
{
message
.
success
(
`
${
info
.
file
.
name
}
File Uploaded Successfully`
);
message
.
success
(
`
${
file
.
name
}
File Uploaded Successfully`
);
}
else
if
(
info
.
file
.
status
===
'error'
)
{
}
else
if
(
file
.
status
===
'error'
)
{
message
.
error
(
`
${
info
.
file
.
name
}
File Upload Failed.`
);
message
.
error
(
`
${
file
.
name
}
File Upload Failed.`
);
}
}
}
}
...
@@ -263,7 +257,7 @@ const Adds = (props: any) => {
...
@@ -263,7 +257,7 @@ const Adds = (props: any) => {
};
};
// 小区名输入监听ant
// 小区名输入监听ant
function
insdInp
(
value
:
string
,
prevValue
,
prevValues
)
{
function
insdInp
(
value
:
string
)
{
setCodeName
(
value
);
setCodeName
(
value
);
return
value
;
return
value
;
}
}
...
@@ -278,13 +272,21 @@ const Adds = (props: any) => {
...
@@ -278,13 +272,21 @@ const Adds = (props: any) => {
e
.
target
.
value
=
keyup_tool
(
e
.
target
.
value
);
e
.
target
.
value
=
keyup_tool
(
e
.
target
.
value
);
};
};
// 上传按钮
const
uploadButton
=
(
<
div
>
<
PlusOutlined
/>
<
div
style=
{
{
marginTop
:
8
}
}
>
Upload
</
div
>
</
div
>
);
return
(
return
(
<>
<>
<
Spin
spinning=
{
loading
}
tip=
"loading..."
size=
"large"
>
<
Spin
spinning=
{
loading
}
tip=
"loading..."
size=
"large"
>
<
div
className=
"form"
>
<
div
className=
"form"
>
<
h3
className=
"capi"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
<
EditOutlined
/>
{
Data
?
'edit'
:
'
establish
'
}
community
{
Data
?
'edit'
:
'
Create New
'
}
community
<
div
className=
"back"
>
<
div
className=
"back"
>
<
Button
onClick=
{
goToReturn
}
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
<
LeftOutlined
/>
...
@@ -363,7 +365,7 @@ const Adds = (props: any) => {
...
@@ -363,7 +365,7 @@ const Adds = (props: any) => {
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
label=
"Administrator
s
"
label=
"Administrator"
name=
"residentialManagerUserName"
name=
"residentialManagerUserName"
rules=
{
village
[
6
]
as
any
}
rules=
{
village
[
6
]
as
any
}
>
>
...
@@ -393,54 +395,64 @@ const Adds = (props: any) => {
...
@@ -393,54 +395,64 @@ const Adds = (props: any) => {
<
hr
/>
<
hr
/>
{
/* 上传部分 */
}
{
/* 上传部分 */
}
<
Form
.
Item
<
Form
.
Item
label=
"
Louba
Timetable"
label=
"
Shuttle Bus
Timetable"
name=
"balouscheduleFile"
name=
"balouscheduleFile"
style=
{
{
marginBottom
:
'0'
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
>
<
Upload
{
...
uploads
}
{
...
upload1
}
fileList=
{
loubaUpload
}
showUploadList=
{
false
}
>
<
Upload
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
{
...
uploads
}
{
...
upload1
}
fileList=
{
loubaUpload
}
listType=
"picture-card"
disabled=
{
codename
==
''
?
true
:
false
}
>
{
loubaUpload
.
length
>=
1
?
null
:
uploadButton
}
</
Upload
>
</
Upload
>
<
div
className=
"tip"
>
<
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
>
<
span
>
Support Files:.jpg, .png, .pdf
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
{
/* 上传部分 */
}
<
Form
.
Item
label=
"Property Guide"
name=
"serviceGuideFile"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Form
.
Item
label=
"Property Guide"
name=
"serviceGuideFile"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Upload
{
...
uploads
}
{
...
upload2
}
fileList=
{
guideUpload
}
showUploadList=
{
false
}
>
<
Upload
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
{
...
uploads
}
{
...
upload2
}
fileList=
{
guideUpload
}
listType=
"picture-card"
disabled=
{
codename
==
''
?
true
:
false
}
>
{
guideUpload
.
length
>=
1
?
null
:
uploadButton
}
</
Upload
>
</
Upload
>
<
div
className=
"tip"
>
<
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
>
<
span
>
Support Files:.jpg, .png, .pdf
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
{
/* 上传部分 */
}
<
Form
.
Item
<
Form
.
Item
label=
"
Period Of
Service"
label=
"
Warranty Period
Service"
name=
"lifeServiceFile"
name=
"lifeServiceFile"
style=
{
{
marginBottom
:
'0'
}
}
style=
{
{
marginBottom
:
'0'
}
}
>
>
<
Upload
{
...
uploads
}
{
...
upload3
}
fileList=
{
periodUpload
}
showUploadList=
{
false
}
>
<
Upload
<
Button
icon=
{
<
UploadOutlined
/>
}
>
Click to Upload
</
Button
>
{
...
uploads
}
{
...
upload3
}
fileList=
{
periodUpload
}
listType=
"picture-card"
disabled=
{
codename
==
''
?
true
:
false
}
>
{
periodUpload
.
length
>=
1
?
null
:
uploadButton
}
</
Upload
>
</
Upload
>
<
div
className=
"tip"
>
<
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
>
<
span
>
Support Files:.jpg, .png, .pdf
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
<
hr
/>
<
hr
/>
{
/* 帮助中心 */
}
{
/* 帮助中心 */
}
<
Form
.
Item
label=
"Help Center"
name=
"help"
>
<
Form
.
Item
label=
"Help Center"
name=
"help"
>
<
Input
.
Group
compact
>
<
Input
.
Group
compact
>
...
...
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
1421fe2b
...
@@ -169,7 +169,7 @@ const CellLists = (props: any) => {
...
@@ -169,7 +169,7 @@ const CellLists = (props: any) => {
toolBarRender=
{
()
=>
[
toolBarRender=
{
()
=>
[
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToAdd
}
>
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToAdd
}
>
<
PlusOutlined
/>
<
PlusOutlined
/>
Create
n
ew Community
Create
N
ew Community
</
Button
>,
</
Button
>,
]
}
]
}
options=
{
{
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