From efb5d3995df73d34ec54d23cff0b74a0afdf1c5d Mon Sep 17 00:00:00 2001
From: riverflow <3011499946@qq.com>
Date: Wed, 13 Aug 2025 21:02:23 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9C=A8views/user=E4=B8=8B=E6=96=B0=E5=BB=BAA?=
=?UTF-8?q?ddUser.vue=E6=A8=A1=E5=9D=97=EF=BC=8C=E7=BB=86=E5=88=86?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=20=E5=AE=8C=E5=96=84?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8C=89=E9=92=AE=E5=8A=9F=E8=83=BD=20?=
=?UTF-8?q?=E9=80=9A=E8=BF=87=E6=8C=89=E9=92=AE=E5=AE=9E=E7=8E=B0=E8=A1=A8?=
=?UTF-8?q?=E5=8D=95=E5=BC=B9=E7=AA=97=20=E6=A0=B9=E6=8D=AEElement-plus?=
=?UTF-8?q?=E6=8F=90=E4=BE=9B=E7=9A=84=E8=A1=A8=E5=8D=95=E7=BB=84=E4=BB=B6?=
=?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=A1=A8=E5=8D=95=E5=B1=9E=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
根据数据库表中的字段,设置需要从表单中获取的信息
---
order-system/src/App.vue | 5 +-
order-system/src/api/user/userModel.ts | 11 ++
order-system/src/components/SysDialog.vue | 2 +-
order-system/src/compositions/user/useUser.ts | 28 ++++
.../src/compositions/user/useUserTable.ts | 31 +++-
order-system/src/hooks/useDialog.ts | 11 +-
order-system/src/layout/Index.vue | 6 +-
order-system/src/views/dashboard/Index.vue | 2 +-
order-system/src/views/user/AddUser.vue | 149 ++++++++++++++++++
order-system/src/views/user/Index.vue | 38 +++--
order-system/src/vite-env.d.ts | 26 ++-
11 files changed, 271 insertions(+), 38 deletions(-)
create mode 100644 order-system/src/compositions/user/useUser.ts
create mode 100644 order-system/src/views/user/AddUser.vue
diff --git a/order-system/src/App.vue b/order-system/src/App.vue
index 2cff022..6762809 100644
--- a/order-system/src/App.vue
+++ b/order-system/src/App.vue
@@ -1,7 +1,6 @@
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/order-system/src/api/user/userModel.ts b/order-system/src/api/user/userModel.ts
index cac5300..fdd90af 100644
--- a/order-system/src/api/user/userModel.ts
+++ b/order-system/src/api/user/userModel.ts
@@ -4,4 +4,15 @@ export type ListUserParm = {
pageSize: number;
name: string;
phone: string;
+}
+
+// 定义表单数据类型
+export type UserModel = {
+ userId: string;
+ username: string;
+ password: string;
+ phone: string;
+ email: string;
+ sex: string;
+ name: string;
}
\ No newline at end of file
diff --git a/order-system/src/components/SysDialog.vue b/order-system/src/components/SysDialog.vue
index 9aa0cf6..5de3e44 100644
--- a/order-system/src/components/SysDialog.vue
+++ b/order-system/src/components/SysDialog.vue
@@ -59,7 +59,7 @@ const onConfirm = ()=>{
\ No newline at end of file
diff --git a/order-system/src/views/dashboard/Index.vue b/order-system/src/views/dashboard/Index.vue
index 402dcf2..7659c85 100644
--- a/order-system/src/views/dashboard/Index.vue
+++ b/order-system/src/views/dashboard/Index.vue
@@ -1,7 +1,7 @@
首页面
- 测试弹框组件
+ 测试弹框组件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 男
+ 女
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/order-system/src/views/user/Index.vue b/order-system/src/views/user/Index.vue
index d32a8fa..48e6b30 100644
--- a/order-system/src/views/user/Index.vue
+++ b/order-system/src/views/user/Index.vue
@@ -9,27 +9,37 @@
- 搜索
- 重置
- 新增
-
+ 搜索
+ 重置
+ 新增
+
-
+
+
+
+
+
+// 获取表格相关业务
+const { tableShowBtn, listParm, getList, searchBtn, resetBtn } = useUserTable()
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/order-system/src/vite-env.d.ts b/order-system/src/vite-env.d.ts
index 065a1c3..32b8c54 100644
--- a/order-system/src/vite-env.d.ts
+++ b/order-system/src/vite-env.d.ts
@@ -59,11 +59,21 @@ declare module '@/compositions/*' {
}
// 添加api路径别名支持
-// declare module '@/api/user/userModel' {
-// export type ListUserParm = {
-// currentPage: number;
-// pageSize: number;
-// name: string;
-// phone: string;
-// }
-// }
\ No newline at end of file
+declare module '@/api/user/userModel' {
+ export type ListUserParm = {
+ currentPage: number;
+ pageSize: number;
+ name: string;
+ phone: string;
+ }
+
+ export type UserModel = {
+ userId: string;
+ username: string;
+ password: string;
+ phone: string;
+ email: string;
+ sex: string;
+ name: string;
+}
+}
\ No newline at end of file