Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
Support
提交反馈
为 GitLab 提交贡献
登录
切换导航
H
HY占座系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
刘英杰
HY占座系统
提交
ba15c975
提交
ba15c975
编写于
1月 12, 2024
作者:
钟一霄
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
动态菜单
上级
404dfe66
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
89 行增加
和
10 行删除
+89
-10
.env
.env
+1
-1
identify.js
a/manager/identify/identify.js
+1
-1
identify.js
public/a/manager/identify/identify.js
+1
-1
index.vue
src/layouts/basic-layout/header-user/index.vue
+48
-5
index.vue
src/pages/activityManagement/index.vue
+1
-0
index.vue
src/pages/siteManagement/index.vue
+1
-0
index.vue
src/pages/welcome/index.vue
+8
-0
menu.js
src/store/modules/admin/modules/menu.js
+28
-2
未找到文件。
.env
浏览文件 @
ba15c975
# 所有环境默认
# 页面 title
VUE_APP_TITLE=党建管理系统
\ No newline at end of file
VUE_APP_TITLE=场地管理
\ No newline at end of file
a/manager/identify/identify.js
浏览文件 @
ba15c975
...
...
@@ -25,7 +25,7 @@
tokenname
:
'
token
'
,
//token的名字
tokentime
:
'
120
'
,
//token的有效时间(分钟)
savetype
:
'
0
'
,
//0为cookie方式存储token,1为localStorage方式
autojump
:
'
5
'
,
//自动跳转登录主页的时间(秒),0为立即跳转,-1为不跳转
autojump
:
'
0
'
,
//自动跳转登录主页的时间(秒),0为立即跳转,-1为不跳转
jumplevel
:
'
1
'
,
//1为顶层跳转,0为当前页面跳转
pwdlength
:
'
8
'
,
//要求密码最短长度
usertype
:
'
c
'
,
//指定用户类型
...
...
public/a/manager/identify/identify.js
浏览文件 @
ba15c975
...
...
@@ -23,7 +23,7 @@
tokenname
:
'
token
'
,
//token的名字
tokentime
:
'
120
'
,
//token的有效时间(分钟)
savetype
:
'
0
'
,
//0为cookie方式存储token,1为localStorage方式
autojump
:
'
5
'
,
//自动跳转登录主页的时间(秒),0为立即跳转,-1为不跳转
autojump
:
'
0
'
,
//自动跳转登录主页的时间(秒),0为立即跳转,-1为不跳转
jumplevel
:
'
1
'
,
//1为顶层跳转,0为当前页面跳转
pwdlength
:
'
8
'
,
//要求密码最短长度
usertype
:
'
c
'
,
//指定用户类型
...
...
src/layouts/basic-layout/header-user/index.vue
浏览文件 @
ba15c975
<
template
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<Dropdown
:trigger=
"isMobile ? 'click' : 'hover'"
class=
"i-layout-header-user"
<
!--
<
Dropdown
:trigger=
"isMobile ? 'click' : 'hover'"
class=
"i-layout-header-user"
:class=
"
{ 'i-layout-header-user-mobile': isMobile }" @on-click="handleClick">
<Avatar
size=
"default"
icon=
"ios-person"
style=
"background-color: #2D8CF0;"
/>
<span
class=
"i-layout-header-user-name"
v-if=
"!isMobile"
>
{{
userName
}}
</span>
<DropdownMenu
slot=
"list"
>
<
!--
<
i-link
to=
"/setting/user"
>
<i-link
to=
"/setting/user"
>
<DropdownItem>
<Icon
type=
"ios-contact-outline"
/>
<span>
{{
$t
(
'
basicLayout.user.center
'
)
}}
</span>
...
...
@@ -16,18 +16,44 @@
<Icon
type=
"ios-settings-outline"
/>
<span>
{{
$t
(
'
basicLayout.user.setting
'
)
}}
</span>
</DropdownItem>
</i-link>
-->
</i-link>
<DropdownItem
divided
name=
"logout"
>
<Icon
type=
"ios-log-out"
/>
<span>
{{
$t
(
'
basicLayout.user.logOut
'
)
}}
</span>
</DropdownItem>
</DropdownMenu>
</Dropdown>
-->
<Dropdown
:trigger=
"isMobile ? 'click' : 'hover'"
class=
"i-layout-header-user"
:class=
"
{ 'i-layout-header-user-mobile': isMobile }"
@on-click="handleClick"
>
<span
class=
"i-layout-header-user-name"
v-if=
"!isMobile"
>
{{
info
.
currentRoleName
}}
<Icon
type=
"md-arrow-dropdown"
/>
</span>
<DropdownMenu
slot=
"list"
>
<DropdownItem
:selected=
"item.role_id == info.currentRole"
v-for=
"(item, index) in info.rolelist"
:key=
"index"
:name=
"item.role_id"
>
<Icon
type=
"ios-contact-outline"
/>
<span>
{{
item
.
role_name
}}
</span>
</DropdownItem>
</DropdownMenu>
</Dropdown>
<span
style=
"margin-left:8px;"
>
<Icon
type=
"md-power"
@
click=
"handleLogout"
/>
</span>
</span>
</
template
>
<
script
>
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
*
as
api
from
'
@/api/dataQry
'
import
util
from
'
@/libs/util
'
;
export
default
{
name
:
'
iHeaderUser
'
,
...
...
@@ -50,15 +76,32 @@ export default {
'
logout
'
]),
handleClick
(
name
)
{
// console.log('点击', name, this.info)
if
(
name
===
'
logout
'
)
{
this
.
logout
({
confirm
:
this
.
logoutConfirm
,
vm
:
this
});
}
else
{
let
obj
=
JSON
.
parse
(
util
.
cookies
.
get
(
'
site-management-userinfo
'
))
let
authObj
=
obj
.
role_and_power
.
find
(
a
=>
a
.
role_id
==
name
)
this
.
info
.
access
=
authObj
.
role_id
this
.
info
.
currentRole
=
authObj
.
role_id
this
.
info
.
currentRoleName
=
authObj
.
role_name
//重新设置用户权限
this
.
$store
.
dispatch
(
"
admin/user/set
"
,
this
.
info
,
{
root
:
true
});
}
}
},
handleLogout
(){
this
.
logout
({
confirm
:
this
.
logoutConfirm
,
vm
:
this
,
});
},
},
mounted
()
{
// console.log('account用户信息', this.info)
// 去掉链接中的token
let
tind
=
window
.
location
.
href
.
indexOf
(
'
token=
'
);
if
(
tind
!=
-
1
)
window
.
location
.
href
=
window
.
location
.
href
.
substring
(
0
,
tind
);
...
...
src/pages/activityManagement/index.vue
浏览文件 @
ba15c975
...
...
@@ -326,6 +326,7 @@ export default {
],
// 搜索条件
params
:{
role_id
:
this
.
$store
.
state
.
admin
.
user
.
info
.
currentRole
,
page_index
:
1
,
page_size
:
10
,
user_card_name
:
""
,
...
...
src/pages/siteManagement/index.vue
浏览文件 @
ba15c975
...
...
@@ -150,6 +150,7 @@ export default {
],
// 搜索条件
params
:{
role_id
:
this
.
$store
.
state
.
admin
.
user
.
info
.
currentRole
,
page_index
:
1
,
page_size
:
10
,
place_type_id
:
''
,
...
...
src/pages/welcome/index.vue
浏览文件 @
ba15c975
...
...
@@ -5,10 +5,18 @@
</
template
>
<
script
>
import
util
from
'
@/libs/util
'
;
export
default
{
data
()
{
return
{}
},
mounted
()
{
let
obj
=
JSON
.
parse
(
util
.
cookies
.
get
(
'
site-management-userinfo
'
))
console
.
log
(
'
用户信息
'
,
obj
)
let
obj2
=
JSON
.
parse
(
localStorage
.
getItem
(
'
admin
'
))
console
.
log
(
'
菜单
'
,
obj2
)
},
methods
:{
aaa
(){
this
.
asc
.
getApiSsoPc
()
...
...
src/store/modules/admin/modules/menu.js
浏览文件 @
ba15c975
...
...
@@ -23,6 +23,27 @@ function filterMenu (menuList, access, lastList) {
return
lastList
;
}
function
menuFormat
(
arr
)
{
return
arr
.
map
(
a
=>
{
return
{
"
id
"
:
a
.
menuid
,
"
parentId
"
:
"
0
"
,
"
path
"
:
'
/
'
+
a
.
menu_path
,
"
title
"
:
a
.
menu_name
,
"
name
"
:
""
,
"
header
"
:
""
,
"
icon
"
:
""
,
"
custom
"
:
""
,
"
hideSider
"
:
"
0
"
,
"
isHided
"
:
"
0
"
,
"
isExistDoc
"
:
false
,
"
rank
"
:
0
,
"
auth
"
:
[],
"
children
"
:
[]
}
})
}
export
default
{
namespaced
:
true
,
state
:
{
...
...
@@ -49,10 +70,15 @@ export default {
const
userInfo
=
rootState
.
admin
.
user
.
info
;
// @权限
const
access
=
userInfo
.
access
;
const
menuList
=
menuFormat
(
userInfo
.
rolelist
.
find
(
a
=>
a
.
role_id
==
userInfo
.
currentRole
).
menus
)
if
(
access
&&
access
.
length
)
{
return
filterMenu
(
state
.
sider
,
access
,
[]);
// return filterMenu(state.sider, access, []);
return
menuList
}
else
{
return
filterMenu
(
state
.
sider
,
[],
[]);
// return filterMenu(state.sider, [], []);
return
menuList
}
},
/**
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录