| | |
| | | |
| | | return col |
| | | }) |
| | | |
| | | if (data && data[0]) { |
| | | let errors = [] |
| | | columns.forEach(col => { |
| | | if (col.Column && data[0][col.Column] === undefined) { |
| | | errors.push(col.Text) |
| | | } |
| | | }) |
| | | |
| | | if (errors.length) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: '数据中缺少字段:' + errors.join('、'), |
| | | duration: 5 |
| | | }) |
| | | |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | |
| | | return |
| | | } |
| | | } |
| | | |
| | | try { |
| | | if (imgCol) { |
| | |
| | | let node = document.getElementById('tab' + id) |
| | | node && node.click() |
| | | } |
| | | |
| | | if (btn.execSuccess === 'popclose' && btn.$tabId) { // 标签关闭刷新 |
| | | MKEmitter.emit('refreshPopButton', btn.$tabId) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | } else if (btn.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', []) |
| | | } |
| | | |
| | | if (btn.execError === 'popclose' && btn.$tabId) { // 标签关闭刷新 |
| | | MKEmitter.emit('refreshPopButton', btn.$tabId) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | |
| | | return ( |
| | | <Button |
| | | type={type} |
| | | id={'button' + btn.uuid} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |