This commit is contained in:
Ray.Hao
2026-04-02 09:25:15 +08:00
7 changed files with 46 additions and 40 deletions

View File

@@ -146,12 +146,12 @@ public class SecurityConfig {
public AuthenticationManager authenticationManager(
DaoAuthenticationProvider daoAuthenticationProvider,
SmsAuthenticationProvider smsAuthenticationProvider,
WxMaAuthenticationProvider wechatMiniAuthenticationProvider
WxMaAuthenticationProvider wxMaAuthenticationProvider
) {
return new ProviderManager(
daoAuthenticationProvider,
smsAuthenticationProvider,
wechatMiniAuthenticationProvider
wxMaAuthenticationProvider
);
}

View File

@@ -1,5 +1,5 @@
<template>
<div class="app-container h-full flex flex-1 flex-col">
<div class="page-container h-full flex flex-1 flex-col">
<!-- 搜索 -->
<PageSearch
ref="searchRef"

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<div class="filter-section">
<div class="page-container">
<el-card class="page-search" shadow="never">
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="auto">
#foreach($fieldConfig in $fieldConfigs)
#if($fieldConfig.isShowInQuery == 1)
@@ -88,16 +88,16 @@
</el-form-item>
#end
#end
<el-form-item class="search-buttons">
<el-form-item>
<el-button type="primary" icon="search" @click="handleQuery">搜索</el-button>
<el-button icon="refresh" @click="handleResetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
<el-card shadow="hover" class="table-section">
<div class="table-section__toolbar">
<div class="table-section__toolbar--actions">
<el-card class="page-content" shadow="never">
<div class="page-toolbar">
<div class="page-toolbar__left">
<el-button
v-hasPerm="['${moduleName}:${entityKebab}:create']"
type="success"
@@ -121,7 +121,6 @@
border
stripe
highlight-current-row
class="table-section__content"
row-key="id"
@selection-change="handleSelectionChange"
>
@@ -171,13 +170,15 @@
</el-table-column>
</el-table>
<pagination
v-if="total > 0"
v-model:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="fetchList"
/>
<div class="page-pagination">
<pagination
v-if="total > 0"
v-model:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="fetchList"
/>
</div>
</el-card>
<!-- $!{businessName}表单弹窗 -->

View File

@@ -2,7 +2,7 @@
* ${entityName} $!{businessName}类型定义
*/
import type { BaseQueryParams } from "./common";
import type { BaseQueryParams } from "@/api/common";
/** $!{businessName}查询参数 */
export interface ${entityName}QueryParams extends BaseQueryParams {

View File

@@ -1,5 +1,6 @@
import request from "@/utils/request";
import type { ${entityName}Form, ${entityName}QueryParams, ${entityName}Item } from "@/types/api";
import type { ${entityName}Form, ${entityName}QueryParams, ${entityName}Item } from "./types";
import type { PageResult } from "@/api/common";
const ${entityUpperSnake}_BASE_URL = "/api/v1/${entityKebab}";
@@ -66,3 +67,6 @@ const ${entityName}API = {
}
export default ${entityName}API;
// 重导出类型
export * from "./types";

View File

@@ -1,5 +1,5 @@
<template>
<div class="app-container h-full flex flex-1 flex-col">
<div class="page-container h-full flex flex-1 flex-col">
<!-- 搜索 -->
<PageSearch
ref="searchRef"
@@ -64,7 +64,7 @@
defineOptions({ name: "$entityName" });
import ${entityName}API from "@/api/${moduleName}/${entityKebab}";
import type { ${entityName}Form, ${entityName}QueryParams } from "@/types/api";
import type { ${entityName}Form, ${entityName}QueryParams } from "@/api/${moduleName}/${entityKebab}";
import type { IObject, IModalConfig, IContentConfig, ISearchConfig } from "@/components/CURD/types";
import usePage from "@/components/CURD/usePage";
@@ -151,8 +151,8 @@ const contentConfig: IContentConfig<${entityName}QueryParams> = reactive({
// 数据解析函数
parseData(res: any) {
return {
total: res?.page?.total ?? 0,
list: res?.data ?? [],
total: res?.total ?? 0,
list: res?.list ?? [],
};
},
// 分页配置

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<div class="filter-section">
<div class="page-container">
<el-card class="page-search" shadow="never">
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="auto">
#foreach($fieldConfig in $fieldConfigs)
#if($fieldConfig.isShowInQuery == 1)
@@ -88,16 +88,16 @@
</el-form-item>
#end
#end
<el-form-item class="search-buttons">
<el-form-item>
<el-button type="primary" icon="search" @click="handleQuery">搜索</el-button>
<el-button icon="refresh" @click="handleResetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
<el-card shadow="hover" class="table-section">
<div class="table-section__toolbar">
<div class="table-section__toolbar--actions">
<el-card class="page-content" shadow="never">
<div class="page-toolbar">
<div class="page-toolbar__left">
<el-button
v-hasPerm="['${moduleName}:${entityKebab}:create']"
type="success"
@@ -121,7 +121,6 @@
border
stripe
highlight-current-row
class="table-section__content"
row-key="id"
@selection-change="handleSelectionChange"
>
@@ -171,13 +170,15 @@
</el-table-column>
</el-table>
<pagination
v-if="total > 0"
v-model:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="fetchList"
/>
<div class="page-pagination">
<pagination
v-if="total > 0"
v-model:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="fetchList"
/>
</div>
</el-card>
<!-- $!{businessName}表单弹窗 -->
@@ -277,7 +278,7 @@
import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from "element-plus";
import { useTableSelection } from "@/composables";
import ${entityName}API from "@/api/${moduleName}/${entityKebab}";
import type { ${entityName}Item, ${entityName}Form, ${entityName}QueryParams } from "@/types/api";
import type { ${entityName}Item, ${entityName}Form, ${entityName}QueryParams } from "@/api/${moduleName}/${entityKebab}";
defineOptions({
name: "${entityName}",