|
@@ -47,19 +47,16 @@ const params = reactive({
|
|
|
pageSize: 10,
|
|
|
param: null,
|
|
|
categoryName: null,
|
|
|
- statue: null
|
|
|
+ statue: null,
|
|
|
+ orderField: "updateTime",
|
|
|
+ orderType: null
|
|
|
},
|
|
|
records: [],
|
|
|
total: 0
|
|
|
});
|
|
|
// 分页
|
|
|
-const getQuotaPageListApi = async (orderField?: any, orderType?: any) => {
|
|
|
- const { code, data } = await getQuotaPageList({
|
|
|
- ...params.params,
|
|
|
- orderField,
|
|
|
- orderType
|
|
|
- });
|
|
|
- console.log("code", data);
|
|
|
+const getQuotaPageListApi = async () => {
|
|
|
+ const { code, data } = await getQuotaPageList(params.params);
|
|
|
if (code === 200) {
|
|
|
params.records = data.records;
|
|
|
params.total = data.totalRow;
|
|
@@ -184,11 +181,11 @@ const formattedTime = time => {
|
|
|
};
|
|
|
const changeSort = ({ column, prop, order }) => {
|
|
|
if (order === "ascending") {
|
|
|
- console.log(11); // 正序
|
|
|
- getQuotaPageListApi("updateTime", "升序");
|
|
|
+ params.params.orderType = "升序";
|
|
|
+ getQuotaPageListApi();
|
|
|
} else if (order === "descending") {
|
|
|
- console.log(22); // 反序
|
|
|
- getQuotaPageListApi("updateTime", "降序");
|
|
|
+ params.params.orderType = "降序";
|
|
|
+ getQuotaPageListApi();
|
|
|
}
|
|
|
};
|
|
|
</script>
|