| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { notification } from 'antd' |
| | | import { notification, Modal } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | item.$Index = start + index + '' |
| | | item.$type = 'upt' |
| | | item.$origin = true |
| | | |
| | | if (config.absFields) { |
| | | config.absFields.forEach(f => { |
| | | if (!isNaN(item[f])) { |
| | | item[f] = Math.abs(item[f]) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | |
| | | if (result.ErrCode === 'N') { |
| | | Modal.error({ |
| | | title: result.message, |
| | | }) |
| | | } else { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | _data.$$BData = BData || '' |
| | | _data.$type = 'upt' |
| | | _data.$origin = true |
| | | |
| | | if (config.absFields) { |
| | | config.absFields.forEach(f => { |
| | | if (!isNaN(_data[f])) { |
| | | _data[f] = Math.abs(_data[f]) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | try { |
| | | data = data.map(item => { |
| | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | const { config } = this.state |
| | | |
| | | if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | | if (config.setting.useMSearch && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | | this.setState({pageIndex: 1}, () => { |
| | | this.reloadtable() |
| | | }) |