fix: bug分页搜索展示错误修改

dev_1.0.0
JINGYJ 11 months ago
parent adbbec1029
commit 69e9c7ed02

@ -73,8 +73,8 @@ const getDeptData = async () => {
const res: any = await getDeptManageList({ const res: any = await getDeptManageList({
baseName: "", baseName: "",
deptCode: "", deptCode: "",
pageNum: 1, pageNum: pagination.currentPage,
pageSize: 20 pageSize: pagination.pageSize
}); });
if (res.code === 200) { if (res.code === 200) {
deptOptions.value = res.data.records; deptOptions.value = res.data.records;
@ -180,6 +180,9 @@ const deptOptions = ref([]);
const changeStatus = item => { const changeStatus = item => {
seachForm.status = item.id; seachForm.status = item.id;
search(); search();
if (seachForm.status === "1") {
getDeptData();
}
}; };
const handleView = async (value: any, type: string) => { const handleView = async (value: any, type: string) => {
console.log(value); console.log(value);
@ -220,7 +223,13 @@ function onCurrentChange(page: number) {
// console.log("onCurrentChange", page); // console.log("onCurrentChange", page);
pagination.currentPage = page; pagination.currentPage = page;
pagination.pageSize = 10; pagination.pageSize = 10;
getUserTableData(); if (seachForm.status === "1") {
getUserTableData();
} else if (seachForm.status === "2") {
getDeptData();
} else {
getRoleTableData();
}
} }
const submitForm = (formEl: FormInstance | undefined) => { const submitForm = (formEl: FormInstance | undefined) => {
if (!formEl) return; if (!formEl) return;

Loading…
Cancel
Save