企微助手 ,仓库名 短剧

35.98894bf2abee6183f74c.js 50KB

1
  1. webpackJsonp([35],{"2K0H":function(t,e){},"78AL":function(t,e){},BTzJ:function(t,e){},IKRH:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("Xxa5"),s=i.n(a),n=i("exGp"),l=i.n(n),r=i("pdUL"),o=i("FsX6"),c={props:{dialogVisible:{type:Boolean,default:function(){return!1}},link:{type:String,default:function(){return""}}},data:function(){return{loading:!1}},computed:{title:function(){return""}},watch:{dialogVisible:function(t){}},methods:{handleCancel:function(){this.$emit("close")},handleClearFormData:function(){this.form.app_id="",this.form.account_id=[]}}},m={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{staticClass:"video-dialog",attrs:{visible:t.dialogVisible,"before-close":t.handleCancel,title:t.title,width:"550px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"content-wrap"},[i("video",{attrs:{src:t.link,width:"60%",controls:""}})]),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.handleCancel}},[t._v("关 闭")])],1)])},staticRenderFns:[]};var p=i("VU/8")(c,m,!1,function(t){i("78AL")},"data-v-02c37470",null).exports,d=i("mvHQ"),h=i.n(d),u=i("fGUm"),g=i("//Fk"),_=i.n(g),v=i("Gu7T"),f=i.n(v),k=i("w/TU"),C=i.n(k),b=i("bEx1"),y=i("34d2"),x=i("ucpI"),w=i("1G7f"),S=i("Lqoy"),L=i("GEDR"),$=i("la//"),M=i("7Sep"),I={components:{imgCutter:x.a,addPlaybtn:w.a,draggable:C.a,phonePreview:b.a,radarEntrance:y.a,multipleLinkEdit:S.a,multipleLinkSelect:L.a,selectMaterials:M.a},props:{disabled:{type:Boolean,default:!1},afferent_attachments:{default:[]},afferent_content:{type:String,default:""},isShowTips:{type:Boolean,default:function(){return!0}},source:{type:String,default:"qun"},phone_width:{type:String,default:""},isKHQF:{type:Boolean,default:function(){return!1}},isKHHYY:{type:Boolean,default:function(){return!1}},isShowAddPlaylet:{type:Boolean,default:function(){return!1}}},data:function(){return{fileData:{admin_id:this.$cookie.getCookie("admin_id"),ttl:this.$cookie.getCookie("ttl"),sign:this.$cookie.getCookie("sign"),corpid:this.$localSelfStore.getLocal("defaultCorp")&&"undefined"!=this.$localSelfStore.getLocal("defaultCorp")?JSON.parse(this.$localSelfStore.getLocal("defaultCorp")).corpid:"",type:1,need_media_id:0},fileData2:{admin_id:this.$cookie.getCookie("admin_id"),ttl:this.$cookie.getCookie("ttl"),sign:this.$cookie.getCookie("sign"),corpid:this.$localSelfStore.getLocal("defaultCorp")&&"undefined"!=this.$localSelfStore.getLocal("defaultCorp")?JSON.parse(this.$localSelfStore.getLocal("defaultCorp")).corpid:"",type:1,need_media_id:1},content:this.afferent_content,imgVisible:!1,linkVisible:!1,linkExtendVisible:!1,miniprogramVisible:!1,miniProOptions:[],miniprogram:{title:"",appid:"",page:"",pic_media_id:"",pic_url:""},image:{media_id:"",pic_url:""},link:{title:"",picurl:"",desc:"",url:""},linkExtend:{title:"",jump_url:"",picurl:"",desc:""},attachments:[],edit_index:"",radarAttach:[],radarIds:[],attachments_idx:0,has_attachLen:0,imgCutterVisible:!1,oss_url:"",multipleLinkEditVisible:!1,multipleLinkSelectVisible:!1,selectMaterialsVisible:!1,selectMaterialsSource:"",addPlaybtnVisible:!1}},created:function(){this.afferent_attachments&&""!=this.afferent_attachments&&(this.attachments=this.afferent_attachments),this.handleGetMiniProOptions()},methods:{handleCreatedFn:function(){this.afferent_attachments&&""!=this.afferent_attachments&&(this.attachments=this.afferent_attachments)},onClickSelectMaterials:function(t){this.selectMaterialsSource=t,this.selectMaterialsVisible=!0},selectMaterialsConfirm:function(t){t&&t.url?("XCX"==this.selectMaterialsSource&&(this.miniprogram.pic_url=t.url,this.miniprogram.pic_media_id=t.material_id),"H5TGLJ"==this.selectMaterialsSource&&(this.linkExtend.picurl=t.url),"LJ"==this.selectMaterialsSource&&(this.link.picurl=t.url),"TP"==this.selectMaterialsSource&&(this.image.pic_url=t.url,this.image.media_id=t.material_id),this.selectMaterialsVisible=!1):this.$message({message:"所选素材不可用,请重新选择!",type:"warning"})},imgCutterCallback:function(t){this.imgCutterVisible=!1,t.flag&&(this.miniprogram.pic_url=t.data.url,this.miniprogram.pic_media_id=t.data.material_id)},openImgCutter:function(){var t=this;if(this.miniprogram.pic_url)if(this.$loading(this.$loadingConfig),-1!=this.miniprogram.pic_url.indexOf("http://playlet.oss-cn-beijing.aliyuncs.com/"))this.oss_url=this.miniprogram.pic_url.replace("http://playlet.oss-cn-beijing.aliyuncs.com/","http://dj.wenxingshuju.com/oss_image/"),this.imgCutterVisible=!0,this.$loading(this.$loadingConfig).close();else{if(this.oss_url)return this.imgCutterVisible=!0,void this.$loading(this.$loadingConfig).close();this.$axios.post(this.URL.BASEURL+this.URL.material_uploadFileByUrl,{img_url:this.miniprogram.pic_url}).then(function(e){(e=e.data)&&0==e.errno?(t.oss_url=e.rst.oss_url.replace("http://playlet.oss-cn-beijing.aliyuncs.com/","http://dj.wenxingshuju.com/oss_image/"),t.imgCutterVisible=!0,t.$loading(t.$loadingConfig).close()):4002!=e.errno&&t.$message({message:e.err,type:"error"})}).catch(function(e){t.$message({message:"服务器错误,获取裁剪图片失败",type:"error"})})}else this.imgCutterVisible=!0},onClickAddPlaybtn:function(){var t=this;if(!this.miniprogram.pic_url)return this.$message.warning("请先添加小程序封面");if(this.$loading(this.$loadingConfig),-1!=this.miniprogram.pic_url.indexOf("http://playlet.oss-cn-beijing.aliyuncs.com/"))this.oss_url=this.miniprogram.pic_url.replace("http://playlet.oss-cn-beijing.aliyuncs.com/","http://dj.wenxingshuju.com/oss_image/"),this.addPlaybtnVisible=!0,this.$loading(this.$loadingConfig).close();else{if(this.oss_url)return this.addPlaybtnVisible=!0,void this.$loading(this.$loadingConfig).close();this.$axios.post(this.URL.BASEURL+this.URL.material_uploadFileByUrl,{img_url:this.miniprogram.pic_url}).then(function(e){(e=e.data)&&0==e.errno?(t.oss_url=e.rst.oss_url.replace("http://playlet.oss-cn-beijing.aliyuncs.com/","http://dj.wenxingshuju.com/oss_image/"),t.addPlaybtnVisible=!0,t.$loading(t.$loadingConfig).close()):4002!=e.errno&&t.$message({message:e.err,type:"error"})}).catch(function(e){t.$message({message:"服务器错误,获取图片失败",type:"error"})})}this.addPlaybtnVisible=!0},onCancelAddPlaybtn:function(){this.addPlaybtnVisible=!1},onConfirmAddPlaybtn:function(t){this.addPlaybtnVisible=!1,t.url&&(this.miniprogram.pic_url=t.url,this.miniprogram.pic_media_id=t.material_id)},insertAtCursor:function(){var t=this;return l()(s.a.mark(function e(){var i,a,n,l;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i="「客户昵称」",!(a=t.$refs.textarea).selectionStart&&0!==a.selectionStart){e.next=12;break}return n=a.selectionStart,l=a.selectionEnd,t.content=a.value.substring(0,n)+i+a.value.substring(l,a.value.length),e.next=8,t.$nextTick();case 8:a.focus(),a.setSelectionRange(l+i.length,l+i.length),e.next=13;break;case 12:t.content+=i;case 13:t.$emit("editContent",t.content);case 14:case"end":return e.stop()}},e,t)}))()},radarDefine:function(t){for(var e=this.attachments,i=0;i<e.length;i++)"radar"==e[i].msgtype&&(e.splice(i,1),i-=1);this.attachments=[].concat(f()(this.attachments),f()(t)),this.$emit("changeAttachment",this.attachments)},editAttachment:function(t,e){this.edit_index=e,"image"==t.msgtype&&(this.image=t.image,this.imgVisible=!0),"link"==t.msgtype&&(this.link=t.link,this.linkVisible=!0),"miniprogram"==t.msgtype&&(this.miniprogram=t.miniprogram,this.miniprogramVisible=!0),"promote"==t.msgtype&&(this.linkExtend=t.promote,this.linkExtendVisible=!0)},deleteAttachment:function(t){this.attachments.splice(t,1),this.attachments_idx++,this.$emit("changeAttachment",this.attachments)},imageDefine:function(){if(""!=this.image.pic_url){var t={msgtype:"image",image:this.image};-1!=this.edit_index?(this.$set(this.attachments,this.edit_index,t),this.edit_index=-1):this.attachments.push(t),this.$emit("changeAttachment",this.attachments),this.imgVisible=!1}else this.$message({message:"请选择图片",type:"warning"})},linkExtendDefine:function(){var t=this;if(""==this.linkExtend.title||this.$getStrBytes(this.linkExtend.title)>128)this.$message({message:"请正确输入链接标题",type:"warning"});else if(/^http[s]?:\/\/([\w-]+\.)+([\w-]+)/i.test(this.linkExtend.jump_url))if(this.linkExtend&&""!=this.linkExtend.jump_url&&this.$getStrBytes(this.linkExtend.jump_url)>2048)this.$message({message:"请正确输入链接地址",type:"warning"});else if(this.linkExtend&&""!=this.linkExtend.desc&&this.$getStrBytes(this.linkExtend.desc)>512)this.$message({message:"请正确输入消息描述",type:"warning"});else{var e={msgtype:"promote",promote:this.linkExtend};this.determineLink({link:this.linkExtend.jump_url,hint:"请确认链接地址:"+this.linkExtend.jump_url,cb:function(i){-1!=t.edit_index?(t.$set(t.attachments,t.edit_index,e),t.edit_index=-1):t.attachments.push(e),t.$emit("changeAttachment",t.attachments),t.linkExtendVisible=!1}})}else this.$message({message:"请正确输入链接地址",type:"warning"})},linkDefine:function(){var t=this;if(""==this.link.title||this.$getStrBytes(this.link.title)>128)this.$message({message:"请正确输入链接标题",type:"warning"});else if(/^http[s]?:\/\/([\w-]+\.)+([\w-]+)/i.test(this.link.url))if(this.link&&""!=this.link.url&&this.$getStrBytes(this.link.url)>2048)this.$message({message:"请正确输入链接地址",type:"warning"});else if(this.link&&""!=this.link.desc&&this.$getStrBytes(this.link.desc)>512)this.$message({message:"请正确输入消息描述",type:"warning"});else{var e={msgtype:"link",link:this.link};this.determineLink({link:this.link.url,hint:"请确认链接地址:"+this.link.url,cb:function(i){-1!=t.edit_index?(t.$set(t.attachments,t.edit_index,e),t.edit_index=-1):t.attachments.push(e),t.$emit("changeAttachment",t.attachments),t.linkVisible=!1}})}else this.$message({message:"请正确输入链接地址",type:"warning"})},miniprogramDefine:function(){var t=this;if(""==this.miniprogram.title||this.$getStrBytes(this.miniprogram.title)>64)this.$message({message:"请正确输入小程序标题",type:"warning"});else if(/^wx(?=.*\d)(?=.*[a-z])[\da-z]{16}$/.test(this.miniprogram.appid))if(""!=this.miniprogram.page)if(""!=this.miniprogram.pic_url){var e={msgtype:"miniprogram",miniprogram:this.miniprogram};this.determineLink({link:this.miniprogram.page,hint:"请确认小程序路径:"+this.miniprogram.page,cb:function(i){-1!=t.edit_index?(t.$set(t.attachments,t.edit_index,e),t.edit_index=-1):t.attachments.push(e),t.$emit("changeAttachment",t.attachments),t.miniprogramVisible=!1}})}else this.$message({message:"请选择小程序封面",type:"warning"});else this.$message({message:"请输入小程序路径",type:"warning"});else this.$message({message:"请正确输入小程序appID",type:"warning"})},determineLink:function(t){var e=t.link,i=t.hint,a=t.cb;e.split("?").length>2?this.$confirm(i,"提示",{closeOnClickModal:!1,type:"warning",showCancelButton:!0,confirmButtonText:"确认无误",cancelButtonText:"去修改"}).then(function(){a&&a()}).catch(function(){}):a&&a()},contentChange:function(t){this.$emit("editContent",this.content)},fileEvent:function(t){this.edit_index=-1,this.attachments&&this.attachments.length>=9?this.$message({message:"最多支持添加9个附件",type:"warning"}):("img"==t&&(this.image={media_id:"",pic_url:""},this.imgVisible=!0),"link"==t&&(this.link={title:"",picurl:"",desc:"",url:""},this.linkVisible=!0),"miniprogram"==t&&(this.miniprogram={title:"",appid:"",page:"",pic_media_id:"",pic_url:""},this.miniprogramVisible=!0),"linkExtend"==t&&(this.linkExtend={title:"",jump_url:"",picurl:"",desc:""},this.linkExtendVisible=!0))},uploadSuccess:function(t,e){if(this.$loading(this.$loadingConfig).close(),0==t.errno){if(this.imgVisible&&(this.image.pic_url=t.rst.url,this.image.media_id=t.rst.material_id),this.linkVisible&&(this.link.picurl=t.rst.url),this.miniprogramVisible){this.miniprogram.pic_media_id=t.rst.material_id,this.miniprogram.pic_url=t.rst.url;try{this.handleCheckImgWH(e)}catch(t){console.log(t)}}this.linkExtendVisible&&(this.linkExtend.picurl=t.rst.url)}else this.$message({message:t.err,type:"warning"})},beforeUploadUpload:function(t){this.$loading(this.$loadingConfig)},uploadFail:function(){this.$loading(this.$loadingConfig).close(),this.$message({message:"上传失败",type:"fail"})},handleShowMultipleLinkEdit:function(){this.multipleLinkEditVisible=!0},onConfirmMultipleLink:function(t){var e=this;this.multipleLinkEditVisible=!1,Array.isArray(t)&&t.length&&t.forEach(function(t){e.attachments.push(t)}),this.$emit("changeAttachment",this.attachments)},onCancelMultipleLink:function(){this.multipleLinkEditVisible=!1},onClickMultipleLinkSelect:function(){this.multipleLinkSelectVisible=!0},onConfirmMultipleLinkDialog:function(t){var e=this,i=t.multipleLink;return l()(s.a.mark(function t(){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.multipleLinkSelectVisible=!1,!i||!i.length){t.next=6;break}return localStorage.setItem($.E.PLAYLET_LINK_MULTI,h()(i)),t.next=5,e.$nextTick();case 5:e.handleShowMultipleLinkEdit();case 6:case"end":return t.stop()}},t,e)}))()},onCancelMultipleLinkDialog:function(){this.multipleLinkSelectVisible=!1},handleGetMiniProOptions:function(){var t=this;return l()(s.a.mark(function e(){var i,a,n;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.post(t.URL.BASEURL+t.URL.playletManage_smallAppList,{});case 2:i=e.sent,a=i.data,(n=void 0===a?{}:a)&&0==n.errno?(t.miniProOptions=n.rst,_.a.resolve()):4002!=n.errno&&(t.$message.warning(n.err),_.a.reject());case 6:case"end":return e.stop()}},e,t)}))()},onClickToSCX:function(){var t=this.$router.resolve({path:"/miniProManage"});window.open(t.href,"_blank")},onClickSCXRefresh:function(){var t=this;return l()(s.a.mark(function e(){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.handleGetMiniProOptions();case 2:t.$message.success("刷新成功");case 3:case"end":return e.stop()}},e,t)}))()},handleCheckImgWH:function(t){var e=this,i=new FileReader;i.readAsDataURL(t.raw),i.onload=function(){var t=new Image;t.src=i.result,t.onload=function(){var i=t.width/t.height;Math.abs(i-5/4)>.01&&e.$message.warning({message:"小程序封面图片宽高比为5:4,建议使用【图片裁剪】进行调整",duration:5e3})}}}}},E={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[a("div",{staticClass:"editCon",style:t.disabled||t.attachments&&t.attachments.length?"padding:0":""},["welcom"==t.source?a("div",{staticClass:"insert"},[a("span",{on:{click:t.insertAtCursor}},[t._v("「插入客户昵称」")])]):t._e(),t._v(" "),t.disabled?a("div",{staticClass:"textarea self-scrollbar-3 pointer-drop",staticStyle:{"white-space":"pre-wrap",color:"#666"}},[t._v(t._s(t.content)+"\n ")]):a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.content,expression:"content"}],ref:"textarea",staticClass:"textarea self-scrollbar-3",attrs:{autocomplete:"off",placeholder:"welcom"==t.source?"请输入欢迎语":"请输入群发内容"},domProps:{value:t.content},on:{input:[function(e){e.target.composing||(t.content=e.target.value)},t.contentChange]}}),t._v(" "),a("div",{staticClass:"flex"},[t.$getStrBytes(t.content)>3e3?a("div",{staticClass:"warning_hint"},[a("i",{staticClass:"el-icon-warning-outline"}),t._v("\n 消息文本内容,最多3000个字节,已超出!")]):t._e(),t._v(" "),a("div",{staticClass:"maxFont",staticStyle:{flex:"1"}},[t._v(t._s(t.$getStrBytes(t.content))+"/3000字节")])]),t._v(" "),t.attachments&&t.attachments.length>0?a("div",{staticClass:"fujian"},[a("draggable",{staticClass:"syllable_ul",attrs:{element:"ul",disabled:t.disabled,list:t.attachments,options:{group:"name",animation:100}}},t._l(t.attachments,function(e,i){return a("div",{key:i+t.attachments_idx,staticClass:"fujianItem",class:t.disabled?"pointer-drop":""},[a("div",{staticClass:"left"},[t.disabled?t._e():a("i",{staticClass:"el-icon-remove-outline",on:{click:function(e){return t.deleteAttachment(i)}}}),t._v(" "),"image"==e.msgtype?a("span",{staticClass:"flex-align-center"},[t._v("【图片】:"),a("img",{staticStyle:{width:"16px",height:"16px"},attrs:{src:e.image.pic_url,alt:""}})]):t._e(),t._v(" "),"promote"==e.msgtype?a("span",[t._v("【H5推广】:"+t._s(e.promote.title))]):t._e(),t._v(" "),"miniprogram"==e.msgtype?a("span",[t._v("【小程序】:"+t._s(e.miniprogram.title))]):t._e(),t._v(" "),"link"==e.msgtype?a("span",[t._v("【链接】:"+t._s(e.link.title))]):t._e()]),t._v(" "),t.disabled?t._e():a("div",{staticClass:"right"},[a("i",{staticClass:"el-icon-edit-outline",on:{click:function(a){return t.editAttachment(e,i)}}})])])}),0)],1):t._e(),t._v(" "),t.disabled||t.attachments&&t.attachments.length?t._e():a("div",{staticClass:"addFileBox"},[a("el-popover",{attrs:{placement:"top",trigger:"click"}},[a("div",{staticClass:"pointer",staticStyle:{display:"inline-block"},attrs:{slot:"reference"},slot:"reference"},[a("i",{staticClass:"el-icon-circle-plus-outline"}),t._v(" "),a("span",[t._v("添加附件")])]),t._v(" "),a("div",{staticClass:"propoverItem",on:{click:function(e){return t.fileEvent("img")}}},[a("img",{attrs:{src:i("/QKx"),alt:""}}),t._v(" "),a("span",[t._v("图片")])]),t._v(" "),a("div",{staticClass:"propoverItem",on:{click:function(e){return t.fileEvent("linkExtend")}}},[a("img",{attrs:{src:i("cukq"),alt:""}}),t._v(" "),a("span",[t._v("H5推广")])]),t._v(" "),a("div",{staticClass:"propoverItem",on:{click:function(e){return t.fileEvent("miniprogram")}}},[a("img",{attrs:{src:i("mKVt"),alt:""}}),t._v(" "),a("span",[t._v("小程序")])]),t._v(" "),a("div",{staticClass:"propoverItem",on:{click:function(e){return t.fileEvent("link")}}},[a("img",{attrs:{src:i("fWVa"),alt:""}}),t._v(" "),a("span",[t._v("链接")])])]),t._v(" "),t.isShowAddPlaylet?a("div",{staticClass:"pointer ml-20",on:{click:t.onClickMultipleLinkSelect}},[a("i",{staticClass:"el-icon-circle-plus-outline"}),t._v(" "),a("span",[t._v("添加短剧")])]):t._e()],1)]),t._v(" "),t.isShowTips&&"qun"==t.source?a("div",{staticClass:"self-hint",staticStyle:{"margin-top":"10px"}},[a("span",[t._v("注意:\n 每位客户每天可以接收1条群发消息,不限企业发布的群发还是个人发布的群发。")])]):t._e(),t._v(" "),a("div",{staticClass:"phonePreviewBox"},[a("phonePreview",{attrs:{phone_width:t.phone_width,content:t.content,attachments:t.attachments}})],1),t._v(" "),a("el-dialog",{attrs:{title:"添加图片","append-to-body":"",visible:t.imgVisible,width:"500px",center:"","close-on-click-modal":!1},on:{"update:visible":function(e){t.imgVisible=e}}},[a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("图片:")]),t._v(" "),a("el-upload",{staticClass:"avatar-uploader",attrs:{action:t.URL.BASEURL+t.URL.material_upload,name:"material_file","show-file-list":!1,data:t.fileData2,"on-success":t.uploadSuccess,"on-progress":t.beforeUploadUpload,"on-error":t.uploadFail,accept:".jpg,.jpeg,.png"}},[t.image.pic_url?a("img",{staticClass:"fm_img",attrs:{src:t.image.pic_url}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),t._v(" "),a("div",{staticStyle:{"margin-left":"20px"}},[a("el-button",{staticStyle:{height:"30px","margin-bottom":"0px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onClickSelectMaterials("TP")}}},[t._v("选择素材")]),t._v(" "),a("div",{staticClass:"uploadImgHint",staticStyle:{margin:"0"}},[t._v("可直接从素材库选择图片。")])],1)],1),t._v(" "),a("p",{staticClass:"uploadImgHint"},[t._v("*图片仅支持png或jpg格式,且文件大小不得超过10M。")]),t._v(" "),a("div",{staticClass:"buttons"},[a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(e){t.imgVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.imageDefine}},[t._v("确定")])],1)]),t._v(" "),a("el-dialog",{attrs:{title:"添加链接","append-to-body":"",visible:t.linkVisible,width:"500px",center:"","close-on-click-modal":!1},on:{"update:visible":function(e){t.linkVisible=e}}},[a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("链接标题:")]),t._v(" "),a("div",{staticClass:"input"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"input",attrs:{type:"textarea",size:"small",placeholder:"请输入链接标题",clearable:""},model:{value:t.link.title,callback:function(e){t.$set(t.link,"title",e)},expression:"link.title"}}),t._v(" "),a("span",{staticClass:"font_zj"},[t._v(t._s(t.$getStrBytes(t.link.title))+"/128字节")])],1),t._v(" "),t.$getStrBytes(t.link.title)>128?a("div",{staticClass:"warning_hint f12",staticStyle:{"margin-left":"0"}},[a("i",{staticClass:"el-icon-warning-outline"}),t._v(" 链接标题,最多128个字节,已超出!")]):t._e()])]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("链接地址:")]),t._v(" "),a("div",{staticClass:"input"},[a("div",{staticClass:"flex textInput"},[a("el-input",{staticClass:"input",attrs:{type:"textarea",size:"small",placeholder:"请输入链接地址",clearable:"",rows:6},model:{value:t.link.url,callback:function(e){t.$set(t.link,"url",e)},expression:"link.url"}}),t._v(" "),a("i",{directives:[{name:"show",rawName:"v-show",value:t.link.url,expression:"link.url"}],staticClass:"clearButton el-input__icon el-icon-circle-close el-input__clear",on:{click:function(e){e.preventDefault(),t.link.url=""}}}),t._v(" "),a("span",{staticClass:"font_zj"},[t._v(t._s(t.$getStrBytes(t.link.url))+"/512字节")])],1),t._v(" "),t.$getStrBytes(t.link.url)>512?a("div",{staticClass:"warning_hint f12",staticStyle:{"margin-left":"0"}},[a("i",{staticClass:"el-icon-warning-outline"}),t._v(" 链接地址,最多512个字节,已超出!")]):t._e()])]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[t._v("图文封面:")]),t._v(" "),a("el-upload",{staticClass:"avatar-uploader",attrs:{action:t.URL.BASEURL+t.URL.material_upload,name:"material_file","show-file-list":!1,data:t.isKHQF||t.isKHHYY?Object.assign({},t.fileData,{upload_to_oss:0}):t.fileData,"on-success":t.uploadSuccess,"on-progress":t.beforeUploadUpload,"on-error":t.uploadFail,accept:".jpg,.jpeg,.png"}},[t.link.picurl?a("img",{staticClass:"fm_img",attrs:{src:t.link.picurl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),t._v(" "),a("div",{staticStyle:{"margin-left":"20px"}},[a("el-button",{staticStyle:{height:"30px","margin-bottom":"0px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onClickSelectMaterials("LJ")}}},[t._v("选择素材")]),t._v(" "),a("div",{staticClass:"uploadImgHint",staticStyle:{margin:"0"}},[t._v("可直接从素材库选择图片。")])],1)],1),t._v(" "),a("p",{staticClass:"uploadImgHint",staticStyle:{"margin-left":"40px"}},[t._v("*图片仅支持png或jpg格式,且文件大小不得超过10M。")]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[t._v("消息描述:")]),t._v(" "),a("div",{staticClass:"input"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"input",attrs:{type:"textarea",size:"small",placeholder:"请输入消息描述",clearable:""},model:{value:t.link.desc,callback:function(e){t.$set(t.link,"desc",e)},expression:"link.desc"}}),t._v(" "),a("span",{staticClass:"font_zj"},[t._v(t._s(t.$getStrBytes(t.link.desc))+"/512字节")])],1),t._v(" "),t.$getStrBytes(t.link.desc)>512?a("div",{staticClass:"warning_hint f12",staticStyle:{"margin-left":"0"}},[a("i",{staticClass:"el-icon-warning-outline"}),t._v(" 消息描述,最多512个字节,已超出!")]):t._e()])]),t._v(" "),a("div",{staticClass:"buttons"},[a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(e){t.linkVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.linkDefine}},[t._v("确定")])],1)]),t._v(" "),a("el-dialog",{attrs:{title:"添加小程序","append-to-body":"",visible:t.miniprogramVisible,width:"650px",center:"","close-on-click-modal":!1},on:{"update:visible":function(e){t.miniprogramVisible=e}}},[a("div",{staticStyle:{padding:"0 15px"}},[a("div",{staticClass:"self-hint",staticStyle:{"margin-bottom":"20px",border:"none"}},[a("i",{staticClass:"el-icon-message-solid"}),t._v(" "),a("span",[t._v("请填写企业微信后台绑定的小程序id和路径,否则会造成发送失败")])]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("小程序标题:")]),t._v(" "),a("div",{staticClass:"input"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"input",attrs:{type:"textarea",size:"small",placeholder:"请输入小程序标题",clearable:""},model:{value:t.miniprogram.title,callback:function(e){t.$set(t.miniprogram,"title",e)},expression:"miniprogram.title"}}),t._v(" "),a("span",{staticClass:"font_zj"},[t._v(t._s(t.$getStrBytes(t.miniprogram.title))+"/64字节")])],1),t._v(" "),t.$getStrBytes(t.miniprogram.title)>64?a("div",{staticClass:"warning_hint f12",staticStyle:{"margin-left":"0"}},[a("i",{staticClass:"el-icon-warning-outline"}),t._v(" 小程序标题,最多64个字节,已超出!")]):t._e()])]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("小程序:")]),t._v(" "),a("div",{staticStyle:{flex:"1"}},[a("div",{staticClass:"select-w"},[a("el-select",{attrs:{size:"small",placeholder:"请选择小程序",clearable:"",filterable:""},model:{value:t.miniprogram.appid,callback:function(e){t.$set(t.miniprogram,"appid",e)},expression:"miniprogram.appid"}},t._l(t.miniProOptions,function(t){return a("el-option",{key:t.app_id,attrs:{label:t.app_name+" - "+t.platform_name,value:t.app_id}})}),1),t._v(" "),a("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.onClickToSCX}},[t._v("新增")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.onClickSCXRefresh}},[t._v("刷新")])],1),t._v(" "),a("p",{staticClass:"otherHint",staticStyle:{color:"#f9a527"}},[t._v("*小程序appID"),a("a",{attrs:{href:"https://docs.qq.com/doc/p/cb25fa9e1aba98ce5f8b942f2900f0247b9e5dc6?dver=2.1.27292865",target:"_blank"}},[t._v("(如何获取小程序appID)")]),t._v(",必须是关联到企业的小程序应用。")])])]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("小程序路径:")]),t._v(" "),a("div",{staticStyle:{flex:"1"}},[a("el-input",{staticClass:"input",attrs:{size:"small",placeholder:"请输入小程序路径",clearable:""},model:{value:t.miniprogram.page,callback:function(e){t.$set(t.miniprogram,"page",e)},expression:"miniprogram.page"}}),t._v(" "),a("p",{staticClass:"otherHint"},[a("a",{attrs:{href:"https://docs.qq.com/doc/p/16fa15eeb1fc21849904a0a82ebda04732e3bc16?dver=2.1.27292865",target:"_blank"}},[t._v("如何获取小程序路径?")])])],1)]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("小程序封面:")]),t._v(" "),a("el-upload",{staticClass:"avatar-uploader",attrs:{action:t.URL.BASEURL+t.URL.material_upload,name:"material_file","show-file-list":!1,data:t.fileData2,"on-success":t.uploadSuccess,"on-progress":t.beforeUploadUpload,"on-error":t.uploadFail,accept:".jpg,.jpeg,.png"}},[t.miniprogram.pic_url?a("img",{staticClass:"fm_img",staticStyle:{height:"80px"},attrs:{src:t.miniprogram.pic_url}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),t._v(" "),a("div",{staticStyle:{"margin-left":"40px"}},[a("div",{staticStyle:{"margin-bottom":"6px"}},[a("el-button",{staticStyle:{height:"30px","margin-bottom":"0px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onClickSelectMaterials("XCX")}}},[t._v("选择素材")]),t._v(" "),a("span",{staticClass:"uploadImgHint",staticStyle:{margin:"0"}},[t._v("可直接从素材库选择图片。")])],1),t._v(" "),a("div",{staticStyle:{"margin-bottom":"6px"}},[a("el-button",{staticStyle:{height:"30px","margin-bottom":"0px"},attrs:{type:"danger",size:"mini"},on:{click:t.openImgCutter}},[t._v("图片裁剪")]),t._v(" "),a("span",{staticClass:"uploadImgHint",staticStyle:{margin:"0"}},[t._v("可根据需要对图片进行裁剪。")])],1),t._v(" "),a("div",[a("el-button",{staticClass:"addBtn",staticStyle:{height:"30px","margin-bottom":"0px"},attrs:{type:"danger",size:"mini"},on:{click:t.onClickAddPlaybtn}},[t._v("添加按钮")]),t._v(" "),a("span",{staticClass:"uploadImgHint",staticStyle:{margin:"0"}},[t._v('在封面中心添加"播放按钮"素材。')])],1)])],1),t._v(" "),a("p",{staticClass:"uploadImgHint",staticStyle:{"margin-left":"20px"}},[t._v("*仅支持PNG及JPG,封面显示图片宽高比为5:4,且文件大小不得超过10M。")]),t._v(" "),a("div",{staticClass:"buttons"},[a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(e){t.miniprogramVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.miniprogramDefine}},[t._v("确定")])],1)])]),t._v(" "),a("radarEntrance",{ref:"radarEntranceRef",attrs:{ids_comeBack:t.radarIds,has_attachLen:t.has_attachLen},on:{getRadarAttach:function(e){t.radarDefine(e)}}}),t._v(" "),a("el-dialog",{attrs:{title:"添加H5推广","append-to-body":"",visible:t.linkExtendVisible,width:"500px",center:"","close-on-click-modal":!1},on:{"update:visible":function(e){t.linkExtendVisible=e}}},[a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("链接标题:")]),t._v(" "),a("div",{staticClass:"input"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"input",attrs:{type:"textarea",size:"small",placeholder:"请输入链接标题",clearable:""},model:{value:t.linkExtend.title,callback:function(e){t.$set(t.linkExtend,"title",e)},expression:"linkExtend.title"}}),t._v(" "),a("span",{staticClass:"font_zj"},[t._v(t._s(t.$getStrBytes(t.linkExtend.title))+"/128字节")])],1),t._v(" "),t.$getStrBytes(t.linkExtend.title)>128?a("div",{staticClass:"warning_hint f12",staticStyle:{"margin-left":"0"}},[a("i",{staticClass:"el-icon-warning-outline"}),t._v(" 链接标题,最多128个字节,已超出!")]):t._e()])]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[a("em",[t._v("*")]),t._v("链接地址:")]),t._v(" "),a("div",{staticClass:"input"},[a("div",{staticClass:"flex textInput"},[a("el-input",{staticClass:"input",attrs:{type:"textarea",size:"small",placeholder:"请输入链接地址",clearable:"",rows:6},model:{value:t.linkExtend.jump_url,callback:function(e){t.$set(t.linkExtend,"jump_url",e)},expression:"linkExtend.jump_url"}}),t._v(" "),a("i",{directives:[{name:"show",rawName:"v-show",value:t.linkExtend.jump_url,expression:"linkExtend.jump_url"}],staticClass:"clearButton el-input__icon el-icon-circle-close el-input__clear",on:{click:function(e){e.preventDefault(),t.linkExtend.jump_url=""}}}),t._v(" "),a("span",{staticClass:"font_zj"},[t._v(t._s(t.$getStrBytes(t.linkExtend.jump_url))+"/512字节")])],1),t._v(" "),t.$getStrBytes(t.linkExtend.jump_url)>512?a("div",{staticClass:"warning_hint f12",staticStyle:{"margin-left":"0"}},[a("i",{staticClass:"el-icon-warning-outline"}),t._v(" 链接地址,最多512个字节,已超出!")]):t._e()])]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[t._v("图文封面:")]),t._v(" "),a("el-upload",{staticClass:"avatar-uploader",attrs:{action:t.URL.BASEURL+t.URL.material_upload,name:"material_file","show-file-list":!1,data:t.isKHQF||t.isKHHYY?Object.assign({},t.fileData,{upload_to_oss:0}):t.fileData,"on-success":t.uploadSuccess,"on-progress":t.beforeUploadUpload,"on-error":t.uploadFail,accept:".jpg,.jpeg,.png"}},[t.linkExtend.picurl?a("img",{staticClass:"fm_img",attrs:{src:t.linkExtend.picurl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),t._v(" "),a("div",{staticStyle:{"margin-left":"20px"}},[a("el-button",{staticStyle:{height:"30px","margin-bottom":"0px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onClickSelectMaterials("H5TGLJ")}}},[t._v("选择素材")]),t._v(" "),a("div",{staticClass:"uploadImgHint",staticStyle:{margin:"0"}},[t._v("可直接从素材库选择图片。")])],1)],1),t._v(" "),a("p",{staticClass:"uploadImgHint",staticStyle:{"margin-left":"40px"}},[t._v("*图片仅支持png或jpg格式,且文件大小不得超过10M。")]),t._v(" "),a("div",{staticClass:"lineItem"},[a("label",[t._v("消息描述:")]),t._v(" "),a("div",{staticClass:"input"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"input",attrs:{type:"textarea",size:"small",placeholder:"请输入消息描述",clearable:""},model:{value:t.linkExtend.desc,callback:function(e){t.$set(t.linkExtend,"desc",e)},expression:"linkExtend.desc"}}),t._v(" "),a("span",{staticClass:"font_zj"},[t._v(t._s(t.$getStrBytes(t.linkExtend.desc))+"/512字节")])],1),t._v(" "),t.$getStrBytes(t.linkExtend.desc)>512?a("div",{staticClass:"warning_hint f12",staticStyle:{"margin-left":"0"}},[a("i",{staticClass:"el-icon-warning-outline"}),t._v(" 消息描述,最多512个字节,已超出!")]):t._e()])]),t._v(" "),a("div",{staticClass:"buttons"},[a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(e){t.linkExtendVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.linkExtendDefine}},[t._v("确定")])],1)]),t._v(" "),a("multipleLinkEdit",{attrs:{dialogVisible:t.multipleLinkEditVisible,isKHHYY:t.isKHHYY,isKHQF:t.isKHQF},on:{confirm:t.onConfirmMultipleLink,cancel:t.onCancelMultipleLink}}),t._v(" "),a("el-dialog",{attrs:{width:"840px",title:"图片裁剪",visible:t.imgCutterVisible,"append-to-body":""},on:{"update:visible":function(e){t.imgCutterVisible=e}}},[t.imgCutterVisible?a("imgCutter",{attrs:{target:t.oss_url},on:{imgCutterCallback:t.imgCutterCallback}}):t._e()],1),t._v(" "),a("el-dialog",{attrs:{width:"500px",title:"添加播放按钮",visible:t.addPlaybtnVisible,"append-to-body":""},on:{"update:visible":function(e){t.addPlaybtnVisible=e}}},[t.addPlaybtnVisible?a("addPlaybtn",{attrs:{fileUrl:t.oss_url},on:{cancel:t.onCancelAddPlaybtn,confirm:t.onConfirmAddPlaybtn}}):t._e()],1),t._v(" "),a("multipleLinkSelect",{attrs:{dialogVisible:t.multipleLinkSelectVisible},on:{confirm:t.onConfirmMultipleLinkDialog,cancel:t.onCancelMultipleLinkDialog}}),t._v(" "),a("selectMaterials",{attrs:{selectVisible:t.selectMaterialsVisible},on:{cancel:function(e){t.selectMaterialsVisible=!1},selectObj:t.selectMaterialsConfirm}})],1)},staticRenderFns:[]};var V=i("VU/8")(I,E,!1,function(t){i("x9nA")},"data-v-32783961",null).exports,j={props:{template_id:{type:String|Number,default:function(){return""}}},components:{selfCustomerservice:u.a,editConWelGroup:V},data:function(){return{isCopy:-1!=this.$route.path.indexOf("welcom_message_copy"),loading:!1,editFlag:!0,is_day_parting:!1,name:"",deleteTimeIntervalList:[],timeIntervalList:[],init_welcom_con:{is_day_parting:1,weeks:[1,2,3,4,5,6,0],start_time:"",end_time:"",content:"",attachments:[]},content:"",attachments:[],dataInfo:{},key_we_index:1}},created:function(){this.template_id?this.detail():this.loading=!1},mounted:function(){},methods:{detail:function(){var t=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.welcomeGroup_detail,{params:{template_id:this.template_id}}).then(function(e){e=e.data;t.loading=!1,e&&0==e.errno?(t.dataInfo=e.rst,t.name=e.rst.name,String.prototype.replaceAll?t.content=e.rst.content?e.rst.content.replaceAll("%NICKNAME%","「客户昵称」"):"":t.content=e.rst.content?e.rst.content.replace(/\%NICKNAME\%/g,"「客户昵称」"):"",e.rst.attachments.image?t.attachments=[{image:{media_id:e.rst.attachments.image.media_id,pic_url:e.rst.attachments.image.media_url},msgtype:"image"}]:e.rst.attachments.promote?t.attachments=[{promote:{title:e.rst.attachments.promote.title,jump_url:e.rst.attachments.promote.url,picurl:e.rst.attachments.promote.picurl,desc:e.rst.attachments.promote.desc},msgtype:"promote"}]:e.rst.attachments.link?t.attachments=[{link:{title:e.rst.attachments.link.title,url:e.rst.attachments.link.url,picurl:e.rst.attachments.link.picurl,desc:e.rst.attachments.link.desc},msgtype:"link"}]:e.rst.attachments.miniprogram&&(t.attachments=[{miniprogram:{title:e.rst.attachments.miniprogram.title,appid:e.rst.attachments.miniprogram.appid,page:e.rst.attachments.miniprogram.page,pic_media_id:e.rst.attachments.miniprogram.pic_media_id,pic_url:e.rst.attachments.miniprogram.pic_media_url},msgtype:"miniprogram"}])):4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})},getAttachment:function(t){this.attachments=t},getWelcomEdit:function(t,e){this.$set(this.timeIntervalList,e,t)},deleteWelcomCon:function(t){if(this.$route.params.rule_id&&this.timeIntervalList[t].msg_id){var e=JSON.parse(h()(this.timeIntervalList[t]));e.operate="del",this.deleteTimeIntervalList.push(e)}this.timeIntervalList.splice(t,1),this.key_we_index++},addWelcom:function(){this.timeIntervalList.push(this.init_welcom_con),this.key_we_index++},switchChange:function(){this.is_day_parting&&0==this.timeIntervalList.length&&this.timeIntervalList.push(this.init_welcom_con)},welcomeMsg_set:function(){var t=this;if(""!=this.name)if(""!=this.content)if(""!=this.content&&this.$getStrBytes(this.content)>3e3)this.$message({message:"请检查欢迎语内容,最多3000个字节,已超出!",type:"error"});else if(this.attachments&&this.attachments.length){String.prototype.replaceAll?this.content=this.content.replaceAll("「客户昵称」","%NICKNAME%"):this.content=this.content.replace(/「客户昵称」/g,"%NICKNAME%");var e={template_id:this.template_id?this.template_id:"",name:this.name,content:this.content};"image"===this.attachments[0].msgtype?e.attachments={image:{media_id:this.attachments[0].image.media_id}}:"link"===this.attachments[0].msgtype?e.attachments={link:{title:this.attachments[0].link.title,picurl:this.attachments[0].link.picurl,desc:this.attachments[0].link.desc,url:this.attachments[0].link.url}}:"promote"===this.attachments[0].msgtype?e.attachments={promote:{title:this.attachments[0].promote.title,picurl:this.attachments[0].promote.picurl,desc:this.attachments[0].promote.desc,url:this.attachments[0].promote.jump_url}}:"miniprogram"===this.attachments[0].msgtype&&(e.attachments={miniprogram:{title:this.attachments[0].miniprogram.title,pic_media_id:this.attachments[0].miniprogram.pic_media_id,appid:this.attachments[0].miniprogram.appid,page:this.attachments[0].miniprogram.page}}),e.attachments=h()(e.attachments),this.$loading(this.$loadingConfig),this.$axios.post(this.URL.BASEURL+this.URL.welcomeGroup_set,e).then(function(e){e=e.data;t.$loading(t.$loadingConfig).close(),e&&0==e.errno?t.$emit("close",{isEdit:!!t.template_id}):4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.$loading(t.$loadingConfig).close()})}else this.$message({message:"请添加欢迎语附件",type:"error"});else this.$message({message:"请输入欢迎语内容!",type:"warning"});else this.$message({message:"请输入欢迎语标题!",type:"warning"})},handleGoBack:function(){this.$router.replace({path:"/welcomeMsg"})}}},A={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"createMassMsg"},[t.loading?t._e():i("div",{staticClass:"bg-ffffff",staticStyle:{padding:"25px"}},[i("h3",{staticClass:"bigTitle"},[t._v("入群欢迎语素材")]),t._v(" "),i("div",{staticClass:"regulations"},[t._m(0),t._v(" "),i("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"例:活动推送/拉新等",clearable:"",size:"small"},model:{value:t.name,callback:function(e){t.name="string"==typeof e?e.trim():e},expression:"name"}})],1),t._v(" "),i("div",{staticClass:"regulations"},[t._m(1),t._v(" "),i("editConWelGroup",{ref:"editConWelGroup",attrs:{source:"welcom",afferent_content:t.content,afferent_attachments:t.attachments,isKHHYY:!0},on:{editContent:function(e){t.content=e},changeAttachment:t.getAttachment}})],1),t._v(" "),i("button",{staticClass:"button",on:{click:t.welcomeMsg_set}},[t._v("保存")])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("label",[e("em",[this._v("*")]),this._v("欢迎语标题")])},function(){var t=this.$createElement,e=this._self._c||t;return e("label",{staticStyle:{"margin-top":"4px"}},[e("em",[this._v("*")]),this._v("欢迎语")])}]};var D=i("VU/8")(j,A,!1,function(t){i("BTzJ")},"data-v-61414aaa",null).exports,z={name:"welcomeGroup",components:{selfInputV2:r.a,selfChannelV2:o.a,videoDialog:p,detail:D},data:function(){return{height:"",loading:!1,pagination:{page:1,page_size:20,pages:0,total:0},filter:{keyword:"",creator_id:""},list:[],videoDialogVisible:!1,currentVideoLink:"",detailVisible:!1,crtTemplateId:""}},created:function(){this.height=document.documentElement.clientHeight-200,this.handleGetList()},methods:{handleGetList:function(){var t=this;return l()(s.a.mark(function e(){var i,a,n,l,r;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,i=""+t.URL.BASEURL+t.URL.welcomeGroup_list,a={keyword:t.filter.keyword,creator_id:t.filter.creator_id,page:t.pagination.page,page_size:t.pagination.page_size},e.next=6,t.$axios.get(i,{params:a});case 6:n=e.sent,l=n.data,(r=void 0===l?{}:l)&&0==r.errno&&Array.isArray(r.rst.data)?(t.list=r.rst.data,t.pagination.total=r.rst.pageInfo.total,t.pagination.pages=r.rst.pageInfo.pages):4002!=r.errno&&(t.$message.warning(r.err),t.list=[],t.pagination.total=0,t.pagination.pages=0),e.next=18;break;case 12:e.prev=12,e.t0=e.catch(0),console.log(e.t0),t.list=[],t.pagination.total=0,t.pagination.pages=0;case 18:return e.prev=18,t.loading=!1,e.finish(18);case 21:case"end":return e.stop()}},e,t,[[0,12,18,21]])}))()},onChangeKeyword:function(t){this.filter.keyword=t,this.pagination.page=1,this.handleGetList()},onChangeCreatorId:function(t){this.filter.creator_id=t||"",this.pagination.page=1,this.handleGetList()},handleCurrentChange:function(t){this.pagination.page=t,this.handleGetList()},onClickCreateBtn:function(){this.crtTemplateId="",this.detailVisible=!0},onClickEditBtn:function(t){this.crtTemplateId=t.template_id,this.detailVisible=!0},detailClose:function(t){var e=t.isEdit;this.crtTemplateId="",this.detailVisible=!1,e||(this.pagination.page=1),this.handleGetList()},onClickDelBtn:function(t){var e=this,i=t.name,a=t.template_id;return l()(s.a.mark(function t(){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$confirm("确定删除【"+i+"】?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:e.handleDelRule(a),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log("error => ",t.t0);case 9:case"end":return t.stop()}},t,e,[[0,6]])}))()},handleDelRule:function(t){var e=this;return l()(s.a.mark(function i(){var a,n,l,r,o;return s.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,a=""+e.URL.BASEURL+e.URL.welcomeGroup_del,n={template_id:t},i.next=5,e.$axios.post(a,n);case 5:l=i.sent,r=l.data,(o=void 0===r?{}:r)&&0==o.errno?(e.$message.success("操作成功"),e.handleGetList()):4002!=o.errno&&e.$message.warning(o.err),i.next=14;break;case 11:i.prev=11,i.t0=i.catch(0),console.log("error => ",i.t0);case 14:case"end":return i.stop()}},i,e,[[0,11]])}))()},onClickShowVideo:function(t){if(!t)return!1;this.currentVideoLink=t,this.videoDialogVisible=!0},onCloseVideo:function(){this.currentVideoLink="",this.videoDialogVisible=!1},onClickShowfile:function(t){window.open(t,"_blank")}}},B={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"welcomeGroup-wrap"},[t._m(0),t._v(" "),a("div",{staticClass:"screenBox",staticStyle:{"margin-top":"10px"}},[a("div",{staticClass:"filter-wrap"},[a("selfInputV2",{staticStyle:{width:"auto"},attrs:{label_name:"标题",placeholder:"请输入标题",labelWidth:!0},on:{change:t.onChangeKeyword},model:{value:t.filter.keyword,callback:function(e){t.$set(t.filter,"keyword",e)},expression:"filter.keyword"}}),t._v(" "),a("selfChannelV2",{attrs:{title:"创建人",type:"circleCreate",placeholder:"请选择创建人",labelWidth:!0},on:{change:t.onChangeCreatorId},model:{value:t.filter.creator_id,callback:function(e){t.$set(t.filter,"creator_id",e)},expression:"filter.creator_id"}})],1),t._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.onClickCreateBtn}},[t._v("新建入群欢迎语")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%","margin-top":"10px"},attrs:{height:t.height,data:t.list,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"标题",prop:"name","min-width":"100",align:"center",fixed:"left","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"文本内容",prop:"content",align:"center","min-width":"150","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"附件内容",align:"left","min-width":"180"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[s.attachments?[s.attachments.image?[a("el-image",{staticStyle:{width:"40px",height:"40px"},attrs:{src:s.attachments.image.media_url,"preview-src-list":[s.attachments.image.media_url]}})]:s.attachments.video?[a("div",{staticClass:"flex-align-center"},[a("img",{staticStyle:{width:"50px",height:"40px","margin-left":"-4px"},attrs:{src:i("qWwJ")}}),t._v(" "),s.attachments.video.media_url?a("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.onClickShowVideo(s.attachments.video.media_url)}}},[t._v("查看视频")]):t._e()],1)]:s.attachments.file?[a("div",{staticClass:"flex-align-center"},[a("img",{staticStyle:{width:"50px",height:"40px","margin-left":"-4px"},attrs:{src:i("qWwJ")}}),t._v(" "),s.attachments.file.media_url?a("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.onClickShowfile(s.attachments.file.media_url)}}},[t._v("下载文件")]):t._e()],1)]:s.attachments.link?[a("div",{staticClass:"flex-align-center"},[a("el-image",{staticStyle:{width:"40px",height:"40px","margin-right":"10px","flex-shrink":"0"},attrs:{src:s.attachments.link.picurl,"preview-src-list":[s.attachments.link.picurl]}}),t._v(" "),a("span",{staticStyle:{"line-height":"16px",cursor:"pointer"}},[a("a",{staticClass:"c-676C97",attrs:{href:s.attachments.link.url,target:"_blank"}},[a("el-tooltip",{staticClass:"disinblock",attrs:{content:s.attachments.link.desc,disabled:s.attachments.link.desc&&s.attachments.link.desc.length<34,placement:"top"}},[a("span",{staticClass:"clampTwo"},[t._v(t._s(s.attachments.link.desc?s.attachments.link.desc:"-"))])])],1)])],1)]:s.attachments.promote?[a("div",{staticClass:"flex-align-center"},[a("el-image",{staticStyle:{width:"40px",height:"40px","margin-right":"10px","flex-shrink":"0"},attrs:{src:s.attachments.promote.picurl,"preview-src-list":[s.attachments.promote.picurl]}}),t._v(" "),a("span",{staticStyle:{"line-height":"16px",cursor:"pointer"}},[a("a",{staticClass:"c-676C97",attrs:{href:s.attachments.promote.url,target:"_blank"}},[a("el-tooltip",{staticClass:"disinblock",attrs:{content:s.attachments.promote.desc,disabled:s.attachments.promote.desc&&s.attachments.promote.desc.length<34,placement:"top"}},[a("span",{staticClass:"clampTwo"},[t._v(t._s(s.attachments.promote.desc?s.attachments.promote.desc:"-"))])])],1)])],1)]:s.attachments.miniprogram?[a("div",{staticClass:"flex-align-center"},[a("el-image",{staticStyle:{width:"40px",height:"40px","margin-right":"10px","flex-shrink":"0"},attrs:{src:s.attachments.miniprogram.pic_media_url,"preview-src-list":[s.attachments.miniprogram.pic_media_url]}}),t._v(" "),a("span",{staticStyle:{"line-height":"16px",cursor:"pointer"}},[a("span",{staticClass:"c-676C97",attrs:{target:"_blank"}},[a("el-tooltip",{staticClass:"disinblock",attrs:{content:s.attachments.miniprogram.title,disabled:s.attachments.miniprogram.title&&s.attachments.miniprogram.title.length<34,placement:"top"}},[a("span",{staticClass:"clampTwo"},[t._v(t._s(s.attachments.miniprogram.title?s.attachments.miniprogram.title:"-"))])])],1)])],1)]:t._e()]:t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建人",align:"center","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("div",{staticClass:"customerServiceTagBox"},[a("div",{staticClass:"customerServiceTag"},[a("i",{staticClass:"el-icon-user-solid"}),t._v(" "+t._s(i.creator)+"\n ")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"更新时间",prop:"update_time","min-width":"160","show-overflow-tooltip":"",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"160",align:"center",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",{staticClass:"btn c-00b38a",on:{click:function(e){return t.onClickEditBtn(i)}}},[t._v("编辑")]),t._v(" "),a("span",{staticClass:"btn c-FF604D",on:{click:function(e){return t.onClickDelBtn(i)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.pagination.total>0,expression:"pagination.total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.pagination.page,layout:"prev, pager, next","page-count":Number(t.pagination.pages)},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),a("videoDialog",{attrs:{dialogVisible:t.videoDialogVisible,link:t.currentVideoLink},on:{close:t.onCloseVideo}}),t._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:t.detailVisible,"with-header":!1},on:{"update:visible":function(e){t.detailVisible=e}}},[t.detailVisible?a("detail",{ref:"detail",attrs:{template_id:t.crtTemplateId},on:{close:t.detailClose}}):t._e()],1)],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"self-hint"},[e("i",{staticClass:"el-icon-message-solid"}),this._v(" "),e("div",[e("p",[this._v("每个企业的入群欢迎语素材库中,最多容纳100个素材")])])])}]};var U=i("VU/8")(z,B,!1,function(t){i("2K0H")},"data-v-4bcab943",null);e.default=U.exports},qWwJ:function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjkxMDQ4MDAwMTA1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjY0OTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIj48cGF0aCBkPSJNODkwLjUgMjUwLjVsLTIxMy0yMTNDNjUzLjUgMTMuNSA2MjAuOSAwIDU4NyAwSDE2MGMtMzUuMyAwLTY0IDI4LjYtNjQgNjR2ODk2YzAgMzUuMyAyOC43IDY0IDY0IDY0aDcwNGMzNS4zIDAgNjQtMjguNyA2NC02NFYzNDFjMC0zMy45LTEzLjUtNjYuNS0zNy41LTkwLjV6TTY0MCA5MC41TDgzNy41IDI4OEg3MDRjLTM1LjMgMC02NC0yOC43LTY0LTY0VjkwLjV6TTM1MyA1MDIuOWMwLTI0LjUgMjYuNS0zOS45IDQ3LjgtMjcuOGwyNzAuMSAxNTMuMWMyMS42IDEyLjMgMjEuNiA0My40IDAgNTUuN2wtMjcwLjEgMTUzYy0yMS4zIDEyLjEtNDcuOC0zLjMtNDcuOC0yNy44VjUwMi45eiIgcC1pZD0iNjQ5MSIgZmlsbD0iIzAwYjM4YSI+PC9wYXRoPjxwYXRoIGQ9Ik01NjUuNiA2NjkuOWwtMTI0LjggNzAuN2MtMTAuNyA2LTIzLjktMS43LTIzLjktMTMuOVY1ODUuM2MwLTEyLjMgMTMuMi0yMCAyMy45LTEzLjlsMTI0LjggNzAuN2MxMC45IDYuMSAxMC45IDIxLjcgMCAyNy44eiIgcC1pZD0iNjQ5MiIgZmlsbD0iIzAwYjM4YSI+PC9wYXRoPjwvc3ZnPg=="},x9nA:function(t,e){}});