Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
V3-TailingPond
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
V3-TailingPond
Commits
b58506ca
Commit
b58506ca
authored
May 28, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 用户角色,报警预设值与历史列表 的编辑按钮隐藏处理
parent
84f91a12
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
httpApi.js
src/assets/js/httpApi.js
+2
-2
user.js
src/store/modules/user.js
+7
-3
No files found.
src/assets/js/httpApi.js
View file @
b58506ca
...
@@ -2270,7 +2270,7 @@ var reqApis = function () {
...
@@ -2270,7 +2270,7 @@ var reqApis = function () {
labelWidth
:
'
120
'
,
labelWidth
:
'
120
'
,
operWidth
:
'
120
'
,
operWidth
:
'
120
'
,
title
:
'
监测项
'
,
title
:
'
监测项
'
,
buttons
:
[
buttons
:
Cookies
.
get
(
'
userrole
'
)
==
'
PT
'
?
[]:
[
//{'fn':'', 'type':'success', 'icon':'el-icon-more'},
//{'fn':'', 'type':'success', 'icon':'el-icon-more'},
{
{
'
fn
'
:
'
toEdit
'
,
'
type
'
:
'
primary
'
,
'
icon
'
:
'
el-icon-edit
'
,
'
callback
'
:
function
(
item
)
{
'
fn
'
:
'
toEdit
'
,
'
type
'
:
'
primary
'
,
'
icon
'
:
'
el-icon-edit
'
,
'
callback
'
:
function
(
item
)
{
...
@@ -2360,7 +2360,7 @@ var reqApis = function () {
...
@@ -2360,7 +2360,7 @@ var reqApis = function () {
labelWidth
:
'
120
'
,
labelWidth
:
'
120
'
,
operWidth
:
'
120
'
,
operWidth
:
'
120
'
,
title
:
'
监测项
'
,
title
:
'
监测项
'
,
buttons
:
Cookies
.
get
(
'
user
name
'
)
==
'
hbb
'
?
[]:[
buttons
:
Cookies
.
get
(
'
user
role
'
)
==
'
PT
'
?
[]:[
{
{
'
type
'
:
'
primary
'
,
'
icon
'
:
'
el-icon-close-notification
'
,
'
isvalid
'
:
function
(
item
)
{
'
type
'
:
'
primary
'
,
'
icon
'
:
'
el-icon-close-notification
'
,
'
isvalid
'
:
function
(
item
)
{
return
item
.
state
!==
1
return
item
.
state
!==
1
...
...
src/store/modules/user.js
View file @
b58506ca
...
@@ -44,9 +44,13 @@ const user = {
...
@@ -44,9 +44,13 @@ const user = {
commit
(
'
SET_LOAD_MENUS
'
,
true
);
commit
(
'
SET_LOAD_MENUS
'
,
true
);
// 2025-5-27 10:52:58新增存储登录权限到cookie中
// 2025-5-27 10:52:58新增存储登录权限到cookie中
// Cookies.set('role', body.roles[0]);
// Cookies.set('role', body.roles[0]);
// debugger
const
roles4putong
=
body
.
user
.
user
.
roles
.
find
((
item
)
=>
{
Cookies
.
set
(
'
username
'
,
body
.
user
.
user
.
username
);
return
item
.
name
===
'
普通用户
'
})
// Cookies.set('username', body.user.user.username);
if
(
roles4putong
){
Cookies
.
set
(
'
userrole
'
,
'
PT
'
);
}
};
};
resolve
(
res
)
resolve
(
res
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment