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 53ce2e8f
authored
May 11, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
关联企微交互
1 parent
cbc2282a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
23 deletions
src/views/account/index.vue
src/views/baseInfo/components/merchantTree.vue
src/views/baseInfo/components/search.vue
src/views/baseInfo/relevance.vue
src/views/account/index.vue
View file @
53ce2e8
<
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/baseInfo/components/merchantTree.vue
View file @
53ce2e8
...
...
@@ -28,7 +28,7 @@
<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 merchantList"
:key=
"item.merchantId"
@
click
.
self=
"toNext(item, $event)"
>
<el-radio
:label=
"item"
:disabled=
"item.disabled
"
>
{{
item
.
mercha
ntName
}}
</el-radio>
<el-radio
:label=
"item"
:disabled=
"item.disabled
|| item.children"
>
{{
item
.
departme
ntName
}}
</el-radio>
<i
v-show=
"item.hasChildren"
class=
"el-icon-arrow-right"
></i>
</div>
</el-radio-group>
...
...
@@ -242,15 +242,32 @@ export default {
}
},
mounted
()
{
this
.
merchantList
=
this
.
parentMerchantList
// this.merchantList = this.parentMerchantList
this
.
getDepartmentList
()
},
methods
:
{
// 获取门店数据
getDepartmentList
()
{
this
.
$apis
.
baseInfo
.
getDepartment
({}).
then
(
res
=>
{
// this.departmentList = this.traverse(1, res, 'relevanceMerchant')
console
.
log
(
res
[
0
],
'=='
)
this
.
merchantList
=
res
[
0
].
children
})
},
handleClose
()
{
this
.
visible
=
false
},
submit
()
{
console
.
log
(
this
.
checkObj
)
this
.
$emit
(
'select'
)
if
(
!
this
.
checkObj
)
{
this
.
$message
({
message
:
'请选择门店'
,
type
:
'warning'
})
return
}
this
.
$emit
(
'select'
,
this
.
checkObj
)
this
.
visible
=
false
},
// 选中时触发
selectChange
(
val
)
{
...
...
@@ -336,4 +353,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/baseInfo/components/search.vue
View file @
53ce2e8
...
...
@@ -21,7 +21,7 @@
<li>
无数据
</li>
</
template
>
</ul>
<el-input
slot=
"reference"
debounce
style=
"width: 320px"
v-model=
"searchKey.
mercha
ntName"
:size=
"size"
@
input=
"handleInput"
@
blur=
"handleBlur"
placeholder=
"请输入内容"
>
<el-input
slot=
"reference"
debounce
style=
"width: 320px"
v-model=
"searchKey.
departme
ntName"
:size=
"size"
@
input=
"handleInput"
@
blur=
"handleBlur"
placeholder=
"请输入内容"
>
<!-- <i slot="suffix" class="el-input__icon el-icon-arrow-down" :class="isOpen ? 'is-focus' : ''"></i> -->
<
template
slot=
"append"
>
<div
class=
"input_append"
@
click
.
stop=
"arrowClick"
>
...
...
@@ -30,7 +30,7 @@
</
template
>
</el-input>
</el-popover>
<MerchantTree
ref=
"merchantTree"
></MerchantTree>
<MerchantTree
ref=
"merchantTree"
@
select=
"select"
></MerchantTree>
</div>
</template>
...
...
@@ -46,7 +46,7 @@ export default {
return
{
searchKey
:
{
id
:
''
,
mercha
ntName
:
''
departme
ntName
:
''
},
// 绑定input的值
isOpen
:
false
,
visible
:
false
,
...
...
@@ -130,7 +130,7 @@ export default {
this
.
$refs
.
merchantTree
.
visible
=
true
}
},
handleInput
:
utils
.
debounce
(
function
(
val
)
{
handleInput
:
utils
.
debounce
(
function
(
val
)
{
console
.
log
(
val
)
this
.
getSearchList
(
val
)
},
300
),
...
...
@@ -153,6 +153,12 @@ export default {
// this.searchList = [val]
this
.
visible
=
false
},
select
(
val
)
{
console
.
log
(
val
)
this
.
searchKey
.
id
=
val
.
first
.
merchantId
this
.
searchKey
.
departmentName
=
val
.
first
.
departmentName
this
.
$emit
(
'getCurDepartment'
,
val
.
first
)
},
handleBlur
()
{
// this.visible = false
// this.searchKey = ''
...
...
@@ -218,4 +224,4 @@ export default {
.search-popper
{
padding
:
0
!important
;
}
</
style
>
\ No newline at end of file
</
style
>
src/views/baseInfo/relevance.vue
View file @
53ce2e8
...
...
@@ -35,7 +35,7 @@
</div>
<div
class=
"select_wrapper"
>
<div
class=
"label"
>
企业微信
</div>
<SearchSelect></SearchSelect>
<SearchSelect
@
getCurDepartment=
"getCurDepartment"
></SearchSelect>
<!-- <el-cascader ref="cascaderRef" @change="getCurDepartment" placeholder="请选择企微门店" :show-all-levels="false" v-model="selectedDepartment" :props="mypropsParam" :options="departmentList" size="small" style="width: 320px" separator=" " filterable>
<template slot-scope="{ data }">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.departmentName.length > 12 ? false : true" class="item" effect="light" :content="data.departmentName" placement="top-end">
...
...
@@ -160,7 +160,7 @@ export default {
// 设置底部按钮宽度
setBtnWidth
()
{
let
_this
=
this
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
_this
.
customWidth
=
_this
.
$refs
.
btnWidth
.
clientWidth
})
},
...
...
@@ -177,14 +177,19 @@ export default {
},
// 获取当前选择的部门
getCurDepartment
(
val
)
{
let
ids
=
val
[
val
.
length
-
1
]
let
labels
=
this
.
$refs
.
cascaderRef
.
getCheckedNodes
()[
0
].
pathLabels
let
curLabel
=
labels
[
labels
.
length
-
1
]
console
.
log
(
val
,
'---'
)
this
.
tempDepart
=
{
departmentId
:
ids
,
departmentName
:
curLabel
departmentId
:
val
.
merchantId
,
departmentName
:
val
.
departmentName
}
this
.
$refs
.
cascaderRef
.
dropDownVisible
=
false
// let ids = val[val.length - 1]
// let labels = this.$refs.cascaderRef.getCheckedNodes()[0].pathLabels
// let curLabel = labels[labels.length - 1]
// this.tempDepart = {
// departmentId: ids,
// departmentName: curLabel
// }
// this.$refs.cascaderRef.dropDownVisible = false
},
getDepartmentList
()
{
this
.
$apis
.
baseInfo
.
getDepartment
({
id
:
1
,
flag
:
true
}).
then
(
res
=>
{
...
...
@@ -345,7 +350,7 @@ export default {
this
.
getMerchantList
()
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.gl-page
{
...
...
@@ -509,4 +514,4 @@ export default {
border-color
:
#5850ff
;
border-radius
:
4px
;
}
</
style
>
\ No newline at end of file
</
style
>
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