Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 fe5cb62d
authored
Jun 27, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix style
1 parent
4151c0aa
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
214 additions
and
152 deletions
src/views/contentManager/SopContentAdd.vue
src/views/contentManager/components/merchantDialog/index.vue
src/views/contentManager/components/screenTag/index.vue
src/views/contentManager/components/selectTag/index.vue
src/views/contentManager/components/selectTagSop/index.vue
src/views/contentManager/components/selectTagSopAera/index.vue
src/views/contentManager/components/selectTagSopCar/index.vue
src/views/contentManager/images/arrow.png
src/views/contentManager/labelCourse/selectTag/index.vue
src/views/contentManager/sopContentDetail.vue
src/views/contentManager/SopContentAdd.vue
View file @
fe5cb62
...
...
@@ -18,7 +18,7 @@
<el-form-item
label-width=
"120px"
label=
"类型:"
prop=
"type"
>
<el-radio-group
:disabled=
"disabledFn"
v-model=
"formData.contentType"
@
change=
"changeFileType()"
>
<el-radio
v-for=
"(item, index) in contentTypeList"
:key=
"index"
:label=
"item.value"
>
{{
item
.
label
}}
</el-radio>
}}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 学习任务 -->
...
...
@@ -138,7 +138,9 @@
</el-radio-group> -->
</div>
<!-- <template v-if="getEmpType.btn"> -->
<span
class=
"radio-box empTypeBtn"
@
click=
"addEmp"
>
选择标签
</span>
<span
class=
"radio-box empTypeBtn"
@
click=
"addEmp"
>
<img
src=
"./images/arrow.png"
alt=
""
class=
"arrow"
>
选择标签
</span>
<div
v-loading=
"customerLoading"
>
<div
class=
"customer-box m-t-10"
>
<div
class=
"itemLabel"
v-for=
"(item, iemSubIdx) in empTypeListFilter"
:key=
"iemSubIdx"
>
...
...
@@ -153,7 +155,7 @@
<span
v-if=
"item.selectStaffType == 1"
>
{{ subItem.labelGroup.name }}:{{ k.name }}{{
k.tagName ? ':' + k.tagName : '' }}
</span>
<span
v-else
>
{{ subItem.name || subItem.labelGroup.name }}:{{ k.name || k.tagName
}}
</span>
}}
</span>
</el-tag>
</div>
</span>
...
...
@@ -693,7 +695,7 @@ export default {
}
if
(
value
==
2
)
{
// 当前时间的7天后
this
.
formData
.
extendConfig
.
deadline
=
[]
this
.
formData
.
extendConfig
.
deadline
=
""
}
},
"formData.selectStaffType"
()
{
...
...
@@ -701,7 +703,6 @@ export default {
this
.
estimatedNumberOfPeople
=
0
this
.
formData
.
customerDataList
=
[]
this
.
storeSearchForm
.
keyword
=
""
},
"formData.sendTime"
(
selectTime
)
{
const
selectedDate
=
new
Date
(
selectTime
)
...
...
@@ -876,6 +877,7 @@ export default {
},
handlePopStaff
()
{
this
.
storeSearchForm
.
keyword
=
''
this
.
relateStoreVisible
=
true
},
getCustomerByTagList
(
type
)
{
...
...
@@ -1571,6 +1573,18 @@ export default {
.radio-box
{
margin-bottom
:
10px
;
background
:
#eaeef7
;
.arrow
{
line-height
:
32px
;
display
:
inline-block
;
width
:
16px
;
height
:
16px
;
//
居中对齐
vertical-align
:
middle
;
margin-top
:
-3px
;
//
margin-right
:
px
;
}
}
.btn-class
{
...
...
@@ -1640,7 +1654,7 @@ export default {
margin-top
:
10px
;
cursor
:
pointer
;
display
:
inline-block
;
width
:
88
px
;
width
:
114
px
;
height
:
32px
;
border-radius
:
4px
;
opacity
:
1
;
...
...
@@ -1650,6 +1664,7 @@ export default {
text-align
:
center
;
font-size
:
14px
;
color
:
#666666
;
}
.select
{
...
...
src/views/contentManager/components/merchantDialog/index.vue
View file @
fe5cb62
...
...
@@ -37,6 +37,10 @@ export default {
selectedRecord
:
{
type
:
Array
,
default
:
()
=>
[]
},
selectedList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
...
...
@@ -62,7 +66,7 @@ export default {
mounted
()
{
},
methods
:
{
recoverySelection
(
list
)
{
var
exitIds
=
this
.
selected
Record
.
map
((
item
)
=>
+
item
.
merchantId
)
var
exitIds
=
this
.
selected
List
.
map
((
item
)
=>
+
item
.
merchantId
)
console
.
log
(
exitIds
)
list
.
forEach
((
item
)
=>
{
console
.
log
(
item
.
merchantId
,
"item.merchantId"
)
...
...
src/views/contentManager/components/screenTag/index.vue
View file @
fe5cb62
<
template
>
<div
class=
"tag-main"
>
<el-dialog
title=
"选择标签"
:visible
.
sync=
"dialogVisible"
width=
"50%"
:before-close=
"handleClose"
>
<el-dialog
title=
"选择标签"
:visible
.
sync=
"dialogVisible"
width=
"50%"
:before-close=
"handleClose"
>
<div
class=
"tag-panel"
>
<div
class=
"tag-panel-select"
>
<div
class=
"tag-title"
>
预选标签
</div>
<div
class=
"tag-select-box"
>
<div
class=
"tag-box-header"
>
<el-input
size=
"small"
v-model=
"labelGroupName"
placeholder=
"请输入搜索内容"
clearable
@
keydown
.
enter
.
native=
"handleSearch"
></el-input>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button
>
<el-input
size=
"small"
v-model=
"labelGroupName"
placeholder=
"请输入搜索内容"
clearable
@
keydown
.
enter
.
native=
"handleSearch"
></el-input>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
<div
class=
"checkbox-group-box"
v-loading=
"loading"
:style=
"
{ height: heightBox + 'px' }"
>
<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.self="item.checked = !item.checked"
>
</span>
<div
class=
"checkbox-group-box"
v-loading=
"loading"
:style=
"
{ height: heightBox + 'px' }">
<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.self="item.checked = !item.checked">
</span>
{{
item
.
labelGroup
.
name
}}
<el-tag
:size=
"size"
>
{{
item
.
labelType
}}
</el-tag>
<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"
>
<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-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"
>
<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
:label=
"itm"
>
{{
itm
.
name
.
length
>
4
?
itm
.
name
.
slice
(
0
,
3
)
+
'...'
:
itm
.
name
}}
</el-radio>
-->
<div
slot=
"content"
>
{{
itm
.
name
}}
</div>
</el-tooltip>
...
...
@@ -79,16 +39,8 @@
<div
class=
"tag-box-header"
>
标签名称(
{{
selectNum
}}
项)
</div>
<div
class=
"tag-selected-box"
:style=
"
{ height: heightBox + 'px' }">
<template
v-for=
"item in labelTreeRetSelect"
>
<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
}}
</el-tag>
</
template
>
...
...
@@ -98,9 +50,7 @@
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSelect"
>
确 定
</el-button
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSelect"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -343,8 +293,10 @@ export default {
//
}
.tag-panel
{
display
:
flex
;
.tag-panel-select
{
width
:
60%
;
::v-deep
.el-checkbox__label
{
width
:
100%
;
vertical-align
:
middle
;
...
...
@@ -354,9 +306,11 @@ export default {
word-wrap
:
break-word
;
}
}
.tag-panel-selected
{
width
:
40%
;
margin-left
:
10px
;
.tag-box-header
{
font-size
:
14px
;
font-weight
:
400
;
...
...
@@ -365,17 +319,20 @@ export default {
padding-left
:
20px
!important
;
}
}
.tag-title
{
font-size
:
16px
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
22px
;
}
.tag-select-box
{
margin-top
:
10px
;
border-radius
:
2px
;
border
:
1px
solid
#eeeeee
;
padding
:
6px
;
.tag-box-header
{
box-sizing
:
border-box
;
display
:
flex
;
...
...
@@ -385,11 +342,13 @@ export default {
margin
:
-6px
;
margin-bottom
:
10px
;
padding
:
0px
6px
;
::v-deep
.el-input
{
width
:
60%
;
margin-right
:
10px
;
}
}
.tag-selected-item
{
margin
:
0px
6px
6px
0px
;
height
:
26px
;
...
...
@@ -400,21 +359,26 @@ export default {
//
overflow
:
hidden
;
//
white-space
:
nowrap
;
}
.el-tree-node__expand-icon
{
color
:
#5850ff
;
font-size
:
16px
;
}
.tag-group
{
margin-left
:
26px
;
display
:
flex
;
flex-wrap
:
wrap
;
.radio-tag
{
display
:
inline-block
;
width
:
50%
;
.el-radio
{
margin
:
8px
0
;
display
:
inline-flex
;
align-items
:
center
;
::v-deep
.el-radio__label
{
display
:
inline-block
;
max-width
:
120px
;
...
...
@@ -428,8 +392,10 @@ export default {
}
}
}
.checkbox-group-box
{
overflow
:
auto
;
.checkbox-box
{
cursor
:
pointer
;
font-size
:
14px
;
...
...
@@ -437,6 +403,7 @@ export default {
font-weight
:
400
;
color
:
#333333
;
line-height
:
20px
;
::v-deep
.el-tag
{
color
:
#aaa5fa
!important
;
font-size
:
12px
;
...
...
@@ -445,6 +412,7 @@ export default {
}
}
}
.tag-selected-box
{
min-height
:
200px
;
overflow-y
:
auto
;
...
...
src/views/contentManager/components/selectTag/index.vue
View file @
fe5cb62
<
template
>
<div
class=
"tag-main select-tag"
>
<GLDialog
bigTitle=
"选择标签"
mode=
"big"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
>
<GLDialog
bigTitle=
"选择标签"
mode=
"big"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
>
<div
class=
"tag-panel"
>
<div
class=
"tag-panel-select"
>
<div
class=
"tag-title"
>
预选标签
</div>
<div
class=
"tag-select-box"
>
<div
class=
"tag-box-header"
>
<el-input
size=
"small"
v-model=
"labelGroupName"
placeholder=
"请输入搜索内容"
></el-input>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button
>
<el-input
size=
"small"
v-model=
"labelGroupName"
placeholder=
"请输入搜索内容"
></el-input>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</div>
<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"
>
<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
}}
/
{{
<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"
>
<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>
<div
style=
"margin: 15px 0"
></div>
<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
||
itm
.
labelName
}}
</el-checkbox
>
<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
||
itm
.
labelName
}}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
...
...
@@ -73,10 +41,8 @@
<div
class=
"tag-content"
>
<p
class=
"tag-ex"
>
说明:
</p>
<p>
标签组内已选标签取
<span
class=
"tag-ex"
>
并集(或)
</span
>
,即满足一个条件即可、标签组之间取
<span
class=
"tag-ex"
>
交集(且)
</span
>
,即同时满足标签组条件。
标签组内已选标签取
<span
class=
"tag-ex"
>
并集(或)
</span>
,即满足一个条件即可、标签组之间取
<span
class=
"tag-ex"
>
交集(且)
</span>
,即同时满足标签组条件。
</p>
<img
src=
"./assets/groupTips.png"
alt=
""
/>
</div>
...
...
@@ -88,11 +54,7 @@
标签名称(
{{
selectNum
}}
项)
<span
@
click=
"clearTag"
>
清空
</span>
</div>
<div
class=
"tag-selected-box"
:style=
"
{ height: heightBox + 'px' }">
<div
v-show=
"!!selectNum"
class=
"tag-line-and"
:style=
"
{ height: heightBox + 'px' }"
>
<div
v-show=
"!!selectNum"
class=
"tag-line-and"
:style=
"
{ height: heightBox + 'px' }">
<p
class=
"tag-line"
></p>
<p
class=
"tag-and"
:style=
"
{ top: heightBox / 2 - 20 + 'px' }">
且
...
...
@@ -105,16 +67,8 @@
</p>
<span
v-for=
"(tag, idx) in item.tagChecked"
:key=
"idx"
>
<span
class=
"tag-txt"
v-show=
"idx != 0"
>
或
</span>
<el-tag
:title=
"tag.name"
type=
"info"
class=
"customer-tag-selected-item"
:key=
"idx"
v-if=
"tag"
closable
:disable-transitions=
"false"
@
close=
"remove(item, idx)"
>
<el-tag
:title=
"tag.name"
type=
"info"
class=
"customer-tag-selected-item"
:key=
"idx"
v-if=
"tag"
closable
:disable-transitions=
"false"
@
close=
"remove(item, idx)"
>
{{
tag
.
name
.
length
>
11
?
tag
.
name
.
slice
(
0
,
11
)
+
"..."
...
...
@@ -130,9 +84,7 @@
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSelect"
>
确 定
</el-button
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSelect"
>
确 定
</el-button>
</span>
</GLDialog>
</div>
...
...
@@ -447,10 +399,13 @@ export default {
margin-bottom
:
10px
;
}
}
.tag-panel
{
display
:
flex
;
.tag-panel-select
{
width
:
60%
;
::v-deep
.el-checkbox__label
{
width
:
100%
;
vertical-align
:
middle
;
...
...
@@ -460,9 +415,11 @@ export default {
word-wrap
:
break-word
;
}
}
.tag-panel-selected
{
width
:
40%
;
margin-left
:
10px
;
.tag-box-header
{
font-size
:
14px
;
font-weight
:
400
;
...
...
@@ -470,6 +427,7 @@ export default {
line-height
:
20px
;
padding
:
0
20px
!important
;
display
:
flex
;
span
{
margin-left
:
auto
;
cursor
:
pointer
;
...
...
@@ -477,17 +435,20 @@ export default {
}
}
}
.tag-title
{
font-size
:
16px
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
22px
;
}
.tag-select-box
{
margin-top
:
10px
;
border-radius
:
2px
;
border
:
1px
solid
#eeeeee
;
padding
:
6px
;
.tag-box-header
{
box-sizing
:
border-box
;
display
:
flex
;
...
...
@@ -497,11 +458,13 @@ export default {
margin
:
-6px
;
margin-bottom
:
10px
;
padding
:
0px
6px
;
::v-deep
.el-input
{
width
:
60%
;
margin-right
:
10px
;
}
}
.tag-selected-item
{
margin
:
0px
6px
6px
0px
;
height
:
26px
;
...
...
@@ -512,21 +475,26 @@ export default {
//
overflow
:
hidden
;
//
white-space
:
nowrap
;
}
.el-tree-node__expand-icon
{
//
color
:
#5850ff
;
font-size
:
16px
;
}
.tag-group
{
margin-left
:
26px
;
display
:
flex
;
flex-wrap
:
wrap
;
.radio-tag
{
display
:
inline-block
;
width
:
50%
;
.el-radio
{
margin
:
8px
0
;
display
:
inline-flex
;
align-items
:
center
;
::v-deep
.el-radio__label
{
display
:
inline-block
;
max-width
:
120px
;
...
...
@@ -540,8 +508,10 @@ export default {
}
}
}
.checkbox-group-box
{
overflow
:
auto
;
.checkbox-box
{
cursor
:
pointer
;
font-size
:
14px
;
...
...
@@ -549,6 +519,7 @@ export default {
font-weight
:
400
;
color
:
#333333
;
line-height
:
20px
;
::v-deep
.el-tag
{
//
color
:
#aaa5fa
!important
;
font-size
:
12px
;
...
...
@@ -557,6 +528,7 @@ export default {
}
}
}
//
.tag-selected-box
{
//
min-height
:
200px
;
//
overflow-y
:
auto
;
...
...
@@ -564,6 +536,7 @@ export default {
.checkbox-group-box
{
overflow
:
auto
;
}
.tag-selected-box
{
min-height
:
200px
;
display
:
flex
;
...
...
@@ -572,27 +545,33 @@ export default {
::v-deep
.el-tooltip__popper.is-light
{
width
:
1000px
!important
;
}
.tool-gltip
{
::v-deep
.el-tooltip__popper.is-light
{
width
:
1000px
!important
;
}
::v-deep
.el-tooltip__popper
{
width
:
1000px
!important
;
}
.tag-content
{
background
:
#fff
;
overflow
:
hidden
;
width
:
500px
;
padding
:
10px
;
p
{
margin
:
3px
0
;
}
.tag-ex
{
color
:
#333333
;
font-weight
:
600
;
}
}
}
.tag-img
{
display
:
inline-block
;
width
:
14px
;
...
...
src/views/contentManager/components/selectTagSop/index.vue
View file @
fe5cb62
<
template
>
<GLDialog
:append-to-body=
"true"
class=
"tag-main select-tag"
bigTitle=
"选择标签"
mode=
"big"
:visible
.
sync=
"dialogVisibl
e"
:before-close=
"handleClose"
>
<GLDialog
:append-to-body=
"true"
class=
"tag-main select-tag"
:bigTitle=
"'选择' + labelTreeRets[0].labelGroup.nam
e"
mode=
"big"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
>
<div
class=
"tag-panel"
>
<div
class=
"tag-panel-select"
>
<div
class=
"tag-title"
>
标签
</div>
...
...
@@ -24,7 +24,7 @@
<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
||
itm
.
labelName
}}
</el-checkbox>
}}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
...
...
src/views/contentManager/components/selectTagSopAera/index.vue
View file @
fe5cb62
...
...
@@ -121,9 +121,58 @@ export default {
onSearch
()
{
this
.
$refs
.
tree
.
filter
(
this
.
filterText
)
},
// 获取处理后的选中节点结构
getFilteredCheckedNodes
()
{
const
checkedNodes
=
this
.
$refs
.
tree
.
getCheckedNodes
();
// 全选中的节点
const
halfCheckedKeys
=
this
.
$refs
.
tree
.
getHalfCheckedKeys
();
// 半选中的节点keys
const
result
=
[];
// 递归处理树形数据
const
processNode
=
(
node
)
=>
{
const
newNode
=
{
...
node
};
// 清空子节点,后续只添加选中的子节点
newNode
.
child
=
[];
// 处理子节点
if
(
node
.
child
&&
node
.
child
.
length
>
0
)
{
node
.
child
.
forEach
(
child
=>
{
const
processedChild
=
processNode
(
child
);
if
(
processedChild
)
{
newNode
.
child
.
push
(
processedChild
);
}
});
}
// 判断节点是否应该保留:
// 1. 当前节点是全选中的叶子节点
// 2. 当前节点是半选中的父节点
// 3. 当前节点的子节点有选中的
const
isChecked
=
checkedNodes
.
some
(
n
=>
n
.
id
===
node
.
id
);
const
isHalfChecked
=
halfCheckedKeys
.
includes
(
node
.
id
);
const
hasCheckedChildren
=
newNode
.
child
.
length
>
0
;
if
(
isChecked
||
isHalfChecked
||
hasCheckedChildren
)
{
return
newNode
;
}
return
null
;
};
// 从根节点开始处理
this
.
brandData
.
forEach
(
rootNode
=>
{
const
processedRoot
=
processNode
(
rootNode
);
if
(
processedRoot
)
{
result
.
push
(
processedRoot
);
}
});
return
result
;
},
handleNodeClick
(
data
)
{
const
filteredNodes
=
this
.
getFilteredCheckedNodes
();
console
.
log
(
'处理后的节点结构:'
,
filteredNodes
);
console
.
log
(
data
,
this
.
$refs
.
tree
.
getCheckedNodes
());
this
.
checkList
=
this
.
$refs
.
tree
.
getCheckedNodes
()
// console.log(this.$refs.tree.getCheckedNodes(false, true));
this
.
checkList
=
this
.
getFilteredCheckedNodes
();
},
filterCheckList
(
checkList
)
{
// 收集所有 children 中的 id
...
...
src/views/contentManager/components/selectTagSopCar/index.vue
View file @
fe5cb62
...
...
@@ -108,6 +108,51 @@ export default {
handleClose
()
{
this
.
resetChecked
()
this
.
$emit
(
'closeDialogFn'
)
},
// 获取处理后的选中节点结构
getFilteredCheckedNodes
()
{
const
checkedNodes
=
this
.
$refs
.
tree
.
getCheckedNodes
();
// 全选中的节点
const
halfCheckedKeys
=
this
.
$refs
.
tree
.
getHalfCheckedKeys
();
// 半选中的节点keys
const
result
=
[];
// 递归处理树形数据
const
processNode
=
(
node
)
=>
{
const
newNode
=
{
...
node
};
// 清空子节点,后续只添加选中的子节点
newNode
.
child
=
[];
// 处理子节点
if
(
node
.
child
&&
node
.
child
.
length
>
0
)
{
node
.
child
.
forEach
(
child
=>
{
const
processedChild
=
processNode
(
child
);
if
(
processedChild
)
{
newNode
.
child
.
push
(
processedChild
);
}
});
}
// 判断节点是否应该保留:
// 1. 当前节点是全选中的叶子节点
// 2. 当前节点是半选中的父节点
// 3. 当前节点的子节点有选中的
const
isChecked
=
checkedNodes
.
some
(
n
=>
n
.
id
===
node
.
id
);
const
isHalfChecked
=
halfCheckedKeys
.
includes
(
node
.
id
);
const
hasCheckedChildren
=
newNode
.
child
.
length
>
0
;
if
(
isChecked
||
isHalfChecked
||
hasCheckedChildren
)
{
return
newNode
;
}
return
null
;
};
// 从根节点开始处理
this
.
brandData
.
forEach
(
rootNode
=>
{
const
processedRoot
=
processNode
(
rootNode
);
if
(
processedRoot
)
{
result
.
push
(
processedRoot
);
}
});
return
result
;
},
handleConfirm
()
{
this
.
resetChecked
()
...
...
@@ -125,7 +170,8 @@ export default {
},
handleNodeClick
(
data
)
{
console
.
log
(
data
,
this
.
$refs
.
tree
.
getCheckedNodes
());
this
.
checkList
=
this
.
$refs
.
tree
.
getCheckedNodes
()
this
.
checkList
=
this
.
getFilteredCheckedNodes
();
// this.getFilteredCheckedNodes();
},
filterCheckList
(
checkList
)
{
// 收集所有 children 中的 id
...
...
src/views/contentManager/images/arrow.png
0 → 100644
View file @
fe5cb62
814 Bytes
src/views/contentManager/labelCourse/selectTag/index.vue
View file @
fe5cb62
<
template
>
<GLDialog
:append-to-body=
"true"
class=
"tag-main select-tag"
bigTitle=
"选择
标签"
mode=
"big"
:visible
.
sync=
"dialogVisible
"
:before-close=
"handleClose"
>
<GLDialog
:append-to-body=
"true"
class=
"tag-main select-tag"
bigTitle=
"选择
员工标签"
mode=
"big
"
:
visible
.
sync=
"dialogVisible"
:
before-close=
"handleClose"
>
<div
class=
"tag-panel"
>
<div
class=
"tag-panel-select"
>
<div
class=
"tag-title"
>
预选标签
</div>
...
...
@@ -26,7 +26,7 @@
<el-checkbox
v-for=
"(itm, idx) in item.labelList"
:label=
"itm"
:key=
"idx"
>
{{
itm
.
groupName
}}
:
{{
itm
.
tagName
||
itm
.
name
||
itm
.
labelName
}}
</el-checkbox>
}}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
...
...
src/views/contentManager/sopContentDetail.vue
View file @
fe5cb62
...
...
@@ -572,6 +572,7 @@ export default {
this
.
relateStoreVisible
=
false
},
handlePopStaff
()
{
this
.
storeSearchForm
.
keyword
=
''
this
.
relateStoreVisible
=
true
},
getCustomerList
()
{
...
...
@@ -818,7 +819,7 @@ export default {
"YYYY-MM-DD HH:mm:ss"
)
}
} else if (key == "extendConfig" && res.extendConfig.deadline) {
} else if (key == "extendConfig" && res
?
.extendConfig.deadline) {
// [res.extendConfig.deadline]
this.formData[key] = res[key]
this.formData.extendConfig.deadline = Util.dateFormate(
...
...
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