Kaynağa Gözat

build: :hammer: 代码格式化

chaooo 2 yıl önce
ebeveyn
işleme
c2d8b6658c
60 değiştirilmiş dosya ile 314 ekleme ve 264 silme
  1. 1 1
      commitlint.config.cjs
  2. 2 2
      src/api/auth/index.ts
  3. 4 4
      src/api/dashboard/index.ts
  4. 6 6
      src/api/grade/index.ts
  5. 1 1
      src/api/grade/types.ts
  6. 2 2
      src/api/school/index.ts
  7. 1 1
      src/api/teacher/types.ts
  8. 7 7
      src/components/Breadcrumb/index.vue
  9. 1 1
      src/components/Charts/AverageBarChart.vue
  10. 7 7
      src/components/Charts/CircleChart.vue
  11. 7 7
      src/components/Charts/DoubleChart.vue
  12. 1 1
      src/components/Charts/FocusBarChart.vue
  13. 7 7
      src/components/Charts/FocusCircleChart.vue
  14. 1 1
      src/components/Charts/IndicatorsBarChart.vue
  15. 1 1
      src/components/Charts/LiquidChart.vue
  16. 1 1
      src/components/Charts/PercentBarChart.vue
  17. 6 6
      src/components/Charts/PieChart.vue
  18. 16 16
      src/components/Charts/RadarChart.vue
  19. 1 1
      src/components/Charts/RelaxBarChart.vue
  20. 7 7
      src/components/Charts/SimplePieChart.vue
  21. 1 1
      src/components/Hamburger/index.vue
  22. 9 6
      src/components/Pagination/index.vue
  23. 2 2
      src/directive/index.ts
  24. 6 6
      src/directive/permission/index.ts
  25. 2 2
      src/lang/index.ts
  26. 8 8
      src/layout/admin.vue
  27. 3 2
      src/layout/components/AppMain.vue
  28. 4 4
      src/layout/components/Navbar/Admin/index.vue
  29. 6 4
      src/layout/components/Navbar/Fullscreen.vue
  30. 4 4
      src/layout/components/Navbar/School/index.vue
  31. 3 3
      src/layout/components/Navbar/UserInfo.vue
  32. 4 4
      src/layout/components/Sidebar/Link.vue
  33. 3 1
      src/layout/components/Sidebar/Logo.vue
  34. 7 7
      src/layout/components/Sidebar/index.vue
  35. 2 2
      src/layout/components/TagsView/ScrollPane.vue
  36. 13 13
      src/layout/components/TagsView/index.vue
  37. 4 4
      src/layout/components/index.ts
  38. 13 8
      src/layout/school.vue
  39. 3 3
      src/main.ts
  40. 5 5
      src/permission.ts
  41. 6 6
      src/router/index.ts
  42. 3 3
      src/store/index.ts
  43. 2 2
      src/store/modules/app.ts
  44. 19 19
      src/store/modules/permission.ts
  45. 2 2
      src/store/modules/settings.ts
  46. 2 2
      src/store/modules/tagsView.ts
  47. 7 4
      src/styles/reset.scss
  48. 21 9
      src/styles/sidebar.scss
  49. 2 2
      src/styles/variables.scss
  50. 2 2
      src/types/auto-imports.d.ts
  51. 1 1
      src/types/env.d.ts
  52. 12 4
      src/views/areaboard/components/AreaDataCard.vue
  53. 18 13
      src/views/dashboard/components/DataCard.vue
  54. 2 2
      src/views/dashboard/example.vue
  55. 6 5
      src/views/error/404.vue
  56. 12 4
      src/views/evaluation/components/EvaluateCard.vue
  57. 6 6
      src/views/grade/index.vue
  58. 4 4
      src/views/login/redirect.vue
  59. 1 1
      tsconfig.json
  60. 4 4
      vite.config.ts

+ 1 - 1
commitlint.config.cjs

@@ -72,7 +72,7 @@ module.exports = {
     breaklineNumber: 100,
     breaklineChar: "|",
     skipQuestions: [],
-    issuePrefixes: [{ value: "closed", name: "closed:   ISSUES has been processed" }],
+    issuePrefixes: [{value: "closed", name: "closed:   ISSUES has been processed"}],
     customIssuePrefixAlign: "top",
     emptyIssuePrefixAlias: "skip",
     customIssuePrefixAlias: "custom",

+ 2 - 2
src/api/auth/index.ts

@@ -1,6 +1,6 @@
 import request from "@/utils/request";
-import { AxiosPromise } from "axios";
-import { LoginData, LoginResult } from "./types";
+import {AxiosPromise} from "axios";
+import {LoginData, LoginResult} from "./types";
 
 /**
  * 登录API

+ 4 - 4
src/api/dashboard/index.ts

@@ -1,6 +1,6 @@
 import request from "@/utils/request";
-import { AxiosPromise } from "axios";
-import { DashboardCard, DashboardData } from "./types";
+import {AxiosPromise} from "axios";
+import {DashboardCard, DashboardData} from "./types";
 
 /**
  * 获取首页数据卡片
@@ -9,7 +9,7 @@ export function getDashboardTop(id: number): AxiosPromise<DashboardCard> {
   return request({
     url: "/board/v1/top",
     method: "get",
-    params: { school_id: id },
+    params: {school_id: id},
   });
 }
 /**
@@ -19,6 +19,6 @@ export function getDashboardData(school_id: number, grade_id: number): AxiosProm
   return request({
     url: "/board/v1/bottom",
     method: "get",
-    params: { school_id: school_id, grade_id: grade_id },
+    params: {school_id: school_id, grade_id: grade_id},
   });
 }

+ 6 - 6
src/api/grade/index.ts

@@ -1,7 +1,7 @@
 import request from "@/utils/request";
-import { AxiosPromise } from "axios";
-import { GradeItem, GradeList } from "@/api/grade/types";
-import { StudentList } from "@/api/student/types";
+import {AxiosPromise} from "axios";
+import {GradeItem, GradeList} from "@/api/grade/types";
+import {StudentList} from "@/api/student/types";
 /**
  * 获取班级列表(班级select下拉列表)
  */
@@ -9,7 +9,7 @@ export function getGradeSelect(id: number): AxiosPromise<GradeList[]> {
   return request({
     url: "/board/v1/choose-grade",
     method: "get",
-    params: { school_id: id },
+    params: {school_id: id},
   });
 }
 
@@ -21,7 +21,7 @@ export function getGradeList(id: number, status: number): AxiosPromise<GradeItem
   return request({
     url: "/board/v1/grade",
     method: "get",
-    params: { school_id: id, status: status },
+    params: {school_id: id, status: status},
   });
 }
 
@@ -32,6 +32,6 @@ export function getGradeStudents(id: number): AxiosPromise<StudentList[]> {
   return request({
     url: "/board/v1/students",
     method: "get",
-    params: { grade_id: id },
+    params: {grade_id: id},
   });
 }

+ 1 - 1
src/api/grade/types.ts

@@ -1,4 +1,4 @@
-import { StudentList } from "@/api/student/types";
+import {StudentList} from "@/api/student/types";
 
 /**
  * 班级列表

+ 2 - 2
src/api/school/index.ts

@@ -1,6 +1,6 @@
 import request from "@/utils/request";
-import { AxiosPromise } from "axios";
-import { SchoolList } from "./types";
+import {AxiosPromise} from "axios";
+import {SchoolList} from "./types";
 
 /**
  * 获取学校列表

+ 1 - 1
src/api/teacher/types.ts

@@ -1,4 +1,4 @@
-import { GradeList } from "@/api/grade/types";
+import {GradeList} from "@/api/grade/types";
 /**
  * 教师列表
  */

