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

Loading…
Cancel
Save