(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-744dace2"],{"1935b":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("el-form",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:wechat:public:keywords:reply:list"],expression:"['platform:wechat:public:keywords:reply:list']"}],attrs:{size:"small",inline:!0}},[a("el-form-item",{attrs:{label:"回复类型:"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择类型",clearable:""},on:{change:e.seachList},model:{value:e.tableFrom.type,callback:function(t){e.$set(e.tableFrom,"type",t)},expression:"tableFrom.type"}},[a("el-option",{attrs:{label:"文本消息",value:"text"}}),e._v(" "),a("el-option",{attrs:{label:"图片消息",value:"image"}}),e._v(" "),a("el-option",{attrs:{label:"图文消息",value:"news"}}),e._v(" "),a("el-option",{attrs:{label:"音频消息",value:"voice"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"关键字:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入关键字",size:"small",clearable:""},model:{value:e.tableFrom.keywords,callback:function(t){e.$set(e.tableFrom,"keywords",t)},expression:"tableFrom.keywords"}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:wechat:public:keywords:reply:list"],expression:"['platform:wechat:public:keywords:reply:list']"}],attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:e.seachList},slot:"append"})],1)],1)],1),e._v(" "),a("router-link",{attrs:{to:{path:"/operation/application/publicAccount/wxReply/keyword/save"}}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:wechat:public:keywords:reply:save"],expression:"['platform:wechat:public:keywords:reply:save']"}],attrs:{size:"small",type:"primary"}},[e._v("添加关键字")])],1)],1)]),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"60"}}),e._v(" "),a("el-table-column",{attrs:{prop:"keywords",label:"关键字","min-width":"150"}}),e._v(" "),a("el-table-column",{attrs:{label:"回复类型","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("keywordStatusFilter")(t.row.type)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.checkPermi(["admin:wechat:keywords:reply:status"])?a("el-switch",{attrs:{"active-value":!0,"inactive-value":!1,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(a){return e.onchangeIsShow(t.row)}},model:{value:t.row.status,callback:function(a){e.$set(t.row,"status",a)},expression:"scope.row.status"}}):a("div",[e._v(e._s(t.row.status?"显示":"隐藏"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("router-link",{attrs:{to:{path:"/operation/application/publicAccount/wxReply/keyword/save/"+t.row.id}}},["subscribe"!==t.row.keywords&&"default"!==t.row.keywords&&e.checkPermi(["platform:wechat:public:keywords:reply:update"])?a("el-button",{attrs:{type:"text",size:"small"}},[e._v("编辑")]):e._e()],1),e._v(" "),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:wechat:public:keywords:reply:delete"],expression:"['platform:wechat:public:keywords:reply:delete']"}],attrs:{type:"text",size:"small"},on:{click:function(a){return e.handleDelete(t.row.id,t.$index)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1)],1)},s=[],i=a("ffd2"),r=(a("5f87"),a("e350")),o={name:"WechatKeyword",data:function(){return{tableData:{data:[],total:0},tableFrom:{page:1,limit:20,keywords:"",type:""},listLoading:!1}},created:function(){Object(r["a"])(["platform:wechat:public:keywords:reply:list"])&&this.getList(1)},methods:{checkPermi:r["a"],seachList:function(){this.getList(1)},onchangeIsShow:function(e){var t=this;Object(i["n"])(e.id).then((function(){t.$message.success("修改成功"),t.getList(1)})).catch((function(){e.status=!e.status}))},getList:function(e){var t=this;this.tableFrom.page=e||this.tableFrom.page,this.listLoading=!0,Object(i["l"])(this.tableFrom).then((function(e){t.tableData.data=e.list,t.tableData.total=e.total,t.listLoading=!1})).catch((function(e){t.listLoading=!1}))},pageChange:function(e){this.tableFrom.page=e,this.getList()},handleSizeChange:function(e){this.tableFrom.limit=e,this.getList(1)},handleDelete:function(e,t){var a=this;this.$modalSure().then((function(){Object(i["j"])(e).then((function(){a.$message.success("删除成功"),a.getList(1)}))}))}}},n=o,c=a("2877"),p=Object(c["a"])(n,l,s,!1,null,"0568578e",null);t["default"]=p.exports}}]);