+ 7 - 7
src/components/Breadcrumb/index.vue

@@ -16,15 +16,15 @@
 </template>
 
 <script setup lang="ts">
-import { onBeforeMount, ref, watch } from "vue";
-import { useRoute, RouteLocationMatched } from "vue-router";
-import { compile } from "path-to-regexp";
+import {onBeforeMount, ref, watch} from "vue";
+import {useRoute, RouteLocationMatched} from "vue-router";
+import {compile} from "path-to-regexp";
 import router from "@/router";
-import { translateRouteTitleI18n } from "@/utils/i18n";
+import {translateRouteTitleI18n} from "@/utils/i18n";
 
 const currentRoute = useRoute();
 const pathCompile = (path: string) => {
-  const { params } = currentRoute;
+  const {params} = currentRoute;
   const toPath = compile(path);
   return toPath(params);
 };
@@ -35,7 +35,7 @@ function getBreadcrumb() {
   let matched = currentRoute.matched.filter((item) => item.meta && item.meta.title);
   const first = matched[0];
   if (!isDashboard(first)) {
-    matched = [{ path: "/dashboard", meta: { title: "dashboard" } } as any].concat(matched);
+    matched = [{path: "/dashboard", meta: {title: "dashboard"}} as any].concat(matched);
   }
   breadcrumbs.value = matched.filter((item) => {
     return item.meta && item.meta.title && item.meta.breadcrumb !== false;
@@ -51,7 +51,7 @@ function isDashboard(route: RouteLocationMatched) {
 }
 
 function handleLink(item: any) {
-  const { redirect, path } = item;
+  const {redirect, path} = item;
   if (redirect) {
     router.push(redirect).catch((err) => {
       console.warn(err);

+ 1 - 1
src/components/Charts/AverageBarChart.vue

@@ -1,6 +1,6 @@
 <!--  脑电评估检测指数分析看板 柱状图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">

+ 7 - 7
src/components/Charts/CircleChart.vue

@@ -1,6 +1,6 @@
 <!-- 圆形进度图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">
@@ -102,15 +102,15 @@ const options = {
         },
       },
       avoidLabelOverlap: true,
-      label: { show: false },
+      label: {show: false},
       labelLine: {
         show: false,
       },
-      pointer: { show: false },
-      axisTick: { show: false },
-      splitLine: { show: false },
-      axisLabel: { show: false },
-      detail: { show: false },
+      pointer: {show: false},
+      axisTick: {show: false},
+      splitLine: {show: false},
+      axisLabel: {show: false},
+      detail: {show: false},
       data: [
         {
           value: props.data / 100, // 进度值,最高为1

+ 7 - 7
src/components/Charts/DoubleChart.vue

@@ -1,6 +1,6 @@
 <!-- 双圈图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">
@@ -64,9 +64,9 @@ const options = {
         borderColor: "#ffffff",
         borderWidth: 10,
       },
-      label: { show: false },
-      emphasis: { label: { show: false } },
-      labelLine: { show: false },
+      label: {show: false},
+      emphasis: {label: {show: false}},
+      labelLine: {show: false},
       data: [25, 25, 25, 25],
     },
     {
@@ -81,9 +81,9 @@ const options = {
         borderColor: "#fff",
         borderWidth: 10,
       },
-      label: { show: false },
-      emphasis: { label: { show: false } },
-      labelLine: { show: false },
+      label: {show: false},
+      emphasis: {label: {show: false}},
+      labelLine: {show: false},
       data: [25, 25, 25, 25],
     },
   ],

+ 1 - 1
src/components/Charts/FocusBarChart.vue

@@ -1,6 +1,6 @@
 <!--  专注力四维柱状图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">

+ 7 - 7
src/components/Charts/FocusCircleChart.vue

@@ -1,6 +1,6 @@
 <!-- 圆形进度图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">
@@ -99,15 +99,15 @@ const options = {
         },
       },
       avoidLabelOverlap: true,
-      label: { show: false },
+      label: {show: false},
       labelLine: {
         show: false,
       },
-      pointer: { show: false },
-      axisTick: { show: false },
-      splitLine: { show: false },
-      axisLabel: { show: false },
-      detail: { show: false },
+      pointer: {show: false},
+      axisTick: {show: false},
+      splitLine: {show: false},
+      axisLabel: {show: false},
+      detail: {show: false},
       data: [
         {
           value: props.data / 100, // 进度值,最高为1

+ 1 - 1
src/components/Charts/IndicatorsBarChart.vue

@@ -1,6 +1,6 @@
 <!--  脑电评估检测指数分析看板 柱状图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">

+ 1 - 1
src/components/Charts/LiquidChart.vue

@@ -1,6 +1,6 @@
 <!-- 水球图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">

+ 1 - 1
src/components/Charts/PercentBarChart.vue

@@ -1,6 +1,6 @@
 <!--  评分占比柱状图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">

+ 6 - 6
src/components/Charts/PieChart.vue

@@ -1,6 +1,6 @@
 <!-- 圆饼图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">
@@ -69,11 +69,11 @@ const options = {
       },
       center: ["50%", "55%"],
       data: [
-        { value: props.data?.[0], name: "0-20" },
-        { value: props.data?.[1], name: "21-40" },
-        { value: props.data?.[2], name: "41-60" },
-        { value: props.data?.[3], name: "61-80" },
-        { value: props.data?.[4], name: "81-100" },
+        {value: props.data?.[0], name: "0-20"},
+        {value: props.data?.[1], name: "21-40"},
+        {value: props.data?.[2], name: "41-60"},
+        {value: props.data?.[3], name: "61-80"},
+        {value: props.data?.[4], name: "81-100"},
       ],
     },
   ],

+ 16 - 16
src/components/Charts/RadarChart.vue

@@ -1,6 +1,6 @@
 <!-- 五维雷达图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">
@@ -85,7 +85,7 @@ const indicatorFormatter = (name: string, indicator: any) => {
   if (!props.tag) {
     return `{tit|${name}}`;
   }
-  const { star } = indicator;
+  const {star} = indicator;
   const label = [];
   label.push(`{tit|${name}}`);
   if (star === 1) {
@@ -151,10 +151,10 @@ const options = {
     right: "5%",
     top: "5%",
     data: [
-      { name: "训练前", icon: "circle" },
-      { name: "训练后", icon: "circle" },
+      {name: "训练前", icon: "circle"},
+      {name: "训练后", icon: "circle"},
     ],
-    textStyle: { fontSize: 12 },
+    textStyle: {fontSize: 12},
     show: false,
   },
   radar: {
@@ -162,11 +162,11 @@ const options = {
     center: ["50%", "55%"],
     // 指示器 及 状态tag
     indicator: [
-      { name: "专注力平均值", max: 100, star: props.star?.[0] },
-      { name: "高专注占比", max: 100, star: props.star?.[1] },
-      { name: "专注唤醒效率", max: 100, star: props.star?.[2] },
-      { name: "整体和谐度", max: 100, star: props.star?.[3] },
-      { name: "专注力稳定度", max: 100, star: props.star?.[4] },
+      {name: "专注力平均值", max: 100, star: props.star?.[0]},
+      {name: "高专注占比", max: 100, star: props.star?.[1]},
+      {name: "专注唤醒效率", max: 100, star: props.star?.[2]},
+      {name: "整体和谐度", max: 100, star: props.star?.[3]},
+      {name: "专注力稳定度", max: 100, star: props.star?.[4]},
     ],
     axisName: {
       rich: indicatorRich,
@@ -185,7 +185,7 @@ const options = {
         fontSize: 16,
         distance: 5,
       },
-      lineStyle: { width: 0 },
+      lineStyle: {width: 0},
       data: positionFormatter(props.dataSets?.[0]),
     },
     // 覆盖区域的样式
@@ -197,8 +197,8 @@ const options = {
         {
           value: props.dataSets?.[0],
           name: "训练后",
-          lineStyle: { color: globalColor.default },
-          itemStyle: { color: globalColor.default },
+          lineStyle: {color: globalColor.default},
+          itemStyle: {color: globalColor.default},
           areaStyle: {
             color: globalColor.default,
             opacity: 0.5,
@@ -215,8 +215,8 @@ const getOptions = () => {
     options.series[1].data.unshift({
       value: props.dataSets?.[1],
       name: "训练前",
-      lineStyle: { color: globalColor.before },
-      itemStyle: { color: globalColor.before },
+      lineStyle: {color: globalColor.before},
+      itemStyle: {color: globalColor.before},
       areaStyle: {
         color: globalColor.before,
         opacity: 0.5,
@@ -232,7 +232,7 @@ const getOptions = () => {
         fontSize: 16,
         distance: 0,
       },
-      lineStyle: { width: 0 },
+      lineStyle: {width: 0},
       data: positionFormatter(props.dataSets?.[1]),
     });
   }

+ 1 - 1
src/components/Charts/RelaxBarChart.vue

@@ -1,6 +1,6 @@
 <!--  3维放松度分析柱状图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">

+ 7 - 7
src/components/Charts/SimplePieChart.vue

@@ -1,6 +1,6 @@
 <!-- 圆饼图 -->
 <template>
-  <div :id="id" :class="className" :style="{ height, width }" />
+  <div :id="id" :class="className" :style="{height, width}" />
 </template>
 
 <script setup lang="ts">
@@ -55,14 +55,14 @@ const options = {
       type: "pie",
       radius: ["60%", "90%"],
       avoidLabelOverlap: false,
-      label: { show: false },
+      label: {show: false},
       center: ["50%", "50%"],
       data: [
-        { value: props.data?.[0], name: "0-20" },
-        { value: props.data?.[1], name: "21-40" },
-        { value: props.data?.[2], name: "41-60" },
-        { value: props.data?.[3], name: "61-80" },
-        { value: props.data?.[4], name: "81-100" },
+        {value: props.data?.[0], name: "0-20"},
+        {value: props.data?.[1], name: "21-40"},
+        {value: props.data?.[2], name: "41-60"},
+        {value: props.data?.[3], name: "61-80"},
+        {value: props.data?.[4], name: "81-100"},
       ],
     },
   ],

+ 1 - 1
src/components/Hamburger/index.vue

@@ -3,7 +3,7 @@
     class="px-[15px] hover:bg-gray-50 cursor-pointer h-[50px] leading-[50px] dark:hover:bg-[var(--el-fill-color-light)]"
     @click="toggleClick">
     <svg
-      :class="{ 'is-active': isActive }"
+      :class="{'is-active': isActive}"
       class="hamburger"
       viewBox="0 0 1024 1024"
       xmlns="http://www.w3.org/2000/svg"

+ 9 - 6
src/components/Pagination/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div :class="'pagination ' + { hidden: hidden }">
+  <div :class="'pagination ' + {hidden: hidden}">
     <el-pagination
       v-model:current-page="currentPage"
       v-model:page-size="pageSize"
@@ -13,8 +13,8 @@
 </template>
 
 <script setup lang="ts">
-import { PropType } from "vue";
-import { scrollTo } from "@/utils/scroll-to";
+import {PropType} from "vue";
+import {scrollTo} from "@/utils/scroll-to";
 
 const props = defineProps({
   total: {
@@ -61,7 +61,7 @@ const currentPage = useVModel(props, "page", emit);
 const pageSize = useVModel(props, "limit", emit);
 
 function handleSizeChange(val: number) {
-  emit("pagination", { page: currentPage, limit: val });
+  emit("pagination", {page: currentPage, limit: val});
   if (props.autoScroll) {
     scrollTo(0, 800);
   }
@@ -69,7 +69,7 @@ function handleSizeChange(val: number) {
 
 function handleCurrentChange(val: number) {
   currentPage.value = val;
-  emit("pagination", { page: val, limit: props.limit });
+  emit("pagination", {page: val, limit: props.limit});
   if (props.autoScroll) {
     scrollTo(0, 800);
   }
@@ -78,17 +78,20 @@ function handleCurrentChange(val: number) {
 
 <style lang="scss" scoped>
 .pagination {
-  margin-top: 3rem;
   padding: 1rem;
+  margin-top: 3rem;
   color: #474b59;
+
   &.hidden {
     display: none;
   }
 }
+
 :deep(.el-input) {
   border: 1px solid #dddcdd;
   border-radius: 5px;
 }
+
 :deep(.el-pagination) {
   justify-content: center;
 }

+ 2 - 2
src/directive/index.ts

@@ -1,6 +1,6 @@
-import type { App } from "vue";
+import type {App} from "vue";
 
-import { hasPerm } from "./permission";
+import {hasPerm} from "./permission";
 
 // 全局注册 directive
 export function setupDirective(app: App<Element>) {

+ 6 - 6
src/directive/permission/index.ts

@@ -1,5 +1,5 @@
-import { useUserStoreHook } from "@/store/modules/user";
-import { Directive, DirectiveBinding } from "vue";
+import {useUserStoreHook} from "@/store/modules/user";
+import {Directive, DirectiveBinding} from "vue";
 
 /**
  * 按钮权限
@@ -7,12 +7,12 @@ import { Directive, DirectiveBinding } from "vue";
 export const hasPerm: Directive = {
   mounted(el: HTMLElement, binding: DirectiveBinding) {
     // 「超级管理员」拥有所有的按钮权限
-    const { role, perms } = useUserStoreHook();
+    const {role, perms} = useUserStoreHook();
     if (role == "ROOT") {
       return true;
     }
     // 「其他角色」按钮权限校验
-    const { value } = binding;
+    const {value} = binding;
     if (value) {
       const requiredPerms = value; // DOM绑定需要的按钮权限标识
 
@@ -34,11 +34,11 @@ export const hasPerm: Directive = {
  */
 export const hasRole: Directive = {
   mounted(el: HTMLElement, binding: DirectiveBinding) {
-    const { value } = binding;
+    const {value} = binding;
 
     if (value) {
       const requiredRoles = value; // DOM绑定需要的角色编码
-      const { role } = useUserStoreHook();
+      const {role} = useUserStoreHook();
       // const hasRole = roles.some(perm => {
       //   return requiredRoles.includes(perm);
       // });

+ 2 - 2
src/lang/index.ts

@@ -1,5 +1,5 @@
-import { createI18n } from "vue-i18n";
-import { useAppStore } from "@/store/modules/app";
+import {createI18n} from "vue-i18n";
+import {useAppStore} from "@/store/modules/app";
 
 const appStore = useAppStore();
 // 本地语言包

+ 8 - 8
src/layout/admin.vue

@@ -1,13 +1,13 @@
 <script setup lang="ts">
-import { computed, watchEffect } from "vue";
-import { useWindowSize } from "@vueuse/core";
-import { AppMain, TagsView, AdminNavbar } from "./components/index";
+import {computed, watchEffect} from "vue";
+import {useWindowSize} from "@vueuse/core";
+import {AppMain, TagsView, AdminNavbar} from "./components/index";
 import Sidebar from "./components/Sidebar/index.vue";
 
-import { useAppStore } from "@/store/modules/app";
-import { useSettingsStore } from "@/store/modules/settings";
+import {useAppStore} from "@/store/modules/app";
+import {useSettingsStore} from "@/store/modules/settings";
 
-const { width } = useWindowSize();
+const {width} = useWindowSize();
 
 /**
  * 响应式布局容器固定宽度
@@ -58,8 +58,8 @@ function handleOutsideClick() {
 
     <Sidebar class="sidebar-container" />
 
-    <div :class="{ hasTagsView: showTagsView }" class="main-container">
-      <div :class="{ 'fixed-header': fixedHeader }">
+    <div :class="{hasTagsView: showTagsView}" class="main-container">
+      <div :class="{'fixed-header': fixedHeader}">
         <AdminNavbar />
         <!--        <tags-view v-if="showTagsView" />-->
       </div>

+ 3 - 2
src/layout/components/AppMain.vue

@@ -1,12 +1,12 @@
 <script setup lang="ts">
-import { useTagsViewStore } from "@/store/modules/tagsView";
+import {useTagsViewStore} from "@/store/modules/tagsView";
 
 const tagsViewStore = useTagsViewStore();
 </script>
 
 <template>
   <section class="app-main">
-    <router-view v-slot="{ Component, route }">
+    <router-view v-slot="{Component, route}">
       <transition name="router-fade" mode="out-in">
         <keep-alive :include="tagsViewStore.cachedViews">
           <component :is="Component" :key="route.fullPath" />
@@ -20,6 +20,7 @@ const tagsViewStore = useTagsViewStore();
 .app-main {
   position: relative;
   width: 100%;
+
   /* 50= navbar  50  */
   min-height: calc(100vh - 50px);
   overflow: hidden;

+ 4 - 4
src/layout/components/Navbar/Admin/index.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { useAppStore } from "@/store/modules/app";
+import {useAppStore} from "@/store/modules/app";
 import Fullscreen from "@/layout/components/Navbar/Fullscreen.vue";
 import UserInfo from "@/layout/components/Navbar/UserInfo.vue";
 
@@ -32,13 +32,13 @@ function toggleSideBar() {
 
 <style lang="scss" scoped>
 .navbar {
+  position: relative;
+  z-index: 10;
   display: flex;
   align-items: center;
   justify-content: space-between;
   height: 70px;
-  background: #ffffff;
+  background: #fff;
   box-shadow: 0 0 10px #eee;
-  position: relative;
-  z-index: 10;
 }
 </style>

+ 6 - 4
src/layout/components/Navbar/Fullscreen.vue

@@ -1,14 +1,14 @@
 <script setup lang="ts">
 import SvgIcon from "@/components/SvgIcon/index.vue";
-import { storeToRefs } from "pinia";
-import { useAppStore } from "@/store/modules/app";
+import {storeToRefs} from "pinia";
+import {useAppStore} from "@/store/modules/app";
 
 const appStore = useAppStore();
-const { device } = storeToRefs(appStore); // 设备类型:desktop-宽屏设备 || mobile-窄屏设备
+const {device} = storeToRefs(appStore); // 设备类型:desktop-宽屏设备 || mobile-窄屏设备
 /**
  * vueUse 全屏
  */
-const { isFullscreen, toggle } = useFullscreen();
+const {isFullscreen, toggle} = useFullscreen();
 </script>
 
 <template>
@@ -25,6 +25,7 @@ const { isFullscreen, toggle } = useFullscreen();
 .setting-container {
   display: flex;
   align-items: center;
+
   .setting-item {
     display: inline-block;
     width: 30px;
@@ -33,6 +34,7 @@ const { isFullscreen, toggle } = useFullscreen();
     color: #5a5e66;
     text-align: center;
     cursor: pointer;
+
     &:hover {
       background: rgb(249 250 251 / 100%);
     }

+ 4 - 4
src/layout/components/Navbar/School/index.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { useAppStore } from "@/store/modules/app";
+import {useAppStore} from "@/store/modules/app";
 import Fullscreen from "@/layout/components/Navbar/Fullscreen.vue";
 import SchoolSelect from "@/layout/components/Navbar/SchoolSelect.vue";
 import UserInfo from "@/layout/components/Navbar/UserInfo.vue";
@@ -35,13 +35,13 @@ function toggleSideBar() {
 
 <style lang="scss" scoped>
 .navbar {
+  position: relative;
+  z-index: 10;
   display: flex;
   align-items: center;
   justify-content: space-between;
   height: 70px;
-  background: #ffffff;
+  background: #fff;
   box-shadow: 0 0 10px #eee;
-  position: relative;
-  z-index: 10;
 }
 </style>

+ 3 - 3
src/layout/components/Navbar/UserInfo.vue

@@ -1,8 +1,8 @@
 <script setup lang="ts">
 import SvgIcon from "@/components/SvgIcon/index.vue";
-import { useUserStore } from "@/store/modules/user";
-import { useTagsViewStore } from "@/store/modules/tagsView";
-import { useRoute, useRouter } from "vue-router";
+import {useUserStore} from "@/store/modules/user";
+import {useTagsViewStore} from "@/store/modules/tagsView";
+import {useRoute, useRouter} from "vue-router";
 
 const userStore = useUserStore();
 const tagsViewStore = useTagsViewStore();

+ 4 - 4
src/layout/components/Sidebar/Link.vue

@@ -1,9 +1,9 @@
 <script lang="ts" setup>
-import { computed } from "vue";
-import { isExternal } from "@/utils";
-import { useRouter } from "vue-router";
+import {computed} from "vue";
+import {isExternal} from "@/utils";
+import {useRouter} from "vue-router";
 
-import { useAppStore } from "@/store/modules/app";
+import {useAppStore} from "@/store/modules/app";
 const appStore = useAppStore();
 
 const sidebar = computed(() => appStore.sidebar);

+ 3 - 1
src/layout/components/Sidebar/Logo.vue

@@ -1,5 +1,5 @@
 <script lang="ts" setup>
-import { useSettingsStore } from "@/store/modules/settings";
+import {useSettingsStore} from "@/store/modules/settings";
 
 const settingsStore = useSettingsStore();
 
@@ -32,11 +32,13 @@ const logoIco = ref(new URL(`../../../assets/logo-icon.png`, import.meta.url).hr
 .sidebarLogoFade-enter-active {
   transition: opacity 2s;
 }
+
 .sidebarLogoFade-leave-active,
 .sidebarLogoFade-enter-from,
 .sidebarLogoFade-leave-to {
   opacity: 0;
 }
+
 .logo {
   height: 70px;
   line-height: 70px;

+ 7 - 7
src/layout/components/Sidebar/index.vue

@@ -1,23 +1,23 @@
 <script setup lang="ts">
-import { useRoute } from "vue-router";
+import {useRoute} from "vue-router";
 import SidebarItem from "./SidebarItem.vue";
 import Logo from "./Logo.vue";
 
-import { useSettingsStore } from "@/store/modules/settings";
-import { usePermissionStore } from "@/store/modules/permission";
-import { useAppStore } from "@/store/modules/app";
-import { storeToRefs } from "pinia";
+import {useSettingsStore} from "@/store/modules/settings";
+import {usePermissionStore} from "@/store/modules/permission";
+import {useAppStore} from "@/store/modules/app";
+import {storeToRefs} from "pinia";
 import variables from "@/styles/variables.module.scss";
 
 const settingsStore = useSettingsStore();
 const permissionStore = usePermissionStore();
 const appStore = useAppStore();
 const currRoute = useRoute();
-const { sidebarLogo } = storeToRefs(settingsStore);
+const {sidebarLogo} = storeToRefs(settingsStore);
 </script>
 
 <template>
-  <div :class="{ 'has-logo': sidebarLogo }">
+  <div :class="{'has-logo': sidebarLogo}">
     <logo v-if="sidebarLogo" :collapse="!appStore.sidebar.opened" />
     <el-scrollbar>
       <el-menu

+ 2 - 2
src/layout/components/TagsView/ScrollPane.vue

@@ -1,8 +1,8 @@
 <script setup lang="ts">
-import { useTagsViewStore, TagView } from "@/store/modules/tagsView";
+import {useTagsViewStore, TagView} from "@/store/modules/tagsView";
 
 const tagAndTagSpacing = ref(4);
-const { proxy } = getCurrentInstance() as any;
+const {proxy} = getCurrentInstance() as any;
 
 const emits = defineEmits(["scroll"]);
 const emitScroll = () => {

+ 13 - 13
src/layout/components/TagsView/index.vue

@@ -1,20 +1,20 @@
 <script setup lang="ts">
-import { getCurrentInstance, nextTick, ref, watch, onMounted, ComponentInternalInstance } from "vue";
-import { storeToRefs } from "pinia";
+import {getCurrentInstance, nextTick, ref, watch, onMounted, ComponentInternalInstance} from "vue";
+import {storeToRefs} from "pinia";
 import path from "path-browserify";
-import { useRoute, useRouter } from "vue-router";
-import { usePermissionStore } from "@/store/modules/permission";
-import { useTagsViewStore, TagView } from "@/store/modules/tagsView";
+import {useRoute, useRouter} from "vue-router";
+import {usePermissionStore} from "@/store/modules/permission";
+import {useTagsViewStore, TagView} from "@/store/modules/tagsView";
 import ScrollPane from "./ScrollPane.vue";
 
-const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const {proxy} = getCurrentInstance() as ComponentInternalInstance;
 const router = useRouter();
 const route = useRoute();
 
 const permissionStore = usePermissionStore();
 const tagsViewStore = useTagsViewStore();
 
-const { visitedViews } = storeToRefs(tagsViewStore);
+const {visitedViews} = storeToRefs(tagsViewStore);
 
 const selectedTag = ref({});
 const scrollPaneRef = ref();
@@ -53,7 +53,7 @@ function filterAffixTags(routes: any[], basePath = "/") {
         fullPath: tagPath,
         path: tagPath,
         name: route.name,
-        meta: { ...route.meta },
+        meta: {...route.meta},
       });
     }
 
@@ -130,9 +130,9 @@ function isLastView() {
 
 function refreshSelectedTag(view: TagView) {
   tagsViewStore.delCachedView(view);
-  const { fullPath } = view;
+  const {fullPath} = view;
   nextTick(() => {
-    router.replace({ path: "/redirect" + fullPath }).catch((err) => {
+    router.replace({path: "/redirect" + fullPath}).catch((err) => {
       console.warn(err);
     });
   });
@@ -147,7 +147,7 @@ function toLastView(visitedViews: TagView[], view?: any) {
     // you can adjust it according to your needs.
     if (view.name === "Dashboard") {
       // to reload home page
-      router.replace({ path: "/redirect" + view.fullPath });
+      router.replace({path: "/redirect" + view.fullPath});
     } else {
       router.push("/");
     }
@@ -232,7 +232,7 @@ onMounted(() => {
         :key="tag.path"
         :class="'tags-item ' + (isActive(tag) ? 'active' : '')"
         :data-path="tag.path"
-        :to="{ path: tag.path, query: tag.query }"
+        :to="{path: tag.path, query: tag.query}"
         @click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
         @contextmenu.prevent="openTagMenu(tag, $event)">
         {{ tag.meta?.title }}
@@ -243,7 +243,7 @@ onMounted(() => {
     </scroll-pane>
 
     <!-- tag标签操作菜单 -->
-    <ul v-show="tagMenuVisible" :style="{ left: left + 'px', top: top + 'px' }" class="tag-menu">
+    <ul v-show="tagMenuVisible" :style="{left: left + 'px', top: top + 'px'}" class="tag-menu">
       <li @click="refreshSelectedTag(selectedTag)">
         <svg-icon icon-class="refresh" />
         刷新

+ 4 - 4
src/layout/components/index.ts

@@ -1,4 +1,4 @@
-export { default as AppMain } from "./AppMain.vue";
-export { default as TagsView } from "./TagsView/index.vue";
-export { default as AdminNavbar } from "./Navbar/Admin/index.vue";
-export { default as SchoolNavbar } from "./Navbar/School/index.vue";
+export {default as AppMain} from "./AppMain.vue";
+export {default as TagsView} from "./TagsView/index.vue";
+export {default as AdminNavbar} from "./Navbar/Admin/index.vue";
+export {default as SchoolNavbar} from "./Navbar/School/index.vue";

+ 13 - 8
src/layout/school.vue

@@ -1,13 +1,13 @@
 <script setup lang="ts">
-import { computed, watchEffect } from "vue";
-import { useWindowSize } from "@vueuse/core";
-import { AppMain, SchoolNavbar } from "./components/index";
+import {computed, watchEffect} from "vue";
+import {useWindowSize} from "@vueuse/core";
+import {AppMain, SchoolNavbar} from "./components/index";
 import Sidebar from "./components/Sidebar/index.vue";
 
-import { useAppStore } from "@/store/modules/app";
-import { useSettingsStore } from "@/store/modules/settings";
+import {useAppStore} from "@/store/modules/app";
+import {useSettingsStore} from "@/store/modules/settings";
 
-const { width } = useWindowSize();
+const {width} = useWindowSize();
 
 /**
  * 响应式布局容器固定宽度
@@ -58,8 +58,8 @@ function handleOutsideClick() {
 
     <Sidebar class="sidebar-container" />
 
-    <div :class="{ hasTagsView: showTagsView }" class="main-container">
-      <div :class="{ 'fixed-header': fixedHeader }">
+    <div :class="{hasTagsView: showTagsView}" class="main-container">
+      <div :class="{'fixed-header': fixedHeader}">
         <SchoolNavbar />
         <!--        <tags-view v-if="showTagsView" />-->
       </div>
@@ -77,18 +77,22 @@ function handleOutsideClick() {
     clear: both;
     content: "";
   }
+
   position: relative;
   width: 100%;
   min-width: 1900px;
   height: 100%;
+
   &.mobile {
     min-width: 750px;
   }
+
   &.mobile.openSidebar {
     position: fixed;
     top: 0;
   }
 }
+
 .fixed-header {
   position: fixed;
   top: 0;
@@ -105,6 +109,7 @@ function handleOutsideClick() {
 .mobile .fixed-header {
   width: 100%;
 }
+
 .mobile .app-main {
   padding-top: 70px;
 }

+ 3 - 3
src/main.ts

@@ -1,8 +1,8 @@
-import { createApp } from "vue";
+import {createApp} from "vue";
 import App from "./App.vue";
 import router from "@/router";
-import { setupStore } from "@/store";
-import { setupDirective } from "@/directive";
+import {setupStore} from "@/store";
+import {setupDirective} from "@/directive";
 
 import "@/permission";
 

+ 5 - 5
src/permission.ts

@@ -1,10 +1,10 @@
 import router from "@/router";
-import { useUserStoreHook } from "@/store/modules/user";
-import { usePermissionStoreHook } from "@/store/modules/permission";
+import {useUserStoreHook} from "@/store/modules/user";
+import {usePermissionStoreHook} from "@/store/modules/permission";
 
 import NProgress from "nprogress";
 import "nprogress/nprogress.css";
-NProgress.configure({ showSpinner: false }); // 进度条
+NProgress.configure({showSpinner: false}); // 进度条
 
 const permissionStore = usePermissionStoreHook();
 
@@ -18,7 +18,7 @@ router.beforeEach(async (to, from, next) => {
   if (hasToken) {
     // 已登录访问/login,跳转首页
     if (to.path === "/login") {
-      next({ path: "/" });
+      next({path: "/"});
       NProgress.done();
     } else {
       const userStore = useUserStoreHook();
@@ -32,7 +32,7 @@ router.beforeEach(async (to, from, next) => {
           });
           // 设置路由加载标志
           userStore.setRouteStatus(true);
-          next({ ...to, replace: true });
+          next({...to, replace: true});
         } catch (error) {
           // 移除 token 并跳转登录页
           await userStore.resetToken();

+ 6 - 6
src/router/index.ts

@@ -1,4 +1,4 @@
-import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
+import {createRouter, createWebHashHistory, RouteRecordRaw} from "vue-router";
 
 export const Layout = () => import("@/layout/school.vue");
 
@@ -6,13 +6,13 @@ export const Layout = () => import("@/layout/school.vue");
 export const constantRoutes: RouteRecordRaw[] = [
   {
     path: "/:pathMatch(.*)*", // 解决路由爆[Vue Router warn]: No match found for location with path
-    meta: { title: "找不到此页面", hidden: true },
+    meta: {title: "找不到此页面", hidden: true},
     component: () => import("@/views/error/404.vue"),
   },
   {
     path: "/redirect",
     component: Layout,
-    meta: { hidden: true },
+    meta: {hidden: true},
     children: [
       {
         path: "/redirect/:path(.*)",
@@ -23,7 +23,7 @@ export const constantRoutes: RouteRecordRaw[] = [
   {
     path: "/login",
     component: () => import("@/views/login/index.vue"),
-    meta: { title: "登录", hidden: true },
+    meta: {title: "登录", hidden: true},
   },
 ];
 
@@ -34,14 +34,14 @@ const router = createRouter({
   history: createWebHashHistory(),
   routes: constantRoutes as RouteRecordRaw[],
   // 刷新时,滚动条位置还原
-  scrollBehavior: () => ({ left: 0, top: 0 }),
+  scrollBehavior: () => ({left: 0, top: 0}),
 });
 
 /**
  * 重置路由
  */
 export function resetRouter() {
-  router.replace({ path: "/login" });
+  router.replace({path: "/login"});
 }
 
 export default router;

+ 3 - 3
src/store/index.ts

@@ -1,5 +1,5 @@
-import type { App } from "vue";
-import { createPinia } from "pinia";
+import type {App} from "vue";
+import {createPinia} from "pinia";
 
 const store = createPinia();
 
@@ -8,4 +8,4 @@ export function setupStore(app: App<Element>) {
   app.use(store);
 }
 
-export { store };
+export {store};

+ 2 - 2
src/store/modules/app.ts

@@ -1,5 +1,5 @@
-import { defineStore } from "pinia";
-import { useStorage } from "@vueuse/core";
+import {defineStore} from "pinia";
+import {useStorage} from "@vueuse/core";
 import defaultSettings from "@/settings";
 
 // 导入 Element Plus 中英文语言包

+ 19 - 19
src/store/modules/permission.ts

@@ -1,7 +1,7 @@
-import { RouteRecordRaw } from "vue-router";
-import { defineStore } from "pinia";
-import { constantRoutes } from "@/router";
-import { store } from "@/store";
+import {RouteRecordRaw} from "vue-router";
+import {defineStore} from "pinia";
+import {constantRoutes} from "@/router";
+import {store} from "@/store";
 
 const modules = import.meta.glob("../../views/**/**.vue");
 // 不同角色,不同首页
@@ -13,13 +13,13 @@ const adminRoutes: RouteRecordRaw[] = JSON.parse(
     {
       path: "/",
       redirect: "/areaboard",
-      meta: { hidden: true, name: "Home" },
+      meta: {hidden: true, name: "Home"},
     },
     {
       path: "/areaboard",
       component: "AdminIndex",
       redirect: "/areaboard/index",
-      meta: { title: "区域级数据看板", name: "Dashboard" },
+      meta: {title: "区域级数据看板", name: "Dashboard"},
       children: [
         {
           path: "index",
@@ -42,13 +42,13 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
     {
       path: "/",
       redirect: "/dashboard",
-      meta: { hidden: true, name: "Home" },
+      meta: {hidden: true, name: "Home"},
     },
     {
       path: "/dashboard",
       component: "SchoolIndex",
       redirect: "/dashboard/index",
-      meta: { title: "数据看板", name: "Dashboard" },
+      meta: {title: "数据看板", name: "Dashboard"},
       children: [
         {
           path: "index",
@@ -76,7 +76,7 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
       path: "/grade",
       component: "SchoolIndex",
       redirect: "/grade/index",
-      meta: { title: "班级管理", name: "ClassManage" },
+      meta: {title: "班级管理", name: "ClassManage"},
       children: [
         {
           path: "index",
@@ -95,7 +95,7 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
       path: "/teacher",
       component: "SchoolIndex",
       redirect: "/teacher/index",
-      meta: { title: "教师管理", name: "TeacherManage" },
+      meta: {title: "教师管理", name: "TeacherManage"},
       children: [
         {
           path: "index",
@@ -114,7 +114,7 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
       path: "/student",
       component: "SchoolIndex",
       redirect: "/student/index",
-      meta: { title: "学生管理", name: "StudentManage" },
+      meta: {title: "学生管理", name: "StudentManage"},
       children: [
         {
           path: "index",
@@ -130,7 +130,7 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
         {
           path: "result",
           component: "student/result",
-          meta: { title: "训练效果分析", name: "StudentResult", hidden: true },
+          meta: {title: "训练效果分析", name: "StudentResult", hidden: true},
         },
         // {
         // 	path: "download",
@@ -142,13 +142,13 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
     {
       path: "/download/student/result",
       component: "student/download",
-      meta: { title: "下载报告预览", name: "StudentDownload", hidden: true },
+      meta: {title: "下载报告预览", name: "StudentDownload", hidden: true},
     },
     {
       path: "/equipment",
       component: "SchoolIndex",
       redirect: "/equipment/index",
-      meta: { title: "设备管理", name: "EquipmentManage" },
+      meta: {title: "设备管理", name: "EquipmentManage"},
       children: [
         {
           path: "index",
@@ -167,7 +167,7 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
       path: "/training",
       component: "SchoolIndex",
       redirect: "/training/index",
-      meta: { title: "训练管理", name: "TrainingManage" },
+      meta: {title: "训练管理", name: "TrainingManage"},
       children: [
         {
           path: "index",
@@ -183,7 +183,7 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
         {
           path: "result",
           component: "training/result",
-          meta: { title: "报告详情", name: "TrainingResult", hidden: true },
+          meta: {title: "报告详情", name: "TrainingResult", hidden: true},
         },
       ],
     },
@@ -191,7 +191,7 @@ const schoolRoutes: RouteRecordRaw[] = JSON.parse(
       path: "/evaluation",
       component: "SchoolIndex",
       redirect: "/evaluation/index",
-      meta: { title: "测评数据看板", name: "EvaluateManage" },
+      meta: {title: "测评数据看板", name: "EvaluateManage"},
       children: [
         {
           path: "index",
@@ -219,7 +219,7 @@ const filterAsyncRoutes = (routes: RouteRecordRaw[], role: string | null) => {
   const asyncRoutes: RouteRecordRaw[] = [];
 
   routes.forEach((route) => {
-    const tmpRoute = { ...route }; // ES6扩展运算符复制新对象
+    const tmpRoute = {...route}; // ES6扩展运算符复制新对象
 
     if (tmpRoute.component?.toString() == "SchoolIndex") {
       tmpRoute.component = Layout;
@@ -279,7 +279,7 @@ export const usePermissionStore = defineStore("permission", () => {
       }
     });
   }
-  return { routes, setRoutes, generateRoutes };
+  return {routes, setRoutes, generateRoutes};
 });
 
 // 非setup

+ 2 - 2
src/store/modules/settings.ts

@@ -1,6 +1,6 @@
-import { defineStore } from "pinia";
+import {defineStore} from "pinia";
 import defaultSettings from "@/settings";
-import { useStorage } from "@vueuse/core";
+import {useStorage} from "@vueuse/core";
 
 export const useSettingsStore = defineStore("setting", () => {
   // state

+ 2 - 2
src/store/modules/tagsView.ts

@@ -1,5 +1,5 @@
-import { defineStore } from "pinia";
-import { RouteLocationNormalized } from "vue-router";
+import {defineStore} from "pinia";
+import {RouteLocationNormalized} from "vue-router";
 
 export interface TagView extends Partial<RouteLocationNormalized> {
   title?: string;

+ 7 - 4
src/styles/reset.scss

@@ -16,10 +16,10 @@ html {
   box-sizing: border-box;
   width: 100%;
   height: 100%;
+  font-size: 16px;
   line-height: 1.5;
   tab-size: 4;
   text-size-adjust: 100%;
-  font-size: 16px;
 }
 
 body {
@@ -28,8 +28,8 @@ body {
   margin: 0;
   font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
     sans-serif;
-  line-height: inherit;
   font-size: 16px;
+  line-height: inherit;
   -moz-osx-font-smoothing: grayscale;
   -webkit-font-smoothing: antialiased;
   text-rendering: optimizelegibility;
@@ -75,16 +75,18 @@ a:active,
 div:focus {
   outline: none;
 }
+
 .clear::after {
-  content: "";
   display: block;
   clear: both;
+  content: "";
 }
+
 .empty {
   box-sizing: border-box;
   padding: 30px 0;
-  text-align: center;
   line-height: 1.5rem;
+  text-align: center;
   //background-image: url("../assets/empty.png");
   //background-repeat: no-repeat;
   //background-position: center center;
@@ -93,6 +95,7 @@ div:focus {
     margin: 0;
     font-size: 14px;
     color: #a1a1a1;
+
     &.red {
       color: #e04962;
     }

+ 21 - 9
src/styles/sidebar.scss

@@ -15,8 +15,8 @@
     width: $sideBarWidth !important;
     height: 100%;
     overflow: hidden;
-    background: #ffffff;
-    box-shadow: 0 0 10px #eeeeee;
+    background: #fff;
+    box-shadow: 0 0 10px #eee;
     transition: width 0.28s;
     // reset element-ui css
     .horizontal-collapse-transition {
@@ -63,31 +63,36 @@
     .el-sub-menu__title,
     .el-menu-item {
       position: relative;
-      margin: 36px 0 0 20px;
       width: 210px;
       height: 38px;
+      padding-left: 30px;
+      margin: 36px 0 0 20px;
+      font-size: 16px;
       line-height: 38px;
-      border-radius: 6px;
       color: #657dbc;
-      font-size: 16px;
-      padding-left: 30px;
+      border-radius: 6px;
+
       span {
         color: $menuText;
       }
     }
+
     .el-sub-menu .el-sub-menu__icon-arrow {
       width: 20px;
     }
+
     .el-menu-item.is-active {
+      color: #fff;
       background: $menuHover;
-      color: #ffffff;
+
       span {
         color: $menuBg;
       }
-      &:after {
-        content: "\276F";
+
+      &::after {
         position: absolute;
         right: 20px;
+        content: "\276F";
       }
     }
   }
@@ -95,18 +100,22 @@
   .hideSidebar {
     .sidebar-container {
       width: 54px !important;
+
       .el-menu-item {
         width: 44px !important;
         padding: 0;
         margin: 0 auto;
+
         .el-menu-tooltip__trigger {
           padding: 0;
         }
       }
+
       .svg-icon {
         margin: 0 auto;
       }
     }
+
     .main-container {
       margin-left: 54px;
     }
@@ -117,10 +126,12 @@
     .main-container {
       margin-left: 0;
     }
+
     .sidebar-container {
       width: $sideBarWidth !important;
       transition: transform 0.28s;
     }
+
     &.hideSidebar {
       .sidebar-container {
         pointer-events: none;
@@ -129,6 +140,7 @@
       }
     }
   }
+
   .withoutAnimation {
     .main-container,
     .sidebar-container {

+ 2 - 2
src/styles/variables.scss

@@ -1,9 +1,9 @@
 // 全局SCSS变量
 
 :root {
-  --menuBg: #ffffff;
+  --menuBg: #fff;
   --menuText: #23283c;
-  --menuActiveText: #ffffff;
+  --menuActiveText: #fff;
   --menuHover: #4284f2;
   --subMenuBg: #1f2d3d;
   --subMenuActiveText: #f4f4f5;

+ 2 - 2
src/types/auto-imports.d.ts

@@ -282,10 +282,10 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from "vue";
+  export type {Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode} from "vue";
 }
 // for vue template auto import
-import { UnwrapRef } from "vue";
+import {UnwrapRef} from "vue";
 declare module "vue" {
   interface ComponentCustomProperties {
     readonly EffectScope: UnwrapRef<typeof import("vue")["EffectScope"]>;

+ 1 - 1
src/types/env.d.ts

@@ -1,7 +1,7 @@
 /// <reference types="vite/client" />
 
 declare module "*.vue" {
-  import { DefineComponent } from "vue";
+  import {DefineComponent} from "vue";
   // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
   const component: DefineComponent<{}, {}, any>;
   export default component;

+ 12 - 4
src/views/areaboard/components/AreaDataCard.vue

@@ -1,6 +1,6 @@
 <!-- 数据卡片 -->
 <script setup lang="ts">
-import { TransitionPresets, useTransition } from "@vueuse/core";
+import {TransitionPresets, useTransition} from "@vueuse/core";
 
 const props = defineProps({
   students: {
@@ -61,38 +61,46 @@ watchEffect(() => {
 
 <style lang="scss" scoped>
 .data-card {
-  float: left;
   box-sizing: border-box;
+  float: left;
   width: 300px;
   height: 140px;
   padding: 30px 0 0 30px;
-  border: 1px solid #e6e8eb;
   margin: 0 20px 20px 0;
+  border: 1px solid #e6e8eb;
   border-radius: 30px;
+
   span {
     display: block;
     font-size: 18px;
     color: #23283c;
+
     &.n {
+      margin-bottom: 15px;
       font-size: 24px;
       font-weight: bold;
-      margin-bottom: 15px;
     }
   }
+
   &.c1 {
     background: #fef6e9 url("../../../assets/areaboard/students.png") 90% 50% no-repeat;
+
     span.n {
       color: #e08e0a;
     }
   }
+
   &.c2 {
     background: #feeeee url("../../../assets/areaboard/games.png") 90% 50% no-repeat;
+
     span.n {
       color: #ca7676;
     }
   }
+
   &.c3 {
     background: #d0f6f1 url("../../../assets/areaboard/schools.png") 90% 50% no-repeat;
+
     span.n {
       color: #45a498;
     }

+ 18 - 13
src/views/dashboard/components/DataCard.vue

@@ -1,7 +1,7 @@
 <!-- 数据卡片 -->
 <script setup lang="ts">
-import { TransitionPresets, useTransition } from "@vueuse/core";
-import { watch } from "vue";
+import {TransitionPresets, useTransition} from "@vueuse/core";
+import {watch} from "vue";
 
 const props = defineProps({
   classes: {
@@ -112,50 +112,55 @@ watch(
   </el-row>
 </template>
 <style lang="scss" scoped>
-@media only screen and (min-width: 768px) {
+@media only screen and (width >= 768px) {
   .el-col-5 {
     display: block;
-    max-width: 20%;
-    min-width: 285px;
     flex: 0 0 20%;
+    min-width: 285px;
+    max-width: 20%;
   }
 }
-@media only screen and (max-width: 768px) {
-  .el-col-lg-5 {
-  }
-}
+
 .data-card {
   padding: 22px 42px;
-  background: #ffffff;
-  border-radius: 30px;
+  background: #fff;
   border: 1px solid #e6e8eb;
+  border-radius: 30px;
+
   .card {
     box-sizing: border-box;
     width: 265px;
-    height: 134px;
     max-width: 100%;
+    height: 134px;
     padding: 32px 0 0 145px;
     margin: 20px 0;
-    background-size: 100% auto;
     background-repeat: no-repeat;
+    background-size: 100% auto;
+
     &.c1 {
       background-image: url("../../../assets/index/grade.png");
     }
+
     &.c2 {
       background-image: url("../../../assets/index/teachers.png");
     }
+
     &.c3 {
       background-image: url("../../../assets/index/students.png");
     }
+
     &.c4 {
       background-image: url("../../../assets/index/equipments.png");
     }
+
     &.c5 {
       background-image: url("../../../assets/index/trainings.png");
     }
+
     span {
       display: block;
       color: #142141;
+
       &.n {
         font-size: 26px;
         font-weight: bold;

+ 2 - 2
src/views/dashboard/example.vue

@@ -1,6 +1,6 @@
 <script setup lang="ts">
-import { watch } from "vue";
-import { useUserStore } from "@/store/modules/user";
+import {watch} from "vue";
+import {useUserStore} from "@/store/modules/user";
 
 defineOptions({
   name: "DashboardExample",

+ 6 - 5
src/views/error/404.vue

@@ -12,20 +12,21 @@ export default {
 
 <style lang="scss" scoped>
 .page404-container {
+  position: relative;
   width: 100%;
   height: 100%;
   background: #1e2e64 url("../../assets/404/404.png") no-repeat;
   background-size: 100% auto;
-  position: relative;
+
   .return-home {
-    display: block;
-    width: 210px;
-    height: 60px;
-    background: url("../../assets/404/back.png") no-repeat;
     position: absolute;
     bottom: 50px;
     left: 50%;
+    display: block;
+    width: 210px;
+    height: 60px;
     margin-left: -100px;
+    background: url("../../assets/404/back.png") no-repeat;
   }
 }
 </style>

+ 12 - 4
src/views/evaluation/components/EvaluateCard.vue

@@ -1,6 +1,6 @@
 <!-- 数据卡片 -->
 <script setup lang="ts">
-import { TransitionPresets, useTransition } from "@vueuse/core";
+import {TransitionPresets, useTransition} from "@vueuse/core";
 
 const props = defineProps({
   students: {
@@ -60,38 +60,46 @@ onMounted(() => {
 
 <style lang="scss" scoped>
 .data-card {
-  float: left;
   box-sizing: border-box;
+  float: left;
   width: 300px;
   height: 140px;
   padding: 30px 0 0 30px;
-  border: 1px solid #e6e8eb;
   margin: 0 20px 20px 0;
+  border: 1px solid #e6e8eb;
   border-radius: 30px;
+
   span {
     display: block;
     font-size: 18px;
     color: #23283c;
+
     &.n {
+      margin-bottom: 15px;
       font-size: 24px;
       font-weight: bold;
-      margin-bottom: 15px;
     }
   }
+
   &.c1 {
     background: #fef6e9 url("../../../assets/evaluate/student.png") 90% 50% no-repeat;
+
     span.n {
       color: #e08e0a;
     }
   }
+
   &.c2 {
     background: #feeeee url("../../../assets/evaluate/focus.png") 90% 50% no-repeat;
+
     span.n {
       color: #ca7676;
     }
   }
+
   &.c3 {
     background: #d0f6f1 url("../../../assets/evaluate/training.png") 90% 50% no-repeat;
+
     span.n {
       color: #45a498;
     }

+ 6 - 6
src/views/grade/index.vue

@@ -1,9 +1,9 @@
 <script setup lang="ts">
-import { watch } from "vue";
-import { useUserStore } from "@/store/modules/user";
+import {watch} from "vue";
+import {useUserStore} from "@/store/modules/user";
 
-import { getGradeList, getGradeStudents } from "@/api/grade";
-import { GradeItem } from "@/api/grade/types";
+import {getGradeList, getGradeStudents} from "@/api/grade";
+import {GradeItem} from "@/api/grade/types";
 
 const userStore = useUserStore();
 defineOptions({
@@ -20,7 +20,7 @@ const dataStatus = ref(0);
 const gradeType = ref(0);
 async function getGradeItems(schoolId: number, status: number) {
   getGradeList(schoolId, status)
-    .then(({ data }) => {
+    .then(({data}) => {
       gradeData.value = data;
       dataStatus.value = 1;
     })
@@ -32,7 +32,7 @@ async function getGradeItems(schoolId: number, status: number) {
 // 请求班级学生数据
 async function getStudentList(grade: GradeItem) {
   getGradeStudents(grade.id)
-    .then(({ data }) => {
+    .then(({data}) => {
       grade.students = data;
     })
     .catch((error) => {

+ 4 - 4
src/views/login/redirect.vue

@@ -3,13 +3,13 @@
 </template>
 
 <script setup lang="ts">
-import { useRoute, useRouter } from "vue-router";
+import {useRoute, useRouter} from "vue-router";
 
 const route = useRoute();
 const router = useRouter();
 
-const { params, query } = route;
-const { path } = params;
+const {params, query} = route;
+const {path} = params;
 
-router.replace({ path: "/" + path, query });
+router.replace({path: "/" + path, query});
 </script>

+ 1 - 1
tsconfig.json

@@ -22,5 +22,5 @@
   },
   "include": ["src/**/*.ts", "src/**/*.vue", "src/types/**/*.d.ts"],
   "exclude": ["node_modules", "dist", "**/*.js"],
-  "references": [{ "path": "./tsconfig.node.json" }]
+  "references": [{"path": "./tsconfig.node.json"}]
 }

+ 4 - 4
vite.config.ts

@@ -1,22 +1,22 @@
 import vue from "@vitejs/plugin-vue";
 
-import { UserConfig, ConfigEnv, loadEnv, defineConfig } from "vite";
+import {UserConfig, ConfigEnv, loadEnv, defineConfig} from "vite";
 
 import AutoImport from "unplugin-auto-import/vite";
 import Components from "unplugin-vue-components/vite";
-import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
+import {ElementPlusResolver} from "unplugin-vue-components/resolvers";
 
 import Icons from "unplugin-icons/vite";
 import IconsResolver from "unplugin-icons/resolver";
 
-import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
+import {createSvgIconsPlugin} from "vite-plugin-svg-icons";
 
 import UnoCSS from "unocss/vite";
 
 import path from "path";
 const pathSrc = path.resolve(__dirname, "src");
 
-export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
+export default defineConfig(({mode}: ConfigEnv): UserConfig => {
   const env = loadEnv(mode, process.cwd());
   return {
     resolve: {