app-base-web
Version:
web development common base package.
66 lines (65 loc) • 2.95 kB
JavaScript
import React from 'react';
import { Form, Row, Col, Button } from 'antd';
import api from '../../../library/util-axios';
// 系统配置-数字字典
const title = "数字字典";
const url = "CfgDictionary/";
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>所属应用<i>*</i></label><span>{this.state.app}</span></Col>
</Row>
<Row>
<Col xs={12}><label>字典分类</label><span>{this.state.type}</span></Col>
<Col xs={12}><label>二级分类</label><span>{this.state.subType}</span></Col>
</Row>
<Row>
<Col xs={24}><label>字典值</label><span>{this.state.value}</span></Col>
</Row>
<Row>
<Col xs={24}><label>中文字典</label><span>{this.state.zh_CN}</span></Col>
</Row>
<Row>
<Col xs={24}><label>英文字典</label><span>{this.state.en_US}</span></Col>
</Row>
{/* <Row>
<Col className="ant-form-item-view" xs={{span:24,offset:2}} sm={24} md={24} lg={24} xl={24} xxl={24}><label>繁体字典</label><span>{this.state.tw_CN}</span></Col>
</Row>
<Row>
<Col className="ant-form-item-view" xs={{span:24,offset:2}} sm={24} md={24} lg={24} xl={24} xxl={24}><label>希伯来字典</label><span>{this.state.iw_IL}</span></Col>
</Row> */}
<Row>
<Col xs={24}><label>排序号</label><span>{this.state.ord}</span></Col>
</Row>
<Row>
<Col xs={24}><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>
);
}
}