!2665 修复:画廊管理修改时显示状态错误

pull/2679/head
黄诗津 6 months ago committed by ChenX
parent 38f381558a
commit 0a0078a7bf

@ -1,11 +1,11 @@
import { Alert, Button, Classes, Drawer, FormGroup, HTMLSelect, Icon, InputGroup, Intent, Radio, RadioGroup, TextArea } from '@blueprintjs/core';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import React, { Component, createRef, RefObject } from 'react';
import React, { Component, RefObject, createRef } from 'react';
import { CURRENT_HOST } from '../../../../Common/HostUrl';
import { getFileSize } from '../../../../Common/Utils';
import { UpdateGallery } from '../data/GalleryData';
import GalleryStore from '../GalleryStore';
import { UpdateGallery } from '../data/GalleryData';
import { IGalleryItem } from '../interface/GalleryInterfaces';
@ -14,6 +14,8 @@ interface GalleryDetailDrawerProps
isOpen: boolean;
handleOnClose: Function;
gallery: IGalleryItem;
galleryFilterParams;
currPage: number;
}
@observer
export default class GalleryDetailDrawer extends Component<GalleryDetailDrawerProps>
@ -47,7 +49,7 @@ export default class GalleryDetailDrawer extends Component<GalleryDetailDrawerPr
timeout: 5000,
}
});
await this.GalleryStore.ReloadMenageGalleryList({ page_count: 20, curr_page: 1 });
await this.GalleryStore.ReloadMenageGalleryList({ page_count: 20, curr_page: this.props.currPage ?? 1, ...this.props.galleryFilterParams });
}
};
render()

@ -1,14 +1,14 @@
import { Alert, Button, ButtonGroup, Checkbox, Divider, FormGroup, HTMLSelect, InputGroup, Intent, Position, Spinner, Tooltip } from '@blueprintjs/core';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import React, { Component, createRef, RefObject } from 'react';
import React, { Component, RefObject, createRef } from 'react';
import { app } from '../../../../ApplicationServices/Application';
import { TopPanelStore } from '../../../Store/TopPanelStore';
import Pagination2 from '../../ToolBar/ResourceLibrary/Pagination2/Pagination2';
import { RenderNoResult } from '../../ToolBar/ResourceLibrary/UserCollect';
import GalleryStore from '../GalleryStore';
import { IGalleryItem } from '../interface/GalleryInterfaces';
import { State, StateIcon } from '../StateIcon';
import { IGalleryItem } from '../interface/GalleryInterfaces';
import GalleryDetailDrawer from './GalleryDetailDrawer';
import GalleryManagementItem from './GalleryManagementItem';
@ -36,8 +36,10 @@ export default class ManageGallery extends Component
this.loading = true;
this.GalleryStore.galleryDeleteList = [];
const page = curr_page ?? 1;
this.currPage = page;
await this.GalleryStore.ReloadMenageGalleryList({ page_count: 20, curr_page: curr_page ?? 1, ...this.galleryFilterParams });
await this.GalleryStore.ReloadMenageGalleryList({ page_count: 20, curr_page: page, ...this.galleryFilterParams });
this.loading = false;
};
SearchShop = async (e?: React.FormEvent<HTMLFormElement> | React.KeyboardEvent<HTMLInputElement>) =>
@ -219,6 +221,8 @@ export default class ManageGallery extends Component
isOpen={this.openDrawer}
handleOnClose={() => { this.openDrawer = false; }}
gallery={this.currGallery}
galleryFilterParams={this.galleryFilterParams}
currPage={this.currPage}
/>
<Alert
isOpen={this.isOpenDeleteAlert}

Loading…
Cancel
Save