|
@@ -110,7 +110,7 @@
|
|
|
<el-button size="mini" class="get-more" type="plain" icon="el-icon-arrow-right" @click="getMore">更多</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="tags-box">
|
|
|
+ <div class="sub-collection tags-box">
|
|
|
<div class="tags-inputs">
|
|
|
<div class="tag-input">
|
|
|
<div class="tag-labels"></div>
|
|
@@ -269,6 +269,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ if (query.vt === 'f') {
|
|
|
+ query.vt = ''
|
|
|
+ }
|
|
|
+
|
|
|
const res = await getExportPushList(query)
|
|
|
if (res.error_code === 0) {
|
|
|
if (res.data._id) {
|
|
@@ -585,7 +590,7 @@ export default {
|
|
|
}
|
|
|
const { top, left } = _this.calcCardTopLeft(event, !!list)
|
|
|
$('.tags-box').show(function () {
|
|
|
- window.activeTags = []
|
|
|
+ window.pushListActiveTags = []
|
|
|
$('.tag-labels').empty()
|
|
|
$('.clear-input').val('')
|
|
|
$('.tags-list').find('.tags-item').removeClass('tags-active')
|
|
@@ -707,7 +712,7 @@ export default {
|
|
|
$('.tags-footer .button-cancel').on('click', function () {
|
|
|
$('.tags-box').hide(function () {
|
|
|
// 标签弹框消失时 清除上次选择的标签分类
|
|
|
- activeTags = []
|
|
|
+ pushListActiveTags = []
|
|
|
$('.tag-labels').empty()
|
|
|
$('.clear-input').val('')
|
|
|
$('.tags-list').find('.tags-item').removeClass('tags-active')
|
|
@@ -715,28 +720,29 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
- window.activeTags = [] // 选中的自定义标签 作为全局变量使用
|
|
|
+ window.pushListActiveTags = [] // 选中的自定义标签 作为全局变量使用
|
|
|
// 解绑自定义标签
|
|
|
function deleteInputTag (item) {
|
|
|
var index = $(item).parent().attr('data-index')
|
|
|
var id = $(item).parent().attr('data-id')
|
|
|
- activeTags.splice(index, 1)
|
|
|
+ pushListActiveTags.splice(index, 1)
|
|
|
inputTagList()
|
|
|
$('.tags-item[data-id="' + id + '"]').removeClass('tags-active')
|
|
|
}
|
|
|
|
|
|
- window.deleteInputTag = deleteInputTag
|
|
|
-
|
|
|
function inputTagList () {
|
|
|
var ht = ''
|
|
|
$('.tag-labels').html(ht)
|
|
|
- activeTags.forEach(function (v, i) {
|
|
|
+ pushListActiveTags.forEach(function (v, i) {
|
|
|
ht += '<span class="tag-label" data-index=' + i + ' data-id="' + v.lid + '">'
|
|
|
ht += '<em>' + v.lname + '</em>'
|
|
|
- ht += '<i class="tag-close" onclick="deleteInputTag(this)"></i>'
|
|
|
+ ht += '<i class="tag-close"></i>'
|
|
|
ht += '</span>'
|
|
|
})
|
|
|
- $('.tag-labels').html(ht)
|
|
|
+ $('.tag-labels').html(ht).off('click').on('click', '.tag-close' ,function (e) {
|
|
|
+ const target = getEventTarget(e)
|
|
|
+ deleteInputTag(target)
|
|
|
+ })
|
|
|
if ($('.tag-labels').children('.tag-label').length > 0) {
|
|
|
$('.tag-placeholder').hide()
|
|
|
}
|
|
@@ -751,7 +757,7 @@ export default {
|
|
|
ht += '<span class="tags-item" data-count=' + v.count + ' data-id=' + v.lid + '>' + v.lanme + '</span>'
|
|
|
})
|
|
|
$('.tags-list').html(ht)
|
|
|
- activeTags.forEach(function (s, j) {
|
|
|
+ pushListActiveTags.forEach(function (s, j) {
|
|
|
$('.tags-list .tags-item[data-id="' + s.lid + '"]').addClass('tags-active')
|
|
|
})
|
|
|
$('.tags-item').click(function (e) {
|
|
@@ -761,17 +767,17 @@ export default {
|
|
|
var name = $(this).text()
|
|
|
$(this).toggleClass('tags-active')
|
|
|
if ($(this).hasClass('tags-active')) {
|
|
|
- activeTags.push({
|
|
|
+ pushListActiveTags.push({
|
|
|
lid: id,
|
|
|
lname: name
|
|
|
})
|
|
|
inputTagList()
|
|
|
} else {
|
|
|
- var newArr = activeTags.filter(function (item) {
|
|
|
+ var newArr = pushListActiveTags.filter(function (item) {
|
|
|
return item.lid != id
|
|
|
})
|
|
|
- activeTags = newArr
|
|
|
- console.log(activeTags, newArr, 'quxiao')
|
|
|
+ pushListActiveTags = newArr
|
|
|
+ console.log(pushListActiveTags, newArr, 'quxiao')
|
|
|
inputTagList()
|
|
|
}
|
|
|
})
|
|
@@ -818,8 +824,8 @@ export default {
|
|
|
if (r.data) {
|
|
|
$('.tag-input .clear-input').val('')
|
|
|
// 添加标签成功后 绑定标签
|
|
|
- if (activeTags.length < 3) {
|
|
|
- activeTags.push({
|
|
|
+ if (pushListActiveTags.length < 3) {
|
|
|
+ pushListActiveTags.push({
|
|
|
lid: r.data,
|
|
|
lname: name
|
|
|
})
|
|
@@ -833,7 +839,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
function checkTagDisabled () {
|
|
|
- if (activeTags.length >= 3) {
|
|
|
+ if (pushListActiveTags.length >= 3) {
|
|
|
// 禁用标签
|
|
|
$('.tags-list').find('.tags-item:not(.tags-active)').addClass('disabled')
|
|
|
} else {
|