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 1a942727
authored
May 19, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'huy_dev_v2.3.0' of
http://192.168.3.233:8090/saas/scrm-micro-setti…
…ngs into huy_dev_v2.3.0
2 parents
49402f40
c2caf0f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
184 additions
and
6 deletions
src/views/account/index.vue
src/views/baseInfo/components/merchantTree.vue
src/views/employee/index.vue
src/views/account/index.vue
View file @
1a94272
<
template
>
<
template
>
<div
class=
"scrm-main"
>
<div
class=
"scrm-main"
>
<div
class=
"form-header"
v-if=
"$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1"
>
<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>
--
>
<
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
>
<
!--
<el-button
type=
"primary"
@
click=
"handleContact"
size=
"small"
icon=
"el-icon-link"
>
门店账户关联企微
</el-button>
--
>
</div>
</div>
<div
class=
"follow-form"
>
<div
class=
"follow-form"
>
<GLCombiForm
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
...
...
src/views/baseInfo/components/merchantTree.vue
0 → 100644
View file @
1a94272
<!--
* @Description: 选择层级的树结构
* @Author: huyue
* @Date: 2022-04-28 10:15:34
* @LastEditors: huyue
* @LastEditTime: 2022-05-18 18:06:35
-->
<
template
>
<div>
<GLDialog
class=
"tree-dialog"
:visible=
"visible"
@
close=
"handleClose"
:title=
"dialogTitle"
:showClose=
"true"
>
<div>
<div
class=
"el-breadcrumb"
>
<span
class=
"el-breadcrumb__item"
>
<span
class=
"el-breadcrumb__inner"
style=
"cursor: context-menu"
>
{{
$globalState
.
session
.
merchantName
}}
</span>
<i
class=
"el-breadcrumb__separator el-icon-arrow-right"
></i>
</span>
<span
class=
"el-breadcrumb__item"
v-for=
"item in selectLevel"
:key=
"item.departmentId"
@
click=
"backLevel(item)"
>
<span
class=
"el-breadcrumb__inner"
>
{{
item
.
departmentName
}}
</span>
<i
class=
"el-breadcrumb__separator el-icon-arrow-right"
></i>
</span>
<span
class=
"el-breadcrumb__item last-level"
v-if=
"lastLevel"
>
<span
class=
"el-breadcrumb__inner"
>
请选择下级组织结构
</span>
<i
class=
"el-breadcrumb__separator el-icon-arrow-right"
></i>
</span>
</div>
<div>
<div
class=
"tree-list"
:style=
"
{ height: listHeight + 'px' }">
<el-radio-group
v-model=
"checkObj.first"
@
change=
"selectChange"
>
<div
class=
"tree-item"
v-for=
"item in departmentList"
:key=
"item.departmentId"
@
click
.
self=
"toNext(item, $event)"
>
<el-radio
:label=
"item"
:disabled=
"!item.relevanceMerchant"
>
{{
item
.
departmentName
}}
</el-radio>
<i
v-show=
"item.childrenNum"
class=
"el-icon-arrow-right"
></i>
</div>
</el-radio-group>
</div>
</div>
</div>
<div
slot=
"footer"
>
<el-button
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
提交
</el-button>
</div>
</GLDialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
'MerchantTree'
,
data
()
{
return
{
visible
:
false
,
dialogTitle
:
'选择商户账户'
,
listHeight
:
220
,
departmentList
:
[],
parentMerchantList
:
[],
subSubMerchantList
:
[],
checkObj
:
{
first
:
''
},
// 选中的用来展示面包屑
selectLevel
:
[
// {
// merchantId: this.$globalState.session.merchantId,
// merchantName: this.$globalState.session.merchantName,
// level: 0
// }
],
lastLevel
:
true
// 是否显示请选择
}
},
mounted
()
{
this
.
getDepartmentList
()
},
methods
:
{
// 获取门店数据
getDepartmentList
(
depth
,
id
)
{
var
params
=
{}
depth
?
(
params
.
depth
=
depth
)
:
(
params
.
depth
=
0
)
if
(
id
)
{
params
.
departmentId
=
id
}
this
.
$apis
.
baseInfo
.
getDepartment
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
departmentList
=
res
console
.
log
(
this
.
departmentList
)
})
},
handleClose
()
{
this
.
visible
=
false
},
submit
()
{
console
.
log
(
this
.
checkObj
)
if
(
!
this
.
checkObj
)
{
this
.
$message
({
message
:
'请选择门店'
,
type
:
'warning'
})
return
}
this
.
$emit
(
'select'
,
this
.
checkObj
)
this
.
visible
=
false
},
// 选中时触发
selectChange
(
val
)
{
console
.
log
(
val
)
this
.
$set
(
this
.
selectLevel
,
val
.
depth
-
1
,
val
)
// this.lastLevel = false
val
.
childrenNum
?
(
this
.
lastLevel
=
true
)
:
(
this
.
lastLevel
=
false
)
// this.lastLevel = val.hasChildren
},
// 跳转下一级,需判断是否有下一级
toNext
(
item
,
event
)
{
console
.
log
(
item
,
this
.
checkObj
,
event
)
console
.
log
(
item
.
departmentId
)
if
(
item
.
childrenNum
)
{
this
.
checkObj
.
first
=
''
this
.
lastLevel
=
true
this
.
getDepartmentList
(
item
.
depth
,
item
.
id
)
this
.
selectLevel
[
item
.
depth
-
1
]
=
item
console
.
log
(
this
.
selectLevel
)
}
},
// 点击页签,返回
backLevel
(
item
)
{
console
.
log
(
item
)
this
.
checkObj
.
first
=
''
item
.
childrenNum
?
(
this
.
lastLevel
=
true
)
:
(
this
.
lastLevel
=
false
)
console
.
log
(
this
.
selectLevel
)
this
.
selectLevel
=
this
.
selectLevel
.
slice
(
0
,
item
.
depth
-
1
)
this
.
getDepartmentList
(
item
.
depth
-
1
)
console
.
log
(
this
.
selectLevel
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.el-breadcrumb
{
line-height
:
28px
;
}
.el-radio__label
{
color
:
#333
;
}
.tree-dialog
{
/deep/
{
.last-level
{
.el-breadcrumb__inner
{
color
:
#5850ff
;
}
}
.el-breadcrumb__inner
{
font-weight
:
normal
;
cursor
:
pointer
;
}
.el-dialog__body
{
padding
:
20px
;
}
}
}
.tree
{
&-list
{
margin-top
:
10px
;
overflow
:
auto
;
.el-radio-group
{
width
:
100%
;
}
}
&
-item
{
padding
:
15px
0
11px
;
border-top
:
1px
solid
#e6e6e6
;
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
i
{
font-size
:
12px
;
}
}
}
</
style
>
src/views/employee/index.vue
View file @
1a94272
...
@@ -14,12 +14,12 @@
...
@@ -14,12 +14,12 @@
<div
class=
"table-btn"
>
<div
class=
"table-btn"
>
<el-button
@
click=
"handleExport"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
导出
</el-button>
<el-button
@
click=
"handleExport"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
导出
</el-button>
<GLButton
@
click=
"handleExport"
fn=
"导出"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
导出
</GLButton>
<GLButton
@
click=
"handleExport"
fn=
"导出"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
导出
</GLButton>
<el-button
v-if=
"userInfo.accountLevel == 4"
:size=
"size"
plain
@
click=
"batch(1)"
>
批量分配角色
</el-button>
<el-button
v-if=
"userInfo.accountLevel == 4
|| user.isMerchantStaffAdmin
"
:size=
"size"
plain
@
click=
"batch(1)"
>
批量分配角色
</el-button>
<el-button
v-if=
"userInfo.accountLevel == 4"
:size=
"size"
plain
@
click=
"batch(2)"
>
批量启用
</el-button>
<el-button
v-if=
"userInfo.accountLevel == 4
|| user.isMerchantStaffAdmin
"
:size=
"size"
plain
@
click=
"batch(2)"
>
批量启用
</el-button>
</div>
</div>
</div>
</div>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<GLTable
ref=
"employeeRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"$globalState.session.accountLevel == 4 ? tableParams1 : tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
@
paginationlisteners=
"paginationlisteners"
>
<GLTable
ref=
"employeeRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"$globalState.session.accountLevel == 4
|| $globalState.session.isMerchantStaffAdmin
? tableParams1 : tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
@
paginationlisteners=
"paginationlisteners"
>
<div
slot=
"optionBtns"
slot-scope=
"scope"
>
<div
slot=
"optionBtns"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope.scope"
></GLTableButton>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope.scope"
></GLTableButton>
<!--
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
查看
</el-button>
<!--
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
查看
</el-button>
...
@@ -412,7 +412,7 @@ export default {
...
@@ -412,7 +412,7 @@ export default {
this
.
getOptionsList
(
'searchFormData'
,
true
,
'roleId'
)
this
.
getOptionsList
(
'searchFormData'
,
true
,
'roleId'
)
value
&&
value
&&
this
.
$apis
.
employee
.
getRoleListApi
({
id
:
value
}).
then
(
res
=>
{
this
.
$apis
.
employee
.
getRoleListApi
({
id
:
value
}).
then
(
res
=>
{
this
.
baseData
.
roleList
=
res
this
.
baseData
.
roleList
=
res
.
filter
(
item
=>
item
.
delFlag
==
0
)
this
.
getOptionsList
(
'searchFormData'
,
true
,
'roleId'
)
this
.
getOptionsList
(
'searchFormData'
,
true
,
'roleId'
)
})
})
},
},
...
...
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