UNPKG

app-base-web

Version:
72 lines (70 loc) 2.47 kB
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 = "TsLog/"; 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.logType}</span></Col> </Row> <Row> <Col xs={12}><label>调度Id</label><span>{this.state.schedulerId}</span></Col> <Col xs={12}><label>调度名称</label><span>{this.state.schedulerName}</span></Col> </Row> <Row> <Col xs={12}><label>任务组Id</label><span>{this.state.groupId}</span></Col> <Col xs={12}><label>任务组名称</label><span>{this.state.groupName}</span></Col> </Row> <Row> <Col xs={12}><label>任务ID</label><span>{this.state.taskId}</span></Col> <Col xs={12}><label>任务名称</label><span>{this.state.taskName}</span></Col> </Row> <Row> <Col xs={24}><label>任务类型</label><span>{UtilDic.json("ts", "任务类型")[this.state.type]}</span></Col> </Row> <Row> <Col xs={24}><label>结束时间</label><span>{this.state.endTime}</span></Col> </Row> <Row> <Col xs={24}><label>耗时</label><span>{this.state.timeConsuming}</span></Col> </Row> <Row> <Col xs={24}><label>执行结果</label> <div dangerouslySetInnerHTML={{ __html: this.state.result }} ></div> </Col> </Row> <Row> <Col xs={24}><label>执行状态</label><span>{UtilDic.json("ts", "执行状态")[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> ); } }