Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit af33400b
authored
Jun 28, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
角色权限UI调整
1 parent
cbb65622
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
91 deletions
src/views/account/components/selectProduct.vue
src/views/account/detailAccount.vue
src/views/employee/components/selectProduct.vue
src/views/role/components/selectProduct.vue
src/views/role/look.vue
src/views/account/components/selectProduct.vue
View file @
af33400
<
template
>
<
template
>
<div
class=
"account-body scrm-box-f"
v-loading=
"loading"
>
<div
class=
"account-body scrm-box-f"
v-loading=
"loading"
>
<div
class=
"account-title"
>
{{
title
}}
</div>
<div
class=
"account-title"
>
{{
title
}}
</div>
<el-tabs
v-if=
"tabMenu.length != 0"
v-model=
"tabName"
type=
"card"
@
tab-click=
"handleClik"
>
<el-tabs
v-if=
"tabMenu.length != 0"
v-model=
"tabName"
@
tab-click=
"handleClik"
>
<el-tab-pane
:label=
"item.accounttypeName"
:name=
"item.accounttypeId"
v-for=
"(item, index) in tabMenu"
:key=
"index"
></el-tab-pane>
<el-tab-pane
:label=
"item.accounttypeName"
:name=
"item.accounttypeId
+ ''
"
v-for=
"(item, index) in tabMenu"
:key=
"index"
></el-tab-pane>
</el-tabs>
</el-tabs>
<div
class=
"role-border"
>
<div
class=
"account-select-pro"
v-for=
"(item, index) in tabMenu"
:key=
"index"
v-show=
"tabName == item.accounttypeId"
>
<div
class=
"account-select-pro"
v-for=
"(item, index) in tabMenu"
:key=
"index"
v-show=
"tabName == item.accounttypeId"
>
<label>
选择产品
</label>
<label>
选择产品
</label>
<el-checkbox-group
v-model=
"item.productsArr"
@
change=
"selectPro"
>
<el-checkbox-group
v-model=
"item.productsArr"
@
change=
"selectPro"
>
<el-checkbox
v-for=
"(itm, idx) in item.products"
:label=
"itm"
:key=
"idx"
>
{{
itm
.
productName
}}
</el-checkbox>
<el-checkbox
v-for=
"(itm, idx) in item.products"
:label=
"itm"
:key=
"idx"
>
{{
itm
.
productName
}}
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
<div
class=
"account-select-menu"
>
请
选择产品权限
</div>
<div
class=
"account-select-menu"
>
选择产品权限
</div>
<div
class=
"menu-box"
>
<div
class=
"menu-box"
>
<div
class=
"menu-box-panel"
>
<div
class=
"menu-box-panel"
>
<div
:key=
"index"
v-for=
"(item, index) in tabMenu"
>
<div
:key=
"index"
v-for=
"(item, index) in tabMenu"
>
<div
class=
"menu-box-tab"
v-show=
"tabName == item.accounttypeId"
>
<div
class=
"menu-box-tab"
v-show=
"tabName == item.accounttypeId"
>
<div
v-show=
"item.productsArr.indexOf(itm) != -1"
class=
"tab-item text-hide
"
:class=
"
{ 'select-checked': productTab == itm.productId }" @click="productClick(itm.productId)" v-for="(itm, idx) in item.products" :key="idx">
<div
v-show=
"item.productsArr.indexOf(itm) != -1"
class=
"tab-item role-border
"
:class=
"
{ 'select-checked': productTab == itm.productId }" @click="productClick(itm.productId)" v-for="(itm, idx) in item.products" :key="idx">
{{
itm
.
productName
}}
{{
itm
.
productName
}}
</div>
</div>
</div>
</div>
<div
v-show=
"tabName == item.accounttypeId"
class=
"menu-box-tree
"
v-if=
"item.products"
:style=
"
{ 'min-height': treeHeight + 'px' }">
<div
v-show=
"tabName == item.accounttypeId"
class=
"menu-box-tree role-border
"
v-if=
"item.products"
:style=
"
{ 'min-height': treeHeight + 'px' }">
<div
v-for=
"(itm, idx) in item.products"
:key=
"idx"
>
<div
v-for=
"(itm, idx) in item.products"
:key=
"idx"
>
<div
class=
"nodata"
v-if=
"item.productsArr.length == 0 || itm.merchantProTreeResponses.length == 0"
>
<div
class=
"nodata"
v-if=
"item.productsArr.length == 0 || itm.merchantProTreeResponses.length == 0"
>
<img
src=
"../../../assets/img/empty.png"
alt=
""
/>
<img
src=
"../../../assets/img/empty.png"
alt=
""
/>
...
@@ -36,6 +37,7 @@
...
@@ -36,6 +37,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
util
from
'@/utils/util'
import
util
from
'@/utils/util'
...
@@ -172,7 +174,7 @@ export default {
...
@@ -172,7 +174,7 @@ export default {
})
})
})
})
this
.
loading
=
false
this
.
loading
=
false
this
.
tabName
=
this
.
tabMenu
[
0
].
accounttypeId
this
.
tabName
=
this
.
tabMenu
[
0
].
accounttypeId
+
''
this
.
productTab
=
this
.
tabMenu
[
0
].
productsArr
[
0
]
?
this
.
tabMenu
[
0
].
productsArr
[
0
].
productId
:
''
this
.
productTab
=
this
.
tabMenu
[
0
].
productsArr
[
0
]
?
this
.
tabMenu
[
0
].
productsArr
[
0
].
productId
:
''
// const arr = res.map(i => i.accounttypeId)
// const arr = res.map(i => i.accounttypeId)
// this.tabMenu.map(i => arr.includes(i.accounttypeId))
// this.tabMenu.map(i => arr.includes(i.accounttypeId))
...
@@ -393,21 +395,20 @@ export default {
...
@@ -393,21 +395,20 @@ export default {
.
el-checkbox
:
last-of-type
{
.
el-checkbox
:
last-of-type
{
margin-right
:
8px
;
margin-right
:
8px
;
}
}
.el-tabs--card
>
.el-tabs__header
.el-tabs__nav
{
.el-tabs
{
border
:
0
;
height
:
48px
;
border
:
1px
solid
#e5e5e5
;
border-bottom
:
none
;
}
}
.el-tabs
--card
>
.el-tabs
__header
{
.el-tabs__header
{
border
:
0
;
line-height
:
48px
;
background-color
:
#f4f6fc
;
padding
:
0
30px
;
}
}
.el-tabs--card
>
.el-tabs__header
.el-tabs__item
{
.el-tabs__nav-wrap
::after
{
border
:
none
;
content
:
none
;
width
:
180px
;
margin
:
2px
;
text-align
:
center
;
}
}
.el-
tabs__item.is-active
{
.el-
form-item
{
background-color
:
#fff
;
margin-bottom
:
0
!important
;
}
}
}
}
.account-title
{
.account-title
{
...
@@ -419,54 +420,55 @@ export default {
...
@@ -419,54 +420,55 @@ export default {
margin-bottom
:
30px
;
margin-bottom
:
30px
;
}
}
.account-select-pro
{
.account-select-pro
{
padding-left
:
3
0px
;
padding-left
:
2
0px
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#333333
;
color
:
#333333
;
line-height
:
20px
;
line-height
:
20px
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
margin-top
:
12
px
;
margin-top
:
20
px
;
label
{
label
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
}
}
.account-select-menu
{
.account-select-menu
{
padding-left
:
20px
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#333333
;
color
:
#333333
;
line-height
:
20px
;
line-height
:
20px
;
margin-top
:
2
0px
;
margin-top
:
1
0px
;
}
}
.menu-box
{
.menu-box
{
position
:
relative
;
position
:
relative
;
margin-top
:
10px
;
margin
:
10px
;
background
:
#f4f6fc
;
border-radius
:
4px
;
border-radius
:
4px
;
padding
:
10px
;
.tab-item
{
.tab-item
{
width
:
18
0px
;
height
:
4
0px
;
background
:
#f
fffff
;
background
:
#f
afafa
;
border-
radius
:
4px
0px
0px
0px
;
border-
bottom
:
none
;
border
:
1px
solid
#f4f6fc
;
border
-radius
:
4px
4px
0px
0px
;
font-size
:
14px
;
font-size
:
14px
;
line-height
:
14
px
;
line-height
:
40
px
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#37383a
;
color
:
#37383a
;
text-align
:
center
;
text-align
:
center
;
padding
:
12px
0px
;
padding
:
0
20px
;
margin-right
:
2px
;
cursor
:
pointer
;
cursor
:
pointer
;
&.select-checked
{
&.select-checked
{
background
:
#ffffff
;
color
:
#322ad9
;
color
:
#322ad9
;
//
font-weight
:
700
;
border-bottom
:
none
;
}
}
}
}
.menu-box-tab
{
.menu-box-tab
{
display
:
flex
;
display
:
flex
;
}
}
.menu-box-tree
{
.menu-box-tree
{
background
:
#ffffff
;
border-radius
:
0px
4px
4px
4px
;
height
:
640px
;
overflow
:
auto
;
}
}
}
}
}
}
...
...
src/views/account/detailAccount.vue
View file @
af33400
...
@@ -53,19 +53,20 @@
...
@@ -53,19 +53,20 @@
<div
class=
"MsgWrap powerlimt"
>
<div
class=
"MsgWrap powerlimt"
>
<span
class=
"content-title"
>
功能权限
</span>
<span
class=
"content-title"
>
功能权限
</span>
<div
class=
"powerTreeWrap"
>
<div
class=
"powerTreeWrap
role-border
"
>
<div
class=
"mainTitleWrap"
>
<div
class=
"mainTitleWrap
role-border-b
"
>
<div
class=
"mainTitle"
:class=
"
{ activeMainTitle: currentIndex == index }" v-for="(item, index) in powerDataArray" :key="index" @click="powerTabClick(index)">
<div
class=
"mainTitle"
:class=
"
{ activeMainTitle: currentIndex == index }" v-for="(item, index) in powerDataArray" :key="index" @click="powerTabClick(index)">
{{
item
.
accounttypeName
||
'null'
}}
{{
item
.
accounttypeName
||
'null'
}}
<div
class=
"tab_line"
v-show=
"currentIndex == index"
></div>
</div>
</div>
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"subTitleWrap"
v-if=
"products.length > 0"
>
<div
class=
"subTitleWrap"
v-if=
"products.length > 0"
>
<div
class=
"subTitle
text-hide
"
:class=
"
{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)">
<div
class=
"subTitle
role-border
"
:class=
"
{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)">
{{
ele
.
productName
}}
{{
ele
.
productName
}}
</div>
</div>
</div>
</div>
<div
class=
"contentTree"
>
<div
class=
"contentTree
role-border
"
>
<!-- powerDataArray.length > 0 && powerDataArray[currentIndex].products[subCurrentIndex]. -->
<!-- powerDataArray.length > 0 && powerDataArray[currentIndex].products[subCurrentIndex]. -->
<!-- powerDataArray[currentIndex].products[subCurrentIndex].merchantProTreeResponses这是树的数据 -->
<!-- powerDataArray[currentIndex].products[subCurrentIndex].merchantProTreeResponses这是树的数据 -->
<template
v-if=
"merchantProTreeResponses.length > 0"
>
<template
v-if=
"merchantProTreeResponses.length > 0"
>
...
@@ -557,6 +558,16 @@ export default {
...
@@ -557,6 +558,16 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.tab_line
{
width
:
100%
;
height
:
2px
;
background
:
#5850ff
;
border-radius
:
4px
;
position
:
absolute
;
left
:
50%
;
top
:
48px
;
transform
:
translate
(
-50%
,
0
);
}
.merchantDetail
{
.merchantDetail
{
padding-bottom
:
60px
;
padding-bottom
:
60px
;
.titles
{
.titles
{
...
@@ -656,46 +667,41 @@ export default {
...
@@ -656,46 +667,41 @@ export default {
.powerlimt
{
.powerlimt
{
padding-bottom
:
30px
;
padding-bottom
:
30px
;
.powerTreeWrap
{
.powerTreeWrap
{
background-color
:
#f4f6fc
;
margin
:
0
20px
;
margin
:
0
20px
;
border-radius
:
4px
;
border-radius
:
4px
;
min-height
:
300px
;
min-height
:
300px
;
padding-top
:
2px
;
padding-top
:
2px
;
padding-left
:
2px
;
padding-left
:
2px
;
padding-bottom
:
10px
;
.mainTitleWrap
{
.mainTitleWrap
{
//
height
:
32
px
;
height
:
48
px
;
display
:
flex
;
display
:
flex
;
padding
:
0
10px
;
.mainTitle
{
.mainTitle
{
background-color
:
#f4f6fc
;
position
:
relative
;
height
:
32px
;
margin
:
0
20px
;
width
:
180px
;
line-height
:
48px
;
line-height
:
32px
;
text-align
:
center
;
text-align
:
center
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
.activeMainTitle
{
.activeMainTitle
{
background-color
:
#fff
;
color
:
#5850ff
;
color
:
#5850ff
;
}
}
}
}
.content
{
.content
{
background-color
:
#fff
;
margin
:
20px
;
border-radius
:
0px
4px
4px
4px
;
margin
:
20px
10px
0
;
.subTitleWrap
{
.subTitleWrap
{
//
height
:
40px
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
background-color
:
#f4f6fc
;
.subTitle
{
.subTitle
{
padding
:
0px
5px
;
background
:
#fafafa
;
background-color
:
#f4f6fc
;
padding
:
0px
20px
;
height
:
40px
;
height
:
40px
;
width
:
180px
;
line-height
:
40px
;
line-height
:
40px
;
text-align
:
center
;
text-align
:
center
;
border-radius
:
2px
;
border-radius
:
4px
4px
0px
0px
;
border-bottom
:
none
;
margin-right
:
2px
;
}
}
.acitveSubTitle
{
.acitveSubTitle
{
background-color
:
#fff
!important
;
background-color
:
#fff
!important
;
...
@@ -707,7 +713,7 @@ export default {
...
@@ -707,7 +713,7 @@ export default {
height
:
250px
;
height
:
250px
;
position
:
relative
;
position
:
relative
;
overflow
:
auto
;
overflow
:
auto
;
border-radius
:
0px
4px
4px
4px
;
.noDataContent
{
.noDataContent
{
width
:
64px
;
width
:
64px
;
height
:
64px
;
height
:
64px
;
...
...
src/views/employee/components/selectProduct.vue
View file @
af33400
...
@@ -462,34 +462,6 @@ export default {
...
@@ -462,34 +462,6 @@ export default {
.el-tabs__nav-wrap
::after
{
.el-tabs__nav-wrap
::after
{
content
:
none
;
content
:
none
;
}
}
//
.el-tabs--card
>
.el-tabs__header
.el-tabs__nav
{
//
border
:
0
;
//
}
//
.el-tabs--card
>
.el-tabs__header
{
//
border
:
0
;
//
border-bottom
:
1px
solid
#e5e5e5
;
//
//
background-color
:
#f4f6fc
;
//
}
//
.el-tabs--card
>
.el-tabs__header
.el-tabs__item
{
//
position
:
relative
;
//
border
:
none
;
//
//
width
:
180px
;
//
margin
:
2px
;
//
text-align
:
center
;
//
&::after
{
//
content
:
''
;
//
display
:
inline-block
;
//
width
:
calc
(
100%
-
40px
);
//
height
:
2px
;
//
background-color
:
#5850ff
;
//
position
:
absolute
;
//
bottom
:
-2px
;
//
left
:
20px
;
//
}
//
}
//
.el-tabs__item.is-active
{
//
background-color
:
#fff
;
//
}
.el-form-item
{
.el-form-item
{
margin-bottom
:
0
!important
;
margin-bottom
:
0
!important
;
}
}
...
...
src/views/role/components/selectProduct.vue
View file @
af33400
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
<div
class=
"menu-box-panel"
>
<div
class=
"menu-box-panel"
>
<div
:key=
"index"
v-for=
"(item, index) in tabMenu"
>
<div
:key=
"index"
v-for=
"(item, index) in tabMenu"
>
<div
class=
"menu-box-tab"
v-show=
"tabName == item.accounttypeId"
>
<div
class=
"menu-box-tab"
v-show=
"tabName == item.accounttypeId"
>
<div
v-show=
"item.productsArr.indexOf(itm) != -1"
class=
"tab-item text-hide"
:class=
"{ 'select-checked': productTab == itm.productId }"
@
click=
"productClick(itm.productId)"
v-for=
"(itm, idx) in item.products"
:key=
"idx"
>
<div
v-show=
"item.productsArr.indexOf(itm) != -1"
class=
"tab-item
role-border
text-hide"
:class=
"{ 'select-checked': productTab == itm.productId }"
@
click=
"productClick(itm.productId)"
v-for=
"(itm, idx) in item.products"
:key=
"idx"
>
{{ itm.productName }}
{{ itm.productName }}
</div>
</div>
</div>
</div>
<div
v-show=
"tabName == item.accounttypeId"
class=
"menu-box-tree"
v-if=
"item.products"
:style=
"{ 'min-height': treeHeight + 'px' }"
>
<div
v-show=
"tabName == item.accounttypeId"
class=
"menu-box-tree
role-border
"
v-if=
"item.products"
:style=
"{ 'min-height': treeHeight + 'px' }"
>
<div
v-for=
"(itm, idx) in item.products"
:key=
"idx"
>
<div
v-for=
"(itm, idx) in item.products"
:key=
"idx"
>
<div
class=
"nodata"
v-if=
"item.productsArr.length == 0 || itm.merchantProTreeResponses.length == 0"
>
<div
class=
"nodata"
v-if=
"item.productsArr.length == 0 || itm.merchantProTreeResponses.length == 0"
>
<img
src=
"../../../assets/img/empty.png"
alt=
""
/>
<img
src=
"../../../assets/img/empty.png"
alt=
""
/>
...
@@ -158,7 +158,7 @@ export default {
...
@@ -158,7 +158,7 @@ export default {
accounttypeId
:
item
.
accounttypeId
accounttypeId
:
item
.
accounttypeId
}
}
})
})
this
.
tabName
=
this
.
tabMenu_r
[
0
].
accounttypeId
this
.
tabName
=
this
.
tabMenu_r
[
0
].
accounttypeId
+
''
return
this
.
tabMenu_r
return
this
.
tabMenu_r
},
},
// 获取当前的所有权限
// 获取当前的所有权限
...
@@ -226,7 +226,7 @@ export default {
...
@@ -226,7 +226,7 @@ export default {
return
item
&&
item
.
accounttypeId
&&
this
.
tabMenu
[
index
].
productsArr
.
length
>
0
return
item
&&
item
.
accounttypeId
&&
this
.
tabMenu
[
index
].
productsArr
.
length
>
0
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
tabName
=
tabMenu
[
0
].
accounttypeId
this
.
tabName
=
tabMenu
[
0
].
accounttypeId
+
''
this
.
productTab
=
tabMenu
[
0
].
productsArr
[
0
].
productId
this
.
productTab
=
tabMenu
[
0
].
productsArr
[
0
].
productId
},
100
)
},
100
)
},
},
...
@@ -470,7 +470,7 @@ export default {
...
@@ -470,7 +470,7 @@ export default {
line-height
:
20px
;
line-height
:
20px
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
margin-top
:
12
px
;
margin-top
:
28
px
;
label
{
label
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
...
@@ -482,7 +482,6 @@ export default {
...
@@ -482,7 +482,6 @@ export default {
.tab-item
{
.tab-item
{
background
:
#fafafa
;
background
:
#fafafa
;
border-radius
:
4px
4px
0px
0px
;
border-radius
:
4px
4px
0px
0px
;
border
:
1px
solid
#f4f6fc
;
margin-right
:
2px
;
margin-right
:
2px
;
font-size
:
14px
;
font-size
:
14px
;
line-height
:
14px
;
line-height
:
14px
;
...
@@ -502,7 +501,6 @@ export default {
...
@@ -502,7 +501,6 @@ export default {
}
}
.menu-box-tree
{
.menu-box-tree
{
background
:
#ffffff
;
background
:
#ffffff
;
border
:
1px
solid
#f4f6fc
;
}
}
}
}
}
}
...
@@ -518,4 +516,8 @@ export default {
...
@@ -518,4 +516,8 @@ export default {
margin-bottom
:
12px
;
margin-bottom
:
12px
;
}
}
}
}
/
deep
/
.el-tree
{
height
:
640px
;
overflow
:
auto
;
}
</
style
>
</
style
>
src/views/role/look.vue
View file @
af33400
...
@@ -274,7 +274,7 @@ export default {
...
@@ -274,7 +274,7 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
0px
32
px
;
padding
:
0px
10
px
;
//
border-bottom
:
1px
solid
#e5e5e5
;
//
border-bottom
:
1px
solid
#e5e5e5
;
.line_element
{
.line_element
{
position
:
relative
;
position
:
relative
;
...
@@ -284,6 +284,7 @@ export default {
...
@@ -284,6 +284,7 @@ export default {
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#333333
;
color
:
#333333
;
margin
:
0
20px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.line_element_active
{
.line_element_active
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment