This commit is contained in:
liang.chao 2025-12-03 10:57:38 +08:00
parent 91281fc6a0
commit f8de8543ab
1 changed files with 43 additions and 7 deletions

View File

@ -18,6 +18,7 @@
@refresh-change="onLoad"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
@search-change="handleSearch"
>
<!-- 操作列编辑按钮 -->
<template #menu="{ row, size }">
@ -95,6 +96,7 @@ const page = reactive({
pageSize: 10,
total: 0
});
const searchParams = ref({}); //
//
const option = reactive({
@ -106,11 +108,31 @@ const option = reactive({
delBtn: false,
viewBtn: false,
menu: true, //
search: true,
searchBtn: true,
resetBtn: true,
searchShow: true, //
searchMenuSpan: 6, //
searchMenuAlign: 'right', //
column: [
{ label: '项目名称', prop: 'proName' },
{ label: '单项工程名称', prop: 'singleProName' },
{ label: '档案名称', prop: 'contentName' },
{ label: '整改内容', prop: 'description', sortable: true }
{
label: '项目名称',
prop: 'proName',
},
{
label: '单项工程名称',
prop: 'singleProName',
},
{
label: '档案名称',
prop: 'contentName',
search: true
},
{
label: '整改内容',
prop: 'description',
sortable: true,
}
]
});
@ -122,11 +144,14 @@ const onLoad = async (pageParam = page) => {
}
loading.value = true;
try {
const res = await selectRectificationListApi({
const params = {
proId: projectId,
pageNum: pageParam.currentPage,
pageSize: pageParam.pageSize
});
pageSize: pageParam.pageSize,
...searchParams.value //
};
const res = await selectRectificationListApi(params);
if (res.data.code === 200) {
tableData.value = res.data.rows || [];
page.total = res.data.total || 0;
@ -141,6 +166,17 @@ const onLoad = async (pageParam = page) => {
}
};
//
const handleSearch = (params, done) => {
//
searchParams.value = { ...params };
console.log('查询参数:', searchParams.value);
//
page.currentPage = 1; //
onLoad();
done && done(); //
};
//
const handleCurrentChange = (val) => {
page.currentPage = val;