import React from 'react' import * as mobx from 'mobx' import { inject, observer } from 'mobx-react' import { WeaTop, WeaFormItem, WeaTable, WeaRightMenu, WeaHelpfulTip, WeaNewScroll, WeaSearchGroup, WeaLocaleProvider, WeaTab, WeaTableEdit } from 'ecCom' import { Row, Col, Button, Modal, message, Input, Dropdown, Icon, Menu } from 'antd' import { WeaSwitch } from 'comsMobx' import { i18n } from '../../public/i18n'; const getLabel = WeaLocaleProvider.getLabel; const toJS = mobx.toJS; const confirm = Modal.confirm; @inject('qtxConfig') @observer export default class QtxConfig extends React.Component { constructor(props) { super(props); } componentWillMount() { } componentDidMount() { const { qtxConfig } = this.props; qtxConfig.initList(); } componentWillUnmount() { } componentWillReceiveProps(nextProps) { const { qtxConfig } = this.props; if (this.props.location.key !== nextProps.location.key) { qtxConfig.initList(); } } getDropMenuDatas() { const { qtxConfig } = this.props, { rightMenu } = qtxConfig let menus = []; toJS(rightMenu).map((item, index) => { let obj = { key: item.menuFun, icon: , content: item.menuName, } menus.push(obj); }) return menus; } getTopMenuBtns() { const { qtxConfig } = this.props, { topMenu } = qtxConfig let btns = []; topMenu.map((item, i) => { btns.push(); }); return btns; } save = () => { const { qtxConfig } = this.props; //qtxConfig.saveQuickSearchInfo(); } login = () => { window.open("/api/bs/hrmorganization/config/ssoLogin", "_blank") } getFormItems = () => { const { qtxConfig } = this.props; const { configFields, configForm } = qtxConfig; const arr = []; const formParams = configForm.getFormParams(); const { isFormInit } = configForm; isFormInit && configFields.map((field, index) => { arr.push(
{} {}
) }) return {arr} } render() { const { qtxConfig: store } = this.props; const { editTableData } = store, { datas, columns, selectedData, loading } = editTableData; return (
{ this[key] && this[key]() }} > } iconBgcolor='#217346' loading={true} buttons={this.getTopMenuBtns()} showDropIcon={true} dropMenuDatas={this.getDropMenuDatas()} onDropMenuClick={(key) => { this[key] && this[key]() }} > {this.getFormItems()} store.setTableEditDatas(e)} />
) } }