Commit e6a964f9 by yuananting

Merge branch 'feature/chenshu/educationalTools' of…

Merge branch 'feature/chenshu/educationalTools' of https://xmgit.ixm5.cn/xiaomai-cloud-class/xiaomai-cloud-class-web into feature/chenshu/educationalTools
parents 35b8bb20 68369a22
......@@ -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));
}
}
});
};
......
......@@ -48,7 +48,6 @@ class MoveModal extends React.Component {
showSearch
treeNodeFilterProp="title"
style={{ width: 240 }}
dropdownStyle={{ maxHeight: 220 }}
treeData={moveData}
placeholder="请选择分类"
allowClear
......
......@@ -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");
});
......
......@@ -177,6 +177,8 @@ class QuestionList extends Component {
order: "UPDATED_DESC", // 排序规则
questionName: null, // 题目名称
questionType: null, // 题目类型
updateDateStart: null,
updateDateEnd: null,
};
this.setState({ query: _query }, () => {
this.queryQuestionPageList();
......
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