Commit b9910af1 by chenshu

fix:修复

parent c2ec7be1
......@@ -16,9 +16,9 @@ class MoveModal extends React.Component {
filterData = (data, id) => {
let newTreeData = data.map((item) => {
(id === item.id) && (item.disabled = true);
item.disabled = id === item.id;
if (item.children) {
item.children = this.filterData(item.children);
item.children = this.filterData(item.children, id);
}
return item;
});
......
......@@ -427,15 +427,20 @@ class QuestionList extends Component {
AidToolService.deleteQuestion(params).then((res) => {
if (res.success) {
message.success("删除成功");
const { query, total } = this.state;
const { query, total, selectedRowKeys } = 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 (selectedRowKeys.includes(record.id)) {
data.selectedRowKeys = _.reject(selectedRowKeys, item => item === record.id);
}
this.setState(data, () => {
this.queryQuestionPageList();
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