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 74c3aada
authored
Dec 24, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
角色管理
1 parent
5a177f0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
16 deletions
src/views/role/create.vue
src/views/role/index.vue
src/views/role/create.vue
View file @
74c3aad
...
...
@@ -65,27 +65,24 @@
width: footerWidth + 'px'
}"
>
<el-button
class=
"custtom"
size=
"small"
v-if=
"pageType == 'create'"
type=
"primary"
@
click=
"toCreateRole(1)"
>
草稿
</el-button>
<el-button
class=
"custtom"
v-if=
"pageType == 'create'"
type=
"primary"
@
click=
"toCreateRole(1)"
>
草稿
</el-button>
<div
class=
"wrap_driver"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"toCreateRole(0)"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"toCreateRole(0)"
>
确定
</el-button>
</div>
<el-button
size=
"small"
@
click=
"toBack"
>
取消
</el-button>
<el-button
@
click=
"toBack"
>
取消
</el-button>
</div>
</div>
</div>
</template>
<
script
>
import
AutoButton
from
'../../components/auto-button/index.vue'
import
SelectProduct
from
'./components/selectProduct.vue'
export
default
{
name
:
''
,
components
:
{
AutoButton
,
SelectProduct
},
data
()
{
return
{
roleRootRules
:
false
,
...
...
@@ -210,7 +207,6 @@ export default {
this
.
rootList
=
arr
}
let
accounttypeId
=
[]
this
.
rootList
.
forEach
(
item
=>
{
accounttypeId
.
push
(
item
.
accounttypeId
)
})
...
...
@@ -218,7 +214,6 @@ export default {
this
.
accounttypeIds
=
accounttypeId
this
.
$refs
.
productFrom
.
findMenuFunTree
(
item
.
accounttypeId
,
item
.
select
)
},
// 确定按钮---处理参数---提交数据---创建为0---草稿为1
toCreateRole
(
delFlag
)
{
let
{
merchantId
,
roleDesc
,
roleName
}
=
this
.
ruleForm
...
...
@@ -227,7 +222,6 @@ export default {
this
.
$refs
.
ruleForm
.
validateField
(
'merchantId'
)
return
}
if
(
!
roleName
&&
this
.
$refs
.
productFrom
.
getSelectInfo
().
length
==
0
)
{
this
.
$message
.
error
(
'角色和权限至少选择一项'
)
return
...
...
@@ -337,7 +331,6 @@ export default {
this
.
$router
.
push
(
'/role/index'
)
}
},
async
created
()
{
const
{
session
}
=
this
.
$globalState
this
.
accountLevel
=
session
.
accountLevel
...
...
@@ -358,7 +351,6 @@ export default {
// document.getElementById('tab-/account/role/create').innerHTML='修改角色'
}
},
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
...
...
@@ -368,7 +360,6 @@ export default {
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.role-create-page
{
height
:
100%
;
...
...
src/views/role/index.vue
View file @
74c3aad
<
template
>
<div
class=
"role-home-page"
>
<div
class=
"top_widget"
>
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"toCreatePage"
>
创建角色
</el-button>
<!--
<GLButton
size=
"small"
fn=
"创建角色"
icon=
"el-icon-plus"
type=
"primary"
display=
"disabled"
@
click=
"toCreatePage"
>
创建角色
</GLButton>
-->
<!--
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"toCreatePage"
>
创建角色
</el-button>
-->
</div>
<div
class=
"table_widget"
>
<div
class=
"search_widget"
>
...
...
@@ -30,8 +31,10 @@
</div>
<GLTable
v-if=
"distoryTable"
ref=
"table"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"getTableData"
>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"toLookPage(scope.scope)"
>
查看
</el-button>
<el-button
v-if=
"scope.scope.roleName!='超级管理员'"
type=
"text"
@
click=
"toEditPage(scope.scope)"
>
修改
</el-button>
<!--
<el-button
type=
"text"
@
click=
"toLookPage(scope.scope)"
>
查看
</el-button>
-->
<GLButton
type=
"text"
@
click=
"toLookPage(scope.scope)"
fn=
"查看"
>
查看
</GLButton>
<GLButton
v-if=
"!scope.scope.defalutRole"
fn=
"修改"
type=
"text"
display=
"disabled"
@
click=
"toEditPage(scope.scope)"
>
修改
</GLButton>
<!--
<el-button
v-if=
"scope.scope.roleName!='超级管理员'"
type=
"text"
@
click=
"toEditPage(scope.scope)"
>
修改
</el-button>
-->
<el-button
v-if=
"scope.scope.delFlag"
type=
"text"
@
click=
"todelete(scope.scope)"
>
删除
</el-button>
</
template
>
</GLTable>
...
...
@@ -118,7 +121,8 @@ export default {
let
{
delFlag
,
roleName
,
merchantId
}
=
this
.
searchForm
let
para
=
{}
console
.
log
(
merchantId
)
if
(
!
this
.
distoryTable
)
{
//代表重置
if
(
!
this
.
distoryTable
)
{
//代表重置
para
=
{
pageNum
:
1
,
pageSize
:
10
...
...
@@ -217,6 +221,7 @@ export default {
}
})
})
.
catch
(()
=>
{})
}
},
...
...
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