通知公告分页调整

This commit is contained in:
曹磊 2024-05-23 17:52:04 +08:00
parent af8d6673d5
commit 096a85db6d
2 changed files with 24 additions and 17 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="background: #fff;height: calc(100vh - 225px);overflow: auto;margin-top:10px;"> <div style="background: #fff;height: calc(100vh - 225px);overflow-y: auto;overflow-x: hidden;margin-top:10px;">
<!--查询区域--> <!--查询区域-->
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -83,7 +83,8 @@
* 查询 * 查询
*/ */
function searchQuery() { function searchQuery() {
reload(1); total.value = 1;
handlePageChange(1);
} }
/** /**
@ -94,21 +95,21 @@
queryParam.value.rwbh = rwbh; queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn; queryParam.value.xqxn = xqxn;
queryParam.value.ggStatus='1'; queryParam.value.ggStatus='1';
// total.value = 1;
reload(1); handlePageChange(1);
} }
// //
function handlePageChange(page: number) { function handlePageChange(page: number) {
reload(page); pageNo.value = page;
reload();
} }
//
onMounted(() => {
reload(1);
});
function reload(arg){ function reload(){
queryParam.pageNo = arg; queryParam.value.pageNo = pageNo;
queryParam.value.pageSize = pageSize;
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
console.log(`🚀 ~ reload ~ queryParam:`, queryParam) console.log(`🚀 ~ reload ~ queryParam:`, queryParam)
defHttp.get({ url: '/zyGonggao/zyGonggao/list', params: queryParam.value }).then((res) => { defHttp.get({ url: '/zyGonggao/zyGonggao/list', params: queryParam.value }).then((res) => {
console.log(res); console.log(res);
@ -119,12 +120,17 @@
}); });
} }
//
onMounted(() => {
searchQuery();
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
padding: 0;
width:99%;
.table-page-search-submitButtons { .table-page-search-submitButtons {
display: block; display: block;
margin-bottom: 24px; margin-bottom: 24px;

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="background: #fff;height: calc(100vh - 225px);overflow: auto;margin-top:10px;"> <div style="background: #fff;height: calc(100vh - 225px);overflow-y: auto;overflow-x: hidden;margin-top:10px;">
<!--查询区域--> <!--查询区域-->
<div class="jeecg-basic-table-form-container" style="border-bottom: 2px solid #f0f0f0;"> <div class="jeecg-basic-table-form-container" style="border-bottom: 2px solid #f0f0f0;">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol" style="padding: 20px 10px 0px 10px;"> <a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol" style="padding: 20px 10px 0px 10px;">
@ -195,16 +195,15 @@
*/ */
function handleSuccess() { function handleSuccess() {
total.value = 1; total.value = 1;
pageNo.value = 0; handlePageChange(1);
reload()
} }
/** /**
* 查询 * 查询
*/ */
function searchQuery() { function searchQuery() {
pageNo.value = 0; total.value = 1;
reload(); handlePageChange(1);
} }
/** /**
@ -246,6 +245,8 @@
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
padding: 0;
width:99%;
.table-page-search-submitButtons { .table-page-search-submitButtons {
display: block; display: block;
margin-bottom: 24px; margin-bottom: 24px;