Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 a18ee02b
authored
Apr 18, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
e03b0b91
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
348 additions
and
340 deletions
linkwe-pc/src/layout/components/AppMain.vue
linkwe-pc/src/styles/element-ui.scss
linkwe-pc/src/styles/index.scss
linkwe-pc/src/views/contentCenter/components/MaPage.vue
linkwe-pc/src/views/contentCenter/components/TalkMaPage.vue
linkwe-pc/src/views/enterpriseManage/contacts/organization.vue
linkwe-pc/src/views/enterpriseManage/roles/index.vue
linkwe-pc/src/layout/components/AppMain.vue
View file @
a18ee02
...
...
@@ -6,7 +6,7 @@
<!--
<keep-alive
:include=
"cachedViews"
>
</keep-alive>
-->
</transition>
<div
v-loading=
"loading"
class=
"
height100
micro-app-wrap container"
>
<div
v-loading=
"loading"
class=
"micro-app-wrap container"
>
<div
id=
"micro-app"
class=
"height100"
v-show=
"isActiveMicroApp"
>
<!--
<div
id=
"app"
class=
"mask"
style=
"position: absolute"
>
<i
class=
"el-icon-loading cc"
></i>
...
...
@@ -85,7 +85,7 @@ export default {
}
.container
{
position
:
relative
;
max-
height
:
100%
;
height
:
100%
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
...
...
@@ -97,7 +97,7 @@ export default {
}
}
.page
{
padding
:
0
20px
;
padding
:
0
15px
0
20px
;
//
background
:
#fff
;
//
border-radius
:
var
(
--border-radius-big
);
}
...
...
linkwe-pc/src/styles/element-ui.scss
View file @
a18ee02
This diff is collapsed.
Click to expand it.
linkwe-pc/src/styles/index.scss
View file @
a18ee02
...
...
@@ -228,6 +228,111 @@ div:focus {
border-radius
:
var
(
--
border-radius-big
);
margin-top
:
var
(
--
card-margin
);
}
// 左右分类列表
&
left-right
{
display
:
flex
;
justify-content
:
space-between
;
height
:
100%
;
.left
{
flex
:
auto
;
display
:
flex
;
flex-direction
:
column
;
margin-right
:
var
(
--
border-radius-big
);
.title
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.title-name
{
color
:
rgba
(
0
,
0
,
0
,
0
.9
);
font-size
:
14px
;
font-weight
:
600
;
// color: #333333;
display
:
flex
;
align-items
:
center
;
}
.title-btn
{
cursor
:
pointer
;
display
:
flex
;
align-items
:
center
;
font-size
:
14px
;
font-weight
:
normal
;
color
:
var
(
--
color
);
&
:hover
{
opacity
:
0
.8
;
}
}
}
.item-list
{
margin-top
:
15px
;
display
:
flex
;
flex-direction
:
column
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
.item
{
cursor
:
pointer
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
font-size
:
14px
;
color
:
rgba
(
0
,
0
,
0
,
0
.6
);
height
:
40px
;
line-height
:
40px
;
width
:
100%
;
padding-left
:
20px
;
.name
{
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.dropdown
{
// display: none;
.dot
{
cursor
:
pointer
;
width
:
15px
;
height
:
15px
;
line-height
:
15px
;
font-size
:
14px
;
font-family
:
JMT-Font
,
JMT
;
font-weight
:
normal
;
color
:
rgba
(
0
,
0
,
0
,
0
.6
);
margin-right
:
10px
;
margin-left
:
5px
;
font-weight
:
500
;
.content-icon
{
color
:
rgba
(
0
,
0
,
0
,
0
.6
);
font-size
:
12px
;
transform
:
rotate
(
90deg
);
}
}
}
&
:hover
{
color
:
rgba
(
0
,
0
,
0
,
0
.9
);
background
:
#f5f8fe
;
opacity
:
0
.8
;
border-radius
:
2px
;
.dropdown
{
// display: block;
}
}
}
.active
{
// border-left: 2px solid #3c88f0;
color
:
rgba
(
0
,
0
,
0
,
0
.9
);
background
:
#f5f8fe
;
border-radius
:
2px
;
}
}
}
.right
{
width
:
78%
;
display
:
flex
;
flex-direction
:
column
;
flex
:
none
;
}
}
}
.card-group-index
+
.g-card
{
...
...
linkwe-pc/src/views/contentCenter/components/MaPage.vue
View file @
a18ee02
This diff is collapsed.
Click to expand it.
linkwe-pc/src/views/contentCenter/components/TalkMaPage.vue
View file @
a18ee02
...
...
@@ -390,95 +390,93 @@ export default {
<
template
>
<div
class=
"page"
>
<div
style=
"margin-top: 16px"
>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"5"
class=
"left pad20"
style=
"border-radius: 4px; background: #fff"
>
<div
class=
"title"
>
<div
class=
"title-name"
>
{{
typeTitle
[
type
]
}}
分组
</div>
<div
class=
"title-btn"
@
click=
"addGroup"
>
添加
</div>
<div
class=
"g-left-right"
>
<div
class=
"left g-card"
>
<div
class=
"title"
>
<div
class=
"title-name"
>
{{
typeTitle
[
type
]
}}
分组
</div>
<div
class=
"title-btn"
@
click=
"addGroup"
>
添加
</div>
</div>
<div
class=
"item-list"
>
<div
class=
"item"
:class=
"
{ active: groupIndex == key }"
v-for="(group, key) in groupList"
:key="group.id"
@click="switchGroup(key, group)">
<div
class=
"name"
>
{{
group
.
name
+
' ('
+
group
.
number
+
')'
}}
</div>
<el-dropdown
v-if=
"group.flag === 0"
class=
"dropdown"
@
command=
"onGroupCommand($event, group)"
>
<span
class=
"dot"
>
<!--
<img
style=
"height: 15px;width: 15px;"
:src=
"require('@/assets/drainageCode/more.png')"
alt=
""
>
-->
<i
class=
"el-icon-more content-icon"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"groupEdit"
>
修改分组
</el-dropdown-item>
<el-dropdown-item
command=
"groupRemove"
>
删除分组
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div
class=
"item-list"
>
<div
class=
"item"
:class=
"
{ active: groupIndex == key }"
v-for="(group, key) in groupList"
:key="group.id"
@click="switchGroup(key, group)">
<div
class=
"name"
>
{{
group
.
name
+
' ('
+
group
.
number
+
')'
}}
</div>
<el-dropdown
v-if=
"group.flag === 0"
class=
"dropdown"
@
command=
"onGroupCommand($event, group)"
>
<span
class=
"dot"
>
<!--
<img
style=
"height: 15px;width: 15px;"
:src=
"require('@/assets/drainageCode/more.png')"
alt=
""
>
-->
<i
class=
"el-icon-more content-icon"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"groupEdit"
>
修改分组
</el-dropdown-item>
<el-dropdown-item
command=
"groupRemove"
>
删除分组
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</el-col>
</div>
</div>
<el-col
:span=
"19"
style=
"margin-top: 0px
"
>
<div
class=
"g-card
"
>
<el-input
v-model=
"query.talkTitle"
:placeholder=
"'请输入' + typeTitle[type] + '标题'"
clearable
prefix-icon=
"el-icon-search"
style=
"width: 300px"
@
keyup
.
enter
.
native=
"search()"
v-if=
"['13', '14'].includes(type)"
/>
<el-input
v-model=
"query.templateInfo"
:placeholder=
"'请输入' + typeTitle[type] + '标题'"
clearable
prefix-icon=
"el-icon-search"
style=
"width: 300px"
@
keyup
.
enter
.
native=
"search()"
v-else
/>
<div
class=
"right
"
>
<div
class=
"g-card fxnone
"
>
<el-input
v-model=
"query.talkTitle"
:placeholder=
"'请输入' + typeTitle[type] + '标题'"
clearable
prefix-icon=
"el-icon-search"
style=
"width: 300px"
@
keyup
.
enter
.
native=
"search()"
v-if=
"['13', '14'].includes(type)"
/>
<el-input
v-model=
"query.templateInfo"
:placeholder=
"'请输入' + typeTitle[type] + '标题'"
clearable
prefix-icon=
"el-icon-search"
style=
"width: 300px"
@
keyup
.
enter
.
native=
"search()"
v-else
/>
<el-button
class=
"ml10"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<!-- v-hasPermi="['wecom:material:list']" -->
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
</div>
<div
class=
"mt20 g-card pad20"
>
<div
v-loading=
"loading"
>
<div
style=
"height: 80px"
>
<div
class=
"fl pad20"
>
<!-- v-hasPermi="['wechat:material:add']" -->
<el-button
type=
"primary"
@
click=
"edit(1, ~~type)"
>
新建
{{
typeTitle
[
type
]
}}
</el-button>
</div>
<div
class=
"fr pad20"
>
<el-popover
placement=
"top"
width=
"260"
v-model=
"groupDialogVisible"
>
<div>
选择分组
</div>
<div
style=
"position: relative; margin: 10px 0"
>
<el-cascader
v-model=
"group"
:options=
"treeData[0].children"
:props=
"groupProps"
></el-cascader>
</div>
<div
style=
"text-align: right"
>
<el-button
size=
"mini"
@
click=
"groupDialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"moveGroup"
>
确定
</el-button>
</div>
<!-- v-hasPermi="['wechat:material:resetCategory']" -->
<el-button
slot=
"reference"
class=
"mr10"
:disabled=
"selected.length === 0"
type=
"primary"
>
批量分组
</el-button>
</el-popover>
<el-button
@
click=
"remove()"
:disabled=
"selected.length === 0"
>
批量删除
</el-button>
<!-- v-hasPermi="['wechat:material:remove']" -->
</div>
<el-button
class=
"ml10"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<!-- v-hasPermi="['wecom:material:list']" -->
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
</div>
<div
class=
"mt20 g-card pad20"
>
<div
v-loading=
"loading"
>
<div
style=
"height: 80px"
>
<div
class=
"fl pad20"
>
<!-- v-hasPermi="['wechat:material:add']" -->
<el-button
type=
"primary"
@
click=
"edit(1, ~~type)"
>
新建
{{
typeTitle
[
type
]
}}
</el-button>
</div>
<div
class=
"fr pad20"
>
<el-popover
placement=
"top"
width=
"260"
v-model=
"groupDialogVisible"
>
<div>
选择分组
</div>
<div
style=
"position: relative; margin: 10px 0"
>
<el-cascader
v-model=
"group"
:options=
"treeData[0].children"
:props=
"groupProps"
></el-cascader>
</div>
<div
style=
"text-align: right"
>
<el-button
size=
"mini"
@
click=
"groupDialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"moveGroup"
>
确定
</el-button>
</div>
<!-- v-hasPermi="['wechat:material:resetCategory']" -->
<el-button
slot=
"reference"
class=
"mr10"
:disabled=
"selected.length === 0"
type=
"primary"
>
批量分组
</el-button>
</el-popover>
<el-button
@
click=
"remove()"
:disabled=
"selected.length === 0"
>
批量删除
</el-button>
<!-- v-hasPermi="['wechat:material:remove']" -->
</div>
<slot
v-bind:list=
"list"
></slot>
</div>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
<slot
v-bind:list=
"list"
></slot>
</div>
</el-col>
</el-row>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</div>
</div>
</div>
<!-- 分组弹框 -->
<el-dialog
...
...
@@ -509,99 +507,6 @@ export default {
</
template
>
<
style
lang=
"scss"
scoped
>
.left
{
margin-right
:
16px
;
.title
{
color
:
var
(
--color
);
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.title-name
{
color
:
rgba
(
0
,
0
,
0
,
0.9
);
font-size
:
16px
;
font-weight
:
600
;
//
color
:
#333333
;
display
:
flex
;
align-items
:
center
;
}
.title-btn
{
cursor
:
pointer
;
display
:
flex
;
align-items
:
center
;
font-size
:
14px
;
font-weight
:
normal
;
color
:
var
(
--color
);
&:hover
{
opacity
:
0.8
;
}
}
}
.item-list
{
max-height
:
700px
;
padding-top
:
15px
;
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
.item
{
cursor
:
pointer
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
font-size
:
14px
;
color
:
rgba
(
0
,
0
,
0
,
0.6
);
height
:
40px
;
line-height
:
40px
;
width
:
100%
;
padding-left
:
20px
;
.name
{
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.dropdown
{
//
display
:
none
;
.dot
{
cursor
:
pointer
;
width
:
15px
;
height
:
15px
;
line-height
:
15px
;
font-size
:
14px
;
font-family
:
JMT-Font
,
JMT
;
font-weight
:
normal
;
color
:
rgba
(
0
,
0
,
0
,
0.6
);
margin-right
:
10px
;
margin-left
:
5px
;
font-weight
:
500
;
.content-icon
{
color
:
rgba
(
0
,
0
,
0
,
0.6
);
font-size
:
12px
;
transform
:
rotate
(
90deg
);
}
}
}
&
:hover
{
color
:
rgba
(
0
,
0
,
0
,
0.9
);
background
:
#f5f8fe
;
opacity
:
0.8
;
border-radius
:
2px
;
.dropdown
{
//
display
:
block
;
}
}
}
.active
{
//
border-left
:
2px
solid
var
(
--color
);
color
:
rgba
(
0
,
0
,
0
,
0.9
);
background
:
#f5f8fe
;
border-radius
:
2px
;
}
}
}
.custom-tree-node
{
overflow
:
hidden
;
flex-shrink
:
1
;
...
...
linkwe-pc/src/views/enterpriseManage/contacts/organization.vue
View file @
a18ee02
<
template
>
<div>
<el-form
class=
"top-search"
:model=
"query"
ref=
"queryForm"
label-position=
"left"
:inline=
"true"
label-width=
"80px"
>
<el-form-item
label=
"员工姓名"
prop=
"title"
>
<el-input
v-model=
"query.userName"
placeholder=
"请输入"
clearable
/>
</el-form-item>
<el-form-item
label=
"角色"
>
<el-select
v-model=
"query.roleId"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
v-for=
"(data, key) in roleList"
:key=
"data.roleId"
:label=
"data.roleName"
:value=
"data.roleId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label
>
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
@
click=
"resetFn()"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
type=
"flex"
justify=
"space-between"
class=
"g-card"
>
<div
class=
"g-left-right"
>
<!--部门数据-->
<el-col
:span=
"4"
>
<div
class=
"head-container"
>
<!--
<div>
部门架构
</div>
-->
<!-- :filter-node-method="filterNode" -->
<!-- default-expand-all -->
<div
class=
"title mb20"
>
<div
class=
"title-name"
>
组织列表
</div>
<span
@
click=
"syncOrganization"
class=
"g-color cp"
>
同步
<i
class=
"el-icon-refresh"
></i>
<div
class=
"left g-card head-container"
>
<!--
<div>
部门架构
</div>
-->
<!-- :filter-node-method="filterNode" -->
<!-- default-expand-all -->
<div
class=
"title mb20"
>
<div
class=
"title-name"
>
组织列表
</div>
<span
@
click=
"syncOrganization"
class=
"g-color cp"
>
同步
<i
class=
"el-icon-refresh"
></i>
</span>
</div>
<el-tree
node-key=
"deptId"
:default-expanded-keys=
"defaultShowNodes"
highlight-current
accordion
class=
"left-tree"
:data=
"treeData"
:props=
"defaultProps"
:expand-on-click-node=
"false"
ref=
"tree"
@
node-click=
"handleNodeClick"
>
<div
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span>
<i
class=
"el-icon-folder-opened"
style=
"color: var(--color)"
/>
{{
node
.
label
}}
</span>
</div>
<el-tree
node-key=
"deptId"
:default-expanded-keys=
"defaultShowNodes"
highlight-current
accordion
class=
"left-tree"
:data=
"treeData"
:props=
"defaultProps"
:expand-on-click-node=
"false"
ref=
"tree"
@
node-click=
"handleNodeClick"
>
<div
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span>
<i
class=
"el-icon-folder-opened"
style=
"color: var(--color)"
/>
{{
node
.
label
}}
</span>
</div>
</el-tree>
</div>
</el-col>
</el-tree>
</div>
<!--用户数据-->
<el-col
:span=
"19"
>
<el-table
v-loading=
"loading"
:data=
"userList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
label=
"员工姓名"
align=
"center"
prop=
"userName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"所属部门"
align=
"center"
prop=
"userDepts"
width=
"150"
>
<template
slot-scope=
"
{ row }" v-if="row.userDepts">
<show-tag
:list=
"row.userDepts"
keyStr=
"deptName"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"职务"
align=
"center"
prop=
"position"
/>
<el-table-column
label=
"手机"
align=
"center"
prop=
"phoneNumber"
/>
<el-table-column
label=
"所属角色"
align=
"center"
prop=
"role"
width=
"250"
>
<
template
slot-scope=
"{ row }"
v-if=
"row.roles"
>
<show-tag
:list=
"row.roles"
keyStr=
"roleName"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"管理范围"
align=
"center"
prop=
"roleDepts"
width=
"150"
>
<
template
slot-scope=
"{ row }"
v-if=
"row.rolesDepts"
>
<show-tag
:list=
"row.rolesDepts"
keyStr=
"roleName"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"100"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"{ row }"
>
<!-- v-hasPermi="['contacts:organization:view']" -->
<el-button
type=
"text"
@
click=
"editRoles(row)"
:disabled=
"setDisabled(row)"
>
修改角色
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</el-col>
</el-row>
<div
class=
"right"
>
<el-form
class=
"top-search"
:model=
"query"
ref=
"queryForm"
label-position=
"left"
:inline=
"true"
label-width=
""
>
<el-form-item
label=
"员工姓名"
prop=
"title"
>
<el-input
v-model=
"query.userName"
placeholder=
"请输入"
clearable
/>
</el-form-item>
<el-form-item
label=
"角色"
>
<el-select
v-model=
"query.roleId"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
v-for=
"(data, key) in roleList"
:key=
"data.roleId"
:label=
"data.roleName"
:value=
"data.roleId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label
>
<el-button
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
<el-button
@
click=
"resetFn()"
>
重置
</el-button>
</el-form-item>
</el-form>
<div
class=
"g-card"
>
<el-table
v-loading=
"loading"
:data=
"userList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
label=
"员工姓名"
align=
"center"
prop=
"userName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"所属部门"
align=
"center"
prop=
"userDepts"
width=
"150"
>
<template
slot-scope=
"
{ row }" v-if="row.userDepts">
<show-tag
:list=
"row.userDepts"
keyStr=
"deptName"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"职务"
align=
"center"
prop=
"position"
/>
<el-table-column
label=
"手机"
align=
"center"
prop=
"phoneNumber"
/>
<el-table-column
label=
"所属角色"
align=
"center"
prop=
"role"
width=
"250"
>
<
template
slot-scope=
"{ row }"
v-if=
"row.roles"
>
<show-tag
:list=
"row.roles"
keyStr=
"roleName"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"管理范围"
align=
"center"
prop=
"roleDepts"
width=
"150"
>
<
template
slot-scope=
"{ row }"
v-if=
"row.rolesDepts"
>
<show-tag
:list=
"row.rolesDepts"
keyStr=
"roleName"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"100"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"{ row }"
>
<!-- v-hasPermi="['contacts:organization:view']" -->
<el-button
type=
"text"
@
click=
"editRoles(row)"
:disabled=
"setDisabled(row)"
>
修改角色
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getList()"
/>
</div>
</div>
</div>
<el-dialog
title=
"设置角色"
:visible
.
sync=
"modalStatus"
append-to-body
width=
"400px"
>
<el-form
class=
""
inline=
""
label-position=
""
label-width=
""
>
...
...
linkwe-pc/src/views/enterpriseManage/roles/index.vue
View file @
a18ee02
<
template
>
<div>
<div
class=
"g-card"
>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"5"
class=
"left pad20"
>
<div
class=
"title"
>
<div
class=
"title-name"
>
角色列表
</div>
<div
class=
"title-btn"
@
click=
"addFn"
>
新建
</div>
<div
class=
"g-left-right"
>
<div
class=
"left g-card"
>
<div
class=
"title"
>
<div
class=
"title-name"
>
角色列表
</div>
<div
class=
"title-btn"
@
click=
"addFn"
>
新建
</div>
</div>
<div
class=
"item-list"
>
<div
class=
"item"
:class=
"
{ active: activeIndex == key }"
v-for="(role, key) in roles"
:key="role.id"
@click="switchRole(key, role)">
<div
class=
"name"
>
{{
role
.
roleName
}}
<span
style=
"margin-left: 10px"
>
(
{{
role
.
userCount
}}
)
</span>
</div>
<div
class=
"item-list"
>
<div
class=
"item"
:class=
"
{ active: activeIndex == key }"
v-for="(role, key) in roles"
:key="role.id"
@click="switchRole(key, role)">
<div
class=
"name"
>
{{
role
.
roleName
}}
<span
style=
"margin-left: 10px"
>
(
{{
role
.
userCount
}}
)
</span>
</div>
</div>
</div>
</el-col>
<el-col
:span=
"19"
class=
"pad20"
>
<div
class=
"title-name"
>
{{
currentStatus
===
'detail'
?
'角色详情'
:
currentStatus
===
'add'
?
'新建角色'
:
'编辑角色'
}}
</div>
<div
v-if=
"currentStatus === 'detail'"
>
<div
style=
"margin-top: 20px"
>
<el-form
ref=
"codeForm"
label-position=
"right"
label-width=
"80px"
>
<el-form-item
label=
"角色员工"
>
<template
v-for=
"(item, index) in roleObj.users"
>
<el-tag
v-if=
"item.userName"
size=
"medium"
:key=
"index"
>
{{
item
.
userName
}}
</el-tag>
</
template
>
</el-form-item>
<el-form-item
label=
"管理范围"
>
<
template
v-if=
"roleObj.dataScope != 2"
>
{{
setName
()
}}
</
template
>
</div>
</div>
</div>
<div
class=
"right g-card mt0"
>
<div
class=
"title-name"
>
{{
currentStatus
===
'detail'
?
'角色详情'
:
currentStatus
===
'add'
?
'新建角色'
:
'编辑角色'
}}
</div>
<div
v-if=
"currentStatus === 'detail'"
>
<div
style=
"margin-top: 20px"
>
<el-form
ref=
"codeForm"
label-position=
"right"
label-width=
"80px"
>
<el-form-item
label=
"角色员工"
>
<template
v-for=
"(item, index) in roleObj.users"
>
<el-tag
v-if=
"item.userName"
size=
"medium"
:key=
"index"
>
{{
item
.
userName
}}
</el-tag>
</
template
>
</el-form-item>
<el-form-item
label=
"管理范围"
>
<
template
v-if=
"roleObj.dataScope != 2"
>
{{
setName
()
}}
</
template
>
<
template
v-for=
"(item, index) in roleObj.depts"
>
<el-tag
v-if=
"item.deptName"
size=
"medium"
:key=
"index"
>
{{
item
.
deptName
}}
</el-tag>
</
template
>
</el-form-item>
<el-form-item
label=
"功能权限"
>
<el-tree
:data=
"menuOptions"
show-checkbox
ref=
"menu"
node-key=
"id"
disabled
empty-text=
"加载中,请稍后"
:props=
"defaultProps"
></el-tree>
</el-form-item>
</el-form>
</div>
<div
class=
"bottom"
v-if=
"roles[activeIndex]"
>
<el-button
plain
type=
"danger"
>
删除
</el-button>
<el-button
type=
"primary"
@
click=
"edtiFn"
>
编辑
</el-button>
</div>
</div>
<div
v-else-if=
"currentStatus === 'add'"
>
<add-or-edit
key=
"1"
:status=
"currentStatus"
@
update=
"updateFn"
@
cancel=
"cancel"
:list=
"menuOptions"
/>
</div>
<div
v-else
>
<add-or-edit
key=
"2"
:status=
"currentStatus"
:data=
"roleObj"
@
update=
"updateFn"
@
cancel=
"cancel"
:list=
"menuOptions"
/>
</div>
</el-col>
</el-row>
<
template
v-for=
"(item, index) in roleObj.depts"
>
<el-tag
v-if=
"item.deptName"
size=
"medium"
:key=
"index"
>
{{
item
.
deptName
}}
</el-tag>
</
template
>
</el-form-item>
<el-form-item
label=
"功能权限"
>
<el-tree
:data=
"menuOptions"
show-checkbox
ref=
"menu"
node-key=
"id"
disabled
empty-text=
"加载中,请稍后"
:props=
"defaultProps"
></el-tree>
</el-form-item>
</el-form>
</div>
<div
class=
"g-footer-sticky bottom"
v-if=
"roles[activeIndex]"
>
<el-button
plain
type=
"danger"
>
删除
</el-button>
<el-button
type=
"primary"
@
click=
"edtiFn"
>
编辑
</el-button>
</div>
</div>
<div
v-else-if=
"currentStatus === 'add'"
>
<add-or-edit
key=
"1"
:status=
"currentStatus"
@
update=
"updateFn"
@
cancel=
"cancel"
:list=
"menuOptions"
/>
</div>
<div
v-else
>
<add-or-edit
key=
"2"
:status=
"currentStatus"
:data=
"roleObj"
@
update=
"updateFn"
@
cancel=
"cancel"
:list=
"menuOptions"
/>
</div>
</div>
</div>
</template>
...
...
@@ -251,11 +247,8 @@ export default {
align-items
:
center
;
}
.bottom
{
display
:
flex
;
justify-content
:
flex-end
;
border-radius
:
5px
;
padding
:
20px
;
background-color
:
#f5f5f5
;
}
.left
{
border-right
:
1px
solid
#f1f1f1
;
...
...
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