feat: 项目结构重构优化

This commit is contained in:
Ray.Hao
2025-12-26 12:35:37 +08:00
parent 65ad4fe59f
commit aa374dd2ba
164 changed files with 11305 additions and 3103 deletions

View File

@@ -1,5 +1,4 @@
<!-- 部门树 -->
<template>
<template>
<el-card shadow="never">
<el-input v-model="deptName" placeholder="部门名称" clearable>
<template #prefix>

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div>
<el-dialog
v-model="visible"
@@ -14,7 +14,7 @@
:model="importFormData"
:rules="importFormRules"
>
<el-form-item label="文件" prop="files">
<el-form-item label="文件" prop="files">
<el-upload
ref="uploadRef"
v-model:file-list="importFormData.files"
@@ -32,7 +32,7 @@
</div>
<template #tip>
<div class="el-upload__tip">
格式为*.xlsx / *.xls文件不超过一个
格式为 *.xlsx / *.xls文件不超过1M
<el-link
type="primary"
icon="download"
@@ -57,9 +57,9 @@
:disabled="importFormData.files.length === 0"
@click="handleUpload"
>
确定
</el-button>
<el-button @click="handleClose"> </el-button>
<el-button @click="handleClose">取消</el-button>
</div>
</template>
</el-dialog>

View File

@@ -1,4 +1,4 @@
<!-- 用户管理 -->
<!-- 用户管理 -->
<template>
<div class="app-container">
<el-row :gutter="20">
@@ -103,7 +103,7 @@
<el-table-column label="昵称" width="150" align="center" prop="nickname" />
<el-table-column label="性别" width="100" align="center">
<template #default="scope">
<DictLabel v-model="scope.row.gender" code="gender" />
<DictTag v-model="scope.row.gender" code="gender" />
</template>
</el-table-column>
<el-table-column label="部门" width="120" align="center" prop="deptName" />
@@ -253,11 +253,10 @@ import { useDebounceFn } from "@vueuse/core";
import { ElMessage, ElMessageBox, type FormInstance } from "element-plus";
// ==================== 3. 类型定义 ====================
import type { UserForm, UserPageQuery, UserPageVo } from "@/api/types";
import type { UserForm, UserPageQuery, UserPageVo } from "@/types/api";
// ==================== 3.5 工具函数 ====================
import { downloadFile } from "@/utils";
import { VALIDATORS } from "@/utils/validators";
import { downloadFile, VALIDATORS } from "@/utils";
// ==================== 4. API 服务 ====================
import UserAPI from "@/api/system/user";
import DeptAPI from "@/api/system/dept";
@@ -570,7 +569,7 @@ useAiAction({
*/
updateUserNickname: {
needConfirm: true,
callBackendApi: true, // 自动调用后端 API
callBackendApi: true,
confirmMessage: (args: any) =>
`AI 助手将执行以下操作:<br/>
<strong>修改用户:</strong> ${args.username}<br/>