You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
crmeb_php/public/system/js/chunk-2d0e276e.14b04495.js

1 line
3.6 KiB

1 year ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e276e"],{"7f8a":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("router-link",{attrs:{to:{path:t.roterPre+"/app/wechat/reply/keyword/save"}}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("添加关键字")])],1)],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{prop:"wechat_reply_id",label:"ID","min-width":"60"}}),t._v(" "),a("el-table-column",{attrs:{prop:"key",label:"关键字","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"回复类型","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return["text"===e.row.type?a("span",[t._v("文字消息")]):t._e(),t._v(" "),"image"===e.row.type?a("span",[t._v("图片消息")]):t._e(),t._v(" "),"news"===e.row.type?a("span",[t._v("图文消息")]):t._e(),t._v(" "),"voice"===e.row.type?a("span",[t._v("声音消息")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("router-link",{attrs:{to:{path:t.roterPre+"/app/wechat/reply/keyword/save/"+e.row.wechat_reply_id}}},[a("el-button",{attrs:{type:"text",size:"small"}},[t._v("编辑")])],1),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.wechat_reply_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableData.limit,"current-page":t.tableData.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},n=[],i=a("b562"),l=a("83d6"),r={name:"WechatKeyword",data:function(){return{roterPre:l["roterPre"],tableData:{page:1,limit:20,data:[],total:0,indexNum:0},listLoading:!0}},created:function(){this.getList()},methods:{onchangeIsShow:function(t){var e=this;Object(i["h"])(t.wechat_reply_id,t.status).then((function(t){var a=t.message;e.$message.success(a)})).catch((function(t){var a=t.message;e.$message.error(a)}))},getList:function(){var t=this;this.listLoading=!0,Object(i["f"])(this.tableData.page,this.tableData.limit).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(t){this.tableData.page=t,this.getList()},handleSizeChange:function(t){this.tableData.limit=t,this.getList()},handleDelete:function(t,e){var a=this;this.$modalSure().then((function(){Object(i["d"])(t).then((function(t){var e=t.message;a.$message.success(e),a.getList()})).catch((function(t){var e=t.message;a.$message.error(e)}))}))}}},o=r,c=a("2877"),u=Object(c["a"])(o,s,n,!1,null,"1fd49570",null);e["default"]=u.exports}}]);