Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-drainage
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 5945b3bf
authored
Mar 25, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
css
1 parent
c52f070d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
32 deletions
src/components/screenTag/index.vue
src/components/selectTag/index.vue
src/views/market/configDetail.vue
src/components/screenTag/index.vue
View file @
5945b3b
...
@@ -11,11 +11,11 @@
...
@@ -11,11 +11,11 @@
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<div
class=
"checkbox-group-box"
:style=
"
{ height: heightBox + 'px' }">
<div
class=
"checkbox-group-box"
:style=
"
{ height: heightBox + 'px' }">
<div
style=
"margin-bottom: 8px"
class=
"checkbox-box"
v-for=
"(item, index) in labelTreeRets"
:key=
"index"
@
click=
"item.checked = !item.checked"
>
<div
style=
"margin-bottom: 8px"
class=
"checkbox-box"
v-for=
"(item, index) in labelTreeRets"
:key=
"index"
@
click
.
self
=
"item.checked = !item.checked"
>
<span
class=
"el-tree-node__expand-icon el-icon-caret-right"
:class=
"
{ expanded: item.checked }" @click="item.checked = !item.checked">
</span>
<span
class=
"el-tree-node__expand-icon el-icon-caret-right"
:class=
"
{ expanded: item.checked }" @click
.self
="item.checked = !item.checked">
</span>
{{
item
.
labelGroup
.
name
}}
{{
item
.
labelGroup
.
name
}}
<el-tag
:size=
"size"
>
{{
item
.
labelType
}}
</el-tag>
<el-tag
:size=
"size"
>
{{
item
.
labelType
}}
</el-tag>
<el-radio-group
class=
"tag-group"
v-model=
"item.tagChecked"
v-
show=
"item.checked
"
>
<el-radio-group
class=
"tag-group"
v-model=
"item.tagChecked"
v-
if=
"item.checked"
@
change=
"handleCheckedTag
"
>
<div
v-for=
"(itm, idx) in item.labelList"
:key=
"idx"
class=
"radio-tag"
>
<div
v-for=
"(itm, idx) in item.labelList"
:key=
"idx"
class=
"radio-tag"
>
<el-tooltip
effect=
"dark"
placement=
"top"
:disabled=
"itm.name.length
< 8
"
>
<el-tooltip
effect=
"dark"
placement=
"top"
:disabled=
"itm.name.length
< 8
"
>
<el-radio
:disabled=
"isLabelType(item.labelType)"
class=
"radio-text"
:label=
"itm"
>
{{
itm
.
name
}}
</el-radio>
<el-radio
:disabled=
"isLabelType(item.labelType)"
class=
"radio-text"
:label=
"itm"
>
{{
itm
.
name
}}
</el-radio>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<div
class=
"tag-select-box"
>
<div
class=
"tag-select-box"
>
<div
class=
"tag-box-header"
>
标签名称(
{{
selectNum
}}
项)
</div>
<div
class=
"tag-box-header"
>
标签名称(
{{
selectNum
}}
项)
</div>
<div
class=
"tag-selected-box"
:style=
"
{ height: heightBox + 'px' }">
<div
class=
"tag-selected-box"
:style=
"
{ height: heightBox + 'px' }">
<template
v-for=
"item in labelTreeRet
s
"
>
<template
v-for=
"item in labelTreeRet
Select
"
>
<el-tag
:title=
"item.tagChecked.name"
v-if=
"item.tagChecked"
type=
"info"
class=
"tag-selected-item"
:key=
"item.tagChecked"
closable
:disable-transitions=
"false"
@
close=
"remove(item, idx)"
>
<el-tag
:title=
"item.tagChecked.name"
v-if=
"item.tagChecked"
type=
"info"
class=
"tag-selected-item"
:key=
"item.tagChecked"
closable
:disable-transitions=
"false"
@
close=
"remove(item, idx)"
>
{{
item
.
tagChecked
.
name
}}
{{
item
.
tagChecked
.
name
}}
</el-tag>
</el-tag>
...
@@ -62,6 +62,7 @@ export default {
...
@@ -62,6 +62,7 @@ export default {
labelGroupName
:
''
,
labelGroupName
:
''
,
selectNum
:
0
,
selectNum
:
0
,
searchStatus
:
false
,
searchStatus
:
false
,
labelTreeRetSelect
:
[],
labelTreeRets
:
[
labelTreeRets
:
[
// {
// {
// labelGroup: { id: '109', name: '湖口123' },
// labelGroup: { id: '109', name: '湖口123' },
...
@@ -91,24 +92,39 @@ export default {
...
@@ -91,24 +92,39 @@ export default {
}
}
},
},
watch
:
{
watch
:
{
labelTreeRet
s
:
{
labelTreeRet
Select
:
{
handler
()
{
handler
()
{
this
.
selectNum
=
0
this
.
selectNum
=
0
this
.
labelType
=
[]
this
.
labelType
=
[]
this
.
labelTreeRets
.
forEach
(
item
=>
{
console
.
log
(
new
Date
())
this
.
labelTreeRetSelect
.
forEach
(
item
=>
{
if
(
item
.
tagChecked
)
{
if
(
item
.
tagChecked
)
{
this
.
selectNum
++
this
.
selectNum
++
if
(
!
this
.
labelType
.
includes
(
item
.
labelType
))
{
if
(
!
this
.
labelType
.
includes
(
item
.
labelType
))
{
this
.
labelType
.
push
(
item
.
labelType
)
this
.
labelType
.
push
(
item
.
labelType
)
}
}
console
.
log
(
this
.
labelType
)
}
}
})
})
this
.
$nextTick
(()
=>
{
console
.
log
(
new
Date
())
})
},
},
deep
:
true
deep
:
true
}
}
},
},
methods
:
{
methods
:
{
// 选择标签
handleCheckedTag
()
{
this
.
labelTreeRets
.
forEach
(
item
=>
{
this
.
labelTreeRetSelect
.
forEach
(
tag
=>
{
if
(
tag
.
labelGroup
.
id
==
item
.
labelGroup
.
id
&&
item
.
tagChecked
)
{
let
labelId
=
item
.
tagChecked
?
item
.
tagChecked
.
id
:
''
let
index
=
tag
.
labelList
.
findIndex
(
iem
=>
iem
.
id
==
labelId
)
tag
.
tagChecked
=
tag
.
labelList
[
index
]
}
})
})
},
isLabelType
(
label
)
{
isLabelType
(
label
)
{
return
this
.
labelType
.
length
>
0
&&
!
this
.
labelType
.
includes
(
label
)
return
this
.
labelType
.
length
>
0
&&
!
this
.
labelType
.
includes
(
label
)
},
},
...
@@ -163,9 +179,8 @@ export default {
...
@@ -163,9 +179,8 @@ export default {
}
}
})
})
})
})
this
.
labelTreeRetSelect
=
utils
.
deepClone
(
this
.
labelTreeRets
)
}
else
{
}
else
{
const
labelTreeRets
=
utils
.
deepClone
(
this
.
labelTreeRets
)
console
.
log
(
labelTreeRets
)
this
.
labelTreeRets
=
res
.
labelTreeRets
.
map
(
item
=>
{
this
.
labelTreeRets
=
res
.
labelTreeRets
.
map
(
item
=>
{
return
{
return
{
labelType
:
item
.
labelType
,
labelType
:
item
.
labelType
,
...
@@ -177,26 +192,53 @@ export default {
...
@@ -177,26 +192,53 @@ export default {
checkAll
:
false
checkAll
:
false
}
}
})
})
console
.
log
(
labelTreeRets
)
this
.
labelTreeRetSelect
.
forEach
(
item
=>
{
labelTreeRets
.
forEach
(
item
=>
{
this
.
labelTreeRets
.
forEach
(
tag
=>
{
this
.
labelTreeRets
.
forEach
(
tag
=>
{
if
(
item
.
labelGroup
.
id
==
tag
.
labelGroup
.
i
d
)
{
if
(
tag
.
labelGroup
.
id
==
item
.
labelGroup
.
id
&&
item
.
tagChecke
d
)
{
let
labelId
=
item
.
tagChecked
?
item
.
tagChecked
.
id
:
''
let
labelId
=
item
.
tagChecked
?
item
.
tagChecked
.
id
:
''
let
index
=
tag
.
labelList
.
findIndex
(
iem
=>
iem
.
id
==
labelId
)
let
index
=
tag
.
labelList
.
findIndex
(
iem
=>
iem
.
id
==
labelId
)
tag
.
tagChecked
=
tag
.
labelList
[
index
]
tag
.
tagChecked
=
tag
.
labelList
[
index
]
// }
}
}
})
})
})
})
// labelTreeRets.forEach(item => {
// this.labelTreeRets.forEach(tag => {
// if (item.labelGroup.id == tag.labelGroup.id) {
// let labelId = item.tagChecked ? item.tagChecked.id : ''
// let index = tag.labelList.findIndex(iem => iem.id == labelId)
// tag.tagChecked = tag.labelList[index]
// }
// })
// })
if
(
this
.
labelTreeRetSelect
.
length
==
0
)
{
this
.
labelTreeRetSelect
=
utils
.
deepClone
(
this
.
labelTreeRets
)
}
}
}
})
})
},
},
remove
(
item
,
idx
)
{
remove
(
item
,
idx
)
{
item
.
tagChecked
=
null
item
.
tagChecked
=
null
this
.
labelTreeRetSelect
.
forEach
(
item
=>
{
this
.
labelTreeRets
.
forEach
(
tag
=>
{
if
(
tag
.
labelGroup
.
id
==
item
.
labelGroup
.
id
)
{
if
(
item
.
tagChecked
)
{
let
labelId
=
item
.
tagChecked
?
item
.
tagChecked
.
id
:
''
let
index
=
tag
.
labelList
.
findIndex
(
iem
=>
iem
.
id
==
labelId
)
tag
.
tagChecked
=
tag
.
labelList
[
index
]
}
else
{
tag
.
tagChecked
=
null
}
// }
}
})
})
},
},
//选中
//选中
handleSelect
()
{
handleSelect
()
{
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
let
labelTreeRets
=
this
.
labelTreeRet
s
let
labelTreeRets
=
this
.
labelTreeRet
Select
.
map
(
item
=>
{
.
map
(
item
=>
{
if
(
item
.
tagChecked
)
{
if
(
item
.
tagChecked
)
{
return
{
return
{
...
@@ -345,5 +387,6 @@ export default {
...
@@ -345,5 +387,6 @@ export default {
}
}
.tag-selected-box
{
.tag-selected-box
{
min-height
:
200px
;
min-height
:
200px
;
overflow-y
:
auto
;
}
}
</
style
>
</
style
>
src/components/selectTag/index.vue
View file @
5945b3b
...
@@ -9,12 +9,12 @@
...
@@ -9,12 +9,12 @@
<el-input
size=
"small"
v-model=
"labelGroupName"
placeholder=
"请输入搜索内容"
></el-input>
<el-input
size=
"small"
v-model=
"labelGroupName"
placeholder=
"请输入搜索内容"
></el-input>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</div>
</div>
<div
class=
"checkbox-group-box"
:style=
"
{ height: heightBox + 'px' }">
<div
class=
"checkbox-group-box"
:style=
"
{ height: heightBox + 'px' }"
v-loading="loading"
>
<div
style=
"margin-bottom: 8px"
v-for=
"(item, index) in labelTreeRets"
:key=
"index"
>
<div
style=
"margin-bottom: 8px"
v-for=
"(item, index) in labelTreeRets"
:key=
"index"
>
<span
class=
"el-tree-node__expand-icon el-icon-caret-right"
:class=
"
{ expanded: item.checked }" @click="item.checked = !item.checked">
</span>
<span
class=
"el-tree-node__expand-icon el-icon-caret-right"
:class=
"
{ expanded: item.checked }" @click
.self
="item.checked = !item.checked">
</span>
<el-checkbox
:indeterminate=
"item.isIndeterminate"
v-model=
"item.checkAll"
@
change=
"handleCheckAllChange(item.checkAll, index)"
>
{{
item
.
labelGroup
.
name
}}
(
{{
item
.
tagChecked
.
length
}}
/
{{
item
.
labelList
.
length
}}
项)
</el-checkbox>
<el-checkbox
:indeterminate=
"item.isIndeterminate"
v-model=
"item.checkAll"
@
change=
"handleCheckAllChange(item.checkAll, index)"
>
{{
item
.
labelGroup
.
name
}}
(
{{
item
.
tagChecked
.
length
}}
/
{{
item
.
labelList
.
length
}}
项)
</el-checkbox>
<div
style=
"margin: 15px 0"
></div>
<div
style=
"margin: 15px 0"
></div>
<el-checkbox-group
class=
"tag-group"
v-model=
"item.tagChecked"
@
change=
"handleCheckedChange(item.tagChecked, index)"
v-
show
=
"item.checked"
>
<el-checkbox-group
class=
"tag-group"
v-model=
"item.tagChecked"
@
change=
"handleCheckedChange(item.tagChecked, index)"
v-
if
=
"item.checked"
>
<el-checkbox
v-for=
"(itm, idx) in item.labelList"
:label=
"itm"
:key=
"idx"
>
{{
itm
.
name
}}
</el-checkbox>
<el-checkbox
v-for=
"(itm, idx) in item.labelList"
:label=
"itm"
:key=
"idx"
>
{{
itm
.
name
}}
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
...
@@ -53,6 +53,7 @@ export default {
...
@@ -53,6 +53,7 @@ export default {
name
:
'activityModel'
,
name
:
'activityModel'
,
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
heightBox
:
200
,
heightBox
:
200
,
dialogVisible
:
false
,
dialogVisible
:
false
,
labelGroupName
:
''
,
labelGroupName
:
''
,
...
@@ -88,6 +89,7 @@ export default {
...
@@ -88,6 +89,7 @@ export default {
this
.
querylabeltree
()
this
.
querylabeltree
()
},
},
querylabeltree
(
selectItem
)
{
querylabeltree
(
selectItem
)
{
this
.
loading
=
true
this
.
$apis
.
channel
this
.
$apis
.
channel
.
querylabeltree
({
.
querylabeltree
({
labelTreeReq
:
{
labelTreeReq
:
{
...
@@ -162,6 +164,9 @@ export default {
...
@@ -162,6 +164,9 @@ export default {
this
.
labelTreeRetSelect
=
utils
.
deepClone
(
this
.
labelTreeRets
)
this
.
labelTreeRetSelect
=
utils
.
deepClone
(
this
.
labelTreeRets
)
}
}
}
}
this
.
$nextTick
(()
=>
{
this
.
loading
=
false
})
})
})
},
},
remove
(
items
,
idx
)
{
remove
(
items
,
idx
)
{
...
@@ -246,7 +251,7 @@ export default {
...
@@ -246,7 +251,7 @@ export default {
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
350
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
350
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.dialog-jump
{
.dialog-jump
{
...
@@ -343,4 +348,4 @@ export default {
...
@@ -343,4 +348,4 @@ export default {
.tag-selected-box
{
.tag-selected-box
{
min-height
:
200px
;
min-height
:
200px
;
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
src/views/market/configDetail.vue
View file @
5945b3b
...
@@ -4,37 +4,36 @@
...
@@ -4,37 +4,36 @@
<el-tab-pane
label=
"营销配置"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"营销配置"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"客户列表"
name=
"second"
></el-tab-pane>
<el-tab-pane
label=
"客户列表"
name=
"second"
></el-tab-pane>
</el-tabs>
</el-tabs>
<component
:is=
"activeName == 'first'?configInfo:customList"
></component>
<component
:is=
"activeName == 'first' ? configInfo : customList"
></component>
<GLFooter
<GLFooter>
>
<el-button
type=
"primary"
@
click=
"goback"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"goback"
>
返回
</el-button>
</GLFooter>
</GLFooter>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
configInfo
from
"./components/configInfo"
;
import
configInfo
from
'./components/configInfo'
import
customList
from
"./components/customList"
;
import
customList
from
'./components/customList'
export
default
{
export
default
{
name
:
"config"
,
name
:
'config'
,
components
:
{
components
:
{
configInfo
,
configInfo
,
customList
,
customList
},
},
data
()
{
data
()
{
return
{
return
{
activeName
:
"first"
,
activeName
:
'first'
,
customList
:
'customList'
,
customList
:
'customList'
,
configInfo
:
'configInfo'
configInfo
:
'configInfo'
}
;
}
},
},
methods
:
{
methods
:
{
goback
()
{
goback
()
{
this
.
$router
.
push
(
'/market/index'
)
this
.
$router
.
push
(
'/market/index'
)
}
,
}
}
,
}
}
;
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.channel-main
{
.channel-main
{
/deep/
{
/deep/
{
...
@@ -43,4 +42,4 @@ export default {
...
@@ -43,4 +42,4 @@ export default {
}
}
}
}
}
}
</
style
>
\ No newline at end of file
\ 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