提交 97053228 authored 作者: zhouhuan's avatar zhouhuan

权利人信息123

上级 de56f060
......@@ -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">
......
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;
......@@ -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,
......
......@@ -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 }));
}
render() {
const { sourceData, isDetail, detailData, editable, disabled } = this.props.obligeeInfo;
console.log(this.props.obligeeInfo);
const { getFieldProps } = this.props.form;
if (isDetail === false) {
};
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 (
<ScrollView >
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title={sourceData.dangShiRenXingMing}
title={item.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>
<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>
</ScrollView >
);
};
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 (
test
);
} else {
return (
......
......@@ -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}
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论