Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Elij4h
gin-vue-admin
提交
5629ad96
G
gin-vue-admin
项目概览
Elij4h
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5629ad96
编写于
4月 07, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提出api中的model到单独model分组 修改dashboard 拼写错误
上级
6864557d
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
106 addition
and
85 deletion
+106
-85
server/api/v1/exa_customer.go
server/api/v1/exa_customer.go
+4
-4
server/api/v1/exa_file_upload_download.go
server/api/v1/exa_file_upload_download.go
+1
-1
server/api/v1/sys_api.go
server/api/v1/sys_api.go
+7
-13
server/api/v1/sys_authority.go
server/api/v1/sys_authority.go
+3
-3
server/api/v1/sys_auto_code.go
server/api/v1/sys_auto_code.go
+1
-1
server/api/v1/sys_casbin.go
server/api/v1/sys_casbin.go
+3
-3
server/api/v1/sys_menu.go
server/api/v1/sys_menu.go
+10
-27
server/api/v1/sys_system.go
server/api/v1/sys_system.go
+2
-2
server/api/v1/sys_user.go
server/api/v1/sys_user.go
+7
-18
server/model/http_request.go
server/model/http_request.go
+1
-0
server/model/http_response.go
server/model/http_response.go
+60
-0
server/model/sys_common.go
server/model/sys_common.go
+0
-6
web/src/permission.js
web/src/permission.js
+1
-1
web/src/store/module/user.js
web/src/store/module/user.js
+1
-1
web/src/view/dashboard/index.vue
web/src/view/dashboard/index.vue
+1
-1
web/src/view/layout/aside/historyComponent/history.vue
web/src/view/layout/aside/historyComponent/history.vue
+4
-4
未找到文件。
server/api/v1/exa_customer.go
浏览文件 @
5629ad96
...
...
@@ -13,7 +13,7 @@ import (
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
dbM
odel.ExaCustomer true "创建客户"
// @Param data body
m
odel.ExaCustomer true "创建客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/createExaCustomer [post]
func
CreateExaCustomer
(
c
*
gin
.
Context
)
{
...
...
@@ -36,7 +36,7 @@ func CreateExaCustomer(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
dbM
odel.ExaCustomer true "删除客户"
// @Param data body
m
odel.ExaCustomer true "删除客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/deleteExaCustomer [post]
func
DeleteExaCustomer
(
c
*
gin
.
Context
)
{
...
...
@@ -55,7 +55,7 @@ func DeleteExaCustomer(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
dbM
odel.ExaCustomer true "创建客户"
// @Param data body
m
odel.ExaCustomer true "创建客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/updateExaCustomer [post]
func
UpdateExaCustomer
(
c
*
gin
.
Context
)
{
...
...
@@ -74,7 +74,7 @@ func UpdateExaCustomer(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
dbM
odel.ExaCustomer true "获取单一客户信息"
// @Param data body
m
odel.ExaCustomer true "获取单一客户信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/getExaCustomer [post]
func
GetExaCustomer
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/exa_file_upload_download.go
浏览文件 @
5629ad96
...
...
@@ -52,7 +52,7 @@ func UploadFile(c *gin.Context) {
// @Summary 删除文件
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body
dbM
odel.ExaFileUploadAndDownload true "传入文件里面id即可"
// @Param data body
m
odel.ExaFileUploadAndDownload true "传入文件里面id即可"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /fileUploadAndDownload/deleteFile [post]
func
DeleteFile
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/sys_api.go
浏览文件 @
5629ad96
...
...
@@ -12,7 +12,7 @@ import (
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
api.CreateApiParams
true "创建api"
// @Param data body
model.SysApi
true "创建api"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/createApi [post]
func
CreateApi
(
c
*
gin
.
Context
)
{
...
...
@@ -31,7 +31,7 @@ func CreateApi(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.SysApi true "删除api"
// @Param data body
m
odel.SysApi true "删除api"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/deleteApi [post]
func
DeleteApi
(
c
*
gin
.
Context
)
{
...
...
@@ -52,18 +52,12 @@ func DeleteApi(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.
PageInfo
true "分页获取API列表"
// @Param data body model.
SearchApiParams
true "分页获取API列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getApiList [post]
func
GetApiList
(
c
*
gin
.
Context
)
{
// 此结构体仅本方法使用
type
searchParams
struct
{
model
.
SysApi
model
.
PageInfo
OrderKey
string
`json:"orderKey"`
Desc
bool
`json:"desc"`
}
var
sp
searchParams
var
sp
model
.
SearchApiParams
_
=
c
.
ShouldBindJSON
(
&
sp
)
err
,
list
,
total
:=
sp
.
SysApi
.
GetInfoList
(
sp
.
PageInfo
,
sp
.
OrderKey
,
sp
.
Desc
)
if
err
!=
nil
{
...
...
@@ -83,11 +77,11 @@ func GetApiList(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.
PageInfo true "分页获取用户列表
"
// @Param data body model.
GetById true "根据id获取api
"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getApiById [post]
func
GetApiById
(
c
*
gin
.
Context
)
{
var
idInfo
GetById
var
idInfo
model
.
GetById
_
=
c
.
ShouldBindJSON
(
&
idInfo
)
err
,
api
:=
new
(
model
.
SysApi
)
.
GetApiById
(
idInfo
.
Id
)
if
err
!=
nil
{
...
...
@@ -105,7 +99,7 @@ func GetApiById(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
api.CreateApiParams
true "创建api"
// @Param data body
model.SysApi
true "创建api"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/updateApi [post]
func
UpdateApi
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/sys_authority.go
浏览文件 @
5629ad96
...
...
@@ -12,7 +12,7 @@ import (
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.SysAuthority true "创建角色"
// @Param data body
m
odel.SysAuthority true "创建角色"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /authority/createAuthority [post]
func
CreateAuthority
(
c
*
gin
.
Context
)
{
...
...
@@ -33,7 +33,7 @@ func CreateAuthority(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.SysAuthority true "删除角色"
// @Param data body
m
odel.SysAuthority true "删除角色"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /authority/deleteAuthority [post]
func
DeleteAuthority
(
c
*
gin
.
Context
)
{
...
...
@@ -77,7 +77,7 @@ func GetAuthorityList(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.SysAuthority true "设置角色资源权限"
// @Param data body
m
odel.SysAuthority true "设置角色资源权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /authority/setDataAuthority [post]
func
SetDataAuthority
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/sys_auto_code.go
浏览文件 @
5629ad96
...
...
@@ -13,7 +13,7 @@ import (
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
autoCodeM
odel.AutoCodeStruct true "创建自动代码"
// @Param data body
m
odel.AutoCodeStruct true "创建自动代码"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /autoCode/createTemp [post]
func
CreateTemp
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/sys_casbin.go
浏览文件 @
5629ad96
...
...
@@ -12,7 +12,7 @@ import (
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.CasbinInReceive true "更改角色api权限"
// @Param data body
m
odel.CasbinInReceive true "更改角色api权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/UpdateCasbin [post]
func
UpdateCasbin
(
c
*
gin
.
Context
)
{
...
...
@@ -31,7 +31,7 @@ func UpdateCasbin(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.CasbinInReceive true "获取权限列表"
// @Param data body
m
odel.CasbinInReceive true "获取权限列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/getPolicyPathByAuthorityId [post]
func
GetPolicyPathByAuthorityId
(
c
*
gin
.
Context
)
{
...
...
@@ -46,7 +46,7 @@ func GetPolicyPathByAuthorityId(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.CasbinInReceive true "获取权限列表"
// @Param data body
m
odel.CasbinInReceive true "获取权限列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/CasbinTest [get]
func
CasbinTest
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/sys_menu.go
浏览文件 @
5629ad96
...
...
@@ -55,7 +55,7 @@ func GetMenuList(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.SysBaseMenu true "新增菜单"
// @Param data body
m
odel.SysBaseMenu true "新增菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addBaseMenu [post]
func
AddBaseMenu
(
c
*
gin
.
Context
)
{
...
...
@@ -86,21 +86,16 @@ func GetBaseMenuTree(c *gin.Context) {
}
}
type
AddMenuAuthorityInfo
struct
{
Menus
[]
model
.
SysBaseMenu
AuthorityId
string
}
// @Tags authorityAndMenu
// @Summary 增加menu和角色关联关系
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
api
.AddMenuAuthorityInfo true "增加menu和角色关联关系"
// @Param data body
model
.AddMenuAuthorityInfo true "增加menu和角色关联关系"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addMenuAuthority [post]
func
AddMenuAuthority
(
c
*
gin
.
Context
)
{
var
addMenuAuthorityInfo
AddMenuAuthorityInfo
var
addMenuAuthorityInfo
model
.
AddMenuAuthorityInfo
_
=
c
.
ShouldBindJSON
(
&
addMenuAuthorityInfo
)
err
:=
new
(
model
.
SysMenu
)
.
AddMenuAuthority
(
addMenuAuthorityInfo
.
Menus
,
addMenuAuthorityInfo
.
AuthorityId
)
...
...
@@ -111,20 +106,16 @@ func AddMenuAuthority(c *gin.Context) {
}
}
type
AuthorityIdInfo
struct
{
AuthorityId
string
}
// @Tags authorityAndMenu
// @Summary 获取指定角色menu
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
api
.AuthorityIdInfo true "增加menu和角色关联关系"
// @Param data body
model
.AuthorityIdInfo true "增加menu和角色关联关系"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/GetMenuAuthority [post]
func
GetMenuAuthority
(
c
*
gin
.
Context
)
{
var
authorityIdInfo
AuthorityIdInfo
var
authorityIdInfo
model
.
AuthorityIdInfo
_
=
c
.
ShouldBindJSON
(
&
authorityIdInfo
)
err
,
menus
:=
new
(
model
.
SysMenu
)
.
GetMenuAuthority
(
authorityIdInfo
.
AuthorityId
)
if
err
!=
nil
{
...
...
@@ -134,20 +125,16 @@ func GetMenuAuthority(c *gin.Context) {
}
}
type
IdInfo
struct
{
Id
float64
}
// @Tags menu
// @Summary 删除菜单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
api.IdInfo
true "删除菜单"
// @Param data body
model.GetById
true "删除菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/deleteBaseMenu [post]
func
DeleteBaseMenu
(
c
*
gin
.
Context
)
{
var
idInfo
IdInfo
var
idInfo
model
.
GetById
_
=
c
.
ShouldBindJSON
(
&
idInfo
)
err
:=
new
(
model
.
SysBaseMenu
)
.
DeleteBaseMenu
(
idInfo
.
Id
)
if
err
!=
nil
{
...
...
@@ -163,7 +150,7 @@ func DeleteBaseMenu(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
sysM
odel.SysBaseMenu true "更新菜单"
// @Param data body
m
odel.SysBaseMenu true "更新菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/updateBaseMenu [post]
func
UpdateBaseMenu
(
c
*
gin
.
Context
)
{
...
...
@@ -177,20 +164,16 @@ func UpdateBaseMenu(c *gin.Context) {
}
}
type
GetById
struct
{
Id
float64
`json:"id"`
}
// @Tags menu
// @Summary 根据id获取菜单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
api
.GetById true "根据id获取菜单"
// @Param data body
model
.GetById true "根据id获取菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getBaseMenuById [post]
func
GetBaseMenuById
(
c
*
gin
.
Context
)
{
var
idInfo
GetById
var
idInfo
model
.
GetById
_
=
c
.
ShouldBindJSON
(
&
idInfo
)
err
,
menu
:=
new
(
model
.
SysBaseMenu
)
.
GetBaseMenuById
(
idInfo
.
Id
)
if
err
!=
nil
{
...
...
server/api/v1/sys_system.go
浏览文件 @
5629ad96
...
...
@@ -26,7 +26,7 @@ func GetSystemConfig(c *gin.Context) {
// @Summary 设置配置文件内容
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body
sysM
odel.System true "设置配置文件内容"
// @Param data body
m
odel.System true "设置配置文件内容"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /system/setSystemConfig [post]
func
SetSystemConfig
(
c
*
gin
.
Context
)
{
...
...
@@ -45,7 +45,7 @@ func SetSystemConfig(c *gin.Context) {
// @Summary 设置配置文件内容
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body
sysM
odel.System true "设置配置文件内容"
// @Param data body
m
odel.System true "设置配置文件内容"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /system/ReloadSystem [post]
func
ReloadSystem
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/sys_user.go
浏览文件 @
5629ad96
...
...
@@ -11,7 +11,6 @@ import (
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis"
uuid
"github.com/satori/go.uuid"
"mime/multipart"
"time"
)
...
...
@@ -20,10 +19,11 @@ const (
USER_HEADER_IMG_PATH
string
=
"http://qmplusimg.henrongyi.top"
USER_HEADER_BUCKET
string
=
"qm-plus-img"
)
// @Tags Base
// @Summary 用户注册账号
// @Produce application/json
// @Param data body
sysM
odel.SysUser true "用户注册接口"
// @Param data body
m
odel.SysUser true "用户注册接口"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
// @Router /base/register [post]
func
Register
(
c
*
gin
.
Context
)
{
...
...
@@ -45,7 +45,7 @@ func Register(c *gin.Context) {
// @Tags Base
// @Summary 用户登录
// @Produce application/json
// @Param data body
api
.RegisterAndLoginStruct true "用户登录接口"
// @Param data body
model
.RegisterAndLoginStruct true "用户登录接口"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"登陆成功"}"
// @Router /base/login [post]
func
Login
(
c
*
gin
.
Context
)
{
...
...
@@ -118,21 +118,15 @@ func tokenNext(c *gin.Context, user model.SysUser) {
}
}
type
ChangePasswordStutrc
struct
{
Username
string
`json:"username"`
Password
string
`json:"password"`
NewPassword
string
`json:"newPassword"`
}
// @Tags SysUser
// @Summary 用户修改密码
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body
api
.ChangePasswordStutrc true "用户修改密码"
// @Param data body
model
.ChangePasswordStutrc true "用户修改密码"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/changePassword [put]
func
ChangePassword
(
c
*
gin
.
Context
)
{
var
params
ChangePasswordStutrc
var
params
model
.
ChangePasswordStutrc
_
=
c
.
ShouldBindJSON
(
&
params
)
U
:=
&
model
.
SysUser
{
Username
:
params
.
Username
,
Password
:
params
.
Password
}
if
err
,
_
:=
U
.
ChangePassword
(
params
.
NewPassword
);
err
!=
nil
{
...
...
@@ -206,21 +200,16 @@ func GetUserList(c *gin.Context) {
}
}
type
SetUserAuth
struct
{
UUID
uuid
.
UUID
`json:"uuid"`
AuthorityId
string
`json:"authorityId"`
}
// @Tags SysUser
// @Summary 设置用户权限
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body
api
.SetUserAuth true "设置用户权限"
// @Param data body
model
.SetUserAuth true "设置用户权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/setUserAuthority [post]
func
SetUserAuthority
(
c
*
gin
.
Context
)
{
var
sua
SetUserAuth
var
sua
model
.
SetUserAuth
_
=
c
.
ShouldBindJSON
(
&
sua
)
err
:=
new
(
model
.
SysUser
)
.
SetUserAuthority
(
sua
.
UUID
,
sua
.
AuthorityId
)
if
err
!=
nil
{
...
...
server/model/http_request.go
0 → 100644
浏览文件 @
5629ad96
package
model
server/model/http_response.go
0 → 100644
浏览文件 @
5629ad96
package
model
import
uuid
"github.com/satori/go.uuid"
/****************************** common start ****************************************************/
// 分页公用入参结构体
type
PageInfo
struct
{
Page
int
`json:"page"`
PageSize
int
`json:"pageSize"`
}
//根据id查询结构体
type
GetById
struct
{
Id
float64
`json:"id"`
}
/****************************** common end ****************************************************/
/****************************** api start ****************************************************/
//api分页条件查询及排序结构体
type
SearchApiParams
struct
{
SysApi
PageInfo
OrderKey
string
`json:"orderKey"`
Desc
bool
`json:"desc"`
}
/****************************** api end ****************************************************/
/****************************** Authority start ****************************************************/
// 添加角色和menu关系
type
AddMenuAuthorityInfo
struct
{
Menus
[]
SysBaseMenu
AuthorityId
string
}
// 根据角色id获取角色
type
AuthorityIdInfo
struct
{
AuthorityId
string
}
/****************************** Authority end ****************************************************/
/****************************** user start ****************************************************/
// 修改密码结构体
type
ChangePasswordStutrc
struct
{
Username
string
`json:"username"`
Password
string
`json:"password"`
NewPassword
string
`json:"newPassword"`
}
// 设置用户权限
type
SetUserAuth
struct
{
UUID
uuid
.
UUID
`json:"uuid"`
AuthorityId
string
`json:"authorityId"`
}
/****************************** user end ****************************************************/
server/model/sys_common.go
已删除
100644 → 0
浏览文件 @
6864557d
package
model
type
PageInfo
struct
{
Page
int
`json:"page"`
PageSize
int
`json:"pageSize"`
}
web/src/permission.js
浏览文件 @
5629ad96
...
...
@@ -18,7 +18,7 @@ router.beforeEach(async(to, from, next) => {
// 在白名单中的判断情况
if
(
whiteList
.
indexOf
(
to
.
name
)
>
-
1
)
{
if
(
token
)
{
next
({
path
:
'
/layout/dashbord
'
})
next
({
path
:
'
/layout/dashbo
a
rd
'
})
}
else
{
next
()
}
...
...
web/src/store/module/user.js
浏览文件 @
5629ad96
...
...
@@ -51,7 +51,7 @@ export const user = {
if
(
redirect
)
{
router
.
push
({
path
:
redirect
})
}
else
{
router
.
push
({
path
:
'
/layout/dashbord
'
})
router
.
push
({
path
:
'
/layout/dashbo
a
rd
'
})
}
}
},
...
...
web/src/view/dashboard/index.vue
浏览文件 @
5629ad96
...
...
@@ -29,7 +29,7 @@
import
{
mapGetters
}
from
'
vuex
'
import
Animition
from
'
@/view/dashboard/component/animition.vue
'
export
default
{
name
:
'
Dashbord
'
,
name
:
'
Dashbo
a
rd
'
,
data
()
{
return
{
drawer
:
false
...
...
web/src/view/layout/aside/historyComponent/history.vue
浏览文件 @
5629ad96
<
template
>
<div
class=
"router-history"
>
<el-tabs
v-model=
"activeValue"
type=
"card"
:closable=
"!(historys.length==1&&this.$route.name=='dashbord')"
@
tab-click=
"changeTab"
@
tab-remove=
"removeTab"
>
<el-tabs
v-model=
"activeValue"
type=
"card"
:closable=
"!(historys.length==1&&this.$route.name=='dashbo
a
rd')"
@
tab-click=
"changeTab"
@
tab-remove=
"removeTab"
>
<el-tab-pane
v-for=
"item in historys"
:key=
"item.name"
...
...
@@ -17,13 +17,13 @@ export default {
data
(){
return
{
historys
:[],
activeValue
:
"
dashbord
"
activeValue
:
"
dashbo
a
rd
"
}
},
created
(){
const
initHistorys
=
[
{
name
:
"
dashbord
"
,
name
:
"
dashbo
a
rd
"
,
meta
:{
title
:
"
仪表盘
"
}
...
...
@@ -49,7 +49,7 @@ export default {
const
index
=
this
.
historys
.
findIndex
(
item
=>
item
.
name
==
tab
)
if
(
this
.
$route
.
name
==
tab
){
if
(
this
.
historys
.
length
==
1
){
this
.
$router
.
push
({
name
:
"
dashbord
"
})
this
.
$router
.
push
({
name
:
"
dashbo
a
rd
"
})
}
else
{
if
(
index
<
this
.
historys
.
length
-
1
){
this
.
$router
.
push
({
name
:
this
.
historys
[
index
+
1
].
name
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录