import React from 'react' import * as mobx from 'mobx' import { inject, observer } from 'mobx-react' import { WeaTop, WeaTab, WeaFormItem, WeaDialog, WeaSearchGroup } 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: 402, width: 1075, dialogTitle: '日志查看', }) } componentWillMount() { } componentDidMount() { } componentWillReceiveProps(nextProps) { if (this.props.keys !== nextProps.keys) { nextProps.logViewStore.init(nextProps.logMoudleType); } } 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(); logViewStore.setPanelStatus(false) } }}>{arr} } } getTabBtn() { const { logViewStore } = this.props; const { form } = logViewStore; const btn = [ (), (), (), ]; return btn; } render() { const { visible, onCancel, logViewStore } = this.props, { tableStore,isPanelShow,conditionNum } = logViewStore, { height, dialogTitle, width, } = this.state; return ( onCancel()} style={{ height: height, width: width }} > logViewStore.setPanelStatus(bool)} hideSearchAd={() => logViewStore.setPanelStatus(false)} searchsAd={isPanelShow ? this.getPanelComponents() :
} advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20} hasMask={false} buttonsAd={this.getTabBtn()} onSearch={() => logViewStore.getTableInfo()} />
) } }