微信公众号管理后台

38.d5292c16193cdca04298.js 5.7KB

1
  1. webpackJsonp([38],{"3EwQ":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={props:["sorce"],data:function(){return{data:[],page:1,total:1,page_size:20,keyword:"",enable:"启用",loadingDelay:!1,type:"subscribe",typeList:[{value:"subscribe",label:"关注"},{value:"text",label:"消息(含关键词)"},{value:"menu",label:"菜单点击"},{value:"qrcode",label:"参数二维码"}],teamId:""}},created:function(){this.teamId=JSON.parse(this.$cookieStore.getCookie("teamObj")).id,this.init(1)},methods:{choiceEvent:function(e){this.$emit("teamChoice",e.id)},toUrl:function(e){var t="?source=team";e&&(t+="&rule_id="+e.id),this.$router.push("/addNews"+t)},delDelayMsg:function(e){var t=this;this.loadingDelay=!0,this.$axios.get(this.URL.BASEURL+this.URL.delDelayMsg,{params:{rule_id:e.id,is_team_scheme:1,team_id:this.teamId}}).then(function(e){t.loadingDelay=!1,(e=e.data)&&0==e.errno?(t.init(1),t.$message({message:"禁用成功",type:"success"})):t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loadingDelay=!1})},init:function(e){var t=this;this.page=e,this.data=[],this.loadingDelay=!0,this.$axios.get(this.URL.BASEURL+this.URL.delayMsgList,{params:{type:this.type,keyword:this.keyword,page:this.page,page_size:this.page_size,enable:"启用"==this.enable?1:"禁用"==this.enable?0:"",is_team_scheme:1,team_id:this.teamId}}).then(function(e){t.loadingDelay=!1,(e=e.data)&&0==e.errno?(t.data=e.rst.data,t.total=e.rst.pageInfo.total,t.page_size=Number(e.rst.pageInfo.size)):t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loadingDelay=!1})},handleCurrentChange:function(e){this.init(e)}}},l={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loadingDelay,expression:"loadingDelay"}],staticClass:"delayNews",attrs:{"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading"}},[s("div",{staticClass:"mainCon",style:"business"==e.sorce?"margin-top:-60px":""},["business"!=e.sorce?s("wxItem"):e._e(),e._v(" "),s("div",{staticClass:"topButton clear"},["business"!=e.sorce?s("el-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"primary",size:"small"},on:{click:function(t){return e.toUrl()}}},[e._v("创建延迟消息")]):e._e(),e._v(" "),s("div",{staticStyle:{float:"right","padding-right":"2px"},style:"business"==e.sorce?"float:left":""},[s("el-radio-group",{attrs:{size:"small"},on:{change:function(t){return e.init(1)}},model:{value:e.enable,callback:function(t){e.enable=t},expression:"enable"}},[s("el-radio-button",{attrs:{label:"启用"}}),e._v(" "),s("el-radio-button",{attrs:{label:"禁用"}}),e._v(" "),s("el-radio-button",{attrs:{label:"全部"}})],1),e._v(" "),s("label",{staticClass:"label",attrs:{for:"select"}},[e._v("互动类型:")]),e._v(" "),s("el-select",{attrs:{id:"select",size:"small",placeholder:"请选择"},on:{change:function(t){return e.init(1)}},model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},e._l(e.typeList,function(e){return s("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1),e._v(" "),s("div",{staticClass:"searchBox",staticStyle:{display:"inline-block"}},[s("el-input",{staticClass:"input",staticStyle:{width:"200px"},attrs:{size:"small",placeholder:"请输入消息名称关键字","prefix-icon":"el-icon-search"},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}}),e._v(" "),s("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.init(1)}}},[e._v("搜索")])],1)],1)],1),e._v(" "),s("div",{staticClass:"mainBorder"},[s("el-table",{staticStyle:{width:"100%"},attrs:{border:"",data:e.data}},[s("template",{slot:"empty"},[s("img",{staticClass:"pic",attrs:{src:a("z3Om"),alt:""}}),e._v(" "),s("span",[e._v("暂无数据")])]),e._v(" "),s("el-table-column",{attrs:{align:"center","show-overflow-tooltip":"",label:"消息名称",prop:"name"}}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"互动类型","show-overflow-tooltip":"",prop:"keyword"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s("subscribe"==t.row.type?"关注":"text"==t.row.type?"消息":"menu"==t.row.type?"菜单":"参数二维码"))])]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"延迟时间",prop:"name"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(0==t.row.delay?"无":t.row.delay+"秒"))])]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"消息发送数量",prop:"name"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(t.row.msg_count?t.row.msg_count:0))])]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"状态",prop:"name"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("span",[e._v(e._s(1==t.row.enable?"启用":"禁用"))])]}}])}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"操作",prop:"desc"},scopedSlots:e._u([{key:"default",fn:function(t){return["business"==e.sorce?s("span",{staticClass:"done",on:{click:function(a){return e.choiceEvent(t.row)}}},[e._v("选择")]):[s("span",{staticClass:"done",style:{cursor:1==t.row.enable?"ponit":"not-allowed"},on:{click:function(a){return e.toUrl(t.row)}}},[e._v("编辑")]),e._v(" "),s("span",{staticClass:"done",style:{cursor:1==t.row.enable?"ponit":"not-allowed"},on:{click:function(a){return e.delDelayMsg(t.row)}}},[e._v("禁用")])]]}}])})],2),e._v(" "),e.data.length>0&&e.total>e.page_size?s("div",{staticClass:"bottom"},[s("el-pagination",{attrs:{background:"","current-page":e.page,"page-size":e.page_size,layout:"prev, pager, next",total:e.total},on:{"current-change":e.handleCurrentChange}})],1):e._e()],1)],1)])},staticRenderFns:[]};var n=a("VU/8")(s,l,!1,function(e){a("OYRg")},"data-v-4394e697",null);t.default=n.exports},OYRg:function(e,t){}});