app-base-web
Version:
web development common base package.
61 lines (58 loc) • 2.08 kB
JavaScript
import React from 'react';
import { Table, Form, Row, Col, Button, Input, message } from 'antd';
import api from '../../../library/util-axios';
// 系统配置-运行时参数
const title = "运行时参数";
const url = "CfgRuntime/";
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>所属应用</label><span>{this.state.app}</span></Col>
</Row>
<Row>
<Col xs={24}><label>配置名称</label><span>{this.state.name}</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.loadType}</span></Col>
</Row>
<Row>
<Col xs={24}><label>运行类型</label><span>{this.state.runType}</span></Col>
</Row>
<Row>
<Col xs={24}><label>销毁类型</label><span>{this.state.destroyType}</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>
);
}
}