webpackJsonp([22],{GVQD:function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n.index[data-v-20c1791d] {\n padding: 20px 0;\n}\n.top[data-v-20c1791d] {\n margin-bottom: 30px;\n margin-left: 20px;\n}\n.title[data-v-20c1791d] {\n font-size: 16px;\n font-weight: 400;\n display: block;\n line-height: 1.2;\n color: #353535;\n}\n.inner-edit_area[data-v-20c1791d] {\n width: 96%;\n margin: 0 auto;\n}\n.upload-video[data-v-20c1791d] {\n width: 50%;\n margin-left:2%;\n}\n.b-title[data-v-20c1791d] {\n padding: 20px;\n color: #666;\n}\n.emotion_switch[data-v-20c1791d] {\n float: left;\n height: 28px;\n line-height: 999em;\n overflow: hidden;\n background: transparent url(https://res.wx.qq.com/mpres/en_US/htmledition/pages/modules/reply/images/icon_emotion_switch.png) no-repeat 0 0;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n display: inline-block;\n}\n.img[data-v-20c1791d] {\n position: relative;\n width: 25%;\nimg {\n width: 100%;\n}\n.el-icon-delete {\n position: absolute;\n top: 50%;\n left: 50%;\n display: none;\n}\n}\n.img:hover img[data-v-20c1791d]{\n opacity: 0.3;\n}\n.img:hover .el-icon-delete[data-v-20c1791d]{\n display: block;\n}\n.tool_bar[data-v-20c1791d] {\n float: right;\n margin-top: 20px;\n}\n.choose_item[data-v-20c1791d] {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin-bottom: 25px;\n color: rgb(136, 136, 136);\n height: 148px;\n line-height: 148px;\n width: 148px;\n text-align: center;\n border: 1px dashed #c0ccda;\n border-radius: 6px;\n}\n.display-b[data-v-20c1791d] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.my-teacher[data-v-20c1791d] {\n width: 25%;\n height: 80px;\n background-color: #eee;\n line-height: 80px;\n text-align: center;\n margin-bottom: 10px;\n}\n.news-media[data-v-20c1791d] {\n padding: 10px;\n width: 25%;\n}\n.news-media img[data-v-20c1791d]{\n width: 100%;\n}\n.s-news img[data-v-20c1791d] {\n width: 50px;\n float: right;\n}\n.title[data-v-20c1791d] {\n font-size: 16px;\n font-weight: 400;\n display: block;\n line-height: 1.2;\n color: #353535;\n}\n.digest[data-v-20c1791d] {\n padding-top: 12px;\n color: #9A9A9A;\n font-size: 14px;\n}\n.single-cover[data-v-20c1791d] {\n /*padding: 20px 15px 15px;*/\n}\n.muti-cover[data-v-20c1791d] {\n position: relative;\n padding: 20px 15px 0 15px;\n}\n.bottom-title[data-v-20c1791d] {\n color: #FFFFFF;\n background-color: rgba(0, 0, 0, 0.55);\n position: absolute;\n left: 15px;\n right: 15px;\n bottom: 0;\n padding: 8px 12px;\n}\n.next-cover[data-v-20c1791d] {\n padding: 12px 15px;\n position: relative;\n}\n.next-img[data-v-20c1791d] {\n float: right;\n margin-left: 12px;\n width: 60px !important;\n height: 60px !important;\n}\n.next-title[data-v-20c1791d] {\n overflow: hidden;\n font-weight: 400;\n word-wrap: break-word;\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n color: #353535;\n}\n.single-cover:hover .preview[data-v-20c1791d],.bottomCover:hover .preview[data-v-20c1791d]{\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n color: #fff;\n}\n.preview[data-v-20c1791d] {\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0,0,0,0.5);\n text-decoration: none;\n}\n.f-bt[data-v-20c1791d] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.ellip[data-v-20c1791d] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.flex-start[data-v-20c1791d] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/groupSend/index.vue"],names:[],mappings:";AACA;EACE,gBAAgB;CACjB;AACD;EACE,oBAAoB;EACpB,kBAAkB;CACnB;AACD;EACE,gBAAgB;EAChB,iBAAiB;EACjB,eAAe;EACf,iBAAiB;EACjB,eAAe;CAChB;AACD;EACE,WAAW;EACX,eAAe;CAChB;AACD;EACE,WAAW;EACX,eAAe;CAChB;AACD;EACE,cAAc;EACd,YAAY;CACb;AACD;EACE,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,4IAA4I;EAC5I,YAAY;EACZ,aAAa;EACb,uBAAuB;EACvB,sBAAsB;CACvB;AACD;EACE,mBAAmB;EACnB,WAAW;AACb;EACE,YAAY;CACb;AACD;EACE,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,cAAc;CACf;CACA;AACD;EACE,aAAa;CACd;AACD;EACE,eAAe;CAChB;AACD;EACE,aAAa;EACb,iBAAiB;CAClB;AACD;EACE,+BAA+B;UACvB,uBAAuB;EAC/B,oBAAoB;EACpB,0BAA0B;EAC1B,cAAc;EACd,mBAAmB;EACnB,aAAa;EACb,mBAAmB;EACnB,2BAA2B;EAC3B,mBAAmB;CACpB;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,+BAA+B;EAC/B,8BAA8B;MAC1B,0BAA0B;UACtB,sBAAsB;EAC9B,0BAA0B;MACtB,uBAAuB;UACnB,+BAA+B;EACvC,0BAA0B;MACtB,uBAAuB;UACnB,oBAAoB;CAC7B;AACD;EACE,WAAW;EACX,aAAa;EACb,uBAAuB;EACvB,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;CACrB;AACD;EACE,cAAc;EACd,WAAW;CACZ;AACD;EACE,YAAY;CACb;AACD;EACE,YAAY;EACZ,aAAa;CACd;AACD;EACE,gBAAgB;EAChB,iBAAiB;EACjB,eAAe;EACf,iBAAiB;EACjB,eAAe;CAChB;AACD;EACE,kBAAkB;EAClB,eAAe;EACf,gBAAgB;CACjB;AACD;EACE,4BAA4B;CAC7B;AACD;EACE,mBAAmB;EACnB,0BAA0B;CAC3B;AACD;EACE,eAAe;EACf,sCAAsC;EACtC,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;CACnB;AACD;EACE,mBAAmB;EACnB,mBAAmB;CACpB;AACD;EACE,aAAa;EACb,kBAAkB;EAClB,uBAAuB;EACvB,wBAAwB;CACzB;AACD;EACE,iBAAiB;EACjB,iBAAiB;EACjB,sBAAsB;EACtB,sBAAsB;EACtB,kBAAkB;EAClB,cAAc;EACd,eAAe;CAChB;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,yBAAyB;MACrB,sBAAsB;UAClB,wBAAwB;EAChC,0BAA0B;MACtB,uBAAuB;UACnB,oBAAoB;EAC5B,YAAY;CACb;AACD;EACE,cAAc;EACd,mBAAmB;EACnB,OAAO;EACP,QAAQ;EACR,YAAY;EACZ,aAAa;EACb,kCAAkC;EAClC,sBAAsB;CACvB;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,mBAAmB;EACnB,0BAA0B;MACtB,uBAAuB;UACnB,+BAA+B;EACvC,yBAAyB;MACrB,sBAAsB;UAClB,wBAAwB;CACjC;AACD;EACE,iBAAiB;EACjB,wBAAwB;EACxB,oBAAoB;CACrB;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,+BAA+B;EAC/B,8BAA8B;MAC1B,0BAA0B;UACtB,sBAAsB;EAC9B,wBAAwB;MACpB,qBAAqB;UACjB,4BAA4B;EACpC,yBAAyB;MACrB,sBAAsB;UAClB,wBAAwB;CACjC",file:"index.vue",sourcesContent:["\n.index[data-v-20c1791d] {\n padding: 20px 0;\n}\n.top[data-v-20c1791d] {\n margin-bottom: 30px;\n margin-left: 20px;\n}\n.title[data-v-20c1791d] {\n font-size: 16px;\n font-weight: 400;\n display: block;\n line-height: 1.2;\n color: #353535;\n}\n.inner-edit_area[data-v-20c1791d] {\n width: 96%;\n margin: 0 auto;\n}\n.upload-video[data-v-20c1791d] {\n width: 50%;\n margin-left:2%;\n}\n.b-title[data-v-20c1791d] {\n padding: 20px;\n color: #666;\n}\n.emotion_switch[data-v-20c1791d] {\n float: left;\n height: 28px;\n line-height: 999em;\n overflow: hidden;\n background: transparent url(https://res.wx.qq.com/mpres/en_US/htmledition/pages/modules/reply/images/icon_emotion_switch.png) no-repeat 0 0;\n width: 20px;\n height: 20px;\n vertical-align: middle;\n display: inline-block;\n}\n.img[data-v-20c1791d] {\n position: relative;\n width: 25%;\nimg {\n width: 100%;\n}\n.el-icon-delete {\n position: absolute;\n top: 50%;\n left: 50%;\n display: none;\n}\n}\n.img:hover img[data-v-20c1791d]{\n opacity: 0.3;\n}\n.img:hover .el-icon-delete[data-v-20c1791d]{\n display: block;\n}\n.tool_bar[data-v-20c1791d] {\n float: right;\n margin-top: 20px;\n}\n.choose_item[data-v-20c1791d] {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin-bottom: 25px;\n color: rgb(136, 136, 136);\n height: 148px;\n line-height: 148px;\n width: 148px;\n text-align: center;\n border: 1px dashed #c0ccda;\n border-radius: 6px;\n}\n.display-b[data-v-20c1791d] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.my-teacher[data-v-20c1791d] {\n width: 25%;\n height: 80px;\n background-color: #eee;\n line-height: 80px;\n text-align: center;\n margin-bottom: 10px;\n}\n.news-media[data-v-20c1791d] {\n padding: 10px;\n width: 25%;\n}\n.news-media img[data-v-20c1791d]{\n width: 100%;\n}\n.s-news img[data-v-20c1791d] {\n width: 50px;\n float: right;\n}\n.title[data-v-20c1791d] {\n font-size: 16px;\n font-weight: 400;\n display: block;\n line-height: 1.2;\n color: #353535;\n}\n.digest[data-v-20c1791d] {\n padding-top: 12px;\n color: #9A9A9A;\n font-size: 14px;\n}\n.single-cover[data-v-20c1791d] {\n /*padding: 20px 15px 15px;*/\n}\n.muti-cover[data-v-20c1791d] {\n position: relative;\n padding: 20px 15px 0 15px;\n}\n.bottom-title[data-v-20c1791d] {\n color: #FFFFFF;\n background-color: rgba(0, 0, 0, 0.55);\n position: absolute;\n left: 15px;\n right: 15px;\n bottom: 0;\n padding: 8px 12px;\n}\n.next-cover[data-v-20c1791d] {\n padding: 12px 15px;\n position: relative;\n}\n.next-img[data-v-20c1791d] {\n float: right;\n margin-left: 12px;\n width: 60px !important;\n height: 60px !important;\n}\n.next-title[data-v-20c1791d] {\n overflow: hidden;\n font-weight: 400;\n word-wrap: break-word;\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n color: #353535;\n}\n.single-cover:hover .preview[data-v-20c1791d],.bottomCover:hover .preview[data-v-20c1791d]{\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n color: #fff;\n}\n.preview[data-v-20c1791d] {\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0,0,0,0.5);\n text-decoration: none;\n}\n.f-bt[data-v-20c1791d] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.ellip[data-v-20c1791d] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.flex-start[data-v-20c1791d] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-flow: row nowrap;\n flex-flow: row nowrap;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n"],sourceRoot:""}])},HK0P:function(t,e,n){var i=n("GVQD");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("6dfa67e6",i,!1,{})},ac5S:function(t,e,n){var i=n("eIjc");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n("rjj0")("a8244922",i,!1,{})},eIjc:function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,"\n.el-radio-group {\n display: -webkit-box !important;\n display: -ms-flexbox !important;\n display: flex !important;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-flow: column;\n flex-flow: column;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.el-radio+.el-radio {\n margin-left: 0 !important;\n}\n.el-radio {\n margin-bottom: 6px;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/groupSend/index.vue"],names:[],mappings:";AACA;EACE,gCAAgC;EAChC,gCAAgC;EAChC,yBAAyB;EACzB,6BAA6B;EAC7B,8BAA8B;MAC1B,sBAAsB;UAClB,kBAAkB;EAC1B,wBAAwB;MACpB,qBAAqB;UACjB,4BAA4B;EACpC,yBAAyB;MACrB,sBAAsB;UAClB,wBAAwB;CACjC;AACD;GACG,0BAA0B;CAC5B;AACD;EACE,mBAAmB;CACpB",file:"index.vue",sourcesContent:["\n.el-radio-group {\n display: -webkit-box !important;\n display: -ms-flexbox !important;\n display: flex !important;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-flow: column;\n flex-flow: column;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.el-radio+.el-radio {\n margin-left: 0 !important;\n}\n.el-radio {\n margin-bottom: 6px;\n}\n"],sourceRoot:""}])},oerw:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("CCn6"),a=n("kmJW"),o=n("C+jy"),s=n("sf/l");function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r={name:"index",components:{page:a.a,page2:a.a,pageImage:a.a,pageVideo:a.a,emotion:o.a},data:function(){var t;return l(t={nowPage:1,total:0,limit:10,mediaPage:{nowPage:1,total:0,limit:5},show:!1,loading:!1,activeName:"text",list:[],content:"",uploadShow:!0,imageList:[],fileList:[],imageContent:"",videoContent:"",searchFrom:{type:1,is_test:!1},tableData:[],fileUid:null,userDialog:{total:0,limit:10,nowPage:1,show:!1},userList:[],searchUserFrom:{},multipleSelection:[],showEmotion:!1,showMedia:!1,showImage:!1,showVideo:!1,mediaList:[],mediaImageList:[],mediaVideoList:[],mediaImagePage:{nowPage:1,total:0,limit:5},mediaVideoPage:{nowPage:1,total:0,limit:5}},"imageContent",null),l(t,"videoContent",null),l(t,"newsContent",null),t},filters:{typeFilter:function(t){if(t)return"text"===t?"文本":"image"===t?"图片":"video"===t?"视频":"news"===t?"图文":void 0},typeListFilter:function(t){return t?1===t?"48时内关注但未购课用户":2===t?"有体验课但没有正式课用户":3===t?"未试听用户":void 0:""}},methods:{handleClick:function(t){this.activeName=t.name},handleRemove:function(){this.uploadShow=!0,this.imageList=[],this.imageContent=""},handleRemoveVideo:function(){this.videoContent="",this.fileList=[]},beforeAvatarUpload:function(){this.uploadShow=!1},handleAvatarSuccess:function(t){this.imageList=[{name:t.data.url,url:"https://cdn.singsingenglish.com/"+t.data.url}]},uploadFile:function(t){var e=this;this.$store.dispatch("setProgress",{type:"new",id:t.file.uid}),Object(i._74)({file:t.file,type:"wechat"}).then(function(t){e.imageContent={content:t.media_id,url:t.url},e.imageList=[{name:t.media_id,url:t.url}],e.$message({type:"success",message:"上传成功!"})}).catch(function(){e.$message({type:"error",message:"上传失败!"})})},uploadVideo:function(t){var e=this;Object(i._74)({file:t.file,type:"wechat"}).then(function(n){e.uploadVideoFile(t,n)}).catch(function(){e.$message({type:"error",message:"上传失败!"})})},uploadVideoFile:function(t,e){var n=this;this.fileUid=t.file.uid,this.loading=!0,this.$store.dispatch("setProgress",{type:"new",id:t.file.uid}),Object(i._74)({file:t.file,type:"local"}).then(function(i){n.videoContent={content:e.media_id,url:"https://cdn.singsingenglish.com/"+i.url},n.fileList=[{name:i.name,url:"https://cdn.singsingenglish.com/"+i.url}],n.loading=!1,n.$message({type:"success",message:"上传成功!"}),n.$store.dispatch("setProgress",{type:"delete",id:t.file.uid}),n.fileUid=null}).catch(function(){n.loading=!1,n.$message({type:"error",message:"上传失败!"})})},send:function(){var t=this,e={};e.type=this.searchFrom.type;var n=this.searchFrom.is_test?"发送筛选用户,":"不发送筛选用户,";if(1===this.searchFrom.type){if(!(this.searchFrom.time&&this.searchFrom.time.length>0))return void this.$message({type:"error",message:"请选择时间!"});console.log("this.searchFrom.time",this.searchFrom.time),e.start_at=s.a.dateFmt(this.searchFrom.time[0],"yyyy-MM-dd hh:mm:ss"),e.end_at=s.a.dateFmt(this.searchFrom.time[1],"yyyy-MM-dd hh:mm:ss"),n+="48时内关注但未购课用户("+e.start_at+"~"+e.end_at+","}else 2===this.searchFrom.type?n+="有体验课但没有正式课用户,":3===this.searchFrom.type&&(n+="未试听用户,");if(this.searchFrom.user_ids){e.user_ids=this.searchFrom.user_ids,n+="用户ID:"+e.user_ids;var a={};if(a.type=this.activeName,"text"===this.activeName){if(!this.content)return void this.$message({type:"error",message:"请输入文本!"});a.content=this.content}else if("image"===this.activeName){if(!this.imageContent)return void this.$message({type:"error",message:"请上传图片!"});a.content=this.imageContent.content,a.url=this.imageContent.url}else if("video"===this.activeName){if(!this.videoContent)return void this.$message({type:"error",message:"请上传视频!"});a.content=this.videoContent.content,a.url=this.videoContent.url}else"news"===this.activeName&&(this.newsContent&&this.newsContent.media_id?a.content=this.newsContent.media_id:this.$message({type:"error",message:"请选择图文!"}));e.content=JSON.stringify(a),e.is_test=this.searchFrom.is_test?2:1,console.log("json",e),this.$confirm(n,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i._63)(e).then(function(e){t.$message({message:e,type:"success"}),t.show=!1,t.clearData(),t.getMsgList()})}).catch(function(){t.$message({type:"info",message:"已取消发送"})})}else this.$message({type:"error",message:"请加入内部人员!"})},clearData:function(){this.content="",this.videoContent=null,this.imageContent=null,this.newsContent=null,this.activeName,this.searchFrom={},this.fileList=[],this.imageList=[]},getMsgList:function(){var t=this,e={limit:this.limit,page:this.nowPage};Object(i._31)(e).then(function(e){t.tableData=e.list,t.total=e.total})},onMediaPageChange:function(t){this.mediaPage.nowPage=t,this.getMediaList()},onMediaSizeChange:function(){this.mediaPage.nowPage=1,this.mediaPage.limit=val,this.getMediaList()},onImagePageChange:function(t){this.mediaImagePage.nowPage=t,this.getMediaList()},onImageSizeChange:function(t){this.mediaImagePage.nowPage=1,this.mediaImagePage.limit=t,this.getMediaList()},onVideoPageChange:function(t){this.mediaVideoPage.nowPage=t,this.getMediaList()},onVideoSizeChange:function(t){this.mediaVideoPage.nowPage=1,this.mediaVideoPage.limit=t,this.getMediaList()},onPageChange:function(t){this.nowPage=t,this.getMsgList()},onSizeChange:function(t){this.nowPage=1,this.limit=t,this.getMsgList()},getMsgResult:function(t){var e=this;if(t){var n={only_text:1,send_id:t};Object(i._31)(n).then(function(t){e.$message({message:t,type:"success"}),e.getMsgList()})}},getUser:function(){var t=this,e={page:this.userDialog.nowPage,limit:this.userDialog.limit};this.searchUserFrom.userId&&(e.user_id=this.searchUserFrom.userId),this.searchUserFrom.nickName&&(e.nickname=this.searchUserFrom.nickName),this.searchUserFrom.mobile&&(e.mobile=this.searchUserFrom.mobile),Object(i._50)(e).then(function(e){t.userList=e.list,t.userDialog.total=e.total})},onUserPageChange:function(t){this.userDialog.nowPage=t,this.getUser()},onUserSizeChange:function(t){this.userDialog.nowPage=1,this.userDialog.limit=t,this.getUser()},handleSelectionChange:function(t){this.multipleSelection=t},onSelectUser:function(){this.userDialog.show=!0,this.searchFrom.user_ids?this.multipleSelection=this.searchFrom.user_ids.split(","):this.multipleSelection=[],this.getUser()},onConfirm:function(){var t=this.multipleSelection;if(0===t.length)this.$message({type:"error",message:"请选择用户!"});else{var e=[];t.forEach(function(t){e.push(t.user_id)});var n=e;this.searchFrom.user_ids&&(n=e.concat(this.stringToInt(this.searchFrom.user_ids.split(","))));var i=this.dedupe(n);this.searchFrom.user_ids=i.join(","),this.userDialog.show=!1}},dedupe:function(t){return Array.from(new Set(t))},stringToInt:function(t){var e=t||[];return e=e.map(function(t){return parseInt(t,10)})},emotion:function(t){var e=t.replace(/\//gi,"");return'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif" align="middle">'},handleEmotion:function(t){this.content+=t},onChooseMedia:function(t){console.log("onChooseMedia",t),"image"===this.type?(this.imageContent={content:t.media_id,url:t.url},this.imageList=[{name:t.media_id,url:t.url}],this.showImage=!1):"video"===this.type?(this.videoContent={content:t.media_id,url:t.info.down_url},this.fileList=[{name:t.info.title,url:t.info.url}],this.showVideo=!1):"news"===this.type&&(this.newsContent=t,this.showMedia=!1)},getMediaList:function(){var t=this,e=this.activeName,n={type:e,page:this.mediaPage.nowPage,limit:this.mediaPage.limit};"image"===e?(n.page=this.mediaImagePage.nowPage,n.limit=this.mediaImagePage.limit,this.showImage=!0):"video"===e?(n.page=this.mediaVideoPage.nowPage,n.limit=this.mediaVideoPage.limit,this.showVideo=!0):"news"===e&&(n.page=this.mediaPage.nowPage,n.limit=this.mediaPage.limit,this.showMedia=!0),this.loading=!0,Object(i._29)(n).then(function(n){t.loading=!1,t.type=e,t.mediaList=n.item,t.mediaPage.total=n.total_count,"image"===e?(t.mediaImageList=n.item,t.mediaImagePage.total=n.total_count):"video"===e?(t.mediaVideoList=n.item,t.mediaVideoPage.total=n.total_count):"news"===e&&(t.mediaList=n.item,t.mediaPage.total=n.total_count),0===t.total&&t.$message({showClose:!0,message:"暂无数据"})}).catch(function(){t.loading=!1})},defaultTime:function(){var t=(new Date).getTime(),e=t-1728e5;this.searchFrom.time=[new Date(e),new Date(t)]}},mounted:function(){this.getMsgList(),this.defaultTime()},computed:{progress:function(){var t=this;return this.$store.state.progressList.find(function(e){return e.id===t.fileUid}).num<100?this.$store.state.progressList.find(function(e){return e.id===t.fileUid}).num:100}}},c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"index"},[n("div",{staticClass:"b-title"},[t._v("群发列表 "),n("el-button",{staticStyle:{float:"right","margin-bottom":"10px"},attrs:{type:"primary",plain:""},on:{click:function(e){t.show=!0}}},[t._v("新建群发消息")])],1),t._v(" "),n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData}},[n("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-table",{attrs:{border:!1,data:[JSON.parse(e.row.content)]}},[n("el-table-column",{attrs:{label:"类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\r\n "+t._s(t._f("typeFilter")(e.row.type))+"\r\n ")]}}])}),t._v(" "),"text"!==JSON.parse(e.row.content).type?n("el-table-column",{attrs:{prop:"media_id",label:"media_id"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\r\n "+t._s(e.row.content)+"\r\n ")]}}])}):t._e(),t._v(" "),n("el-table-column",{attrs:{prop:"url",label:"内容"},scopedSlots:t._u([{key:"default",fn:function(e){return["text"===e.row.type?n("div",[n("span",{domProps:{innerHTML:t._s(e.row.content.replace(/\/[\u4E00-\u9FA5]{1,3}/gi,t.emotion))}})]):"image"===e.row.type?n("div",[n("img",{staticStyle:{width:"80px"},attrs:{src:e.row.url}})]):"video"===e.row.type?n("div",[n("a",{attrs:{href:e.row.url,target:"_blank"}},[t._v("点击查看视频")])]):t._e()]}}])})],1)]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"send_id",label:"消息ID"}}),t._v(" "),n("el-table-column",{attrs:{label:"消息类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\r\n "+t._s(t._f("typeListFilter")(e.row.type))+"\r\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"send_num",label:"预计发送"}}),t._v(" "),n("el-table-column",{attrs:{prop:"arrive_num",label:"已发送"}}),t._v(" "),n("el-table-column",{attrs:{prop:"failed_num",label:"发送失败"}}),t._v(" "),n("el-table-column",{attrs:{prop:"start_at",label:"开始时间"}}),t._v(" "),n("el-table-column",{attrs:{prop:"end_at",label:"截止时间"}}),t._v(" "),n("el-table-column",{attrs:{prop:"created_at",label:"发送时间"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text",plain:"",size:"mini"},on:{click:function(n){t.getMsgResult(e.row.send_id)}}},[t._v("\r\n 查询及时结果\r\n ")])]}}])})],1),t._v(" "),n("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange,sizeChange:t.onSizeChange}}),t._v(" "),n("el-dialog",{attrs:{title:"新建群发消息",visible:t.show},on:{"update:visible":function(e){t.show=e}}},[n("el-form",{ref:"searchFrom",attrs:{model:t.searchFrom,"label-width":"150px"}},[n("el-form-item",{attrs:{label:"是否发送筛选用户"}},[n("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:t.searchFrom.is_test,callback:function(e){t.$set(t.searchFrom,"is_test",e)},expression:"searchFrom.is_test"}})],1),t._v(" "),1===t.searchFrom.type?n("el-form-item",{attrs:{label:"时间"}},[n("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["00:00:00","23:59:59"]},model:{value:t.searchFrom.time,callback:function(e){t.$set(t.searchFrom,"time",e)},expression:"searchFrom.time"}})],1):t._e(),t._v(" "),n("el-form-item",{attrs:{label:"类型"}},[n("el-radio-group",{model:{value:t.searchFrom.type,callback:function(e){t.$set(t.searchFrom,"type",e)},expression:"searchFrom.type"}},[n("el-radio",{attrs:{label:1}},[t._v("48时内关注但未购课用户")]),t._v(" "),n("el-radio",{attrs:{label:2}},[t._v("有体验课但没有正式课用户")]),t._v(" "),n("el-radio",{attrs:{label:3}},[t._v("未试听用户")])],1)],1),t._v(" "),n("el-row",[n("el-col",{attrs:{span:16}},[n("el-form-item",{attrs:{label:"用户ID"}},[n("el-input",{model:{value:t.searchFrom.user_ids,callback:function(e){t.$set(t.searchFrom,"user_ids",e)},expression:"searchFrom.user_ids"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:6,offset:2}},[n("el-button",{attrs:{type:"primary"},on:{click:t.onSelectUser}},[t._v("选择用户")])],1)],1),t._v(" "),n("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:"文本",name:"text"}},[n("div",{staticClass:"inner-edit_area"},[n("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:8},placeholder:"请输入内容"},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}})],1),t._v(" "),n("div",{staticStyle:{float:"right"}},[n("el-popover",{attrs:{placement:"bottom-end",width:"400",offset:10,trigger:"manual"},model:{value:t.showEmotion,callback:function(e){t.showEmotion=e},expression:"showEmotion"}},[n("div",[n("emotion",{attrs:{height:200},on:{emotion:t.handleEmotion}})],1),t._v(" "),n("el-button",{attrs:{slot:"reference",type:"text"},on:{click:function(e){t.showEmotion=!t.showEmotion}},slot:"reference"},[n("span",{staticClass:"icon_emotion emotion_switch"})])],1)],1)]),t._v(" "),n("el-tab-pane",{attrs:{label:"图片",name:"image"}},[n("div",{staticClass:"flex-start"},[n("div",[n("el-upload",{attrs:{action:"/api/public/upload/zone","http-request":t.uploadFile,"before-upload":t.beforeAvatarUpload,"list-type":"picture-card","file-list":t.imageList,"on-success":t.handleAvatarSuccess,"on-remove":t.handleRemove,limit:1}},[n("i",{staticClass:"el-icon-plus"})])],1),t._v(" "),n("div",{staticClass:"display-b",staticStyle:{"margin-left":"10px"}},[n("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:function(e){t.getMediaList()}}},[n("i",{staticClass:"el-icon-plus",staticStyle:{color:"#8c939d"}}),t._v("从素材库中选择")])])]),t._v(" "),t.showImage&&t.mediaImageList.length>0?n("div",[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaImageList},on:{"row-click":t.onChooseMedia}},[n("el-table-column",{attrs:{prop:"name",label:"名称"}}),t._v(" "),n("el-table-column",{attrs:{prop:"media_id",label:"mediaId"}}),t._v(" "),n("el-table-column",{attrs:{label:"URL"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("a",{attrs:{href:t.row.url}},[n("img",{staticStyle:{width:"60px"},attrs:{src:t.row.url}})])]}}])})],1),t._v(" "),n("page-image",{attrs:{total:t.mediaImagePage.total,limit:t.mediaImagePage.limit},on:{pageChange:t.onImagePageChange,sizeChange:t.onImageSizeChange},model:{value:t.mediaImagePage.nowPage,callback:function(e){t.$set(t.mediaImagePage,"nowPage",e)},expression:"mediaImagePage.nowPage"}})],1):t._e()]),t._v(" "),n("el-tab-pane",{attrs:{label:"视频",name:"video"}},[n("div",{staticClass:"flex-start"},[n("el-upload",{staticClass:"upload-video",attrs:{action:"/api/public/upload/zone","http-request":t.uploadVideo,"file-list":t.fileList,"on-remove":t.handleRemoveVideo,limit:1}},[n("el-button",{attrs:{size:"small",type:"primary",disabled:t.fileUid&&t.progress<99}},[t._v("点击上传")]),t._v(" "),n("div",{staticStyle:{width:"300px"}},[t.fileUid?n("el-progress",{attrs:{percentage:t.progress}}):t._e()],1)],1),t._v(" "),n("div",{staticClass:"display-b"},[n("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:function(e){t.getMediaList()}}},[n("i",{staticClass:"el-icon-plus",staticStyle:{color:"#8c939d"}}),t._v("从素材库中选择")])])],1),t._v(" "),t.showVideo&&t.mediaVideoList.length>0?n("div",[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaVideoList},on:{"row-click":t.onChooseMedia}},[n("el-table-column",{attrs:{prop:"name",label:"名称"}}),t._v(" "),n("el-table-column",{attrs:{prop:"media_id",label:"mediaId"}}),t._v(" "),n("el-table-column",{attrs:{label:"URL"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.info&&e.row.info.down_url?n("a",{attrs:{href:e.row.info.down_url,target:"_blank"}},[t._v("\r\n "+t._s(e.row.info.title)+"\r\n ")]):t._e()]}}])})],1),t._v(" "),n("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange,sizeChange:t.onSizeChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()]),t._v(" "),n("el-tab-pane",{attrs:{label:"图文",name:"news"}},[t.newsContent&&t.newsContent.content&&t.newsContent.content.news_item?n("div",[n("div",{staticClass:"news-media",staticStyle:{display:"inline-block"}},[n("el-card",{attrs:{"body-style":{padding:"0px"}}},t._l(t.newsContent.content.news_item,function(e,i){return n("div",{staticStyle:{position:"relative"}},[1===t.newsContent.content.news_item.length?n("div",{staticClass:"single-cover"},[n("div",{staticClass:"title"},[t._v(t._s(e.title))]),t._v(" "),n("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:e.thumb_url}}),t._v(" "),n("div",{staticClass:"digest"},[t._v(t._s(e.digest))]),t._v(" "),n("a",{staticClass:"preview",attrs:{href:e.url,target:"_blank"}},[t._v("\r\n 预览文章\r\n ")])]):t.newsContent.content.news_item.length>1?n("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===i?n("div",{staticClass:"muti-cover"},[n("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:e.thumb_url}}),t._v(" "),n("div",{staticClass:"bottom-title"},[t._v(t._s(e.title))])]):n("div",{staticClass:"next-cover clear-both"},[n("span",{staticClass:"next-title"},[t._v(t._s(e.title))]),t._v(" "),n("img",{staticClass:"next-img",attrs:{src:e.thumb_url}})]),t._v(" "),n("a",{staticClass:"preview",attrs:{href:e.url,target:"_blank"}},[t._v("\r\n 预览文章\r\n ")])]):t._e()])}))],1),t._v(" "),n("i",{staticClass:"el-icon-delete",staticStyle:{display:"inline-block"},on:{click:function(e){t.newsContent=""}}})]):t._e(),t._v(" "),n("div",{staticClass:"display-b"},[n("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:function(e){t.getMediaList()}}},[n("i",{staticClass:"el-icon-plus",staticStyle:{color:"#8c939d"}}),t._v("从素材库中选择")])]),t._v(" "),t.showMedia&&t.mediaList.length>0?n("div",[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[n("el-table-column",{attrs:{prop:"media_id",label:"mediaId"}}),t._v(" "),n("el-table-column",{attrs:{label:"URL"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.content&&e.row.content.news_item?n("div",{staticClass:"news-media",staticStyle:{display:"inline-block",width:"200px"}},t._l(e.row.content.news_item,function(i,a){return n("div",{staticStyle:{position:"relative"}},[1===e.row.content.news_item.length?n("div",{staticClass:"single-cover"},[n("div",{staticClass:"title"},[t._v(t._s(i.title))]),t._v(" "),n("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:i.thumb_url}}),t._v(" "),n("div",{staticClass:"digest"},[t._v(t._s(i.digest))]),t._v(" "),n("a",{staticClass:"preview",attrs:{href:i.url,target:"_blank"}},[t._v("\r\n 预览文章\r\n ")])]):e.row.content.news_item.length>1?n("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===a?n("div",{staticClass:"muti-cover"},[n("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:i.thumb_url}}),t._v(" "),n("div",{staticClass:"bottom-title"},[t._v(t._s(i.title))])]):n("div",{staticClass:"next-cover clear-both"},[n("span",{staticClass:"next-title"},[t._v(t._s(i.title))]),t._v(" "),n("img",{staticClass:"next-img",attrs:{src:i.thumb_url}})]),t._v(" "),n("a",{staticClass:"preview",attrs:{href:i.url,target:"_blank"}},[t._v("\r\n 预览文章\r\n ")])]):t._e()])})):t._e()]}}])})],1),t._v(" "),n("page2",{attrs:{total:t.total,limit:t.mediaPage.limit},on:{pageChange:t.onMediaPageChange,sizeChange:t.onMediaSizeChange},model:{value:t.mediaPage.nowPage,callback:function(e){t.$set(t.mediaPage,"nowPage",e)},expression:"mediaPage.nowPage"}})],1):t._e()])],1)],1),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:function(e){t.send()}}},[t._v("确 定")])],1),t._v(" "),n("el-dialog",{attrs:{visible:t.userDialog.show,"append-to-body":""},on:{"update:visible":function(e){t.$set(t.userDialog,"show",e)}}},[n("el-form",{attrs:{"label-width":"90px"}},[n("el-row",[n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"ID"}},[n("el-input",{model:{value:t.searchUserFrom.userId,callback:function(e){t.$set(t.searchUserFrom,"userId",e)},expression:"searchUserFrom.userId"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"昵称"}},[n("el-input",{model:{value:t.searchUserFrom.nickName,callback:function(e){t.$set(t.searchUserFrom,"nickName",e)},expression:"searchUserFrom.nickName"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"电话"}},[n("el-input",{model:{value:t.searchUserFrom.mobile,callback:function(e){t.$set(t.searchUserFrom,"mobile",e)},expression:"searchUserFrom.mobile"}})],1)],1)],1),t._v(" "),n("el-row",[n("el-col",{attrs:{span:8,offset:16}},[n("el-form-item",[n("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",plain:""},on:{click:t.getUser}},[t._v("搜索")])],1)],1)],1)],1),t._v(" "),n("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.userList},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{className:"f-c",label:"用户"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("img",{staticStyle:{"margin-right":"5px",width:"50px",height:"50px","border-radius":"50px"},attrs:{src:e.row.avatar}}),t._v(t._s(e.row.nickname)+"(ID:"+t._s(e.row.user_id)+")\r\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"mobile",label:"手机号"}})],1),t._v(" "),n("page",{attrs:{total:t.userDialog.total,limit:t.userDialog.limit},on:{pageChange:t.onUserPageChange,sizeChange:t.onUserSizeChange}}),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.userDialog.show=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.onConfirm}},[t._v("确 定")])],1)],1)],1)],1)};c._withStripped=!0;var d={render:c,staticRenderFns:[]},m=d;var A=!1;var p=n("VU/8")(r,m,!1,function(t){A||(n("HK0P"),n("ac5S"))},"data-v-20c1791d",null);p.options.__file="src\\components\\groupSend\\index.vue";e.default=p.exports}});
-
wangwei authored0b58c3ed