parent
a263a36692
commit
30cd6b483d
@ -1 +0,0 @@
|
|||||||
export default [];
|
|
@ -0,0 +1,286 @@
|
|||||||
|
export default [
|
||||||
|
{
|
||||||
|
path: '/education',
|
||||||
|
name: 'Education',
|
||||||
|
component: () => import('@/layouts/default.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '教务教学',
|
||||||
|
icon: 'book-open-fill',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'teacher',
|
||||||
|
name: 'TeacherManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '老师管理',
|
||||||
|
icon: 'user-shared-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'student',
|
||||||
|
name: 'StudentManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '学生管理',
|
||||||
|
icon: 'user-received-fill',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'list',
|
||||||
|
name: 'StudentManagementList',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '学生列表',
|
||||||
|
icon: 'user-received-line',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'grade',
|
||||||
|
name: 'GradeManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '年级管理',
|
||||||
|
icon: 'account-pin-box-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'class',
|
||||||
|
name: 'ClassManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '班级管理',
|
||||||
|
icon: 'account-pin-circle-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'admission',
|
||||||
|
name: 'AdmissionManagement',
|
||||||
|
component: () => import('@/views/global/home.vue'),
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '入学',
|
||||||
|
icon: 'award-fill',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'evaluation',
|
||||||
|
name: 'AdmissionEvaluation',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '入学评测',
|
||||||
|
icon: 'file-paper-2-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'way',
|
||||||
|
name: 'StudyWay',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '学习路线',
|
||||||
|
icon: 'send-plane-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'answer',
|
||||||
|
name: 'Answer',
|
||||||
|
component: () => import('@/views/global/home.vue'),
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '答疑',
|
||||||
|
icon: 'question-answer-fill',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'management',
|
||||||
|
name: 'AnswerManagement',
|
||||||
|
component: () => import('@/views/global/home.vue'),
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '答疑管理',
|
||||||
|
icon: 'question-answer-fill',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'list',
|
||||||
|
name: 'AnswerManagementList',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '答疑管理列表',
|
||||||
|
icon: 'question-answer-line',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'invalid',
|
||||||
|
name: 'InvalidQuestionManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '无效追问管理',
|
||||||
|
icon: 'questionnaire-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'lock',
|
||||||
|
name: 'UserLockManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '用户锁定管理',
|
||||||
|
icon: 'lock-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'assign/:questionId',
|
||||||
|
name: 'AssignAnswerTeacher',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '指派老师',
|
||||||
|
icon: 'account-box-fill',
|
||||||
|
hidden: true,
|
||||||
|
activeMenu: '/education/answer/management',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'teacher',
|
||||||
|
name: 'AnswerTeacher',
|
||||||
|
component: () => import('@/views/global/home.vue'),
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '答疑老师管理',
|
||||||
|
icon: 'book-line',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'summary',
|
||||||
|
name: 'AnswerTeacherSummary',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '答疑老师统计',
|
||||||
|
icon: 'book-2-line',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'management',
|
||||||
|
name: 'AnswerTeacherManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '答疑老师管理',
|
||||||
|
icon: 'book-3-line',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'bind/:teacher?',
|
||||||
|
name: 'AnswerTeacherUpdateBind',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '编辑课程绑定',
|
||||||
|
icon: 'book-fill',
|
||||||
|
hidden: true,
|
||||||
|
activeMenu: '/education/answer/teacher/management',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'course',
|
||||||
|
name: 'AnswerTeacherBindCourse',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '绑定课程管理',
|
||||||
|
icon: 'book-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'question',
|
||||||
|
name: 'QuestionManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '题库管理',
|
||||||
|
icon: 'brush-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'note',
|
||||||
|
name: 'NoteManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '笔记管理',
|
||||||
|
icon: 'sticky-note-2-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'research',
|
||||||
|
name: 'CourseResearch',
|
||||||
|
component: () => import('@/views/global/home.vue'),
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '课研更新',
|
||||||
|
icon: 'contacts-book-upload-fill',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'plan',
|
||||||
|
name: 'CourseResearchPlan',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '课研计划',
|
||||||
|
icon: 'contacts-book-upload-line',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'log',
|
||||||
|
name: 'CourseResearchLog',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '课研更新日志',
|
||||||
|
icon: 'file-copy-2-line',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'live',
|
||||||
|
name: 'LiveManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '直播管理',
|
||||||
|
icon: 'live-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'material',
|
||||||
|
name: 'MaterialManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '老师资料管理',
|
||||||
|
icon: 'database-2-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'shift',
|
||||||
|
name: 'ShiftTable',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '排班表',
|
||||||
|
icon: 'calendar-check-line',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'course',
|
||||||
|
name: 'CourseTable',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '课程表管理',
|
||||||
|
icon: 'calendar-todo-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,49 @@
|
|||||||
|
export default [
|
||||||
|
{
|
||||||
|
path: '/system',
|
||||||
|
name: 'SystemManagement',
|
||||||
|
component: () => import('@/layouts/default.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '系统管理',
|
||||||
|
icon: 'settings-3-fill',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'log',
|
||||||
|
name: 'LogManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '日志管理',
|
||||||
|
icon: 'file-chart-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'app',
|
||||||
|
name: 'AppManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: 'APP包管理',
|
||||||
|
icon: 'app-store-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'notify',
|
||||||
|
name: 'NotifyManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '通知管理',
|
||||||
|
icon: 'alarm-warning-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'file',
|
||||||
|
name: 'FileManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '文件中台',
|
||||||
|
icon: 'file-copy-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,49 @@
|
|||||||
|
export default [
|
||||||
|
{
|
||||||
|
path: '/user',
|
||||||
|
name: 'UserManagement',
|
||||||
|
component: () => import('@/layouts/default.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '用户管理',
|
||||||
|
icon: 'folder-user-fill',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'consult',
|
||||||
|
name: 'ConsultManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '咨询管理',
|
||||||
|
icon: 'kakao-talk-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'course',
|
||||||
|
name: 'CourseConsultManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '咨询课程',
|
||||||
|
icon: 'chat-smile-2-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'account',
|
||||||
|
name: 'AccountManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '账号课程',
|
||||||
|
icon: 'account-box-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'feedback',
|
||||||
|
name: 'FeedbackManagement',
|
||||||
|
component: () => import('@/views/home/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '意见反馈',
|
||||||
|
icon: 'feedback-fill',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,24 @@
|
|||||||
|
import { routes } from '@/router';
|
||||||
|
const state = () => ({
|
||||||
|
activeAside: null,
|
||||||
|
activeMenu: null,
|
||||||
|
});
|
||||||
|
const getters = {
|
||||||
|
asideList: () => {
|
||||||
|
const deep = (arr) =>
|
||||||
|
arr.flatMap((item) => (item.meta?.layout ? deep(item.children || []) : item.meta?.global ? [] : item));
|
||||||
|
return deep(routes);
|
||||||
|
},
|
||||||
|
menuList: (state, getters) => getters.asideList.find((item) => item.name === state.activeAside)?.children || [],
|
||||||
|
};
|
||||||
|
const mutations = {
|
||||||
|
setActiveAside: (state, data) => (state.activeAside = data),
|
||||||
|
setActiveMenu: (state, data) => (state.activeMenu = data),
|
||||||
|
};
|
||||||
|
const actions = {};
|
||||||
|
export default {
|
||||||
|
state,
|
||||||
|
getters,
|
||||||
|
mutations,
|
||||||
|
actions,
|
||||||
|
};
|
@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="box">
|
||||||
|
<h1 class="title">404</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const store = useStore();
|
||||||
|
|
||||||
|
const refsForm = ref(null);
|
||||||
|
const loading = ref(false);
|
||||||
|
const form = reactive({
|
||||||
|
phone: '',
|
||||||
|
password: '',
|
||||||
|
verifyCode: '',
|
||||||
|
});
|
||||||
|
const lastTime = computed(() => store.state.local.lastSendMessageTime);
|
||||||
|
const waitTime = ref(60);
|
||||||
|
const sendStep = ref(60);
|
||||||
|
const rules = reactive({
|
||||||
|
phone: [{ required: true, message: '请输入手机号码' }],
|
||||||
|
password: [{ required: true, message: '请输入登录密码' }],
|
||||||
|
verifyCode: [{ required: true, message: '请输入验证码' }],
|
||||||
|
});
|
||||||
|
|
||||||
|
waitTime.value = Math.max(0, unref(sendStep) - Math.ceil((new Date().getTime() - unref(lastTime)) / 1000));
|
||||||
|
setInterval(() => {
|
||||||
|
waitTime.value = Math.max(0, unref(sendStep) - Math.ceil((new Date().getTime() - unref(lastTime)) / 1000));
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
const handleSms = async () => {
|
||||||
|
if (form.phone) {
|
||||||
|
loading.value = true;
|
||||||
|
await store.dispatch('auth/sms', { phone: form.phone, type: 1 });
|
||||||
|
loading.value = false;
|
||||||
|
} else {
|
||||||
|
proxy.$message.warning('请输入手机号码');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleLogin = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
try {
|
||||||
|
await unref(refsForm).validate();
|
||||||
|
await store.dispatch('auth/login', form);
|
||||||
|
} catch (e) {
|
||||||
|
console.info('取消登录', e);
|
||||||
|
}
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.container {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background: #000 url('~/global/login-bgp.png') center center / 100% 100% no-repeat;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: @color-white;
|
||||||
|
.box {
|
||||||
|
width: 420px;
|
||||||
|
padding: 30px;
|
||||||
|
background: #1a2229;
|
||||||
|
border-radius: 10px;
|
||||||
|
.title {
|
||||||
|
font-size: 48px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue