| | |
| | | } |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | this.loadData() |
| | | }, config.setting.delay) |
| | | if (config.setting.onload !== 'false') { |
| | | setTimeout(() => { |
| | | this.loadData() |
| | | }, config.setting.delay) |
| | | } else { |
| | | MKEmitter.addListener('initFinish', this.initFinish) |
| | | } |
| | | |
| | | MKEmitter.addListener('reloadData', this.reloadData) |
| | | MKEmitter.addListener('resetSelectLine', this.resetParentParam) |
| | |
| | | return |
| | | } |
| | | this.timer && this.timer.stop() |
| | | MKEmitter.removeListener('initFinish', this.initFinish) |
| | | MKEmitter.removeListener('reloadData', this.reloadData) |
| | | MKEmitter.removeListener('resetSelectLine', this.resetParentParam) |
| | | } |
| | | |
| | | initFinish = (MenuID) => { |
| | | const { config } = this.props |
| | | |
| | | if (config.MenuID !== MenuID) return |
| | | |
| | | if (config.setting.onload === 'false') { |
| | | setTimeout(() => { |
| | | this.loadData() |
| | | }, config.setting.delay) |
| | | } |
| | | } |
| | | |
| | | resetParentParam = (MenuID, id) => { |
| | |
| | | |
| | | MKEmitter.emit('mkPublicData', config.uuid, _data) |
| | | MKEmitter.emit('resetSelectLine', config.uuid, _data.$$uuid, _data) |
| | | |
| | | if (config.setting.loadlevel === 'init') { |
| | | MKEmitter.emit('interFinish', config.MenuID, config.uuid) |
| | | } |
| | | } else { |
| | | this.loading = false |
| | | this.timer && this.timer.stop() |
| | |
| | | duration: 10 |
| | | }) |
| | | } |
| | | |
| | | if (config.setting.loadlevel === 'init') { |
| | | MKEmitter.emit('interFinish', config.MenuID, config.uuid) |
| | | } |
| | | } |
| | | } |
| | | |