UNPKG

app-base-web

Version:
63 lines (60 loc) 2.68 kB
import React from 'react'; import { Table, Form, Row, Col, Button, Input, message } from 'antd'; import UtilDate from '../../../library/util-date'; import UtilDic from '../../../library/util-dic'; import File from '../../../library/file'; import api from '../../../library/util-axios'; // 发布管理-图片发布 const title = "图片发布"; const url = "IssueImage/"; 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={24}><label className="label">图片名称</label><span>{this.state.name}</span></Col> {/* <Col xs={12}><label className="label">系统名称</label><span>{this.state.systemName}</span></Col> */} <Col xs={12}><label className="label">图片类型</label><span>{this.state.fileType}</span></Col> </Row> <Row> <Col xs={12}><label className="label">业务类型</label><span>{UtilDic.json("app", "imageType")[this.state.type]}</span></Col> <Col xs={12}><label className="label">业务子类型</label><span>{this.state.subType}</span></Col> </Row> <Row> <Col xs={24}><label className="label">图片链接</label><span><File cls="simpleFile" fileList={this.state.url} hide="true" /></span></Col> </Row> <Row> <Col xs={24}><label className="label">图片描述</label><span>{this.state.memo}</span></Col> </Row> <Row> <Col xs={12}><label className="label">排序时间</label><span>{UtilDate.getDate(this.state.time)}</span></Col> {/* <Col xs={12}><label className="label">图片高度</label><span>{this.state.height}</span></Col> <Col xs={12}><label className="label">图片宽度</label><span>{this.state.width}</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> ); } }