Commit 5808599e by yuananting

fix:排序current重置删除

parent 1483c43b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-25 11:23:47 * @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-04-15 11:04:03 * @LastEditTime: 2021-05-20 11:37:40
* @Description: 助学工具-题库-试卷列表数据 * @Description: 助学工具-题库-试卷列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -441,7 +441,6 @@ class PaperList extends Component { ...@@ -441,7 +441,6 @@ class PaperList extends Component {
pagination={false} pagination={false}
bordered bordered
loading={loading} loading={loading}
onChange={this.handleChangeTable}
/> />
) : ( ) : (
<Table <Table
...@@ -455,7 +454,6 @@ class PaperList extends Component { ...@@ -455,7 +454,6 @@ class PaperList extends Component {
columns={this.parseColumns()} columns={this.parseColumns()}
pagination={false} pagination={false}
bordered bordered
onChange={this.handleChangeTable}
/> />
)} )}
</ConfigProvider> </ConfigProvider>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-25 11:23:47 * @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-04-13 13:56:05 * @LastEditTime: 2021-05-20 11:43:21
* @Description: 助学工具-新建试卷-选择题目列表 * @Description: 助学工具-新建试卷-选择题目列表
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -108,15 +108,14 @@ class SelectQuestionList extends Component { ...@@ -108,15 +108,14 @@ class SelectQuestionList extends Component {
handleChangeTable = (pagination, filters, sorter) => { handleChangeTable = (pagination, filters, sorter) => {
const { columnKey, order } = sorter; const { columnKey, order } = sorter;
let sort = "UPDATED_DESC"; let sort = "UPDATED_DESC";
if (order === "ascend") { if (columnKey === "accuracy" && order === "ascend") {
sort = "ACCURACY_ASC"; sort = "ACCURACY_ASC";
} }
if (order === "descend") { if (columnKey === "accuracy" && order === "descend") {
sort = "ACCURACY_DESC"; sort = "ACCURACY_DESC";
} }
const _query = this.state.query; const _query = this.state.query;
_query.order = sort; _query.order = sort;
_query.current = 1;
this.setState({ query: _query }, () => this.queryQuestionPageListWithContent()); this.setState({ query: _query }, () => this.queryQuestionPageListWithContent());
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-25 11:23:47 * @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-05-18 16:10:49 * @LastEditTime: 2021-05-20 11:35:07
* @Description: 助学工具-题库-题目列表数据 * @Description: 助学工具-题库-题目列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -161,7 +161,7 @@ class QuestionList extends Component { ...@@ -161,7 +161,7 @@ class QuestionList extends Component {
height: 100, height: 100,
}} }}
description={ description={
<div> <span>
<span>还没有题目</span> <span>还没有题目</span>
{["CloudManager", "StoreManager"].includes(User.getUserRole()) && {["CloudManager", "StoreManager"].includes(User.getUserRole()) &&
categoryId && ( categoryId && (
...@@ -178,7 +178,7 @@ class QuestionList extends Component { ...@@ -178,7 +178,7 @@ class QuestionList extends Component {
吧! 吧!
</span> </span>
)} )}
</div> </span>
} }
></Empty> ></Empty>
); );
...@@ -202,7 +202,6 @@ class QuestionList extends Component { ...@@ -202,7 +202,6 @@ class QuestionList extends Component {
} }
const _query = this.state.query; const _query = this.state.query;
_query.order = sort || "UPDATED_DESC"; _query.order = sort || "UPDATED_DESC";
_query.current = 1;
this.setState({ query: _query }, () => this.queryQuestionPageList()); 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