Commit 73fb51ec by chenshu

fix:修复

parent b9910af1
......@@ -533,9 +533,13 @@ class KnowledgeBaseList extends React.Component {
};
KnowledgeAPI.delKnowledge(params).then((res) => {
if (res.success) {
const { onChange, updateCategoryTree, selectedRowKeys, onSelectChange } = this.props;
message.success("移出成功");
this.props.onChange();
this.props.updateCategoryTree();
onChange();
updateCategoryTree();
if (selectedRowKeys.includes(item.id)) {
onSelectChange(_.reject(selectedRowKeys, value => value === item.id));
}
}
});
};
......
......@@ -200,15 +200,21 @@ class PaperList extends Component {
AidToolService.deletePaper(params).then((res) => {
if (res.success) {
message.success("删除成功");
const { query, total } = this.state;
const { query, total, selectedPaperKeys } = this.state;
const { size, current } = query;
const _query = query;
let data = {};
if (total / size < current) {
if (total % size === 1) {
_query.current = 1;
}
}
this.setState({ query: _query }, () => {
data.query = _query;
if (selectedPaperKeys.includes(record.paperId)) {
data.selectedPaperKeys = _.reject(selectedPaperKeys, item => item === record.paperId);
}
this.setState(data, () => {
this.queryPaperPageList();
Bus.trigger("queryCategoryTree", "remain");
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment