提交 067e13c4 authored 作者: 吴强's avatar 吴强

first deploy version commit

上级 cdea8183
...@@ -47,7 +47,10 @@ module.exports = { ...@@ -47,7 +47,10 @@ module.exports = {
}, },
env: { env: {
development: { development: {
publicPath: "/",
define: {
_BASENAME_: '/',
},
extraBabelPlugins: [ extraBabelPlugins: [
'dva-hmr', 'dva-hmr',
["import", {"libraryName": "antd-mobile", "style": true}], ["import", {"libraryName": "antd-mobile", "style": true}],
...@@ -62,6 +65,7 @@ module.exports = { ...@@ -62,6 +65,7 @@ module.exports = {
"production": { "production": {
publicPath: "/bm-wx/", publicPath: "/bm-wx/",
define: { define: {
_BASENAME_: '/bm-wx',
contextPath: "/bm-wx", contextPath: "/bm-wx",
apiContextPath: "/bm-wx" apiContextPath: "/bm-wx"
}, },
......
...@@ -6,70 +6,140 @@ import { ...@@ -6,70 +6,140 @@ import {
} from 'antd-mobile'; } from 'antd-mobile';
class MyTopCard extends React.Component{ class MyTopCard extends React.Component{
render(){ render(){
return( const SummaryData=this.props.data;
<div> if(SummaryData==null)
<WhiteSpace size="lg" style={{background:"#eee"}} /> {
<Card full> return(
<Card.Header <div>
title={ <WhiteSpace size="lg" style={{background:"#eee"}} />
<div style={{fontSize:"0.85rem"}}> <Card full>
<span style={ {paddingRight:"0.75rem",color:'#38c5b8',fontWeight:"600"}}>总证数</span> <Card.Header
<span >18162</span> title={
</div> <div style={{fontSize:"0.85rem"}}>
} <span style={ {paddingRight:"0.75rem",color:'#38c5b8',fontWeight:"600"}}>总证数</span>
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}} <span >0</span>
/> </div>
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}> }
<Flex style={{padding:"1rem 0"}}> style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
<Flex.Item style={{marginRight:"0.75rem"}}> />
<Flex style={{justifyContent:"space-between"}}> <Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}>
<div>已签约证数</div> <Flex style={{padding:"1rem 0"}}>
<div>16955</div> <Flex.Item style={{marginRight:"0.75rem"}}>
</Flex> <Flex style={{justifyContent:"space-between"}}>
</Flex.Item> <div>已签约证数</div>
<Flex.Item style={{marginLeft:"0.75rem"}}> <div>0</div>
<Flex style={{justifyContent:"space-between"}}> </Flex>
<div>证均成本</div> </Flex.Item>
<div>3544940.25</div> <Flex.Item style={{marginLeft:"0.75rem"}}>
</Flex> <Flex style={{justifyContent:"space-between"}}>
</Flex.Item> <div>证均成本</div>
</Flex> <div>0</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding:"1rem 0"}}> <Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}> <Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{justifyContent:"space-between"}}>
<div>安置房套数</div> <div>安置房套数</div>
<div>18473</div> <div>0</div>
</Flex> </Flex>
</Flex.Item> </Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}> <Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{justifyContent:"space-between"}}>
<div>面积成本</div> <div>面积成本</div>
<div>123131.87</div> <div>0</div>
</Flex> </Flex>
</Flex.Item> </Flex.Item>
</Flex> </Flex>
<Flex style={{padding:"1rem 0"}}> <Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}> <Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{justifyContent:"space-between"}}>
<div>产权调换比例</div> <div>产权调换比例</div>
<div>52.35%</div> <div>0</div>
</Flex> </Flex>
</Flex.Item> </Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}> <Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{justifyContent:"space-between"}}>
<div>货币补偿比例</div> <div>货币补偿比例</div>
<div>3544940.25</div> <div>0</div>
</Flex> </Flex>
</Flex.Item> </Flex.Item>
</Flex> </Flex>
<WhiteSpace size="lg" />
</Card.Body>
</Card>
</div>
);
}else{
return(
<div>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<Card full>
<Card.Header
title={
<div style={{fontSize:"0.85rem"}}>
<span style={ {paddingRight:"0.75rem",color:'#38c5b8',fontWeight:"600"}}>总证数</span>
<span >{SummaryData[0].xiangMuZongHuShu}</span>
</div>
}
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
/>
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>已签约证数</div>
<div>{SummaryData[0].yiQianYueHuShu}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>证均成本</div>
<div>{SummaryData[0].zhengJunChengBen}</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>安置房套数</div>
<div>{SummaryData.anZhiFangTaoShu}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>面积成本</div>
<div>{SummaryData.mianJiChengBen}</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>产权调换比例</div>
<div>{SummaryData.chanQuanDiaoHuanBiLi}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>货币补偿比例</div>
<div>{SummaryData.huoBiBuChangBiLi}</div>
</Flex>
</Flex.Item>
</Flex>
<WhiteSpace size="lg" />
</Card.Body>
</Card>
</div>
);
}
<WhiteSpace size="lg" />
</Card.Body>
</Card>
</div>
);
} }
} }
export default MyTopCard; export default MyTopCard;
...@@ -9,187 +9,321 @@ import { ...@@ -9,187 +9,321 @@ import {
} from 'antd-mobile'; } from 'antd-mobile';
import MyBodyCard from "../components/CardViewTwo"; import MyBodyCard from "../components/CardViewTwo";
class CardThreeContent extends React.Component{ class CardThreeContent extends React.Component{
componentWillMount() {
const { dispatch } = this.props;
dispatch({ type: 'home/getSummaryData',payload: { pNumber:'浦东新区' }});
}
render(){ render(){
return( const {todayQianYue, todayCheXiao, suoDingTongJi, shiWuSuoTongJi, jinDuTongJi, chengBenTongJi, shiYongFangYuanTongJi, jiDiFangYuanTongJi, xiaoQuTongJi}=this.props.search;
<div> return(
<WhiteSpace size="lg" style={{background:"#eee"}} /> <div>
<Card full> <WhiteSpace size="lg" style={{background:"#eee"}} />
<Card full>
<CardOne/>
<WhiteSpace size="lg" style={{background:"#eee"}} /> <CardOne data={todayQianYue}/>
<CardTwo/> <WhiteSpace size="lg" style={{background:"#eee"}} />
<WhiteSpace size="lg" style={{background:"#eee"}} /> <CardTwo data={todayCheXiao}/>
<CardThree/> <WhiteSpace size="lg" style={{background:"#eee"}} />
<WhiteSpace size="lg" style={{background:"#eee"}} /> <CardThree data={suoDingTongJi}/>
<CardFour data={this.props.home.SummaryData}/> <WhiteSpace size="lg" style={{background:"#eee"}} />
<WhiteSpace size="lg" style={{background:"#eee"}} /> <CardFour data={shiWuSuoTongJi}/>
<CardFive/> <WhiteSpace size="lg" style={{background:"#eee"}} />
<WhiteSpace size="lg" style={{background:"#eee"}} /> <CardFive data={jinDuTongJi}/>
<CardSix/> <WhiteSpace size="lg" style={{background:"#eee"}} />
<WhiteSpace size="lg" style={{background:"#eee"}} /> <CardSix data={chengBenTongJi}/>
<CardSeven/> <WhiteSpace size="lg" style={{background:"#eee"}} />
<WhiteSpace size="lg" style={{background:"#eee"}} /> <CardSeven data={shiYongFangYuanTongJi}/>
<CardEight/> <WhiteSpace size="lg" style={{background:"#eee"}} />
<WhiteSpace size="lg" style={{background:"#eee"}} /> <CardEight data={jiDiFangYuanTongJi}/>
<CardNine/> <WhiteSpace size="lg" style={{background:"#eee"}} />
</Card> <CardNine data={xiaoQuTongJi}/>
</div> </Card>
); </div>
);
} }
} }
class CardOne extends React.Component{ class CardOne extends React.Component{
render(){ render(){
return( const data=this.props.data;
<div> if(data===null){
<Card.Header return(
title={ <div>
<span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>当日签约统计</span> <Card.Header
} title={
extra={ <span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>当日签约统计</span>
<span>2018/02/28</span> }
} extra={
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}} <span></span>
/> }
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}> style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
<Flex style={{padding:"1rem 0"}}> />
<Flex.Item style={{marginRight:"0.75rem"}}> <Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding:"1rem 0"}}>
<div>签约数</div> <Flex.Item style={{marginRight:"0.75rem"}}>
<div>0</div> <Flex style={{justifyContent:"space-between"}}>
</Flex> <div>签约数</div>
</Flex.Item> <div>0</div>
<Flex.Item style={{marginLeft:"0.75rem"}}> </Flex>
<Flex style={{justifyContent:"space-between"}}> </Flex.Item>
<div>产权调换()</div> <Flex.Item style={{marginLeft:"0.75rem"}}>
<div>0</div> <Flex style={{justifyContent:"space-between"}}>
</Flex> <div>产权调换()</div>
</Flex.Item> <div>0</div>
</Flex> </Flex>
</Flex.Item>
<Flex style={{padding:"1rem 0"}}> </Flex>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding:"1rem 0"}}>
<div>货币(证)</div> <Flex.Item style={{marginRight:"0.75rem"}}>
<div>0</div> <Flex style={{justifyContent:"space-between"}}>
</Flex> <div>货币(证)</div>
</Flex.Item> <div>0</div>
<Flex.Item> </Flex>
</Flex.Item>
<Flex.Item>
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}else{
console.info("输出data");
console.info(data);
return(
<div>
<Card.Header
title={
<span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>当日签约统计</span>
}
extra={
<span>{data[0].today}</span>
}
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
/>
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>签约数</div>
<div>{data[0].yiQianYueHuShu}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>产权调换()</div>
<div>{data[0].chanQuanDiaoHuanShu}</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding:"1rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>货币(证)</div>
<div>{data[0].huoBiBuChangShu}</div>
</Flex>
</Flex.Item>
<Flex.Item>
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
} }
} }
class CardTwo extends React.Component{ class CardTwo extends React.Component{
render(){ render(){
return( const data=this.props.data;
<div> if(data===null) {
<Card.Header return (
title={ <div>
<span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>当日撤销统计</span> <Card.Header
} title={
extra={ <span style={{paddingRight: "0.75rem", fontWeight: "600"}}>当日撤销统计</span>
<span>2018/02/28</span> }
} extra={
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}} <span>0</span>
/> }
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}> style={{padding: "1.2rem 1.3rem", color: '#38c5b8'}}
<Flex style={{padding:"1rem 0"}}> />
<Flex.Item style={{marginRight:"0.75rem"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.7rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding: "1rem 0"}}>
<div>翻协议次数</div> <Flex.Item style={{marginRight: "0.75rem"}}>
<div>0</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>翻协议次数</div>
</Flex.Item> <div>0</div>
<Flex.Item style={{marginLeft:"0.75rem"}}> </Flex>
<Flex style={{justifyContent:"space-between"}}> </Flex.Item>
<div>翻协议总次数()</div> <Flex.Item style={{marginLeft: "0.75rem"}}>
<div>503</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>翻协议总次数()</div>
</Flex.Item> <div>0</div>
</Flex> </Flex>
</Flex.Item>
<Flex style={{padding:"1rem 0"}}> </Flex>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding: "1rem 0"}}>
<div>行政撤销次数</div> <Flex.Item style={{marginRight: "0.75rem"}}>
<div>0</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>行政撤销次数</div>
</Flex.Item> <div>0</div>
<Flex.Item> </Flex>
<Flex style={{justifyContent:"space-between"}}> </Flex.Item>
<div>行政撤销总次数</div> <Flex.Item>
<div>3</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>行政撤销总次数</div>
</Flex.Item> <div>0</div>
</Flex> </Flex>
</Card.Body> </Flex.Item>
</div> </Flex>
); </Card.Body>
</div>
);
}else{
return (
<div>
<Card.Header
title={
<span style={{paddingRight: "0.75rem", fontWeight: "600"}}>当日撤销统计</span>
}
extra={
<span>{data[0].today}</span>
}
style={{padding: "1.2rem 1.3rem", color: '#38c5b8'}}
/>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.7rem"}}>
<Flex style={{padding: "1rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>行政撤销次数</div>
<div>{data[0].yiQianYueHuShu}</div>
</Flex>
</Flex.Item>
<Flex.Item>
<Flex style={{justifyContent: "space-between"}}>
<div>行政撤销总次数</div>
<div>{data[0].chanQuanDiaoHuanShu}</div>
</Flex>
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}
} }
} }
class CardThree extends React.Component{ class CardThree extends React.Component{
render(){ render(){
return( const data=this.props.data;
<div> if(data===null) {
<Card.Header return (
title={ <div>
<span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>是否锁定统计</span> <Card.Header
} title={
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}} <span style={{paddingRight: "0.75rem", fontWeight: "600"}}>是否锁定统计</span>
/> }
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}> style={{padding: "1.2rem 1.3rem", color: '#38c5b8'}}
<Flex style={{padding:"1rem 0"}}> />
<Flex.Item style={{marginRight:"0.75rem"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.7rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding: "1rem 0"}}>
<div>未锁定证数</div> <Flex.Item style={{marginRight: "0.75rem"}}>
<div>1</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>未锁定证数</div>
</Flex.Item> <div>1</div>
<Flex.Item> </Flex>
<Flex style={{justifyContent:"space-between"}}> </Flex.Item>
<div>已锁定证数</div> <Flex.Item>
<div>444</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>已锁定证数</div>
</Flex.Item> <div>444</div>
</Flex> </Flex>
<Flex style={{padding:"1rem 0"}}> </Flex.Item>
<Flex.Item style={{marginRight:"0.75rem"}}> </Flex>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding: "1rem 0"}}>
<div>已锁定比例</div> <Flex.Item style={{marginRight: "0.75rem"}}>
<div>99.78%</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>已锁定比例</div>
</Flex.Item> <div>99.78%</div>
<Flex.Item style={{marginLeft:"0.75rem"}}> </Flex>
<Flex style={{justifyContent:"space-between"}}> </Flex.Item>
<div>当日解锁次数</div> <Flex.Item style={{marginLeft: "0.75rem"}}>
<div>0</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>当日解锁次数</div>
</Flex.Item> <div>0</div>
</Flex> </Flex>
<Flex style={{padding:"1rem 0"}}> </Flex.Item>
<Flex.Item style={{marginRight:"0.75rem"}}> </Flex>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding: "1rem 0"}}>
<div>累计解锁次数</div> <Flex.Item style={{marginRight: "0.75rem"}}>
<div>104</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>累计解锁次数</div>
</Flex.Item> <div>104</div>
<Flex.Item> </Flex>
</Flex.Item> </Flex.Item>
</Flex> <Flex.Item>
</Flex.Item>
</Card.Body> </Flex>
</div>
); </Card.Body>
</div>
);
}else{
return (
<div>
<Card.Header
title={
<span style={{paddingRight: "0.75rem", fontWeight: "600"}}>是否锁定统计</span>
}
style={{padding: "1.2rem 1.3rem", color: '#38c5b8'}}
/>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.7rem"}}>
<Flex style={{padding: "1rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>未锁定证数</div>
<div>{data[0].weiSuoDingZhengShu}</div>
</Flex>
</Flex.Item>
<Flex.Item>
<Flex style={{justifyContent: "space-between"}}>
<div>已锁定证数</div>
<div>{data[0].yiSuoDingZhengShu}</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding: "1rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>已锁定比例</div>
<div>{data[0].yiSuoDingBiLi}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>当日解锁次数</div>
<div>{data[0].dangRiJieSuoCount}</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding: "1rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>累计解锁次数</div>
<div>{data[0].leiJiJieSuoCount}</div>
</Flex>
</Flex.Item>
<Flex.Item>
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}
} }
} }
...@@ -206,7 +340,7 @@ class CardFour extends React.Component{ ...@@ -206,7 +340,7 @@ class CardFour extends React.Component{
} }
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}} style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
/> />
<MyBodyCard data={this.props.data}/> {/*<MyBodyCard data={this.props.data}/>*/}
</div> </div>
); );
} }
...@@ -236,10 +370,7 @@ class CardFive extends React.Component{ ...@@ -236,10 +370,7 @@ class CardFive extends React.Component{
</Flex> </Flex>
</Card.Body> </Card.Body>
<CardFiveBody/> <CardFiveBody data={this.props.data}/>
<CardFiveBody/>
<CardFiveBody/>
<CardFiveBody/>
</div> </div>
); );
} }
...@@ -247,25 +378,76 @@ class CardFive extends React.Component{ ...@@ -247,25 +378,76 @@ class CardFive extends React.Component{
class CardFiveBody extends React.Component{ class CardFiveBody extends React.Component{
render(){ render(){
return( const data=this.props.data;
<div> if(data===null) {
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.6rem",minHeight:"0"}}> return (
<Flex style={{padding:"0.4rem 0"}}> <div>
<Flex.Item style={{flex:"2"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
01 <Flex style={{padding: "0.4rem 0"}}>
</Flex.Item> <Flex.Item style={{flex: "2"}}>
<Flex.Item style={{flex:"3"}}> 01
总产证数 </Flex.Item>
</Flex.Item> <Flex.Item style={{flex: "3"}}>
<Flex.Item style={{flex:"3"}}> 总产证数
445 </Flex.Item>
</Flex.Item> <Flex.Item style={{flex: "3"}}>
</Flex>
</Flex.Item>
</Card.Body> </Flex>
</div> </Card.Body>
); <Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "2"}}>
02
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
总面积
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}else{
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "2"}}>
01
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
总产证数
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{data[0].zongChanZhengCount}
</Flex.Item>
</Flex>
</Card.Body>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "2"}}>
02
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
总面积
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{data[0].xiangMuZongMJ}
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}
} }
} }
...@@ -293,10 +475,7 @@ class CardSix extends React.Component{ ...@@ -293,10 +475,7 @@ class CardSix extends React.Component{
</Flex> </Flex>
</Card.Body> </Card.Body>
<CardSixBody/> <CardSixBody data={this.props.data}/>
<CardSixBody/>
<CardSixBody/>
<CardSixBody/>
</div> </div>
); );
} }
...@@ -304,25 +483,70 @@ class CardSix extends React.Component{ ...@@ -304,25 +483,70 @@ class CardSix extends React.Component{
class CardSixBody extends React.Component{ class CardSixBody extends React.Component{
render(){ render(){
return( const data=this.props.data;
<div> if(data===null) {
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.6rem",minHeight:"0"}}> return (
<Flex style={{padding:"0.4rem 0"}}> <div>
<Flex.Item style={{flex:"2"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
01 <Flex style={{padding: "0.4rem 0"}}>
</Flex.Item> <Flex.Item style={{flex: "2"}}>
<Flex.Item style={{flex:"3"}}> 01
签约总成本 </Flex.Item>
</Flex.Item> <Flex.Item style={{flex: "3"}}>
<Flex.Item style={{flex:"3"}}> 签约总成本
1373515522.32 </Flex.Item>
</Flex.Item> <Flex.Item style={{flex: "3"}}>
</Flex> 0
</Flex.Item>
</Card.Body> </Flex>
<Flex style={{padding: "0.4rem 0"}}>
</div> <Flex.Item style={{flex: "2"}}>
); 02
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
结算总成本
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
0
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}else{
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "2"}}>
01
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
签约总成本
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{data[0].qianYueZongChengBen}
</Flex.Item>
</Flex>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "2"}}>
02
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
结算总成本
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{data[0].jieSuanZongChengBen}
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}
} }
} }
...@@ -350,10 +574,7 @@ class CardSeven extends React.Component{ ...@@ -350,10 +574,7 @@ class CardSeven extends React.Component{
</Flex> </Flex>
</Card.Body> </Card.Body>
<CardSevenBody/> <CardSevenBody data={this.props.data}/>
<CardSevenBody/>
<CardSevenBody/>
<CardSevenBody/>
</div> </div>
); );
} }
...@@ -361,100 +582,161 @@ class CardSeven extends React.Component{ ...@@ -361,100 +582,161 @@ class CardSeven extends React.Component{
class CardSevenBody extends React.Component{ class CardSevenBody extends React.Component{
render(){ render(){
return( const data=this.props.data;
<div> if(data===null) {
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.6rem",minHeight:"0"}}> return (
<Flex style={{padding:"0.4rem 0"}}> <div>
<Flex.Item style={{flex:"2"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
01 <Flex style={{padding: "0.4rem 0"}}>
</Flex.Item> <Flex.Item style={{flex: "2"}}>
<Flex.Item style={{flex:"3"}}> 01
安置房屋总套数 </Flex.Item>
</Flex.Item> <Flex.Item style={{flex: "3"}}>
<Flex.Item style={{flex:"3"}}> 安置房屋总套数
278 </Flex.Item>
</Flex.Item> <Flex.Item style={{flex: "3"}}>
</Flex> 0
</Flex.Item>
</Card.Body> </Flex>
<Flex style={{padding: "0.4rem 0"}}>
</div> <Flex.Item style={{flex: "2"}}>
); 02
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
安置房屋总面积
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
0
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}else{
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "2"}}>
01
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
安置房屋总套数
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{data[0].anZhiFangWuTaoShu}
</Flex.Item>
</Flex>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "2"}}>
02
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
安置房屋总面积
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{data[0].anZhiFangWuZongMJ}
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}
} }
} }
class CardEight extends React.Component{ class CardEight extends React.Component{
render(){ render(){
return( const data=this.props.data;
<div> if(data===null) {
<Card.Header return (
title={ <div>
<span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>基地房源统计</span> <Card.Header
} title={
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}} <span style={{paddingRight: "0.75rem", fontWeight: "600"}}>基地房源统计</span>
/> }
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.7rem"}}> style={{padding: "1.2rem 1.3rem", color: '#38c5b8'}}
<Flex style={{padding:"1rem 0"}}> />
<Flex.Item style={{marginRight:"0.75rem"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.7rem"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding: "1rem 0"}}>
<div>房源总套数</div> <Flex.Item style={{marginRight: "0.75rem"}}>
<div>610</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>房源总套数</div>
</Flex.Item> <div>0</div>
<Flex.Item> </Flex>
<Flex style={{justifyContent:"space-between"}}> </Flex.Item>
<div>签约使用套数</div> <Flex.Item>
<div>444</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>签约使用套数</div>
</Flex.Item> <div>0</div>
</Flex> </Flex>
<Flex style={{padding:"1rem 0"}}> </Flex.Item>
<Flex.Item style={{marginRight:"0.75rem"}}> </Flex>
<Flex style={{justifyContent:"space-between"}}> <Flex style={{padding: "1rem 0"}}>
<div>未使用套数</div> <Flex.Item style={{marginRight: "0.75rem"}}>
<div>312</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>未使用套数</div>
</Flex.Item> <div>0</div>
<Flex.Item style={{marginLeft:"0.75rem"}}> </Flex>
<Flex style={{justifyContent:"space-between"}}> </Flex.Item>
<div>已使用比例</div> <Flex.Item style={{marginLeft: "0.75rem"}}>
<div>48.85</div> <Flex style={{justifyContent: "space-between"}}>
</Flex> <div>已使用比例</div>
</Flex.Item> <div>0</div>
</Flex> </Flex>
<Flex style={{padding:"1rem 0"}}> </Flex.Item>
<Flex.Item style={{marginRight:"0.75rem"}}> </Flex>
<Flex style={{justifyContent:"space-between"}}> </Card.Body>
<div>未锁定建委锁定套数</div> </div>
<div>104</div> );
</Flex> }else{
</Flex.Item>
<Flex.Item> return (
<Flex style={{justifyContent:"space-between"}}> <div>
<div>裁决用房套数</div> <Card.Header
<div>30</div> title={
</Flex> <span style={{paddingRight: "0.75rem", fontWeight: "600"}}>基地房源统计</span>
</Flex.Item> }
</Flex> style={{padding: "1.2rem 1.3rem", color: '#38c5b8'}}
/>
<Flex style={{padding:"1rem 0"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.7rem"}}>
<Flex.Item style={{marginRight:"0.75rem"}}> <Flex style={{padding: "1rem 0"}}>
<Flex style={{justifyContent:"space-between"}}> <Flex.Item style={{marginRight: "0.75rem"}}>
<div>推进用房套数</div> <Flex style={{justifyContent: "space-between"}}>
<div>580</div> <div>房源总套数</div>
</Flex> <div>{data[0].anZhiFangWuTaoShu}</div>
</Flex.Item> </Flex>
<Flex.Item> </Flex.Item>
<Flex style={{justifyContent:"space-between"}}> <Flex.Item>
<div>房型</div> <Flex style={{justifyContent: "space-between"}}>
<div>0</div> <div>签约使用套数</div>
</Flex> <div>{data[0].qianYueShiYongTaoShu}</div>
</Flex.Item> </Flex>
</Flex> </Flex.Item>
</Flex>
</Card.Body> <Flex style={{padding: "1rem 0"}}>
</div> <Flex.Item style={{marginRight: "0.75rem"}}>
); <Flex style={{justifyContent: "space-between"}}>
<div>未使用套数</div>
<div>{data[0].weiShiYongTaoShu}</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>已使用比例</div>
<div>{data[0].yiShiYongBiLi}</div>
</Flex>
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}
} }
} }
...@@ -482,10 +764,7 @@ class CardNine extends React.Component{ ...@@ -482,10 +764,7 @@ class CardNine extends React.Component{
</Flex> </Flex>
</Card.Body> </Card.Body>
<CardNineBody/> <CardNineBody data={this.props.data}/>
<CardNineBody/>
<CardNineBody/>
<CardNineBody/>
</div> </div>
); );
} }
...@@ -493,39 +772,59 @@ class CardNine extends React.Component{ ...@@ -493,39 +772,59 @@ class CardNine extends React.Component{
class CardNineBody extends React.Component{ class CardNineBody extends React.Component{
render(){ render(){
return( const data=this.props.data;
<div> if(data===null) {
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.6rem",minHeight:"0"}}> return (
<Flex style={{padding:"0.4rem 0"}}> <div>
<Flex.Item style={{flex:"3"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
共乐路 <Flex style={{padding: "0.4rem 0"}}>
</Flex.Item>
<Flex.Item style={{flex:"2"}}> </Flex>
6
</Flex.Item> </Card.Body>
<Flex.Item style={{flex:"3"}}>
0 </div>
</Flex.Item> );
<Flex.Item style={{flex:"3"}}> }else{
6 return (
</Flex.Item> <div>
<Flex.Item style={{flex:"3"}}> <Card.Body style={{padding: "0 1.5rem", fontSize: "0.6rem", minHeight: "0"}}>
0 {data.map((item,index) => {
</Flex.Item> return(
</Flex> <Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "3"}}>
</Card.Body> {item.xiaoQuMingCheng}
</Flex.Item>
</div> <Flex.Item style={{flex: "2"}}>
); {item.taoShu}
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{item.yiShiYongTaoShu}
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{item.weiShiYongTaoShu}
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{item.yiShiYongBiLi}
</Flex.Item>
</Flex>);
})}
</Card.Body>
</div>
);
}
} }
} }
CardThreeContent.propTypes = { CardThreeContent.propTypes = {
home: PropTypes.object, search: PropTypes.object,
}; };
// 指定订阅数据,这里关联了 login // 指定订阅数据,这里关联了 login
function mapStateToProps({ home }) { function mapStateToProps({ search }) {
return {home}; return {search};
} }
export default connect(mapStateToProps)(CardThreeContent); export default connect(mapStateToProps)(CardThreeContent);
import React from 'react'; import React from 'react';
import { withRouter } from "react-router-dom";
import styles from './CardViewTwoStyles.less'; import styles from './CardViewTwoStyles.less';
import { import {
Badge, Badge,
...@@ -8,6 +9,17 @@ import { ...@@ -8,6 +9,17 @@ import {
WingBlank, WingBlank,
} from 'antd-mobile'; } from 'antd-mobile';
class MyBodyCard extends React.Component{ class MyBodyCard extends React.Component{
pushRoute=(item)=>{
try{
console.info(item);
this.props.history.push(`/SearchPage/${item.jDName}`);
}catch (e)
{
console.info(e);
}
};
render(){ render(){
const arrayData=this.props.data; const arrayData=this.props.data;
console.info(arrayData); console.info(arrayData);
...@@ -18,26 +30,27 @@ class MyBodyCard extends React.Component{ ...@@ -18,26 +30,27 @@ class MyBodyCard extends React.Component{
arrayData.map((item,index)=>{ arrayData.map((item,index)=>{
return ( return (
<div key={index}> <div key={index}>
<Card full> <Card full onClick={()=>this.pushRoute(item)}>
<Card.Header style={ {padding:"0",color:'#38c5b8',fontSize:"0.85rem"}} <Card.Header
title={ style={ {padding:"0",color:'#38c5b8',fontSize:"0.85rem"}}
<div style={ {padding:"1.2rem 1.3rem",color:'#38c5b8',width:"100%"}}> title={
<Flex style={{justifyContent:"space-between",alignItems:"flex-start"}}> <div style={ {padding:"1.2rem 1.3rem",color:'#38c5b8',width:"100%"}}>
<Flex.Item> <Flex style={{justifyContent:"space-between",alignItems:"flex-start"}}>
<Flex style={{alignItems:"flex-start"}}> <Flex.Item>
<p style={ {paddingRight:"0.75rem",color:'#666',fontWeight:"500"}}>{item.index>=10?item.index:`0${item.index}`}</p> <Flex style={{alignItems:"flex-start"}}>
<p style={{color:"#000"}}>{item.jDName}</p> <p style={ {paddingRight:"0.75rem",color:'#666',fontWeight:"500"}}>{item.index>=10?item.index:`0${item.index}`}</p>
</Flex> <p style={{color:"#000"}}>{item.jDName}</p>
</Flex.Item> </Flex>
<Flex.Item style={{textAlign:"right"}}> </Flex.Item>
<div style={{width:"6rem",display:"inline-block",borderRadius:"0.6rem",background:"#caf6f0",textAlign:"center",fontSize:"0.7rem"}}> <Flex.Item style={{textAlign:"right"}}>
<span style={ {paddingRight:"0.75rem",color:'#000',fontWeight:"500"}}>总证数</span> <div style={{width:"6rem",display:"inline-block",borderRadius:"0.6rem",background:"#caf6f0",textAlign:"center",fontSize:"0.7rem"}}>
<span style={{color:"#000"}}>{item.xiangMuZongHuShu}</span> <span style={ {paddingRight:"0.75rem",color:'#000',fontWeight:"500"}}>总证数</span>
</div> <span style={{color:"#000"}}>{item.xiangMuZongHuShu}</span>
</Flex.Item> </div>
</Flex> </Flex.Item>
</div> </Flex>
} </div>
}
/> />
<Card.Body> <Card.Body>
<Flex> <Flex>
...@@ -85,4 +98,4 @@ class MyBodyCard extends React.Component{ ...@@ -85,4 +98,4 @@ class MyBodyCard extends React.Component{
} }
} }
} }
export default MyBodyCard; export default withRouter(MyBodyCard);
...@@ -6,10 +6,9 @@ console.log('index.js'); ...@@ -6,10 +6,9 @@ console.log('index.js');
// 1. Initialize // 1. Initialize
const app = dva({ const app = dva({
history: createBrowserHistory({ history: createBrowserHistory({
// eslint-disable-next-line no-undef
basename: 'bm-wx',
}), }),
// history: createBrowserHistory({
// basename: '/bm-wx',
// }),
}); });
// 2. Plugins // 2. Plugins
...@@ -19,7 +18,7 @@ const app = dva({ ...@@ -19,7 +18,7 @@ const app = dva({
app.model(require('./models/login').default); app.model(require('./models/login').default);
app.model(require('./models/Home/home').default); app.model(require('./models/Home/home').default);
app.model(require('./models/middleselect').default); app.model(require('./models/middleselect').default);
app.model(require('./models/Home/search').default);
// 4. Router // 4. Router
app.router(require('./router').default); app.router(require('./router').default);
......
...@@ -17,18 +17,33 @@ export default { ...@@ -17,18 +17,33 @@ 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;
// 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);
// }
// 这是以后放到服务器时候用的代码,因为现在要测试,所以要先注释
const { pNumber } = payload; const { pNumber } = payload;
const coordinate = { const coordinate = {
containerType: 'module', containerType: 'module',
...@@ -43,21 +58,6 @@ export default { ...@@ -43,21 +58,6 @@ 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 }) {
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
const coordinate = { const coordinate = {
containerType: 'module', containerType: 'module',
containerName: 'QueryJiDiModule', containerName: 'QueryJiDiModule',
datasourceName: 'QueryJiDiName', datasourceName: 'QueryTotalDistrictName',
}; };
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}});
......
import { getData } from '../../utils/DataTemplate';
import {login} from "../../services/login";
import {setToken} from "../../utils/auth";
export default {
namespace: 'search',
state: {
todayQianYue:null,
todayCheXiao:null,
suoDingTongJi:null,
shiWuSuoTongJi:null,
jinDuTongJi:null,
chengBenTongJi:null,
shiYongFangYuanTongJi:null,
jiDiFangYuanTongJi:null,
xiaoQuTongJi:null,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
},
},
effects: {
*getResult({ payload }, { take, put, call, select }) {
const { pjName,datasourceName,stateName} = payload;
const coordinate = {
containerType : 'module' ,
containerName : 'QueryPJModule',
datasourceName:datasourceName,
};
try {
const resultss = yield call(getData, coordinate, { pst: 0, psz: 10 ,params:{pjName:pjName}});
console.info('查询的结果');
console.info(resultss);
yield put({ type: 'setResult',payload:{stateName,resultss} });
}catch (erroer){
console.info(erroer);
}
},
},
reducers: {
setResult(state,{payload}){
console.info(payload.stateName);
console.info(payload.resultss);
return {...state,[`${payload.stateName}`]:payload.resultss};
},
},
};
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
const wuqiang=yield call(checkYanZhengMa,telnum,YanZhengMa); const wuqiang=yield call(checkYanZhengMa,telnum,YanZhengMa);
if(wuqiang==="sucess") if(wuqiang==="sucess")
{ {
document.location="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3dcfb1de089346b3&redirect_uri=http%3a%2f%2fv4.free.ngrok.cc%2f&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect"; document.location="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3dcfb1de089346b3&redirect_uri=http%3a%2f%2fwww.shzdfwbc.net.cn%2fbm-wx%2f&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
}else{ }else{
alert("登陆失败"); alert("登陆失败");
} }
......
...@@ -2,6 +2,7 @@ import React from 'react'; ...@@ -2,6 +2,7 @@ import React from 'react';
import { Router, Route, Switch } from 'dva/router'; import { Router, Route, Switch } from 'dva/router';
import dynamic from 'dva/dynamic'; import dynamic from 'dva/dynamic';
import MiddleSelectPage from "./routes/MiddleSelectPage"; import MiddleSelectPage from "./routes/MiddleSelectPage";
//import SearchPage from "./routes/Home/SearchPage";
function RouterConfig({ history, app }) { function RouterConfig({ history, app }) {
const IndexPage = dynamic({ const IndexPage = dynamic({
...@@ -12,12 +13,17 @@ function RouterConfig({ history, app }) { ...@@ -12,12 +13,17 @@ function RouterConfig({ history, app }) {
app, app,
component: () => import('./routes/Home/HomePage'), component: () => import('./routes/Home/HomePage'),
}) ; }) ;
const SearchPage = dynamic({
app,
component: () => import('./routes/Home/SearchPage'),
}) ;
return ( return (
<Router history={history}> <Router history={history}>
<Switch> <Switch>
<Route path="/" exact component={MiddleSelectPage} /> <Route path="/" exact component={MiddleSelectPage} />
<Route path="/Home" exact component={HomePage} /> <Route path="/Home" component={HomePage} />
<Route path="/Login" exact component={IndexPage} /> <Route path="/Login" component={IndexPage} />
<Route path="/SearchPage/:pjName" component={SearchPage} />
</Switch> </Switch>
</Router> </Router>
); );
......
...@@ -18,6 +18,7 @@ import MyBodyCard from "../../components/CardViewTwo"; ...@@ -18,6 +18,7 @@ import MyBodyCard from "../../components/CardViewTwo";
class HomePage extends React.Component{ class HomePage extends React.Component{
componentWillMount() { componentWillMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ type: 'home/getSummary',payload: { pNumber:'浦东新区' }});
dispatch({ type: 'home/getSummaryData',payload: { pNumber:'浦东新区' }}); dispatch({ type: 'home/getSummaryData',payload: { pNumber:'浦东新区' }});
} }
onChange=(value)=>{ onChange=(value)=>{
...@@ -25,6 +26,7 @@ class HomePage extends React.Component{ ...@@ -25,6 +26,7 @@ class HomePage extends React.Component{
const { dispatch } = this.props; const { dispatch } = this.props;
let objS = document.getElementById("pid"); let objS = document.getElementById("pid");
let district = objS.options[objS.selectedIndex].value; let district = objS.options[objS.selectedIndex].value;
dispatch({ type: 'home/getSummary',payload: { pNumber:district }});
dispatch({ type: 'home/getSummaryData',payload: { pNumber:district }}); dispatch({ type: 'home/getSummaryData',payload: { pNumber:district }});
}; };
render(){ render(){
...@@ -32,21 +34,33 @@ class HomePage extends React.Component{ ...@@ -32,21 +34,33 @@ class HomePage extends React.Component{
<Page> <Page>
<span className={styles.myspan}> <span className={styles.myspan}>
<Select id="pid" data={[ <Select id="pid" data={[
{
value: '浦东新区',
label: '浦东新区'
},
{ {
value: '杨浦区', value: '杨浦区',
label: '杨浦区' label: '杨浦区'
}, },
{ {
value: '浦东新区', value: '宝山区',
label: '浦东新区' label: '宝山区'
}, },
{ {
value: '徐汇区', value: '徐汇区',
label: '徐汇区' label: '徐汇区'
},
{
value: '青浦区',
label: '青浦区'
},
{
value: '嘉定区',
label: '嘉定区'
} }
]} onChange={this.onChange}/> ]} onChange={this.onChange}/>
</span> </span>
<MyTopCard/> <MyTopCard data={this.props.home.Summary}/>
<MyBodyCard data={this.props.home.SummaryData}/> <MyBodyCard data={this.props.home.SummaryData}/>
</Page> </Page>
); );
......
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'dva';
import {
Select,
Page,
} from 'react-weui';
//import styles
import 'weui';
import styles from '../IndexPage.css';
import 'react-weui/build/packages/react-weui.css';
import MyTopCard from '../../components/CardViewThree';
class SearchPage extends React.Component{
constructor(props) {
super(props);
console.info(props.match.params);
}
componentWillMount() {
const { dispatch } = this.props;
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryTodayQianYue',stateName:'todayQianYue' }});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryTodayCheXiao',stateName:'todayCheXiao'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QuerySuoDingTongJi',stateName:'suoDingTongJi'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryShiWuSuoTongJi',stateName:'shiWuSuoTongJi'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryJinDuTongJi',stateName:'jinDuTongJi'}});
dispatch({ type: 'search/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryChengBenTongJi',stateName:'chengBenTongJi'}});
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:'QueryXiaoQuTongJi',stateName:'xiaoQuTongJi'}});
}
render(){
return (
<Page>
<div style={{padding:"0 26px", backgroundColor:"#38c5b8"}}>
<span className={styles.myspan}>
<Select style={{color:"#fff"}} data={[
{
value: `${this.props.match.params.pjName}`,
label: `${this.props.match.params.pjName}`
},
]}/>
</span>
</div>
<MyTopCard/>
</Page>
);
};
}
SearchPage.propTypes = {
search: PropTypes.object,
};
// 指定订阅数据,这里关联了 login
function mapStateToProps({ search }) {
return {search};
}
export default connect(mapStateToProps)(SearchPage);
...@@ -20,6 +20,10 @@ table.mytable td{ ...@@ -20,6 +20,10 @@ table.mytable td{
} }
h1.myTitle{ h1.myTitle{
text-align: center; text-align: center;
font-size: 1.6rem;
color: #fff;
margin-top: 145px;
margin-bottom: 47px;
} }
span.myspan{ span.myspan{
vertical-align:middle; vertical-align:middle;
...@@ -27,6 +31,7 @@ span.myspan{ ...@@ -27,6 +31,7 @@ span.myspan{
background-color: #38c5b8; background-color: #38c5b8;
margin:0px; margin:0px;
z-index:1; z-index:1;
font-size: 0.75rem;
} }
select { select {
/*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/ /*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
...@@ -38,7 +43,7 @@ select { ...@@ -38,7 +43,7 @@ select {
/*在选择框的最右侧中间显示小箭头图片*/ /*在选择框的最右侧中间显示小箭头图片*/
background: url(../assets/downselect.png) no-repeat scroll right center transparent; background: url(../assets/downselect.png) no-repeat scroll right center transparent;
/*为下拉小箭头留出一点位置,避免被文字覆盖*/ /*为下拉小箭头留出一点位置,避免被文字覆盖*/
padding-right: 14px; padding-right: 20px;
direction: rtl; direction: rtl;
} }
...@@ -71,3 +76,73 @@ select::-ms-expand { display: none; } ...@@ -71,3 +76,73 @@ select::-ms-expand { display: none; }
background-color:#caf6f0 ; background-color:#caf6f0 ;
color:#000000; color:#000000;
} }
/*------body的背景颜色--------*/
.bodyBackground{
background: -webkit-linear-gradient(120deg, #4b85bf 0%, #35aca1 100%); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(120deg, #4b85bf 0%, #35aca1 100%); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(120deg, #4b85bf 0%, #35aca1 100%); /* Firefox 3.6 - 15 */
background: linear-gradient(120deg, #4b85bf 0%, #35aca1 100%); /* 标准的语法(必须放在最后) */
}
/*-------------中间表格最外层-----------*/
.formWrapStyle{
margin: 0 50px;
background: transparent;
}
.formWrapStyle:before,.formWrapStyle:after{
border: none;
}
.formInputBorderOne:before,.formInputBorderTwo:before{
border: none;
}
.formInputBorderOne,.formInputBorderTwo{
border: 1px solid #fff;
border-radius: 40px;
}
.formInputBorderOne{
margin-bottom: 12px;
}
/*--------按钮样式--------*/
.buttonWrapStyle{
margin: 0 50px;
}
.buttonStyle{
border-radius: 40px;
background: #38c5b8;
margin-top: 12px;
margin-bottom: 30px;
}
.accountIcon{
display: inline-block;
width: 25px;
height: 25px;
vertical-align: middle;
margin-left: 8px;
margin-right: 13px;
background: url(../assets/account.png) no-repeat 0 0;
background-size: cover;
}
.passwordIcon{
display: inline-block;
width: 25px;
height: 25px;
vertical-align: middle;
margin-left: 8px;
margin-right: 13px;
background: url(../assets/password.png) no-repeat 0 0;
background-size: cover;
}
/*placeholder样式*/
input::-webkit-input-placeholder {
color: #fff;
}
input:-moz-placeholder {
color: #fff;
}
...@@ -55,39 +55,41 @@ class IndexPage extends React.Component{ ...@@ -55,39 +55,41 @@ class IndexPage extends React.Component{
}; };
render(){ render(){
return ( return (
<Page>
<Page className={styles.bodyBackground}>
<h1 className={styles.myTitle}>上海征地房屋补偿</h1> <h1 className={styles.myTitle}>上海征地房屋补偿</h1>
<Form> <Form className={styles.formWrapStyle}>
<FormCell> <FormCell className={styles.formInputBorderOne}>
<CellHeader> <CellHeader>
<Label>手机号</Label> <Label style={{width:"auto"}}><span className={styles.accountIcon}/></Label>
</CellHeader> </CellHeader>
<CellBody> <CellBody>
<Icon value="warn" /> <Icon value="warn" />
<Input type="tel" placeholder={this.props.login.telnum} onBlur={(event)=>this.telCheck(event)}/> <Input type="tel" onBlur={(event)=>this.telCheck(event)} style={{color:"#fff"}} placeholder="手机号"/>
</CellBody> </CellBody>
</FormCell> </FormCell>
<FormCell vcode> <FormCell className={styles.formInputBorderTwo}>
<CellHeader> <CellHeader>
<Label>验证码</Label> <Label style={{width:"auto"}}><span className={styles.passwordIcon}/></Label>
</CellHeader> </CellHeader>
<CellBody> <CellBody>
<Input type="tel" placeholder="" onBlur={(event)=>this.telYanZhengMa(event)}/> <Input type="tel" placeholder="验证码" onBlur={(event)=>this.telYanZhengMa(event)} style={{color:"#fff"}}/>
</CellBody> </CellBody>
<CellFooter> <CellFooter>
<Button type="vcode" onClick={this.sendCheckNum}>发送</Button> <Button type="vcode" onClick={this.sendCheckNum}>发送</Button>
</CellFooter> </CellFooter>
</FormCell> </FormCell>
</Form> </Form>
<ButtonArea> <ButtonArea className={styles.buttonWrapStyle}>
<Button <Button
className={styles.buttonStyle}
//button to display toptips //button to display toptips
onClick={ this.registerClick}> onClick={ this.registerClick}>
注册 立即登陆
</Button> </Button>
</ButtonArea> </ButtonArea>
<Footer> <Footer>
<FooterText> <FooterText style={{color:"#fff"}}>
Copyright © 2017-2018 www.proland.org.cn Copyright © 2017-2018 www.proland.org.cn
</FooterText> </FooterText>
</Footer> </Footer>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论