Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
manager-app-sz
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
manager-app-sz
Commits
09f0a8af
提交
09f0a8af
authored
11月 20, 2017
作者:
吴强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
多行显示更新
上级
803c89e5
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
31 行增加
和
24 行删除
+31
-24
pickerComponent.js
src/components/pickerComponent.js
+1
-1
domain.js
src/models/domain.js
+27
-18
ObligeeInfo.js
src/routes/main/houseinfo/ObligeeInfo.js
+1
-0
fwquanshuScreen.js
src/routes/main/houseinfo/fwquanshuScreen.js
+1
-0
quanshuDetail.js
src/routes/main/quanshuInfo/quanshuDetail.js
+1
-0
UserInfoHomeScreen.js
src/routes/main/userinfo/UserInfoHomeScreen.js
+0
-5
没有找到文件。
src/components/pickerComponent.js
浏览文件 @
09f0a8af
...
...
@@ -20,7 +20,7 @@ class PickerComponent extends PureComponent {
<
List
style
=
{{
backgroundColor
:
'white'
}}
className
=
"picker-list"
>
<
Picker
data
=
{
data
}
cols
=
{
3
}
cols
=
{
this
.
props
.
cols
}
value
=
{
pathVal
}
onPickerChange
=
{
this
.
onPickerChange
}
onOk
=
{
this
.
onOkButton
}
...
...
src/models/domain.js
浏览文件 @
09f0a8af
...
...
@@ -25,32 +25,38 @@ const findTarget = (list, dmpath) => {
return
null
;
};
const
createData
=
async
(
list
,
dmpath
,
payload
)
=>
{
console
.
log
(
list
);
console
.
log
(
dmpath
);
// 根据path用fetchDomains 查出children
let
childrens
;
let
childrens
=
[]
;
let
pathArray
;
if
(
dmpath
!==
'/'
)
{
if
(
dmpath
!==
'/'
||
dmpath
.
split
(
'/'
).
length
===
3
)
{
childrens
=
await
fetchDomains
(
dmpath
);
console
.
log
(
childrens
);
const
childrenPath
=
childrens
[
0
].
path
;
pathArray
=
[...
payload
,
childrenPath
];
console
.
info
(
'ChildRen-------------------------'
);
console
.
info
(
childrens
);
console
.
info
(
'ChildRen------------------------'
);
if
(
childrens
.
length
!==
0
)
{
const
childrenPath
=
childrens
[
0
].
path
;
pathArray
=
[...
payload
,
childrenPath
];
console
.
info
(
pathArray
);
}
}
else
{
pathArray
=
[...
payload
];
}
const
cols
=
pathArray
.
length
;
const
childrenData
=
[];
childrens
.
map
(({
name
,
path
})
=>
{
childrenData
.
push
({
label
:
name
,
value
:
path
,
children
:
[]
});
return
childrenData
;
});
if
(
childrens
.
length
!==
0
)
{
childrens
.
map
(({
name
,
path
})
=>
{
childrenData
.
push
({
label
:
name
,
value
:
path
,
children
:
[]
});
return
childrenData
;
});
}
// 根据path在list查出需要添加children的对象target
const
findData
=
findTarget
(
list
,
dmpath
);
findData
.
children
=
childrenData
;
console
.
log
(
findData
);
const
data
=
list
;
console
.
log
(
list
);
return
{
data
,
pathArray
};
return
{
data
,
pathArray
,
cols
};
};
export
default
{
namespace
:
'domain'
,
...
...
@@ -60,7 +66,7 @@ export default {
list
:
[],
listChildren
:
[],
arrayPath
:
[],
cols
:
''
,
cols
:
1
,
userInfo
:
''
,
},
...
...
@@ -85,7 +91,6 @@ export default {
},
*
fetchParam
({
payload
},
{
put
,
call
,
select
})
{
console
.
log
(
payload
);
let
dmpath
=
''
;
if
(
payload
.
length
===
1
)
{
dmpath
=
payload
[
0
];
...
...
@@ -95,12 +100,11 @@ export default {
dmpath
=
payload
[
2
];
}
const
{
list
}
=
yield
select
(
state
=>
state
.
domain
);
// const target = yield call(findTarget, list, dmpath);
// console.log(target);
const
datas
=
yield
call
(
createData
,
list
,
dmpath
,
payload
);
console
.
log
(
datas
);
yield
put
({
type
:
'queryList'
,
payload
:
datas
.
data
});
yield
put
({
type
:
'queryArryPath'
,
payload
:
datas
.
pathArray
});
yield
put
({
type
:
'setCols'
,
payload
:
datas
.
cols
});
},
*
switch
({
payload
:
domainPath
},
{
put
,
call
})
{
yield
call
(
switchDomain
,
domainPath
);
...
...
@@ -119,7 +123,6 @@ export default {
},
*
getUserInfo
(
ignored
,
{
put
,
call
})
{
const
userInfo
=
yield
call
(
getUser
);
// console.log(userInfo);
yield
put
({
type
:
'queryUserInfo'
,
payload
:
userInfo
});
},
},
...
...
@@ -155,6 +158,12 @@ export default {
arrayPath
,
};
},
setCols
(
state
,
{
payload
:
cols
})
{
return
{
...
state
,
cols
,
};
},
},
};
src/routes/main/houseinfo/ObligeeInfo.js
浏览文件 @
09f0a8af
...
...
@@ -78,6 +78,7 @@ class ObligeeInfo extends React.Component {
<
List
.
Item
key
=
{
m
.
key
}
extra
=
{
detailData
[
m
.
key
]}
wrap
>
{
m
.
label
}
<
/List.Item
>
...
...
src/routes/main/houseinfo/fwquanshuScreen.js
浏览文件 @
09f0a8af
...
...
@@ -78,6 +78,7 @@ class FWQuanShuScreen extends React.Component {
<
List
.
Item
key
=
{
m
.
key
}
extra
=
{
detailData
[
m
.
key
]}
wrap
>
{
m
.
label
}
<
/List.Item
>
...
...
src/routes/main/quanshuInfo/quanshuDetail.js
浏览文件 @
09f0a8af
...
...
@@ -33,6 +33,7 @@ class QuanshuDetailScreen extends React.Component {
<
List
.
Item
key
=
{
m
.
key
}
extra
=
{
singularData
[
m
.
key
]}
wrap
>
{
m
.
label
}
<
/List.Item
>
...
...
src/routes/main/userinfo/UserInfoHomeScreen.js
浏览文件 @
09f0a8af
...
...
@@ -17,13 +17,10 @@ class UserInfoHomeScreen extends PureComponent {
this
.
props
.
dispatch
(
createAction
(
'domain/fetch'
)());
};
onPickerChange
=
(
path
)
=>
{
// console.log(path);
this
.
props
.
dispatch
(
createAction
(
'domain/fetchParam'
)(
path
));
};
onOkButton
=
()
=>
{
console
.
info
(
this
.
props
.
domain
);
const
domainPath
=
last
(
this
.
props
.
domain
.
arrayPath
);
console
.
info
(
domainPath
);
this
.
props
.
dispatch
(
createAction
(
'domain/switch'
)(
domainPath
));
};
onLogout
=
()
=>
{
...
...
@@ -35,8 +32,6 @@ class UserInfoHomeScreen extends PureComponent {
};
render
()
{
const
{
list
,
listChildren
,
arrayPath
,
cols
,
userInfo
}
=
this
.
props
.
domain
;
// console.log(arrayPath);
console
.
log
(
userInfo
);
let
datas
=
[];
if
(
listChildren
.
length
===
0
)
{
datas
=
list
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论