import React from 'react' import * as mobx from 'mobx' import { inject, observer } from 'mobx-react' import { WeaTop, WeaTab, WeaFormItem, WeaDialog, WeaSearchGroup, WeaProgress } from 'ecCom' import { Row, Col, Spin, Modal, Button, message, Switch } from 'antd' import { WeaSwitch, WeaTableNew } from 'comsMobx' import { i18n } from '../../public/i18n'; import '../../style/common.less'; const toJS = mobx.toJS; const confirm = Modal.confirm; const WeaTable = WeaTableNew.WeaTable; export default class LogView extends React.Component { constructor(props) { super(props); this.state = ({ height: 502, width: 1075, showSearchAd: false, //**** */ detailDialogTitle: "", detailVisible: false, record:{} }) } componentWillMount() { } componentDidMount() { } componentWillReceiveProps(nextProps) { this.setState({ showSearchAd: false }) if (this.props.keys !== nextProps.keys) { nextProps.logViewStore.init(nextProps.logMoudleType); } } doView(record) { this.setState({ record:record, detailVisible: true, detailDialogTitle: record.operate_typespan + " - " + record.operate_module_name + " : "+record.value }) } reRenderColumns(columns) { let _this = this; columns.forEach((c, index) => { if (c.dataIndex == 'message') { c.render = function (text, record) { return { _this.doView(record) }}>{i18n.label.view()} } }; }) } getPanelComponents() { const { logViewStore } = this.props; const { searchCondition, form, searchConditionLoading } = logViewStore; let arr = []; let formParams = form.getFormParams(); const { isFormInit } = form; isFormInit && searchCondition.map(c => { c.items.map((field, index) => { arr.push(
{}
) }) }) if (searchConditionLoading) { return (
) } else { return { if (e.keyCode == 13 && e.target.tagName === "INPUT") { logViewStore.getTableInfo(); this.setState({ showSearchAd: false }) } }}>{arr} } } getTabBtn() { const { logViewStore } = this.props; const { form } = logViewStore; const btn = [ (), (), (), ]; return btn; } render() { const { visible, onCancel, logViewStore } = this.props, { tableStore, conditionNum } = logViewStore, { height, width, showSearchAd, detailDialogTitle, detailVisible,record } = this.state; return (
onCancel()} style={{ height: height, width: width}} initLoadCss className="logWrapper" > { this.setState({ showSearchAd: bool }) }} advanceHeight={161} searchsAd={showSearchAd ? this.getPanelComponents() :
} buttonsAd={this.getTabBtn()} />
this.reRenderColumns(c)} />
this.setState({ detailVisible: false })} style={{ height: 676, width: 1000 }} >
{/* */}
{i18n.label.voParameters()}
) } }