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
8d1afdf9
Commit
8d1afdf9
authored
Sep 18, 2021
by
liuchenxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 手工标签-同步标签
parent
7d9548c2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
227 additions
and
7 deletions
+227
-7
index.html
index.html
+1
-1
App.vue
src/App.vue
+2
-0
api.js
src/request/api.js
+11
-0
index.js
src/router/index.js
+9
-2
store.js
src/store/store.js
+5
-1
syncTagHistory.vue
src/view/manualTag/syncTagHistory.vue
+185
-0
member-tag.vue
src/view/platformTag/member-tag.vue
+14
-3
No files found.
index.html
View file @
8d1afdf9
...
...
@@ -29,7 +29,7 @@
<script
src=
"//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js"
></script>
<!-- <script src="//web-1251519181.file.myqcloud.com/components/card.2.0.18.js"></script> --><!-- 卡券选择器其实并没有用到 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/selector.1.2.27.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/export-excel.2.0.
13
.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/export-excel.2.0.
20
.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js"
></script>
</body>
</html>
src/App.vue
View file @
8d1afdf9
...
...
@@ -35,6 +35,8 @@ export default {
this
.
axios
.
get
(
`
${
this
.
baseUrl
}
/api-auth/get-login-user-info?requestProject=gic-member-tag-web`
).
then
((
res
)
=>
{
if
(
res
.
data
.
errorCode
==
0
)
{
const
uId
=
res
.
data
.
result
&&
res
.
data
.
result
.
userId
;
const
isSuperAdmin
=
res
.
data
.
result
&&
res
.
data
.
result
.
superAdmin
;
this
.
$store
.
commit
(
'changeSuperAdmin'
,
isSuperAdmin
);
if
(
this
.
uniqueId
===
''
)
{
this
.
$store
.
commit
(
'changeUniqueId'
,
uId
);
}
...
...
src/request/api.js
View file @
8d1afdf9
...
...
@@ -317,3 +317,14 @@ export const delTrashList = (params = {}) =>
...
params
}
});
// 是否开启自动同步开关
export
const
isAutomaticSync
=
(
params
=
{})
=>
request
({
url
:
'/memberTag/isAutoSyncWm'
,
method
:
'get'
,
params
:
{
requestProject
:
'gic-member-tag-web'
,
...
params
}
});
src/router/index.js
View file @
8d1afdf9
...
...
@@ -65,6 +65,14 @@ export const constantRouterMap = [
}
},
{
path
:
'/syncTagHistory'
,
component
:
_import
(
'manualTag'
,
'syncTagHistory'
),
name
:
'同步标签'
,
meta
:
{
title
:
'会员标签-同步标签'
}
},
{
path
:
'/manualTagDetail'
,
component
:
_import
(
'manualTag'
,
'manualTagDetail'
),
name
:
'手工标签详情'
,
...
...
@@ -170,4 +178,4 @@ export const constantRouterMap = [
export
default
new
Router
({
routes
:
constantRouterMap
,
scrollBehavior
:
()
=>
({
y
:
0
})
});
\ No newline at end of file
});
src/store/store.js
View file @
8d1afdf9
...
...
@@ -10,7 +10,8 @@ export default new Vuex.Store({
title
:
''
,
show
:
false
,
tagRealName
:
''
,
uniqueId
:
''
uniqueId
:
''
,
isSuperAdmin
:
0
},
mutations
:
{
[
types
.
LOGIN
]:
(
state
,
data
)
=>
{
...
...
@@ -32,6 +33,9 @@ export default new Vuex.Store({
},
[
'changeUniqueId'
](
state
,
id
)
{
state
.
uniqueId
=
id
||
''
;
},
[
'changeSuperAdmin'
](
state
,
data
)
{
state
.
isSuperAdmin
=
data
;
}
}
});
src/view/manualTag/syncTagHistory.vue
0 → 100644
View file @
8d1afdf9
<
template
>
<div
class=
"common-wrap syncTag"
>
<nav-crumb
:navpath=
"navpath"
></nav-crumb>
<div
class=
"right-content"
>
<div
class=
"right-box"
>
<div
class=
"title"
>
<el-input
class=
"w220"
v-model=
"searchVal"
placeholder=
"请输入标签分类名称"
prefix-icon=
"el-icon-search"
/>
<el-button
type=
"primary"
class=
"add-btn"
@
click=
"dialogData.dialogVisible = true"
>
添加标签分类
</el-button>
<span>
添加标签分类后,分类下面所有会员标签均会同步至微盟
</span>
</div>
<div
class=
"sync-content"
>
<el-table
:data=
"tableData"
>
<el-table-column
label=
"标签分类"
prop=
""
></el-table-column>
<el-table-column
label=
"标签分组"
prop=
""
></el-table-column>
<el-table-column
label=
"添加时间"
prop=
""
></el-table-column>
<el-table-column
label=
"操作"
>
<template><el-button
type=
"text"
@
click=
"cancelSync"
>
取消同步
</el-button></
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align: right;padding: 28px 0"
hide-on-single-page
@
size-change=
"onSizeChange"
@
current-change=
"onCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</div>
</div>
</div>
<el-dialog
:visible
.
sync=
"dialogData.dialogVisible"
width=
"1000px"
>
<
template
slot=
"title"
>
<p
class=
"el-dialog__title"
>
添加分类标签
<span
class=
"tip"
>
仅查询未同步的标签
</span></p>
</
template
>
<div
class=
"dialog_contetn"
>
<el-input
class=
"w220 mb20"
prefix-icon=
"el-icon-search"
v-model=
"dialogData.searchTagVal"
placeholder=
"请输入标签分类名称"
></el-input>
<el-table
:data=
"dialogData.tagTableData"
>
<el-table-column
label=
"序号"
prop=
""
></el-table-column>
<el-table-column
label=
"标签分类"
prop=
""
></el-table-column>
<el-table-column
label=
"标签分组"
prop=
""
></el-table-column>
<el-table-column
label=
"操作"
>
<el-button
type=
"text"
>
添加
</el-button>
</el-table-column>
</el-table>
<el-pagination
hide-on-single-page
style=
"text-align: right;margin: 28px 0 8px"
layout=
"prev, pager, next"
:current-page=
"dialogData.currentPage"
:page-size=
"5"
@
current-change=
"onDialogPageChange"
:total=
"dialogData.total"
>
</el-pagination>
</div>
<
template
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"dialogData.dialogVisible = false"
>
关闭
</el-button>
</
template
>
</el-dialog>
</div>
</template>
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
{
dateformat
}
from
'@/utils/formatTime'
;
export
default
{
name
:
'syncTagHistory'
,
data
()
{
return
{
navpath
:
[
{
name
:
'首页'
,
path
:
`
${
window
.
location
.
origin
}
/report/#/memberSummary`
,
relocation
:
true
},
{
name
:
'会员管理'
,
path
:
''
},
{
name
:
'会员标签'
,
path
:
`/member-tag`
},
{
name
:
'同步标签'
,
path
:
''
}
],
// -----------------pageData---------------------
tableData
:
[],
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
searchVal
:
''
,
dateformat
,
// -----------------dialogData---------------------
dialogData
:
{
dialogVisible
:
false
,
tagTableData
:
[],
total
:
0
,
currentPage
:
1
,
searchTagVal
:
''
}
};
},
components
:
{
navCrumb
},
methods
:
{
// ----------------------Page-----------------------
cancelSync
()
{
this
.
$confirm
(
'取消同步后,该分类下的标签将不会再同步至微盟,并且该分类下已同步至微盟侧的会员标签将同步从微盟侧删除,是否继续取消?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
_
=>
{
this
.
$message
.
success
(
'取消成功'
);
}).
catch
(
_
=>
{});
},
getTableData
()
{
console
.
log
(
'111'
);
},
onCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
getTableData
();
},
onSizeChange
(
val
)
{
this
.
pageSize
=
val
;
this
.
currentPage
=
1
;
this
.
getTableData
();
},
// ----------------------dialog---------------------
// 获取dialog表格数据
getDiaglogTableData
()
{
// this.dialogData
},
onDialogPageChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
getDiaglogTableData
();
}
},
watch
:
{
'dialogData.dialogVisible'
(
newVal
)
{
if
(
newVal
)
{
this
.
dialogData
.
searchTagVal
=
''
;
this
.
getDiaglogData
();
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.syncTag
{
.w220
{
width
:
220px
;
}
.mb20
{
margin-bottom
:
20px
;
}
span
{
font-size
:
14px
;
}
.right-box
{
padding
:
0
!important
;
}
.title
{
padding
:
22px
24px
18px
;
border-bottom
:
2px
solid
#edeff2
;
.add-btn
{
margin
:
0
6px
;
}
}
.sync-content
{
padding
:
24px
;
}
.tip
{
color
:
#909399
;
margin-left
:
10px
;
}
}
</
style
>
src/view/platformTag/member-tag.vue
View file @
8d1afdf9
...
...
@@ -22,6 +22,7 @@
<!--
{{
tagName
}}
-->
{{
showSearchResult
?
`【${tagName
}
】搜索结果`
:
tagName
}}
<
el
-
button
type
=
"primary"
class
=
"add-newtag"
@
click
=
"editHandTag()"
v
-
show
=
"handTag == 1 && !weimId.includes(groupId || params.id)"
>
新增标签
<
/el-button
>
<
el
-
button
type
=
"primary"
class
=
"add-newtag"
@
click
=
"$router.push('/syncTagHistory')"
v
-
if
=
"handTag == 1 && $store.state.isSuperAdmin && !isSync"
>
同步标签
<
/el-button
>
<!--
<
a
href
=
"http://demogic.udesk.cn/hc/articles/221271?api_name=&preview=true&preview_as_role=admin&theme_id=18093"
target
=
"_blank"
class
=
"help-doc"
>
查看帮助文档
<
/a> --
>
<
a
href
=
"https://www.yuque.com/exnmlu/hpbb1c/cz27hs"
target
=
"_blank"
class
=
"help-doc"
>
查看帮助文档
<
/a
>
<
/p
>
...
...
@@ -153,7 +154,7 @@ import TagsGroupList from '../memberGroup/tags-group-list';
import
TagType
from
'./tag-type'
;
import
TagContainer
from
'./tag-container'
;
import
ManualTagEdit
from
'../manualTag/manualTagEdit'
;
import
{
getMemberTag
,
getMemberTagList
,
addNewGroup
,
memberGroupList
,
groupCount
,
getMemberTagGradeEnsure
}
from
'@/request/api'
;
import
{
getMemberTag
,
getMemberTagList
,
addNewGroup
,
memberGroupList
,
groupCount
,
getMemberTagGradeEnsure
,
isAutomaticSync
}
from
'@/request/api'
;
import
EditTag
from
'../memberGroup/edit-tag'
;
import
{
mapState
}
from
'vuex'
;
import
Trash
from
'@/components/Trash.vue'
;
...
...
@@ -303,7 +304,8 @@ export default {
tagTwoLevelGroupId
:
''
}
,
memberTagGradeEnsure
:
true
,
// 是否开启会员分层
weimId
:
[
'3d11ac15963b4c0790762e6147ea9315'
,
'5bdac971673b4f40a9af981e3c9215bf'
]
weimId
:
[
'3d11ac15963b4c0790762e6147ea9315'
,
'5bdac971673b4f40a9af981e3c9215bf'
],
isSync
:
false
// 是否开启自动同步开关
}
;
}
,
...
...
@@ -636,7 +638,15 @@ export default {
.
catch
(
err
=>
{
console
.
log
(
err
);
}
);
}
}
,
// 是否开启自动同步
getSyncFlag
()
{
isAutomaticSync
({
}
).
then
(
res
=>
{
if
(
res
.
errorCode
===
1
)
{
this
.
isSync
=
res
.
result
;
}
}
)
}
,
// onLoadV()
{
// localStorage.setItem('jumpThirdTag', '');
//
}
...
...
@@ -744,6 +754,7 @@ export default {
this
.
defaultDate
();
this
.
getMemberGroupList
();
this
.
getMemberTagGradeEnsure
();
this
.
getSyncFlag
();
// if (localStorage.getItem('jumpThirdTag'))
{
// console.log(1);
// let tagList = JSON.parse(localStorage.getItem('jumpThirdTag'));
...
...
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