bohui-vue 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +121 -0
  2. package/bin/create-vue-template.js +565 -0
  3. package/package.json +28 -0
  4. package/templates/vue-project/.browserslistrc +3 -0
  5. package/templates/vue-project/.editorconfig +28 -0
  6. package/templates/vue-project/.env.development +2 -0
  7. package/templates/vue-project/.env.production +2 -0
  8. package/templates/vue-project/.eslintrc.cjs +76 -0
  9. package/templates/vue-project/.keep +0 -0
  10. package/templates/vue-project/.node-version +1 -0
  11. package/templates/vue-project/.prettierignore +13 -0
  12. package/templates/vue-project/.prettierrc +20 -0
  13. package/templates/vue-project/.prettierrc.txt +130 -0
  14. package/templates/vue-project/.stylelintrc.json +94 -0
  15. package/templates/vue-project/README.md +24 -0
  16. package/templates/vue-project/babel.config.js +5 -0
  17. package/templates/vue-project/index.html +34 -0
  18. package/templates/vue-project/package.json +75 -0
  19. package/templates/vue-project/public/favicon.ico +0 -0
  20. package/templates/vue-project/public/static/img/ai-default.jpg +0 -0
  21. package/templates/vue-project/public/static/img/image.png +0 -0
  22. package/templates/vue-project/public/static/img/ppt1.png +0 -0
  23. package/templates/vue-project/public/static/img/ppt2.png +0 -0
  24. package/templates/vue-project/public/static/img/ppt3.png +0 -0
  25. package/templates/vue-project/public/static/js/config.js +11 -0
  26. package/templates/vue-project/public/static/js/dataConfig.js +1143 -0
  27. package/templates/vue-project/src/App.vue +10 -0
  28. package/templates/vue-project/src/api/error-handler.ts +60 -0
  29. package/templates/vue-project/src/api/http.ts +254 -0
  30. package/templates/vue-project/src/api/services/aicebd.ts +47 -0
  31. package/templates/vue-project/src/api/services/base.ts +18 -0
  32. package/templates/vue-project/src/api/services/umse.ts +17 -0
  33. package/templates/vue-project/src/assets/font/Alibaba-PuHuiTi-Medium.otf +0 -0
  34. package/templates/vue-project/src/assets/font/Alibaba-PuHuiTi-Regular.otf +0 -0
  35. package/templates/vue-project/src/assets/font/DOUYINSANSBOLD.OTF +0 -0
  36. package/templates/vue-project/src/assets/font/Pangmen-Title.TTF +0 -0
  37. package/templates/vue-project/src/assets/font/font.css +25 -0
  38. package/templates/vue-project/src/assets/iconfont/iconfont.css +402 -0
  39. package/templates/vue-project/src/assets/iconfont/iconfont.js +66 -0
  40. package/templates/vue-project/src/assets/iconfont/iconfont.json +688 -0
  41. package/templates/vue-project/src/assets/iconfont/iconfont.ttf +0 -0
  42. package/templates/vue-project/src/assets/iconfont/iconfont.woff +0 -0
  43. package/templates/vue-project/src/assets/iconfont/iconfont.woff2 +0 -0
  44. package/templates/vue-project/src/assets/images/Click-tap.png +0 -0
  45. package/templates/vue-project/src/assets/images/Effects.png +0 -0
  46. package/templates/vue-project/src/assets/images/bg.png +0 -0
  47. package/templates/vue-project/src/assets/images/erCode.png +0 -0
  48. package/templates/vue-project/src/assets/images/header-bg.png +0 -0
  49. package/templates/vue-project/src/assets/images/logo.png +0 -0
  50. package/templates/vue-project/src/assets/scss/common.scss +530 -0
  51. package/templates/vue-project/src/assets/styles/element-overrides.css +53 -0
  52. package/templates/vue-project/src/assets/styles/reset.css +186 -0
  53. package/templates/vue-project/src/assets/styles/theme.css +100 -0
  54. package/templates/vue-project/src/components/BarChart.vue +238 -0
  55. package/templates/vue-project/src/components/echarts/EChart.vue +140 -0
  56. package/templates/vue-project/src/composables/useTheme.ts +84 -0
  57. package/templates/vue-project/src/main.ts +111 -0
  58. package/templates/vue-project/src/mocks/base.ts +37 -0
  59. package/templates/vue-project/src/mocks/umse.ts +31 -0
  60. package/templates/vue-project/src/router/index.ts +32 -0
  61. package/templates/vue-project/src/shims-vue.d.ts +19 -0
  62. package/templates/vue-project/src/store/index.ts +18 -0
  63. package/templates/vue-project/src/store/modules/user.ts +85 -0
  64. package/templates/vue-project/src/types/DTO/aicebd.d.ts +60 -0
  65. package/templates/vue-project/src/types/DTO/base.d.ts +26 -0
  66. package/templates/vue-project/src/types/DTO/global.d.ts +48 -0
  67. package/templates/vue-project/src/types/VO/teachingLog.d.ts +15 -0
  68. package/templates/vue-project/src/types/auto-imports.d.ts +73 -0
  69. package/templates/vue-project/src/types/components.d.ts +17 -0
  70. package/templates/vue-project/src/types/element-plus.d.ts +15 -0
  71. package/templates/vue-project/src/types/js-cookie.d.ts +1 -0
  72. package/templates/vue-project/src/types/unocss.d.ts +2 -0
  73. package/templates/vue-project/src/types/vite-plugins.d.ts +3 -0
  74. package/templates/vue-project/src/types/vue-router.d.ts +1 -0
  75. package/templates/vue-project/src/types/window-config.d.ts +12 -0
  76. package/templates/vue-project/src/utils/com-methods.ts +307 -0
  77. package/templates/vue-project/src/utils/echarts.ts +111 -0
  78. package/templates/vue-project/src/utils/number.ts +99 -0
  79. package/templates/vue-project/src/utils/rem.ts +82 -0
  80. package/templates/vue-project/src/utils/responsive.ts +103 -0
  81. package/templates/vue-project/src/utils/time.ts +314 -0
  82. package/templates/vue-project/src/utils/tracker.ts +527 -0
  83. package/templates/vue-project/src/utils/validators.ts +85 -0
  84. package/templates/vue-project/src/utils/window.ts +132 -0
  85. package/templates/vue-project/src/views/home/Home.vue +60 -0
  86. package/templates/vue-project/src/views/home/composables/useUserAuth.ts +13 -0
  87. package/templates/vue-project/src/views/teachingLog/TeachingLog.vue +40 -0
  88. package/templates/vue-project/src/views/teachingLog/__tests__/TeachingEffect.test.ts +96 -0
  89. package/templates/vue-project/src/views/teachingLog/__tests__/TeachingHighlight.test.ts +66 -0
  90. package/templates/vue-project/src/views/teachingLog/__tests__/TeachingLog.test.ts +34 -0
  91. package/templates/vue-project/src/views/teachingLog/components/TeachingEffect.vue +458 -0
  92. package/templates/vue-project/src/views/teachingLog/components/TeachingHighlight.vue +181 -0
  93. package/templates/vue-project/src/views/teachingLog/composables/useEffectTooltip.ts +88 -0
  94. package/templates/vue-project/src/views/teachingLog/composables/useEffectTrendChart.ts +160 -0
  95. package/templates/vue-project/tests/setup.ts +27 -0
  96. package/templates/vue-project/tsconfig.json +24 -0
  97. package/templates/vue-project/tsconfig.node.json +41 -0
  98. package/templates/vue-project/uno.config.ts +84 -0
  99. package/templates/vue-project/vite.config.ts +216 -0
  100. package/templates/vue-project/vue3_ai_prompt.md +652 -0
  101. package/templates/vue-project/vue3_ai_prompt_basic.md +722 -0
  102. package/templates/vue-project/vue3_ai_prompt_full.md +1021 -0
  103. package/templates/vue-project/vue3_ai_prompt_unocss.md +768 -0
  104. package/templates/vue-project//345/267/245/347/250/213/345/214/226/346/250/241/346/235/277/344/273/213/347/273/215.md +463 -0
@@ -0,0 +1,84 @@
1
+ import { ref, onMounted, computed } from "vue";
2
+ import type { Ref, ComputedRef } from "vue";
3
+
4
+ type Theme = "light" | "dark";
5
+
6
+ const THEME_KEY = "app-theme";
7
+ const THEME_ATTRIBUTE = "data-theme";
8
+
9
+ /**
10
+ * 主题切换 hooks
11
+ */
12
+ export interface UseThemeReturn {
13
+ theme: Ref<Theme>;
14
+ isDark: ComputedRef<boolean>;
15
+ toggleTheme: () => void;
16
+ setTheme: (newTheme: Theme) => void;
17
+ }
18
+
19
+ export const useTheme = (): UseThemeReturn => {
20
+ const theme = ref<Theme>("light");
21
+
22
+ /**
23
+ * 获取当前主题
24
+ */
25
+ const getTheme = (): Theme => {
26
+ if (typeof window === "undefined") return "light";
27
+
28
+ // 优先从 localStorage 读取
29
+ const savedTheme = localStorage.getItem(THEME_KEY) as Theme;
30
+ if (savedTheme === "dark" || savedTheme === "light") {
31
+ return savedTheme;
32
+ }
33
+
34
+ // 检查系统偏好
35
+ if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
36
+ return "dark";
37
+ }
38
+
39
+ return "light";
40
+ };
41
+
42
+ /**
43
+ * 设置主题
44
+ */
45
+ const setTheme = (newTheme: Theme): void => {
46
+ if (typeof window === "undefined") return;
47
+
48
+ const root = document.documentElement;
49
+
50
+ if (newTheme === "dark") {
51
+ root.setAttribute(THEME_ATTRIBUTE, "dark");
52
+ } else {
53
+ root.removeAttribute(THEME_ATTRIBUTE);
54
+ }
55
+
56
+ // 保存到 localStorage
57
+ localStorage.setItem(THEME_KEY, newTheme);
58
+ theme.value = newTheme;
59
+ };
60
+
61
+ /**
62
+ * 切换主题
63
+ */
64
+ const toggleTheme = (): void => {
65
+ const newTheme: Theme = theme.value === "dark" ? "light" : "dark";
66
+ setTheme(newTheme);
67
+ };
68
+
69
+ // 初始化主题
70
+ onMounted(() => {
71
+ const currentTheme = getTheme();
72
+ setTheme(currentTheme);
73
+ });
74
+
75
+ // 计算属性:是否为暗黑模式
76
+ const isDark = computed(() => theme.value === "dark");
77
+
78
+ return {
79
+ theme,
80
+ isDark,
81
+ toggleTheme,
82
+ setTheme,
83
+ };
84
+ };
@@ -0,0 +1,111 @@
1
+ /*
2
+ * @Description:
3
+ * @Version: 1.0
4
+ * @Autor: wangmeng
5
+ * @Date: 2024-01-18 13:49:57
6
+ * @LastEditors: wamgmeng
7
+ * @LastEditTime: 2024-01-19 20:22:54
8
+ */
9
+ import { createApp } from "vue";
10
+ import "@/utils/rem";
11
+ import {
12
+ ElButton,
13
+ ElInput,
14
+ ElSelect,
15
+ ElInputNumber,
16
+ ElTabs,
17
+ ElTable,
18
+ ElTableColumn,
19
+ ElDialog,
20
+ ElDatePicker,
21
+ ElConfigProvider,
22
+ ElPagination,
23
+ ElForm,
24
+ ElFormItem,
25
+ ElIcon,
26
+ ElMessage,
27
+ ElMessageBox,
28
+ ElMenu,
29
+ ElMenuItem,
30
+ ElDrawer,
31
+ ElTag,
32
+ ElTooltip,
33
+ ElCascader,
34
+ ElRadioGroup,
35
+ ElRadio,
36
+ ElCollapse,
37
+ ElCollapseItem,
38
+ } from "element-plus";
39
+ import "element-plus/dist/index.css";
40
+ import "@/assets/font/font.css";
41
+ import "@/assets/iconfont/iconfont.css";
42
+
43
+ import App from "./App.vue";
44
+ import router from "./router";
45
+ import pinia from "./store";
46
+ import { useUserStore } from "./store";
47
+
48
+ import { abortAllRequests, http, formDataHttp } from "@/api/http";
49
+ import { createTrackerPlugin, getTracker } from "@/utils/tracker";
50
+
51
+ import "@unocss/reset/tailwind.css";
52
+ import "uno.css";
53
+ // 主题色和 element-plus 重写合并引入
54
+ import "@/assets/styles/reset.css";
55
+ import "@/assets/styles/theme.css";
56
+ import "@/assets/styles/element-overrides.css";
57
+ import "@/assets/scss/common.scss";
58
+
59
+ const app = createApp(App);
60
+ app.use(ElButton)
61
+ .use(ElInput)
62
+ .use(ElSelect)
63
+ .use(ElInputNumber)
64
+ .use(ElTabs)
65
+ .use(ElTable)
66
+ .use(ElTableColumn)
67
+ .use(ElDialog)
68
+ .use(ElDatePicker)
69
+ .use(ElForm)
70
+ .use(ElFormItem)
71
+ .use(ElConfigProvider)
72
+ .use(ElPagination)
73
+ .use(ElIcon)
74
+ .use(ElMessage)
75
+ .use(ElMessageBox)
76
+ .use(ElMenu)
77
+ .use(ElMenuItem)
78
+ .use(ElDrawer)
79
+ .use(ElTag)
80
+ .use(ElTooltip)
81
+ .use(ElCascader)
82
+ .use(ElRadioGroup)
83
+ .use(ElRadio)
84
+ .use(ElCollapse)
85
+ .use(ElCollapseItem)
86
+ .use(pinia)
87
+ .use(router)
88
+ .use(createTrackerPlugin({ appId: "vue3-template" }))
89
+ .mount("#app");
90
+
91
+ const userStore = useUserStore();
92
+ router.isReady().then(() => {
93
+ userStore.setUserInfo();
94
+ });
95
+
96
+ // 监听用户信息变化,更新 tracker 用户 ID
97
+ watch(
98
+ () => userStore.userInfo,
99
+ (u) => {
100
+ getTracker().setUserId(u?.id ?? null);
101
+ },
102
+ { immediate: true }
103
+ );
104
+
105
+ getTracker().bindRouter(router); // 绑定路由
106
+ getTracker().bindRouterExposure(router); // 绑定路由曝光事件
107
+ getTracker().attachAxios([http, formDataHttp]); // 绑定 axios 实例
108
+
109
+ window.addEventListener("beforeunload", () => {
110
+ abortAllRequests();
111
+ });
@@ -0,0 +1,37 @@
1
+ import type { MockMethod } from "vite-plugin-mock";
2
+
3
+ const baseUrl = "/api/base";
4
+ const SCENARIO = process.env.VITE_MOCK_SCENARIO || "normal";
5
+
6
+ const mocks: MockMethod[] = [
7
+ {
8
+ url: `${baseUrl}/base/organization/user/getUserInfo`,
9
+ method: "post",
10
+ response: ({ query }: any) => {
11
+ const scenario = (query?.scenario as string) || SCENARIO;
12
+ if (scenario === "error") {
13
+ return {
14
+ status: 500,
15
+ data: null,
16
+ message: "获取用户信息失败",
17
+ };
18
+ }
19
+ return {
20
+ status: 200,
21
+ data: {
22
+ id: "u_001",
23
+ code: "user001",
24
+ name: "测试用户",
25
+ headimgurl: null,
26
+ userType: 1,
27
+ academyName: "计算机学院",
28
+ academyCode: "CS",
29
+ roleList: [{ id: "r_admin", name: "管理员" }],
30
+ },
31
+ message: "ok",
32
+ };
33
+ },
34
+ },
35
+ ];
36
+
37
+ export default mocks;
@@ -0,0 +1,31 @@
1
+ import type { MockMethod } from "vite-plugin-mock";
2
+
3
+ const umseUrl = "/api/umse";
4
+ const SCENARIO = process.env.VITE_MOCK_SCENARIO || "normal";
5
+
6
+ const mocks: MockMethod[] = [
7
+ {
8
+ url: `${umseUrl}/userManage/logout`,
9
+ method: "post",
10
+ response: ({ query }: any) => {
11
+ const scenario = (query?.scenario as string) || SCENARIO;
12
+ if (scenario === "error") {
13
+ return {
14
+ status: 500,
15
+ data: null,
16
+ message: "退出登录失败",
17
+ };
18
+ }
19
+ return {
20
+ status: 200,
21
+ data: {
22
+ id: "",
23
+ code: "",
24
+ },
25
+ message: "ok",
26
+ };
27
+ },
28
+ },
29
+ ];
30
+
31
+ export default mocks;
@@ -0,0 +1,32 @@
1
+ import { createRouter, createWebHashHistory } from "vue-router";
2
+ import { abortAllRequests } from "@/api/http";
3
+
4
+ const routes = [
5
+ {
6
+ path: "/",
7
+ redirect: "/teachingLog",
8
+ },
9
+ {
10
+ path: "/home",
11
+ name: "Home",
12
+ component: () => import("@/views/home/Home.vue"),
13
+ children: [],
14
+ },
15
+ {
16
+ path: "/teachingLog",
17
+ name: "TeachingLog",
18
+ component: () => import("@/views/teachingLog/TeachingLog.vue"),
19
+ },
20
+ ];
21
+
22
+ const router = createRouter({
23
+ history: createWebHashHistory(),
24
+ routes,
25
+ });
26
+
27
+ router.beforeEach(() => {
28
+ abortAllRequests();
29
+ return true;
30
+ });
31
+
32
+ export default router;
@@ -0,0 +1,19 @@
1
+ /* eslint-disable */
2
+ declare module "*.vue" {
3
+ import type { DefineComponent } from "vue";
4
+ const component: DefineComponent<{}, {}, any>;
5
+ export default component;
6
+ }
7
+
8
+ // 添加 Element Plus 类型声明
9
+ // declare module "element-plus";
10
+ // declare module "element-plus/dist/locale/zh-cn.mjs";
11
+
12
+ // 静态资源类型声明
13
+ declare module "*.png";
14
+ declare module "*.jpg";
15
+ declare module "*.jpeg";
16
+ declare module "*.gif";
17
+ declare module "*.svg";
18
+ declare module "*.webp";
19
+ declare module "*.ico";
@@ -0,0 +1,18 @@
1
+ import { createPinia } from "pinia";
2
+
3
+ /**
4
+ * Pinia Store 入口文件
5
+ *
6
+ * 使用示例:
7
+ * import { useUserStore } from '@/store';
8
+ *
9
+ * const userStore = useUserStore();
10
+ * userStore.setUserInfo({ name: '张三', id: 1 });
11
+ */
12
+ const pinia = createPinia();
13
+
14
+ export default pinia;
15
+
16
+ // 导出所有 store
17
+ export * from "./modules/user";
18
+
@@ -0,0 +1,85 @@
1
+ import { defineStore } from "pinia";
2
+ import { ref } from "vue";
3
+ import Cookies from "js-cookie";
4
+ import { getFieldFromUrl, removeFieldsFromUrl } from "@/utils/window";
5
+ import { getUserInfoAPI } from "@/api/services/base";
6
+ import { logoutAPI } from "@/api/services/umse";
7
+
8
+ /**
9
+ * 用户 Store
10
+ *
11
+ * 使用示例:
12
+ * import { useUserStore } from '@/store';
13
+ *
14
+ * const userStore = useUserStore();
15
+ *
16
+ * // 设置用户信息
17
+ * userStore.setUserInfo();
18
+ *
19
+ * // 获取用户信息
20
+ * const userInfo = userStore.userInfo;
21
+ *
22
+
23
+ *
24
+ * // 退出登录
25
+ * userStore.logout();
26
+ */
27
+ export const useUserStore = defineStore("user", () => {
28
+ // 状态
29
+ const userInfo = ref<baseDto.UserInfo | null>(null);
30
+
31
+ // 方法
32
+ /**
33
+ * 设置用户信息
34
+ */
35
+ const setUserInfo = () => {
36
+ // 调用获取用户信息接口
37
+ getUserInfoAPI()
38
+ .then((resData: baseDto.UserInfo) => {
39
+ const urlToken = getFieldFromUrl(window.location.href, "token");
40
+ const token = Cookies.get("token") ?? urlToken ?? "";
41
+ Cookies.set("token", token);
42
+ if (typeof window !== "undefined") {
43
+ localStorage.setItem("userInfo", JSON.stringify(resData));
44
+ }
45
+ userInfo.value = resData;
46
+
47
+ // 替换地址栏地址
48
+ const newUrl = removeFieldsFromUrl(window.location.href, ["token"]);
49
+ window.history.replaceState({}, document.title, newUrl);
50
+ })
51
+ .catch((error) => {
52
+ console.error("获取用户信息失败:", error);
53
+ userInfo.value = null;
54
+ if (typeof window !== "undefined") {
55
+ localStorage.removeItem("userInfo");
56
+ }
57
+ });
58
+ };
59
+
60
+ /**
61
+ * 退出登录
62
+ */
63
+ const logout = () => {
64
+ // 调用退出登录接口
65
+ logoutAPI()
66
+ .then(() => {
67
+ userInfo.value = null;
68
+ // 清除 localStorage
69
+ if (typeof window !== "undefined") {
70
+ localStorage.removeItem("userInfo");
71
+ }
72
+ })
73
+ .catch((error) => {
74
+ console.error("退出登录失败:", error);
75
+ });
76
+ };
77
+
78
+ return {
79
+ // 状态
80
+ userInfo,
81
+ // 方法
82
+ setUserInfo,
83
+ logout,
84
+ };
85
+ });
@@ -0,0 +1,60 @@
1
+ declare namespace aicebdDto {
2
+ // 学生出勤信息
3
+ interface AILessonAttendance {
4
+ attendanceStudentNum: number;
5
+ attendanceStudentRate: number;
6
+ frontRowSeats: number;
7
+ frontStudentNum: number;
8
+ frontStudentRate: number;
9
+ lateNum: number;
10
+ leaveEarlyNum: number;
11
+ lessonCode: string;
12
+ shouldStudentNum: number;
13
+ totalStudentSeats: number;
14
+ }
15
+
16
+ // 学生整体专注度
17
+ interface StudentListenOverview {
18
+ attendanceNum: number;
19
+ attendanceRate: number;
20
+ focusAvg: number;
21
+ heighFocus: number;
22
+ heighPerformanceTeachingTimeRangePercentage: number;
23
+ lowFocus: number;
24
+ lowPerformanceTeachingTimeRangePercentage: number;
25
+ }
26
+
27
+ // 学生专注度趋势图
28
+ interface StudentListenFocus {
29
+ focusAvg: number;
30
+ order: number;
31
+ speechSpeed: number;
32
+ teachingContent: string;
33
+ teachingSession: string;
34
+ }
35
+
36
+ // 学生听课效果分析
37
+ interface StudentListenPerformanceAnalyze {
38
+ downReasonAnalyze: StudentListenPerformanceAnalyzeItem[];
39
+ heighFocusAnalyze: StudentListenPerformanceAnalyzeItem[];
40
+ lowFocusAnalyze: StudentListenPerformanceAnalyzeItem[];
41
+ upReasonAnalyze: StudentListenPerformanceAnalyzeItem[];
42
+ }
43
+
44
+ interface StudentListenPerformanceAnalyzeItem {
45
+ createTime: number;
46
+ endFocus: number;
47
+ endOrder: number;
48
+ endTime: number;
49
+ id: number;
50
+ lessonCode: string;
51
+ startFocus: number;
52
+ startOrder: number;
53
+ startTime: number;
54
+ teachingContent?: string;
55
+ teachingSession?: string;
56
+ type?: number;
57
+ trendReason?: string;
58
+ trendType?: number;
59
+ }
60
+ }
@@ -0,0 +1,26 @@
1
+ declare namespace baseDto {
2
+ // 用户信息
3
+ interface UserInfo {
4
+ id: string;
5
+ code: string;
6
+ name?: string | null;
7
+ headimgurl?: string | null;
8
+ userType?: number | null;
9
+ academyName?: string | null;
10
+ academyCode?: string | null;
11
+ roleList?: RoleInfo[] | null;
12
+ [key: string]: unknown;
13
+ }
14
+
15
+ // 角色信息接口
16
+ interface RoleInfo {
17
+ id: string;
18
+ name?: string | null;
19
+ [key: string]: unknown;
20
+ }
21
+
22
+ // 获取用户信息参数接口
23
+ interface GetUserInfoParamsType {
24
+ token: string;
25
+ }
26
+ }
@@ -0,0 +1,48 @@
1
+ declare namespace globalDto {
2
+ /**
3
+ * 标准 API 响应结构
4
+ * @template T - 响应数据的类型
5
+ */
6
+ export interface ResponseType<T = unknown> {
7
+ /** 响应状态码(可能是 code 或 status) */
8
+ status: number;
9
+ code?: number;
10
+ /** 响应消息 */
11
+ message: string;
12
+ /** 响应数据 */
13
+ data: T;
14
+ /** 重定向结果(用于 302 状态) */
15
+ result?: string;
16
+ }
17
+
18
+ /**
19
+ * 列表响应结构
20
+ * @template T - 列表项的类型
21
+ */
22
+ export interface ListResponseType<T = unknown> {
23
+ /** 数据列表 */
24
+ list: T[];
25
+ /** 当前页码 */
26
+ currentPage: number;
27
+ /** 每页数量 */
28
+ numPerPage: number;
29
+ /** 总记录数 */
30
+ totalCount: number;
31
+ /** 总页数 */
32
+ totalPages: number;
33
+ }
34
+
35
+ /**
36
+ * 分页信息
37
+ */
38
+ export interface PaginationType {
39
+ /** 当前页码 */
40
+ currentPage: number;
41
+ /** 每页数量 */
42
+ numPerPage: number;
43
+ /** 总记录数 */
44
+ totalCount: number;
45
+ /** 总页数 */
46
+ totalPages: number;
47
+ }
48
+ }
@@ -0,0 +1,15 @@
1
+ declare namespace TeachingLogVo {
2
+ // 专注度趋势项
3
+ export interface FocusTrendItem {
4
+ time: number; // 单位秒
5
+ focus: number;
6
+ }
7
+
8
+ // 专注度下降点
9
+ export interface FocusDecreaseItem {
10
+ time: string;
11
+ focus: number;
12
+ image?: string;
13
+ description?: string;
14
+ }
15
+ }
@@ -0,0 +1,73 @@
1
+ /* eslint-disable */
2
+ /* prettier-ignore */
3
+ // @ts-nocheck
4
+ // noinspection JSUnusedGlobalSymbols
5
+ // Generated by unplugin-auto-import
6
+ // biome-ignore lint: disable
7
+ export {}
8
+ declare global {
9
+ const EffectScope: typeof import('vue')['EffectScope']
10
+ const computed: typeof import('vue')['computed']
11
+ const createApp: typeof import('vue')['createApp']
12
+ const customRef: typeof import('vue')['customRef']
13
+ const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
14
+ const defineComponent: typeof import('vue')['defineComponent']
15
+ const defineStore: typeof import('pinia')['defineStore']
16
+ const effectScope: typeof import('vue')['effectScope']
17
+ const getCurrentInstance: typeof import('vue')['getCurrentInstance']
18
+ const getCurrentScope: typeof import('vue')['getCurrentScope']
19
+ const h: typeof import('vue')['h']
20
+ const inject: typeof import('vue')['inject']
21
+ const isProxy: typeof import('vue')['isProxy']
22
+ const isReactive: typeof import('vue')['isReactive']
23
+ const isReadonly: typeof import('vue')['isReadonly']
24
+ const isRef: typeof import('vue')['isRef']
25
+ const markRaw: typeof import('vue')['markRaw']
26
+ const nextTick: typeof import('vue')['nextTick']
27
+ const onActivated: typeof import('vue')['onActivated']
28
+ const onBeforeMount: typeof import('vue')['onBeforeMount']
29
+ const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
30
+ const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
31
+ const onDeactivated: typeof import('vue')['onDeactivated']
32
+ const onErrorCaptured: typeof import('vue')['onErrorCaptured']
33
+ const onMounted: typeof import('vue')['onMounted']
34
+ const onRenderTracked: typeof import('vue')['onRenderTracked']
35
+ const onRenderTriggered: typeof import('vue')['onRenderTriggered']
36
+ const onScopeDispose: typeof import('vue')['onScopeDispose']
37
+ const onServerPrefetch: typeof import('vue')['onServerPrefetch']
38
+ const onUnmounted: typeof import('vue')['onUnmounted']
39
+ const onUpdated: typeof import('vue')['onUpdated']
40
+ const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
41
+ const provide: typeof import('vue')['provide']
42
+ const reactive: typeof import('vue')['reactive']
43
+ const readonly: typeof import('vue')['readonly']
44
+ const ref: typeof import('vue')['ref']
45
+ const resolveComponent: typeof import('vue')['resolveComponent']
46
+ const shallowReactive: typeof import('vue')['shallowReactive']
47
+ const shallowReadonly: typeof import('vue')['shallowReadonly']
48
+ const shallowRef: typeof import('vue')['shallowRef']
49
+ const storeToRefs: typeof import('pinia')['storeToRefs']
50
+ const toRaw: typeof import('vue')['toRaw']
51
+ const toRef: typeof import('vue')['toRef']
52
+ const toRefs: typeof import('vue')['toRefs']
53
+ const toValue: typeof import('vue')['toValue']
54
+ const triggerRef: typeof import('vue')['triggerRef']
55
+ const unref: typeof import('vue')['unref']
56
+ const useAttrs: typeof import('vue')['useAttrs']
57
+ const useCssModule: typeof import('vue')['useCssModule']
58
+ const useCssVars: typeof import('vue')['useCssVars']
59
+ const useId: typeof import('vue')['useId']
60
+ const useModel: typeof import('vue')['useModel']
61
+ const useSlots: typeof import('vue')['useSlots']
62
+ const useTemplateRef: typeof import('vue')['useTemplateRef']
63
+ const watch: typeof import('vue')['watch']
64
+ const watchEffect: typeof import('vue')['watchEffect']
65
+ const watchPostEffect: typeof import('vue')['watchPostEffect']
66
+ const watchSyncEffect: typeof import('vue')['watchSyncEffect']
67
+ }
68
+ // for type re-export
69
+ declare global {
70
+ // @ts-ignore
71
+ export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
72
+ import('vue')
73
+ }
@@ -0,0 +1,17 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ // Generated by unplugin-vue-components
4
+ // Read more: https://github.com/vuejs/core/pull/3399
5
+ export {}
6
+
7
+ /* prettier-ignore */
8
+ declare module 'vue' {
9
+ export interface GlobalComponents {
10
+ BarChart: typeof import('./../components/BarChart.vue')['default']
11
+ EChart: typeof import('./../components/echarts/EChart.vue')['default']
12
+ ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
13
+ ElInput: typeof import('element-plus/es')['ElInput']
14
+ RouterLink: typeof import('vue-router')['RouterLink']
15
+ RouterView: typeof import('vue-router')['RouterView']
16
+ }
17
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 全局类型定义
3
+ */
4
+ import { ElForm, ElInput, ElTooltip, ElCascader } from "element-plus";
5
+ import type { CascaderProps } from "element-plus";
6
+
7
+ declare global {
8
+ namespace ElementPlus {
9
+ export type FormInstanceType = InstanceType<typeof ElForm>;
10
+ export type InputInstanceType = InstanceType<typeof ElInput>;
11
+ export type TooltipInstanceType = InstanceType<typeof ElTooltip>;
12
+ export type CascaderInstanceType = InstanceType<typeof ElCascader>;
13
+ export type CascaderPropsType = CascaderProps;
14
+ }
15
+ }
@@ -0,0 +1 @@
1
+ declare module "js-cookie";