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 1fd0cce2
authored
Jun 29, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
elbutton切换glbutton
1 parent
af33400b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
5 additions
and
29 deletions
src/views/account/index.vue
src/views/employee/components/createRole.vue
src/views/employee/components/selectProduct.vue
src/views/role/components/selectProduct.vue
src/views/role/create.vue
src/views/role/index.vue
src/views/role/look.vue
src/views/account/index.vue
View file @
1fd0cce
<
template
>
<div
class=
"scrm-main"
>
<div
class=
"form-header"
v-if=
"$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1"
>
<
!--
<GLButton
@
click=
"handleContact"
icon=
"el-icon-link"
fn=
"门店账户关联企微"
type=
"primary"
size=
"small"
mode=
"el-button"
>
门店账户关联企微
</GLButton>
--
>
<
el-button
type=
"primary"
@
click=
"handleContact"
size=
"small"
icon=
"el-icon-link"
>
门店账户关联企微
</el-button
>
<
GLButton
@
click=
"handleContact"
icon=
"el-icon-link"
fn=
"门店账户关联企微"
type=
"primary"
size=
"small"
mode=
"el-button"
>
门店账户关联企微
</GLButton
>
<
!--
<el-button
type=
"primary"
@
click=
"handleContact"
size=
"small"
icon=
"el-icon-link"
>
门店账户关联企微
</el-button>
--
>
</div>
<div
class=
"follow-form"
>
<GLCombiForm
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
...
...
src/views/employee/components/createRole.vue
View file @
1fd0cce
...
...
@@ -87,7 +87,6 @@ export default {
// 选择商户----获取权限
async
selectMerchant
(
id
,
list
)
{
let
res
=
await
this
.
$refs
.
productFrom
.
findMenuFunTreeByMerId
({
id
})
console
.
log
(
res
)
this
.
accountListSelect
=
res
.
map
(
item
=>
{
item
.
select
=
false
return
item
...
...
src/views/employee/components/selectProduct.vue
View file @
1fd0cce
...
...
@@ -84,7 +84,6 @@ export default {
},
methods
:
{
handleClik
(
tab
,
event
)
{
console
.
log
(
tab
,
event
)
const
tabId
=
tab
.
name
const
productTab
=
this
.
tabMenu
.
find
(
i
=>
i
.
accounttypeId
==
tabId
)
this
.
productTab
=
productTab
.
productsArr
[
0
]
?
productTab
.
productsArr
[
0
].
productId
:
''
...
...
@@ -94,7 +93,6 @@ export default {
this
.
$parent
.
editStatus
=
true
this
.
productTab
=
data
.
length
!=
0
?
data
[
data
.
length
-
1
].
productId
:
''
const
{
tabName
,
tabMenu
,
productTab
}
=
this
console
.
log
(
tabName
,
data
,
productTab
,
'选中'
)
// 设置全选
var
merchantProTreeResponses
=
tabMenu
.
find
(
i
=>
i
.
accounttypeId
==
tabName
).
products
.
find
(
j
=>
j
.
productId
==
productTab
)
var
arr
=
merchantProTreeResponses
?
merchantProTreeResponses
.
merchantProTreeResponses
:
''
...
...
@@ -137,7 +135,6 @@ export default {
let
accounttypeId
=
this
.
tabMenu
.
find
(
item
=>
item
)
this
.
tabName
=
accounttypeId
?
accounttypeId
.
accounttypeId
+
''
:
''
}
console
.
log
(
this
.
tabMenu
)
this
.
tabMenuStatus
=
this
.
tabMenu
.
some
(
item
=>
item
)
},
// 获取当前的所有权限
...
...
@@ -192,12 +189,10 @@ export default {
},
// 获取已选择的权限
findPermissionsByMerId
(
arr
)
{
console
.
log
(
arr
)
let
accounttypeId
=
[]
arr
.
forEach
(
item
=>
{
accounttypeId
.
push
(
item
.
accounttypeId
)
this
.
accountList
.
forEach
((
itm
,
index
)
=>
{
console
.
log
(
accounttypeId
)
if
(
accounttypeId
.
includes
(
itm
.
accounttypeId
))
{
this
.
tabMenu
[
index
]
=
itm
if
(
!
item
.
productList
)
{
...
...
@@ -333,7 +328,6 @@ export default {
uniteChildSame
(
treeList
,
isSelected
)
{
const
tree_ref
=
`tree_
${
this
.
tabName
}
_
${
this
.
productTab
}
`
this
.
$refs
[
tree_ref
][
0
].
setChecked
(
treeList
.
id
,
isSelected
)
console
.
log
(
treeList
)
if
(
treeList
.
children
!==
null
)
{
for
(
let
i
=
0
;
i
<
treeList
.
children
.
length
;
i
++
)
{
this
.
uniteChildSame
(
treeList
.
children
[
i
],
isSelected
)
...
...
@@ -371,7 +365,6 @@ export default {
let
productList
=
[]
item
.
productsArr
.
forEach
(
itm
=>
{
const
checkedNodes
=
this
.
$refs
[
`tree_
${
item
.
accounttypeId
}
_
${
itm
.
productId
}
`
]
?
this
.
$refs
[
`tree_
${
item
.
accounttypeId
}
_
${
itm
.
productId
}
`
][
0
].
getCheckedNodes
()
:
[]
console
.
log
(
checkedNodes
)
const
menuIdList
=
checkedNodes
// .filter((item) => item.logo === "menu")
.
filter
(
item
=>
item
.
logo
!==
'function'
&&
item
.
logo
!==
'functionValue'
&&
item
.
logo
!==
'neglect'
)
...
...
@@ -403,7 +396,6 @@ export default {
})
})
}
console
.
log
(
menuIdList
,
functionIdList
,
functionValueIdLists
,
list
)
if
(
this
.
roleType
)
{
productList
.
push
({
productId
:
itm
.
productId
,
...
...
@@ -432,7 +424,6 @@ export default {
}
}
})
console
.
log
(
this
.
accountTypes
,
' =-=-=-=-=='
)
return
this
.
accountTypes
}
},
...
...
src/views/role/components/selectProduct.vue
View file @
1fd0cce
...
...
@@ -84,7 +84,6 @@ export default {
},
methods
:
{
handleClik
(
tab
,
event
)
{
console
.
log
(
tab
)
const
tabId
=
tab
.
name
const
productTab
=
this
.
tabMenu
.
find
(
i
=>
i
.
accounttypeId
==
tabId
)
this
.
productTab
=
productTab
.
productsArr
[
0
]
?
productTab
.
productsArr
[
0
].
productId
:
''
...
...
@@ -94,7 +93,6 @@ export default {
this
.
$parent
.
editStatus
=
true
this
.
productTab
=
data
.
length
!=
0
?
data
[
data
.
length
-
1
].
productId
:
''
const
{
tabName
,
tabMenu
,
productTab
}
=
this
console
.
log
(
tabName
,
data
,
productTab
,
'选中'
)
// 设置全选
var
merchantProTreeResponses
=
tabMenu
.
find
(
i
=>
i
.
accounttypeId
==
tabName
).
products
.
find
(
j
=>
j
.
productId
==
productTab
)
var
arr
=
merchantProTreeResponses
?
merchantProTreeResponses
.
merchantProTreeResponses
:
''
...
...
@@ -137,7 +135,6 @@ export default {
let
accounttypeId
=
this
.
tabMenu
.
find
(
item
=>
item
)
this
.
tabName
=
accounttypeId
?
accounttypeId
.
accounttypeId
+
''
:
''
}
console
.
log
(
this
.
tabMenu
)
this
.
tabMenuStatus
=
this
.
tabMenu
.
some
(
item
=>
item
)
},
// 获取当前的所有权限
...
...
@@ -192,7 +189,6 @@ export default {
},
// 获取已选择的权限
findPermissionsByMerId
(
arr
)
{
console
.
log
(
arr
)
let
accounttypeId
=
[]
arr
.
forEach
(
item
=>
{
accounttypeId
.
push
(
item
.
accounttypeId
)
...
...
@@ -333,7 +329,6 @@ export default {
uniteChildSame
(
treeList
,
isSelected
)
{
const
tree_ref
=
`tree_
${
this
.
tabName
}
_
${
this
.
productTab
}
`
this
.
$refs
[
tree_ref
][
0
].
setChecked
(
treeList
.
id
,
isSelected
)
console
.
log
(
treeList
)
if
(
treeList
.
children
!==
null
)
{
for
(
let
i
=
0
;
i
<
treeList
.
children
.
length
;
i
++
)
{
this
.
uniteChildSame
(
treeList
.
children
[
i
],
isSelected
)
...
...
@@ -371,7 +366,6 @@ export default {
let
productList
=
[]
item
.
productsArr
.
forEach
(
itm
=>
{
const
checkedNodes
=
this
.
$refs
[
`tree_
${
item
.
accounttypeId
}
_
${
itm
.
productId
}
`
]
?
this
.
$refs
[
`tree_
${
item
.
accounttypeId
}
_
${
itm
.
productId
}
`
][
0
].
getCheckedNodes
()
:
[]
console
.
log
(
checkedNodes
)
const
menuIdList
=
checkedNodes
// .filter((item) => item.logo === "menu")
.
filter
(
item
=>
item
.
logo
!==
'function'
&&
item
.
logo
!==
'functionValue'
&&
item
.
logo
!==
'neglect'
)
...
...
@@ -432,7 +426,6 @@ export default {
}
}
})
console
.
log
(
this
.
accountTypes
,
' =-=-=-=-=='
)
return
this
.
accountTypes
}
},
...
...
src/views/role/create.vue
View file @
1fd0cce
...
...
@@ -59,16 +59,13 @@
</div>
</el-col>
</el-row>
<!-- <div > -->
<SelectProduct
class=
"role-detail"
ref=
"productFrom"
:roleType=
"true"
></SelectProduct>
<!-- </div> -->
</div>
<GLFooter
style=
"z-index: 1"
>
<el-button
@
click=
"toBack"
>
取消
</el-button>
<el-button
v-if=
"pageType == 'create'"
type=
"primary"
plain
@
click=
"toCreateRole(1)"
>
存为草稿
</el-button>
<el-button
type=
"primary"
@
click=
"toCreateRole(0)"
>
提交
</el-button>
</GLFooter>
<!-- </div> -->
</div>
</template>
<
script
>
...
...
@@ -143,7 +140,6 @@ export default {
// 获取商户树
getMerchantTree
(
id
,
list
)
{
this
.
$apis
.
role
.
roleTreeDataById
({
id
}).
then
(
res
=>
{
console
.
log
(
res
)
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
res
.
length
;
j
++
)
{
if
(
res
[
j
].
accounttypeId
==
list
[
i
].
accounttypeId
)
{
...
...
@@ -152,7 +148,6 @@ export default {
}
}
this
.
accountListSelect
=
res
console
.
log
(
this
.
accountListSelect
)
})
},
getMerchantName
()
{
...
...
@@ -213,7 +208,6 @@ export default {
this
.
rootList
.
forEach
(
item
=>
{
accounttypeId
.
push
(
item
.
accounttypeId
)
})
console
.
log
(
this
.
rootList
,
accounttypeId
,
'99999'
)
this
.
accounttypeIds
=
accounttypeId
this
.
$refs
.
productFrom
.
findMenuFunTree
(
item
.
accounttypeId
,
item
.
select
)
},
...
...
src/views/role/index.vue
View file @
1fd0cce
...
...
@@ -14,10 +14,10 @@
{{
scope
.
scope
.
statusName
}}
</div>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<
!--
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope.scope"
></GLTableButton>
--
>
<el-button
type=
"text"
@
click=
"toLookPage(scope.scope)"
>
查看
</el-button>
<
GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope.scope"
></GLTableButton
>
<
!--
<
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
v-if=
"scope.scope.delFlag"
type=
"text"
@
click=
"todelete(scope.scope)"
>
删除
</el-button>
<el-button
v-if=
"scope.scope.delFlag"
type=
"text"
@
click=
"todelete(scope.scope)"
>
删除
</el-button>
-->
</
template
>
</GLTable>
</div>
...
...
src/views/role/look.vue
View file @
1fd0cce
...
...
@@ -155,7 +155,6 @@ export default {
})
)
this
.
newTreeList
=
this
.
toContiuneTree
(
this
.
newTreeList
,
0
,
maxval
)
console
.
log
(
this
.
newTreeList
)
this
.
maxval
=
maxval
-
1
this
.
$nextTick
(()
=>
{
this
.
changeTreeClass
(
maxval
)
...
...
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