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