暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

基于 SpringBoot + Vue3.2 + Element Plus 的后台管理系统

全栈客 2021-12-28
472

简介

TANSCI 基于 SpringBoot + Vue3.2 + Element Plus 的后台管理系统。

包含基础模块:菜单管理、角色管理、组织管理、用户管理、字典管理、日志管理(操作日志、异常日志)

Gitee: https://gitee.com/typ1805/tansci

架构

技术栈

1、环境要求

名称版本号描述
JDK1.8+强制要求
mysql5.7+数据库
node14.16+前端环境要求
npm6.14+前端框架包管理
Nginx1.16+请求转发、反向代理
Maven3.8+项目构建,管理
Git2.14+项目版本管理

2、后端技术

名称版本号描述
SpringBoot2.6.1整体架构基础
Mybatis Plus3.4.3.1数据层
Druid1.2.6连接池
Spring Security--权限认证
Fastjson1.2.75--
JJWT0.9.0安全认证
Lombok----

3、前端技术

名称版本号描述
vue3.2.16整体架构基础
element-plus1.2.0-beta.6UI
vue-router4.0.12路由
vuex4.0.2状态管理模式
vue3-echarts1.0.3echarts图表
axios0.24.0基于promise的HTTP库
nprogress0.2.0--
less4.1.2--

示例组件

1、el-table 封装

1.1、示例

    import Table from '../../components/Table.vue'

复制

1.2、可参考 tansci-view/src/views/system/User.vue

    <Table :data="tableData" :column="tableTitle" :operation="true" :tableHeight="tableHeight" :page="page" :loading="loading"
@onSizeChange="onSizeChange" @onCurrentChange="onCurrentChange" @setCellColor="setCellColor">
<template #search>
</template>
<template #column="scope">
</template>
</Table>

复制

1.3、Props及事件说明

参数说明默认值
loading加载动画false
page分页参数{ current: 1, size: 10, total: 0}
column字段集合Array
operation操作列自定义插槽
tableHeighttable高度520px
headerCellStyle表头单元格的 style 的回调方法原 header-cell-style
data数据集合Array
tree-props树形数据{children: 'children', hasChildren: 'hasChildren'}
onSizeChangepageSize 改变时触发原 size-change
onCurrentChangecurrent-change 改变时触发原 current-change
onSelectionChange当选择项发生变化时会触发该事件原 selection-change
setCellColor单元格的 style 的回调方法原 cell-style
onButtonClick当column的type="button"时的click事件--
onSwitchChange当column的type="switch"时的change事件--

1.4、column 配置说明

参数说明默认值
prop字段名称String
label展示值String
alias列字典值名称展示String
type展示类型:button、tag、switch、progress属性配置和element属性一致
option对type进行属性配置element属性一致
tooltip当内容过长被隐藏时显示false
width对应列的宽度string number
align对齐方式:left、center、left
fixed列是否固定在左侧或者右侧:true 、'left'、'right'--

1.5、插槽

参数说明默认值
search筛选条件插槽<template #search>
columntable操作列插槽,operation为true时生效<template #column="scope">

2、接口日志记录

2.1、使用 @Log

  • modul: 操作模块
  • type: 操作类型
  • desc: 操作说明

2.2、示例

    @Log(modul = "数据字典-列表", type = Constants.SELECT, desc = "列表")
@GetMapping("/dicList")
public Wrapper<List<SysDic>> dicList(SysDicDto dto) {
return WrapMapper.wrap(Wrapper.SUCCESS_CODE, Wrapper.SUCCESS_MESSAGE, sysDicService.dicList(dto));
}

复制

项目预览

欢迎关注



文章转载自全栈客,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论