Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
manager-app-sz
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
manager-app-sz
Commits
cf9825f8
提交
cf9825f8
authored
11月 13, 2017
作者:
吴强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加新增人口Detail界面3
上级
e85ec686
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
28 行增加
和
125 行删除
+28
-125
listhouse.js
src/models/houseinfo/listhouse.js
+0
-14
peopleInfo.js
src/models/peopleInfo/peopleInfo.js
+2
-8
peopleDetailEditScreen.js
src/routes/main/peopleInfo/peopleDetailEditScreen.js
+1
-3
peopleDetailInfo.js
src/routes/main/peopleInfo/peopleDetailInfo.js
+25
-100
没有找到文件。
src/models/houseinfo/listhouse.js
浏览文件 @
cf9825f8
...
...
@@ -41,40 +41,26 @@ export default {
}));
},
*
getHouseList
({
payload
},
{
take
,
put
,
call
,
select
})
{
console
.
info
(
1
);
const
{
clear
,
pFWDiZhi
}
=
payload
;
console
.
info
(
2
);
if
(
clear
===
'clear'
)
{
console
.
info
(
3
);
yield
put
({
type
:
'clearList'
,
payload
:
{}
});
console
.
info
(
4
);
}
const
{
sourceData
}
=
yield
select
(
state
=>
state
.
ListHouse
);
console
.
info
(
5
);
const
size
=
sourceData
.
length
;
console
.
info
(
6
);
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-DSRFWInfo'
,
datasourceName
:
'QueryfwTable'
,
};
console
.
info
(
7
);
const
result
=
yield
call
(
getData
,
coordinate
,
{
pst
:
size
,
psz
:
10
,
params
:
{
pFWDiZhi
}
});
console
.
info
(
78
);
const
meta
=
yield
call
(
getMeta
,
coordinate
);
console
.
info
(
9
);
yield
put
({
type
:
'setMetas'
,
payload
:
meta
});
console
.
info
(
10
);
for
(
const
row
of
result
)
{
console
.
info
(
11
);
yield
put
({
type
:
'addHouse'
,
payload
:
row
});
console
.
info
(
12
);
yield
take
(
'addHouse/@@end'
);
console
.
info
(
13
);
}
},
*
addHouse
({
payload
},
{
put
})
{
console
.
info
(
11111
);
yield
put
({
type
:
'setList'
,
payload
:
{
arrayData
:
[
payload
]
}
});
},
},
...
...
src/models/peopleInfo/peopleInfo.js
浏览文件 @
cf9825f8
...
...
@@ -34,17 +34,14 @@ export default {
yield
put
({
type
:
'clearList'
,
payload
:
{}
});
}
const
{
sourceData
}
=
yield
select
(
state
=>
state
.
peopleInfo
);
console
.
info
(
sourceData
);
const
size
=
sourceData
.
length
;
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-RKInfo'
,
datasourceName
:
'QueryRKTable'
,
};
console
.
info
(
`pst
${
size
}
params
${
pxingMing
}
`
);
try
{
const
result
=
yield
call
(
getData
,
coordinate
,
{
pst
:
size
,
psz
:
10
,
params
:
{
pxingMing
}
});
console
.
info
(
sourceData
);
const
meta
=
yield
call
(
getMeta
,
coordinate
);
yield
put
({
type
:
'setMetas'
,
payload
:
meta
});
for
(
const
row
of
result
)
{
...
...
@@ -65,12 +62,10 @@ export default {
datasourceName
:
'QueryRKDetails'
,
};
const
result
=
yield
call
(
getData
,
coordinate
,
{
params
:
{
pID
:
payload
}
});
console
.
log
(
result
);
yield
put
({
type
:
'getPeopleDetailInfo'
,
payload
:
{
...
result
[
0
]
}
});
yield
put
({
type
:
'setEdit'
,
payload
:
false
});
},
*
savePeopleInfo
({
payload
},
{
put
,
call
})
{
console
.
log
(
payload
);
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-RKInfo'
,
...
...
@@ -89,13 +84,13 @@ export default {
routeName
:
'addPeoppleInfo'
,
}));
},
*
GoToPeopleDetailEditScreen
(
ignore
,
{
put
})
{
*
GoToPeopleDetailEditScreen
({
payload
:
id
},
{
put
})
{
yield
put
({
type
:
'setPeopPleID'
,
payload
:
id
});
yield
put
(
NavigationActions
.
navigate
({
routeName
:
'peopleInfoDetailEdit'
,
}));
},
*
updateDSRDetail
({
payload
},
{
call
,
put
})
{
console
.
log
(
'update'
);
const
coordinate
=
{
containerType
:
'module'
,
containerName
:
'query-RKInfo'
,
...
...
@@ -137,7 +132,6 @@ export default {
try
{
Toast
.
loading
(
'读卡中...'
,
0
);
const
result
=
yield
call
(
scan
);
console
.
info
(
result
);
if
(
result
)
{
yield
put
({
type
:
'setdetailData'
,
payload
:
result
});
}
...
...
src/routes/main/peopleInfo/peopleDetailEditScreen.js
浏览文件 @
cf9825f8
...
...
@@ -12,8 +12,7 @@ import { createAction } from '../../../utils';
@
connect
(({
peopleInfo
})
=>
({
peopleInfo
}))
class
PeopleDetailEditScreen
extends
React
.
Component
{
componentDidMount
()
{
const
{
id
}
=
this
.
props
.
navigation
.
state
.
params
;
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/getPeopleDetail'
)(
id
));
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/getPeopleDetail'
)(
this
.
props
.
peopleInfo
.
peopleID
));
}
onSubmit
=
()
=>
{
this
.
props
.
form
.
validateFields
({
force
:
true
},
(
error
,
value
)
=>
{
...
...
@@ -26,7 +25,6 @@ class PeopleDetailEditScreen extends React.Component {
};
render
()
{
const
{
detailData
,
metas
}
=
this
.
props
.
peopleInfo
;
console
.
log
(
this
.
props
.
peopleInfo
);
const
{
getFieldProps
}
=
this
.
props
.
form
;
return
(
<
ScrollView
>
...
...
src/routes/main/peopleInfo/peopleDetailInfo.js
浏览文件 @
cf9825f8
...
...
@@ -15,118 +15,43 @@ class PeopleDetailInfo extends React.Component {
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/getPeopleDetail'
)(
id
));
}
onEdit
=
()
=>
{
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/GoToPeopleDetailEditScreen'
)());
const
{
id
}
=
this
.
props
.
navigation
.
state
.
params
;
this
.
props
.
dispatch
(
createAction
(
'peopleInfo/GoToPeopleDetailEditScreen'
)(
id
));
};
render
()
{
const
{
detailData
,
editable
,
metas
}
=
this
.
props
.
peopleInfo
;
if
(
editable
===
true
)
{
return
(
<
ScrollView
>
<
WhiteSpace
/>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
const
{
detailData
,
metas
}
=
this
.
props
.
peopleInfo
;
return
(
<
ScrollView
>
<
WhiteSpace
/>
<
WhiteSpace
/>
<
WingBlank
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
Icon
.
Button
name
=
"
id-card
"
name
=
"
edit
"
backgroundColor
=
"#08BBF9"
onPress
=
{()
=>
{
this
.
props
.
dispatch
({
type
:
'peopleInfo/DuKa'
});
}}
onPress
=
{
this
.
onEdit
}
>
读卡
编辑
<
/Icon.Button
>
<
/View
>
<
WhiteSpace
/>
<
WhiteSpace
/>
<
List
>
{
metas
.
map
((
m
)
=>
{
if
(
m
.
required
===
true
)
{
return
(
<
InputItem
{...
getFieldProps
(
m
.
key
,
{
initialValue
:
detailData
[
m
.
key
],
rules
:
[
{
required
:
true
,
message
:
'不允许为空'
},
{
validator
:
this
.
validateNoNull
},
],
})}
clear
placeholder
=
"请输入"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
{
m
.
label
}
<
/InputItem
>
);
}
else
{
return
(
<
InputItem
{...
getFieldProps
(
m
.
key
,
{
initialValue
:
detailData
[
m
.
key
],
})}
clear
placeholder
=
"请输入"
ref
=
{(
el
)
=>
{
this
.
customFocusInst
=
el
;
}}
>
{
m
.
label
}
<
/InputItem
>
);
}
})}
{[
1
].
map
(()
=>
{
return
(
<
List
.
Item
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'center'
}}
>
<
Icon
.
Button
name
=
"save"
backgroundColor
=
"#08BBF9"
onPress
=
{
this
.
onSubmit
}
>
保存
<
/Icon.Button
>
<
/View
>
<
/List.Item
>
);
})
return
(
<
List
.
Item
key
=
{
m
.
key
}
extra
=
{
detailData
[
m
.
key
]}
>
{
m
.
label
}
<
/List.Item
>
);
})
}
<
/List
>
<
/ScrollView
>
);
}
else
{
return
(
<
ScrollView
>
<
WhiteSpace
/>
<
WhiteSpace
/>
<
WingBlank
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
Icon
.
Button
name
=
"edit"
backgroundColor
=
"#08BBF9"
onPress
=
{
this
.
onEdit
}
>
编辑
<
/Icon.Button
>
<
/View
>
<
WhiteSpace
/>
<
List
>
{
metas
.
map
((
m
)
=>
{
return
(
<
List
.
Item
key
=
{
m
.
key
}
extra
=
{
detailData
[
m
.
key
]}
>
{
m
.
label
}
<
/List.Item
>
);
})
}
<
/List
>
<
/WingBlank
>
<
/ScrollView
>
);
}
<
/WingBlank
>
<
/ScrollView
>
);
}
}
export
default
PeopleDetailInfo
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论