Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
memberTag-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
memberTag
memberTag-web
Commits
d6ee64bd
Commit
d6ee64bd
authored
Apr 29, 2022
by
liuchenxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 重写tag008控件
parent
53b31c80
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
51 deletions
+53
-51
tag-config-options.vue
src/components/tag/tag-config-options.vue
+27
-34
index.js
src/components/tagDetail/mixin/index.js
+19
-13
memberGroupEdit.vue
src/view/memberGroup/memberGroupEdit.vue
+3
-0
memberGroupList.vue
src/view/memberGroup/memberGroupList.vue
+4
-4
No files found.
src/components/tag/tag-config-options.vue
View file @
d6ee64bd
...
...
@@ -202,21 +202,6 @@
<
template
v-if=
"parent.templateCode == 'tag008'?(['mainClerkId','clerkId','openClerkId'].includes(currentKey)?(templateData[0].computeRadio!='isEmpty'?true:false):true):false"
>
<div
class=
"m-b-20"
:key=
"'tag9' + pindex"
>
<div>
<!--
<el-select
size=
"small"
v-model=
"parent.searchModel"
multiple
filterable
remote
placeholder=
"请输入关键词"
:reserve-keyword=
"false"
:remote-method=
"remoteMethod"
@
focus=
"remoteMethodFocus($event, parent, pindex)"
@
change=
"changeRemoteMethod($event, parent)"
class=
"el-select--small"
>
<el-option
v-for=
"item in parent.searchOptions"
:key=
"item.key"
:label=
"item.value"
:value=
"item.key"
></el-option>
</el-select
><el-button
class=
"m-l-8 middle"
type=
"text"
@
click
.
stop=
"addSearchSelectVal(parent)"
>
添加
</el-button>
-->
<el-select
size=
"small"
v-model=
"parent.searchModel"
...
...
@@ -962,19 +947,19 @@
<!-- 固定时段 -->
<div
class=
"w-500 tag030 border-box"
:style=
"
{'paddingBottom': '5px', 'minHeight': parent.radioType ? '120px' : 'auto'}">
<label
class=
"inline-block middle label-unit m-r-8"
v-if=
"!parent.radioType"
>
时间范围
</label
><el-date-picker
>
<vue-gic-datepicker
v-model=
"parent.fixedTimeRangeValue"
v-if=
"!parent.radioType"
type=
"daterange"
:editable=
"false"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
>
<!-- openCardPickerOptions -->
</el-date-picker>
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
format=
"MMdd"
value-format=
"MMdd"
>
</vue-gic-datepicker>
<template
v-if=
"parent.radioType"
>
<div
class=
"tag030flex"
>
<span>
时间精度
...
...
@@ -2006,19 +1991,27 @@ export default {
for
(
let
i
=
0
;
i
<
this
.
templateData
.
length
;
i
++
)
{
if
(
this
.
templateData
[
i
].
templateCode
===
'tag008'
)
{
// 这里有多个value
let
labels
=
tagValue
.
val
[
0
].
data
.
label
.
split
(
' '
);
value
=
tagValue
.
val
[
0
].
data
.
value
.
split
(
' '
);
selectVal
=
tagParams
.
selectedVal
[
1
].
split
(
','
);
selectVal
.
forEach
((
el
,
inx
)
=>
{
let
item
=
this
.
templateData
[
i
].
addSelectTags
.
find
(
val
=>
val
.
value
===
el
);
if
(
!
item
)
{
this
.
templateData
[
i
].
addSelectTags
.
push
({
value
:
selectVal
[
inx
],
id
:
value
[
inx
]
});
}
this
.
templateData
[
i
].
searchModel
.
push
(
selectVal
[
inx
]);
this
.
templateData
[
i
].
addSelectTags
=
value
.
map
(
el
=>
({
clerkId
:
el
}));
});
this
.
templateData
[
i
].
searchModel
=
selectVal
;
this
.
templateData
[
i
].
addSelectTags
=
value
.
map
((
el
,
idx
)
=>
({
value
:
labels
[
idx
],
id
:
el
,
clerkId
:
el
,
clerkName
:
labels
[
idx
]}));
console
.
log
(
this
.
templateData
);
// console.log(this.templateData[i].searchModel);
// console.log(this.templateData[i].addSelectTags);
// selectVal.forEach((el, inx) => {
// let item = this.templateData[i].addSelectTags.find(val => val.value === el);
// if (!item) {
// this.templateData[i].addSelectTags.push({
// value: selectVal[inx],
// id: value[inx]
// });
// }
// this.templateData[i].searchModel.push(selectVal[inx]);
// this.templateData[i].addSelectTags = value.map(el => ({clerkId: el}));
// console.log(this.templateData[i].searchModel);
// console.log(this.templateData[i].addSelectTags);
// });
}
}
break
;
...
...
src/components/tagDetail/mixin/index.js
View file @
d6ee64bd
...
...
@@ -958,6 +958,7 @@ export default {
tagValue
.
val
[
0
].
data
.
value
=
''
;
}
else
{
tagValue
.
val
[
0
].
data
.
value
=
ele
.
addSelectTags
.
map
(
item
=>
item
.
key
||
item
.
id
).
join
(
' '
);
tagValue
.
val
[
0
].
data
.
label
=
ele
.
addSelectTags
.
map
(
item
=>
item
.
clerkName
).
join
(
' '
);
that
.
postTemplateData
.
selectedVal
.
push
(
ele
.
addSelectTags
.
map
(
item
=>
item
.
value
).
join
(
','
));
}
}
...
...
@@ -1473,19 +1474,24 @@ export default {
},
/* eslint-disable */
changeRemoteMethod
(
item
)
{
// let tagsMap = null;
item
.
addSelectTags
=
item
.
searchOptions
.
filter
(
el
=>
item
.
searchModel
.
includes
(
el
.
clerkId
));
// if (!!item.addSelectTags.length) {
// tagsMap = item.addSelectTags.map(item => item.value);
// }
// item.searchOptions.forEach(function(ele, index) {
// if (!!tagsMap && tagsMap.indexOf(ele.value) != -1) {
// return false;
// }
// if (item.searchModel.indexOf(ele.key) != -1) {
// item.addSelectTags.push(ele);
// }
// });
const
echoData
=
item
.
addSelectTags
.
filter
(
el
=>
item
.
searchModel
.
includes
(
el
.
clerkName
));
// 这一步的searchModel存的是回显的clerkName和新增的clerkId
const
newData
=
item
.
searchOptions
.
filter
(
el
=>
item
.
searchModel
.
includes
(
el
.
clerkId
));
const
map
=
{};
[].
concat
(
echoData
,
newData
).
forEach
(
el
=>
{
const
clerkId
=
el
.
clerkId
;
if
(
map
[
clerkId
])
{
map
[
clerkId
].
count
++
;
}
else
{
map
[
clerkId
]
=
{
count
:
1
,
origin
:
el
}
}
})
const
resData
=
Object
.
values
(
map
).
filter
(
el
=>
el
.
count
==
1
).
map
(
el
=>
el
.
origin
);
item
.
addSelectTags
=
resData
;
item
.
searchModel
=
resData
.
map
(
el
=>
el
.
clerkName
);
},
removeRemoteMethod
(
val
,
item
)
{
item
.
addSelectTags
=
item
.
addSelectTags
.
filter
(
el
=>
el
.
clerkId
!=
val
);
...
...
src/view/memberGroup/memberGroupEdit.vue
View file @
d6ee64bd
...
...
@@ -796,6 +796,9 @@ export default {
})
},
},
created
()
{
if
(
this
.
$route
.
query
.
type
===
'fixed'
)
this
.
ruleForm
.
fixedType
=
1
;
},
async
mounted
()
{
await
this
.
getShowSystem
();
let
localData
=
sessionStorage
.
getItem
(
'selectTempTag'
);
...
...
src/view/memberGroup/memberGroupList.vue
View file @
d6ee64bd
...
...
@@ -12,7 +12,7 @@
<div
class=
"left-box"
v-show=
"activeType != 3 || !isNew"
>
<group-list
:addGroupDialog
.
sync=
"addGroupDialog"
:activeType=
"activeType"
@
getRecommend=
"getRecommend"
@
second-list=
"getsecondList"
></group-list>
<div
@
click=
"addGroupDialog = true"
:limit-code=
"$buttonCode.memberTagAddCateGory"
v-if=
"$getButtonLimit($buttonCode.memberTagAddCateGory) && activeType != 3"
class=
"add-category"
>
<el-button
type=
"primary"
class=
"ghost-btn add-group"
>
新增分类
</el-button>
<el-button
v-show=
"activeType == 1"
type=
"primary"
class=
"ghost-btn add-group"
>
新增分类
</el-button>
</div>
</div>
<!-- 右边的表格 -->
...
...
@@ -54,7 +54,7 @@
<el-tooltip
placement=
"top"
trigger=
"hover"
content=
"其它账号创建的分组覆盖人数根据创建人管辖门店查询数据"
><i
class=
"iconfont icon-QuestionCircleOutlined icon"
/></el-tooltip>
</el-checkbox>
</span>
<el-button
type=
"primary m-l-10"
v-if=
"$getButtonLimit($buttonCode.memberTagAddGroup)"
:limit-code=
"$buttonCode.memberTagAddGroup"
@
click=
"toAddGroup"
class=
"fr"
>
新增分组
</el-button>
<el-button
type=
"primary m-l-10"
v-if=
"$getButtonLimit($buttonCode.memberTagAddGroup)"
:limit-code=
"$buttonCode.memberTagAddGroup"
@
click=
"toAddGroup
('fixed')
"
class=
"fr"
>
新增分组
</el-button>
<el-button
class=
"btn-foled-all"
@
click=
"$router.push('/memberGroupLog')"
>
分组操作日志
</el-button>
</div>
<div
class=
"common-wrap__table m-t-20"
>
...
...
@@ -1076,8 +1076,8 @@ export default {
/**
* 新增分组
*/
toAddGroup
()
{
this
.
changeRoute
(
'/memberGroupAdd'
);
toAddGroup
(
type
)
{
this
.
changeRoute
(
`/memberGroupAdd?type=
${
type
}
`
);
},
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment