Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
manager-app-sz
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
manager-app-sz
Commits
ef454f6b
提交
ef454f6b
authored
11月 02, 2017
作者:
zhouhuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
人口
上级
97053228
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
334 行增加
和
5 行删除
+334
-5
misc.xml
android/.idea/misc.xml
+1
-1
peopleInfo.js
src/models/peopleInfo/peopleInfo.js
+122
-0
ObligeeInfo.js
src/routes/main/houseinfo/ObligeeInfo.js
+2
-2
index.js
src/routes/main/index.js
+2
-2
peopelInfo.js
src/routes/main/peopleInfo/peopelInfo.js
+207
-0
没有找到文件。
android/.idea/misc.xml
浏览文件 @
ef454f6b
...
...
@@ -113,7 +113,7 @@
<ConfirmationsSetting
value=
"0"
id=
"Add"
/>
<ConfirmationsSetting
value=
"0"
id=
"Remove"
/>
</component>
<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"
>
<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"
>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
<component
name=
"ProjectType"
>
...
...
src/models/peopleInfo/peopleInfo.js
0 → 100644
浏览文件 @
ef454f6b
/**
* Created by zhouhuan on 2017/10/30.
*/
import
{
Toast
}
from
'antd-mobile'
;
import
{
NavigationActions
}
from
'react-navigation'
;
import
{
getData
}
from
'../../utils/DataTemplate'
;
import
{
datasourceApi
}
from
'../../services/datasource'
;
export
default
{
namespace
:
'peopleInfo'
,
state
:
{
sourceData
:
{},
detailData
:
{},
isDetail
:
false
,
editable
:
false
,
disabled
:
true
,
},
effects
:
{
*
getPeopleInfo
({
payload
},
{
put
,
call
,
select
})
{
if
(
payload
===
'clear'
)
{
yield
put
({
type
:
'clearList'
,
payload
:
{}
});
}
console
.
log
(
'gogogo'
);
const
{
sourceData
}
=
yield
select
(
state
=>
state
.
peopleInfo
);
const
size
=
sourceData
.
length
;
console
.
log
(
size
);
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-RKInfo'
,
datasourceName
:
'QueryRKTable'
,
};
const
result
=
yield
call
(
getData
,
coordinate
,
{
pst
:
size
,
psz
:
10
});
console
.
log
(
result
);
const
singularData
=
result
[
0
];
yield
put
({
type
:
'setDSRList'
,
payload
:
{
...
singularData
}
});
},
*
getPeopleDetail
({
payload
},
{
put
,
call
})
{
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-DSRInfo'
,
datasourceName
:
'QueryDSRInfoDetails'
,
};
const
result
=
yield
call
(
getData
,
coordinate
,
{
params
:
{
pID
:
payload
}
});
console
.
log
(
result
);
yield
put
({
type
:
'getDSRDetail'
,
payload
:
{
...
result
[
0
]
}
});
yield
put
({
type
:
'setDetail'
,
payload
:
true
});
yield
put
({
type
:
'setEdit'
,
payload
:
false
});
},
*
updateDSRDetail
({
payload
},
{
call
,
put
})
{
console
.
log
(
'update'
);
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-DSRInfo'
,
datasourceName
:
'QueryDSRInfoDetails'
,
};
const
api
=
datasourceApi
(
coordinate
);
yield
call
(
api
.
update
,
payload
.
id
,
payload
.
singularData
);
Toast
.
success
(
'修改成功!'
,
1
);
yield
put
(
NavigationActions
.
navigate
({
routeName
:
'peopleInfo'
,
}));
yield
put
({
type
:
'setDisabled'
,
payload
:
true
});
yield
put
({
type
:
'setDetail'
,
payload
:
false
});
},
*
onEBack
({
payload
},
{
put
,
call
})
{
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-DSRInfo'
,
datasourceName
:
'QueryDSRInfoTable'
,
};
const
result
=
yield
call
(
getData
,
coordinate
,
{
params
:
{
pID
:
payload
}
});
const
singularData
=
result
[
0
];
yield
put
({
type
:
'setDSRList'
,
payload
:
{
...
singularData
}
});
yield
put
(
NavigationActions
.
navigate
({
routeName
:
'peopleInfo'
,
}));
yield
put
({
type
:
'setDisabled'
,
payload
:
true
});
yield
put
({
type
:
'setDetail'
,
payload
:
false
});
},
*
setStatus
({
payload
},
{
put
})
{
yield
put
({
type
:
'setDisabled'
,
payload
:
false
});
yield
put
({
type
:
'setEdit'
,
payload
});
},
},
reducers
:
{
// 下拉刷新用到的,清空列表的数据
clearList
(
state
)
{
return
{
...
state
,
sourceData
:
{}
};
},
getDSRDetail
(
state
,
{
payload
})
{
return
{
...
state
,
detailData
:
payload
,
};
},
setDSRList
(
state
,
{
payload
})
{
return
{
...
state
,
sourceData
:
payload
,
};
},
setDetail
(
state
,
{
payload
})
{
return
{
...
state
,
isDetail
:
payload
,
};
},
setEdit
(
state
,
{
payload
})
{
return
{
...
state
,
editable
:
payload
,
};
},
setDisabled
(
state
,
{
payload
})
{
return
{
...
state
,
disabled
:
payload
,
};
},
},
};
src/routes/main/houseinfo/ObligeeInfo.js
浏览文件 @
ef454f6b
...
...
@@ -50,7 +50,7 @@ class ObligeeInfo extends React.Component {
}
};
renderItem
=
({
item
})
=>
{
console
.
log
(
item
);
//
console.log(item);
return
(
<
WingBlank
size
=
"lg"
>
<
WhiteSpace
size
=
"lg"
/>
...
...
@@ -72,7 +72,7 @@ class ObligeeInfo extends React.Component {
const
{
sourceData
,
isDetail
,
detailData
,
editable
,
disabled
}
=
this
.
props
.
obligeeInfo
;
console
.
log
(
this
.
props
.
obligeeInfo
);
const
data
=
[
sourceData
];
console
.
log
(
data
);
//
console.log(data);
const
{
getFieldProps
}
=
this
.
props
.
form
;
const
test
=
(
<
FlatList
...
...
src/routes/main/index.js
浏览文件 @
ef454f6b
...
...
@@ -3,7 +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/Obligee
Info'
;
import
PeopleInfo
from
'./peopleInfo/peopel
Info'
;
import
chatsIcon
from
'../../../image/chats-icon.png'
;
import
Empty
from
'../empty'
;
...
...
@@ -51,7 +51,7 @@ const Content = TabNavigator({
},
},
RKInfo
:
{
screen
:
ObligeeInfo
,
screen
:
Empty
(
'权属信息的新增,修改,还可以勾选房子'
,
'DSRInfoScreen'
)
,
navigationOptions
:
{
lazy
:
true
,
tabBarLabel
:
'人口信息'
,
...
...
src/routes/main/peopleInfo/peopelInfo.js
0 → 100644
浏览文件 @
ef454f6b
/**
* Created by zhouhuan on 2017/10/30.
*/
import
React
from
'react'
;
import
{
createForm
}
from
'rc-form'
;
import
{
View
,
StyleSheet
,
FlatList
,
Text
,
ScrollView
}
from
'react-native'
;
import
{
Card
,
WingBlank
,
WhiteSpace
,
Button
,
List
,
InputItem
}
from
'antd-mobile'
;
import
{
connect
}
from
'react-redux'
;
import
{
createAction
}
from
'../../../utils'
;
@
connect
(({
peopleInfo
,
loading
})
=>
({
peopleInfo
,
loading
:
!!
loading
.
effects
[
'peopleInfo/getPeopleInfo'
]
}))
class
PeopleInfo
extends
React
.
Component
{
componentDidMount
()
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/getPeopleInfo'
)());
}
onPress
=
()
=>
{
const
ID
=
this
.
props
.
peopleInfo
.
sourceData
.
id
;
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/getPeopleDetail'
)(
ID
));
};
onEdit
=
()
=>
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/setStatus'
)(
true
));
};
onSubmit
=
()
=>
{
this
.
props
.
form
.
validateFields
({
force
:
true
},
(
error
,
value
)
=>
{
if
(
!
error
)
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/updateDSRDetail'
)({
id
:
this
.
props
.
peopleInfo
.
sourceData
.
id
,
singularData
:
value
}));
}
else
{
console
.
log
(
'Validation failed'
);
}
});
};
onEditBack
=
()
=>
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/onEBack'
)());
};
onEndReached
=
()
=>
{
// 以下是制造新数据
if
(
!
this
.
props
.
loading
)
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/getPeopleInfo'
)());
}
};
keyExtractor
=
item
=>
`
${
item
.
id
}
`
;
// 下拉刷新
renderRefresh
=
()
=>
{
if
(
!
this
.
props
.
loading
)
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/getPeopleInfo'
)(
'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
.
peopleInfo
;
console
.
log
(
this
.
props
.
peopleInfo
);
console
.
log
(
isDetail
);
// 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
(
<
View
><
Text
>
123
<
/Text></
View
>
);
}
else
{
return
(
<
ScrollView
>
<
List
>
<
InputItem
{...
getFieldProps
(
'dangShiRenXingMing'
,
{
initialValue
:
detailData
.
dangShiRenXingMing
,
rules
:
[
{
required
:
true
,
message
:
'不允许为空'
},
{
validator
:
this
.
validateFWBianMa
},
],
})}
clear
placeholder
=
"请输入"
editable
=
{
editable
}
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
姓名
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'dangShiRenXingBie'
,
{
initialValue
:
detailData
.
dangShiRenXingBie
,
})}
clear
placeholder
=
"请输入"
editable
=
{
editable
}
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
性别
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'dangShiRenTelephone'
,
{
initialValue
:
detailData
.
dangShiRenTelephone
,
})}
clear
placeholder
=
"请输入"
editable
=
{
editable
}
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
电话号码
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'dangShiRenIdentityCard'
,
{
initialValue
:
detailData
.
dangShiRenIdentityCard
,
})}
clear
placeholder
=
"请输入"
editable
=
{
editable
}
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
身份证号码
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'dangShiRenIdentityCardbak'
,
{
initialValue
:
detailData
.
dangShiRenIdentityCardbak
,
})}
clear
placeholder
=
"请输入"
editable
=
{
editable
}
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
身份证类型
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'dangShiRenAddress'
,
{
initialValue
:
detailData
.
dangShiRenAddress
,
})}
clear
placeholder
=
"请输入"
editable
=
{
editable
}
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
地址
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'DSRMaritalStatus'
,
{
initialValue
:
detailData
.
DSRMaritalStatus
,
})}
clear
placeholder
=
"请输入"
editable
=
{
editable
}
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
婚姻状态
<
/InputItem
>
<
InputItem
{...
getFieldProps
(
'DSRCensusType'
,
{
initialValue
:
detailData
.
DSRCensusType
,
})}
clear
placeholder
=
"请输入"
editable
=
{
editable
}
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
是否原村民
<
/InputItem
>
<
List
.
Item
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
Button
style
=
{{
marginRight
:
8
}}
type
=
"primary"
onClick
=
{
this
.
onEdit
}
>
编辑
<
/Button
>
<
Button
style
=
{{
marginRight
:
8
}}
onClick
=
{
this
.
onSubmit
}
disabled
=
{
disabled
}
>
保存
<
/Button
>
<
Button
onClick
=
{
this
.
onEditBack
}
>
返回
<
/Button
>
<
/View
>
<
/List.Item
>
<
/List
>
<
/ScrollView
>
);
}
}
}
const
Styles
=
StyleSheet
.
create
({
cardText
:
{
color
:
'#2196F3'
,
textAlign
:
'right'
,
},
cardBodyText
:
{
marginBottom
:
10
,
marginLeft
:
13
,
},
});
export
default
createForm
()(
PeopleInfo
);
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论