From 3d71e181be80c0a1cbb03aff2afecb4351496d46 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 25 十一月 2022 11:19:21 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/custom/components/table/normal-table/index.jsx | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index bf7d655..d95478b 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { notification, Collapse } from 'antd' +import { notification, Collapse, Modal } from 'antd' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -289,11 +289,18 @@ loading: false }) this.timer && this.timer.stop() - notification.error({ - top: 92, - message: result.message, - duration: 10 - }) + + if (result.ErrCode === 'N') { + Modal.error({ + title: result.message, + }) + } else { + notification.error({ + top: 92, + message: result.message, + duration: 10 + }) + } } } @@ -554,6 +561,7 @@ const { setting } = this.state if (!setting.supModule || setting.supModule !== MenuID) return + if (id !== this.state.BID || id !== '') { this.setState({ pageIndex: 1, @@ -637,7 +645,7 @@ } this.setState({sync: false, data: _data}) - } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { + } else if (config.setting.useMSearch && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { this.setState({pageIndex: 1}, () => { this.reloadtable() }) @@ -699,15 +707,15 @@ {config.search && config.search.length ? <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null } - <MainAction + {actions.length > 0 ? <MainAction BID={BID} setting={setting} actions={actions} BData={BData} columns={config.columns} selectedData={selectedData} - /> - <div className={'main-table-box ' + (!actions || actions.length === 0 ? 'no-action' : '')}> + /> : <div style={{height: '25px'}}></div>} + <div className="main-table-box"> <MainTable setting={setting} columns={columns} @@ -728,14 +736,14 @@ {config.search && config.search.length ? <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null } - <MainAction + {actions.length > 0 ? <MainAction BID={BID} setting={setting} actions={actions} BData={BData} columns={config.columns} selectedData={selectedData} - /> + /> : <div style={{height: '15px'}}></div>} <div className={'main-table-box ' + (!actions || actions.length === 0 ? 'no-action' : '')}> <MainTable setting={setting} -- Gitblit v1.8.0