app-base-web
Version:
web development common base package.
69 lines (67 loc) • 2.31 kB
JavaScript
import React from 'react';
import { Form, Row, Col, Button } from 'antd';
import api from '../../../library/util-axios';
import UtilDic from '../../../library/util-dic';
// 信息管理-短信管理
const title = "短信管理";
const url = "MsgShort/";
export default class FormView extends React.Component {
constructor(props) {
super(props);
this.state = {
...props.values
};
}
componentDidMount() {
let me = this;
api.get(url + "getModel?id=" + this.state.id, {}, function (rs) {
me.setState({
...rs.data
})
});
}
render() {
return (
<Form className="form-view">
<div className="form-title">
<i>{title} - 详情</i>
{/* <span><Button className="btn-edit" onClick={(e) => { this.props.onEdit(this.state) }}><i className="iconfont icon-edit"></i>编辑</Button></span> */}
</div>
<div className="form-content" style={{ height: this.props.height }}>
<Row>
<Col xs={12}><label>业务ID</label><span>{this.state.parentId}</span></Col>
<Col xs={12}><label>业务名称</label><span>{this.state.parentName}</span></Col>
</Row>
<Row>
<Col xs={24}><label>发送人Id</label><span>{this.state.senderId}</span></Col>
</Row>
<Row>
<Col xs={24}><label>发送手机号</label><span>{this.state.sendMobile}</span></Col>
</Row>
<Row>
<Col xs={24}><label>接收人Id</label><span>{this.state.recipientId}</span></Col>
</Row>
<Row>
<Col xs={24}><label>接收手机号</label><span>{this.state.receiveMobile}</span></Col>
</Row>
<Row>
<Col xs={24}><label>内容</label><span>{this.state.content}</span></Col>
</Row>
<Row>
<Col xs={12}><label>发送时间</label><span>{this.state.sendTime}</span></Col>
<Col xs={12}><label>发送码</label><span>{this.state.code}</span></Col>
</Row>
<Row>
<Col xs={24}><label>发送结果</label><span>{this.state.sendResult}</span></Col>
</Row>
<Row>
<Col xs={24}><label>短信状态</label><span>{UtilDic.json("app", "短信状态")[this.state.state]}</span></Col>
</Row>
</div>
<div className="form-toolbar">
<Button className="btn-return" onClick={this.props.onReturn}><i className="iconfont icon-return"></i>返回</Button>
</div>
</Form>
);
}
}