Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
杨明
/
scrm-micro-config
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 73114d49
authored
Nov 02, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
员工-查看
1 parent
e2cf254a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
161 additions
and
75 deletions
src/views/employee/detail/config.vue
src/views/employee/detail/info.vue
src/views/employee/editEmployee.vue
src/views/employee/detail/config.vue
View file @
73114d4
<!-- 配置管理 -->
<!-- 配置管理 -->
<
template
>
<
template
>
<div
class=
"config-employee"
>
<div
class=
"config-employee"
>
<!--
<div
class=
"container"
>
<p
class=
"edit-title"
>
{{
title
}}
</p>
</div>
-->
<div
class=
"container"
>
<div
class=
"container"
>
<!--
<p
class=
"edit-sub-title p-rl-20"
>
员工基本信息
</p>
<div
class=
"MsgWrap powerlimt"
>
<glsx-combi-form
class=
"p-rl-20"
ref=
"editFormRef"
labelWidth=
"160px"
:isBlock=
"isBlock"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<span
class=
"content-title"
>
功能权限
</span>
<template
slot=
"merchantId"
slot-scope=
"item"
>
<select-page
:form=
"editForm"
width=
"300px"
:targetItem=
"item.scope"
@
handleChange=
"handleChangeMerchant"
></select-page>
<div
class=
"powerTreeWrap"
>
</
template
>
<div
class=
"mainTitleWrap"
>
<
template
slot=
"visibleInferiorMer"
slot-scope=
"item"
>
<div
class=
"mainTitle"
:class=
"
{ activeMainTitle: currentIndex == index }" v-for="(item, index) in powerDataArray" :key="index" @click="powerTabClick(index)">
<el-input
:style=
"
{ width: item.width || '360px' }" placeholder="可见商户" v-model="filterText">
</el-input>
{{
item
.
accounttypeName
||
'null'
}}
<el-tree
show-checkbox
check-on-click-node
check-strictly
class=
"filter-tree"
:data=
"baseData.merchantTree"
:props=
"defaultProps"
default-expand-all
:filter-node-method=
"filterNode"
ref=
"tree"
@
check=
"handleClickNode"
></el-tree>
</div>
</
template
>
</div>
</glsx-combi-form>
-->
<div
class=
"content"
>
<div
class=
"subTitleWrap"
v-if=
"products.length > 0"
>
<div
class=
"subTitle"
:class=
"
{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)">
{{
ele
.
productName
}}
</div>
</div>
<div
class=
"contentTree"
>
<template
v-if=
"merchantProTreeResponses.length > 0"
>
<el-tree
default-expand-all
:data=
"merchantProTreeResponses"
:props=
"defaultProps"
></el-tree>
</
template
>
<div
v-else
class=
"noDataContent"
>
<img
src=
"../../../assets/img/empty.png"
alt=
""
/>
<div>
暂无数据
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -23,16 +37,61 @@
...
@@ -23,16 +37,61 @@
export
default
{
export
default
{
name
:
'config'
,
name
:
'config'
,
data
()
{
data
()
{
return
{}
return
{
powerDataArray
:
[],
currentIndex
:
0
,
//功能权限主标题的索引
subCurrentIndex
:
0
,
defaultProps
:
{
children
:
'children'
,
label
:
'label'
}
}
},
props
:
{
id
:
{
type
:
String
,
default
:
''
}
},
},
components
:
{},
computed
:
{
products
()
{
if
(
!
this
.
powerDataArray
.
length
)
{
return
[]
}
return
this
.
powerDataArray
[
this
.
currentIndex
].
products
},
//功能树的数据
merchantProTreeResponses
()
{
if
(
!
this
.
powerDataArray
.
length
)
{
return
[]
}
else
if
(
this
.
powerDataArray
.
length
>
0
&&
this
.
powerDataArray
[
this
.
currentIndex
].
products
.
length
==
0
)
{
return
[]
}
computed
:
{},
return
this
.
powerDataArray
[
this
.
currentIndex
].
products
[
this
.
subCurrentIndex
].
merchantProTreeResponses
}
},
mounted
()
{},
mounted
()
{
this
.
getInfo
()
},
methods
:
{
methods
:
{
getInfo
()
{
this
.
$apis
.
employee
.
getDetailInfoApi
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
powerDataArray
=
res
.
accountTypeTreeResponseList
})
},
powerTabClick
(
index
)
{
this
.
currentIndex
=
index
//每次切换将subCurrentIndex置为0
this
.
subCurrentIndex
=
0
},
powerSubTabClick
(
index
)
{
this
.
subCurrentIndex
=
index
},
handleClose
()
{
handleClose
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'Account2EmployeeIndex'
name
:
'Account2EmployeeIndex'
...
@@ -41,7 +100,7 @@ export default {
...
@@ -41,7 +100,7 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
>
.config-employee
{
.config-employee
{
margin-bottom
:
64px
;
margin-bottom
:
64px
;
}
}
...
@@ -50,63 +109,88 @@ export default {
...
@@ -50,63 +109,88 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
padding
:
20px
;
padding
:
20px
;
}
.content-title
{
.config-employee
.p-rl-20
{
display
:
inline-block
;
padding
:
0
20px
;
position
:
relative
;
}
height
:
48px
;
.config-employee
.flex
{
background-color
:
#fff
;
display
:
flex
;
font-size
:
16px
;
justify-content
:
space-between
;
font-weight
:
600
;
}
color
:
#333333
;
.config-employee
.edit-container
{
line-height
:
48px
;
margin-bottom
:
84px
;
padding-left
:
20px
;
}
}
.powerlimt
{
.config-employee
.footer
{
padding-bottom
:
30px
;
position
:
fixed
;
.powerTreeWrap
{
bottom
:
0
;
background-color
:
#f4f6fc
;
width
:
100%
;
margin
:
0
20px
;
height
:
64px
;
border-radius
:
4px
;
text-align
:
center
;
min-height
:
300px
;
line-height
:
64px
;
padding-top
:
2px
;
background
:
#ffffff
;
padding-left
:
2px
;
z-index
:
999
;
padding-bottom
:
10px
;
}
.mainTitleWrap
{
height
:
32px
;
display
:
flex
;
.config-employee
.flex
{
.mainTitle
{
display
:
flex
;
background-color
:
#f4f6fc
;
justify-content
:
space-between
;
height
:
32px
;
}
width
:
180px
;
line-height
:
32px
;
text-align
:
center
;
border-radius
:
2px
;
cursor
:
pointer
;
}
.activeMainTitle
{
background-color
:
#fff
;
color
:
#5850ff
;
}
}
.content
{
background-color
:
#fff
;
.config-employee
.edit-title
{
margin
:
20px
10px
0
;
font-size
:
20px
;
.subTitleWrap
{
font-weight
:
bold
;
height
:
40px
;
color
:
#333333
;
display
:
flex
;
line-height
:
38px
;
background-color
:
#f4f6fc
;
height
:
38px
;
.subTitle
{
margin
:
0
0
;
background-color
:
#f4f6fc
;
}
height
:
40px
;
width
:
180px
;
line-height
:
40px
;
text-align
:
center
;
border-radius
:
2px
;
}
.acitveSubTitle
{
background-color
:
#fff
!important
;
color
:
#5850ff
;
}
}
.contentTree
{
padding
:
20px
;
min-height
:
250px
;
height
:
250px
;
position
:
relative
;
overflow
:
auto
;
.config-employee
.edit-sub-title
{
.noDataContent
{
height
:
48px
;
width
:
64px
;
line-height
:
48px
;
height
:
64px
;
font-size
:
16px
;
position
:
absolute
;
color
:
#333333
;
left
:
50%
;
font-weight
:
600
;
top
:
50%
;
border-bottom
:
1px
solid
#e7eaec
;
margin-top
:
-32px
;
margin
:
0
0
;
margin-left
:
-32px
;
}
div
{
.config-employee
.filter-tree
{
margin-top
:
12px
;
width
:
360px
;
}
max-height
:
200px
;
}
overflow
:
scroll
;
}
}
}
.config-employee
.el-checkbox
:last-of-type
{
}
margin-right
:
8px
;
}
}
.config-employee
.filter-tree
.el-tree-node__label
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
</
style
>
</
style
>
src/views/employee/detail/info.vue
View file @
73114d4
...
@@ -60,7 +60,6 @@ export default {
...
@@ -60,7 +60,6 @@ export default {
methods
:
{
methods
:
{
getInfo
()
{
getInfo
()
{
this
.
$apis
.
employee
.
getDetailInfoApi
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
$apis
.
employee
.
getDetailInfoApi
({
id
:
this
.
id
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
info
=
res
this
.
info
=
res
})
})
}
}
...
...
src/views/employee/editEmployee.vue
View file @
73114d4
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<p
class=
"edit-sub-title p-rl-20"
>
员工基本信息
</p>
<p
class=
"edit-sub-title p-rl-20"
>
员工基本信息
</p>
<glsx-combi-form
class=
"p-
rl
-20"
ref=
"editFormRef"
labelWidth=
"160px"
@
handleImgDelete=
"handleImgDelete"
:isBlock=
"isBlock"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"p-
tr
-20"
ref=
"editFormRef"
labelWidth=
"160px"
@
handleImgDelete=
"handleImgDelete"
:isBlock=
"isBlock"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<template
slot=
"merchantId"
slot-scope=
"item"
>
<template
slot=
"merchantId"
slot-scope=
"item"
>
<select-page
:form=
"editForm"
width=
"300px"
:targetItem=
"item.scope"
@
handleChange=
"handleChangeMerchant"
></select-page>
<select-page
:form=
"editForm"
width=
"300px"
:targetItem=
"item.scope"
@
handleChange=
"handleChangeMerchant"
></select-page>
</
template
>
</
template
>
...
@@ -341,6 +341,9 @@ export default {
...
@@ -341,6 +341,9 @@ export default {
padding
:
20px
;
padding
:
20px
;
}
}
.config-employee
.p-rl-20
{
.config-employee
.p-rl-20
{
padding
:
0
20px
;
}
.config-employee
.p-tr-20
{
padding
:
20px
20px
0
;
padding
:
20px
20px
0
;
}
}
.config-employee
.flex
{
.config-employee
.flex
{
...
...
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