Authored by xuhongyun

build

... ... @@ -13,6 +13,12 @@ webpackJsonp([152],[
ON: 2,// 开启
OFF: 1 // 关闭
};
// 时间状态
var TimeStatusEnum = {
BEFORE : 1,// 未开始
ING: 2,// 进行中
END: 3 // 已过期
};
//界面分类值
var PagEnum = {
DEF_HOT_SEARCH_WORDS: 1, //默认搜索词管理页面
... ... @@ -59,6 +65,9 @@ webpackJsonp([152],[
el: "#status-filter"
});
new common.dropDown({
el: "#time-status-filter"
});
new common.dropDown({
el: "#channelIds-filter"
});
new common.dropDown({
... ... @@ -164,6 +173,7 @@ webpackJsonp([152],[
channelIds: $.trim(common.util.__input("channelIds-filter")),
startTime: $.trim($('#starttime-filter').val()),
endTime: $.trim($('#endtime-filter').val()),
timeStatus: $.trim(common.util.__input("time-status-filter")),
content: $.trim($('#content-filter').val())
};
//热搜词管理页面
... ... @@ -201,6 +211,17 @@ webpackJsonp([152],[
}
}
},
{
display: "时间状态", name: "timeStatus", render: function (item) {
if (item.timeStatus === TimeStatusEnum.BEFORE) {
return "<span>未开始</span>";
}else if (item.timeStatus === TimeStatusEnum.ING) {
return "<span>进行中</span>";
} else {
return "<span>已过期</span>";
}
}
},
{display: "开始时间", name: "startTime"},
{display: "结束时间", name: "endTime"},
{display: "添加人", name: "creatorUsrname"},
... ... @@ -209,7 +230,11 @@ webpackJsonp([152],[
{display: "修改时间", name: "modifyTime"},
{
display: "操作", name: "", render: function (item) {
return '<a class="btn btn-xs btn-info modify" data-index="' + item.__index + '">修改</a>';
var str = '<a class="btn btn-xs btn-info modify" data-index="' + item.__index + '">修改</a>';
// if (item.status === StatusEnum.OFF) {
// str = str+ '<a class="btn btn-xs btn-danger del-a" data-index="' + item.id + '" data-name="' + item.content + '">删除</a>';
// }
return str;
}
}
];
... ... @@ -383,6 +408,23 @@ webpackJsonp([152],[
Bll.toast('/operations/terms/add', item, "添加");
});
/**
* 清理搜索词缓存
*/
$("#filter-clear").click(function () {
common.util.__tip("开始清缓存","success");
common.util.__ajax2({
url: '/hotSearchBrand/clearSearchWordsCache'
}, function(res){
if (res.code == 200) {
// g.reload();
common.util.__tip("清缓存成功!","success");
}else{
common.util.__tip(res.data.message);
}
});
});
/**
* 修改
*/
$(document).on("click", ".modify", function () {
... ... @@ -392,6 +434,32 @@ webpackJsonp([152],[
Bll.toast('/operations/terms/modify', item, "修改");
});
/**
* 删除默认搜索词
*//*
$(document).on("click", ".del-a", function () {
var item = $(this).data('index');
var name = $(this).data('name');
common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#ff0000'>删除&nbsp;&nbsp;</font>【" + name + "】</b>&nbsp;&nbsp;吗?", function() {
common.util.__ajax2({
url: '/hotSearchBrand/delSearchWords',
data: {
id: item
}
}, function(res){
if (res.code == 200) {
// g.reload();
$("#filter-btn").click();
common.util.__tip("删除成功!","success");
}else{
common.util.__tip(res.data.message);
}
})
});
});*/
... ...
... ... @@ -17,6 +17,7 @@ module.exports = {
endTime: {type: String},
content: {type: String},
status: {type: Number},
timeStatus: {type: Number},
page: {type: Number},
size: {type: Number}
}
... ... @@ -61,6 +62,18 @@ module.exports = {
sort: {type: Number}
}
},
/* delSearchWords: {
title: "删除搜索词",
url: '/searchWords/delSearchWords',
params: {
id: {type: Number}
}
},*/
clearSearchWordsCache: {
title: "清除搜索词缓存",
url: '/searchWords/clearSearchWordsCache'
},
/*************************************品牌热搜词管理*************************************/
... ...
... ... @@ -9,6 +9,7 @@
<div class="panel panel-default" style="...">
<div class="panel-body" style="padding-bottom: 0">
<a id="filter-add" class="btn btn-success"><i class="fa fa-plus"></i> 添加词汇</a>
<a id="filter-clear" class="btn btn-success"><i class="fa "></i> 清除默认搜索词缓存</a>
</div>
<div class="panel-body" id="filter">
<div class="row">
... ... @@ -44,6 +45,15 @@
jsaction="time:start:starttime-filter" name="end_time" placeholder="结束时间" value="">
</div>
<div class="panel-col">
<select name="timeStatus" id="time-status-filter" tabindex="-1" title=""
class="select2-offscreen brandBtn-group">
<option value="" selected="">选择时间状态</option>
<option value="1">未开始</option>
<option value="2">进行中</option>
<option value="3">已过期</option>
</select>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
</div>
</div>
... ...