增加排序
This commit is contained in:
parent
2103fdb502
commit
e0087c482e
@ -103,10 +103,11 @@ const getList = async (filter?: Record<string, any>) => {
|
|||||||
try {
|
try {
|
||||||
// 合并基础分页参数、外部搜索参数和临时参数
|
// 合并基础分页参数、外部搜索参数和临时参数
|
||||||
const params = {
|
const params = {
|
||||||
// ...props.searchParams,
|
...props.searchParams,
|
||||||
skip: page.value,
|
skip: page.value,
|
||||||
take: size.value,
|
take: size.value,
|
||||||
filter: filter,
|
filter: filter,
|
||||||
|
|
||||||
// 如果后端需要 skip/take 格式,可以在此转换
|
// 如果后端需要 skip/take 格式,可以在此转换
|
||||||
// skip: (page.value - 1) * size.value,
|
// skip: (page.value - 1) * size.value,
|
||||||
// take: size.value,
|
// take: size.value,
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<!-- 搜索区域组件,具体 props 需根据实际子组件调整 -->
|
<!-- 搜索区域组件,具体 props 需根据实际子组件调整 -->
|
||||||
<GuoYuSheShiShuJuTianBaoSearch @search-finish="handleSearchFinish" @reset="handleReset" />
|
<GuoYuSheShiShuJuTianBaoSearch @search-finish="handleSearchFinish" @reset="handleReset" />
|
||||||
<!-- 主表格 -->
|
<!-- 主表格 -->
|
||||||
<BasicTable ref="tableRef" :columns="columns" :list-url="queryPageList" :search-params="{}" :scroll-y="500" >
|
<BasicTable ref="tableRef" :columns="columns" :list-url="queryPageList" :search-params="{sort:paramsTab.sort}" :scroll-y="500">
|
||||||
<!-- 使用 bodyCell 插槽自定义单元格渲染 -->
|
<!-- 使用 bodyCell 插槽自定义单元格渲染 -->
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'action' || column.dataIndex === 'action'">
|
<template v-if="column.key === 'action' || column.dataIndex === 'action'">
|
||||||
@ -27,7 +27,8 @@
|
|||||||
<div class="approval-log-modal-content">
|
<div class="approval-log-modal-content">
|
||||||
<ApprovalLogSearch :action-type-dict="actionTypeDict" @search-finish="handleApprovalLogSearch"
|
<ApprovalLogSearch :action-type-dict="actionTypeDict" @search-finish="handleApprovalLogSearch"
|
||||||
@reset="handleApprovalLogReset" />
|
@reset="handleApprovalLogReset" />
|
||||||
<BasicTable ref="approvalLogTableRef" :columns="approvalLogColumns" :list-url="getApprovalLogList" :scroll-y="500" >
|
<BasicTable ref="approvalLogTableRef" :columns="approvalLogColumns" :list-url="getApprovalLogList"
|
||||||
|
:scroll-y="500">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.dataIndex === 'action'">
|
<template v-if="column.dataIndex === 'action'">
|
||||||
{{ handName(record.action, actionTypeDict) }}
|
{{ handName(record.action, actionTypeDict) }}
|
||||||
@ -42,7 +43,8 @@
|
|||||||
<div class="change-log-modal-content">
|
<div class="change-log-modal-content">
|
||||||
<ChangeLogSearch :operation-type-dict="operationTypeDict" @search-finish="handleChangeLogSearch"
|
<ChangeLogSearch :operation-type-dict="operationTypeDict" @search-finish="handleChangeLogSearch"
|
||||||
@reset="handleChangeLogReset" />
|
@reset="handleChangeLogReset" />
|
||||||
<BasicTable ref="changeLogTableRef" :columns="changeLogColumns" :list-url="getApprovalChangeLogList" :scroll-y="500" >
|
<BasicTable ref="changeLogTableRef" :columns="changeLogColumns" :list-url="getApprovalChangeLogList"
|
||||||
|
:scroll-y="500">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.dataIndex === 'operationType'">
|
<template v-if="column.dataIndex === 'operationType'">
|
||||||
{{ handName(record.operationType, operationTypeDict) }}
|
{{ handName(record.operationType, operationTypeDict) }}
|
||||||
@ -61,7 +63,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, onMounted,h } from 'vue';
|
import { ref, reactive, onMounted, h } from 'vue';
|
||||||
import { queryPageList, getApprovalLogList, getApprovalChangeLogList } from '@/api/shengPiJiLu';
|
import { queryPageList, getApprovalLogList, getApprovalChangeLogList } from '@/api/shengPiJiLu';
|
||||||
import { Tag } from "ant-design-vue"; // 确保导入 Tag
|
import { Tag } from "ant-design-vue"; // 确保导入 Tag
|
||||||
import BasicTable from "@/components/BasicTable/index.vue";
|
import BasicTable from "@/components/BasicTable/index.vue";
|
||||||
@ -176,6 +178,7 @@ const handleSearchFinish = (values: any) => {
|
|||||||
const filter = {
|
const filter = {
|
||||||
logic: "and",
|
logic: "and",
|
||||||
filters: filters,
|
filters: filters,
|
||||||
|
|
||||||
};
|
};
|
||||||
tableRef.value?.getList(filter);
|
tableRef.value?.getList(filter);
|
||||||
};
|
};
|
||||||
@ -413,6 +416,16 @@ const handName = (val: any, arr: any) => {
|
|||||||
})
|
})
|
||||||
return dictName1
|
return dictName1
|
||||||
}
|
}
|
||||||
|
//搜索相关弹框
|
||||||
|
const paramsTab = ref({
|
||||||
|
sort: [
|
||||||
|
{
|
||||||
|
field: "applyTime",
|
||||||
|
dir: "desc",
|
||||||
|
needSortFlag: true
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user