| | |
| | | import { scriptMainTable, buttonConfig } from './config' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import TopSearch from './topSearch' |
| | | import MainAction from './actionList' |
| | | import './index.scss' |
| | | |
| | | const MainSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch')) |
| | | const MainTable = asyncSpinComponent(() => import('@/tabviews/zshare/normalTable')) |
| | | |
| | | class ScriptTable extends Component { |
| | |
| | | subcols.push(colMap.get(sub)) |
| | | } |
| | | }) |
| | | _col.subcols = subcols |
| | | _columns.push(_col) |
| | | if (subcols.length > 0) { |
| | | _col.subcols = subcols |
| | | _columns.push(_col) |
| | | } |
| | | } else { |
| | | _columns.push(col) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | reloadMenuView = (menuId) => { |
| | | const { MenuID } = this.props |
| | | |
| | | if (MenuID !== menuId) return |
| | | |
| | | this.reloadview() |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | // 组件加载时,获取菜单数据 |
| | | this.loadconfig() |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('reloadMenuView', this.reloadMenuView) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('reloadMenuView', this.reloadMenuView) |
| | | } |
| | | |
| | | render() { |
| | | const { dict, searchlist, setting, actions, columns, pickup, selectedData } = this.state |
| | | const { searchlist, setting, actions, columns, pickup, selectedData } = this.state |
| | | |
| | | return ( |
| | | <div className="script-manage-table" id={this.state.ContainerId}> |
| | | <TopSearch |
| | | dict={dict} |
| | | searchlist={searchlist} |
| | | refreshdata={this.refreshbysearch} |
| | | /> |
| | | <MainSearch searchlist={searchlist} menuType="HS" refreshdata={this.refreshbysearch}/> |
| | | <MainAction |
| | | BID="" |
| | | type="main" |