Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
manager-app-sz
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
manager-app-sz
Commits
97053228
提交
97053228
authored
11月 01, 2017
作者:
zhouhuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
权利人信息123
上级
de56f060
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
194 行增加
和
24 行删除
+194
-24
misc.xml
android/.idea/misc.xml
+1
-1
flatListItem.js
src/component/flatListItem.js
+118
-0
ObligeeInfo.js
src/models/houseinfo/ObligeeInfo.js
+6
-2
ObligeeInfo.js
src/routes/main/houseinfo/ObligeeInfo.js
+51
-20
listhouse.js
src/routes/main/houseinfo/listhouse.js
+3
-1
index.js
src/routes/main/index.js
+15
-0
没有找到文件。
android/.idea/misc.xml
浏览文件 @
97053228
...
...
@@ -113,7 +113,7 @@
<ConfirmationsSetting
value=
"0"
id=
"Add"
/>
<ConfirmationsSetting
value=
"0"
id=
"Remove"
/>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_
7
"
default=
"true"
assert-keyword=
"true"
jdk-15=
"true"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_
8
"
default=
"true"
assert-keyword=
"true"
jdk-15=
"true"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
<component
name=
"ProjectType"
>
...
...
src/component/flatListItem.js
0 → 100644
浏览文件 @
97053228
import
React
,
{
PureComponent
}
from
'react'
;
import
{
TouchableOpacity
,
Text
,
View
,
StyleSheet
,
Dimensions
,
Image
}
from
'react-native'
;
import
{
Card
,
WingBlank
,
WhiteSpace
}
from
'antd-mobile'
;
const
totalWidth
=
Dimensions
.
get
(
'window'
).
width
;
class
FlatListItem
extends
PureComponent
{
onPress
=
()
=>
{
this
.
props
.
onPressItem
(
this
.
props
.
item
.
id
);
};
render
()
{
return
(
<
TouchableOpacity
{...
this
.
props
}
style
=
{{
height
:
120
}}
onPress
=
{
this
.
onPress
}
>
<
WingBlank
size
=
"lg"
>
<
WhiteSpace
size
=
"lg"
/>
<
Card
>
<
Card
.
Header
title
=
{
this
.
props
.
item
.
fangWuZuoLuo
}
extra
=
{
<
Text
style
=
{
Styles
.
cardText
}
>&
gt
;
&
gt
;
详情
<
/Text>
}
/>
<
Card
.
Body
>
<
Text
style
=
{
Styles
.
cardBodyText
}
>
编号
:
<
Text
style
=
{
Styles
.
cardBodyText2
}
>
{
this
.
props
.
item
.
fwBianMa
}
<
/Text></
Text
>
<
Text
style
=
{
Styles
.
cardBodyText
}
>
面积
:
<
Text
style
=
{
Styles
.
cardBodyText2
}
>
350502199210236034
<
/Text></
Text
>
<
Text
style
=
{
Styles
.
cardBodyText
}
>
产权人
:
<
Text
style
=
{
Styles
.
cardBodyText2
}
>
户主
<
/Text></
Text
>
<
/Card.Body
>
<
/Card
>
<
WhiteSpace
size
=
"lg"
/>
<
/WingBlank
>
<
/TouchableOpacity
>
);
}
}
const
Styles
=
StyleSheet
.
create
({
row
:
{
height
:
60
,
borderBottomWidth
:
1
,
borderBottomColor
:
'#ccc'
,
flexDirection
:
'row'
,
alignItems
:
'center'
,
},
part
:
{
marginLeft
:
5
,
flex
:
1
,
},
unColor
:
{
color
:
'#575656'
,
marginTop
:
8
,
fontSize
:
12
,
},
link
:
{
color
:
'#1BB7FF'
,
marginTop
:
2
,
},
ScrollView
:
{
flex
:
1
,
},
container
:
{
flex
:
1
,
marginLeft
:
10
,
marginRight
:
10
,
flexDirection
:
'column'
,
backgroundColor
:
'white'
,
},
nm
:
{
color
:
'#333'
,
fontSize
:
12
,
},
nm1
:
{
color
:
'#333'
,
fontSize
:
12
,
marginLeft
:
30
,
},
nameView
:
{
paddingTop
:
2
,
flexDirection
:
'row'
,
alignItems
:
'flex-start'
,
marginLeft
:
1
,
},
item
:
{
flex
:
1
,
height
:
60
,
width
:
totalWidth
,
padding
:
1
,
borderBottomWidth
:
2
,
borderBottomColor
:
'#ddd'
,
flexDirection
:
'column'
,
alignItems
:
'flex-start'
,
justifyContent
:
'flex-start'
,
},
width50
:
{
marginLeft
:
1
,
marginRight
:
40
,
alignItems
:
'flex-start'
,
justifyContent
:
'flex-start'
,
backgroundColor
:
'white'
,
},
rightIcon
:
{
position
:
'absolute'
,
right
:
-
2
,
top
:
-
30
,
height
:
15
,
width
:
15
,
},
cardText
:
{
color
:
'#2196F3'
,
textAlign
:
'right'
,
},
cardBodyText
:
{
marginBottom
:
10
,
marginLeft
:
13
,
},
});
export
default
FlatListItem
;
src/models/houseinfo/ObligeeInfo.js
浏览文件 @
97053228
...
...
@@ -17,7 +17,7 @@ export default {
},
effects
:
{
*
getObligeeInfo
({
payload
},
{
put
,
call
,
select
})
{
if
(
payload
===
'clear'
)
{
if
(
payload
.
type
===
'clear'
)
{
yield
put
({
type
:
'clearList'
,
payload
:
{}
});
}
const
{
sourceData
}
=
yield
select
(
state
=>
state
.
obligeeInfo
);
...
...
@@ -27,7 +27,7 @@ export default {
containerName
:
'query-DSRInfo'
,
datasourceName
:
'QueryDSRInfoTable'
,
};
const
result
=
yield
call
(
getData
,
coordinate
,
{
pst
:
size
,
psz
:
10
,
params
:
{
pID
:
payload
}
});
const
result
=
yield
call
(
getData
,
coordinate
,
{
pst
:
size
,
psz
:
10
,
params
:
{
pID
:
payload
.
id
}
});
const
singularData
=
result
[
0
];
yield
put
({
type
:
'setDSRList'
,
payload
:
{
...
singularData
}
});
},
...
...
@@ -80,6 +80,10 @@ export default {
},
},
reducers
:
{
// 下拉刷新用到的,清空列表的数据
clearList
(
state
)
{
return
{
...
state
,
sourceData
:
{}
};
},
getDSRDetail
(
state
,
{
payload
})
{
return
{
...
state
,
...
...
src/routes/main/houseinfo/ObligeeInfo.js
浏览文件 @
97053228
...
...
@@ -8,11 +8,11 @@ import { Card, WingBlank, WhiteSpace, Button, List, InputItem } from 'antd-mobil
import
{
connect
}
from
'react-redux'
;
import
{
createAction
}
from
'../../../utils'
;
@
connect
(({
obligeeInfo
,
ListHouse
})
=>
({
obligeeInfo
,
ListHouse
}))
@
connect
(({
obligeeInfo
,
ListHouse
,
loading
})
=>
({
obligeeInfo
,
ListHouse
,
loading
:
!!
loading
.
effects
[
'obligeeInfo/getObligeeInfo'
]
}))
class
ObligeeInfo
extends
React
.
Component
{
componentDidMount
()
{
const
{
houseID
}
=
this
.
props
.
ListHouse
;
this
.
props
.
dispatch
(
createAction
(
'obligeeInfo/getObligeeInfo'
)(
houseID
));
this
.
props
.
dispatch
(
createAction
(
'obligeeInfo/getObligeeInfo'
)(
{
id
:
houseID
}
));
}
onPress
=
()
=>
{
const
ID
=
this
.
props
.
obligeeInfo
.
sourceData
.
id
;
...
...
@@ -29,33 +29,64 @@ class ObligeeInfo extends React.Component {
console
.
log
(
'Validation failed'
);
}
});
}
}
;
onEditBack
=
()
=>
{
const
{
houseID
}
=
this
.
props
.
ListHouse
;
this
.
props
.
dispatch
(
createAction
(
'obligeeInfo/onEBack'
)(
houseID
));
}
};
onEndReached
=
()
=>
{
// 以下是制造新数据
if
(
!
this
.
props
.
loading
)
{
const
{
houseID
}
=
this
.
props
.
ListHouse
;
this
.
props
.
dispatch
(
createAction
(
'obligeeInfo/getObligeeInfo'
)({
id
:
houseID
}));
}
};
keyExtractor
=
item
=>
`
${
item
.
id
}
`
;
// 下拉刷新
renderRefresh
=
()
=>
{
if
(
!
this
.
props
.
loading
)
{
const
{
houseID
}
=
this
.
props
.
ListHouse
;
this
.
props
.
dispatch
(
createAction
(
'obligeeInfo/getObligeeInfo'
)({
id
:
houseID
,
type
:
'clear'
}));
}
};
renderItem
=
({
item
})
=>
{
console
.
log
(
item
);
return
(
<
WingBlank
size
=
"lg"
>
<
WhiteSpace
size
=
"lg"
/>
<
Card
>
<
Card
.
Header
title
=
{
item
.
dangShiRenXingMing
}
extra
=
{
<
Text
style
=
{
Styles
.
cardText
}
onPress
=
{
this
.
onPress
}
>&
gt
;
&
gt
;
详情
<
/Text>
}
/>
<
Card
.
Body
>
<
Text
style
=
{
Styles
.
cardBodyText
}
>
当事人编号
:
<
Text
style
=
{
Styles
.
cardBodyText2
}
>
{
item
.
dangShiRenBianHao
}
<
/Text></
Text
>
<
Text
style
=
{
Styles
.
cardBodyText
}
>
证件号码
:
<
Text
style
=
{
Styles
.
cardBodyText2
}
>
{
item
.
dangShiRenIdentityCard
}
<
/Text></
Text
>
<
/Card.Body
>
<
/Card
>
<
WhiteSpace
size
=
"lg"
/>
<
/WingBlank
>
);
};
render
()
{
const
{
sourceData
,
isDetail
,
detailData
,
editable
,
disabled
}
=
this
.
props
.
obligeeInfo
;
console
.
log
(
this
.
props
.
obligeeInfo
);
const
data
=
[
sourceData
];
console
.
log
(
data
);
const
{
getFieldProps
}
=
this
.
props
.
form
;
const
test
=
(
<
FlatList
data
=
{
data
}
renderItem
=
{
this
.
renderItem
}
keyExtractor
=
{
this
.
keyExtractor
}
onEndReachedThreshold
=
{
0.3
}
onEndReached
=
{
this
.
onEndReached
}
refreshing
=
{
this
.
props
.
loading
}
onRefresh
=
{
this
.
renderRefresh
}
/>
)
;
if
(
isDetail
===
false
)
{
return
(
<
ScrollView
>
<
WingBlank
size
=
"lg"
>
<
WhiteSpace
size
=
"lg"
/>
<
Card
>
<
Card
.
Header
title
=
{
sourceData
.
dangShiRenXingMing
}
extra
=
{
<
Text
style
=
{
Styles
.
cardText
}
onPress
=
{
this
.
onPress
}
>&
gt
;
&
gt
;
详情
<
/Text>
}
/>
<
Card
.
Body
>
<
Text
style
=
{
Styles
.
cardBodyText
}
>
当事人编号
:
<
Text
style
=
{
Styles
.
cardBodyText2
}
>
{
sourceData
.
dangShiRenBianHao
}
<
/Text></
Text
>
<
Text
style
=
{
Styles
.
cardBodyText
}
>
证件号码
:
<
Text
style
=
{
Styles
.
cardBodyText2
}
>
{
sourceData
.
dangShiRenIdentityCard
}
<
/Text></
Text
>
<
/Card.Body
>
<
/Card
>
<
WhiteSpace
size
=
"lg"
/>
<
/WingBlank
>
<
/ScrollView
>
test
);
}
else
{
return
(
...
...
src/routes/main/houseinfo/listhouse.js
浏览文件 @
97053228
...
...
@@ -41,7 +41,7 @@ class ListHouContent extends Component {
// 自定义分割线
renderItemSeparatorComponent
=
({
highlighted
})
=>
(
<
View
style
=
{{
height
:
1
,
backgroundColor
:
'#ccc'
}}
><
/View
>
<
View
style
=
{{
height
:
1
,
backgroundColor
:
'#ccc'
}}
/
>
);
// Footer布局
renderFooter
=
()
=>
(
...
...
@@ -82,6 +82,7 @@ class ListHouContent extends Component {
* @private
*/
renderItem
=
({
item
})
=>
{
// console.log(item);
return
(
<
FlatListItem
item
=
{
item
}
...
...
@@ -91,6 +92,7 @@ class ListHouContent extends Component {
};
render
()
{
console
.
log
(
this
.
props
.
ListHouse
);
return
(
<
FlatList
data
=
{
this
.
props
.
ListHouse
.
sourceData
}
...
...
src/routes/main/index.js
浏览文件 @
97053228
...
...
@@ -3,6 +3,7 @@ import { View, Text, Image, StyleSheet } from 'react-native';
import
{
TabNavigator
}
from
'react-navigation'
;
import
userInfoPageScreen
from
'./userinfopage'
;
import
fwInfo
from
'./fwInfo'
;
import
ObligeeInfo
from
'./houseinfo/ObligeeInfo'
;
import
chatsIcon
from
'../../../image/chats-icon.png'
;
import
Empty
from
'../empty'
;
...
...
@@ -49,6 +50,20 @@ const Content = TabNavigator({
),
},
},
RKInfo
:
{
screen
:
ObligeeInfo
,
navigationOptions
:
{
lazy
:
true
,
tabBarLabel
:
'人口信息'
,
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon
:
()
=>
(
<
Image
source
=
{
chatsIcon
}
style
=
{[
styles
.
icon
]}
/
>
),
},
},
UserInfoPageScreen
:
{
screen
:
userInfoPageScreen
,
navigationOptions
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论