Commit c84353f9 by yuananting

fix:批量处理后页码置1

parent 193f1d3a
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-06-03 16:09:00
* @LastEditTime: 2021-06-03 17:13:30
* @Description: 助学工具-题库-试卷列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -439,7 +439,7 @@ class PaperList extends Component {
}
batchMoveRemote = (categoryId) => {
const { selectedPaperKeys } = this.state;
const { selectedPaperKeys, query } = this.state;
const data = {
categoryId,
paperId: selectedPaperKeys,
......@@ -450,7 +450,17 @@ class PaperList extends Component {
Service.Hades('public/hades/batchMovePaperCategory', data, { reject: true }).then((res) => {
if (res.success) {
message.success('移动成功');
this.setState(
{
query: {
...query,
current: 1,
},
},
() => {
this.queryPaperPageList();
}
);
Bus.trigger("queryCategoryTree", "remain");
this.clearSelect();
} else {
......@@ -462,7 +472,7 @@ class PaperList extends Component {
}
batchDelete = () => {
const { selectedPaperKeys } = this.state;
const { selectedPaperKeys, query } = this.state;
if (_.isEmpty(selectedPaperKeys)) {
message.warning('请先选择要删除的试卷');
return null;
......@@ -485,7 +495,17 @@ class PaperList extends Component {
Service.Hades('public/hades/batchDeletePaper', data, { reject: true }).then((res) => {
if (res.success) {
message.success('删除成功');
this.setState(
{
query: {
...query,
current: 1,
},
},
() => {
this.queryPaperPageList();
}
);
Bus.trigger("queryCategoryTree", "remain");
this.clearSelect();
} else {
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-06-03 16:41:47
* @LastEditTime: 2021-06-03 17:12:01
* @Description: 助学工具-题库-题目列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -524,7 +524,7 @@ class QuestionList extends Component {
}
batchMoveRemote = (categoryId) => {
const { selectedRowKeys } = this.state;
const { selectedRowKeys, query } = this.state;
const data = {
categoryId,
id: selectedRowKeys,
......@@ -536,8 +536,18 @@ class QuestionList extends Component {
if (res.success) {
message.success('移动成功');
Bus.trigger('queryCategoryTree', 'remain');
this.queryQuestionPageList();
this.clearSelect();
this.setState(
{
query: {
...query,
current: 1,
},
},
() => {
this.queryQuestionPageList();
}
);
} else {
message.error('移动失败');
}
......@@ -547,7 +557,7 @@ class QuestionList extends Component {
}
batchDelete = () => {
const { selectedRowKeys } = this.state;
const { selectedRowKeys, query } = this.state;
if (_.isEmpty(selectedRowKeys)) {
message.warning('请先选择要删除的题目');
return null;
......@@ -571,8 +581,18 @@ class QuestionList extends Component {
if (res.success) {
message.success('删除成功');
Bus.trigger('queryCategoryTree', 'remain');
this.queryQuestionPageList();
this.clearSelect();
this.setState(
{
query: {
...query,
current: 1,
},
},
() => {
this.queryQuestionPageList();
}
);
} else {
message.error('删除失败');
}
......
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