webpackJsonp([59],{DXMG:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("Dd8w"),l=a.n(i),n=a("NYxO"),r=a("wuJz"),o=a("9G5k"),s=a.n(o),c={created:function(){this.getData()},data:function(){return{totalNumber:0,totalPage:10,currentPage:1,pageSize:20,tableData:[],filter1:"",filter2:"",tableColumns:[{label:"关键词",value:"keyWord",show:!0},{label:"热度",value:"hot",show:!0},{label:"创建时间",value:"createTime",show:!0},{label:"更新时间",value:"updateTime",show:!0}],multipleMode:!1}},computed:l()({},Object(n.b)(["tableHeight"]),{selection:function(){return this.$refs.table.selection.map(function(e){return e.id})}}),methods:{pageSizeChange:function(e){this.currentPage=1,this.pageSize=e,this.getData()},currentPageChange:function(e){this.currentPage=e,this.getData()},getData:function(){var e=this;this.$http.get({url:"/hotSearch/page",data:{currentPage:this.currentPage,pageNumber:this.pageSize,searchKey:this.filter1}}).then(function(t){t.success&&(e.totalNumber=t.data.page.totalNumber,e.tableData=t.data.pp)})},isColumnShow:function(e){var t=this.tableColumns.find(function(t){return t.value===e});return!!t&&t.show},toggleMultipleMode:function(e){this.multipleMode=e,e||this.$refs.table.clearSelection()},editRow:function(e){this.$router.push({path:"/hotSearch",query:{id:e.id}})},operation1:function(){this.$notify({title:"提示",message:this.selection})},operation2:function(){this.$message("操作2")},DateTimeFormatter:function(e,t,a){if(a)return Object(r.format)(a,"YYYY/MM/DD HH:mm",{locale:s.a})},searchData:function(){this.currentPage=1,this.getData()}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"filters-container"},[a("el-input",{staticClass:"filter-item",attrs:{placeholder:"关键字",size:"small",clearable:""},model:{value:e.filter1,callback:function(t){e.filter1=t},expression:"filter1"}}),e._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",size:"small",icon:"el-icon-search"},on:{click:e.searchData}},[e._v("搜索\n        ")]),e._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",size:"small",icon:"el-icon-edit"},on:{click:function(t){e.$router.push("/hotSearch")}}},[e._v("添加\n        ")]),e._v(" "),a("el-dropdown",{staticClass:"table-column-filter",attrs:{trigger:"click",size:"medium"}},[a("span",[e._v("\n                筛选数据\n                "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{staticClass:"table-column-filter-wrapper",attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.tableColumns,function(t){return a("el-checkbox",{key:t.value,model:{value:t.show,callback:function(a){e.$set(t,"show",a)},expression:"item.show"}},[e._v(e._s(t.label)+"\n                ")])}))],1)],1),e._v(" "),a("el-table",{ref:"table",attrs:{data:e.tableData,height:e.tableHeight,"row-key":"id"}},[e.multipleMode?a("el-table-column",{attrs:{align:"center",type:"selection",width:"50"}}):e._e(),e._v(" "),a("el-table-column",{attrs:{type:"index","min-width":"50",align:"center"}}),e._v(" "),e.isColumnShow("keyWord")?a("el-table-column",{attrs:{prop:"keyWord",label:"关键词","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("hot")?a("el-table-column",{attrs:{prop:"hot",label:"热度","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("createTime")?a("el-table-column",{attrs:{formatter:e.DateTimeFormatter,prop:"createTime",label:"创建时间","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("updateTime")?a("el-table-column",{attrs:{formatter:e.DateTimeFormatter,prop:"updateTime",label:"更新时间","min-width":"100"}}):e._e(),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(a){e.editRow(t.row)}}},[e._v("编辑")])]}}])})],1),e._v(" "),a("div",{staticClass:"pagination-wrapper"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[10,20,30,40,50],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalNumber},on:{"size-change":e.pageSizeChange,"current-change":e.currentPageChange}})],1)],1)},staticRenderFns:[]};var h=a("VU/8")(c,u,!1,function(e){a("Ruf0")},"data-v-0e7c613a",null);t.default=h.exports},Ruf0:function(e,t){}});
//# sourceMappingURL=59.7427258cbee5df332d65.js.map