前端文件日期划分
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 根组件,定义应用顶层结构与全局样式入口
|
||||
@author D吕贺034244311
|
||||
@date 20260615
|
||||
-->
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
@Description 描述:
|
||||
@Author D吕贺034244311
|
||||
@Date 20260615
|
||||
-->
|
||||
/**
|
||||
* @description 申请模块 API 接口,定义申请提交与审核相关的请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
export function saveData(data) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 公共 API 接口模块,定义文件上传等通用请求接口
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
export function fetchList(url, query) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 图书管理 API 接口,定义图书增删改查的后端请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 系统配置 API 接口,定义配置参数的读写请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
// 获得用户协议详情,固定ID为0
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 字典管理 API 接口,定义字典数据的增删改查请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import {post} from '@/utils/request'
|
||||
|
||||
export function saveTypeData(data) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 公告管理 API 接口,定义公告发布与管理的请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
// 保存或更新公告信息
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 个人信息管理 API 接口,定义个人资料查看与修改请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
// 获取个人学生信息
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 还书管理 API 接口,定义还书操作与记录查询请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
// 还书
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 借书管理 API 接口,定义借书操作与记录查询请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 留存量管理 API 接口,定义留存量查询与设置请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
// 保存或更新公告信息
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 角色管理 API 接口,定义角色与权限操作的请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
export function fetchList() {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 统计模块 API 接口,定义数据统计与报表查询请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
export function sjkctj() {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 用户管理 API 接口,定义用户账号管理操作的请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
export function updateData(data) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 用户相关 API 接口,封装用户信息的查询与更新请求
|
||||
* @author D吕贺034244311
|
||||
* @date 20260619
|
||||
*/
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
export function login(data) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 回到顶部组件,页面滚动超过阈值后显示悬浮按钮
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<transition :name="transitionName">
|
||||
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 面包屑导航组件,根据当前路由自动生成层级导航
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 数据表格组件,封装 Element UI Table 的通用配置与交互
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 部门树形选择器,支持组织架构的层级选择
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<!-- 树状选择器 -->
|
||||
<template>
|
||||
<el-popover
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 错误日志展示组件,收集并展示前端运行时错误列表
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div v-if="errorLogs.length>0">
|
||||
<el-badge :is-dot="true" style="line-height: 25px;margin-top: -5px;" @click="dialogTableVisible=true">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 考试选择器组件,提供考试项目的下拉选择功能
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
|
||||
<el-select
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 文件上传组件,封装文件选择、上传进度与结果回调
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<file-upload-local v-model="fileUrl" :accept="accept" :tips="tips" :list-type="listType" />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 本地文件上传组件,支持文件直接选择与本地预览
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div class="content">
|
||||
<el-upload
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 汉堡菜单按钮组件,控制侧边栏的展开与折叠切换
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div style="padding: 0 15px;" @click="toggleClick">
|
||||
<svg
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 顶部搜索组件,支持页面路由的快速搜索与跳转
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div :class="{'show':show}" class="header-search">
|
||||
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 角色匹配组件,根据用户角色显示对应的功能入口
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
|
||||
<el-select
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 分页组件,封装页码导航、每页条数切换等通用逻辑
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div :class="{'hidden':hidden}" class="pagination-container">
|
||||
<el-pagination
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 缩略图展示组件,用于图片的卡片式预览展示
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item">
|
||||
<div class="pan-info">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 题库选择器组件,提供题库资源的下拉选择功能
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
|
||||
<el-select
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 右侧滑出面板组件,用于设置面板等侧滑内容的展示
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div ref="rightPanel" :class="{show:show}" class="rightPanel-container">
|
||||
<div class="rightPanel-background" />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 全屏切换组件,控制浏览器全屏模式的进入与退出
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 尺寸选择组件,切换 Element UI 组件的全局尺寸规格
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<el-dropdown trigger="click" @command="handleSetSize">
|
||||
<div>
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description SVG 图标组件,统一渲染项目中引用的 SVG 图标
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-bind="$attrs" />
|
||||
<svg v-else :class="svgClass" aria-hidden="true" v-bind="$attrs">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 主题颜色选择器,支持运行时动态更换应用主题色
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<el-color-picker
|
||||
v-model="theme"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 剪贴板指令逻辑实现,处理点击复制文本的交互行为
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
// Inspired by https://github.com/Inndy/vue-clipboard2
|
||||
const Clipboard = require('clipboard')
|
||||
if (!Clipboard) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 剪贴板指令注册入口,定义 v-clipboard 自定义指令
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import Clipboard from './clipboard'
|
||||
|
||||
const install = function(Vue) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 权限指令注册入口,定义 v-permission 自定义指令
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import permission from './permission'
|
||||
|
||||
const install = function(Vue) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 权限指令逻辑实现,根据用户角色控制 DOM 元素的显示
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import store from '@/store'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 粘性定位指令,实现元素滚动到指定位置后固定悬浮的效果
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
const vueSticky = {}
|
||||
let listenAction
|
||||
vueSticky.install = app => {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 水波纹指令注册入口,定义 v-waves 自定义指令
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import waves from './waves'
|
||||
|
||||
const install = function(Vue) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/* ========================================
|
||||
* @description 水波纹动画样式,定义涟漪扩散的 CSS 关键帧
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
* ======================================== */
|
||||
.waves-ripple {
|
||||
position: absolute;
|
||||
border-radius: 100%;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 水波纹指令逻辑实现,为元素添加点击涟漪动画效果
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import './waves.css'
|
||||
|
||||
const context = '@@wavesContext'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 全局过滤器注册模块,定义日期格式化等通用 Vue 过滤器
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
// import parseTime, formatTime and set to filter
|
||||
export { parseTime, formatTime } from '@/utils'
|
||||
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
/**
|
||||
* @description SVG 图标注册模块,批量导入 SVG 文件并注册为全局可用图标
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
import 'virtual:svg-icons-register'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 主内容区域组件,承载路由视图的渲染与过渡动画
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<section class="app-main">
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 顶部导航栏组件,包含面包屑、全屏切换、用户菜单等
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 系统设置面板,提供主题色、侧边栏模式等运行时配置
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div class="drawer-container">
|
||||
<div>
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description iOS 滚动 Bug 修复混入,解决侧边栏在 iOS 设备上的兼容问题
|
||||
* @author D吕贺034244311
|
||||
* @date 20260616
|
||||
*/
|
||||
export default {
|
||||
computed: {
|
||||
device() {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 侧边栏菜单项组件,递归渲染图标与标题
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<svg-icon v-if="icon" :icon-class="icon" />
|
||||
<span v-if="title">{{ title }}</span>
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 侧边栏链接组件,根据路由类型生成内部链接或外部链接
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
|
||||
<template>
|
||||
<a v-if="isExternal" :href="to" target="_blank" rel="noopener">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 侧边栏 Logo 组件,展示系统标识与品牌图标
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div :class="{'collapse':collapse}" class="sidebar-logo-container">
|
||||
<transition name="sidebarLogoFade">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 侧边栏菜单递归组件,支持多级嵌套菜单的渲染
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div v-if="!item.hidden" class="menu-wrapper">
|
||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 侧边栏容器组件,管理导航菜单的渲染与折叠状态
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div :class="{'has-logo':showLogo}">
|
||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 标签页横向滚动容器,支持鼠标滚轮与拖拽滚动
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.prevent="handleScroll">
|
||||
<slot />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 标签页导航视图,实现多页签切换与右键菜单操作
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div id="tags-view-container" class="tags-view-container">
|
||||
<scroll-pane ref="scrollPane" class="tags-view-wrapper">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 布局子组件统一导出模块
|
||||
* @author D吕贺034244311
|
||||
* @date 20260616
|
||||
*/
|
||||
export { default as AppMain } from './AppMain.vue'
|
||||
export { default as Navbar } from './Navbar.vue'
|
||||
export { default as Settings } from './Settings/index.vue'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 主布局组件,整合侧边栏、导航栏、标签页视图与主内容区
|
||||
@author D吕贺034244311
|
||||
@date 20260616
|
||||
-->
|
||||
<template>
|
||||
<div :class="classObj" class="app-wrapper">
|
||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 窗口尺寸响应混入,自动切换侧边栏的展开/折叠状态
|
||||
* @author D吕贺034244311
|
||||
* @date 20260616
|
||||
*/
|
||||
import store from '@/store'
|
||||
|
||||
const { body } = document
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description Vue 应用入口,初始化 Vue 实例、注册全局插件与配置
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
import { createApp } from 'vue'
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 全局路由守卫,控制页面访问权限与动态路由加载
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 路由配置模块,定义应用所有页面的路由映射与导航守卫
|
||||
* @author D吕贺034244311
|
||||
* @date 20260620
|
||||
*/
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
// 主要框架
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 全局应用配置,定义标题、主题、侧边栏、导航等基础设定
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
export default {
|
||||
title: '图书管理系统-陈昊东',
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description Vuex 全局 Getters 定义,提供跨模块的便捷状态访问器
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
const getters = {
|
||||
sidebar: state => state.app.sidebar,
|
||||
size: state => state.app.size,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description Vuex Store 入口,注册所有状态模块并创建全局状态管理实例
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import { createStore } from 'vuex'
|
||||
import getters from './getters'
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 应用状态模块,管理侧边栏折叠状态、设备类型等全局 UI 状态
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
const state = {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 错误日志状态模块,存储与管理前端错误日志记录
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
const state = {
|
||||
logs: []
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 权限状态模块,根据用户角色动态生成可访问的路由列表
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import { asyncRoutes, constantRoutes } from '@/router'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 设置状态模块,管理主题色、布局模式等用户偏好设置
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import defaultSettings from '@/settings'
|
||||
import { fetchDetail } from '@/api/sys/config/config.js'
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 标签页状态模块,管理已打开页面标签的增删改查
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
const state = {
|
||||
visitedViews: [],
|
||||
cachedViews: []
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 用户状态模块,管理用户信息、Token、角色与登录/登出逻辑
|
||||
* @author D吕贺034244311
|
||||
* @date 20260617
|
||||
*/
|
||||
import { login, reg, logout, getInfo } from '@/api/user'
|
||||
import { initDict } from '@/api/sys/dict/dict'
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description 按钮样式扩展,定义各类按钮变体的 SCSS 样式
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
@import './variables.scss';
|
||||
|
||||
@mixin colorBtn($color) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description Element UI 组件样式覆盖与定制
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
// cover some element-ui styles
|
||||
|
||||
.el-breadcrumb__inner,
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description Element UI 主题变量定义,覆盖默认配色方案
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
/**
|
||||
* Element Plus theme variables
|
||||
**/
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description 全局样式入口,汇总引入所有 SCSS 样式模块
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
@import './variables.scss';
|
||||
@import './mixin.scss';
|
||||
@import './transition.scss';
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description 登录页专属样式,定义登录界面布局与视觉效果
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
.login-box {
|
||||
width: 400px;
|
||||
background: #fff;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description SCSS Mixin 集合,提供响应式断点、清除浮动等可复用混入
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
@mixin clearfix {
|
||||
&:after {
|
||||
content: "";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description 侧边栏样式,定义导航菜单的展开、折叠与响应式布局
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
#app {
|
||||
|
||||
.main-container {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description 过渡动画样式,定义页面切换、侧边栏展开等 CSS 过渡效果
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
// global transition css
|
||||
|
||||
/* fade */
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description SCSS 变量 JS 导出模块,将样式变量桥接到 JavaScript 中使用
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
// Variables exported as JS object for Vite compatibility
|
||||
// Original source: variables.scss :export block
|
||||
export default {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ========================================
|
||||
// @description 全局 SCSS 变量定义,包含颜色、尺寸、间距等设计令牌
|
||||
// @author D吕贺034244311
|
||||
// @date 20260615
|
||||
// ========================================
|
||||
// base color
|
||||
$blue:#324157;
|
||||
$light-blue:#3A71A8;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 认证工具函数,处理 Token 的读写与清除(基于 Cookies)
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
const TokenKey = 'Admin-Token'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 剪贴板工具,封装文本复制到系统剪贴板的功能
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import Clipboard from 'clipboard'
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 全局错误日志采集,捕获 JS 运行时异常与 Vue 组件错误
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
import { getCurrentInstance } from 'vue'
|
||||
import store from '@/store'
|
||||
import { isString, isArray } from '@/utils/validate'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 页面标题生成器,根据路由 meta 信息动态设置 document.title
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
export default function getPageTitle(title, pageTitle) {
|
||||
if (pageTitle) {
|
||||
return `${pageTitle} - ${title}`
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 通用工具集,提供日期格式化、深拷贝、防抖、类型判断等基础函数
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
/**
|
||||
* Created by PanJiaChen on 16/11/18.
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 新窗口打开工具,封装 window.open 并处理兼容性
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
/**
|
||||
*Created by PanJiaChen on 16/11/29.
|
||||
* @param {Sting} url
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 路径处理工具,提供路径拼接与解析功能
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
/**
|
||||
* 简易路径解析工具,替代 Node.js path 模块(Vite 不提供 Node polyfill)
|
||||
* 用法: resolve('/sys', 'config') => '/sys/config'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 权限判断工具,校验当前用户是否拥有指定操作权限
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
import store from '@/store'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description HTTP 请求封装,基于 axios 统一处理请求拦截、响应拦截与错误提示
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
import axios from 'axios'
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus'
|
||||
import store from '@/store'
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 平滑滚动工具,实现页面或元素的动画滚动效果
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
Math.easeInOutQuad = function(t, b, c, d) {
|
||||
t /= d / 2
|
||||
if (t < 1) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @description 表单验证工具集,提供邮箱、URL、手机号等正则校验函数
|
||||
* @author D吕贺034244311
|
||||
* @date 20260615
|
||||
*/
|
||||
/**
|
||||
* Created by PanJiaChen on 16/11/18.
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 申请录入页面,实现申请信息的表单填写与提交
|
||||
@author D吕贺034244311
|
||||
@date 20260619
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<data-table ref="pagingTable" :options="options" :list-query="listQuery" @multi-actions="handleMultiAction">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 仪表盘首页,展示系统概览数据与快捷操作入口
|
||||
@author D吕贺034244311
|
||||
@date 20260620
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 错误日志测试组件 A,用于模拟触发前端异常
|
||||
@author D吕贺034244311
|
||||
@date 20260620
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<!--error code-->
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 错误日志测试组件 B,用于模拟触发 Vue 组件渲染错误
|
||||
@author D吕贺034244311
|
||||
@date 20260620
|
||||
-->
|
||||
<template>
|
||||
<div />
|
||||
</template>
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 错误日志查看页面,展示前端运行时错误的详细信息
|
||||
@author D吕贺034244311
|
||||
@date 20260620
|
||||
-->
|
||||
<template>
|
||||
<div class="errPage-container">
|
||||
<ErrorA />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 401 未授权错误页面,展示无权限访问时的提示信息
|
||||
@author D吕贺034244311
|
||||
@date 20260620
|
||||
-->
|
||||
<template>
|
||||
<div class="errPage-container">
|
||||
<el-button class="pan-back-btn" @click="back">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 404 页面未找到错误页,展示路由不存在时的提示与导航
|
||||
@author D吕贺034244311
|
||||
@date 20260620
|
||||
-->
|
||||
<template>
|
||||
<div class="wscn-http404-container">
|
||||
<div class="wscn-http404">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 登录页布局组件,定义登录区域的背景与容器结构
|
||||
@author D吕贺034244311
|
||||
@date 20260617
|
||||
-->
|
||||
<template>
|
||||
|
||||
<div class="login-container">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<!--
|
||||
@description 登录页面,实现用户名密码登录表单与认证交互逻辑
|
||||
@author D吕贺034244311
|
||||
@date 20260617
|
||||
-->
|
||||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user