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
3b8033f8
Commit
3b8033f8
authored
Oct 31, 2018
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 增加方法
parent
e9aeaedb
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
726 additions
and
89 deletions
+726
-89
api.js
src/api/api.js
+1
-1
addTagView.vue
src/components/addTagView.vue
+5
-0
memberGroup.vue
src/components/memberGroup.vue
+177
-0
tagCategory.vue
src/components/tagCategory.vue
+4
-0
tagCategorySmall.vue
src/components/tagCategorySmall.vue
+4
-0
tagLib.vue
src/components/tagLib.vue
+72
-5
index.js
src/router/index.js
+14
-3
manualTagEdit.vue
src/view/manualTag/manualTagEdit.vue
+155
-0
manualTagLib.vue
src/view/manualTag/manualTagLib.vue
+4
-0
manualTagList.vue
src/view/manualTag/manualTagList.vue
+111
-24
memberGroupDetail.vue
src/view/memberGroup/memberGroupDetail.vue
+2
-0
memberGroupList.vue
src/view/memberGroup/memberGroupList.vue
+35
-0
myTagLib.vue
src/view/myTag/myTagLib.vue
+4
-0
myTagList.vue
src/view/myTag/myTagList.vue
+33
-0
platformTagDetail.vue
src/view/platformTag/platformTagDetail.vue
+4
-0
platformTagLib.vue
src/view/platformTag/platformTagLib.vue
+4
-0
platformTagList.vue
src/view/platformTag/platformTagList.vue
+97
-56
No files found.
src/api/api.js
View file @
3b8033f8
...
...
@@ -32,7 +32,7 @@ Vue.axios.interceptors.response.use(data=> {
Message
.
error
({
message
:
err
.
response
.
message
});
if
(
err
.
response
.
status
==
504
||
err
.
response
.
status
==
404
)
{
// window.location.href= local + "/gic-web/#/"
//
Message.error({message: '服务异常⊙﹏⊙∥'});
Message
.
error
({
message
:
'服务异常⊙﹏⊙∥'
});
}
else
if
(
err
.
response
.
status
==
403
)
{
// window.location.href= local + "/gic-web/#/"
// Message.error({message: '权限不足,请联系管理员!'});
...
...
src/components/addTagView.vue
View file @
3b8033f8
...
...
@@ -97,6 +97,10 @@
</template>
<
script
>
import
tagCategorySmall
from
'@/components/tagCategorySmall.vue'
;
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"addTagView"
,
...
...
@@ -221,6 +225,7 @@
-webkit-box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
box-sizing
:
border-box
;
box-shadow
:
0px
2px
10px
1px
rgba
(
220
,
220
,
220
,
0.50
);
.addTag-tab-wrap
{
position
:
relative
;
...
...
src/components/memberGroup.vue
0 → 100644
View file @
3b8033f8
<!--
会员分组组件
<member-group :selectedArr="selectedArr" @selectGroup="selectGroup"></member-group>
methods: {
/**
* 选择分组后子组件触发的事件
*/
selectGroup(data) {
const that = this
}
}
-->
<
template
>
<div
class=
"member-group-wrap"
>
<el-table
ref=
"multipleTable"
:data=
"tagTableData"
tooltip-effect=
"dark"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
>
</el-table-column>
<el-table-column
label=
"分组名称"
width=
"150px"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<el-popover
placement=
"top-start"
width=
"200"
trigger=
"hover"
>
<span>
{{
scope
.
row
.
descipe
}}
</span>
<a
slot=
"reference"
class=
"pointer"
:href=
"'/memberGroupDetail?id='+scope.row.id"
>
{{
scope
.
row
.
name
}}
</a>
</el-popover>
</
template
>
</el-table-column>
<el-table-column
label=
"是否实时"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
isRealTime
==
1
?
'实时'
:
'非实时'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"最近更新时间"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
recentUpdateDate
|
formatTimeYMD
}}
<p>
{{
scope
.
row
.
recentUpdateDate
|
formatTimeHMS
}}
</p>
</
template
>
</el-table-column>
<el-table-column
label=
"更新频率"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
updateRate
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"state"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
state
==
1
?
'有效'
:
'失效'
}}
</
template
>
</el-table-column>
<!-- <el-table-column
prop="peopleCover"
label="覆盖人数"
width="150px"
show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.peopleCover | formatNum }} 人
</template>
</el-table-column> -->
<!-- <el-table-column
prop="createTime"
label="创建时间"
width="150px"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.createTime | formatTimeYMD }}
<p>{{ scope.row.createTime | formatTimeHMS }}</p>
</template>
</el-table-column> -->
<el-table-column
prop=
"recentUpdateDate"
label=
"到期时间"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
recentUpdateDate
|
formatTimeYMD
}}
<p>
{{
scope
.
row
.
recentUpdateDate
|
formatTimeHMS
}}
</p>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<a
:href=
"'/member-tag/#/memberGroupDetail'+scope.row.id"
class=
"edit-btn el-button--text"
>
详情
</a>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
export
default
{
name
:
"memberGroup"
,
props
:
{
tagLibName
:
{
type
:
String
},
selectedArr
:
Boolean
},
data
()
{
return
{
// 标签列表数据
tagTableData
:
[
{
id
:
1
,
descipe
:
'标签列表数据'
,
name
:
'123'
,
isRealTime
:
1
,
recentUpdateDate
:
'2018-09-30 14:30:28'
,
updateRate
:
'-'
,
state
:
1
,
peopleCover
:
'456566'
,
createTime
:
'2018-09-30 14:30:28'
,
expiredTime
:
'2018-09-30 14:30:28'
,
popVisible
:
false
,
}
],
// 已选的对象
multipleSelection
:
[],
}
},
filters
:
{
formatTimeYMD
(
data
)
{
console
.
log
(
data
,
data
!=
'--'
?
data
.
split
(
' '
)[
0
]
:
'--'
)
return
data
!=
'--'
?
data
.
split
(
' '
)[
0
]
:
'--'
;
},
formatTimeHMS
(
data
)
{
return
data
!=
'--'
?
data
.
split
(
' '
)[
1
]
:
'--'
;
},
formatNum
(
data
){
const
reg
=
/
\d{1,3}(?=(\d{3})
+$
)
/g
;
return
(
data
+
''
).
replace
(
reg
,
'$&,'
);
}
},
methods
:
{
/**
* 选择分组后
*/
handleSelectionChange
(
val
)
{
const
that
=
this
console
.
log
(
val
)
that
.
$emit
(
'selectGroup'
,
val
)
},
},
mounted
()
{
const
that
=
this
that
.
multipleSelection
=
that
.
selectedArr
;
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.member-group-wrap
{
padding-top
:
20px
;
background
:
#fff
;
-webkit-box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
</
style
>
src/components/tagCategory.vue
View file @
3b8033f8
...
...
@@ -35,6 +35,10 @@
</div>
</template>
<
script
>
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"tagCategory"
,
...
...
src/components/tagCategorySmall.vue
View file @
3b8033f8
...
...
@@ -38,6 +38,10 @@
</div>
</template>
<
script
>
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"tagCategory"
,
...
...
src/components/tagLib.vue
View file @
3b8033f8
...
...
@@ -11,7 +11,9 @@
v-model=
"tagSearch"
@
keyup
.
enter
.
native=
"searchEnterFun"
>
</el-input>
<el-button
type=
"primary"
@
click=
"toAddMyTagLib"
class=
"fr"
>
添加至我的标签库
</el-button>
<el-button
v-if=
"tagCategory != 'myTagList'"
type=
"primary"
@
click=
"toAddMyTagLib"
class=
"fr"
>
添加至我的标签库
</el-button>
<el-button
v-if=
"tagCategory == 'myTagList'"
type=
"primary"
@
click=
"changeRoute('/manualTagLib')"
class=
"fr"
>
前往手工标签库
</el-button>
<el-button
v-if=
"tagCategory == 'myTagList'"
type=
"primary"
@
click=
"changeRoute('/platformTagLib')"
class=
"fr m-r-8"
>
前往平台标签库
</el-button>
</div>
<div
class=
"common-libFields flex"
>
...
...
@@ -44,6 +46,10 @@
</div>
</template>
<
script
>
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"platformTagLib"
,
...
...
@@ -323,26 +329,87 @@
},
methods
:
{
/**
* 路由跳转
*/
changeRoute
(
route
)
{
this
.
$router
.
push
(
route
);
},
/**
* 添加到我的标签库
*/
toAddMyTagLib
()
{
var
that
=
this
const
that
=
this
const
para
=
{
}
getRequest
(
'/enterpriseMemberTag/addByLevelGroupId'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
const
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 搜索标签
*/
searchEnterFun
(
e
)
{
var
that
=
this
const
that
=
this
console
.
log
(
e
)
},
/**
*点击分类到列表
*
点击分类到列表
*/
toPlatformTagList
()
{
},
/**
* 获取标签库数据
*/
getTagLib
()
{
const
that
=
this
const
para
=
{
}
getRequest
(
'/memberTag/platformHomePage'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
const
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
}
},
...
...
@@ -350,7 +417,7 @@
},
mounted
()
{
var
that
=
this
const
that
=
this
console
.
log
(
that
.
tagCategory
)
},
components
:
{
...
...
src/router/index.js
View file @
3b8033f8
...
...
@@ -32,11 +32,11 @@ export const constantRouterMap = [
redirect
:
'platformTagLib'
,
component
:
_import
(
'index'
,
'index'
),
children
:
[
// 集团后台
// 配置中心
// 平台标签
// 平台标签
{
path
:
'/platformTagLib'
,
name
:
'平台标签库'
,
component
:
_import
(
'platformTag'
,
'platformTagLib'
),
meta
:
{
title
:
'会员标签-平台标签库'
...
...
@@ -45,6 +45,7 @@ export const constantRouterMap = [
{
path
:
'/platformTagList'
,
component
:
_import
(
'platformTag'
,
'platformTagList'
),
name
:
'平台标签列表'
,
meta
:
{
title
:
'会员标签-平台标签列表'
}
...
...
@@ -52,6 +53,7 @@ export const constantRouterMap = [
{
path
:
'/platformTagDetail'
,
component
:
_import
(
'platformTag'
,
'platformTagDetail'
),
name
:
'平台标签详情'
,
meta
:
{
title
:
'会员标签-平台标签详情'
}
...
...
@@ -61,6 +63,7 @@ export const constantRouterMap = [
{
path
:
'/manualTagLib'
,
component
:
_import
(
'manualTag'
,
'manualTagLib'
),
name
:
'手工标签库'
,
meta
:
{
title
:
'会员标签-手工标签库'
}
...
...
@@ -68,6 +71,7 @@ export const constantRouterMap = [
{
path
:
'/manualTagList'
,
component
:
_import
(
'manualTag'
,
'manualTagList'
),
name
:
'手工标签列表'
,
meta
:
{
title
:
'会员标签-手工标签列表'
}
...
...
@@ -75,6 +79,7 @@ export const constantRouterMap = [
{
path
:
'/manualTagEdit'
,
component
:
_import
(
'manualTag'
,
'manualTagEdit'
),
name
:
'编辑手工标签'
,
meta
:
{
title
:
'会员标签-编辑手工标签'
}
...
...
@@ -84,6 +89,7 @@ export const constantRouterMap = [
{
path
:
'/memberGroupList'
,
component
:
_import
(
'memberGroup'
,
'memberGroupList'
),
name
:
'会员分组'
,
meta
:
{
title
:
'会员标签-会员分组'
}
...
...
@@ -91,6 +97,7 @@ export const constantRouterMap = [
{
path
:
'/memberGroupDetail'
,
component
:
_import
(
'memberGroup'
,
'memberGroupDetail'
),
name
:
'分组详情'
,
meta
:
{
title
:
'会员标签-分组详情'
}
...
...
@@ -98,6 +105,7 @@ export const constantRouterMap = [
{
path
:
'/memberGroupEdit'
,
component
:
_import
(
'memberGroup'
,
'memberGroupEdit'
),
name
:
'编辑分组'
,
meta
:
{
title
:
'会员标签-编辑分组'
}
...
...
@@ -107,6 +115,7 @@ export const constantRouterMap = [
{
path
:
'/myTagLib'
,
component
:
_import
(
'myTag'
,
'myTagLib'
),
name
:
'我的标签库'
,
meta
:
{
title
:
'会员标签-我的标签库'
}
...
...
@@ -114,6 +123,7 @@ export const constantRouterMap = [
{
path
:
'/myTagList'
,
component
:
_import
(
'myTag'
,
'myTagList'
),
name
:
'我的标签库列表'
,
meta
:
{
title
:
'会员标签-我的标签库列表'
}
...
...
@@ -121,6 +131,7 @@ export const constantRouterMap = [
{
path
:
'/myTagDetail'
,
component
:
_import
(
'myTag'
,
'myTagDetail'
),
name
:
'标签详情'
,
meta
:
{
title
:
'会员标签-标签详情'
}
...
...
src/view/manualTag/manualTagEdit.vue
View file @
3b8033f8
...
...
@@ -349,6 +349,37 @@
},
/**
* 添加三级分类
*/
addThirdLevel
()
{
const
that
=
this
const
para
=
{
}
getRequest
(
'/tagLevel/addHand'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 判断添加重复字段
*/
isRepeat
(
arr
)
{
...
...
@@ -382,6 +413,37 @@
},
/**
* 删除三级分类值
*/
delThirdLevel
()
{
const
that
=
this
const
para
=
{
}
getRequest
(
'/tagLevel/delHand'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 确认编辑标签值
*/
confirmEdit
(
index
,
item
)
{
...
...
@@ -412,6 +474,37 @@
},
/**
* 确定编辑值
*/
editThirdLevel
()
{
const
that
=
this
const
para
=
{
}
getRequest
(
'/tagLevel/editHand'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 取消编辑值
*/
cancleEdit
(
index
,
item
)
{
...
...
@@ -519,6 +612,68 @@
return
jsonData
.
map
(
v
=>
filterVal
.
map
(
j
=>
v
[
j
]))
},
/**
* 获取二级分类列表
*/
getSecondLevel
()
{
const
that
=
this
const
para
=
{
}
getRequest
(
'/tagLevel/handSecondLevel'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 获取三级分类列表
*/
getThirdLevel
()
{
const
that
=
this
const
para
=
{
}
getRequest
(
'/tagLevel/handThirdLevel'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
},
mounted
()
{
var
that
=
this
;
...
...
src/view/manualTag/manualTagLib.vue
View file @
3b8033f8
...
...
@@ -12,6 +12,10 @@
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
tagLib
from
'@/components/tagLib.vue'
;
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"manualTagLib"
,
...
...
src/view/manualTag/manualTagList.vue
View file @
3b8033f8
...
...
@@ -153,6 +153,7 @@
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"manualTagList"
,
...
...
@@ -270,15 +271,72 @@
* 添加到我的标签库
*/
toAddMyTagLib
(
id
)
{
var
that
=
this
const
that
=
this
console
.
log
(
id
)
},
/**
* 添加单个ID至我的标签库
*/
addByTagId
(
para
)
{
const
that
=
this
getRequest
(
'/enterpriseMemberTag/addByTagId'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 添加多个ID至我的标签库
*/
addByTagId
(
para
)
{
const
that
=
this
getRequest
(
'/enterpriseMemberTag/addByTagIds'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 搜索标签
*/
searchEnterFun
(
e
)
{
var
that
=
this
const
that
=
this
console
.
log
(
e
)
},
...
...
@@ -286,7 +344,7 @@
* 表格---多选
*/
handleSelectChange
(
val
)
{
var
that
=
this
const
that
=
this
console
.
log
(
val
);
},
...
...
@@ -294,29 +352,58 @@
* 分页---页码变化
*/
handleSizeChange
(
val
)
{
const
that
=
this
console
.
log
(
`每页
${
val
}
条`
);
that
.
pageSize
=
val
;
},
/**
* 分页---当前页变化
*/
handleCurrentChange
(
val
)
{
const
that
=
this
console
.
log
(
`当前页:
${
val
}
`
);
that
.
currentPage
=
val
},
/**
* 获取当前分类下下的标签
*/
getTagList
(
val
)
{
var
that
=
this
const
that
=
this
const
para
=
{
tagName
:
that
.
tagSearch
,
//搜索字段
pageNum
:
that
.
currentPage
,
// 当前页
pageSize
:
that
.
pageSize
,
// 一页显示个数
}
getRequest
(
'/memberTag/platformTagPageList'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 删除当前标签 -- 取消
*/
cancelDelTag
(
index
,
row
)
{
var
that
=
this
const
that
=
this
row
.
popVisible
=
false
},
...
...
@@ -324,7 +411,7 @@
* 删除当前标签 -- 取消
*/
toDelTag
(
index
,
row
)
{
var
that
=
this
const
that
=
this
that
.
$confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -341,7 +428,7 @@
* 点击新增标签
*/
toManualTagEdit
()
{
var
that
=
this
const
that
=
this
that
.
changeRoute
(
'/manualTagEdit'
)
},
...
...
@@ -349,8 +436,8 @@
* 判断添加重复字段
*/
isRepeat
(
arr
)
{
var
hash
=
{};
for
(
var
i
in
arr
)
{
const
hash
=
{};
for
(
const
i
in
arr
)
{
if
(
hash
[
arr
[
i
]]){
return
true
;
}
...
...
@@ -363,7 +450,7 @@
* 点击分类设置-显示弹窗
*/
showCateDialog
()
{
var
that
=
this
const
that
=
this
that
.
cateTableVisible
=
true
},
...
...
@@ -371,14 +458,14 @@
* 添加分类
*/
toAddCate
(
formName
)
{
var
that
=
this
;
const
that
=
this
;
that
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
that
.
cateForm
.
name
=
that
.
cateForm
.
cateThree
that
.
cateForm
.
editAble
=
false
;
that
.
cateForm
.
inputValue
=
''
;
that
.
cateTableData
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
that
.
cateForm
)))
var
arrKeys
=
that
.
cateTableData
.
map
(
item
=>
item
.
name
)
// 返回对象中键值集合的数组
const
arrKeys
=
that
.
cateTableData
.
map
(
item
=>
item
.
name
)
// 返回对象中键值集合的数组
if
(
that
.
isRepeat
(
arrKeys
))
{
that
.
cateTableData
.
splice
(
that
.
cateTableData
.
length
-
1
,
1
)
...
...
@@ -402,7 +489,7 @@
* 编辑分类
*/
toEditCate
(
index
,
item
)
{
var
that
=
this
;
const
that
=
this
;
console
.
log
(
index
,
item
)
item
.
editAble
=
true
;
item
.
inputValue
=
item
.
name
...
...
@@ -412,7 +499,7 @@
* 删除分类
*/
toDelCate
(
index
,
item
)
{
var
that
=
this
;
const
that
=
this
;
console
.
log
(
index
,
item
)
that
.
cateTableData
.
splice
(
index
,
1
)
},
...
...
@@ -421,7 +508,7 @@
* 确认编辑分类
*/
confirmEdit
(
index
,
item
)
{
var
that
=
this
;
const
that
=
this
;
console
.
log
(
index
,
item
)
if
(
!
item
.
inputValue
.
trim
())
{
that
.
$message
.
error
({
...
...
@@ -431,10 +518,10 @@
return
false
;
}
var
newCateTableData
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
cateTableData
))
const
newCateTableData
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
cateTableData
))
newCateTableData
[
index
].
name
=
item
.
inputValue
var
arrKeys
=
newCateTableData
.
map
(
item
=>
item
.
name
)
// 返回对象中键值集合的数组
const
arrKeys
=
newCateTableData
.
map
(
item
=>
item
.
name
)
// 返回对象中键值集合的数组
if
(
that
.
isRepeat
(
arrKeys
))
{
that
.
$message
.
error
({
duration
:
1000
,
...
...
@@ -451,7 +538,7 @@
* 取消编辑分类
*/
cancleEdit
(
index
,
item
)
{
var
that
=
this
;
const
that
=
this
;
console
.
log
(
index
,
item
),
item
.
editAble
=
false
},
...
...
@@ -460,10 +547,10 @@
* 输入三级分类名
*/
toInput
:
function
(
value
)
{
var
that
=
this
;
const
that
=
this
;
console
.
log
(
value
)
var
temp
=
''
;
let
temp
=
''
;
temp
=
strLength
.
getByteVal
(
value
.
target
.
value
,
that
.
limitLength
)
console
.
log
(
temp
)
that
.
cateForm
.
cateThree
=
temp
.
trim
()
...
...
@@ -475,10 +562,10 @@
* 输入三级分类名
*/
toEditInput
:
function
(
value
,
index
,
row
)
{
var
that
=
this
;
const
that
=
this
;
console
.
log
(
value
,
index
,
row
)
var
editTemp
=
''
;
let
editTemp
=
''
;
editTemp
=
strLength
.
getByteVal
(
value
.
target
.
value
,
that
.
limitLength
)
console
.
log
(
editTemp
)
row
.
inputValue
=
editTemp
.
trim
()
...
...
@@ -497,7 +584,7 @@
* 取消-->关闭弹框
*/
cancelDialog
(){
var
that
=
this
const
that
=
this
that
.
closeCateDialog
()
},
...
...
@@ -505,7 +592,7 @@
* 确定-->关闭弹框
*/
confirmDialog
(){
var
that
=
this
const
that
=
this
that
.
closeCateDialog
()
}
...
...
src/view/memberGroup/memberGroupDetail.vue
View file @
3b8033f8
...
...
@@ -236,8 +236,10 @@
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
userDefined
from
'@/components/userDefined.vue'
;
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"memberGroupDetail"
,
...
...
src/view/memberGroup/memberGroupList.vue
View file @
3b8033f8
...
...
@@ -139,6 +139,10 @@
</template>
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
'memberGroupList'
,
...
...
@@ -291,6 +295,37 @@
},
/**
* 获取列表数据
*/
getGroupList
()
{
const
that
=
this
const
para
=
{
groupName
:
that
.
tagSearch
,
// 搜索字段
}
getRequest
(
'/member-tag-group/findList.json'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
}
},
mounted
()
{
...
...
src/view/myTag/myTagLib.vue
View file @
3b8033f8
...
...
@@ -12,6 +12,10 @@
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
tagLib
from
'@/components/tagLib.vue'
;
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"myTagLib"
,
...
...
src/view/myTag/myTagList.vue
View file @
3b8033f8
...
...
@@ -98,6 +98,9 @@
import
tagCategory
from
'@/components/tagCategory.vue'
;
import
tagTemporary
from
'@/components/tagTemporary.vue'
;
import
tagShortDetail
from
'@/components/tagShortDetail.vue'
;
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
...
...
@@ -271,6 +274,36 @@
});
},
/**
* 删除当前标签 -- 取消
*/
getmyTagList
()
{
const
para
=
{
groupName
:
that
.
tagSearch
,
// 搜索字段
}
getRequest
(
'/member-tag-group/findList.json'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
}
},
mounted
()
{
...
...
src/view/platformTag/platformTagDetail.vue
View file @
3b8033f8
...
...
@@ -11,6 +11,10 @@
</
template
>
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"manualTagEdit"
,
...
...
src/view/platformTag/platformTagLib.vue
View file @
3b8033f8
...
...
@@ -52,6 +52,10 @@
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
tagLib
from
'@/components/tagLib.vue'
;
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"platformTagLib"
,
...
...
src/view/platformTag/platformTagList.vue
View file @
3b8033f8
...
...
@@ -83,64 +83,16 @@
</div>
</div>
<vue-gic-footer></vue-gic-footer>
<!-- 底部固定暂存架 -->
<!-- <div class="common-wrap__fix">
<div class="common-wrap__fix__div">
<div class="common-wrap__fix__showSection clearfix">
<div class="common-wrap__fix__left" @click.stop="toggleTagList"><i class="iconfont icon-17 inline-block"></i><span class="inline-block">已选择1个标签</span></div>
<el-button type="primary" class="fr">新增会员组<i class="el-icon-arrow-right el-icon--right"></i></el-button>
</div>
<div :class="['common-wrap__fix__hideList',!toggleTagListFlag? 'hide':'']" >v-if="toggleTagListFlag"
<div class="common-wrap__fix__title">已选标签</div>
<div class="common-wrap__fix__table">
<el-table
ref="multipleTable"
:data="TagListData"
tooltip-effect="dark"
max-height="333"
style="width: 100%"
@selection-change="handleSelectChange">
<el-table-column
type="selection"
fixed
>
</el-table-column>
<el-table-column
prop="name"
label="标签名称"
>
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column
prop="tagValue"
label="已选标签值"
show-overflow-tooltip>
</el-table-column>
<el-table-column
label="是否实时"
>
<template slot-scope="scope">
{{scope.row.isRealTime == 1? '实时':'非实时'}}
</template>
</el-table-column>
<el-table-column
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" class="" @click="toAddMyTagLib(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div> -->
<!-- <tag-temporary></tag-temporary> -->
</div>
</template>
<
script
>
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
tagCategory
from
'@/components/tagCategory.vue'
;
// import tagTemporary from '@/components/tagTemporary.vue';
import
strLength
from
'@/common/js/strlen'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
"@/common/js/public"
;
import
{
getRequest
,
postRequest
,
postJson
,
postForm
}
from
'@/api/api'
;
export
default
{
name
:
"platformTagList"
,
...
...
@@ -210,15 +162,75 @@
* 添加到我的标签库
*/
toAddMyTagLib
(
id
)
{
var
that
=
this
const
that
=
this
console
.
log
(
id
)
const
para
=
{
}
},
/**
* 添加单个ID至我的标签库
*/
addByTagId
(
para
)
{
const
that
=
this
getRequest
(
'/enterpriseMemberTag/addByTagId'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 添加多个ID至我的标签库
*/
addByTagId
(
para
)
{
const
that
=
this
getRequest
(
'/enterpriseMemberTag/addByTagIds'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
/**
* 搜索标签
*/
searchEnterFun
(
e
)
{
var
that
=
this
const
that
=
this
console
.
log
(
e
)
},
...
...
@@ -234,26 +246,55 @@
* 分页---页码变化
*/
handleSizeChange
(
val
)
{
const
that
=
this
console
.
log
(
`每页
${
val
}
条`
);
that
.
pageSize
=
val
;
},
/**
* 分页---当前页变化
*/
handleCurrentChange
(
val
)
{
const
that
=
this
console
.
log
(
`当前页:
${
val
}
`
);
that
.
currentPage
=
val
},
/**
* 获取当前分类下下的标签
*/
getTagList
(
val
)
{
var
that
=
this
const
that
=
this
const
para
=
{
tagName
:
that
.
tagSearch
,
//搜索字段
pageNum
:
that
.
currentPage
,
// 当前页
pageSize
:
that
.
pageSize
,
// 一页显示个数
}
getRequest
(
'/memberTag/platformTagPageList'
,
para
)
.
then
((
res
)
=>
{
// console.log(res,res.data,res.data.errorCode)
var
resData
=
res
.
data
if
(
resData
.
errorCode
==
0
)
{
// showMsg.showmsg('保存成功','success')
return
;
}
errMsg
.
errorMsg
(
resData
)
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
})
});
},
},
mounted
()
{
var
that
=
this
const
that
=
this
console
.
log
(
that
.
$route
.
query
);
that
.
getTagList
()
},
...
...
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