Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
JTWXWebApp
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
JTWXWebApp
Commits
d1c544b1
提交
d1c544b1
authored
4月 26, 2018
作者:
何守志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tijiao
上级
e00d4cbc
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
73 行增加
和
43 行删除
+73
-43
CardViewThree.js
src/components/CardViewThree.js
+9
-7
index.js
src/index.js
+2
-2
home.js
src/models/Home/home.js
+33
-33
search.js
src/models/Home/search.js
+22
-0
router.js
src/router.js
+5
-0
SearchPage.js
src/routes/Home/SearchPage.js
+2
-1
没有找到文件。
src/components/CardViewThree.js
浏览文件 @
d1c544b1
...
@@ -7,9 +7,10 @@ import {
...
@@ -7,9 +7,10 @@ import {
WhiteSpace
,
WhiteSpace
,
Flex
,
Flex
,
}
from
'antd-mobile'
;
}
from
'antd-mobile'
;
class
CardThreeContent
extends
React
.
Component
{
import
CardViewFour
from
'./CardViewFour'
;
class
CardViewThree
extends
React
.
Component
{
render
(){
render
(){
const
{
todayQianYue
,
todayCheXiao
,
suoDingTongJi
,
jinDuTongJi
,
chengBenTongJi
,
shiYongFangYuanTongJi
,
jiDiFangYuanTongJi
,
xiaoQuTongJi
}
=
this
.
props
.
search
;
const
{
todayQianYue
,
todayCheXiao
,
suoDingTongJi
,
jinDuTongJi
,
chengBenTongJi
,
shiYongFangYuanTongJi
,
jiDiFangYuanTongJi
,
xiaoQuTongJi
,
xiangMuLieBiao
}
=
this
.
props
.
search
;
return
(
return
(
<
div
>
<
div
>
<
WhiteSpace
size
=
"lg"
style
=
{{
background
:
"#eee"
}}
/
>
<
WhiteSpace
size
=
"lg"
style
=
{{
background
:
"#eee"
}}
/
>
...
@@ -30,6 +31,7 @@ class CardThreeContent extends React.Component{
...
@@ -30,6 +31,7 @@ class CardThreeContent extends React.Component{
<
CardEight
data
=
{
jiDiFangYuanTongJi
}
/
>
<
CardEight
data
=
{
jiDiFangYuanTongJi
}
/
>
<
WhiteSpace
size
=
"lg"
style
=
{{
background
:
"#eee"
}}
/
>
<
WhiteSpace
size
=
"lg"
style
=
{{
background
:
"#eee"
}}
/
>
<
CardNine
data
=
{
xiaoQuTongJi
}
/
>
<
CardNine
data
=
{
xiaoQuTongJi
}
/
>
<
CardViewFour
data
=
{
xiangMuLieBiao
}
/
>
<
/Card
>
<
/Card
>
<
/div
>
<
/div
>
);
);
...
@@ -329,7 +331,7 @@ class CardFive extends React.Component{
...
@@ -329,7 +331,7 @@ class CardFive extends React.Component{
<
div
>
<
div
>
<
Card
.
Header
<
Card
.
Header
title
=
{
title
=
{
<
span
style
=
{
{
paddingRight
:
"0.75rem"
,
fontWeight
:
"600"
}}
>
基地
进度统计
<
/span
>
<
span
style
=
{
{
paddingRight
:
"0.75rem"
,
fontWeight
:
"600"
}}
>
项目
进度统计
<
/span
>
}
}
style
=
{
{
padding
:
"1.2rem 1.3rem"
,
color
:
'#38c5b8'
}}
style
=
{
{
padding
:
"1.2rem 1.3rem"
,
color
:
'#38c5b8'
}}
/
>
/
>
...
@@ -634,7 +636,7 @@ class CardEight extends React.Component{
...
@@ -634,7 +636,7 @@ class CardEight extends React.Component{
<
div
>
<
div
>
<
Card
.
Header
<
Card
.
Header
title
=
{
title
=
{
<
span
style
=
{{
paddingRight
:
"0.75rem"
,
fontWeight
:
"600"
}}
>
基地
房源统计
<
/span
>
<
span
style
=
{{
paddingRight
:
"0.75rem"
,
fontWeight
:
"600"
}}
>
项目
房源统计
<
/span
>
}
}
style
=
{{
padding
:
"1.2rem 1.3rem"
,
color
:
'#38c5b8'
}}
style
=
{{
padding
:
"1.2rem 1.3rem"
,
color
:
'#38c5b8'
}}
/
>
/
>
...
@@ -676,7 +678,7 @@ class CardEight extends React.Component{
...
@@ -676,7 +678,7 @@ class CardEight extends React.Component{
<
div
>
<
div
>
<
Card
.
Header
<
Card
.
Header
title
=
{
title
=
{
<
span
style
=
{{
paddingRight
:
"0.75rem"
,
fontWeight
:
"600"
}}
>
基地
房源统计
<
/span
>
<
span
style
=
{{
paddingRight
:
"0.75rem"
,
fontWeight
:
"600"
}}
>
项目
房源统计
<
/span
>
}
}
style
=
{{
padding
:
"1.2rem 1.3rem"
,
color
:
'#38c5b8'
}}
style
=
{{
padding
:
"1.2rem 1.3rem"
,
color
:
'#38c5b8'
}}
/
>
/
>
...
@@ -797,11 +799,11 @@ class CardNineBody extends React.Component{
...
@@ -797,11 +799,11 @@ class CardNineBody extends React.Component{
}
}
}
}
Card
ThreeContent
.
propTypes
=
{
Card
ViewThree
.
propTypes
=
{
search
:
PropTypes
.
object
,
search
:
PropTypes
.
object
,
};
};
// 指定订阅数据,这里关联了 login
// 指定订阅数据,这里关联了 login
function
mapStateToProps
({
search
})
{
function
mapStateToProps
({
search
})
{
return
{
search
};
return
{
search
};
}
}
export
default
connect
(
mapStateToProps
)(
Card
ThreeContent
);
export
default
connect
(
mapStateToProps
)(
Card
ViewThree
);
src/index.js
浏览文件 @
d1c544b1
...
@@ -7,8 +7,8 @@ console.log('index.js');
...
@@ -7,8 +7,8 @@ console.log('index.js');
const
app
=
dva
({
const
app
=
dva
({
history
:
createBrowserHistory
({
history
:
createBrowserHistory
({
// eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef
basename
:
'bm-wx'
,
//
basename: 'bm-wx',
//
basename: '/',
basename
:
'/'
,
}),
}),
});
});
...
...
src/models/Home/home.js
浏览文件 @
d1c544b1
...
@@ -17,40 +17,25 @@ export default {
...
@@ -17,40 +17,25 @@ export default {
effects
:
{
effects
:
{
*
getSummaryData
({
payload
},
{
take
,
put
,
call
,
select
})
{
*
getSummaryData
({
payload
},
{
take
,
put
,
call
,
select
})
{
// const payloads = { userName:'admin',password:'admin', type: 'userName', authType: 'password' };
const
payloads
=
{
userName
:
'admin'
,
password
:
'admin'
,
type
:
'userName'
,
authType
:
'password'
};
// try{
try
{
// const result = yield call(login, payloads);
const
result
=
yield
call
(
login
,
payloads
);
// console.info(result);
console
.
info
(
result
);
// const { tokenId } = result;
const
{
tokenId
}
=
result
;
// yield call(setToken, tokenId);// 这里的yield ,跟C#中的await一样
yield
call
(
setToken
,
tokenId
);
// 这里的yield ,跟C#中的await一样
// }
}
// catch (erroer) {
catch
(
erroer
)
{
// console.info(erroer);
console
.
info
(
erroer
);
// }
}
//
//
// const { pNumber } = payload;
// let coordinate;
// coordinate= {
// containerType: 'module',
// containerName: 'QueryJiDiModule',
// datasourceName: 'QueryDistrictName',
// };
// try {
// const resultss = yield call(getData, coordinate, { pst: 0, psz: 10 ,params:{pNumber:pNumber}});
// console.info('查询的结果');
// console.info(resultss);
// yield put({ type: 'setSummaryData',payload:{resultss} });
// }catch (erroer){
// console.info(erroer);
// }
// 这是以后放到服务器时候用的代码,因为现在要测试,所以要先注释
const
{
pNumber
}
=
payload
;
const
{
pNumber
}
=
payload
;
const
coordinate
=
{
let
coordinate
;
containerType
:
'module'
,
coordinate
=
{
containerName
:
'QueryJiDiModule'
,
containerType
:
'module'
,
datasourceName
:
'QueryDistrictName'
,
containerName
:
'QueryJiDiModule'
,
};
datasourceName
:
'QueryDistrictName'
,
};
try
{
try
{
const
resultss
=
yield
call
(
getData
,
coordinate
,
{
pst
:
0
,
psz
:
10
,
params
:{
pNumber
:
pNumber
}});
const
resultss
=
yield
call
(
getData
,
coordinate
,
{
pst
:
0
,
psz
:
10
,
params
:{
pNumber
:
pNumber
}});
console
.
info
(
'查询的结果'
);
console
.
info
(
'查询的结果'
);
...
@@ -59,6 +44,21 @@ export default {
...
@@ -59,6 +44,21 @@ export default {
}
catch
(
erroer
){
}
catch
(
erroer
){
console
.
info
(
erroer
);
console
.
info
(
erroer
);
}
}
// 这是以后放到服务器时候用的代码,因为现在要测试,所以要先注释
// const { pNumber } = payload;
// const coordinate = {
// containerType: 'module',
// containerName: 'QueryJiDiModule',
// datasourceName: 'QueryDistrictName',
// };
// try {
// const resultss = yield call(getData, coordinate, { pst: 0, psz: 10 ,params:{pNumber:pNumber}});
// console.info('查询的结果');
// console.info(resultss);
// yield put({ type: 'setSummaryData',payload:{resultss} });
// }catch (erroer){
// console.info(erroer);
// }
},
},
*
getSummary
({
payload
},
{
take
,
put
,
call
,
select
})
{
*
getSummary
({
payload
},
{
take
,
put
,
call
,
select
})
{
...
...
src/models/Home/search.js
浏览文件 @
d1c544b1
...
@@ -12,6 +12,7 @@ export default {
...
@@ -12,6 +12,7 @@ export default {
shiYongFangYuanTongJi
:
null
,
shiYongFangYuanTongJi
:
null
,
jiDiFangYuanTongJi
:
null
,
jiDiFangYuanTongJi
:
null
,
xiaoQuTongJi
:
null
,
xiaoQuTongJi
:
null
,
xiangMuLieBiao
:
null
,
},
},
subscriptions
:
{
subscriptions
:
{
...
@@ -36,6 +37,24 @@ export default {
...
@@ -36,6 +37,24 @@ export default {
console
.
info
(
erroer
);
console
.
info
(
erroer
);
}
}
},
},
*
getXM
({
payload
},
{
take
,
put
,
call
})
{
const
{
pjName
}
=
payload
;
let
coordinate
;
coordinate
=
{
containerType
:
'module'
,
containerName
:
'QueryPJModule'
,
datasourceName
:
'QueryJiDiName'
,
};
try
{
const
resultss
=
yield
call
(
getData
,
coordinate
,
{
pst
:
0
,
psz
:
10
,
params
:{
pjName
:
pjName
}});
console
.
info
(
'查询的结果'
);
console
.
info
(
resultss
);
yield
put
({
type
:
'setXM'
,
payload
:{
resultss
}
});
}
catch
(
erroer
){
console
.
info
(
erroer
);
}
},
},
},
reducers
:
{
reducers
:
{
...
@@ -44,6 +63,9 @@ export default {
...
@@ -44,6 +63,9 @@ export default {
console
.
info
(
payload
.
resultss
);
console
.
info
(
payload
.
resultss
);
return
{...
state
,[
`
${
payload
.
stateName
}
`
]:
payload
.
resultss
};
return
{...
state
,[
`
${
payload
.
stateName
}
`
]:
payload
.
resultss
};
},
},
setXM
(
state
,{
payload
}){
return
{...
state
,
xiangMuLieBiao
:
payload
.
resultss
};
}
},
},
};
};
src/router.js
浏览文件 @
d1c544b1
...
@@ -17,6 +17,10 @@ function RouterConfig({ history, app }) {
...
@@ -17,6 +17,10 @@ function RouterConfig({ history, app }) {
app
,
app
,
component
:
()
=>
import
(
'./routes/Home/SearchPage'
),
component
:
()
=>
import
(
'./routes/Home/SearchPage'
),
})
;
})
;
const
BasePage
=
dynamic
({
app
,
component
:
()
=>
import
(
'./routes/Home/BasePage'
),
})
;
return
(
return
(
<
Router
history
=
{
history
}
>
<
Router
history
=
{
history
}
>
...
@@ -25,6 +29,7 @@ function RouterConfig({ history, app }) {
...
@@ -25,6 +29,7 @@ function RouterConfig({ history, app }) {
<
Route
path
=
"/Home"
component
=
{
HomePage
}
/
>
<
Route
path
=
"/Home"
component
=
{
HomePage
}
/
>
<
Route
path
=
"/Login"
component
=
{
IndexPage
}
/
>
<
Route
path
=
"/Login"
component
=
{
IndexPage
}
/
>
<
Route
path
=
"/SearchPage/:pjName"
component
=
{
SearchPage
}
/
>
<
Route
path
=
"/SearchPage/:pjName"
component
=
{
SearchPage
}
/
>
<
Route
path
=
"/BasePage/:pjName"
component
=
{
BasePage
}
/
>
<
/Switch
>
<
/Switch
>
<
/Router
>
<
/Router
>
);
);
...
...
src/routes/Home/SearchPage.js
浏览文件 @
d1c544b1
...
@@ -27,6 +27,7 @@ class SearchPage extends React.Component{
...
@@ -27,6 +27,7 @@ class SearchPage extends React.Component{
dispatch
({
type
:
'search/getResult'
,
payload
:
{
pjName
:
this
.
props
.
match
.
params
.
pjName
,
datasourceName
:
'QueryShiYongFangYuanTongJi'
,
stateName
:
'shiYongFangYuanTongJi'
}});
dispatch
({
type
:
'search/getResult'
,
payload
:
{
pjName
:
this
.
props
.
match
.
params
.
pjName
,
datasourceName
:
'QueryShiYongFangYuanTongJi'
,
stateName
:
'shiYongFangYuanTongJi'
}});
dispatch
({
type
:
'search/getResult'
,
payload
:
{
pjName
:
this
.
props
.
match
.
params
.
pjName
,
datasourceName
:
'QueryJiDiFangYuanTongJi'
,
stateName
:
'jiDiFangYuanTongJi'
}});
dispatch
({
type
:
'search/getResult'
,
payload
:
{
pjName
:
this
.
props
.
match
.
params
.
pjName
,
datasourceName
:
'QueryJiDiFangYuanTongJi'
,
stateName
:
'jiDiFangYuanTongJi'
}});
dispatch
({
type
:
'search/getResult'
,
payload
:
{
pjName
:
this
.
props
.
match
.
params
.
pjName
,
datasourceName
:
'QueryXiaoQuTongJi'
,
stateName
:
'xiaoQuTongJi'
}});
dispatch
({
type
:
'search/getResult'
,
payload
:
{
pjName
:
this
.
props
.
match
.
params
.
pjName
,
datasourceName
:
'QueryXiaoQuTongJi'
,
stateName
:
'xiaoQuTongJi'
}});
dispatch
({
type
:
'search/getXM'
,
payload
:
{
pjName
:
this
.
props
.
match
.
params
.
pjName
}});
}
}
render
(){
render
(){
return
(
return
(
...
@@ -41,7 +42,7 @@ class SearchPage extends React.Component{
...
@@ -41,7 +42,7 @@ class SearchPage extends React.Component{
]}
/
>
]}
/
>
<
/span
>
<
/span
>
<
/div
>
<
/div
>
<
MyTopCard
/>
<
MyTopCard
search
=
{
this
.
props
.
search
}
/
>
<
/Page
>
<
/Page
>
);
);
};
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论