提交 d1c544b1 authored 作者: 何守志's avatar 何守志

tijiao

上级 e00d4cbc
......@@ -7,9 +7,10 @@ import {
WhiteSpace,
Flex,
} from 'antd-mobile';
class CardThreeContent extends React.Component{
import CardViewFour from './CardViewFour';
class CardViewThree extends React.Component{
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(
<div>
<WhiteSpace size="lg" style={{background:"#eee"}} />
......@@ -30,6 +31,7 @@ class CardThreeContent extends React.Component{
<CardEight data={jiDiFangYuanTongJi}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardNine data={xiaoQuTongJi}/>
<CardViewFour data={xiangMuLieBiao}/>
</Card>
</div>
);
......@@ -329,7 +331,7 @@ class CardFive extends React.Component{
<div>
<Card.Header
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'}}
/>
......@@ -634,7 +636,7 @@ class CardEight extends React.Component{
<div>
<Card.Header
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'}}
/>
......@@ -676,7 +678,7 @@ class CardEight extends React.Component{
<div>
<Card.Header
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'}}
/>
......@@ -797,11 +799,11 @@ class CardNineBody extends React.Component{
}
}
CardThreeContent.propTypes = {
CardViewThree.propTypes = {
search: PropTypes.object,
};
// 指定订阅数据,这里关联了 login
function mapStateToProps({ search }) {
return {search};
}
export default connect(mapStateToProps)(CardThreeContent);
export default connect(mapStateToProps)(CardViewThree);
......@@ -7,8 +7,8 @@ console.log('index.js');
const app = dva({
history: createBrowserHistory({
// eslint-disable-next-line no-undef
basename: 'bm-wx',
//basename: '/',
//basename: 'bm-wx',
basename: '/',
}),
});
......
......@@ -17,36 +17,21 @@ export default {
effects: {
*getSummaryData({ payload }, { take, put, call, select }) {
// const payloads = { userName:'admin',password:'admin', type: 'userName', authType: 'password' };
// try{
// const result = yield call(login, payloads);
// console.info(result);
// const { tokenId } = result;
// yield call(setToken, tokenId);// 这里的yield ,跟C#中的await一样
// }
// catch (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 payloads = { userName:'admin',password:'admin', type: 'userName', authType: 'password' };
try{
const result = yield call(login, payloads);
console.info(result);
const { tokenId } = result;
yield call(setToken, tokenId);// 这里的yield ,跟C#中的await一样
}
catch (erroer) {
console.info(erroer);
}
const { pNumber } = payload;
const coordinate = {
let coordinate;
coordinate= {
containerType: 'module',
containerName: 'QueryJiDiModule',
datasourceName: 'QueryDistrictName',
......@@ -59,6 +44,21 @@ export default {
}catch (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 }) {
......
......@@ -12,6 +12,7 @@ export default {
shiYongFangYuanTongJi:null,
jiDiFangYuanTongJi:null,
xiaoQuTongJi:null,
xiangMuLieBiao:null,
},
subscriptions: {
......@@ -36,6 +37,24 @@ export default {
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: {
......@@ -44,6 +63,9 @@ export default {
console.info(payload.resultss);
return {...state,[`${payload.stateName}`]:payload.resultss};
},
setXM(state,{payload}){
return {...state,xiangMuLieBiao:payload.resultss};
}
},
};
......@@ -17,6 +17,10 @@ function RouterConfig({ history, app }) {
app,
component: () => import('./routes/Home/SearchPage'),
}) ;
const BasePage = dynamic({
app,
component: () => import('./routes/Home/BasePage'),
}) ;
return (
<Router history={history}>
......@@ -25,6 +29,7 @@ function RouterConfig({ history, app }) {
<Route path="/Home" component={HomePage} />
<Route path="/Login" component={IndexPage} />
<Route path="/SearchPage/:pjName" component={SearchPage} />
<Route path="/BasePage/:pjName" component={BasePage} />
</Switch>
</Router>
);
......
......@@ -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:'QueryJiDiFangYuanTongJi',stateName:'jiDiFangYuanTongJi'}});
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(){
return (
......@@ -41,7 +42,7 @@ class SearchPage extends React.Component{
]}/>
</span>
</div>
<MyTopCard/>
<MyTopCard search={this.props.search}/>
</Page>
);
};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论