((resolve) => {
- setTimeout(() => {
- resolve({ ...SUCCESS_RESPONSE_DATA, data: { list } })
- }, 1000)
- })
-}
-
-/** 模拟请求接口失败 */
-export function getErrorApi() {
- return new Promise((_resolve, reject) => {
- setTimeout(() => {
- reject(new Error("发生错误"))
- }, 1000)
- })
-}
diff --git a/management/web/src/pages/demo/composable-demo/use-fetch-select.vue b/management/web/src/pages/demo/composable-demo/use-fetch-select.vue
deleted file mode 100644
index 6fa5f95..0000000
--- a/management/web/src/pages/demo/composable-demo/use-fetch-select.vue
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
- 该示例是演示:通过 composable 自动调用 api 后拿到 Select 组件需要的数据并传递给 Select 组件
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/management/web/src/pages/demo/composable-demo/use-fullscreen-loading.vue b/management/web/src/pages/demo/composable-demo/use-fullscreen-loading.vue
deleted file mode 100644
index c04225b..0000000
--- a/management/web/src/pages/demo/composable-demo/use-fullscreen-loading.vue
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
- 该示例是演示:通过将要执行的函数传递给 composable,让 composable 自动开启全屏 loading,函数执行结束后自动关闭 loading
-
-
-
- 查询成功
-
-
- 查询失败
-
-
-
-
-
-
diff --git a/management/web/src/pages/demo/composable-demo/use-watermark.vue b/management/web/src/pages/demo/composable-demo/use-watermark.vue
deleted file mode 100644
index 5438772..0000000
--- a/management/web/src/pages/demo/composable-demo/use-watermark.vue
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
- 该示例是演示:通过调用 composable 开启或关闭水印,
- 支持局部、全局、自定义样式(颜色、透明度、字体大小、字体、倾斜角度等),并自带防御(防删、防隐藏)和自适应功能
-
-
-
-
-
-
- 创建局部水印
-
-
- 创建无防御局部水印
-
-
- 清除局部水印
-
-
-
-
- 创建全局水印
-
-
- 创建无防御全局水印
-
-
- 清除全局水印
-
-
-
-
-
-
-
-
diff --git a/management/web/src/pages/demo/level2/index.vue b/management/web/src/pages/demo/level2/index.vue
deleted file mode 100644
index 3018f18..0000000
--- a/management/web/src/pages/demo/level2/index.vue
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- 三级及其以上路由缓存功能默认关闭,需要请前往此配置文件中打开:
-
-
- src/router/config.ts
-
-
-
-
-
-
-
-
-
diff --git a/management/web/src/pages/demo/level2/level3/index.vue b/management/web/src/pages/demo/level2/level3/index.vue
deleted file mode 100644
index a1ad378..0000000
--- a/management/web/src/pages/demo/level2/level3/index.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/management/web/src/pages/demo/permission/button-level.vue b/management/web/src/pages/demo/permission/button-level.vue
deleted file mode 100644
index 34c2b31..0000000
--- a/management/web/src/pages/demo/permission/button-level.vue
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
- admin
-
-
- admin 和 editor
-
-
-
-
- Element Plus 的 el-tab-pane 和 el-table-column 以及其它动态渲染 DOM 的场景不适合使用 v-permission
- 这种情况下你可以通过 v-if + checkPermission 来实现
-
-
-
-
- v-if="checkPermission(['admin'])"
-
-
-
-
- v-if="checkPermission(['admin', 'editor'])"
-
-
-
-
-
-
-
-
diff --git a/management/web/src/pages/demo/permission/components/SwitchRoles.vue b/management/web/src/pages/demo/permission/components/SwitchRoles.vue
deleted file mode 100644
index a1ce0a2..0000000
--- a/management/web/src/pages/demo/permission/components/SwitchRoles.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
- 你的角色:
-
- {{ role }}
-
-
-
- 切换用户:
-
-
-
-
-
-
-
-
-
diff --git a/management/web/src/pages/demo/permission/page-level.vue b/management/web/src/pages/demo/permission/page-level.vue
deleted file mode 100644
index 4474602..0000000
--- a/management/web/src/pages/demo/permission/page-level.vue
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
- 当前页面只有「Admin」角色可见,切换角色后将不能进入该页面
-
-
-
-
-
diff --git a/management/web/src/pages/demo/unocss/index.vue b/management/web/src/pages/demo/unocss/index.vue
deleted file mode 100644
index 64b69bf..0000000
--- a/management/web/src/pages/demo/unocss/index.vue
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- UnoCSS
-
-
- 该页面是一个 UnoCSS 的使用案例,其他页面依旧采用 Scss
-
-
-
-
-
diff --git a/management/web/src/pages/demo/vxe-table/index.vue b/management/web/src/pages/demo/vxe-table/index.vue
deleted file mode 100644
index b05b5de..0000000
--- a/management/web/src/pages/demo/vxe-table/index.vue
+++ /dev/null
@@ -1,425 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 新增用户
-
-
- 批量删除
-
-
-
-
-
- 修改
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/management/web/src/pages/demo/vxe-table/tsx/RoleColumnSlots.tsx b/management/web/src/pages/demo/vxe-table/tsx/RoleColumnSlots.tsx
deleted file mode 100644
index d8f075d..0000000
--- a/management/web/src/pages/demo/vxe-table/tsx/RoleColumnSlots.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import type { VxeColumnPropTypes } from "vxe-table/types/column"
-
-export const RoleColumnSlots: VxeColumnPropTypes.Slots = {
- default: ({ row, column }) => {
- const cellValue = row[column.field]
- const type = cellValue === "admin" ? "primary" : "warning"
- return [{cellValue}]
- }
-}
diff --git a/management/web/src/pages/demo/vxe-table/tsx/StatusColumnSlots.tsx b/management/web/src/pages/demo/vxe-table/tsx/StatusColumnSlots.tsx
deleted file mode 100644
index 94e532a..0000000
--- a/management/web/src/pages/demo/vxe-table/tsx/StatusColumnSlots.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import type { VxeColumnPropTypes } from "vxe-table/types/column"
-
-export const StatusColumnSlots: VxeColumnPropTypes.Slots = {
- default: ({ row, column }) => {
- const cellValue = row[column.field]
- const [type, value] = cellValue ? ["success", "启用"] : ["danger", "禁用"]
- return [{value}]
- }
-}
diff --git a/management/web/src/pages/team-management/index.vue b/management/web/src/pages/team-management/index.vue
new file mode 100644
index 0000000..b85d351
--- /dev/null
+++ b/management/web/src/pages/team-management/index.vue
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 成员管理
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
团队名称:{{ currentTeam.name }}
+
负责人:{{ currentTeam.ownerName }}
+
+
+
+
+ 添加成员
+
+
+
+
+
+
+
+ {{ scope.row.role === 'owner' ? '拥有者' : (scope.row.role === 'normal' ? '普通成员' : scope.row.role) }}
+
+
+
+
+
+
+ 移除
+
+
+
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 普通成员
+
+
+
+
+
+
+
+ 取消
+
+
+ 确认
+
+
+
+
+
+
+
diff --git a/management/web/src/pages/user-config/index.vue b/management/web/src/pages/user-config/index.vue
new file mode 100644
index 0000000..2577949
--- /dev/null
+++ b/management/web/src/pages/user-config/index.vue
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+
+ 确认
+
+
+
+
+
+
+
diff --git a/management/web/src/pages/demo/element-plus/index.vue b/management/web/src/pages/user-management/index.vue
similarity index 99%
rename from management/web/src/pages/demo/element-plus/index.vue
rename to management/web/src/pages/user-management/index.vue
index 233c994..ec30392 100644
--- a/management/web/src/pages/demo/element-plus/index.vue
+++ b/management/web/src/pages/user-management/index.vue
@@ -8,7 +8,7 @@ import { cloneDeep } from "lodash-es"
defineOptions({
// 命名当前组件
- name: "ElementPlus"
+ name: "UserManagement"
})
const loading = ref(false)
diff --git a/management/web/src/router/index.ts b/management/web/src/router/index.ts
index 2fa71b3..3a660e5 100644
--- a/management/web/src/router/index.ts
+++ b/management/web/src/router/index.ts
@@ -89,15 +89,51 @@ export const constantRoutes: RouteRecordRaw[] = [
children: [
{
path: "dashboard",
- component: () => import("@/pages/demo/element-plus/index.vue"),
- name: "ElementPlus",
+ component: () => import("@/pages/user-management/index.vue"),
+ name: "UserManagement",
meta: {
title: "用户管理",
- svgIcon: "dashboard",
+ svgIcon: "user-management",
affix: true
}
}
]
+ },
+ {
+ path: "/team",
+ component: Layouts,
+ redirect: "/team/index",
+ children: [
+ {
+ path: "index",
+ component: () => import("@/pages/team-management/index.vue"),
+ name: "Team",
+ meta: {
+ title: "团队管理",
+ svgIcon: "team-management",
+ affix: false,
+ keepAlive: true
+ }
+ }
+ ]
+ },
+ {
+ path: "/config",
+ component: Layouts,
+ redirect: "/config/index",
+ children: [
+ {
+ path: "index",
+ component: () => import("@/pages/user-config/index.vue"),
+ name: "UserConfig",
+ meta: {
+ title: "用户配置",
+ svgIcon: "user-config",
+ affix: false,
+ keepAlive: true
+ }
+ }
+ ]
}
// {
// path: "/",
diff --git a/management/web/types/auto/components.d.ts b/management/web/types/auto/components.d.ts
index 01223a2..1e86400 100644
--- a/management/web/types/auto/components.d.ts
+++ b/management/web/types/auto/components.d.ts
@@ -33,9 +33,13 @@ declare module 'vue' {
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
+ ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover']
+ ElRadio: typeof import('element-plus/es')['ElRadio']
+ ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
+ ElSelect: typeof import('element-plus/es')['ElSelect']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
diff --git a/management/web/types/auto/svg-component-global.d.ts b/management/web/types/auto/svg-component-global.d.ts
index 8c7ee10..3ef8ffe 100644
--- a/management/web/types/auto/svg-component-global.d.ts
+++ b/management/web/types/auto/svg-component-global.d.ts
@@ -9,18 +9,18 @@ declare module 'vue' {
export interface GlobalComponents {
SvgIcon: import("vue").DefineComponent<{
name: {
- type: import("vue").PropType<"dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search">;
+ type: import("vue").PropType<"dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search" | "team-management" | "user-config" | "user-management">;
default: string;
required: true;
};
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly;
+ type: import("vue").PropType<"dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search" | "team-management" | "user-config" | "user-management">;
default: string;
required: true;
};
}>>, {
- name: "dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search";
+ name: "dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search" | "team-management" | "user-config" | "user-management";
}>;
}
}
diff --git a/management/web/types/auto/svg-component.d.ts b/management/web/types/auto/svg-component.d.ts
index ca3f244..cc795b0 100644
--- a/management/web/types/auto/svg-component.d.ts
+++ b/management/web/types/auto/svg-component.d.ts
@@ -7,20 +7,20 @@
declare module '~virtual/svg-component' {
const SvgIcon: import("vue").DefineComponent<{
name: {
- type: import("vue").PropType<"dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search">;
+ type: import("vue").PropType<"dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search" | "team-management" | "user-config" | "user-management">;
default: string;
required: true;
};
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly;
+ type: import("vue").PropType<"dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search" | "team-management" | "user-config" | "user-management">;
default: string;
required: true;
};
}>>, {
- name: "dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search";
+ name: "dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search" | "team-management" | "user-config" | "user-management";
}>;
- export const svgNames: ["dashboard", "fullscreen-exit", "fullscreen", "keyboard-down", "keyboard-enter", "keyboard-esc", "keyboard-up", "search"];
- export type SvgName = "dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search";
+ export const svgNames: ["dashboard", "fullscreen-exit", "fullscreen", "keyboard-down", "keyboard-enter", "keyboard-esc", "keyboard-up", "search", "team-management", "user-config", "user-management"];
+ export type SvgName = "dashboard" | "fullscreen-exit" | "fullscreen" | "keyboard-down" | "keyboard-enter" | "keyboard-esc" | "keyboard-up" | "search" | "team-management" | "user-config" | "user-management";
export default SvgIcon;
}