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
fa27a2a0
Commit
fa27a2a0
authored
Sep 23, 2021
by
chenyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/9月迭代' of
http://git.gicdev.com/memberTag/memberTag-web
into feature/9月迭代
parents
91357446
c812ab43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
20 deletions
+127
-20
index.html
index.html
+1
-1
api.js
src/request/api.js
+24
-0
syncTagHistory.vue
src/view/manualTag/syncTagHistory.vue
+102
-19
No files found.
index.html
View file @
fa27a2a0
...
...
@@ -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.2
0
.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/export-excel.2.0.2
1
.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js"
></script>
</body>
</html>
src/request/api.js
View file @
fa27a2a0
...
...
@@ -328,3 +328,27 @@ export const isAutomaticSync = (params = {}) =>
...
params
}
});
// 手工标签同步标签
export
const
getSyncTag
=
(
params
=
{})
=>
request
({
url
:
'/tagLevel/findGroupLevelPage'
,
method
:
'get'
,
params
:
{
requestProject
:
'gic-member-tag-web'
,
...
params
}
// data: qs.stringify(params)
})
// 手工标签更新同步标签
export
const
updateSyncTag
=
(
params
=
{})
=>
request
({
url
:
'/tagLevel/updateSyncWmFlag'
,
method
:
'get'
,
params
:
{
requestProject
:
'gic-member-tag-web'
,
...
params
}
// data: qs.stringify(params)
})
src/view/manualTag/syncTagHistory.vue
View file @
fa27a2a0
<
template
>
<div
class=
"common-wrap syncTag"
>
<nav-crumb
:navpath=
"navpath"
></nav-crumb>
<div
class=
"right-content"
>
<div
class=
"right-content"
v-loading=
"loading"
>
<div
class=
"right-box"
>
<div
class=
"title"
>
<el-input
class=
"w220"
v-model=
"searchVal"
placeholder=
"请输入标签分类名称"
prefix-icon=
"el-icon-search"
/>
<el-input
class=
"w220"
@
change=
"onSearch"
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=
"标签分类"
prop=
"levelName"
></el-table-column>
<el-table-column
label=
"标签分组"
prop=
""
>
<template
slot-scope=
"
{ row }">
{{
row
.
parentLevelGroupId
?
groupName
(
row
.
parentLevelGroupId
)
:
"--"
}}
</
template
>
</el-table-column>
<el-table-column
label=
"添加时间"
prop=
"createTime"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
createTime
?
dateformat
(
new
Date
(
row
.
createTime
),
'yyyy-MM-dd hh:mm:ss'
)
:
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
><el-button
type=
"text"
@
click=
"cancelSync
"
>
取消同步
</el-button></
template
>
<
template
slot-scope=
"{ row }"
><el-button
type=
"text"
@
click=
"cancelSync(row)
"
>
取消同步
</el-button></
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align: right;padding: 28px 0"
background
hide-on-single-page
@
size-change=
"onSizeChange"
@
current-change=
"onCurrentChange"
...
...
@@ -35,14 +40,18 @@
<
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
>
<div
class=
"dialog_contetn"
v-loading=
"dialogData.loading"
>
<el-input
class=
"w220 mb20"
prefix-icon=
"el-icon-search"
@
change=
"onDialogSearch"
v-model=
"dialogData.searchTagVal"
placeholder=
"请输入标签分类名称"
/
>
<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=
"序号"
prop=
"index"
></el-table-column>
<el-table-column
label=
"标签分类"
prop=
"levelName"
></el-table-column>
<el-table-column
label=
"标签分组"
prop=
""
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
parentLevelGroupId
?
groupName
(
row
.
parentLevelGroupId
)
:
"--"
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-button
type=
"text"
>
添加
</el-button>
<
template
slot-scope=
"{ row }"
>
<el-button
type=
"text"
@
click=
"addSyncTag(row)"
>
添加
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
...
...
@@ -65,6 +74,7 @@
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
{
dateformat
}
from
'@/utils/formatTime'
;
import
{
getSyncTag
,
updateSyncTag
}
from
'@/request/api'
;
export
default
{
name
:
'syncTagHistory'
,
data
()
{
...
...
@@ -94,6 +104,7 @@ export default {
pageSize
:
20
,
total
:
0
,
searchVal
:
''
,
loading
:
false
,
dateformat
,
// -----------------dialogData---------------------
dialogData
:
{
...
...
@@ -101,27 +112,52 @@ export default {
tagTableData
:
[],
total
:
0
,
currentPage
:
1
,
searchTagVal
:
''
searchTagVal
:
''
,
loading
:
false
}
};
},
components
:
{
navCrumb
},
mounted
()
{
this
.
getTableData
();
},
methods
:
{
// ----------------------Page-----------------------
cancelSync
()
{
cancelSync
(
row
)
{
this
.
$confirm
(
'取消同步后,该分类下的标签将不会再同步至微盟,并且该分类下已同步至微盟侧的会员标签将同步从微盟侧删除,是否继续取消?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
_
=>
{
this
.
$message
.
success
(
'取消成功'
);
const
para
=
{
tagLevelGroupId
:
row
.
tagLevelGroupId
,
syncWmFlag
:
0
};
updateSyncTag
(
para
).
then
(
res
=>
{
this
.
$message
.
success
(
'取消同步成功'
);
if
(
this
.
tableData
.
length
==
1
)
{
this
.
currentPage
=
this
.
currentPage
-
1
||
1
;
};
this
.
getTableData
();
})
}).
catch
(
_
=>
{});
},
getTableData
()
{
console
.
log
(
'111'
);
this
.
loading
=
true
;
const
para
=
{
search
:
this
.
searchVal
,
syncWmFlag
:
1
,
pageNum
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
};
getSyncTag
(
para
).
then
(
res
=>
{
const
resData
=
res
.
result
;
this
.
tableData
=
resData
.
result
||
[];
this
.
total
=
resData
.
totalCount
;
}).
finally
(()
=>
this
.
loading
=
false
);
},
onCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
...
...
@@ -132,21 +168,68 @@ export default {
this
.
currentPage
=
1
;
this
.
getTableData
();
},
onSearch
()
{
this
.
currentPage
=
1
;
this
.
getTableData
();
},
// ----------------------dialog---------------------
// 获取dialog表格数据
getDiaglogTableData
()
{
// this.dialogData
this
.
dialogData
.
loading
=
true
;
const
para
=
{
search
:
this
.
dialogData
.
searchTagVal
,
syncWmFlag
:
0
,
pageSize
:
5
,
pageNum
:
this
.
dialogData
.
currentPage
};
getSyncTag
(
para
).
then
(
res
=>
{
const
resData
=
res
.
result
;
const
listData
=
resData
.
result
||
[];
this
.
dialogData
.
tagTableData
=
listData
.
map
((
el
,
index
)
=>
{
el
.
index
=
this
.
sortIndex
(
index
+
1
);
return
el
;
});
this
.
dialogData
.
total
=
resData
.
totalCount
;
}).
finally
(()
=>
this
.
dialogData
.
loading
=
false
);
},
onDialogPageChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
dialogData
.
currentPage
=
val
;
this
.
getDiaglogTableData
();
},
addSyncTag
(
row
)
{
const
para
=
{
tagLevelGroupId
:
row
.
tagLevelGroupId
,
syncWmFlag
:
1
};
updateSyncTag
(
para
).
then
(
res
=>
{
this
.
$message
.
success
(
'同步成功'
);
if
(
this
.
dialogData
.
tagTableData
.
length
==
1
)
{
this
.
dialogData
.
currentPage
=
this
.
dialogData
.
currentPage
-
1
||
1
;
};
this
.
getDiaglogTableData
();
})
},
onDialogSearch
()
{
this
.
dialogData
.
currentPage
=
1
;
this
.
getDiaglogTableData
();
}
},
computed
:
{
sortIndex
()
{
return
index
=>
((
this
.
dialogData
.
currentPage
-
1
)
*
5
+
index
);
},
groupName
()
{
return
id
=>
(
id
==
"3d11ac15963b4c0790762e6147ea9312"
?
'导购标签'
:
id
==
"a3a4ed179ed3435fab33f5952d021b6d"
?
"其他"
:
"--"
);
}
},
watch
:
{
'dialogData.dialogVisible'
(
newVal
)
{
if
(
newVal
)
{
this
.
dialogData
.
searchTagVal
=
''
;
this
.
getDiaglogData
();
this
.
dialogData
.
currentPage
=
1
;
this
.
getDiaglogTableData
();
}
else
{
this
.
getTableData
();
}
}
}
...
...
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