diff --git a/src/App.vue b/src/App.vue index bcff4e9..1cedfb0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,9 +1,32 @@ - + + + diff --git a/src/assets/logo.png b/src/assets/logo.png index f3d2503..5800f2e 100644 Binary files a/src/assets/logo.png and b/src/assets/logo.png differ diff --git a/src/components.d.ts b/src/components.d.ts index 42aad63..65cf133 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -5,7 +5,17 @@ declare module 'vue' { export interface GlobalComponents { ElButton: typeof import('element-plus/es')['ElButton'] + ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] + ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + ElDivider: typeof import('element-plus/es')['ElDivider'] ElIcon: typeof import('element-plus/es')['ElIcon'] + ElMenu: typeof import('element-plus/es')['ElMenu'] + ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] + ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] + ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] + ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] + ElTabPane: typeof import('element-plus/es')['ElTabPane'] + ElTabs: typeof import('element-plus/es')['ElTabs'] XIcon: typeof import('./components/XIcon.vue')['default'] } } diff --git a/src/components/XIcon.vue b/src/components/XIcon.vue index 626d731..f29ca25 100644 --- a/src/components/XIcon.vue +++ b/src/components/XIcon.vue @@ -33,7 +33,7 @@ setup(props) { const symbolId = computed(() => `#icon-${props.name}`); const size = computed(() => - typeof new Number(props.size) !== Number.NaN ? props.size + 'px' : props.size + Number.isNaN(new Number(props.size).valueOf()) ? props.size : props.size + 'px' ); const isRemix = computed(() => props.name.indexOf('-') !== -1 || props.isCustomSvg); return { @@ -50,6 +50,8 @@ .x-icon { font-size: v-bind(size); color: v-bind(color); + line-height: 1; + vertical-align: middle; } svg.x-icon { width: v-bind(size); diff --git a/src/icons/svg/msb.svg b/src/icons/svg/msb.svg index f9c4c1b..02d5bf4 100644 --- a/src/icons/svg/msb.svg +++ b/src/icons/svg/msb.svg @@ -1,107 +1,158 @@ - + diff --git a/src/layouts/components/aside.vue b/src/layouts/components/aside.vue new file mode 100644 index 0000000..f7f73d3 --- /dev/null +++ b/src/layouts/components/aside.vue @@ -0,0 +1,60 @@ +

{{ item.meta.title }}

+ + + + + + + + diff --git a/src/layouts/components/logo.vue b/src/layouts/components/logo.vue new file mode 100644 index 0000000..749a67c --- /dev/null +++ b/src/layouts/components/logo.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/src/layouts/components/main.vue b/src/layouts/components/main.vue new file mode 100644 index 0000000..d9cde07 --- /dev/null +++ b/src/layouts/components/main.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/layouts/components/menu-item.vue b/src/layouts/components/menu-item.vue new file mode 100644 index 0000000..b2afe62 --- /dev/null +++ b/src/layouts/components/menu-item.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/src/layouts/components/menu.vue b/src/layouts/components/menu.vue new file mode 100644 index 0000000..3feb9bd --- /dev/null +++ b/src/layouts/components/menu.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/layouts/default.vue b/src/layouts/default.vue new file mode 100644 index 0000000..79190a0 --- /dev/null +++ b/src/layouts/default.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/src/router/route.json b/src/router/route.json new file mode 100644 index 0000000..a53ddbd --- /dev/null +++ b/src/router/route.json @@ -0,0 +1,1361 @@ +[ + { + "path": "/", + "name": "Home", + "component": { + "name": "Layouts", + "__scopeId": "data-v-b1897f6a", + "__file": "src/vab/layouts/index.vue", + "__hmrId": "b1897f6a" + }, + "meta": { "title": "首页", "icon": "home-line", "noColumn": true, "menu": "/", "activeMenu": "/" }, + "children": [ + { + "path": "/dashboard", + "name": "Dashboard", + "meta": { "title": "首页", "icon": "home-line", "menu": "/dashboard", "activeMenu": "/dashboard" }, + "childrenNameList": ["Dashboard"] + } + ], + "childrenNameList": ["Dashboard"], + "redirect": "/dashboard" + }, + { + "path": "/demo", + "name": "Demo", + "component": { + "name": "Layouts", + "__scopeId": "data-v-b1897f6a", + "__file": "src/vab/layouts/index.vue", + "__hmrId": "b1897f6a" + }, + "meta": { "title": "组件示例", "icon": "test-tube-line", "menu": "/demo", "activeMenu": "/demo" }, + "children": [ + { + "path": "/demo/icon", + "name": "IconDemo", + "meta": { "title": "图标库", "icon": "aliens-fill", "menu": "/demo/icon", "activeMenu": "/demo/icon" }, + "childrenNameList": ["IconDemo"] + }, + { + "path": "/demo/list", + "name": "TableListDemo", + "meta": { "title": "通用列表", "icon": "table-fill", "menu": "/demo/list", "activeMenu": "/demo/list" }, + "childrenNameList": ["TableListDemo"] + }, + { + "path": "/demo/form", + "name": "BaseFormDemo", + "meta": { + "title": "通用表单", + "icon": "database-fill", + "menu": "/demo/form", + "activeMenu": "/demo/form" + }, + "childrenNameList": ["BaseFormDemo"] + }, + { + "path": "/demo/sortableTable", + "name": "SortableTableDemo", + "meta": { + "title": "可拖拽行表格", + "icon": "table-line", + "menu": "/demo/sortableTable", + "activeMenu": "/demo/sortableTable" + }, + "childrenNameList": ["SortableTableDemo"] + }, + { + "path": "/demo/select", + "name": "SelectDemo", + "meta": { + "title": "选择项组件", + "icon": "align-right", + "menu": "/demo/select", + "activeMenu": "/demo/select" + }, + "childrenNameList": ["SelectDemo"] + } + ], + "childrenNameList": ["IconDemo", "TableListDemo", "BaseFormDemo", "SortableTableDemo", "SelectDemo"], + "redirect": "/demo/icon" + }, + { + "path": "/course", + "name": "Course", + "meta": { + "title": "课程管理", + "icon": "checkbox-multiple-fill", + "hidden": false, + "activeMenu": "/course", + "menu": "/course" + }, + "children": [ + { + "path": "/course/management", + "name": "CourseManagement", + "meta": { + "title": "课程列表", + "icon": "book-2-fill", + "hidden": false, + "activeMenu": "/course/management", + "menu": "/course/management" + }, + "children": [ + { + "path": "/course/management/create/:step?", + "name": "CreateCourse", + "meta": { + "title": "新增课程", + "icon": "book-2-fill", + "hidden": true, + "activeMenu": "/course/management", + "menu": "/course/management/create" + }, + "childrenNameList": ["CreateCourse"] + }, + { + "path": "/course/management/update/:courseNo/:step?", + "name": "UpdateCourse", + "meta": { + "title": "编辑课程", + "icon": "book-2-fill", + "hidden": true, + "activeMenu": "/course/management", + "menu": "/course/management/update" + }, + "childrenNameList": ["UpdateCourse"] + }, + { + "path": "/course/management/video/:courseNo", + "name": "CourseVideoManagement", + "meta": { + "title": "视频管理", + "icon": "book-2-fill", + "hidden": true, + "activeMenu": "/course/management", + "menu": "/course/management/video/:courseNo" + }, + "childrenNameList": ["CourseVideoManagement"] + }, + { + "path": "/course/management/question", + "name": "CourseQuestionManagement", + "meta": { + "title": "题库管理", + "icon": "book-2-fill", + "hidden": true, + "activeMenu": "/course/management", + "menu": "/course/management/question" + }, + "childrenNameList": ["CourseQuestionManagement"] + }, + { + "path": "/course/management/attachment/:courseNo", + "name": "CourseAttachmentManagement", + "meta": { + "title": "附件管理", + "icon": "book-2-fill", + "hidden": true, + "activeMenu": "/course/management", + "menu": "/course/management/attachment/:courseNo" + }, + "childrenNameList": ["CourseAttachmentManagement"] + } + ], + "childrenNameList": [ + "CourseManagement", + "CreateCourse", + "UpdateCourse", + "CourseVideoManagement", + "CourseQuestionManagement", + "CourseAttachmentManagement" + ] + }, + { + "path": "/course/category", + "name": "CourseCategory", + "meta": { + "title": "课程分类", + "icon": "book-read-fill", + "hidden": false, + "activeMenu": "/course/category", + "menu": "/course/category" + }, + "childrenNameList": ["CourseCategory"] + }, + { + "path": "/course/system", + "name": "SystemCourseManagement", + "meta": { + "title": "体系课", + "icon": "book-3-fill", + "hidden": false, + "activeMenu": "/course/system", + "menu": "/course/system" + }, + "childrenNameList": ["SystemCourseManagement"] + }, + { + "path": "/course/authorize", + "name": "CourseAuthorize", + "meta": { + "title": "课程授权", + "icon": "book-fill", + "hidden": false, + "activeMenu": "/course/authorize", + "menu": "/course/authorize" + }, + "childrenNameList": ["CourseAuthorize"] + }, + { + "path": "/course/package", + "name": "CoursePackage", + "meta": { + "title": "课程包", + "icon": "archive-drawer-fill", + "hidden": false, + "activeMenu": "/course/package", + "menu": "/course/package" + }, + "childrenNameList": ["CoursePackage"] + }, + { + "path": "/course/live", + "name": "LiveCourse", + "meta": { + "title": "直播课", + "icon": "live-fill", + "hidden": false, + "activeMenu": "/course/live", + "menu": "/course/live" + }, + "childrenNameList": ["LiveCourse"] + }, + { + "path": "/course/unlockcourse", + "name": "unlockcourse", + "meta": { + "title": "解锁课程", + "icon": "lock-unlock-fill", + "hidden": false, + "activeMenu": "/course/unlockcourse", + "menu": "/course/unlockcourse" + }, + "childrenNameList": ["unlockcourse"] + } + ], + "childrenNameList": [ + "CourseManagement", + "CreateCourse", + "UpdateCourse", + "CourseVideoManagement", + "CourseQuestionManagement", + "CourseAttachmentManagement", + "CourseCategory", + "SystemCourseManagement", + "CourseAuthorize", + "CoursePackage", + "LiveCourse", + "unlockcourse" + ], + "redirect": "/course/management" + }, + { + "path": "/education", + "name": "Education", + "meta": { + "title": "教务教学", + "icon": "book-open-fill", + "hidden": false, + "activeMenu": "/education", + "menu": "/education" + }, + "children": [ + { + "path": "/education/teacher", + "name": "TeacherManagement", + "meta": { + "title": "老师管理", + "icon": "user-shared-fill", + "hidden": false, + "activeMenu": "/education/teacher", + "menu": "/education/teacher" + }, + "childrenNameList": ["TeacherManagement"] + }, + { + "path": "/education/student", + "name": "StudentManagement", + "meta": { + "title": "学生管理", + "icon": "user-received-fill", + "hidden": false, + "activeMenu": "/education/student", + "menu": "/education/student" + }, + "children": [ + { + "path": "/education/student/class/add/:id?", + "name": "StudentClassAdd", + "meta": { + "title": "编辑班级", + "icon": "account-pin-circle-fill", + "hidden": true, + "activeMenu": "/education/student", + "menu": "/education/student/class/add" + }, + "childrenNameList": ["StudentClassAdd"] + }, + { + "path": "/education/student/class/students/:id?/:packageId?/:gradeId?", + "name": "StudentsManagement", + "meta": { + "title": "学员管理", + "icon": "null", + "hidden": true, + "activeMenu": "/education/student", + "menu": "/education/student/class/students" + }, + "childrenNameList": ["StudentsManagement"] + }, + { + "path": "/education/student/list", + "name": "StudentManagementList", + "meta": { + "title": "学生列表", + "icon": "user-received-line", + "hidden": false, + "activeMenu": "/education/student/list", + "menu": "/education/student/list" + }, + "childrenNameList": ["StudentManagementList"] + }, + { + "path": "/education/student/grade", + "name": "GradeManagement", + "meta": { + "title": "年级管理", + "icon": "account-pin-box-fill", + "hidden": false, + "activeMenu": "/education/student/grade", + "menu": "/education/student/grade" + }, + "childrenNameList": ["GradeManagement"] + }, + { + "path": "/education/student/class/:id?", + "name": "ClassManagement", + "meta": { + "title": "班级管理", + "icon": "account-pin-circle-fill", + "hidden": false, + "activeMenu": "/education/student/class", + "menu": "/education/student/class" + }, + "childrenNameList": ["ClassManagement"] + } + ], + "childrenNameList": [ + "StudentClassAdd", + "StudentsManagement", + "StudentManagementList", + "GradeManagement", + "ClassManagement" + ], + "redirect": "/education/student/list" + }, + { + "path": "/education/admission", + "name": "AdmissionManagement", + "meta": { + "title": "入学", + "icon": "award-fill", + "hidden": false, + "activeMenu": "/education/admission", + "menu": "/education/admission" + }, + "children": [ + { + "path": "/education/admission/evaluation", + "name": "AdmissionEvaluation", + "meta": { + "title": "入学评测", + "icon": "file-paper-2-fill", + "hidden": false, + "activeMenu": "/education/admission/evaluation", + "menu": "/education/admission/evaluation" + }, + "childrenNameList": ["AdmissionEvaluation"] + }, + { + "path": "/education/admission/way", + "name": "StudyWay", + "meta": { + "title": "学习路线", + "icon": "send-plane-fill", + "hidden": false, + "activeMenu": "/education/admission/way", + "menu": "/education/admission/way" + }, + "childrenNameList": ["StudyWay"] + } + ], + "childrenNameList": ["AdmissionEvaluation", "StudyWay"], + "redirect": "/education/admission/evaluation" + }, + { + "path": "/education/answer", + "name": "Answer", + "meta": { + "title": "答疑", + "icon": "question-answer-fill", + "hidden": false, + "activeMenu": "/education/answer", + "menu": "/education/answer" + }, + "children": [ + { + "path": "/education/answer/management", + "name": "AnswerManagement", + "meta": { + "title": "答疑管理", + "icon": "question-answer-fill", + "hidden": false, + "activeMenu": "/education/answer/management", + "menu": "/education/answer/management" + }, + "children": [ + { + "path": "/education/answer/management/list", + "name": "AnswerManagementList", + "meta": { + "title": "答疑管理列表", + "icon": "question-answer-line", + "hidden": false, + "activeMenu": "/education/answer/management/list", + "menu": "/education/answer/management/list" + }, + "childrenNameList": ["AnswerManagementList"] + }, + { + "path": "/education/answer/management/invalid", + "name": "InvalidQuestionManagement", + "meta": { + "title": "无效追问管理", + "icon": "questionnaire-fill", + "hidden": false, + "activeMenu": "/education/answer/management/invalid", + "menu": "/education/answer/management/invalid" + }, + "childrenNameList": ["InvalidQuestionManagement"] + }, + { + "path": "/education/answer/management/lock", + "name": "UserLockManagement", + "meta": { + "title": "用户锁定管理", + "icon": "lock-fill", + "hidden": false, + "activeMenu": "/education/answer/management/lock", + "menu": "/education/answer/management/lock" + }, + "childrenNameList": ["UserLockManagement"] + } + ], + "childrenNameList": ["AnswerManagementList", "InvalidQuestionManagement", "UserLockManagement"], + "redirect": "/education/answer/management/list" + }, + { + "path": "/education/answer/assign/:questionId", + "name": "AssignAnswerTeacher", + "meta": { + "title": "指派老师", + "icon": "account-box-fill", + "hidden": true, + "activeMenu": "/education/answer", + "menu": "/education/answer/assign/:questionId" + }, + "childrenNameList": ["AssignAnswerTeacher"] + }, + { + "path": "/education/answer/teacher", + "name": "AnswerTeacher", + "meta": { + "title": "答疑老师管理", + "icon": "book-line", + "hidden": false, + "activeMenu": "/education/answer/teacher", + "menu": "/education/answer/teacher" + }, + "children": [ + { + "path": "/education/answer/teacher/summary", + "name": "AnswerTeacherSummary", + "meta": { + "title": "答疑老师统计", + "icon": "book-2-line", + "hidden": false, + "activeMenu": "/education/answer/teacher/summary", + "menu": "/education/answer/teacher/summary" + }, + "childrenNameList": ["AnswerTeacherSummary"] + }, + { + "path": "/education/answer/teacher/management", + "name": "AnswerTeacherManagement", + "meta": { + "title": "答疑老师管理", + "icon": "book-3-line", + "hidden": false, + "activeMenu": "/education/answer/teacher/management", + "menu": "/education/answer/teacher/management" + }, + "childrenNameList": ["AnswerTeacherManagement"] + }, + { + "path": "/education/answer/teacher/bind/:teacher?", + "name": "AnswerTeacherUpdateBind", + "meta": { + "title": "编辑课程绑定", + "icon": "book-fill", + "hidden": true, + "activeMenu": "/education/answer/teacher", + "menu": "/education/answer/teacher/bind" + }, + "childrenNameList": ["AnswerTeacherUpdateBind"] + }, + { + "path": "/education/answer/teacher/course", + "name": "AnswerTeacherBindCourse", + "meta": { + "title": "绑定课程管理", + "icon": "book-fill", + "hidden": false, + "activeMenu": "/education/answer/teacher/course", + "menu": "/education/answer/teacher/course" + }, + "childrenNameList": ["AnswerTeacherBindCourse"] + } + ], + "childrenNameList": [ + "AnswerTeacherSummary", + "AnswerTeacherManagement", + "AnswerTeacherUpdateBind", + "AnswerTeacherBindCourse" + ], + "redirect": "/education/answer/teacher/summary" + } + ], + "childrenNameList": [ + "AnswerManagementList", + "InvalidQuestionManagement", + "UserLockManagement", + "AssignAnswerTeacher", + "AnswerTeacherSummary", + "AnswerTeacherManagement", + "AnswerTeacherUpdateBind", + "AnswerTeacherBindCourse" + ], + "redirect": "/education/answer/management/list" + }, + { + "path": "/education/question", + "name": "QuestionManagement", + "meta": { + "title": "题库管理", + "icon": "brush-fill", + "hidden": false, + "activeMenu": "/education/question", + "menu": "/education/question" + }, + "childrenNameList": ["QuestionManagement"] + }, + { + "path": "/education/note", + "name": "NoteManagement", + "meta": { + "title": "笔记管理", + "icon": "sticky-note-2-fill", + "hidden": false, + "activeMenu": "/education/note", + "menu": "/education/note" + }, + "childrenNameList": ["NoteManagement"] + }, + { + "path": "/education/research", + "name": "CourseResearch", + "meta": { + "title": "课研更新", + "icon": "contacts-book-upload-fill", + "hidden": false, + "activeMenu": "/education/research", + "menu": "/education/research" + }, + "children": [ + { + "path": "/education/research/plan", + "name": "CourseResearchPlan", + "meta": { + "title": "课研计划", + "icon": "contacts-book-upload-line", + "hidden": false, + "activeMenu": "/education/research/plan", + "menu": "/education/research/plan" + }, + "childrenNameList": ["CourseResearchPlan"] + }, + { + "path": "/education/research/log", + "name": "CourseResearchLog", + "meta": { + "title": "课研更新日志", + "icon": "file-copy-2-line", + "hidden": false, + "activeMenu": "/education/research/log", + "menu": "/education/research/log" + }, + "childrenNameList": ["CourseResearchLog"] + } + ], + "childrenNameList": ["CourseResearchPlan", "CourseResearchLog"], + "redirect": "/education/research/plan" + }, + { + "path": "/education/live", + "name": "LiveManagement", + "meta": { + "title": "直播管理", + "icon": "live-fill", + "hidden": false, + "activeMenu": "/education/live", + "menu": "/education/live" + }, + "children": [ + { + "path": "/education/live/course", + "name": "LiveCourseManagement", + "meta": { + "title": "直播课管理", + "icon": "live-fill", + "hidden": false, + "activeMenu": "/education/live/course", + "menu": "/education/live/course" + }, + "childrenNameList": ["LiveCourseManagement"] + }, + { + "path": "/education/live/attendance", + "name": "LiveAttendance", + "meta": { + "title": "直播考勤", + "icon": "live-fill", + "hidden": false, + "activeMenu": "/education/live/attendance", + "menu": "/education/live/attendance" + }, + "childrenNameList": ["LiveAttendance"] + } + ], + "childrenNameList": ["LiveCourseManagement", "LiveAttendance"], + "redirect": "/education/live/course" + }, + { + "path": "/education/material", + "name": "MaterialManagement", + "meta": { + "title": "老师资料管理", + "icon": "database-2-fill", + "hidden": false, + "activeMenu": "/education/material", + "menu": "/education/material" + }, + "childrenNameList": ["MaterialManagement"] + }, + { + "path": "/education/shift", + "name": "ShiftTable", + "meta": { + "title": "排班表", + "icon": "calendar-check-line", + "hidden": false, + "activeMenu": "/education/shift", + "menu": "/education/shift" + }, + "childrenNameList": ["ShiftTable"] + }, + { + "path": "/education/course", + "name": "CourseTable", + "meta": { + "title": "课程表管理", + "icon": "calendar-todo-fill", + "hidden": false, + "activeMenu": "/education/course", + "menu": "/education/course" + }, + "childrenNameList": ["CourseTable"] + } + ], + "childrenNameList": [ + "TeacherManagement", + "StudentClassAdd", + "StudentsManagement", + "StudentManagementList", + "GradeManagement", + "ClassManagement", + "AdmissionEvaluation", + "StudyWay", + "AnswerManagementList", + "InvalidQuestionManagement", + "UserLockManagement", + "AssignAnswerTeacher", + "AnswerTeacherSummary", + "AnswerTeacherManagement", + "AnswerTeacherUpdateBind", + "AnswerTeacherBindCourse", + "QuestionManagement", + "NoteManagement", + "CourseResearchPlan", + "CourseResearchLog", + "LiveCourseManagement", + "LiveAttendance", + "MaterialManagement", + "ShiftTable", + "CourseTable" + ], + "redirect": "/education/teacher" + }, + { + "path": "/audit", + "name": "Audit", + "meta": { + "title": "审核管理", + "icon": "checkbox-multiple-fill", + "hidden": false, + "activeMenu": "/audit", + "menu": "/audit" + }, + "children": [ + { + "path": "/audit/course", + "name": "CourseAudit", + "meta": { + "title": "课程审核", + "icon": "book-fill", + "hidden": false, + "activeMenu": "/audit/course", + "menu": "/audit/course" + }, + "childrenNameList": ["CourseAudit"] + }, + { + "path": "/audit/answer", + "name": "AnswerCourseAudit", + "meta": { + "title": "答疑课程审核", + "icon": "book-2-fill", + "hidden": false, + "activeMenu": "/audit/answer", + "menu": "/audit/answer" + }, + "childrenNameList": ["AnswerCourseAudit"] + }, + { + "path": "/audit/admission", + "name": "AdmissionAudit", + "meta": { + "title": "入学审核", + "icon": "book-3-fill", + "hidden": false, + "activeMenu": "/audit/admission", + "menu": "/audit/admission" + }, + "childrenNameList": ["AdmissionAudit"] + } + ], + "childrenNameList": ["CourseAudit", "AnswerCourseAudit", "AdmissionAudit"], + "redirect": "/audit/course" + }, + { + "path": "/operation", + "name": "Operation", + "meta": { + "title": "运营管理", + "icon": "briefcase-4-fill", + "hidden": false, + "activeMenu": "/operation", + "menu": "/operation" + }, + "children": [ + { + "path": "/operation/banner", + "name": "BannerManagement", + "meta": { + "title": "轮播图", + "icon": "image-fill", + "hidden": false, + "activeMenu": "/operation/banner", + "menu": "/operation/banner" + }, + "childrenNameList": ["BannerManagement"] + }, + { + "path": "/operation/activity", + "name": "ActivityManagement", + "meta": { + "title": "活动管理", + "icon": "gift-2-fill", + "hidden": false, + "activeMenu": "/operation/activity", + "menu": "/operation/activity" + }, + "children": [ + { + "path": "/operation/activity/course", + "name": "CourseActivity", + "meta": { + "title": "课程活动", + "icon": "git-repository-line", + "hidden": false, + "activeMenu": "/operation/activity/course", + "menu": "/operation/activity/course" + }, + "childrenNameList": ["CourseActivity"] + }, + { + "path": "/operation/activity/poster", + "name": "PosterShare", + "meta": { + "title": "海报分享", + "icon": "dashboard-fill", + "hidden": false, + "activeMenu": "/operation/activity/poster", + "menu": "/operation/activity/poster" + }, + "childrenNameList": ["PosterShare"] + }, + { + "path": "/operation/activity/punch", + "name": "PunchActivity", + "meta": { + "title": "打卡活动", + "icon": "fingerprint-line", + "hidden": false, + "activeMenu": "/operation/activity/punch", + "menu": "/operation/activity/punch" + }, + "childrenNameList": ["PunchActivity"] + } + ], + "childrenNameList": ["CourseActivity", "PosterShare", "PunchActivity"], + "redirect": "/operation/activity/course" + }, + { + "path": "/operation/distribution", + "name": "DistributionManagement", + "meta": { + "title": "分销管理", + "icon": "mind-map", + "hidden": false, + "activeMenu": "/operation/distribution", + "menu": "/operation/distribution" + }, + "childrenNameList": ["DistributionManagement"] + }, + { + "path": "/operation/integral", + "name": "IntegralManagement", + "meta": { + "title": "积分管理", + "icon": "bubble-chart-fill", + "hidden": false, + "activeMenu": "/operation/integral", + "menu": "/operation/integral" + }, + "childrenNameList": ["IntegralManagement"] + }, + { + "path": "/operation/news", + "name": "GoodNewsManagement", + "meta": { + "title": "喜报管理", + "icon": "newspaper-fill", + "hidden": false, + "activeMenu": "/operation/news", + "menu": "/operation/news" + }, + "childrenNameList": ["GoodNewsManagement"] + }, + { + "path": "/operation/lottery", + "name": "LotteryActivity", + "meta": { + "title": "抽奖活动", + "icon": "star-smile-fill", + "hidden": false, + "activeMenu": "/operation/lottery", + "menu": "/operation/lottery" + }, + "childrenNameList": ["LotteryActivity"] + }, + { + "path": "/operation/marketing", + "name": "MarketingActivities", + "meta": { + "title": "咨询组管理", + "icon": "bar-chart-fill", + "hidden": false, + "activeMenu": "/operation/marketing", + "menu": "/operation/marketing" + }, + "children": [ + { + "path": "/operation/marketing/edit/:id?", + "name": "ActivityEdit", + "meta": { + "title": "编辑营销活动", + "icon": "bar-chart-fill", + "hidden": true, + "activeMenu": "/operation/marketing", + "menu": "/operation/marketing/edit" + }, + "childrenNameList": ["ActivityEdit"] + }, + { + "path": "/operation/marketing/logs/:id?", + "name": "MarketingLogs", + "meta": { + "title": "营销活动-数据", + "icon": "bar-chart-fill", + "hidden": true, + "activeMenu": "/operation/marketing", + "menu": "/operation/marketing/logs" + }, + "childrenNameList": ["MarketingLogs"] + } + ], + "childrenNameList": ["MarketingActivities", "ActivityEdit", "MarketingLogs"] + }, + { + "path": "/operation/promotion", + "name": "PromotionActivity", + "meta": { + "title": "弹窗活动配置", + "icon": "e-bike-2-fill", + "hidden": false, + "activeMenu": "/operation/promotion", + "menu": "/operation/promotion" + }, + "children": [ + { + "path": "/operation/promotion/detail/:id", + "name": "PromotionActivityDetail", + "meta": { + "title": "弹窗活动详情", + "icon": "e-bike-2-fill", + "hidden": true, + "activeMenu": "/operation/promotion", + "menu": "/operation/promotion/detail/:id" + }, + "childrenNameList": ["PromotionActivityDetail"] + } + ], + "childrenNameList": ["PromotionActivity", "PromotionActivityDetail"] + }, + { + "path": "/operation/landing", + "name": "LandingActivity", + "meta": { + "title": "落地页列表", + "icon": "arrow-left-right-fill", + "hidden": false, + "activeMenu": "/operation/landing", + "menu": "/operation/landing" + }, + "children": [ + { + "path": "/operation/landing/detail/:id", + "name": "LandingActivityDetail", + "meta": { + "title": "落地页详情", + "icon": "arrow-left-right-fill", + "hidden": true, + "activeMenu": "/operation/landing", + "menu": "/operation/landing/detail/:id" + }, + "childrenNameList": ["LandingActivityDetail"] + } + ], + "childrenNameList": ["LandingActivity", "LandingActivityDetail"] + }, + { + "path": "/operation/supernatant", + "name": "SupernatantActivity", + "meta": { + "title": "浮窗配置", + "icon": "bring-forward", + "hidden": false, + "activeMenu": "/operation/supernatant", + "menu": "/operation/supernatant" + }, + "children": [ + { + "path": "/operation/supernatant/detail/:id", + "name": "SupernatantActivityDetail", + "meta": { + "title": "浮窗详情", + "icon": "bring-forward", + "hidden": true, + "activeMenu": "/operation/supernatant", + "menu": "/operation/supernatant/detail/:id" + }, + "childrenNameList": ["SupernatantActivityDetail"] + } + ], + "childrenNameList": ["SupernatantActivity", "SupernatantActivityDetail"] + }, + { + "path": "/operation/survey", + "name": "Survey", + "meta": { + "title": "问卷调查", + "icon": "attachment-2", + "hidden": false, + "activeMenu": "/operation/survey", + "menu": "/operation/survey" + }, + "children": [ + { + "path": "/operation/survey/create/:paperId?", + "name": "SurveyCreate", + "meta": { + "title": "新增问卷", + "icon": "attachment-2", + "hidden": true, + "activeMenu": "/operation/survey", + "menu": "/operation/survey/create" + }, + "childrenNameList": ["SurveyCreate"] + }, + { + "path": "/operation/survey/statistics", + "name": "SurveyStatistics", + "meta": { + "title": "数据统计", + "icon": "attachment-2", + "hidden": true, + "activeMenu": "/operation/survey", + "menu": "/operation/survey/statistics" + }, + "childrenNameList": ["SurveyStatistics"] + } + ], + "childrenNameList": ["Survey", "SurveyCreate", "SurveyStatistics"] + } + ], + "childrenNameList": [ + "BannerManagement", + "CourseActivity", + "PosterShare", + "PunchActivity", + "DistributionManagement", + "IntegralManagement", + "GoodNewsManagement", + "LotteryActivity", + "MarketingActivities", + "ActivityEdit", + "MarketingLogs", + "PromotionActivity", + "PromotionActivityDetail", + "LandingActivity", + "LandingActivityDetail", + "SupernatantActivity", + "SupernatantActivityDetail", + "Survey", + "SurveyCreate", + "SurveyStatistics" + ], + "redirect": "/operation/banner" + }, + { + "path": "/finance", + "name": "Finance", + "meta": { + "title": "财务管理", + "icon": "money-cny-circle-fill", + "hidden": false, + "activeMenu": "/finance", + "menu": "/finance" + }, + "children": [ + { + "path": "/finance/order", + "name": "OrderManagement", + "meta": { + "title": "订单管理", + "icon": "auction-fill", + "hidden": false, + "activeMenu": "/finance/order", + "menu": "/finance/order" + }, + "childrenNameList": ["OrderManagement"] + }, + { + "path": "/finance/refund", + "name": "RefundManagement", + "meta": { + "title": "退款管理", + "icon": "refund-2-fill", + "hidden": false, + "activeMenu": "/finance/refund", + "menu": "/finance/refund" + }, + "childrenNameList": ["RefundManagement"] + }, + { + "path": "/finance/reconciliation", + "name": "FinanceReconciliation", + "meta": { + "title": "财务对账", + "icon": "money-dollar-box-fill", + "hidden": false, + "activeMenu": "/finance/reconciliation", + "menu": "/finance/reconciliation" + }, + "childrenNameList": ["FinanceReconciliation"] + } + ], + "childrenNameList": ["OrderManagement", "RefundManagement", "FinanceReconciliation"], + "redirect": "/finance/order" + }, + { + "path": "/user", + "name": "UserManagement", + "meta": { + "title": "用户管理", + "icon": "folder-user-fill", + "hidden": false, + "activeMenu": "/user", + "menu": "/user" + }, + "children": [ + { + "path": "/user/consult", + "name": "ConsultManagement", + "meta": { + "title": "咨询管理", + "icon": "kakao-talk-fill", + "hidden": false, + "activeMenu": "/user/consult", + "menu": "/user/consult" + }, + "childrenNameList": ["ConsultManagement"] + }, + { + "path": "/user/course", + "name": "CourseConsultManagement", + "meta": { + "title": "咨询课程", + "icon": "chat-smile-2-fill", + "hidden": false, + "activeMenu": "/user/course", + "menu": "/user/course" + }, + "childrenNameList": ["CourseConsultManagement"] + }, + { + "path": "/user/account", + "name": "AccountManagement", + "meta": { + "title": "账号课程", + "icon": "account-box-fill", + "hidden": false, + "activeMenu": "/user/account", + "menu": "/user/account" + }, + "childrenNameList": ["AccountManagement"] + }, + { + "path": "/user/feedback", + "name": "FeedbackManagement", + "meta": { + "title": "意见反馈", + "icon": "feedback-fill", + "hidden": false, + "activeMenu": "/user/feedback", + "menu": "/user/feedback" + }, + "childrenNameList": ["FeedbackManagement"] + } + ], + "childrenNameList": ["ConsultManagement", "CourseConsultManagement", "AccountManagement", "FeedbackManagement"], + "redirect": "/user/consult" + }, + { + "path": "/personal", + "name": "Personal", + "meta": { + "title": "个人面板", + "icon": "user-2-fill", + "hidden": false, + "activeMenu": "/personal", + "menu": "/personal" + }, + "children": [ + { + "path": "/personal/answer/:tab?/:teacherNo(\\d+)?", + "name": "MineAnswer", + "meta": { + "title": "我的答疑", + "icon": "question-answer-fill", + "hidden": false, + "activeMenu": "/personal/answer", + "menu": "/personal/answer" + }, + "childrenNameList": ["MineAnswer"] + }, + { + "path": "/personal/file", + "name": "MineFile", + "meta": { + "title": "我的文件", + "icon": "file-3-line", + "hidden": false, + "activeMenu": "/personal/file", + "menu": "/personal/file" + }, + "childrenNameList": ["MineFile"] + }, + { + "path": "/personal/data", + "name": "MineData", + "meta": { + "title": "数据面板", + "icon": "file-chart-line", + "hidden": false, + "activeMenu": "/personal/data", + "menu": "/personal/data" + }, + "childrenNameList": ["MineData"] + } + ], + "childrenNameList": ["MineAnswer", "MineFile", "MineData"], + "redirect": "/personal/answer" + }, + { + "path": "/system", + "name": "SystemManagement", + "meta": { + "title": "系统管理", + "icon": "settings-3-fill", + "hidden": false, + "activeMenu": "/system", + "menu": "/system" + }, + "children": [ + { + "path": "/system/log", + "name": "LogManagement", + "meta": { + "title": "日志管理", + "icon": "file-chart-fill", + "hidden": false, + "activeMenu": "/system/log", + "menu": "/system/log" + }, + "childrenNameList": ["LogManagement"] + }, + { + "path": "/system/app", + "name": "AppManagement", + "meta": { + "title": "APP包管理", + "icon": "app-store-fill", + "hidden": false, + "activeMenu": "/system/app", + "menu": "/system/app" + }, + "childrenNameList": ["AppManagement"] + }, + { + "path": "/system/notify", + "name": "NotifyManagement", + "meta": { + "title": "通知管理", + "icon": "alarm-warning-fill", + "hidden": false, + "activeMenu": "/system/notify", + "menu": "/system/notify" + }, + "childrenNameList": ["NotifyManagement"] + }, + { + "path": "/system/file", + "name": "FileManagement", + "meta": { + "title": "文件中台", + "icon": "file-copy-fill", + "hidden": false, + "activeMenu": "/system/file", + "menu": "/system/file" + }, + "childrenNameList": ["FileManagement"] + } + ], + "childrenNameList": ["LogManagement", "AppManagement", "NotifyManagement", "FileManagement"], + "redirect": "/system/log" + }, + { + "path": "/data", + "name": "DataCenter", + "meta": { + "title": "数据中心", + "icon": "database-fill", + "hidden": false, + "activeMenu": "/data", + "menu": "/data" + }, + "children": [ + { + "path": "/data/sales", + "name": "SalesDashboard", + "meta": { + "title": "销售大屏", + "icon": "table-fill", + "hidden": false, + "activeMenu": "/data/sales", + "menu": "/data/sales" + }, + "childrenNameList": ["SalesDashboard"] + }, + { + "path": "/data/form/:date", + "name": "CreateSalesDashboard", + "meta": { + "title": "新增销售目标", + "icon": "table-fill", + "hidden": true, + "activeMenu": "/data", + "menu": "/data/form/:date" + }, + "childrenNameList": ["CreateSalesDashboard"] + }, + { + "path": "/data/form/:id(\\d+)", + "name": "UpdateSalesDashboard", + "meta": { + "title": "编辑销售目标", + "icon": "table-fill", + "hidden": true, + "activeMenu": "/data", + "menu": "/data/form/:id(\\d+)" + }, + "childrenNameList": ["UpdateSalesDashboard"] + } + ], + "childrenNameList": ["SalesDashboard", "CreateSalesDashboard", "UpdateSalesDashboard"], + "redirect": "/data/sales" + } +] diff --git a/src/styles/base.less b/src/styles/base.less new file mode 100644 index 0000000..1193371 --- /dev/null +++ b/src/styles/base.less @@ -0,0 +1,13 @@ +html, +body, +#app { + width: 100vw; + height: 100vh; +} +// *:not([class^='el-']):not([class^='el-'] *) { +*:not([class^='el-']) { + margin: 0; + padding: 0; + transition: all 0.1s; + box-sizing: border-box; +} diff --git a/src/styles/globalVariables.module.less b/src/styles/globalVariables.module.less new file mode 100644 index 0000000..c3f3c5e --- /dev/null +++ b/src/styles/globalVariables.module.less @@ -0,0 +1,50 @@ +/* color */ +@color-black: #282c34; +@color-white: #fff; +@color-primary: #409eff; +@color-primary-white: #e8f4ff; + +@color-ghost-white: fade(@color-white, 10%); +@color-ghost-black: fade(@color-black, 10%); + +/* mixin */ +.text-overflow { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* layout */ +@layout-icon: 30px; +@layout-h1: 30px; +@layout-h2: 20px; +@layout-h3: 16px; +@layout-h4: 14px; +@layout-border-radius: 5px; +@layout-space: 10px; +@layout-space-small: 5px; +@layout-space-large: 15px; +@layout-space-super: 20px; +@layout-shadow: fade(@color-black, 20%) 0px 0px 5px; + +@layout-aside-bgc: @color-black; +@layout-aside-fc: @color-white; +@layout-aside-fc2: lighten(@color-black, 20%); +@layout-aside-width: 80px; +@layout-aside-item-size: 68px; + +@layout-menu-width: 200px; +@layout-menu-bgc: lighten(@color-black, 20%); +@layout-menu-fc: darken(@color-white, 20%); +@layout-menu-ic: darken(@color-white, 20%); +@layout-menu-hover-bgc: lighten(@color-black, 25%); +@layout-menu-hover-fc: darken(@color-white, 10%); +@layout-menu-active-fc: @color-white; +@layout-menu-active-bgc: lighten(@color-black, 35%); + +@layout-header-height: 68px; + +:export { + layoutAsideWidth: @layout-aside-width; + layoutLogoSize: calc(@layout-aside-item-size * 0.8); +} diff --git a/src/views/index.vue b/src/views/index.vue index b7e9f33..576e41e 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,14 +1,16 @@ @@ -24,4 +26,8 @@ }; - + diff --git a/vite.config.ts b/vite.config.ts index 9723510..fd46536 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -75,5 +75,12 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => { targets: ['defaults', 'not IE 11'], }), ], + css: { + preprocessorOptions: { + less: { + javascriptEnabled: true, + }, + }, + }, }; };