1 line
5.1 KiB
JavaScript
1 line
5.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0bd1d6"],{"2b2b":function(e,t,a){"use strict";a.r(t);var s=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",{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:["admin:wechat:keywords:reply:info:keywords"],expression:"['admin:wechat:keywords:reply:info:keywords']"}],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:"/appSetting/publicAccount/wxReply/keyword/save"}}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:wechat:keywords:reply:save"],expression:"['admin:wechat: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("span",[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:"/appSetting/publicAccount/wxReply/keyword/save/"+t.row.id}}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:wechat:keywords:reply:info"],expression:"['admin:wechat:keywords:reply:info']"}],attrs:{type:"text",size:"small",disabled:"subscribe"===t.row.keywords||"default"===t.row.keywords}},[e._v("编辑")])],1),e._v(" "),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:wechat:keywords:reply:delete"],expression:"['admin:wechat:keywords:reply:delete']"}],attrs:{disabled:"subscribe"===t.row.keywords||"default"===t.row.keywords,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)},l=[],i=a("ffd2"),r=(a("5f87"),a("e350")),n={name:"WechatKeyword",data:function(){return{tableData:{data:[],total:0},tableFrom:{page:1,limit:20,keywords:"",type:""},listLoading:!0}},created:function(){this.getList()},methods:{checkPermi:r["a"],seachList:function(){this.tableFrom.page=1,this.getList()},onchangeIsShow:function(e){var t=this;Object(i["g"])({id:e.id,status:e.status}).then((function(){t.$message.success("修改成功"),t.getList()})).catch((function(){e.status=!e.status}))},getList:function(){var e=this;this.listLoading=!0,Object(i["e"])(this.tableFrom).then((function(t){e.tableData.data=t.list,e.tableData.total=t.total,e.listLoading=!1})).catch((function(t){e.listLoading=!1}))},pageChange:function(e){this.tableFrom.page=e,this.getList()},handleSizeChange:function(e){this.tableFrom.limit=e,this.getList()},handleDelete:function(e,t){var a=this;this.$modalSure().then((function(){Object(i["c"])({id:e}).then((function(){a.$message.success("删除成功"),a.getList()}))}))}}},o=n,c=a("2877"),d=Object(c["a"])(o,s,l,!1,null,"94fe16a6",null);t["default"]=d.exports}}]); |