Authored by xuhongyun

build

@@ -13,6 +13,12 @@ webpackJsonp([152],[ @@ -13,6 +13,12 @@ webpackJsonp([152],[
13 ON: 2,// 开启 13 ON: 2,// 开启
14 OFF: 1 // 关闭 14 OFF: 1 // 关闭
15 }; 15 };
  16 + // 时间状态
  17 + var TimeStatusEnum = {
  18 + BEFORE : 1,// 未开始
  19 + ING: 2,// 进行中
  20 + END: 3 // 已过期
  21 + };
16 //界面分类值 22 //界面分类值
17 var PagEnum = { 23 var PagEnum = {
18 DEF_HOT_SEARCH_WORDS: 1, //默认搜索词管理页面 24 DEF_HOT_SEARCH_WORDS: 1, //默认搜索词管理页面
@@ -59,6 +65,9 @@ webpackJsonp([152],[ @@ -59,6 +65,9 @@ webpackJsonp([152],[
59 el: "#status-filter" 65 el: "#status-filter"
60 }); 66 });
61 new common.dropDown({ 67 new common.dropDown({
  68 + el: "#time-status-filter"
  69 + });
  70 + new common.dropDown({
62 el: "#channelIds-filter" 71 el: "#channelIds-filter"
63 }); 72 });
64 new common.dropDown({ 73 new common.dropDown({
@@ -164,6 +173,7 @@ webpackJsonp([152],[ @@ -164,6 +173,7 @@ webpackJsonp([152],[
164 channelIds: $.trim(common.util.__input("channelIds-filter")), 173 channelIds: $.trim(common.util.__input("channelIds-filter")),
165 startTime: $.trim($('#starttime-filter').val()), 174 startTime: $.trim($('#starttime-filter').val()),
166 endTime: $.trim($('#endtime-filter').val()), 175 endTime: $.trim($('#endtime-filter').val()),
  176 + timeStatus: $.trim(common.util.__input("time-status-filter")),
167 content: $.trim($('#content-filter').val()) 177 content: $.trim($('#content-filter').val())
168 }; 178 };
169 //热搜词管理页面 179 //热搜词管理页面
@@ -201,6 +211,17 @@ webpackJsonp([152],[ @@ -201,6 +211,17 @@ webpackJsonp([152],[
201 } 211 }
202 } 212 }
203 }, 213 },
  214 + {
  215 + display: "时间状态", name: "timeStatus", render: function (item) {
  216 + if (item.timeStatus === TimeStatusEnum.BEFORE) {
  217 + return "<span>未开始</span>";
  218 + }else if (item.timeStatus === TimeStatusEnum.ING) {
  219 + return "<span>进行中</span>";
  220 + } else {
  221 + return "<span>已过期</span>";
  222 + }
  223 + }
  224 + },
204 {display: "开始时间", name: "startTime"}, 225 {display: "开始时间", name: "startTime"},
205 {display: "结束时间", name: "endTime"}, 226 {display: "结束时间", name: "endTime"},
206 {display: "添加人", name: "creatorUsrname"}, 227 {display: "添加人", name: "creatorUsrname"},
@@ -209,7 +230,11 @@ webpackJsonp([152],[ @@ -209,7 +230,11 @@ webpackJsonp([152],[
209 {display: "修改时间", name: "modifyTime"}, 230 {display: "修改时间", name: "modifyTime"},
210 { 231 {
211 display: "操作", name: "", render: function (item) { 232 display: "操作", name: "", render: function (item) {
212 - return '<a class="btn btn-xs btn-info modify" data-index="' + item.__index + '">修改</a>'; 233 + var str = '<a class="btn btn-xs btn-info modify" data-index="' + item.__index + '">修改</a>';
  234 + // if (item.status === StatusEnum.OFF) {
  235 + // str = str+ '<a class="btn btn-xs btn-danger del-a" data-index="' + item.id + '" data-name="' + item.content + '">删除</a>';
  236 + // }
  237 + return str;
213 } 238 }
214 } 239 }
215 ]; 240 ];
@@ -383,6 +408,23 @@ webpackJsonp([152],[ @@ -383,6 +408,23 @@ webpackJsonp([152],[
383 Bll.toast('/operations/terms/add', item, "添加"); 408 Bll.toast('/operations/terms/add', item, "添加");
384 }); 409 });
385 /** 410 /**
  411 + * 清理搜索词缓存
  412 + */
  413 + $("#filter-clear").click(function () {
  414 + common.util.__tip("开始清缓存","success");
  415 + common.util.__ajax2({
  416 + url: '/hotSearchBrand/clearSearchWordsCache'
  417 + }, function(res){
  418 + if (res.code == 200) {
  419 + // g.reload();
  420 + common.util.__tip("清缓存成功!","success");
  421 + }else{
  422 + common.util.__tip(res.data.message);
  423 + }
  424 + });
  425 +
  426 + });
  427 + /**
386 * 修改 428 * 修改
387 */ 429 */
388 $(document).on("click", ".modify", function () { 430 $(document).on("click", ".modify", function () {
@@ -392,6 +434,32 @@ webpackJsonp([152],[ @@ -392,6 +434,32 @@ webpackJsonp([152],[
392 Bll.toast('/operations/terms/modify', item, "修改"); 434 Bll.toast('/operations/terms/modify', item, "修改");
393 }); 435 });
394 436
  437 + /**
  438 + * 删除默认搜索词
  439 + *//*
  440 + $(document).on("click", ".del-a", function () {
  441 + var item = $(this).data('index');
  442 + var name = $(this).data('name');
  443 + common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#ff0000'>删除&nbsp;&nbsp;</font>【" + name + "】</b>&nbsp;&nbsp;吗?", function() {
  444 + common.util.__ajax2({
  445 + url: '/hotSearchBrand/delSearchWords',
  446 + data: {
  447 + id: item
  448 + }
  449 + }, function(res){
  450 + if (res.code == 200) {
  451 + // g.reload();
  452 + $("#filter-btn").click();
  453 + common.util.__tip("删除成功!","success");
  454 + }else{
  455 + common.util.__tip(res.data.message);
  456 + }
  457 + })
  458 + });
  459 + });*/
  460 +
  461 +
  462 +
395 463
396 464
397 465
@@ -17,6 +17,7 @@ module.exports = { @@ -17,6 +17,7 @@ module.exports = {
17 endTime: {type: String}, 17 endTime: {type: String},
18 content: {type: String}, 18 content: {type: String},
19 status: {type: Number}, 19 status: {type: Number},
  20 + timeStatus: {type: Number},
20 page: {type: Number}, 21 page: {type: Number},
21 size: {type: Number} 22 size: {type: Number}
22 } 23 }
@@ -61,6 +62,18 @@ module.exports = { @@ -61,6 +62,18 @@ module.exports = {
61 sort: {type: Number} 62 sort: {type: Number}
62 } 63 }
63 }, 64 },
  65 + /* delSearchWords: {
  66 + title: "删除搜索词",
  67 + url: '/searchWords/delSearchWords',
  68 + params: {
  69 + id: {type: Number}
  70 + }
  71 + },*/
  72 +
  73 + clearSearchWordsCache: {
  74 + title: "清除搜索词缓存",
  75 + url: '/searchWords/clearSearchWordsCache'
  76 + },
64 77
65 /*************************************品牌热搜词管理*************************************/ 78 /*************************************品牌热搜词管理*************************************/
66 79
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 <div class="panel panel-default" style="..."> 9 <div class="panel panel-default" style="...">
10 <div class="panel-body" style="padding-bottom: 0"> 10 <div class="panel-body" style="padding-bottom: 0">
11 <a id="filter-add" class="btn btn-success"><i class="fa fa-plus"></i> 添加词汇</a> 11 <a id="filter-add" class="btn btn-success"><i class="fa fa-plus"></i> 添加词汇</a>
  12 + <a id="filter-clear" class="btn btn-success"><i class="fa "></i> 清除默认搜索词缓存</a>
12 </div> 13 </div>
13 <div class="panel-body" id="filter"> 14 <div class="panel-body" id="filter">
14 <div class="row"> 15 <div class="row">
@@ -44,6 +45,15 @@ @@ -44,6 +45,15 @@
44 jsaction="time:start:starttime-filter" name="end_time" placeholder="结束时间" value=""> 45 jsaction="time:start:starttime-filter" name="end_time" placeholder="结束时间" value="">
45 </div> 46 </div>
46 <div class="panel-col"> 47 <div class="panel-col">
  48 + <select name="timeStatus" id="time-status-filter" tabindex="-1" title=""
  49 + class="select2-offscreen brandBtn-group">
  50 + <option value="" selected="">选择时间状态</option>
  51 + <option value="1">未开始</option>
  52 + <option value="2">进行中</option>
  53 + <option value="3">已过期</option>
  54 + </select>
  55 + </div>
  56 + <div class="panel-col">
47 <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a> 57 <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
48 </div> 58 </div>
49 </div> 59 </div>