| | |
| | | this.data = result.data || [] |
| | | this.handleData() |
| | | } |
| | | if (result.message) { |
| | | if (result.ErrCode === 'Y') { |
| | | Modal.success({ |
| | | title: result.message |
| | | }) |
| | | } else if (result.ErrCode === 'S') { |
| | | notification.success({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 2 |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | |
| | | if (!result.message) return |
| | | if (result.ErrCode === 'N') { |
| | | Modal.error({ |
| | | title: result.message, |
| | | }) |
| | | } else { |
| | | } else if (result.ErrCode !== '-2') { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | |
| | | handleClick = (data = null) => { |
| | | const { plot, config } = this.state |
| | | |
| | | if (plot.click && !data) { |
| | | this.selectedId = '' |
| | | return |
| | | } |
| | | if (plot.click && !data) return |
| | | |
| | | if (plot.click === 'menus') { |
| | | let menu = null |
| | |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | } else { |
| | | this.selectedId = data.$$uuid || '' |
| | | MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data) |
| | | if (data) { |
| | | this.selectedId = data.$$uuid || '' |
| | | MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data) |
| | | } else { |
| | | this.selectedId = '' |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') |
| | | } |
| | | } |
| | | } |
| | | |