Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
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
罗超
SuperMan
Commits
62a20016
Commit
62a20016
authored
Oct 09, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限设置样式调整
parent
b384cda2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
523 additions
and
468 deletions
+523
-468
index.vue
src/components/index.vue
+2
-2
permissionList.vue
src/components/platformModule/permissionList.vue
+432
-429
versionspermissionList.vue
src/components/platformModule/versionspermissionList.vue
+89
-37
No files found.
src/components/index.vue
View file @
62a20016
...
@@ -2018,7 +2018,7 @@
...
@@ -2018,7 +2018,7 @@
this
.
allWindowWidth
=
allWindowWidth
-
50
-
220
-
60
;
this
.
allWindowWidth
=
allWindowWidth
-
50
-
220
-
60
;
let
maxLength
=
parseInt
(
allWindowWidth
/
110
);
let
maxLength
=
parseInt
(
allWindowWidth
/
110
);
this
.
maxLength
=
maxLength
;
this
.
maxLength
=
maxLength
;
this
.
testApi
();
//
this.testApi();
//this.testEmp();
//this.testEmp();
let
userinfo
=
this
.
getLocalStorage
();
let
userinfo
=
this
.
getLocalStorage
();
let
ActionMenuCode
=
userinfo
.
ActionMenuCode
;
let
ActionMenuCode
=
userinfo
.
ActionMenuCode
;
...
@@ -2194,7 +2194,7 @@
...
@@ -2194,7 +2194,7 @@
//测试方法
//测试方法
testEmp
()
{
testEmp
()
{
var
postMsg
=
{
var
postMsg
=
{
EmPassword
:
"
US9TjP7aGsU=
"
EmPassword
:
""
};
};
this
.
apipost
(
this
.
apipost
(
"admin_get_AnalysisPassword"
,
postMsg
,
"admin_get_AnalysisPassword"
,
postMsg
,
...
...
src/components/platformModule/permissionList.vue
View file @
62a20016
This diff is collapsed.
Click to expand it.
src/components/platformModule/versionspermissionList.vue
View file @
62a20016
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
.per_first_menu
li
{
.per_first_menu
li
{
float
:
left
;
float
:
left
;
margin-right
:
30px
;
margin-right
:
30px
;
margin-top
:
5px
;
position
:
relative
;
position
:
relative
;
cursor
:
pointer
;
cursor
:
pointer
;
background
:
#fff
;
background
:
#fff
;
...
@@ -141,54 +142,102 @@
...
@@ -141,54 +142,102 @@
float
:
right
;
float
:
right
;
}
}
.per_first_menu-set
{
overflow
:
hidden
;
}
.per_first_menu-set
li
{
float
:
left
;
margin-right
:
30px
;
margin-top
:
5px
;
position
:
relative
;
cursor
:
pointer
;
background
:
#fff
;
color
:
#999
;
width
:
140px
;
font-size
:
12px
;
height
:
80px
;
padding
:
0
10px
;
border-radius
:
4px
;
border-bottom
:
1px
solid
#eee
}
.per_first_menu-set
li
.FirsrMenuCked
{
background
:
#e95252
;
color
:
#f1f1f1
;
}
.per_first_menu-set
li
i
{
font-size
:
30px
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<div>
<div>
<div
class=
"per_title"
>
{{
$t
(
'objFill.quanxianshezhi'
)
}}
</div>
<div
class=
"per_title"
>
{{
$t
(
'objFill.quanxianshezhi'
)
}}
</div>
<div
class=
"per_first_menu"
>
<div
class=
"per_first_menu"
>
<ul>
<ul>
<li
v-model=
"item.IsShow"
v-for=
"(item,index) in MenuList"
@
click=
"getSecondLevelMenu(index)"
<template
v-for=
"(item,index) in MenuList"
>
:class=
"
{FirsrMenuCked:index==firstLevel}">
<li
v-model=
"item.IsShow"
@
click=
"getSecondLevelMenu(index)"
:key=
"`f_`+index"
<i
:class=
"[fontPub,item.icon]"
></i><br
/>
{{
item
.
MenuName
}}
:class=
"
{FirsrMenuCked:index==firstLevel}">
<el-checkbox
:indeterminate=
"item.choseParent"
class=
"per_firstLevelCkbox"
type=
"checkbox"
<i
:class=
"[fontPub,item.icon]"
></i><br
/>
{{
item
.
MenuName
}}
:value=
"item.IsShow"
v-model=
"item.IsShow"
@
change=
"firstCheckAll"
v-bind:checked=
"item.IsShow"
>
<el-checkbox
:indeterminate=
"item.choseParent"
class=
"per_firstLevelCkbox"
type=
"checkbox"
</el-checkbox>
:value=
"item.IsShow"
v-model=
"item.IsShow"
@
change=
"firstCheckAll"
v-bind:checked=
"item.IsShow"
>
</li>
</el-checkbox>
</li>
<input
type=
"button"
:value=
"$t('pub.saveBtn')"
class=
"normalBtn per_SaveBtn"
@
click=
"updateMenu()"
/>
</
template
>
<!--
<input
type=
"button"
:value=
"$t('pub.returnBack')"
class=
"hollowFixedBtn per_SaveBtn"
@
click=
"goback"
/>
-->
<el-tooltip
class=
"item"
effect=
"dark"
content=
"保存菜单权限"
placement=
"top-start"
>
<el-button
type=
"primary"
class=
"normalBtn per_SaveBtn"
:loading=
"saveLoading"
@
click=
"updateMenu()"
>
{{$t('pub.saveBtn')}}
</el-button>
</el-tooltip>
</ul>
</ul>
</div>
</div>
<div
class=
"per_detail_menu"
>
<div
class=
"per_detail_menu"
>
<div
class=
"per_secondMenu"
v-if=
"MenuList.length>0 && MenuList[firstLevel].ChildMenu!=null"
>
<div
class=
"per_secondMenu"
v-if=
"MenuList.length>0 && MenuList[firstLevel].ChildMenu!=null"
>
<li
v-model=
"item.IsShow"
:class=
"
{per_secondLevelCked:index==secondLevel}"
<
template
v-for=
"(item,index) in MenuList[firstLevel].ChildMenu"
>
v-for="(item,index) in MenuList[firstLevel].ChildMenu" @click="getThirdLevelMenu(index)">
{{
item
.
MenuName
}}
<li
v-model=
"item.IsShow"
:class=
"
{per_secondLevelCked:index==secondLevel}" :key="`f_`+firstLevel+`_s_`+index"
<div></div><span
class=
"liSplit"
></span></li>
@click="getThirdLevelMenu(index)">
{{
item
.
MenuName
}}
<div></div><span
class=
"liSplit"
></span></li>
</
template
>
<el-checkbox
class=
'per_thirdLevelAllCked'
@
change=
'checkedAll($event)'
v-model=
'secondChkAllState'
>
全选
<el-checkbox
class=
'per_thirdLevelAllCked'
@
change=
'checkedAll($event)'
v-model=
'secondChkAllState'
>
全选
</el-checkbox>
</el-checkbox>
</div>
</div>
<div
class=
"per_thirdMenu"
v-if=
"MenuList.length>0 && MenuList[firstLevel].ChildMenu!=null"
>
<div
class=
"per_thirdMenu"
v-if=
"MenuList.length>0 && MenuList[firstLevel].ChildMenu!=null"
>
<li
v-model=
"item.IsShow"
@
click=
"thirdLevelMenuCked(item)"
:class=
"
{thirdLevelMenuCked:item.IsShow}"
<
template
v-for=
"(item,index) in MenuList[firstLevel].ChildMenu[secondLevel].ChildMenu"
>
v-for="(item,index) in MenuList[firstLevel].ChildMenu[secondLevel].ChildMenu">
{{
item
.
MenuName
}}
<i
<li
v-model=
"item.IsShow"
@
click=
"thirdLevelMenuCked(item)"
:class=
"
{thirdLevelMenuCked:item.IsShow}"
:class=
"[fontPub,item.icon]"
></i></li>
:key="`f_`+firstLevel+`_s_`+secondLevel+`_t_`+index">
{{
item
.
MenuName
}}
<i
:class=
"[fontPub,item.icon]"
></i>
</li>
</
template
>
</div>
</div>
</div>
</div>
<el-row>
<div
class=
"per_title"
>
{{
$t
(
'objFill.gongnenggl'
)
}}
</div>
<el-col
:span=
"12"
>
<div
class=
"per_first_menu"
>
<div
class=
"per_title"
>
{{$t('objFill.gongnenggl')}}
</div>
</el-col>
<el-col
:span=
"12"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"保存功能权限"
placement=
"top-start"
>
<el-button
type=
"primary"
class=
"normalBtn per_SaveBtn"
:loading=
"saveLoading"
@
click=
"saveAction()"
>
{{$t('pub.saveBtn')}}
</el-button>
</el-tooltip>
</el-col>
</el-row>
<div
class=
"per_first_menu-set"
>
<ul>
<ul>
<li
v-model=
"item.IsShow"
v-for=
"(item,index) in actionList"
@
click=
"item.IsShow = !item.IsShow;"
>
<
template
v-for=
"(item,index) in actionList"
>
<i
:class=
"[fontPub,item.icon]"
></i><br
/>
{{
item
.
ActionName
}}
<el-tooltip
:key=
"`a_t_`+index"
class=
"item"
effect=
"dark"
:content=
"item.Remarks"
v-if=
"item.Remarks!=''"
<el-checkbox
class=
"per_firstLevelCkbox"
type=
"checkbox"
:value=
"item.IsShow"
v-model=
"item.IsShow"
placement=
"top-start"
>
v-bind:checked=
"item.IsShow"
></el-checkbox>
<li
v-model=
"item.IsShow"
@
click=
"item.IsShow = !item.IsShow"
:key=
"`a_`+index"
>
</li>
<el-checkbox
type=
"checkbox"
:value=
"item.IsShow"
v-model=
"item.IsShow"
v-bind:checked=
"item.IsShow"
>
<input
type=
"button"
:value=
"$t('pub.saveBtn')"
class=
"normalBtn per_SaveBtn"
@
click=
"saveAction()"
/>
</el-checkbox>
<i
:class=
"[fontPub,item.icon]"
></i>
{{
item
.
ActionName
}}
<div></div>
<span>
{{
item
.
ActionCode
}}
</span>
</li>
</el-tooltip>
</
template
>
</ul>
</ul>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -208,10 +257,9 @@
...
@@ -208,10 +257,9 @@
firstLevel
:
0
,
firstLevel
:
0
,
secondLevel
:
0
,
secondLevel
:
0
,
secondChkAllState
:
false
,
secondChkAllState
:
false
,
//功能菜单
//功能菜单
actionList
:
[],
actionList
:
[],
saveLoading
:
false
,
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -226,7 +274,7 @@
...
@@ -226,7 +274,7 @@
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
tempList
=
res
.
data
.
data
;
let
tempList
=
res
.
data
.
data
;
this
.
actionList
=
tempList
;
this
.
actionList
=
tempList
;
}
else
{}
}
},
err
=>
{})
},
err
=>
{})
},
},
getMenu
()
{
getMenu
()
{
...
@@ -250,29 +298,35 @@
...
@@ -250,29 +298,35 @@
this
.
MenuList
.
forEach
(
x
=>
{})
this
.
MenuList
.
forEach
(
x
=>
{})
this
.
updateMsg
.
Permission
=
[]
this
.
updateMsg
.
Permission
=
[]
this
.
getCkdId
(
this
.
MenuList
);
this
.
getCkdId
(
this
.
MenuList
);
this
.
saveLoading
=
true
;
this
.
apipost
(
"admin_post_UpdateVersionsPermission"
,
this
.
updateMsg
,
res
=>
{
this
.
apipost
(
"admin_post_UpdateVersionsPermission"
,
this
.
updateMsg
,
res
=>
{
this
.
saveLoading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'保存成功!'
)
this
.
$message
.
success
(
'保存成功!'
)
}
else
{
}
else
{
this
.
$message
.
error
(
'保存失败!'
)
this
.
$message
.
error
(
'保存失败!'
)
}
}
},
err
=>
{})
},
err
=>
{
this
.
saveLoading
=
false
;
})
},
},
//保存功能管理
//保存功能管理
saveAction
()
{
saveAction
()
{
this
.
updateMsg
.
Permission
=
[]
this
.
updateMsg
.
Permission
=
[]
this
.
getCkdActionId
(
this
.
actionList
);
this
.
getCkdActionId
(
this
.
actionList
);
this
.
saveLoading
=
true
;
this
.
apipost
(
"admin_post_UpdateVersionsPermissionAction"
,
this
.
updateMsg
,
res
=>
{
this
.
apipost
(
"admin_post_UpdateVersionsPermissionAction"
,
this
.
updateMsg
,
res
=>
{
this
.
saveLoading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
'保存成功!'
)
this
.
$message
.
success
(
'保存成功!'
)
}
else
{
}
else
{
this
.
$message
.
error
(
'保存失败!'
)
this
.
$message
.
error
(
'保存失败!'
)
}
}
},
err
=>
{})
},
err
=>
{
this
.
saveLoading
=
false
;
})
},
},
getSecondLevelMenu
(
index
)
{
getSecondLevelMenu
(
index
)
{
this
.
firstLevel
=
index
;
this
.
firstLevel
=
index
;
this
.
secondLevel
=
0
;
this
.
secondLevel
=
0
;
this
.
threeChange
();
this
.
threeChange
();
...
@@ -319,7 +373,6 @@
...
@@ -319,7 +373,6 @@
})
})
}
}
this
.
threeChange
()
this
.
threeChange
()
},
},
threeChange
()
{
threeChange
()
{
let
chkCount
=
0
let
chkCount
=
0
...
@@ -341,7 +394,6 @@
...
@@ -341,7 +394,6 @@
}
}
x
.
IsShow
=
secondCheckCount
>
0
x
.
IsShow
=
secondCheckCount
>
0
})
})
this
.
MenuList
[
this
.
firstLevel
].
IsShow
=
chkCount
>
0
this
.
MenuList
[
this
.
firstLevel
].
IsShow
=
chkCount
>
0
this
.
MenuList
[
this
.
firstLevel
].
choseParent
=
chkCount
>
0
&&
chkCount
<
count
this
.
MenuList
[
this
.
firstLevel
].
choseParent
=
chkCount
>
0
&&
chkCount
<
count
},
},
...
...
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