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
e05e44e6
Commit
e05e44e6
authored
Nov 05, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi
into final
parents
5d6b38fb
8ca7af94
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
54 deletions
+65
-54
index.jsx
src/components/SelectOptions/index.jsx
+31
-12
TitleSearch.tsx
src/components/TitleSearch/TitleSearch.tsx
+1
-3
CellList.ts
src/models/CommunityManagement/CellList.ts
+2
-0
init.ts
src/models/init.ts
+3
-8
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+1
-1
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+25
-28
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+2
-2
No files found.
src/components/SelectOptions/index.jsx
View file @
e05e44e6
import
React
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Table
,
Tag
,
Space
,
Button
,
Radio
,
Row
,
Col
,
Input
,
Checkbox
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
{
gray
}
from
'chalk'
;
import
{
StarOutlined
,
StarFilled
,
StarTwoTone
,
DownOutlined
,
UpOutlined
}
from
'@ant-design/icons'
;
import
{
StarOutlined
,
StarFilled
,
StarTwoTone
,
DownOutlined
,
UpOutlined
}
from
'@ant-design/icons'
;
import
{
indexOf
}
from
'lodash'
;
import
{
useIntl
,
getLocale
}
from
'umi'
;
...
...
@@ -58,8 +58,9 @@ class SelectOptions extends React.Component {
constructor
(
props
)
{
super
(
props
);
const
{
list
,
dispatch
,
checklist
}
=
this
.
props
;
// console.log(list)
// console.log(checklist)
console
.
log
(
list
);
if
(
list
==
null
)
{
//console.error("组件错误:没有数据导入")
}
...
...
@@ -81,17 +82,16 @@ class SelectOptions extends React.Component {
menuList
:
ArrayToPingYin
.
get
(
list
),
checkedListOptions
:
list
,
checkedList
:
checklist
,
indeterminate
:
list
.
sort
().
toString
()
==
checklist
.
sort
().
toString
()
?
false
:
true
,
// 多选框 总框的 状态
checkAll
:
list
.
sort
().
toString
()
==
checklist
.
sort
().
toString
()
?
true
:
false
,
// 判断传递来的小区是不是全选
indeterminate
:
list
.
sort
().
toString
()
==
checklist
.
sort
().
toString
()
?
false
:
true
,
// 多选框 总框的 状态
checkAll
:
list
.
sort
().
toString
()
==
checklist
.
sort
().
toString
()
?
true
:
false
,
// 判断传递来的小区是不是全选
checkNone
:
false
,
resultList
:
checklist
,
flag
:
false
,
lastValue
:
null
,
};
}
}
componentDidUpdate
()
{
componentDidUpdate
(
prevProps
)
{
if
(
this
.
props
.
show
!=
null
)
{
if
(
this
.
props
.
show
==
this
.
state
.
flag
)
{
console
.
log
(
this
.
props
.
show
);
...
...
@@ -102,6 +102,24 @@ class SelectOptions extends React.Component {
}
console
.
log
(
this
.
state
.
componetVisible
);
}
// console.log(this.props.list);
// console.log(prevProps.list);
// if (this.props.list.length > prevProps.list.length) {
// console.log(this.props.list);
// console.log(prevProps.list);
// // 发生改变重新赋值
// this.setState({
// menuList: ArrayToPingYin.get(this.props.list),
// checkedListOptions: this.props.list,
// checkedList: this.props.list,
// indeterminate: false,
// checkAll: true,
// checkNone: false,
// resultList: this.props.list,
// flag: false,
// lastValue: null,
// });
// }
}
}
componentDidMount
()
{
...
...
@@ -145,6 +163,7 @@ class SelectOptions extends React.Component {
};
// 多选框改变的回调
onChangeValue
=
(
checkedList
)
=>
{
// console.log(checkedList);
if
(
this
.
props
.
single
!=
null
)
{
var
tmp
;
if
(
checkedList
.
length
>
1
)
{
...
...
@@ -187,6 +206,7 @@ class SelectOptions extends React.Component {
};
// 全选
onCheckAllChange
=
(
e
)
=>
{
// console.log(prevProps.list);
this
.
setState
({
checkedList
:
this
.
props
.
list
,
indeterminate
:
false
,
...
...
@@ -209,6 +229,7 @@ class SelectOptions extends React.Component {
};
// 索引 -- 全部点击
itemSelectAll
=
(
e
)
=>
{
console
.
log
(
this
.
props
.
list
);
this
.
setState
({
checkedListOptions
:
this
.
props
.
list
,
checkedList
:
this
.
state
.
resultList
,
...
...
@@ -300,14 +321,12 @@ class SelectOptions extends React.Component {
</
div
>
<
div
style=
{
{
width
:
'100%'
,
backgroundColor
:
'#eeeeee'
,
userSelect
:
'none'
}
}
>
<
div
style=
{
{
width
:
'100%'
,
height
:
30
,
position
:
'relative'
}
}
>
{
/* a-z 索引 */
}
<
div
style=
{
{
fontSize
:
14
,
position
:
'absolute'
}
}
>
<
a
style=
{
{
marginLeft
:
16
}
}
onClick=
{
this
.
itemSelectAll
.
bind
(
this
)
}
>
{
this
.
state
.
selectoptionsAll
}
</
a
>
{
menuListNormal
.
map
((
item
,
index
)
=>
{
if
(
this
.
state
.
menuList
.
indexOf
(
item
)
>
-
1
)
{
return
(
<
a
...
...
@@ -364,8 +383,8 @@ class SelectOptions extends React.Component {
style=
{
{
width
:
200
,
margin
:
'10px'
}
}
/>
<
CheckboxGroup
options=
{
this
.
state
.
checkedListOptions
}
// 所有数组
value=
{
this
.
state
.
checkedList
}
// 选中的数组
options=
{
this
.
state
.
checkedListOptions
}
// 所有数组
value=
{
this
.
state
.
checkedList
}
// 选中的数组
onChange=
{
this
.
onChangeValue
}
style=
{
{
marginLeft
:
10
}
}
/>
...
...
src/components/TitleSearch/TitleSearch.tsx
View file @
e05e44e6
...
...
@@ -52,11 +52,9 @@ const TitleSearch = (props: any) => {
form
.
setFieldsValue
(
defaultValue
);
}
},
[
defaultValue
]);
useEffect
(()
=>
{
// console.log(CommunityList)
useEffect
(()
=>
{
if
(
CommunityList
!=
null
)
{
// console.log("小区数量初始化完毕") OK
var
tmp
=
{};
tmp
[
community
]
=
CommunityList
;
// props.onSubmit(tmp) 禁用 改用组件初始化
...
...
src/models/CommunityManagement/CellList.ts
View file @
e05e44e6
...
...
@@ -65,7 +65,9 @@ export default {
case
24
:
{
let
Data
=
resp
.
data
;
let
CommunityList
=
resp
.
data
.
communityList
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'Init/returnCommunityList'
,
CommunityList
});
}
break
;
case
29
:
// 小区新增编辑
...
...
src/models/init.ts
View file @
e05e44e6
import
*
as
service
from
'../services/Init'
;
import
{
message
}
from
'antd'
;
import
{
routerRedux
}
from
'dva/router'
import
{
routerRedux
}
from
'dva/router'
;
export
default
{
namespace
:
'Init'
,
...
...
@@ -13,19 +13,14 @@ export default {
returnCommunityList
(
state
,
{
CommunityList
})
{
return
{
...
state
,
CommunityList
};
},
},
effects
:
{
//获取
*
tosCommunityget
({
playload
},
{
call
,
put
})
{
*
tosCommunityget
({
playload
},
{
call
,
put
})
{
const
resp
=
yield
call
(
service
.
tosCommunityget
,
playload
);
let
CommunityList
=
resp
.
data
.
communityList
;
yield
put
({
type
:
'returnCommunityList'
,
CommunityList
,
});
yield
put
({
type
:
'returnCommunityList'
,
CommunityList
});
},
},
};
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
e05e44e6
...
...
@@ -219,7 +219,7 @@ const Adds = (props: any) => {
obj
.
propertyFee
=
PropertyFee
;
// 小区信息;
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
obj
.
residentialZipCode
=
`SINGAPORE
${
residentialZipCode
}
`
;
obj
.
residentialZipCode
=
`SINGAPORE
${
residentialZipCode
}
`
;
obj
.
residentialAddress
=
residentialAddress
;
obj
.
residentialName
=
residentialName
;
...
...
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
e05e44e6
...
...
@@ -44,19 +44,17 @@ const CellLists = (props: any) => {
]);
const
{
dispatch
,
Data
,
loading
,
curString
,
village
}
=
props
;
// 翻页数据
function
pagesList
(
name
:
string
,
list
:
any
,
num
:
number
)
{
function
pagesList
(
name
:
string
,
list
:
any
,
num
:
number
)
{
let
msg
=
{
residentialManagerUserName
:
name
?
name
:
''
,
residentialManagerUserName
:
name
?
name
:
''
,
communityNameList
:
list
,
pageNum
:
num
,
}
return
msg
}
;
return
msg
;
}
console
.
log
(
village
.
page
)
// 先请求一次 拿到所有小区列表
useEffect
(()
=>
{
RA
(
24
,
{
communityName
:
''
},
module
,
dispatch
);
...
...
@@ -65,7 +63,7 @@ const CellLists = (props: any) => {
// 监听data请求完毕再请求一次
useEffect
(()
=>
{
if
(
Data
!=
null
)
{
RA
(
48
,
pagesList
(
''
,
Data
.
communityList
,
1
),
module
,
dispatch
);
RA
(
48
,
pagesList
(
''
,
Data
.
communityList
,
1
),
module
,
dispatch
);
}
},
[
Data
]);
...
...
@@ -90,23 +88,22 @@ const CellLists = (props: any) => {
// 点击搜索
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
console
.
log
(
comment
)
;
if
(
comment
.
communityName
.
length
>
0
||
typeof
comment
.
label
!==
'undefined'
)
{
RA
(
48
,
pagesList
(
comment
.
label
,
comment
.
communityName
,
1
),
module
,
dispatch
);
}
else
{
RA
(
48
,
pagesList
(
comment
.
label
,
comment
.
communityName
,
1
),
module
,
dispatch
);
}
else
{
message
.
error
(
'Please Enter And Select A Content To Search!'
);
}
};
// 点击页面属性传参数
const
paginationHandler
=
(
page
:
number
,
pageSize
?:
number
)
=>
{
RA
(
48
,
pagesList
(
''
,
Data
.
communityList
,
page
),
module
,
dispatch
);
RA
(
48
,
pagesList
(
''
,
Data
.
communityList
,
page
),
module
,
dispatch
);
};
// 刷新
const
resetHandler
=
()
=>
{
RA
(
48
,
pagesList
(
''
,
Data
.
communityList
,
1
),
module
,
dispatch
);
RA
(
48
,
pagesList
(
''
,
Data
.
communityList
,
1
),
module
,
dispatch
);
};
return
(
...
...
@@ -145,24 +142,24 @@ const CellLists = (props: any) => {
setting
:
false
,
}
}
headerTitle=
"Community List"
// pagination=
{{
defaultCurrent
:
1,
total
:
Data
.
totalRow
}}
// pagination=
{{
defaultCurrent
:
1,
total
:
Data
.
totalRow
}}
/>
{
village
.
page
?
(
<
div
className=
"pages"
>
<
Pagination
current=
{
village
.
page
.
currentPage
}
total=
{
village
.
page
.
totalRow
}
pageSize=
{
village
.
page
.
curPageSize
}
onChange=
{
paginationHandler
}
/
>
</
div
>
)
:
''
}
<
div
className=
"pages"
>
<
Pagination
current=
{
village
.
page
.
currentPage
}
total=
{
village
.
page
.
totalRow
}
pageSize=
{
village
.
page
.
curPageSize
}
onChange=
{
paginationHandler
}
/>
</
div
>
)
:
(
''
)
}
</>
)
:
(
'暂无数据'
)
}
'暂无数据'
)
}
</
div
>
);
};
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
e05e44e6
...
...
@@ -183,9 +183,9 @@ const FacilityBookings = (props: any) => {
if
(
tab
==
1
)
{
RA
(
9
,
{
userToken
:
token
,
pageNum
:
curString
.
curPage
,
subscribeDate
:
curString
.
subscribeDate
,
status
:
curString
.
status
,
subscribeDate
:
curString
.
subscribeDate
,
pageNum
:
curString
.
curPage
,
communityNameList
:
curString
.
communityNameList
,
});
}
else
{
...
...
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