| | |
| | | import FormGroup from './formgroup' |
| | | import FormAction from './actionList' |
| | | import NotFount from '@/components/404' |
| | | import { modifyTabview } from '@/store/action' |
| | | import './index.scss' |
| | | |
| | | const { TabPane } = Tabs |
| | |
| | | MKEmitter.emit('reloadData', this.props.param.parentId, 'formtab', btn) |
| | | } |
| | | |
| | | let tabs = this.props.tabviews.filter(tab => { |
| | | tab.selected = false |
| | | if (tab.MenuID === this.props.param.parentId) { |
| | | tab.selected = true |
| | | } |
| | | |
| | | return tab.MenuID !== this.props.MenuID |
| | | }) |
| | | |
| | | this.props.modifyTabview(tabs) |
| | | MKEmitter.emit('closeTabView', this.props.MenuID) |
| | | } else if (type === 'error' && btn.afterExecError === 'notclose') { |
| | | if (btn.execError === 'refresh') { |
| | | this.loadmaindata() |
| | |
| | | if (btn.execError !== 'never') { |
| | | MKEmitter.emit('reloadData', this.props.param.parentId, 'formtab', btn) |
| | | } |
| | | |
| | | let tabs = this.props.tabviews.filter(tab => { |
| | | tab.selected = false |
| | | if (tab.MenuID === this.props.param.parentId) { |
| | | tab.selected = true |
| | | } |
| | | |
| | | return tab.MenuID !== this.props.MenuID |
| | | }) |
| | | |
| | | this.props.modifyTabview(tabs) |
| | | MKEmitter.emit('closeTabView', this.props.MenuID) |
| | | } |
| | | } |
| | | |
| | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | tabviews: state.tabviews, |
| | | permAction: state.permAction |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)) |
| | | } |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(NormalTable) |