|
|
@@ -17,7 +17,6 @@ import TransferBox from '../common/selectUserBox/selectUserBox'
|
|
|
import DeleteBox from '../common/deleteBox/deleteBox'
|
|
|
import { arrayToTree } from '../../utils/baseUtils'
|
|
|
import ListFilter from '../common/listFilter/index'
|
|
|
-import CusIcon from '../common/cusIcon/index'
|
|
|
import './list.less'
|
|
|
const { Content } = Layout
|
|
|
const CardGrid = Card.Grid
|
|
|
@@ -109,20 +108,20 @@ class ChartList extends React.Component {
|
|
|
let list = cardList.filter(l => {
|
|
|
if(filterItem.type === 'date') {
|
|
|
if(filterLabel===""){
|
|
|
- if(!noGroup || !currentGroup || (noGroup && l.groupCode === '-1') || (!!currentGroup && l.groupCode === currentGroup.code)) {
|
|
|
- return true;
|
|
|
+ if(noGroup) {
|
|
|
+ return l.groupCode === '-1'
|
|
|
}else {
|
|
|
- return false;
|
|
|
+ return !!currentGroup ? l.groupCode === currentGroup.code : true;
|
|
|
}
|
|
|
}else if(filterLabel.indexOf('#')>-1){
|
|
|
let start = filterLabel.split('#')[0]
|
|
|
let end = filterLabel.split('#')[1]
|
|
|
let nowTime = new Date(l[filterItem.name]).getTime();
|
|
|
if(nowTime>=start && nowTime<=end){
|
|
|
- if(!noGroup || !currentGroup || (noGroup && l.groupCode === '-1') || (!!currentGroup && l.groupCode === currentGroup.code)) {
|
|
|
- return true;
|
|
|
+ if(noGroup) {
|
|
|
+ return l.groupCode === '-1'
|
|
|
}else {
|
|
|
- return false;
|
|
|
+ return !!currentGroup ? l.groupCode === currentGroup.code : true;
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
@@ -131,10 +130,10 @@ class ChartList extends React.Component {
|
|
|
}
|
|
|
}else {
|
|
|
if((l[filterItem.name] + '').search(filterReg) > -1) {
|
|
|
- if(!noGroup || !currentGroup || (noGroup && l.groupCode === '-1') || (!!currentGroup && l.groupCode === currentGroup.code)) {
|
|
|
- return true;
|
|
|
+ if(noGroup) {
|
|
|
+ return l.groupCode === '-1'
|
|
|
}else {
|
|
|
- return false;
|
|
|
+ return !!currentGroup ? l.groupCode === currentGroup.code : true;
|
|
|
}
|
|
|
}else {
|
|
|
return false;
|
|
|
@@ -332,7 +331,7 @@ class ChartList extends React.Component {
|
|
|
} {moment(l.createTime).format('YYYY-MM-DD')}</Row>
|
|
|
</Col>
|
|
|
<Col span={3} style={{ textAlign: 'right' }}>
|
|
|
- <Dropdown overlay={this.generateOperationMenu()} trigger={['click']}>
|
|
|
+ <Dropdown getPopupContainer={() => document.querySelector('.layout-chart .ant-card-body')} overlay={this.generateOperationMenu()} trigger={['click']}>
|
|
|
<Icon style={{ fontSize: '24px' }} type="ellipsis" theme="outlined" />
|
|
|
</Dropdown>
|
|
|
</Col>
|
|
|
@@ -360,6 +359,7 @@ class ChartList extends React.Component {
|
|
|
onTitleClick={() => {
|
|
|
dispatch({ type: 'chart/remoteSetGroup', chart: selectedRecord, group: t });
|
|
|
dispatch({ type: 'chart/setCurrentGroup', group: t });
|
|
|
+ this.setState({noGroup: false})
|
|
|
}}
|
|
|
>
|
|
|
{this.createGroupMenu(t.children)}
|
|
|
@@ -368,6 +368,7 @@ class ChartList extends React.Component {
|
|
|
return <Menu.Item key={t.code} onClick={() => {
|
|
|
dispatch({ type: 'chart/remoteSetGroup', chart: selectedRecord, group: t });
|
|
|
dispatch({ type: 'chart/setCurrentGroup', group: t });
|
|
|
+ this.setState({noGroup: false})
|
|
|
}}>{selectedRecord.groupCode === t.code ? <span className='current' style={{ fontWeight: 'bold' }}>{t.label}</span> : t.label}</Menu.Item>
|
|
|
}
|
|
|
})
|
|
|
@@ -426,7 +427,8 @@ class ChartList extends React.Component {
|
|
|
dispatch({ type: 'chart/setFilterLabel', label: '' });
|
|
|
dispatch({ type: 'chart/fetchList', mandatory: true });
|
|
|
}}>
|
|
|
- <CusIcon type='bi-refresh'/>
|
|
|
+ {/* <CusIcon type='bi-refresh'/> */}
|
|
|
+ <Icon type='sync'/>
|
|
|
</Button>
|
|
|
</Col>
|
|
|
<Col>
|
|
|
@@ -454,7 +456,9 @@ class ChartList extends React.Component {
|
|
|
{ this.generateCard(viewList) }
|
|
|
</div>
|
|
|
</Card>
|
|
|
- <Pagination showQuickJumper pageSize={pageSize} current={page} total={reduceList.length} onChange={this.onPageChange} />
|
|
|
+ <Pagination showQuickJumper pageSize={pageSize} current={page} total={reduceList.length} onChange={this.onPageChange}
|
|
|
+ showTotal={total => `共${total}个图表`}
|
|
|
+ />
|
|
|
</Content>
|
|
|
{visibleGroupManageMentBox && <GroupManagementBox
|
|
|
visibleBox={visibleGroupManageMentBox}
|