UNPKG

app-base-web

Version:
58 lines (56 loc) 2.21 kB
import React from 'react'; import { Form, Row, Col, Button, Input, message, Switch, DatePicker } from 'antd'; import api from '../../../library/util-axios'; import UtilDate from '../../../library/util-date' // 留言管理-会员留言 const title = "会员留言" const url = "Feedback/" 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={{span: 10, offset: 2}}><label>会员名称</label><span>{this.state.userId}</span></Col> <Col xs={{span: 10, offset: 2}}><label>状态</label><span><Switch checkedChildren="" unCheckedChildren="" checked={Boolean(this.state.state)}/></span></Col> </Row> <Row> <Col xs={{span: 10, offset: 2}}><label>手机号码</label><span>{this.state.mobile}</span></Col> <Col xs={{ span: 10, offset: 2 }}><label>留言时间</label><span>{UtilDate.getDate(this.state.createTime)}</span></Col> </Row> <Row> <Col xs={{span: 22, offset: 2}}><label>意见反馈内容</label><span>{this.state.content}</span></Col> </Row> <Row> <Col xs={{span: 22, offset: 2}}><label>备注信息</label><span>{this.state.memo}</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> ) } }