| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { BackTop, notification, Spin} from 'antd' |
| | | import { BackTop, notification, Spin, Tabs} from 'antd' |
| | | import moment from 'moment' |
| | | import Api from '@/api' |
| | | import MainSearch from './mainSearch' |
| | | import MainAction from './mainAction' |
| | | import MainTable from './mainTable' |
| | | import SubTable from '@/tabviews/subtable' |
| | | import NotFount from '@/components/404' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import './index.scss' |
| | | |
| | | const { TabPane } = Tabs |
| | | |
| | | export default class NormalTable extends Component { |
| | | static propTpyes = { |
| | |
| | | searchlist: null, |
| | | actions: null, |
| | | columns: null, |
| | | tabviews: null, |
| | | arr_field: '', |
| | | setting: null, |
| | | data: null, |
| | |
| | | orderColumn: '', |
| | | orderType: 'asc', |
| | | search: '', |
| | | configMap: {} |
| | | configMap: {}, |
| | | BID: '' |
| | | } |
| | | |
| | | /** |
| | |
| | | searchlist: config.search, |
| | | actions: _actions, |
| | | columns: _columns, |
| | | tabviews: config.tabs, |
| | | arr_field: _arrField.join(','), |
| | | search: Utils.initMainSearch(config.search), // 搜索条件初始化(含有时间格式,需要转化) |
| | | loading: true |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { setting, searchlist, actions, columns, loadingview, viewlost } = this.state |
| | | |
| | | const { setting, searchlist, actions, columns, loadingview, viewlost, tabviews } = this.state |
| | | console.log(setting) |
| | | return ( |
| | | <div className="commontable" id={'commontable' + this.props.MenuID}> |
| | | {loadingview && <Spin size="large" />} |
| | |
| | | buttonTrigger={this.buttonTrigger} |
| | | /> |
| | | } |
| | | {setting && setting.tabshow !== 'vertical' && tabviews && tabviews.length > 0 && |
| | | <Tabs defaultActiveKey="0" tabPosition="top"> |
| | | {tabviews.map((_tab, index) => ( |
| | | <TabPane tab={ _tab.label } key={`${index}`}> |
| | | {_tab.type === 'SubTable' ? <SubTable SupMenuID={this.props.MenuID} MenuID={this.props.MenuID} BID={this.state.BID} /> : null} |
| | | </TabPane> |
| | | ))} |
| | | </Tabs> |
| | | } |
| | | <BackTop> |
| | | <div className="ant-back-top"> |
| | | <div className="ant-back-top-content"> |