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

init commit to new server

上级 47796fcc
import React from 'react';
//import styles from './CardViewStyles.less';
import PropTypes from 'prop-types';
import { connect } from 'dva';
import {
Card,
WhiteSpace,
Flex,
} from 'antd-mobile';
class CardThreeContent extends React.Component{
render(){
const {todayQianYue, todayCheXiao, suoDingTongJi, jinDuTongJi, chengBenTongJi, shiYongFangYuanTongJi, jiDiFangYuanTongJi, xiaoQuTongJi}=this.props.base;
return(
<div>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<Card full>
<CardOne data={todayQianYue}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardTwo data={todayCheXiao}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardThree data={suoDingTongJi}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardFive data={jinDuTongJi}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardSix data={chengBenTongJi}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<CardSeven data={shiYongFangYuanTongJi}/>
<WhiteSpace size="lg" style={{background:"#eee"}} />
</Card>
</div>
);
}
}
class CardOne extends React.Component{
render(){
const data=this.props.data;
if(data===null){
return(
<div>
<Card.Header
title={
<span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>当日签约统计</span>
}
extra={
<span></span>
}
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
/>
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.8rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>已签约户数</div>
<div>0</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>产权调换人数</div>
<div>0</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{marginRight:"0.75rem"}}>
<Flex style={{justifyContent:"space-between"}}>
<div>货币补偿人数</div>
<div>0</div>
</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.8rem"}}>
<Flex style={{padding:"0.4rem 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:"0.4rem 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>
);
}
}
}
class CardTwo extends React.Component{
render(){
const data=this.props.data;
if(data===null) {
return (
<div>
<Card.Header
title={
<span style={{paddingRight: "0.75rem", fontWeight: "600"}}>当日撤销统计</span>
}
extra={
<span>0</span>
}
style={{padding: "1.2rem 1.3rem", color: '#38c5b8'}}
/>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem"}}>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>翻协议次数</div>
<div>0</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>翻协议总次数()</div>
<div>0</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>行政撤销次数</div>
<div>0</div>
</Flex>
</Flex.Item>
<Flex.Item>
<Flex style={{justifyContent: "space-between"}}>
<div>行政撤销总次数</div>
<div>0</div>
</Flex>
</Flex.Item>
</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.8rem"}}>
<Flex style={{padding: "0.4rem 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{
render(){
const data=this.props.data;
if(data===null) {
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.8rem"}}>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>未锁定证数</div>
<div>1</div>
</Flex>
</Flex.Item>
<Flex.Item>
<Flex style={{justifyContent: "space-between"}}>
<div>已锁定证数</div>
<div>444</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>已锁定比例</div>
<div>99.78%</div>
</Flex>
</Flex.Item>
<Flex.Item style={{marginLeft: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>当日解锁次数</div>
<div>0</div>
</Flex>
</Flex.Item>
</Flex>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{marginRight: "0.75rem"}}>
<Flex style={{justifyContent: "space-between"}}>
<div>累计解锁次数</div>
<div>104</div>
</Flex>
</Flex.Item>
<Flex.Item>
</Flex.Item>
</Flex>
</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.8rem"}}>
<Flex style={{padding: "0.4rem 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: "0.4rem 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: "0.4rem 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>
);
}
}
}
class CardFive extends React.Component{
render(){
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.8rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{flex:"2"}}>
序号
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
项目名称
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
数值
</Flex.Item>
</Flex>
</Card.Body>
<CardFiveBody data={this.props.data}/>
</div>
);
}
}
class CardFiveBody extends React.Component{
render(){
const data=this.props.data;
if(data===null) {
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem", 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"}}>
0
</Flex.Item>
</Flex>
</Card.Body>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem", 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"}}>
0
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}else{
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem", 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.8rem", 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>
);
}
}
}
class CardSix extends React.Component{
render(){
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.8rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{flex:"2"}}>
序号
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
项目名称
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
数值
</Flex.Item>
</Flex>
</Card.Body>
<CardSixBody data={this.props.data}/>
</div>
);
}
}
class CardSixBody extends React.Component{
render(){
const data=this.props.data;
if(data===null) {
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem", 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"}}>
0
</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"}}>
0
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}else{
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem", 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>
);
}
}
}
class CardSeven extends React.Component{
render(){
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.8rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{flex:"2"}}>
序号
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
基地名称
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
数值
</Flex.Item>
</Flex>
</Card.Body>
<CardSevenBody data={this.props.data}/>
</div>
);
}
}
class CardSevenBody extends React.Component{
render(){
const data=this.props.data;
if(data===null) {
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem", 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"}}>
0
</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"}}>
0
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}else{
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem", 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>
);
}
}
}
CardThreeContent.propTypes = {
base: PropTypes.object,
};
// 指定订阅数据,这里关联了 login
function mapStateToProps({ base }) {
return {base};
}
export default connect(mapStateToProps)(CardThreeContent);
import React from 'react';
import {
Card,
WhiteSpace,
Flex,
} from 'antd-mobile';
import { withRouter } from "react-router-dom";
class CardViewFour extends React.Component{
render(){
return(
<div>
<WhiteSpace size="lg" style={{background:"#eee"}} />
<Card full>
<Card.Header
title={
<span style={ {paddingRight:"0.75rem",fontWeight:"600"}}>基地列表</span>
}
extra={
<span></span>
}
style={ {padding:"1.2rem 1.3rem",color:'#38c5b8'}}
/>
<CardTh data={this.props.data} />
</Card>
</div>
);
}
}
class CardTh extends React.Component{
render(){
const data = this.props.data;
if (data !== null){
return(
<div>
<Card.Body style={{padding:"0 1.5rem",fontSize:"0.8rem"}}>
<Flex style={{padding:"0.4rem 0"}}>
<Flex.Item style={{flex:"2"}}>
序号
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
基地名称
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
总户数
</Flex.Item>
<Flex.Item style={{flex:"3"}}>
已签约户数
</Flex.Item>
</Flex>
</Card.Body>
{data.map((item,index)=>(
<CardThBodyWithRouter item={item} key={index} index={index}/>
))}
</div>
);
}else {
return(
<div>
</div>
);
}
}
}
class CardThBody extends React.Component{
pushRoute=(item)=>{
try{
console.info(this.props.history);
this.props.history.push(`/BasePage/${item.jDName}`);
}catch (e)
{
console.info(e);
}
}
render(){
const item=this.props.item;
const index=this.props.index;
return (
<div>
<Card.Body style={{padding: "0 1.5rem", fontSize: "0.8rem", minHeight: "0"}} onClick={()=>this.pushRoute(item)}>
<Flex style={{padding: "0.4rem 0"}}>
<Flex.Item style={{flex: "2"}}>
{index+1}
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{item.jDName}
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{item.xiangMuZongHuShu}
</Flex.Item>
<Flex.Item style={{flex: "3"}}>
{item.yiQianYueHuShu}
</Flex.Item>
</Flex>
</Card.Body>
</div>
);
}
}
const CardThBodyWithRouter = withRouter(CardThBody)
export default CardViewFour;
import { getData } from '../../utils/DataTemplate';
export default {
namespace: 'base',
state: {
todayQianYue:null,
todayCheXiao:null,
suoDingTongJi: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 : 'QueryJDModules',
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};
},
},
};
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/BaseViewBody';
class BasePage extends React.Component{
constructor(props) {
super(props);
console.info(props.match.params);
}
componentWillMount() {
const { dispatch } = this.props;
dispatch({ type: 'base/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryTodayQianYue',stateName:'todayQianYue' }});
dispatch({ type: 'base/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryTodayCheXiao',stateName:'todayCheXiao'}});
dispatch({ type: 'base/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QuerySuoDingTongJi',stateName:'suoDingTongJi'}});
dispatch({ type: 'base/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryJinDuTongJi',stateName:'jinDuTongJi'}});
dispatch({ type: 'base/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryChengBenTongJi',stateName:'chengBenTongJi'}});
dispatch({ type: 'base/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryShiYongFangYuanTongJi',stateName:'shiYongFangYuanTongJi'}});
dispatch({ type: 'base/getResult',payload: { pjName:this.props.match.params.pjName,datasourceName:'QueryJiDiFangYuanTongJi',stateName:'jiDiFangYuanTongJi'}});
dispatch({ type: 'base/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 search={this.props.base}/>
</Page>
);
};
}
BasePage.propTypes = {
base: PropTypes.object,
};
// 指定订阅数据,这里关联了 login
function mapStateToProps({ base }) {
return {base};
}
export default connect(mapStateToProps)(BasePage);
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论