Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
87973468
authored
2023-02-20 15:27:46 +0800
by
xiaomiao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
菜单配置
1 parent
35bbb8a2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
350 additions
and
45 deletions
src/components/Echart/Map/Chart.vue
src/views/system/roles/index.vue
src/views/system/roles/roleslistdiglog.vue
src/components/Echart/Map/Chart.vue
View file @
8797346
src/views/system/roles/index.vue
View file @
8797346
...
...
@@ -152,7 +152,7 @@ export default {
this
.
getUserList
(
scope
.
row
);
}}
>
人员
配置
<
/el-button
>
<
/span
>
<
/el-tooltip
>
...
...
src/views/system/roles/roleslistdiglog.vue
View file @
8797346
<
template
>
<Dialog
:title=
"title"
class=
"tableClass"
:show
.
sync=
"visible"
:width=
"'715px'"
@
close=
"close()"
<el-dialog
:close-on-click-modal=
"false"
top=
"0"
@
click=
"close()"
custom-class=
"dialogBox editDialogBox mainCenter"
:visible
.
sync=
"visible"
width=
"85%"
>
<template
slot=
"content"
>
<div
slot=
"title"
class=
"dialog_title"
ref=
"dialogTitle"
>
{{
title
||
"标题"
}}
</div>
<div
class=
"editDialogBox-box"
>
<el-tabs
v-model=
"activeName"
type=
"card"
>
<el-tab-pane
label=
"人员配置"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"菜单配置"
name=
"second"
></el-tab-pane>
</el-tabs>
<!--
<div
class=
"editDialogBox-box"
v-if=
"activeName == 'first'"
>
-->
<lb-table
v-if=
"activeName == 'first'"
ref=
"multipleTable"
:pagination=
"false"
:column=
"tableData.column"
:data=
"tableData.data"
:column=
"
user
tableData.column"
:data=
"
user
tableData.data"
@
selection-change=
"handleSelectionChange"
@
row-click=
"handleClickTableRow"
>
>
</lb-table>
</
template
>
<!--
</div>
-->
<!--
<div
class=
"editDialogBox-box"
v-else=
"activeName !== 'first'"
>
-->
<lb-table
v-else=
"activeName !== 'first'"
:pagination=
"false"
:column=
"menutableData.columns"
:data=
"menutableData"
row-key=
"id"
default-expand-all
@
selection-change=
"handleSelectionChanges"
@
row-click=
"handleClickTableRows"
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }"
>
</lb-table>
<!--
</div>
-->
</div>
<template
slot=
"footer"
>
<el-button
type=
"primary"
class=
"save"
@
click=
"handleSaveMember()"
>
保存
</el-button
>
<el-button
class=
"cancel-button"
@
click=
"close()"
>
取消
</el-button>
</
template
>
</
D
ialog>
</
el-d
ialog>
</template>
<
script
>
import
Dialog
from
"@/components/Dialog/"
;
import
{
updateUser
}
from
"@/api/quanxianmanagement"
;
export
default
{
name
:
""
,
components
:
{
Dialog
},
data
()
{
return
{
title
:
"人员配置"
,
visible
:
false
,
hasSelectList
:
[
// {
// name: "管理员",
// loginName: "admin1",
// departmentName: "研发部",
// jobLevel: null,
// },
// {
// name: "测试账号",
// loginName: "admin2",
// departmentName: "研发部",
// jobLevel: null,
// },
],
//已经选择的id组成的数组
tableData
:
{
menutableData
:
{
column
:
[
{
type
:
"selection"
,
},
{
prop
:
"name"
,
label
:
"
姓名
"
,
label
:
"
菜单名称
"
,
},
],
},
usertableData
:
{
column
:
[
{
prop
:
"loginName"
,
label
:
"用户名"
,
type
:
"selection"
,
},
{
prop
:
"
departmentN
ame"
,
label
:
"
部门
"
,
prop
:
"
n
ame"
,
label
:
"
姓名
"
,
},
{
prop
:
"
jobLevel
"
,
label
:
"
职务
"
,
prop
:
"
loginName
"
,
label
:
"
用户名
"
,
},
],
data
:
[]
,
}
,
// 角色id
roleId
:
""
,
}
,
activeName
:
"first"
,
multipleSelection
:
[],
};
},
...
...
@@ -83,26 +97,106 @@ export default {
created
()
{},
mounted
()
{},
methods
:
{
// 人员配置根据selectStatus字段确定已选人员
// 人员配置点击行勾选数据
handleClickTableRow
(
row
,
event
)
{
this
.
checkNum
=
0
;
this
.
isCheck
=
false
;
if
(
event
.
label
==
"操作"
)
{
return
;
}
else
{
if
(
row
.
status
==
"0"
)
{
return
;
}
else
{
if
(
this
.
multipleSelection
.
length
>
0
)
{
if
(
JSON
.
stringify
(
this
.
multipleSelection
).
indexOf
(
JSON
.
stringify
(
row
)
)
==
-
1
)
{
this
.
multipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
}
else
{
this
.
multipleSelection
.
map
((
item
,
index
)
=>
{
if
(
item
.
id
==
row
.
id
)
{
this
.
multipleSelection
.
splice
(
index
,
1
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
false
);
}
});
}
}
else
{
this
.
multipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
}
}
}
if
(
this
.
multipleSelection
.
length
>
0
)
{
this
.
checkNum
=
this
.
multipleSelection
.
length
;
this
.
isCheck
=
true
;
}
else
{
this
.
isCheck
=
false
;
}
},
// 菜单配置点击行勾选数据
handleClickTableRow
(
row
,
event
)
{
this
.
checkNum
=
0
;
this
.
isCheck
=
false
;
if
(
event
.
label
==
"操作"
)
{
return
;
}
else
{
if
(
row
.
status
==
"0"
)
{
return
;
}
else
{
if
(
this
.
multipleSelection
.
length
>
0
)
{
if
(
JSON
.
stringify
(
this
.
multipleSelection
).
indexOf
(
JSON
.
stringify
(
row
)
)
==
-
1
)
{
this
.
multipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
}
else
{
this
.
multipleSelection
.
map
((
item
,
index
)
=>
{
if
(
item
.
id
==
row
.
id
)
{
this
.
multipleSelection
.
splice
(
index
,
1
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
false
);
}
});
}
}
else
{
this
.
multipleSelection
.
push
(
row
);
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
}
}
}
if
(
this
.
multipleSelection
.
length
>
0
)
{
this
.
checkNum
=
this
.
multipleSelection
.
length
;
this
.
isCheck
=
true
;
}
else
{
this
.
isCheck
=
false
;
}
},
// 获取人员列表做筛选
adds
(
a
,
rid
)
{
this
.
roleId
=
rid
;
this
.
visible
=
true
;
this
.
tableData
.
data
=
a
;
this
.
tableData
.
data
.
forEach
((
item
,
index
)
=>
{
this
.
user
tableData
.
data
=
a
;
this
.
user
tableData
.
data
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
selectStatus
===
0
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
this
.
tableData
.
data
[
index
],
this
.
user
tableData
.
data
[
index
],
true
);
});
}
});
},
// 关闭事件
close
()
{
this
.
visible
=
false
;
},
// 保存
// 保存
事件
handleSaveMember
()
{
const
idList
=
this
.
multipleSelection
.
map
((
item
)
=>
{
return
item
.
id
;
...
...
@@ -116,18 +210,229 @@ export default {
}
else
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
});
},
// 勾选人员事件
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
// 勾选菜单事件
handleSelectionChanges
(
val
)
{
this
.
multipleSelection
=
val
;
},
},
};
</
script
>
<
style
scoped
lang=
"scss"
>
/
deep
/
.el-dialog__header
{
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/dialogBox.scss"
;
.editForm
{
/deep/.el-textarea__inner
{
border
:
1px
solid
#224c7c
!important
;
margin
:
0
0
10px
0
!important
;
width
:
100%
!important
;
color
:
#dadde3
!important
;
background
:
transparent
!important
;
}
/
deep
/
.el-input__inner
{
border
:
1px
solid
#224c7c
!important
;
margin
:
0
!important
;
width
:
100%
!important
;
color
:
#dadde3
!important
;
background
:
transparent
!important
;
}
}
/
deep
/
.el-dialog__body
{
display
:
flex
;
flex-direction
:
column
;
}
/
deep
/
.el-tabs
{
color
:
#cef8ff
;
}
.sjmx
{
/deep/.el-tabs__item
{
height
:
50px
;
padding-top
:
6px
;
}
}
/
deep
/
.el-tabs__item
{
color
:
#cef8ff
!important
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
background
:
url("~@/image/tabitem.png")
no-repeat
;
background-size
:
100%
100%
;
border
:
none
!important
;
}
.obligee-item-name
{
background
:
#05275b
;
color
:
#ffffff
;
background
:
url("~@/image/itembg.png")
no-repeat
;
background-size
:
100%
100%
;
}
/
deep
/
.el-tabs__nav-scroll
{
background
:
none
;
}
/
deep
/
.el-tabs__nav
{
display
:
flex
;
border
:
none
!important
;
}
/
deep
/
.el-tabs__item.is-top
{
border
:
1px
solid
#dfe4ed
;
border-top
:
1px
solid
#dfe4ed
;
border-bottom
:
1px
solid
transparent
;
}
/
deep
/
.el-tabs__header
{
border
:
none
;
margin-bottom
:
0
;
}
/
deep
/
.el-tabs__item.is-top
:not
(
:last-child
)
{
margin-right
:
5px
;
}
/
deep
/
.el-tabs__item.is-top
{
background-color
:
none
!important
;
}
/
deep
/
.el-tabs__item.is-active
{
background
:
url("~@/image/tabitemse.png")
no-repeat
;
background-size
:
100%
100%
;
}
.success-images
{
width
:
30px
;
height
:
30px
;
position
:
relative
;
top
:
10px
;
right
:
3px
;
}
.tab-pane-item
{
line-height
:
20px
;
color
:
#02d9fd
;
p
{
text-align
:
center
;
}
}
.edit-content
{
height
:
450px
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding-right
:
1px
;
margin-bottom
:
10px
;
.el-dialog__title
{
border-top
:
none
;
}
/
deep
/
.editDialogBox
{
border-radius
:
8px
;
overflow
:
hidden
;
min-width
:
1228px
;
height
:
825px
!important
;
.dialog-from
{
padding
:
13px
;
border-radius
:
2px
;
box-sizing
:
border-box
;
.el-row
{
display
:
flex
;
flex-wrap
:
nowrap
;
}
.el-col
{
line-height
:
18px
;
display
:
flex
;
align-items
:
center
;
margin-bottom
:
3px
;
color
:
#b5d6dc
;
border-radius
:
2px
;
border
:
1px
solid
#224c7c
;
margin
:
5px
;
span
{
display
:
inline-block
;
padding
:
3px
;
border-radius
:
3px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-align
:
left
;
color
:
#02d9fd
;
}
p
{
flex
:
1
;
width
:
100%
;
padding-left
:
5px
;
line-height
:
20px
;
color
:
#c0c4cc
;
cursor
:
not-allowed
;
white-space
:
nowrap
;
margin-right
:
5px
;
text-align
:
right
;
}
}
}
.dialog_title
{
display
:
flex
;
position
:
relative
;
font-size
:
24px
;
top
:
-11px
;
width
:
38%
;
height
:
40px
;
margin-left
:
28px
;
justify-content
:
center
;
}
.el-dialog__header
{
display
:
flex
;
margin-bottom
:
15px
;
}
.dialog_footer
{
flex-direction
:
column
;
.dialog_button
{
margin-top
:
8px
;
}
}
.divider
{
width
:
100%
;
border-bottom
:
1px
solid
#ccc
;
}
}
.el-dialog__wrapper
{
overflow
:
hidden
;
}
/
deep
/
.el-table
{
background
:
none
;
th.el-table__cell
{
background-color
:
#073781
;
color
:
#02d9fd
;
}
tr
{
background
:
none
;
td
{
color
:
white
;
}
}
}
//
#08346F
!
important
;
</
style
>
...
...
Please
register
or
sign in
to post a comment