fix: 列表查询pageNum设为1

This commit is contained in:
TsMask
2023-11-06 14:33:40 +08:00
parent de16c3d1f5
commit ca0913a8cf
42 changed files with 2652 additions and 199 deletions

View File

@@ -421,10 +421,13 @@ function fnClose() {
}
}
/**查询字典数据列表 */
function fnGetList() {
/**查询字典数据列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
queryParams.pageNum = pageNum;
}
listData(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
// 取消勾选
@@ -516,7 +519,7 @@ onMounted(() => {
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索</a-button
>
@@ -591,7 +594,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<a-button type="text" @click.prevent="fnGetList">
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>

View File

@@ -296,7 +296,7 @@ function fnModalOk() {
});
modalState.visibleByEdit = false;
modalStateFrom.resetFields();
fnGetList();
fnGetList(1);
} else {
message.error({
content: `${res.msg}`,
@@ -420,10 +420,13 @@ function fnDataView(dictId: string | number = '0') {
router.push(`${routePath}${MENU_PATH_INLINE}/data/${dictId}`);
}
/**查询参数配置列表 */
function fnGetList() {
/**查询参数配置列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
queryParams.pageNum = pageNum;
}
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
@@ -508,7 +511,7 @@ onMounted(() => {
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索</a-button
>
@@ -596,7 +599,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<a-button type="text" @click.prevent="fnGetList">
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>

View File

@@ -310,10 +310,13 @@ function fnExportList() {
});
}
/**查询登录日志列表 */
function fnGetList() {
/**查询登录日志列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
queryParams.pageNum = pageNum;
}
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
@@ -400,7 +403,7 @@ onMounted(() => {
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索</a-button
>
@@ -481,7 +484,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<a-button type="text" @click.prevent="fnGetList">
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>

View File

@@ -296,7 +296,7 @@ function fnCleanList() {
key,
duration: 2,
});
fnGetList();
fnQueryReset();
} else {
message.error({
content: `${res.msg}`,
@@ -337,10 +337,13 @@ function fnExportList() {
});
}
/**查询登录日志列表 */
function fnGetList() {
/**查询登录日志列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
queryParams.pageNum = pageNum;
}
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
@@ -442,7 +445,7 @@ onMounted(() => {
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索</a-button
>
@@ -514,7 +517,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<a-button type="text" @click.prevent="fnGetList">
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>

View File

@@ -287,7 +287,7 @@ function fnModalOk() {
});
modalState.visibleByEdit = false;
modalStateFrom.resetFields();
fnGetList();
fnGetList(1);
} else {
message.error({
content: `${res.msg}`,
@@ -377,10 +377,13 @@ function fnExportList() {
});
}
/**查询岗位列表 */
function fnGetList() {
/**查询岗位列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
queryParams.pageNum = pageNum;
}
listPost(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
// 取消勾选
@@ -448,7 +451,7 @@ onMounted(() => {
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索</a-button
>
@@ -519,7 +522,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<a-button type="text" @click.prevent="fnGetList">
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>

View File

@@ -223,7 +223,7 @@ function fnModalOk(userIds: string[] | number[]) {
key,
duration: 3,
});
fnGetList();
fnGetList(1);
} else {
message.error({
content: `${res.msg}`,
@@ -280,10 +280,13 @@ function fnClose() {
}
}
/**查询角色已授权用户列表 */
function fnGetList() {
/**查询角色已授权用户列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
queryParams.pageNum = pageNum;
}
authUserAllocatedList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
// 取消勾选
@@ -362,7 +365,7 @@ onMounted(() => {
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索</a-button
>
@@ -429,7 +432,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<a-button type="text" @click.prevent="fnGetList">
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>

View File

@@ -156,10 +156,13 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) {
tableState.selectedRowKeys = keys;
}
/**查询角色未授权用户列表 */
function fnGetList() {
/**查询角色未授权用户列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if (pageNum) {
queryParams.pageNum = pageNum;
}
authUserAllocatedList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
// 取消勾选
@@ -258,7 +261,7 @@ watch(
<a-col :lg="12" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索</a-button
>

View File

@@ -403,7 +403,7 @@ function fnModalOk() {
});
modalState.visibleByEdit = false;
modalStateFrom.resetFields();
fnGetList();
fnGetList(1);
} else {
message.error({
content: `${res.msg}`,
@@ -672,10 +672,13 @@ function fnExportList() {
});
}
/**查询角色列表 */
function fnGetList() {
/**查询角色列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
queryParams.pageNum = pageNum;
}
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
@@ -760,7 +763,7 @@ onMounted(() => {
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索
</a-button>
@@ -831,7 +834,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<a-button type="text" @click.prevent="fnGetList">
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>

View File

@@ -448,7 +448,7 @@ function fnModalOk() {
});
modalState.visibleByEdit = false;
modalStateFrom.resetFields();
fnGetList();
fnGetList(1);
} else {
message.error({
content: `${res.msg}`,
@@ -710,10 +710,13 @@ function fnModalUploadImportExportTemplate() {
});
}
/**查询用户列表 */
function fnGetList() {
/**查询用户列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if(pageNum){
queryParams.pageNum = pageNum;
}
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
@@ -799,7 +802,7 @@ onMounted(() => {
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
搜索
</a-button>
@@ -923,7 +926,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>刷新</template>
<a-button type="text" @click.prevent="fnGetList">
<a-button type="text" @click.prevent="fnGetList(1)">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>