企微助手 ,仓库名 短剧

6.fa054ee5dc91f804dcf5.js 117KB

1
  1. webpackJsonp([6],{"2Bfn":function(t,e){},"3Ybk":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("Gu7T"),i=a.n(s),n=a("Xxa5"),r=a.n(n),l=a("exGp"),o=a.n(l),c=a("pdUL"),_=a("lFm0"),d=a("gzej"),u=a("FsX6"),p=a("mGJs"),m=a("cthc"),h=a("W3kD"),g=a("c7xQ"),v=a("v/uv"),f=a("XdcG"),y={components:{selfInputV2:c.a,selfSelectCorp:_.a,datePicker:d.a,selfChannelV2:u.a,detailRuleKHQQF:p.a,detailKHQQF:m.a,detailRuleKHQF:h.a,detailKHQF:g.a,detailRuleZNQF:v.a,detailRuleKHPYQ:f.a},data:function(){var t=[this.$getDay(-30,!1),this.$getDay(0,!1)];return{reset:!1,default_time:t,pageLoading:!1,height:"",detailLoading:!1,detailsTableCol:[{column:"create_time",name:"时间",min_width:140,fixed:"left"},{column:"corp_name",name:"企微主体",min_width:200,fixed:""},{column:"user_name",name:"成员",min_width:140,fixed:""},{column:"msg_type_text",name:"消息类型",min_width:140,fixed:""},{column:"notice",name:"消息内容",min_width:400,fixed:""},{column:"handler",name:"操作",min_width:90,fixed:"right"}],pagination:{page:1,page_size:20,pages:0,total:0},filter:{sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",time:t,corpid:"",user_name:"",msg_type:1},msgExport:{loading:!1,visible:!1,time:[],pickerOptions:{disabledDate:function(t){return t>Date.now()}}},currentCorpid:"",currentRuleId:"",currentGroupId:"",isShowRuleKHQQF:!1,isShowDetailKHQQF:!1,isShowRuleKHQF:!1,isShowDetailKHQF:!1,isShowDetailZNQF:!1,isShowRuleKHPYQ:!1}},created:function(){this.initTableHeight(),this.handleGetData()},methods:{handleGetData:function(){this.handleGetList()},handleGetList:function(){var t=this;return o()(r.a.mark(function e(){var a,s,i,n,l,o;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.detailLoading=!0,a={sys_group_id:t.filter.sys_group_id,start_date:t.filter.time[0],end_date:t.filter.time[1],corp_id:t.filter.corpid,user_name:t.filter.user_name,msg_type:t.filter.msg_type,page:t.pagination.page,page_size:t.pagination.page_size},s=""+t.URL.BASEURL+t.URL.system_sendNoticeListNew,e.next=6,t.$axios.get(s,{params:a});case 6:i=e.sent,n=i.data,(l=void 0===n?{}:n)&&0==l.errno?(o=Array.isArray(l.rst.data)?l.rst.data:[],t.$refs.detailsTable.reloadData(o),t.pagination.total=l.rst.pageInfo.total,t.pagination.pages=l.rst.pageInfo.pages):4002!=l.errno&&(t.$message.warning(l.err),t.$refs.detailsTable.reloadData([]),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.$refs.detailsTable.reloadData([]),t.pagination.total=0,t.pagination.pages=0;case 18:return e.prev=18,t.detailLoading=!1,e.finish(18);case 21:case"end":return e.stop()}},e,t,[[0,12,18,21]])}))()},handleCurrentChange:function(t){this.pagination.page=t,this.handleGetData()},onChangeTime:function(t){this.filter.time=Array.isArray(t)?t:[],this.pagination.page=1,this.handleGetData()},onChangeCorpid:function(t){this.pagination.page=1,this.handleGetData()},onChangeUserName:function(t){this.filter.user_name=t,this.pagination.page=1,this.handleGetData()},onChangeMsgType:function(t){this.filter.msg_type=t,this.pagination.page=1,this.handleGetData()},onClickExport:function(){var t=this;return o()(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.msgExport.visible=!0;case 1:case"end":return e.stop()}},e,t)}))()},handleExport:function(t){var e=this.detailsTableCol.filter(function(t){return"handler"!==t.column}),a=[{tHeader:[].concat(i()(e.map(function(t){return""+t.name}))),filterVal:[].concat(i()(e.map(function(t){return""+t.column}))),tableDatas:[].concat(i()(t)),sheetName:""}];this.$exportOrder({excelDatas:a,name:"系统消息(导出时间:"+this.$getDay(0)+")"})},handleGetDays:function(){var t=this.$moment(this.msgExport.time[0]);return this.$moment(this.msgExport.time[1]).diff(t,"days")},handleConfirmExport:function(){var t=this;return o()(r.a.mark(function e(){var a,s,i,n,l;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.msgExport.time&&t.msgExport.time.length){e.next=2;break}return e.abrupt("return",t.$message.warning("请选择导出日期"));case 2:if(!(t.handleGetDays()>1)){e.next=5;break}return e.abrupt("return",t.$message.warning("日期范围最多可选2天"));case 5:return t.msgExport.loading=!0,e.prev=6,a={sys_group_id:t.filter.sys_group_id,start_date:t.msgExport.time[0],end_date:t.msgExport.time[1],corp_id:t.filter.corpid,user_name:t.filter.user_name,msg_type:t.filter.msg_type,page:1,page_size:-1},s=""+t.URL.BASEURL+t.URL.system_sendNoticeListNew,e.next=11,t.$axios.get(s,{params:a});case 11:i=e.sent,n=i.data,(l=void 0===n?{}:n)&&0==l.errno?(t.handleExport(l.rst.data),t.msgExport.visible=!1,t.msgExport.time=[]):4002!=l.errno&&t.$message.warning(l.err),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),console.log("error => ",e.t0);case 20:return e.prev=20,t.msgExport.loading=!1,e.finish(20);case 23:case"end":return e.stop()}},e,t,[[6,17,20,23]])}))()},handleCancelExport:function(){this.msgExport.time=[],this.msgExport.visible=!1},onClickReset:function(){this.reset=!this.reset,this.filter.time=this.default_time,this.filter.corpid="",this.filter.user_name="",this.filter.msg_type=1,this.pagination.page=1,this.handleGetData()},getHeaderCellStyle:function(){return{backgroundColor:"#FFFFFF !important",border:"none!important"}},initTableHeight:function(){this.height=document.documentElement.clientHeight-240>400?document.documentElement.clientHeight-240:400},onClickDetail:function(t){var e=t.send_status,a=t.msg_type,s=t.rule_id,i=t.corpid,n=t.group_id;this.currentRuleId=s,this.currentCorpid=i,this.currentGroupId=n,1==a&&this.handleShowKHQF(e),2==a&&this.handleShowKHQQF(e),3==a&&this.handleShowZNQF(e),4==a&&this.handleShowKHPYQ(e)},handleShowKHQF:function(t){this.isShowRuleKHQF=!0},handleShowKHQQF:function(t){this.isShowRuleKHQQF=!0},handleShowZNQF:function(t){this.isShowDetailZNQF=!0},handleShowKHPYQ:function(t){this.isShowRuleKHPYQ=!0},detailClose:function(){this.currentCorpid="",this.currentRuleId="",this.currentGroupId="",this.isShowRuleKHQQF=!1,this.isShowDetailKHQQF=!1,this.isShowRuleKHQF=!1,this.isShowDetailKHQF=!1,this.isShowDetailZNQF=!1,this.isShowRuleKHPYQ=!1}}},C={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.pageLoading,expression:"pageLoading"}],staticClass:"customerStaff-wrap"},[a("div",{staticClass:"screenBox",staticStyle:{"padding-right":"100px","min-height":"85px"}},[a("datePicker",{attrs:{reset:t.reset,title:"自定义",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1},on:{changeTime:t.onChangeTime}}),t._v(" "),a("selfSelectCorp",{staticStyle:{"margin-right":"30px"},on:{change:t.onChangeCorpid},model:{value:t.filter.corpid,callback:function(e){t.$set(t.filter,"corpid",e)},expression:"filter.corpid"}}),t._v(" "),a("selfInputV2",{staticStyle:{"margin-left":"-20px"},attrs:{labelWidth:!0,label_name:"成员",placeholder:"请输入"},on:{change:t.onChangeUserName},model:{value:t.filter.user_name,callback:function(e){t.$set(t.filter,"user_name",e)},expression:"filter.user_name"}}),t._v(" "),a("selfChannelV2",{attrs:{title:"消息类型",type:"msgType",labelWidth:"",clearable:!1},on:{change:t.onChangeMsgType},model:{value:t.filter.msg_type,callback:function(e){t.$set(t.filter,"msg_type",e)},expression:"filter.msg_type"}}),t._v(" "),a("div",{staticClass:"reset",on:{click:t.onClickReset}},[t._v("重置")]),t._v(" "),a("el-button",{staticClass:"export-btn",attrs:{type:"primary",size:"mini"},on:{click:t.onClickExport}},[t._v("导出Excel")])],1),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}]},[a("ux-grid",{ref:"detailsTable",staticClass:"detailsTable",attrs:{border:!1,"header-cell-style":t.getHeaderCellStyle,"show-footer-overflow":"tooltip","show-overflow":"tooltip",size:"mini",height:t.height},on:{"row-click":function(){}}},t._l(t.detailsTableCol,function(e,s){return a("ux-table-column",{key:e.column+e.name,attrs:{resizable:!0,field:e.column,title:e.name,"min-width":e.min_width?e.min_width:160,fixed:e.fixed?e.fixed:"",align:"center"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v("\n "+t._s(e.name)+"\n "),e.notes?a("el-tooltip",{attrs:{content:e.notes,placement:"top"}},[a("div",[a("i",{staticClass:"el-icon-question"})])]):t._e()],1)]},proxy:!0},{key:"default",fn:function(s){var i=s.row;return["send_status_text"==e.column?[1==i.send_status?a("span",{staticClass:"c-FE9"},[t._v(t._s(i[e.column]))]):a("span",{staticClass:"c-00b38a"},[t._v(t._s(i[e.column]))])]:"handler"==e.column?[a("div",{staticClass:"c-00B38A pointer table_button",on:{click:function(e){return t.onClickDetail(i)}}},[t._v("配置详情")])]:a("span",[t._v(t._s(i[e.column]||0==i[e.column]?t.$formatNum(i[e.column]):"-"))])]}}],null,!0)})}),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("el-drawer",{attrs:{size:"1200px",visible:t.isShowRuleKHQQF,"with-header":!1},on:{"update:visible":function(e){t.isShowRuleKHQQF=e}}},[t.isShowRuleKHQQF?a("detailRuleKHQQF",{attrs:{is_copy:!1,title:"群发详情",rule_id:t.currentRuleId,sysMsgCorpid:t.currentCorpid},on:{close:t.detailClose}}):t._e()],1),t._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:t.isShowDetailKHQQF,"with-header":!1},on:{"update:visible":function(e){t.isShowDetailKHQQF=e}}},[t.isShowDetailKHQQF?a("detailKHQQF",{attrs:{title:"群发详情",rule_id:t.currentRuleId,sysMsgCorpid:t.currentCorpid},on:{close:t.detailClose}}):t._e()],1),t._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:t.isShowRuleKHQF,"with-header":!1},on:{"update:visible":function(e){t.isShowRuleKHQF=e}}},[t.isShowRuleKHQF?a("detailRuleKHQF",{attrs:{is_copy:!1,title:"群发详情",rule_id:t.currentRuleId,sysMsgCorpid:t.currentCorpid},on:{close:t.detailClose}}):t._e()],1),t._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:t.isShowDetailKHQF,"with-header":!1},on:{"update:visible":function(e){t.isShowDetailKHQF=e}}},[t.isShowDetailKHQF?a("detailKHQF",{attrs:{title:"群发详情",rule_id:t.currentRuleId,sysMsgCorpid:t.currentCorpid},on:{close:t.detailClose}}):t._e()],1),t._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:t.isShowDetailZNQF,"with-header":!1},on:{"update:visible":function(e){t.isShowDetailZNQF=e}}},[t.isShowDetailZNQF?a("detailRuleZNQF",{attrs:{title:"智能推送详情",rule_id:t.currentRuleId,sysMsgCorpid:t.currentCorpid,isCopy:!1,createGroupId:t.currentGroupId},on:{close:t.detailClose}}):t._e()],1),t._v(" "),a("el-drawer",{attrs:{size:"1100px",visible:t.isShowRuleKHPYQ,"with-header":!1},on:{"update:visible":function(e){t.isShowRuleKHPYQ=e}}},[t.isShowRuleKHPYQ?a("detailRuleKHPYQ",{attrs:{is_copy:!1,title:"朋友圈详情",rule_id:t.currentRuleId,sysMsgCorpid:t.currentCorpid},on:{close:t.detailClose}}):t._e()],1),t._v(" "),a("el-dialog",{staticClass:"export-dialog",attrs:{visible:t.msgExport.visible,"before-close":t.handleCancelExport,title:"系统消息导出",width:"530px","close-on-click-modal":!1},on:{"update:visible":function(e){return t.$set(t.msgExport,"visible",e)}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.msgExport.loading,expression:"msgExport.loading"}],staticClass:"form-wrap"},[a("div",{staticClass:"form-item"},[a("span",{staticClass:"tips"},[t._v("注:根据当前消息列表筛选条件导出,日期范围最多可选2天")])]),t._v(" "),a("div",{staticClass:"form-item"},[a("span",{staticClass:"lable required"},[t._v("导出日期:")]),t._v(" "),a("el-date-picker",{staticStyle:{width:"350px"},attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd",size:"mini","picker-options":t.msgExport.pickerOptions},model:{value:t.msgExport.time,callback:function(e){t.$set(t.msgExport,"time",e)},expression:"msgExport.time"}})],1)]),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini",disabled:t.msgExport.loading},on:{click:t.handleCancelExport}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{size:"mini",type:"primary",disabled:t.msgExport.loading},on:{click:t.handleConfirmExport}},[t._v("确 定")])],1)])],1)])},staticRenderFns:[]};var x=a("VU/8")(y,C,!1,function(t){a("2Bfn")},"data-v-05acd73e",null);e.default=x.exports},HmWx:function(t,e){},PJ3F:function(t,e){},R3bO:function(t,e){},SkW7:function(t,e){},W3kD:function(t,e,a){"use strict";var s=a("mvHQ"),i=a.n(s),n=a("Gu7T"),r=a.n(n),l=a("Dd8w"),o=a.n(l),c=a("fGUm"),_=a("xcuB"),d=a("gzej"),u=a("sazF"),p=a("UOPL"),m=a("cHmb"),h=a("M4fF"),g=a.n(h),v=a("la//"),f=a("erru"),y=a("2Uyi"),C={components:{selfCustomerservice:c.a,datePicker:d.a,enterpriseTag:u.a,editCon:p.a,screenPay:m.a,selfChannel:f.a,customerServiceCorpV2:_.a},props:["title","rule_id","is_copy","sysMsgCorpid"],data:function(){return{pickerOptions:{disabledDate:function(t){return t<Date.now()-864e5},shortcuts:[{text:"今天",onClick:function(t){t.$emit("pick",new Date)}},{text:"明天",onClick:function(t){var e=new Date;e.setTime(e.getTime()+864e5),t.$emit("pick",e)}},{text:"一周后",onClick:function(t){var e=new Date;e.setTime(e.getTime()+6048e5),t.$emit("pick",e)}}]},loading:!0,customer_filter:0,gender:[],resetFlag:!1,afferent_time:[],send_type:1,send_time:{date:"",time:""},processFlag:!1,dataInfo:{},editFlag:!1,afferent_tag_obj:{tag_id_list:[],tag:1},afferent_exclude_tag_obj:{tag_id_list:[],tag:1},msg_count:"",attachments:[],content:"",name:"",tag_info:{},exclude_tag_info:{},isTagName:!1,is_for_all:1,user_id_list:[],customerMatchCountLoading:!1,isLookCount:!0,payInfo:{},timeline:-1,operate_type:1,is_operation:1,operator_group_id:"",afferent_multiple_senders:[],multiple_senders:[],add_days_later:""}},created:function(){this.rule_id?this.detail():(this.editFlag=!0,this.loading=!1)},methods:{payChange:function(t){this.payInfo={pay_status:t.radio,pay_num_min:t.minValue,pay_num_max:t.maxValue},this.isLookCount=!0},changeEvent:function(){this.isLookCount=!0},detail:function(){var t=this;this.loading=!0;var e={rule_id:this.rule_id};this.sysMsgCorpid&&(e.corpid=this.sysMsgCorpid),this.$axios.get(this.URL.BASEURL+this.URL.massMsg_detail,{params:e}).then(function(e){e=e.data;if(t.loading=!1,e&&0==e.errno){if(t.dataInfo=e.rst,t.user_id_list=e.rst.senders?e.rst.senders.split(","):[],e.rst.senders&&e.rst.senders.length>0&&(t.is_for_all=0),t.customer_filter=e.rst.customer_filter,1==t.customer_filter&&(1==e.rst.is_customize_time?(t.timeline=-1,t.afferent_time=e.rst.add_time_start&&e.rst.add_time_end?[e.rst.add_time_start,e.rst.add_time_end]:[]):t.timeline=e.rst.timeline),t.isLookCount=!1,t.gender=e.rst.gender?e.rst.gender.split(","):[],t.isTagName=2==e.rst.operate_type,t.afferent_tag_obj={tag_name_list:e.rst.tag_list?e.rst.tag_list.split(","):[],tag_id_list:e.rst.tag_list?e.rst.tag_list.split(","):[],tag:e.rst.tag_screen_type},t.afferent_exclude_tag_obj.tag_id_list=e.rst.exclude_tag_list?e.rst.exclude_tag_list.split(","):[],t.afferent_exclude_tag_obj.tag_name_list=e.rst.exclude_tag_list?e.rst.exclude_tag_list.split(","):[],t.tag_info=o()({},g.a.cloneDeep(t.afferent_tag_obj),{tag_type:t.afferent_tag_obj.tag}),t.exclude_tag_info=t.afferent_exclude_tag_obj,t.isTagName&&(e.rst.tag_list||e.rst.exclude_tag_list)?t.handleSetTagIdInfo():t.isTagName||!e.rst.tag_list&&!e.rst.exclude_tag_list||t.handleSetTagNameInfo(),t.send_type=e.rst.send_type,2==t.send_type&&(t.send_time={date:e.rst.send_time.split(" ")[0],time:e.rst.send_time.split(" ")[1]}),t.attachments=e.rst.attachments&&""!=e.rst.attachments&&"null"!=e.rst.attachments?JSON.parse(e.rst.attachments):[],t.content=e.rst.content,t.name=e.rst.name,t.payInfo={pay_status:e.rst.pay_status,pay_num_min:e.rst.pay_num_min,pay_num_max:e.rst.pay_num_max},t.operate_type=e.rst.operate_type?e.rst.operate_type:1,t.is_operation=e.rst.is_operation||0===e.rst.is_operation?e.rst.is_operation:1,t.operator_group_id=e.rst.operator_group_id?e.rst.operator_group_id:"",t.add_days_later=e.rst.add_days_later||0===e.rst.add_days_later?e.rst.add_days_later:"",2==t.operate_type&&0==t.is_operation&&Array.isArray(e.rst.multiple_senders)){t.multiple_senders=[].concat(r()(e.rst.multiple_senders));var a=[];e.rst.multiple_senders.forEach(function(t){t&&t.user_list&&Array.isArray(t.user_list)&&t.user_list.forEach(function(e){a.push({user_id:e,corpid:t.corpid})})}),t.afferent_multiple_senders=[].concat(a)}t.is_copy?(t.editFlag=!0,t.send_type=2,t.send_time={date:"",time:""}):1==t.dataInfo.enable?t.editFlag=!0:t.editFlag=!1,3==t.dataInfo.enable?t.msg_count=e.rst.estimated_user:(t.isLookCount=!0,t.massMsg_customerMatchCount())}else 4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})},getAttachment:function(t){this.attachments=t},massMsg_set:function(){var t=this;if(1!=this.operate_type||0!=this.is_for_all||this.user_id_list&&0!=this.user_id_list.length){if(2==this.operate_type){if(1==this.is_operation&&!this.operator_group_id)return void this.$message.warning("请选择运营组");if(!(0!=this.is_operation||this.multiple_senders&&this.multiple_senders.length))return void this.$message.warning("请选择成员")}if(""!=this.name){var e="";if(1==this.send_type)e=this.$getDay(0,!0).now;else{if(""==this.send_time.date)return void this.$message({message:"请选择定时发送的日期!",type:"warning"});if(""==this.send_time.time)return void this.$message({message:"请选择定时发送的时间!",type:"warning"});e=this.send_time.date+" "+this.send_time.time}if(""!=this.content||this.attachments&&""!=this.attachments&&0!=this.attachments.length)if(""!=this.content&&this.$getStrBytes(this.content)>4e3)this.$message({message:"请检查消息文本内容,最多4000个字节,已超出!",type:"error"});else if(this.attachments&&this.attachments.length&&this.attachments.length>9)this.$message({message:"最多支持添加9个附件",type:"warning"});else{var a={rule_id:this.is_copy?"":this.rule_id?this.rule_id:"",name:this.name,send_type:this.send_type,send_time:e,chat_type:1,customer_filter:this.customer_filter,gender:this.gender&&this.gender.join(","),content:this.content,attachments:""==this.attachments||0==this.attachments.length?"":i()(this.attachments),senders:1==this.operate_type&&0==this.is_for_all?this.user_id_list.join(","):"",pay_status:this.payInfo.pay_status||0==this.payInfo.pay_status?this.payInfo.pay_status:"",pay_num_min:this.payInfo.pay_num_min||0==this.payInfo.pay_num_min?this.payInfo.pay_num_min:"",pay_num_max:this.payInfo.pay_num_max||0==this.payInfo.pay_num_max?this.payInfo.pay_num_max:"",operate_type:this.operate_type,is_operation:1==this.operate_type?0:this.is_operation,operator_group_id:2==this.operate_type&&1==this.is_operation?this.operator_group_id:"",multiple_senders:2==this.operate_type&&0==this.is_operation&&this.multiple_senders.length?i()(this.multiple_senders):"",add_days_later:this.add_days_later};-1!=this.timeline?(a.is_customize_time=0,a.timeline=this.timeline):(a.is_customize_time=1,a.add_time_start=this.afferent_time&&this.afferent_time.length>1?this.afferent_time[0]:"",a.add_time_end=this.afferent_time&&this.afferent_time.length>1?this.afferent_time[1]:""),1==this.operate_type?(a.tag_screen_type=this.tag_info&&this.tag_info.tag_type?this.tag_info.tag_type:0,a.tag_list=this.tag_info&&this.tag_info.tag_id_list?this.tag_info.tag_id_list.join(","):"",a.exclude_tag_list=this.exclude_tag_info&&this.exclude_tag_info.tag_id_list?this.exclude_tag_info.tag_id_list.join(","):""):2==this.operate_type&&(a.tag_screen_type=this.tag_info&&this.tag_info.tag_type?this.tag_info.tag_type:0,a.tag_list=this.tag_info&&this.tag_info.tag_name_list?this.tag_info.tag_name_list.join(","):"",a.exclude_tag_list=this.exclude_tag_info&&this.exclude_tag_info.tag_name_list?this.exclude_tag_info.tag_name_list.join(","):""),this.$loading(this.$loadingConfig),this.$axios.post(this.URL.BASEURL+this.URL.massMsg_set,a).then(function(e){e=e.data;t.$loading(t.$loadingConfig).close(),e&&0==e.errno?(t.is_copy||!t.rule_id?t.$emit("close","update_new"):t.$emit("close","update"),t.handleClearRoute()):4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.$loading(t.$loadingConfig).close()})}else this.$message({message:"请输入群发内容!",type:"warning"})}else this.$message({message:"请输入群发标题!",type:"warning"})}else this.$message({message:"请选择使用员工!",type:"warning"})},changeTime:function(t){this.isLookCount=!0,!t||t&&0==t.length?this.afferent_time=[]:this.afferent_time=t},tagDefine:function(t){this.isLookCount=!0,1==t.tag||2==t.tag?t.tag_id_list&&0!=t.tag_id_list.length?this.tag_info={tag_name_list:t.tag_name_list,tag_id_list:t.tag_id_list,tag_type:t.tag}:this.tag_info={tag_name_list:[],tag_id_list:[],tag_type:0}:this.tag_info={tag_name_list:[],tag_id_list:[],tag_type:t.tag}},exclude_tagDefine:function(t){this.isLookCount=!0,1==t.tag||2==t.tag?t.tag_id_list&&0!=t.tag_id_list.length?this.exclude_tag_info={tag_name_list:t.tag_name_list,tag_id_list:t.tag_id_list,tag_type:t.tag}:this.exclude_tag_info={tag_name_list:[],tag_id_list:[],tag_type:0}:this.exclude_tag_info={tag_name_list:[],tag_id_list:[],tag_type:t.tag}},massMsg_customerMatchCount:function(){var t=this;if(!this.customerMatchCountLoading){if(2==this.operate_type){if(1==this.is_operation&&!this.operator_group_id)return void this.$message.warning("请选择运营组");if(!(0!=this.is_operation||this.multiple_senders&&this.multiple_senders.length))return void this.$message.warning("请选择成员")}this.customerMatchCountLoading=!0;var e={senders:1==this.operate_type&&0==this.is_for_all?this.user_id_list.join(","):"",customer_filter:this.customer_filter,operate_type:this.operate_type,is_operation:1==this.operate_type?0:this.is_operation,operator_group_id:2==this.operate_type&&1==this.is_operation?this.operator_group_id:"",multiple_senders:2==this.operate_type&&0==this.is_operation&&this.multiple_senders.length?i()(this.multiple_senders):""};1==this.customer_filter&&(e.gender=this.gender&&this.gender.join(","),1==this.operate_type?(e.tag_screen_type=this.tag_info&&this.tag_info.tag_type?this.tag_info.tag_type:0,e.tag_list=this.tag_info&&this.tag_info.tag_id_list?this.tag_info.tag_id_list.join(","):"",e.exclude_tag_list=this.exclude_tag_info&&this.exclude_tag_info.tag_id_list?this.exclude_tag_info.tag_id_list.join(","):""):2==this.operate_type&&(e.tag_screen_type=this.tag_info&&this.tag_info.tag_type?this.tag_info.tag_type:0,e.tag_list=this.tag_info&&this.tag_info.tag_name_list?this.tag_info.tag_name_list.join(","):"",e.exclude_tag_list=this.exclude_tag_info&&this.exclude_tag_info.tag_name_list?this.exclude_tag_info.tag_name_list.join(","):""),e.pay_status=this.payInfo.pay_status||0==this.payInfo.pay_status?this.payInfo.pay_status:"",e.pay_num_min=this.payInfo.pay_num_min||0==this.payInfo.pay_num_min?this.payInfo.pay_num_min:"",e.pay_num_max=this.payInfo.pay_num_max||0==this.payInfo.pay_num_max?this.payInfo.pay_num_max:"",-1!=this.timeline?(e.is_customize_time=0,e.timeline=this.timeline):(e.is_customize_time=1,e.add_time_start=this.afferent_time&&this.afferent_time.length>1?this.afferent_time[0]:"",e.add_time_end=this.afferent_time&&this.afferent_time.length>1?this.afferent_time[1]:""),e.add_days_later=this.add_days_later),this.$axios.get(this.URL.BASEURL+this.URL.massMsg_customerMatchCount,{params:e}).then(function(e){e=e.data;t.customerMatchCountLoading=!1,t.isLookCount=!1,e&&0==e.errno?t.msg_count=e.rst.total:4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.customerMatchCountLoading=!1})}},handleClearRoute:function(){var t=this.$route.query.from;t&&t===v.E.PLAYLET_LINK_MINIAPP?this.$router.replace({query:{}}):t&&t===v.E.PLAYLET_LINK_H5?this.$router.replace({query:{}}):t&&t===v.E.PLAYLET_LINK_MULTI&&(this.$router.replace({query:{}}),localStorage.removeItem(v.E.PLAYLET_LINK_MULTI))},onChangeOperatorGroupId:function(t){this.operator_group_id=t,this.changeEvent()},onChangeMultiCorpUsers:function(t){var e=t.res_format_2;e&&e.length?this.multiple_senders=e.map(function(t){return{corpid:t.corpid,user_list:t.user_list.map(function(t){return t.user_id})}}):this.multiple_senders=[],this.changeEvent()},onInputAddDaysLater:function(t){this.add_days_later=Object(y.k)(t),this.changeEvent()},onChangeAddDaysLater:function(t){this.changeEvent()},handleSetTagIdInfo:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.tagList,{}).then(function(e){if((e=e.data)&&0==e.errno){var a=[],s=[];e.rst.forEach(function(e){e.tag_list.forEach(function(e){t.tag_info.tag_name_list.find(function(t){return t===e.tag_name})&&a.push(e.tag_id),t.exclude_tag_info.tag_name_list.find(function(t){return t===e.tag_name})&&s.push(e.tag_id)})}),t.tag_info.tag_id_list=[].concat(a),t.exclude_tag_info.tag_id_list=[].concat(s)}else 4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(t){})},handleSetTagNameInfo:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.tagList,{}).then(function(e){if((e=e.data)&&0==e.errno){var a=[],s=[];e.rst.forEach(function(e){e.tag_list.forEach(function(e){t.tag_info.tag_id_list.find(function(t){return t===e.tag_id})&&a.push(e.tag_name),t.exclude_tag_info.tag_id_list.find(function(t){return t===e.tag_id})&&s.push(e.tag_name)})}),t.tag_info.tag_name_list=[].concat(a),t.exclude_tag_info.tag_name_list=[].concat(s)}else 4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(t){})}}},x={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"createMassMsg"},[s("div",{staticClass:"self_drawer_title"},[s("div",{staticClass:"flex"},[t._v("\n "+t._s(t.title)+"\n ")]),t._v(" "),s("div",{staticClass:"flex-align-center"},[s("i",{staticClass:"el-icon-close pointer",on:{click:function(e){return t.$emit("close")}}})])]),t._v(" "),t.loading?t._e():s("div",{staticClass:"bg-ffffff",staticStyle:{padding:"15px 30px"}},[s("h3",{staticClass:"bigTitle"},[t._v("基础信息\n "),t.rule_id&&!t.is_copy?[-2==t.dataInfo.enable?s("span",{staticClass:"detail_status status_del"},[t._v("已删除")]):t._e(),t._v(" "),-1==t.dataInfo.enable?s("span",{staticClass:"detail_status status_fail"},[t._v("发送失败")]):t._e(),t._v(" "),0==t.dataInfo.enable?s("span",{staticClass:"detail_status status_del"},[t._v("禁用")]):t._e(),t._v(" "),1==t.dataInfo.enable?s("span",{staticClass:"detail_status status_wait"},[t._v("待发送")]):t._e(),t._v(" "),2==t.dataInfo.enable?s("span",{staticClass:"detail_status status_ing"},[t._v("正在发送中")]):t._e(),t._v(" "),3==t.dataInfo.enable?s("span",{staticClass:"detail_status status_success"},[t._v("发送完成")]):t._e()]:t._e()],2),t._v(" "),s("div",{staticClass:"regulations"},[t._m(0),t._v(" "),s("div",{staticStyle:{display:"flex"}},[s("el-radio",{attrs:{disabled:!t.editFlag,label:1},on:{input:t.changeEvent},model:{value:t.operate_type,callback:function(e){t.operate_type=e},expression:"operate_type"}},[t._v("单个企微主体")]),t._v(" "),s("el-radio",{attrs:{disabled:!t.editFlag,label:2},on:{input:t.changeEvent},model:{value:t.operate_type,callback:function(e){t.operate_type=e},expression:"operate_type"}},[t._v("多个企微主体")])],1)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.operate_type,expression:"operate_type == 1"}],staticClass:"regulations"},[t._m(1),t._v(" "),s("div",[s("div",{staticStyle:{display:"flex"}},[s("el-radio",{attrs:{disabled:!t.editFlag,label:1},on:{input:t.changeEvent},model:{value:t.is_for_all,callback:function(e){t.is_for_all=e},expression:"is_for_all"}},[t._v("全部员工")]),t._v(" "),s("el-radio",{attrs:{disabled:!t.editFlag,label:0},on:{input:t.changeEvent},model:{value:t.is_for_all,callback:function(e){t.is_for_all=e},expression:"is_for_all"}},[t._v("部分员工")])],1),t._v(" "),0==t.is_for_all?s("self-customerservice",{attrs:{disabled:!t.editFlag,title:"",width:"300px",afferent_users:t.user_id_list},on:{customerDefine:function(e){t.user_id_list=e,t.changeEvent()}}}):t._e()],1)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:2==t.operate_type,expression:"operate_type == 2"}],staticClass:"regulations"},[t._m(2),t._v(" "),s("div",[s("div",{staticStyle:{display:"flex"}},[s("el-radio",{attrs:{disabled:!t.editFlag,label:1},on:{input:t.changeEvent},model:{value:t.is_operation,callback:function(e){t.is_operation=e},expression:"is_operation"}},[t._v("运营组")]),t._v(" "),s("el-radio",{attrs:{disabled:!t.editFlag,label:0},on:{input:t.changeEvent},model:{value:t.is_operation,callback:function(e){t.is_operation=e},expression:"is_operation"}},[t._v("选择成员")])],1),t._v(" "),s("selfChannel",{directives:[{name:"show",rawName:"v-show",value:1==t.is_operation,expression:"is_operation == 1"}],ref:"operatorIdEl",attrs:{disabled:!t.editFlag,afferent_value:t.operator_group_id,title:"",type:"operatorGroup",width:"300px"},on:{channelDefine:t.onChangeOperatorGroupId}}),t._v(" "),s("customerServiceCorpV2",{directives:[{name:"show",rawName:"v-show",value:0==t.is_operation,expression:"is_operation == 0"}],attrs:{disabled:!t.editFlag,title:"",width:"300px",afferent_users:t.afferent_multiple_senders},on:{customerDefine:t.onChangeMultiCorpUsers}})],1)]),t._v(" "),s("div",{staticClass:"regulations"},[t._m(3),t._v(" "),s("div",[s("div",[s("el-radio",{attrs:{disabled:!t.editFlag,label:0},on:{change:t.changeEvent},model:{value:t.customer_filter,callback:function(e){t.customer_filter=e},expression:"customer_filter"}},[t._v("全部客户")]),t._v(" "),s("el-radio",{attrs:{disabled:!t.editFlag,label:1},on:{change:t.changeEvent},model:{value:t.customer_filter,callback:function(e){t.customer_filter=e},expression:"customer_filter"}},[t._v("筛选客户")])],1),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.customer_filter,expression:"customer_filter == 1"}],staticClass:"screeningCustomers"},[s("div",{staticClass:"screeningItem"},[s("label",[t._v("性别:")]),t._v(" "),s("el-checkbox-group",{staticClass:"checkboxGroup",attrs:{disabled:!t.editFlag},on:{change:t.changeEvent},model:{value:t.gender,callback:function(e){t.gender=e},expression:"gender"}},[s("el-checkbox",{attrs:{label:"1"}},[t._v("男性")]),t._v(" "),s("el-checkbox",{attrs:{label:"2"}},[t._v("女性")]),t._v(" "),s("el-checkbox",{attrs:{label:"0"}},[t._v("未知性别")])],1)],1),t._v(" "),s("div",{staticClass:"screeningItem"},[s("label",[t._v("付费情况:")]),t._v(" "),s("screen-pay",{staticStyle:{margin:"0"},attrs:{title:"",width:"355px",reset:t.resetFlag,afferent_obj:t.payInfo},on:{payChange:t.payChange}})],1),t._v(" "),s("div",{staticClass:"screeningItem",staticStyle:{"align-items":"flex-start"}},[s("label",[t._v("添加时间:")]),t._v(" "),s("div",{staticClass:"timeLineBox"},[s("el-radio",{attrs:{disabled:!t.editFlag,label:24},on:{change:t.changeEvent},model:{value:t.timeline,callback:function(e){t.timeline=e},expression:"timeline"}},[t._v("24小时")]),t._v(" "),s("el-radio",{attrs:{disabled:!t.editFlag,label:168},on:{change:t.changeEvent},model:{value:t.timeline,callback:function(e){t.timeline=e},expression:"timeline"}},[t._v("7天")]),t._v(" "),s("el-radio",{attrs:{disabled:!t.editFlag,label:360},on:{change:t.changeEvent},model:{value:t.timeline,callback:function(e){t.timeline=e},expression:"timeline"}},[t._v("15天")]),t._v(" "),s("el-radio",{attrs:{disabled:!t.editFlag,label:-1},on:{change:t.changeEvent},model:{value:t.timeline,callback:function(e){t.timeline=e},expression:"timeline"}},[t._v("自定义")]),t._v(" "),-1==t.timeline?s("date-picker",{staticStyle:{margin:"6px 0 8px 0"},attrs:{title:"",width:"355px",disabled:!t.editFlag,timeFlag:!0,afferent_time:t.afferent_time,pickerOptions:{},reset:t.resetFlag,defaultTime:["00:00:00","23:59:59"]},on:{changeTime:t.changeTime}}):t._e()],1)]),t._v(" "),s("div",{staticClass:"screeningItem"},[s("label",[t._v("快捷筛选:")]),t._v(" "),s("div",{staticClass:"add-days-wrap"},[s("span",[t._v("添加客服")]),t._v(" "),s("el-input",{attrs:{size:"mini",placeholder:"请输入",maxlength:"5",clearable:"",disabled:!t.editFlag},on:{input:t.onInputAddDaysLater,change:t.onChangeAddDaysLater},model:{value:t.add_days_later,callback:function(e){t.add_days_later="string"==typeof e?e.trim():e},expression:"add_days_later"}}),t._v(" "),s("span",[t._v("天后")]),t._v(" "),s("span",{staticClass:"tips"},[t._v("X天后,“X”不包含")])],1)]),t._v(" "),s("div",{staticClass:"screeningItem"},[s("label",[t._v("标签:")]),t._v(" "),s("enterprise-tag",{staticStyle:{margin:"0"},attrs:{isTagName:t.isTagName,title:"",width:"355px",disabled:!t.editFlag,afferent_obj:t.afferent_tag_obj,reset:t.resetFlag},on:{tagDefine:t.tagDefine}})],1),t._v(" "),s("div",{staticClass:"screeningItem",staticStyle:{"align-items":"flex-start"}},[s("label",[t._v("排除客户:")]),t._v(" "),s("div",{staticStyle:{flex:"1"}},[s("enterprise-tag",{staticStyle:{margin:"0"},attrs:{isTagName:t.isTagName,title:"",width:"355px",disabled:!t.editFlag,afferent_obj:t.afferent_exclude_tag_obj,excludeFlag:!0,reset:t.resetFlag},on:{tagDefine:t.exclude_tagDefine}}),t._v(" "),s("p",{staticClass:"screening-hint"},[t._v("可根据标签选择客户,群发时将不会发送给该标签内的客户。若选择了排除的客户,需要较长时间创建本条群发消息哦~")])],1)])]),t._v(" "),s("div",{staticClass:"customer_all"},[t._v("将群发消息给"+t._s(0==t.customer_filter?"全部客户的":1==t.customer_filter?"筛选客户的":"")+"\n "),t.isLookCount?s("span",{staticClass:"pointer",on:{click:t.massMsg_customerMatchCount}},[t.customerMatchCountLoading?s("i",{staticClass:"el-icon-loading"}):t._e(),t._v(" "+t._s(t.customerMatchCountLoading?"":"查看"))]):s("span",[t._v(t._s(t.msg_count))]),t._v("\n 个客户\n ")])])]),t._v(" "),s("div",{staticClass:"line"}),t._v(" "),s("h3",{staticClass:"bigTitle"},[t._v("编辑群发消息")]),t._v(" "),s("div",{staticClass:"regulations regulations2"},[t._m(4),t._v(" "),s("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"例:活动推送/拉新等",disabled:!t.editFlag,clearable:"",size:"small"},model:{value:t.name,callback:function(e){t.name="string"==typeof e?e.trim():e},expression:"name"}}),t._v(" "),s("p",{staticStyle:{"font-size":"13px","line-height":"30px",color:"#f9a527","margin-left":"10px"}},[t._v("*仅作为企业内部人员记录群发摘要,不会推送给客户")])],1),t._v(" "),s("div",{staticClass:"regulations regulations2"},[t._m(5),t._v(" "),s("editCon",{ref:"editCon",attrs:{afferent_content:t.content,afferent_attachments:t.attachments,disabled:!t.editFlag,isKHQF:!0,isShowAddPlaylet:!0},on:{editContent:function(e){t.content=e},changeAttachment:t.getAttachment}})],1),t._v(" "),s("div",{staticClass:"regulations regulations2"},[t._m(6),t._v(" "),s("div",[s("el-radio",{attrs:{disabled:!t.editFlag,label:1},model:{value:t.send_type,callback:function(e){t.send_type=e},expression:"send_type"}},[t._v("立即发送")]),t._v(" "),s("el-radio",{attrs:{disabled:!t.editFlag,label:2},model:{value:t.send_type,callback:function(e){t.send_type=e},expression:"send_type"}},[t._v("定时发送")]),t._v(" "),2==t.send_type?s("div",{staticStyle:{"margin-top":"15px"}},[s("el-date-picker",{staticStyle:{width:"160px"},attrs:{"picker-options":t.pickerOptions,disabled:!t.editFlag,size:"small","value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期"},model:{value:t.send_time.date,callback:function(e){t.$set(t.send_time,"date",e)},expression:"send_time.date"}}),t._v(" "),s("el-time-picker",{staticStyle:{width:"130px"},attrs:{disabled:!t.editFlag,size:"small",format:"HH:mm","value-format":"HH:mm:ss",placeholder:"请输入时间"},model:{value:t.send_time.time,callback:function(e){t.$set(t.send_time,"time",e)},expression:"send_time.time"}})],1):t._e()],1)]),t._v(" "),s("div",{staticClass:"regulations regulations2"},[s("label"),t._v(" "),s("div",{staticClass:"operationProcess"},[s("div",{staticClass:"process-title"},[s("h3",[t._v("企业群发的操作流程")]),t._v(" "),s("div",{staticClass:"zhankai",on:{click:function(e){t.processFlag=!t.processFlag}}},[t._v("展开 "),s("i",{class:["el-icon-arrow-down",t.processFlag?"reversalAnimation":""]})])]),t._v(" "),s("p",{staticClass:"process-hint"},[t._v("1、创建完群发任务后,员工将在企业微信上收到【客户联系】新消息通知")]),t._v(" "),s("p",{staticClass:"process-hint"},[t._v("2、员工点击【客户联系】,打开待发送的企业消息,可一键将消息发送给客户")]),t._v(" "),t.processFlag?s("img",{staticClass:"img",attrs:{src:a("fgle"),alt:""}}):t._e()])]),t._v(" "),t.sysMsgCorpid?t._e():s("div",{staticClass:"button_box"},[t.editFlag?s("button",{staticClass:"button",on:{click:t.massMsg_set}},[t._v("通知成员发送")]):t._e()])])])},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",[e("em",[this._v("*")]),this._v("使用员工:")])},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",[e("em",[this._v("*")]),this._v("选择客户")])},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("群发内容")])},function(){var t=this.$createElement,e=this._self._c||t;return e("label",[e("em",[this._v("*")]),this._v("群发时间")])}]};var b=a("VU/8")(C,x,!1,function(t){a("oR68")},"data-v-1a493a42",null);e.a=b.exports},XdcG:function(t,e,a){"use strict";var s=a("//Fk"),i=a.n(s),n=a("Xxa5"),r=a.n(n),l=a("mvHQ"),o=a.n(l),c=a("exGp"),_=a.n(c),d=a("Gu7T"),u=a.n(d),p={components:{selfInput:a("McOJ").a},props:["partUser","partDepart"],data:function(){return{loading:!1,visible:!1,userList:[],new_userList:[],userTotal:"",userTotal_new:"",showSelectUsers_val:"",searchWord:"",chooseAllList:[],departList:[],userListRight:[],resetFlag:!1,input_keyword:""}},created:function(){this.init()},methods:{userSearch:function(){if(this.fuzzySearchChoose(),""==this.input_keyword)return this.userTotal_new="",void(this.new_userList=[]);var t=this.input_keyword.split(" ");0==(t=t.filter(function(t){return""!=t})).length&&(t=[""]);var e=[],a=0;this.userList.forEach(function(a){var s=a.user_list.filter(function(e){var a=!1;return t.forEach(function(t){a||(a=e.name&&-1!=e.name.indexOf(t))}),a});if(s&&s.length>0){var i=JSON.parse(o()(a));i.user_list=s,e.push(i)}}),this.new_userList=e,this.new_userList.forEach(function(t){a+=t.user_list.length}),this.userTotal_new=a},fuzzySearchChoose:function(){var t=this,e=!0;this.userList.forEach(function(a,s){a.user_list.forEach(function(t){0==t.choose&&(e=!1)}),e?t.$set(t.userList[s],"choose",!0):t.$set(t.userList[s],"choose",!1)}),this.chooseLeftToRight()},clearAll:function(){this.departList=[],this.userListRight=[],this.userList.forEach(function(t){t.choose=!1,t.user_list.forEach(function(t){t.choose=!1})})},deledepartItem:function(t,e){var a=this;this.departList.splice(t,1),this.userList.forEach(function(t,s){t.department_id==e&&a.switchDepartChoose(s)})},deleuserItem:function(t,e,a){var s=this;this.userListRight.splice(t,1),this.userList.forEach(function(t,i){t.department_id==a&&t.user_list.forEach(function(t,a){t.user_id==e&&s.$set(t,"choose",!1)})})},switchZhan:function(t){var e=this.userList[t];e.departZhan=!e.departZhan,this.$set(this.userList,t,e)},switchDepartChoose:function(t,e){var a=this,s=e?this.new_userList:this.userList,i=s[t];i.choose=!i.choose,this.$set(s,t,i),i.user_list.forEach(function(e,i){s[t].choose?a.$set(e,"choose",!0):a.$set(e,"choose",!1)}),this.chooseLeftToRight()},switchUserChoose:function(t,e,a){var s=a?this.new_userList:this.userList,i=s[e].user_list[t];i.choose=!i.choose,this.$set(s[e].user_list,t,i);var n=!0;s[e].user_list.forEach(function(t){0==t.choose&&(n=!1)}),n?this.$set(s[e],"choose",!0):this.$set(s[e],"choose",!1),this.chooseLeftToRight()},chooseLeftToRight:function(){var t=this;this.userListRight=[],this.departList=[],this.userList.forEach(function(e){e.choose?(t.userListRight&&t.userListRight.length>0&&e.user_list.forEach(function(a){t.userListRight.forEach(function(s,i){s.user_id==a.user_id&&e.department_id==s.department_id&&t.userListRight.splice(i,1)})}),t.departList.push(e)):(t.departList&&t.departList.length>0&&t.departList.forEach(function(a,s){a.department_id==e.department_id&&t.departList.splice(s,1)}),e.user_list.forEach(function(a){a.choose?t.userListRight.push(a):t.departList&&t.departList.length>0&&t.userListRight.forEach(function(s,i){s.user_id==a.user_id&&e.department_id==s.department_id&&t.userListRight.splice(i,1)})}))})},init:function(){var t=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.userList,{params:{}}).then(function(e){e=e.data;if(t.loading=!1,e&&0==e.errno){if(t.userList=e.rst.list,t.userList.forEach(function(t){t.departZhan=!0,t.choose=!1,t.user_list.forEach(function(e){e.choose=!1,e.department_id=t.department_id})}),t.userTotal=e.rst.count,t.partUser||t.partDepart){if(t.partDepart)t.partDepart.split(",").forEach(function(e){t.userList.forEach(function(a,s){a.department_id==e&&(t.showSelectUsers_val+=a.department_name+",",t.switchDepartChoose(s))})});if(t.partUser)t.partUser.split(",").forEach(function(e){t.userList.forEach(function(a,s){a.user_list.forEach(function(a,i){e==a.user_id&&(t.showSelectUsers_val+=a.name+",",t.switchUserChoose(i,s))})})})}}else 4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})},save:function(){var t=[],e=[],a="",s="";this.showSelectUsers_val="",this.departList.forEach(function(e){t.push(e.department_id),s+=e.department_name+","}),this.userListRight.forEach(function(t){e.push(t.user_id),a+=t.name+","}),this.$emit("getSenderList",e.toString()),this.$emit("getDepartList",t.toString()),this.showSelectUsers_val=a+s,this.visible=!1}}},m={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:"conBox"},[a("el-popover",{attrs:{"append-to-body":"",trigger:"click"},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[a("div",{staticClass:"popCon"},[a("div",{staticClass:"con_left"},[a("self-input",{staticStyle:{"margin-top":"0","margin-bottom":"4px"},attrs:{reset:t.resetFlag,hasLabel:!1,inputFlag:!0,width:"380px"},on:{inputChange:function(e){t.input_keyword=e,t.userSearch()}}}),t._v(" "),a("div",{staticStyle:{"font-size":"12px",color:"#f9a527"}},[t._v("添加 空格 可进行多成员搜索")]),t._v(" "),a("div",{staticClass:"userTotal"},[t._v("全部成员: ("+t._s(t.userTotal_new?t.userTotal_new:t.userTotal)+")")]),t._v(" "),a("div",{staticClass:"userTree"},[""!==t.input_keyword&&0==t.userTotal_new?[a("div",{staticClass:"fWeight600 f14 text-center"},[t._v("暂无搜索到成员")])]:t._l(t.new_userList&&t.new_userList.length>0?t.new_userList:t.userList,function(e,s){return a("div",{key:e.department_id,staticClass:"parentBox"},[a("div",{staticClass:"departInfo",on:{click:function(e){return e.stopPropagation(),t.switchZhan(s)}}},[a("i",{class:[e.departZhan?"el-icon-caret-top":"el-icon-caret-bottom","c-46a7ff"]}),t._v(" "),a("div",[a("i",{staticClass:"el-icon-s-cooperation c-46a7ff"}),t._v(" "),a("span",[t._v(t._s(e.department_name))])]),t._v(" "),a("div",{staticClass:"lMarauto",on:{click:function(e){return e.stopPropagation(),t.switchDepartChoose(s,t.new_userList&&t.new_userList.length>0?"new_userList":"")}}},[e.choose?a("i",{staticClass:"el-icon-circle-check pointer c-00b38a f17"}):a("span",{staticClass:"checkNo"})])]),t._v(" "),a("el-collapse-transition",[e.departZhan?a("div",t._l(e.user_list,function(e,i){return a("div",{key:i+e.user_id,staticClass:"userInfo"},[a("img",{staticStyle:{width:"40px","margin-right":"10px"},attrs:{src:e.avatar,alt:""}}),t._v(" "),a("div",[a("div",{staticClass:"c-333"},[t._v(t._s(e.name))]),t._v(" "),a("div",{staticClass:"f12"},[t._v("\n 部门:\n "),t._l(e.department_list,function(e){return a("span",{staticClass:"f12 c-ddd"},[t._v(t._s(e))])})],2)]),t._v(" "),a("div",{staticClass:"lMarauto",on:{click:function(e){return e.stopPropagation(),t.switchUserChoose(i,s,t.new_userList&&t.new_userList.length>0?"new_userList":"")}}},[e.choose?a("i",{staticClass:"el-icon-circle-check pointer c-00b38a f17"}):a("span",{staticClass:"checkNo"})])])}),0):t._e()])],1)})],2)],1),t._v(" "),a("div",{staticClass:"con_right"},[a("div",{staticClass:"c-000 fWeight600 f14"},[t._v("已选择的成员")]),t._v(" "),a("div",{staticClass:"flex tMar6"},[a("span",{staticClass:"clear",on:{click:t.clearAll}},[t._v("全部清空")]),t._v(" "),a("span",[t._v("已选择"+t._s(t.departList&&t.departList.length)+"个部门和"+t._s(t.userListRight&&t.userListRight.length)+"人")])]),t._v(" "),a("div",{staticClass:"right_scroll"},[t._l(t.departList,function(e,s){return a("div",{key:s+e.department_id,staticClass:"chooseNape"},[a("i",{staticClass:"el-icon-s-cooperation c-46a7ff rMar10"}),t._v(" "),a("span",[t._v(t._s(e.department_name))]),t._v(" "),a("i",{staticClass:"el-icon-close lMarauto pointer",on:{click:function(a){return t.deledepartItem(s,e.department_id)}}})])}),t._v(" "),t._l(t.userListRight,function(e,s){return a("div",{key:s+e.user_id,staticClass:"chooseNape"},[a("img",{staticStyle:{width:"40px","margin-right":"10px"},attrs:{src:e.avatar,alt:""}}),t._v(" "),a("div",[a("div",{staticClass:"c-333"},[t._v(t._s(e.name))]),t._v(" "),a("div",{staticClass:"f12"},[t._v("\n 部门:\n "),t._l(e.department_list,function(e){return a("span",{staticClass:"f12 c-ddd"},[t._v(t._s(e))])})],2)]),t._v(" "),a("i",{staticClass:"el-icon-close lMarauto pointer",on:{click:function(a){return t.deleuserItem(s,e.user_id,e.department_id)}}})])})],2),t._v(" "),a("div",{staticClass:"footer"},[a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(e){t.visible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.save()}}},[t._v("确定")])],1)])]),t._v(" "),a("div",{attrs:{slot:"reference"},slot:"reference"},[a("el-input",{attrs:{placeholder:"请选择",size:"mini"},model:{value:t.showSelectUsers_val,callback:function(e){t.showSelectUsers_val=e},expression:"showSelectUsers_val"}},[a("template",{slot:"append"},[a("i",{staticClass:"el-icon-arrow-down pointer"})])],2)],1)])],1)},staticRenderFns:[]};var h=a("VU/8")(p,m,!1,function(t){a("pOcQ")},"data-v-131ef890",null).exports,g=a("UOPL"),v=a("zifI"),f=a("sPH2"),y=a("gzej"),C=a("34d2"),x=a("7Sep"),b={name:"conTwo",props:["conType","reBackData","disabled"],components:{radarEntrance:C.a,selectMaterials:x.a},data:function(){return{imageFileList:[],coverFileList:[],videoFileList:{},loading:!1,dialogImageUrl:!1,imgVisible:!1,imgFileData:{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},coverVisible:!1,dialogcoverUrl:"",videoVisible:!1,videoFileData:{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:3},imgUrls:[],videoUrls:{msgtype:"video",video:{media_id:"",pic_url:""}},linkUrl:{msgtype:"link",link:{title:"",url:"",media_id:"",pic_url:""}},attachments:[],fromRebackGetInfo:!0,videoFlag:!1,hoverInFlag:!1,radarIds:[],radar_attach:[],selectMaterialsVisible:!1,selectMaterialsSource:""}},created:function(){var t=this;this.$nextTick(function(){t.rebackInit()})},methods:{radarShow:function(){var t=this;this.$nextTick(function(){t.radarids_reset(),t.$refs.radarEntranceRef.dialogVisible=!0})},radarids_reset:function(){var t=this;this.radarIds=[],this.radar_attach.forEach(function(e){"radar"==e.msgtype&&t.radarIds.push(e.radar.radar_id)})},getFinallyAttach:function(t){this.attachments=[],0==this.conType?this.attachments=this.imgUrls:1==this.conType?this.attachments.push(this.videoUrls):2==this.conType?this.attachments.push(this.linkUrl):3==this.conType&&(this.attachments=this.radar_attach),this.$parent.createFriendsCircleSend(this.attachments)},rebackInit:function(){var t=this,e=this.reBackData;this.imageFileList=e.imageFileList,this.coverFileList=e.coverFileList,this.videoFileList=e.videoFileList?e.videoFileList:{},this.imageFileList&&(this.imgUrls=[],this.imageFileList.forEach(function(e){t.imgUrls.push({msgtype:"image",image:{media_id:e.media_id,pic_url:e.url}})})),e.videoFileList.media_id&&(this.videoUrls.video.media_id=this.videoFileList.media_id),e.videoFileList.url&&(this.videoUrls.video.pic_url=this.videoFileList.url,this.videoFlag=!0),e.linkUrl.title&&(this.linkUrl.link.title=e.linkUrl.title),e.linkUrl.url&&(this.linkUrl.link.url=e.linkUrl.url),e.linkUrl.media_id&&(this.linkUrl.link.media_id=e.linkUrl.media_id),e.linkUrl.pic_url&&(this.linkUrl.link.pic_url=e.linkUrl.pic_url)},handleExceed:function(t){0==this.conType?this.$message({message:"最多上传9张图片",type:"warning"}):2==this.conType&&this.$message({message:"最多上传1张图片",type:"warning"})},uploadSuccess:function(t,e,a){var s=this;0==t.errno?(0==this.conType?(this.imgUrls=[],a.forEach(function(t){t.media_id?s.imgUrls.push({msgtype:"image",image:{media_id:t.media_id,pic_url:t.url}}):s.imgUrls.push({msgtype:"image",image:{media_id:t.response.rst.material_id,pic_url:t.response.rst.url}})}),this.$loading(this.$loadingConfig).close()):1==this.conType?(a.forEach(function(t){var e=s.videoUrls.video;t.media_id?(e.media_id=t.media_id,e.pic_url=t.url):(e.media_id=t.response.rst.material_id,e.pic_url=t.response.rst.url)}),this.videoFlag=!0,this.$loading(this.$loadingConfig).close()):2==this.conType&&(this.linkUrl.link.media_id=t.rst.material_id,this.linkUrl.link.pic_url=t.rst.url,this.handleSetCoverFileList(),this.$loading(this.$loadingConfig).close()),this.fromRebackGetInfo=!1):this.$message({message:t.err,type:"warning"})},uploadFail:function(){this.$message({message:"上传失败",type:"fail"})},handleRemove:function(t,e){if("success"==t.status)if(0==this.conType){var a=t.media_id||t.response.rst.material_id,s=[];this.imgUrls.forEach(function(t){s.push(t.image.media_id)});var i=s.indexOf(a);this.imgUrls.splice(i,1),this.handleSetImageFileList()}else 2==this.conType&&(this.linkUrl.link.media_id="",this.linkUrl.link.pic_url="",this.handleSetCoverFileList())},handleSee:function(t){0==this.conType?(this.dialogImageUrl=t.url,this.imgVisible=!0):2==this.conType&&(this.dialogcoverUrl=t.url,this.coverVisible=!0)},beforeUploadUpload:function(t){this.$loading(this.$loadingConfig)},onClickSelectMaterials:function(t){return this.selectMaterialsSource=t,"TP"==this.selectMaterialsSource&&this.imgUrls&&9==this.imgUrls.length?(this.handleExceed(),!1):"TWLJ"==this.selectMaterialsSource&&this.linkUrl&&this.linkUrl.link.media_id?(this.handleExceed(),!1):void(this.selectMaterialsVisible=!0)},selectMaterialsConfirm:function(t){t&&t.url?("TP"==this.selectMaterialsSource?(this.imgUrls.push({msgtype:"image",image:{media_id:t.material_id,pic_url:t.url}}),this.handleSetImageFileList()):"TWLJ"==this.selectMaterialsSource&&(this.linkUrl.link.media_id=t.material_id,this.linkUrl.link.pic_url=t.url,this.handleSetCoverFileList()),this.selectMaterialsVisible=!1):this.$message({message:"所选素材不可用,请重新选择!",type:"warning"})},handleSetImageFileList:function(){var t=this;return _()(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.imageFileList=[],e.next=3,t.$nextTick();case 3:t.imgUrls.forEach(function(e){t.imageFileList.push({media_id:e.image.media_id,url:e.image.pic_url})});case 4:case"end":return e.stop()}},e,t)}))()},handleSetCoverFileList:function(){var t=this;return _()(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.coverFileList=[],e.next=3,t.$nextTick();case 3:t.linkUrl.link.media_id&&t.coverFileList.push({media_id:t.linkUrl.link.media_id,url:t.linkUrl.link.pic_url});case 4:case"end":return e.stop()}},e,t)}))()}}},w={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"}]},[a("div",{staticClass:"conBcg"},[t.disabled?a("div",{staticClass:"disabled-wrap"}):t._e(),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:0==t.conType,expression:"conType==0"}],staticClass:"friendCircleUploader"},[a("el-upload",{key:"imgUpload",staticClass:"imgUploader",attrs:{multiple:"",action:t.URL.BASEURL+t.URL.material_upload,data:t.imgFileData,"file-list":t.imageFileList,name:"material_file",accept:".jpg,.jpeg,.png","list-type":"picture-card",limit:9,"before-upload":t.beforeUploadUpload,"on-preview":t.handleSee,"on-remove":t.handleRemove,"on-success":t.uploadSuccess,"on-error":t.uploadFail,"on-exceed":t.handleExceed}},[a("div",[a("div",{staticClass:"el-icon-circle-plus f16"}),t._v(" "),a("div",{staticClass:"f14"},[t._v("添加图片")])])]),t._v(" "),a("div",{staticClass:"flex-align-center",staticStyle:{"margin-top":"10px"}},[a("el-button",{staticStyle:{"margin-right":"10px"},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),t._v(" "),a("el-dialog",{attrs:{"append-to-body":"",visible:t.imgVisible},on:{"update:visible":function(e){t.imgVisible=e}}},[a("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})])],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:1==t.conType,expression:"conType==1"}],staticClass:"friendCircleUploader",staticStyle:{display:"flex","align-items":"center"}},[t.videoFlag?a("div",{staticStyle:{width:"100px",height:"100px",position:"relative","margin-right":"10px"},on:{mouseover:function(e){t.hoverInFlag=!0},mouseleave:function(e){t.hoverInFlag=!1}}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.hoverInFlag,expression:"hoverInFlag"}],staticClass:"videoHoverCss"},[a("i",{staticClass:"el-icon-zoom-in rMar10",on:{click:function(e){t.videoVisible=!0}}}),t._v(" "),a("i",{staticClass:"el-icon-delete",on:{click:function(e){t.videoFlag=!1,t.hoverInFlag=!1}}})]),t._v(" "),a("video",{attrs:{src:t.videoUrls.video.pic_url,width:"100px",height:"100px"}})]):t._e(),t._v(" "),a("el-dialog",{attrs:{"append-to-body":"",visible:t.videoVisible,width:"20%"},on:{"update:visible":function(e){t.videoVisible=e}}},[a("video",{attrs:{src:t.videoUrls.video.pic_url,width:"100%",controls:""}})]),t._v(" "),a("el-upload",{key:"videoUpload",staticClass:"imgUploader",attrs:{action:t.URL.BASEURL+t.URL.material_upload,data:t.videoFileData,name:"material_file",accept:".mp4","list-type":"picture-card","show-file-list":!1,"before-upload":t.beforeUploadUpload,"on-success":t.uploadSuccess,"on-error":t.uploadFail}},[a("div",[a("div",{staticClass:"el-icon-circle-plus f16"}),t._v(" "),a("div",{staticClass:"f14"},[t._v("添加视频")])])])],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:2==t.conType,expression:"conType==2"}],staticStyle:{width:"100%"}},[a("div",{staticClass:"box"},[a("div",{staticClass:"itemBox"},[t._m(0),t._v(" "),a("div",{staticClass:"conEle textInput"},[a("el-input",{attrs:{size:"mini",placeholder:"链接地址请以http或https开头",type:"textarea",rows:6},model:{value:t.linkUrl.link.url,callback:function(e){t.$set(t.linkUrl.link,"url",e)},expression:"linkUrl.link.url"}}),t._v(" "),a("i",{directives:[{name:"show",rawName:"v-show",value:t.linkUrl.link.url,expression:"linkUrl.link.url"}],staticClass:"clearButton el-input__icon el-icon-circle-close el-input__clear",on:{click:function(e){e.preventDefault(),t.linkUrl.link.url=""}}})],1)]),t._v(" "),a("div",{staticClass:"itemBox"},[t._m(1),t._v(" "),a("div",{staticClass:"conEle",staticStyle:{width:"62%"}},[a("div",{staticClass:"flex"},[a("el-input",{attrs:{size:"mini",placeholder:"请输入链接标题"},model:{value:t.linkUrl.link.title,callback:function(e){t.$set(t.linkUrl.link,"title",e)},expression:"linkUrl.link.title"}}),t._v(" "),a("span",{staticClass:"font_zj"},[t._v(t._s(t.$getStrBytes(t.linkUrl.link.title))+"/64字节")])],1),t._v(" "),t.$getStrBytes(t.linkUrl.link.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:"itemBox",staticStyle:{"align-items":"flex-start"}},[t._m(2),t._v(" "),a("div",{staticClass:"conEle friendCircleUploader"},[a("el-upload",{key:"coverUpload",staticClass:"imgUploader",attrs:{action:t.URL.BASEURL+t.URL.material_upload,data:t.imgFileData,"file-list":t.coverFileList,name:"material_file",accept:".jpg,.jpeg,.png","list-type":"picture-card",limit:1,"before-upload":t.beforeUploadUpload,"on-preview":t.handleSee,"on-remove":t.handleRemove,"on-success":t.uploadSuccess,"on-error":t.uploadFail,"on-exceed":t.handleExceed}},[a("div",[a("div",{staticClass:"el-icon-circle-plus f16"}),t._v(" "),a("div",{staticClass:"f14"},[t._v("添加封面")])])]),t._v(" "),a("div",{staticClass:"flex-align-center",staticStyle:{"margin-top":"10px"}},[a("el-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.onClickSelectMaterials("TWLJ")}}},[t._v("选择素材")]),t._v(" "),a("div",{staticClass:"uploadImgHint",staticStyle:{margin:"0"}},[t._v("可直接从素材库选择图片。")])],1),t._v(" "),a("el-dialog",{attrs:{"append-to-body":"",visible:t.coverVisible},on:{"update:visible":function(e){t.coverVisible=e}}},[a("img",{attrs:{width:"100%",src:t.dialogcoverUrl,alt:""}})])],1)])])]),t._v(" "),t.radar_attach&&t.radar_attach.length>0&&3==t.conType?a("div",{staticClass:"flex",staticStyle:{width:"100%"}},[a("div",{staticClass:"phoneLinkCon",staticStyle:{"align-items":"center"}},[t.radar_attach[0].radar.pic_url?a("img",{staticClass:"phoneLinkImg radarImg",attrs:{src:t.radar_attach[0].radar.pic_url,alt:""}}):a("div",{staticClass:"phoneLinkImgNo"},[a("i",{staticClass:"el-icon-link"})]),t._v(" "),a("div",[a("div",{staticClass:"phoneLinkTitle",staticStyle:{"font-size":"13px"}},[t._v(t._s(t.radar_attach[0].radar.name))]),t._v(" "),a("div",{staticClass:"phoneLinkDesc clampTwo",staticStyle:{"font-size":"11px"}},[t._v(t._s(t.radar_attach[0].radar.description))])])]),t._v(" "),a("i",{staticClass:"el-icon-edit-outline pointer",staticStyle:{"margin-left":"auto"},on:{click:t.radarShow}})]):t._e(),t._v(" "),a("radarEntrance",{ref:"radarEntranceRef",attrs:{ids_comeBack:t.radarIds},on:{getRadarAttach:function(e){t.radar_attach=e}}})],1),t._v(" "),a("div",{staticClass:"tips"},[0==t.conType?[t._v("因企业微信限制,图片长宽建议不超过1440x1080,大小不超过10M,最多9张图片")]:t._e(),t._v(" "),1==t.conType?[t._v("因企业微信限制,视频建议不超过1280X720,帧率30FPS,视频码率1.67Mbps,最长不超过30s,最大不超过10MB,最多1个视频")]:t._e()],2),t._v(" "),a("selectMaterials",{attrs:{selectVisible:t.selectMaterialsVisible},on:{cancel:function(e){t.selectMaterialsVisible=!1},selectObj:t.selectMaterialsConfirm}})],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"txt"},[e("em",[this._v("*")]),this._v("图文链接:")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"txt"},[e("em",{staticStyle:{opacity:"0"}},[this._v("*")]),this._v("链接标题:")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"txt"},[e("em",[this._v("*")]),this._v("链接封面:")])}]};var k=a("VU/8")(b,w,!1,function(t){a("jm62"),a("w87Y")},"data-v-49c72878",null).exports,L=a("erru"),S=a("xcuB"),I={name:"createFriendsCircle",components:{selfCustomerserviceFC:h,editCon:g.a,welcomEdit:v.a,enterpriseTag:f.a,datePicker:y.a,conTwo:k,selfChannel:L.a,customerServiceCorpV2:S.a},props:["title","rule_id","is_copy","sysMsgCorpid"],data:function(){return{loading:!1,user_id_list:[],fc_type:1,is_for_all:1,customer_filter:0,gender:3,customerMatchCountLoading:!1,isLookCount:!0,msg_count:"",afferent_tag_obj:{tag_id_list:[]},resetFlag:!1,send_type:1,processFlag:!1,send_time:{date:"",time:""},pickerOptions:{disabledDate:function(t){return t<Date.now()-864e5},shortcuts:[{text:"今天",onClick:function(t){t.$emit("pick",new Date)}},{text:"明天",onClick:function(t){var e=new Date;e.setTime(e.getTime()+864e5),t.$emit("pick",e)}},{text:"一周后",onClick:function(t){var e=new Date;e.setTime(e.getTime()+6048e5),t.$emit("pick",e)}}]},content1:"",con_type:0,themeName:"",tag_info:[],department_list:"",sender_list:"",sendStatus:1,partUser:"",partDepart:"",reBackData:{imageFileList:[],videoFileList:{url:"",media_id:""},linkUrl:{url:"",media_id:"",pic_url:"",title:""},coverFileList:[]},operate_type:1,is_operation:1,operator_group_id:"",afferent_multiple_senders:[],multiple_senders:[]}},computed:{isDisabled:function(){return!!this.sysMsgCorpid}},created:function(){this.loading=!1,this.rule_id&&this.editInfo_reback()},methods:{editInfo_reback:function(){var t=this;this.loading=!0;var e={rule_id:this.rule_id};this.sysMsgCorpid&&(e.corpid=this.sysMsgCorpid),this.$axios.get(this.URL.BASEURL+this.URL.FriendsCircleDetial,{params:e}).then(function(e){if(t.loading=!1,(e=e.data)&&0==e.errno){var a=e.rst;if(t.operate_type=e.rst.operate_type?e.rst.operate_type:1,t.is_operation=e.rst.is_operation||0===e.rst.is_operation?e.rst.is_operation:1,t.operator_group_id=e.rst.operator_group_id?e.rst.operator_group_id:"",2==t.operate_type&&0==t.is_operation&&Array.isArray(JSON.parse(e.rst.multiple_senders))){var s=JSON.parse(e.rst.multiple_senders);t.multiple_senders=[].concat(u()(s));var i=[];s.forEach(function(t){t&&t.user_list&&Array.isArray(t.user_list)&&t.user_list.forEach(function(e){i.push({user_id:e,corpid:t.corpid})})}),t.afferent_multiple_senders=[].concat(i)}a.attachments=JSON.parse(a.attachments),t.sendStatus=a.status,t.fc_type=a.filter_type,t.themeName=a.name,t.customer_filter=1==t.operate_type?a.customer_filter:0,t.content1=a.content,t.send_type=2,t.send_time.date=a.send_time.split(" ")[0],t.send_time.time=a.send_time.split(" ")[1],a.attachments&&a.attachments.length>0&&("image"==a.attachments[0].msgtype?(t.con_type=0,a.attachments.forEach(function(e){t.$nextTick(function(){t.reBackData.imageFileList.push({media_id:e.image.media_id,url:e.image.pic_url})})})):"video"==a.attachments[0].msgtype?(t.con_type=1,t.$nextTick(function(){a.attachments.forEach(function(e){t.reBackData.videoFileList.media_id=e.video.media_id,t.reBackData.videoFileList.url=e.video.pic_url})})):"link"==a.attachments[0].msgtype?(t.con_type=2,t.$nextTick(function(){t.reBackData.linkUrl.title=a.attachments[0].link.title,t.reBackData.linkUrl.url=a.attachments[0].link.url,t.reBackData.linkUrl.media_id=a.attachments[0].link.media_id,t.reBackData.linkUrl.pic_url=a.attachments[0].link.pic_url,t.reBackData.coverFileList.push({media_id:a.attachments[0].link.media_id,url:a.attachments[0].link.pic_url})})):"radar"==a.attachments[0].msgtype&&(t.con_type=3,t.$nextTick(function(){t.$refs.conTwo.radar_attach=a.attachments}))),1==t.operate_type&&(a.sender_list||a.department_list?(t.is_for_all=0,t.sender_list=a.sender_list,t.department_list=a.department_list,t.partUser=a.sender_list,t.partDepart=a.department_list):t.is_for_all=1,a.customer_tag_list?a.customer_tag_list.indexOf(",")>-1?(t.afferent_tag_obj.tag_id_list=a.customer_tag_list.split(","),t.tag_info=a.customer_tag_list.split(",")):(t.afferent_tag_obj.tag_id_list.push(a.customer_tag_list),t.tag_info.push(a.customer_tag_list)):(t.afferent_tag_obj.tag_id_list=[],t.tag_info=[])),t.is_copy&&(t.send_type=2,t.send_time={date:"",time:""})}else 4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})},getAttachments:function(){var t=this;this.$nextTick(function(){var e="created";t.rule_id&&(e="edit"),t.$refs.conTwo.getFinallyAttach(e)})},createFriendsCircleSend:function(t){var e=this;return _()(r.a.mark(function a(){var s,i,n;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(""!=e.fc_type){a.next=3;break}return e.$message({message:"请选择朋友圈类型!",type:"warning"}),a.abrupt("return");case 3:if(""!=e.themeName){a.next=6;break}return e.$message({message:"请输入朋友圈主题!",type:"warning"}),a.abrupt("return");case 6:if(1!=e.operate_type){a.next=14;break}if(0!=e.is_for_all||""!=e.department_list||""!=e.sender_list){a.next=10;break}return e.$message({message:"请选择成员!",type:"warning"}),a.abrupt("return");case 10:if(1!=e.customer_filter){a.next=14;break}if(e.tag_info&&(!e.tag_info||0!=e.tag_info.length)){a.next=14;break}return e.$message({message:"请选择客户!",type:"warning"}),a.abrupt("return");case 14:if(2!=e.operate_type){a.next=21;break}if(1!=e.is_operation||e.operator_group_id){a.next=18;break}return e.$message.warning("请选择运营组"),a.abrupt("return");case 18:if(0!=e.is_operation||e.multiple_senders&&e.multiple_senders.length){a.next=21;break}return e.$message.warning("请选择成员"),a.abrupt("return");case 21:if(""!=e.content1){a.next=59;break}if(!(t&&0==t.length||"[]"==t)){a.next=25;break}return e.$message({message:"消息内容1与消息内容2不能同时为空!",type:"warning"}),a.abrupt("return");case 25:if("image"!=(s=t[0].msgtype)){a.next=34;break}if(i=!0,t.forEach(function(t){""==t.image.media_id&&(i=!1)}),i){a.next=32;break}return e.$message({message:"图片为必传内容!",type:"warning"}),a.abrupt("return");case 32:a.next=59;break;case 34:if("video"!=s){a.next=40;break}if(""!=t[0].video.media_id){a.next=38;break}return e.$message({message:"视频为必传内容!",type:"warning"}),a.abrupt("return");case 38:a.next=59;break;case 40:if("link"!=s){a.next=51;break}if(""!=t[0].link.media_id&&""!=t[0].link.url){a.next=44;break}return e.$message({message:"链接为必传内容!",type:"warning"}),a.abrupt("return");case 44:return a.next=46,e.handleConfirmLink(t[0].link.url);case 46:if(a.sent){a.next=49;break}return a.abrupt("return");case 49:a.next=59;break;case 51:if("radar"!=s){a.next=57;break}if(""!=t[0].radar.radar_id){a.next=55;break}return e.$message({message:"雷达id错误!",type:"warning"}),a.abrupt("return");case 55:a.next=59;break;case 57:return e.$message({message:"attachments错误,请找开发人员!",type:"warning"}),a.abrupt("return");case 59:if(""!=e.send_type){a.next=62;break}return e.$message({message:"请选择发布方式!",type:"warning"}),a.abrupt("return");case 62:if(n="",1!=e.send_type){a.next=67;break}n=e.$getDay(0,!0).now,a.next=74;break;case 67:if(""!=e.send_time.date){a.next=70;break}return e.$message({message:"请选择定时发送的日期!",type:"warning"}),a.abrupt("return");case 70:if(""!=e.send_time.time){a.next=73;break}return e.$message({message:"请选择定时发送的时间!",type:"warning"}),a.abrupt("return");case 73:n=e.send_time.date+" "+e.send_time.time;case 74:e.$loading(e.$loadingConfig),e.$axios.post(e.URL.BASEURL+e.URL.createFriendsCircleSend,{rule_id:e.is_copy?"":e.rule_id?e.rule_id:"",name:e.themeName,filter_type:e.fc_type,send_type:e.send_type,send_time:n,sender_list:1==e.operate_type?e.sender_list:"",department_list:1==e.operate_type?e.department_list:"",customer_filter:1==e.operate_type?e.customer_filter:0,customer_tag_list:1==e.operate_type&&e.tag_info&&e.tag_info.length>0?e.tag_info.join(","):"",content:e.content1,attachments:t?o()(t):"",operate_type:e.operate_type,is_operation:1==e.operate_type?0:e.is_operation,operator_group_id:2==e.operate_type&&1==e.is_operation?e.operator_group_id:"",multiple_senders:2==e.operate_type&&0==e.is_operation&&e.multiple_senders.length?o()(e.multiple_senders):""}).then(function(t){t=t.data;e.$loading(e.$loadingConfig).close(),t&&0==t.errno?(e.is_copy||!e.rule_id?e.$emit("close","update_new"):e.$emit("close","update"),e.$message({message:t.err,type:"success"})):4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(t){e.$loading(e.$loadingConfig).close()});case 76:case"end":return a.stop()}},a,e)}))()},changeEvent:function(){this.isLookCount=!0},tagDefine:function(t){this.isLookCount=!0,t.tag_id_list&&0!=t.tag_id_list.length?this.tag_info=t.tag_id_list:this.tag_info=[]},massMsg_customerMatchCount:function(){var t=this;if(!this.customerMatchCountLoading){this.customerMatchCountLoading=!0;var e={filter_type:this.fc_type,sender_list:this.sender_list,department_list:this.department_list,customer_filter:this.customer_filter,customer_tag_list:this.tag_info&&this.tag_info.length>0?this.tag_info.join(","):""};this.$axios.get(this.URL.BASEURL+this.URL.getcustomerMatchCount,{params:e}).then(function(e){e=e.data;t.customerMatchCountLoading=!1,t.isLookCount=!1,e&&0==e.errno?t.msg_count=e.rst.total:4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.customerMatchCountLoading=!1})}},handleConfirmLink:function(t){var e,a=this;return new i.a((e=_()(r.a.mark(function e(s,i){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.split("?").length>2)){e.next=13;break}return e.prev=2,e.next=5,a.$confirm("请确认链接地址:"+t,"提示",{closeOnClickModal:!1,type:"warning",showCancelButton:!0,confirmButtonText:"确认无误",cancelButtonText:"去修改"});case 5:s(!0),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),s(!1);case 11:e.next=14;break;case 13:s(!0);case 14:case"end":return e.stop()}},e,a,[[2,8]])})),function(t,a){return e.apply(this,arguments)}))},onChangeOperatorGroupId:function(t){this.operator_group_id=t,this.changeEvent()},onChangeMultiCorpUsers:function(t){var e=t.res_format_2;e&&e.length?this.multiple_senders=e.map(function(t){return{corpid:t.corpid,user_list:t.user_list.map(function(t){return t.user_id})}}):this.multiple_senders=[],this.changeEvent()}}},$={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"createMassMsg"},[s("div",{staticClass:"self_drawer_title"},[s("div",{staticClass:"flex"},[t._v("\n "+t._s(t.title)+"\n ")]),t._v(" "),s("div",{staticClass:"flex-align-center"},[s("i",{staticClass:"el-icon-close pointer",on:{click:function(e){return t.$emit("close")}}})])]),t._v(" "),t.loading?t._e():s("div",{staticClass:"bg-ffffff",staticStyle:{padding:"15px 30px"}},[s("h3",{staticClass:"bigTitle"},[t._v("\n 朋友圈类型\n "),t.rule_id&&!t.is_copy?[-1==t.sendStatus?s("span",{staticClass:"detail_status c-666 status_fail"},[t._v("发送失败")]):1==t.sendStatus?s("span",{staticClass:"detail_status c-FFB055 status_wait"},[t._v("待发送")]):2==t.sendStatus?s("span",{staticClass:"detail_status c-448AFF status_ing"},[t._v("正在发送中")]):3==t.sendStatus?s("span",{staticClass:"detail_status c-F03F5C status_del"},[t._v("待客服确认")]):4==t.sendStatus?s("span",{staticClass:"detail_status c-58BCA6 status_success"},[t._v("发送完成")]):s("span",[t._v("-")])]:t._e()],2),t._v(" "),s("div",{staticClass:"self-hint",staticStyle:{"margin-top":"10px",width:"730px"}},[s("i",{staticClass:"el-icon-message-solid"}),t._v(" "),1==t.fc_type?s("div",[t._v("管理员可创建客户朋友圈发表任务,成员确认内容后即可发布到朋友圈中,每位客户的朋友圈每个月最多展示4条企业发表的内容电脑上暂不支持发送企微朋友圈。 ")]):t._e(),t._v(" "),2==t.fc_type?s("div",[t._v("管理员可创建客户朋友圈发表任务,成员确认内容后即可发布到朋友圈中,每位客户的朋友圈每天最多展示3条个人发表的内容。电脑上暂不支持发送企微朋友圈。 ")]):t._e()]),t._v(" "),s("div",{staticClass:"regulations"},[t._m(0),t._v(" "),s("div",[s("div",{staticStyle:{display:"flex"}},[s("el-radio",{attrs:{label:1,disabled:t.isDisabled},model:{value:t.fc_type,callback:function(e){t.fc_type=e},expression:"fc_type"}},[t._v("企业发表")]),t._v(" "),s("el-radio",{attrs:{label:2,disabled:t.isDisabled},model:{value:t.fc_type,callback:function(e){t.fc_type=e},expression:"fc_type"}},[t._v("个人发表")])],1)])]),t._v(" "),s("div",{staticClass:"line",staticStyle:{"margin-top":"20px"}}),t._v(" "),s("h3",{staticClass:"bigTitle"},[t._v("编辑朋友圈")]),t._v(" "),s("div",{staticClass:"regulations"},[t._m(1),t._v(" "),s("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"例:活动推送/拉新等",clearable:"",size:"small",disabled:t.isDisabled},model:{value:t.themeName,callback:function(e){t.themeName="string"==typeof e?e.trim():e},expression:"themeName"}}),t._v(" "),s("p",{staticStyle:{"font-size":"13px","line-height":"30px",color:"#f9a527","margin-left":"10px"}},[t._v("*仅作为企业内部人员记录朋友圈摘要,不会推送给客户")])],1),t._v(" "),s("div",{staticClass:"regulations"},[t._m(2),t._v(" "),s("div",{staticStyle:{display:"flex"}},[s("el-radio",{attrs:{label:1,disabled:t.isDisabled},on:{input:t.changeEvent},model:{value:t.operate_type,callback:function(e){t.operate_type=e},expression:"operate_type"}},[t._v("单个企微主体")]),t._v(" "),s("el-radio",{attrs:{label:2,disabled:t.isDisabled},on:{input:t.changeEvent},model:{value:t.operate_type,callback:function(e){t.operate_type=e},expression:"operate_type"}},[t._v("多个企微主体")])],1)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.operate_type,expression:"operate_type == 1"}],staticClass:"regulations"},[t._m(3),t._v(" "),s("div",[s("div",{staticStyle:{display:"flex"}},[s("el-radio",{attrs:{label:1,disabled:t.isDisabled},on:{change:t.changeEvent},model:{value:t.is_for_all,callback:function(e){t.is_for_all=e},expression:"is_for_all"}},[t._v("全部员工")]),t._v(" "),s("el-radio",{attrs:{label:0,disabled:t.isDisabled},on:{change:t.changeEvent},model:{value:t.is_for_all,callback:function(e){t.is_for_all=e},expression:"is_for_all"}},[t._v("部分员工")])],1),t._v(" "),0==t.is_for_all?s("self-customerservice-f-c",{staticStyle:{"margin-top":"10px",width:"300px"},attrs:{partDepart:t.partDepart,partUser:t.partUser},on:{getSenderList:function(e){t.sender_list=e,t.isLookCount=!0},getDepartList:function(e){t.department_list=e,t.isLookCount=!0}}}):t._e()],1)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:2==t.operate_type,expression:"operate_type == 2"}],staticClass:"regulations"},[t._m(4),t._v(" "),s("div",[s("div",{staticStyle:{display:"flex"}},[s("el-radio",{attrs:{label:1,disabled:t.isDisabled},on:{input:t.changeEvent},model:{value:t.is_operation,callback:function(e){t.is_operation=e},expression:"is_operation"}},[t._v("运营组")]),t._v(" "),s("el-radio",{attrs:{label:0,disabled:t.isDisabled},on:{input:t.changeEvent},model:{value:t.is_operation,callback:function(e){t.is_operation=e},expression:"is_operation"}},[t._v("选择成员")])],1),t._v(" "),s("selfChannel",{directives:[{name:"show",rawName:"v-show",value:1==t.is_operation,expression:"is_operation == 1"}],ref:"operatorIdEl",attrs:{afferent_value:t.operator_group_id,title:"",type:"operatorGroup",width:"300px",disabled:t.isDisabled},on:{channelDefine:t.onChangeOperatorGroupId}}),t._v(" "),s("customerServiceCorpV2",{directives:[{name:"show",rawName:"v-show",value:0==t.is_operation,expression:"is_operation == 0"}],attrs:{title:"",width:"300px",afferent_users:t.afferent_multiple_senders,disabled:t.isDisabled},on:{customerDefine:t.onChangeMultiCorpUsers}})],1)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.operate_type,expression:"operate_type == 1"}],staticClass:"regulations"},[t._m(5),t._v(" "),s("div",[s("div",[s("el-radio",{attrs:{label:0,disabled:t.isDisabled},on:{change:t.changeEvent},model:{value:t.customer_filter,callback:function(e){t.customer_filter=e},expression:"customer_filter"}},[t._v("全部客户")]),t._v(" "),s("el-radio",{attrs:{label:1,disabled:t.isDisabled},on:{change:t.changeEvent},model:{value:t.customer_filter,callback:function(e){t.customer_filter=e},expression:"customer_filter"}},[t._v("筛选客户")])],1),t._v(" "),1==t.customer_filter?s("div",{},[s("enterprise-tag",{staticStyle:{margin:"0","margin-top":"10px"},attrs:{title:"",width:"300px",afferent_obj:t.afferent_tag_obj,reset:t.resetFlag,disabled:t.isDisabled},on:{tagDefine:t.tagDefine}})],1):t._e(),t._v(" "),s("div",{staticClass:"customer_all"},[t._v("将群发消息给"+t._s(0==t.customer_filter?"全部客户的":1==t.customer_filter?"筛选客户的":"")+"\n "),t.isLookCount?s("span",{staticClass:"pointer",on:{click:t.massMsg_customerMatchCount}},[t.customerMatchCountLoading?s("i",{staticClass:"el-icon-loading"}):t._e(),t._v("\n "+t._s(t.customerMatchCountLoading?"":"查看")+"\n ")]):s("span",[t._v(t._s(t.msg_count))]),t._v("\n 个客户\n ")])])]),t._v(" "),s("div",{staticClass:"regulations"},[s("label",[t._v("消息内容1")]),t._v(" "),s("div",{staticStyle:{flex:"1"}},[s("div",{staticStyle:{position:"relative"}},[s("el-input",{staticClass:"contentOne",staticStyle:{width:"56%"},attrs:{type:"textarea",rows:"6",autocomplete:"off",placeholder:"请输入消息内容",clearable:"",disabled:t.isDisabled},model:{value:t.content1,callback:function(e){t.content1=e},expression:"content1"}}),t._v(" "),s("span",{staticClass:"f_zj"},[t._v(t._s(t.$getStrBytes(t.content1))+"/2000字节")])],1),t._v(" "),t.$getStrBytes(t.content1)>2e3?s("div",{staticClass:"warning_hint_fc f12",staticStyle:{"margin-left":"0"}},[s("i",{staticClass:"el-icon-warning-outline"}),t._v(" 消息内容1,最多2000个字节,已超出!")]):t._e()])]),t._v(" "),s("div",{staticClass:"regulations"},[s("label",[t._v("消息内容2")]),t._v(" "),s("div",{staticStyle:{flex:"1"}},[s("div",{staticStyle:{display:"flex"}},[s("el-radio",{staticStyle:{width:"60px"},attrs:{label:0,disabled:t.isDisabled},model:{value:t.con_type,callback:function(e){t.con_type=e},expression:"con_type"}},[t._v("图片")]),t._v(" "),s("el-radio",{staticStyle:{width:"60px"},attrs:{label:1,disabled:t.isDisabled},model:{value:t.con_type,callback:function(e){t.con_type=e},expression:"con_type"}},[t._v("视频")]),t._v(" "),s("el-radio",{attrs:{label:2,disabled:t.isDisabled},model:{value:t.con_type,callback:function(e){t.con_type=e},expression:"con_type"}},[t._v("图文链接")]),t._v(" "),s("div",{on:{click:function(e){return t.$refs.conTwo.radarShow()}}},[s("el-radio",{attrs:{label:3,disabled:t.isDisabled},model:{value:t.con_type,callback:function(e){t.con_type=e},expression:"con_type"}},[t._v("智能雷达")])],1)],1),t._v(" "),s("conTwo",{ref:"conTwo",attrs:{conType:t.con_type,reBackData:t.reBackData,disabled:t.isDisabled}})],1)]),t._v(" "),s("div",{staticClass:"line",staticStyle:{"margin-top":"20px"}}),t._v(" "),s("h3",{staticClass:"bigTitle",staticStyle:{"margin-top":"20px"}},[t._v("高级设置: ")]),t._v(" "),s("div",{staticClass:"regulations"},[t._m(6),t._v(" "),s("div",[s("div",{staticStyle:{display:"flex"}},[s("el-radio",{attrs:{label:1,disabled:t.isDisabled},model:{value:t.send_type,callback:function(e){t.send_type=e},expression:"send_type"}},[t._v("立即发送")]),t._v(" "),s("el-radio",{attrs:{label:2,disabled:t.isDisabled},model:{value:t.send_type,callback:function(e){t.send_type=e},expression:"send_type"}},[t._v("定时发送")])],1),t._v(" "),2==t.send_type?s("div",{staticStyle:{"margin-top":"15px"}},[s("el-date-picker",{staticStyle:{width:"160px"},attrs:{"picker-options":t.pickerOptions,size:"small","value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期",disabled:t.isDisabled},model:{value:t.send_time.date,callback:function(e){t.$set(t.send_time,"date",e)},expression:"send_time.date"}}),t._v(" "),s("el-time-picker",{staticStyle:{width:"130px"},attrs:{size:"small",format:"HH:mm","value-format":"HH:mm:ss",placeholder:"请输入时间",disabled:t.isDisabled},model:{value:t.send_time.time,callback:function(e){t.$set(t.send_time,"time",e)},expression:"send_time.time"}})],1):t._e()])]),t._v(" "),s("div",{staticClass:"regulations regulations2"},[s("label"),t._v(" "),s("div",{staticClass:"operationProcess"},[s("div",{staticClass:"process-title"},[s("h3",[t._v("企业发表朋友圈的操作流程")]),t._v(" "),s("div",{staticClass:"zhankai",on:{click:function(e){t.processFlag=!t.processFlag}}},[t._v("展开 "),s("i",{class:["el-icon-arrow-down",t.processFlag?"reversalAnimation":""]})])]),t._v(" "),s("p",{staticClass:"process-hint"},[t._v("1、创建完朋友圈后,员工将在企业微信上收到【客户朋友圈】新消息通知")]),t._v(" "),s("p",{staticClass:"process-hint"},[t._v("2、员工点击【客户朋友圈】,点击待发送的朋友圈,可一键将朋友圈内容发表")]),t._v(" "),t.processFlag?s("img",{staticClass:"img",attrs:{src:a("xA3B"),alt:""}}):t._e()])]),t._v(" "),t.isDisabled?t._e():s("div",{staticClass:"flex-align-center lMar100 tMar20"},[s("button",{staticClass:"button",on:{click:t.getAttachments}},[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",[e("em",[this._v("*")]),this._v("朋友圈主题")])},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",[e("em",[this._v("*")]),this._v("发表成员:")])},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",[e("em",[this._v("*")]),this._v("选择客户")])},function(){var t=this.$createElement,e=this._self._c||t;return e("label",[e("em",[this._v("*")]),this._v("发布方式:")])}]};var U=a("VU/8")(I,$,!1,function(t){a("hmBP"),a("SkW7")},"data-v-9c01d754",null);e.a=U.exports},Z53l:function(t,e){},c7xQ:function(t,e,a){"use strict";var s=a("//Fk"),i=a.n(s),n=a("Xxa5"),r=a.n(n),l=a("exGp"),o=a.n(l),c=a("bEx1"),_={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:"modular"},[a("div",{staticClass:"big_title flex-align-center"},[t._v("数据统计 ")]),t._v(" "),a("div",{staticClass:"flex"},[a("div",{staticClass:"member_total"},[a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v(t._s(t.dataInfo.executed_sender_count||0==t.dataInfo.executed_sender_count?t.$formatNum(t.dataInfo.executed_sender_count):"-")),a("span",[t._v("人")])]),t._v(" "),a("div",{staticClass:"txt"},[t._v("已发送成员")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v(t._s(t.dataInfo.receive_customer_count||0==t.dataInfo.receive_customer_count?t.$formatNum(t.dataInfo.receive_customer_count):"-")),a("span",[t._v("人")])]),t._v(" "),a("div",{staticClass:"txt"},[t._v("送达用户")])])]),t._v(" "),a("div",{staticClass:"member_total"},[a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v(t._s(t.dataInfo.un_execute_sender_count||0==t.dataInfo.un_execute_sender_count?t.$formatNum(t.dataInfo.un_execute_sender_count):"-")),a("span",[t._v("人")])]),t._v(" "),a("div",{staticClass:"txt"},[t._v("未发送成员")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v(t._s(t.dataInfo.un_receive_customer_count||0==t.dataInfo.un_receive_customer_count?t.$formatNum(t.dataInfo.un_receive_customer_count):"-")),a("span",[t._v("人")])]),t._v(" "),a("div",{staticClass:"txt"},[t._v("未送达客户")])])]),t._v(" "),a("div",{staticClass:"member_total"},[a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v(t._s(t.dataInfo.receive_fail_with_limit||0==t.dataInfo.receive_fail_with_limit?t.$formatNum(t.dataInfo.receive_fail_with_limit):"-")),a("span",[t._v("人")])]),t._v(" "),a("div",{staticClass:"txt flex-align-jus-center"},[t._v("客户接收已达上限")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v(t._s(t.dataInfo.receive_fail_with_not_friend||0==t.dataInfo.receive_fail_with_not_friend?t.$formatNum(t.dataInfo.receive_fail_with_not_friend):"-")),a("span",[t._v("人")])]),t._v(" "),a("div",{staticClass:"txt"},[t._v("因不是好友发送失败")])])])])])},staticRenderFns:[]};var d=a("VU/8")({props:["rule_id"],data:function(){return{loading:!1,dataInfo:{}}},created:function(){this.data_overview()},methods:{data_overview:function(){var t=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.massMsg_data_overview,{params:{rule_id:this.rule_id}}).then(function(e){e=e.data,t.loading=!1,e&&0==e.errno?t.dataInfo=e.rst:4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})}}},_,!1,function(t){a("jPCu")},"data-v-08da5296",null).exports,u=a("d7EF"),p=a.n(u),m=a("McOJ"),h={components:{noData:a("YLOf").a,selfInput:m.a},props:["rule_id","operate_type"],data:function(){return{memberType:"all",memberTypeList:[{id:"all",name:"全部成员"},{id:"sent",name:"已发送成员"},{id:"unsent",name:"未发送成员"},{id:"fail",name:"发送失败"}],massType:0,massTypeList:[{id:0,name:"全部"},{id:1,name:"已送达"},{id:2,name:"未送达"},{id:3,name:"接收已达上限"},{id:4,name:"已不是好友"}],input_keyword:"",loading:!1,page:1,page_size:20,total:0,pages:0,senderList:[],massSendCustList:[],cy_page:1,cy_total:0,cy_pages:0,cy_loading:!1,input_mass_keyword:"",allMemberOptions:[],user_id:"",sender_corpid:"",multiCorpUserInfo:"",exportHref:"",corpid:"",exportHref_send:""}},created:function(){sessionStorage.getItem("company_session_defaultCorp")&&"undefined"!=sessionStorage.getItem("company_session_defaultCorp")?this.corpid=JSON.parse(sessionStorage.getItem("company_session_defaultCorp")).corpid:this.corpid=this.$localSelfStore.getLocal("defaultCorp")&&"undefined"!=this.$localSelfStore.getLocal("defaultCorp")?JSON.parse(this.$localSelfStore.getLocal("defaultCorp")).corpid:"",this.sender_list_change(),this.get_allMemberOptions(),this.sendCustList_change()},methods:{onChangeMassKeyword:function(t){this.input_mass_keyword=t||"",this.sendCustList_change()},onChangeMultiCorpUser:function(t){if(t){var e=t.split("&&&"),a=p()(e,2),s=a[0],i=a[1];this.user_id=s||"",this.sender_corpid=i||""}else this.user_id="",this.sender_corpid="";this.sendCustList_change()},sender_list_change:function(){this.exportHref=this.URL.BASEURL+this.URL.sender_list_export+"?admin_id="+this.$cookie.getCookie("admin_id")+"&ttl="+Number(this.$cookie.getCookie("ttl"))+"&sign="+this.$cookie.getCookie("sign")+"&corpid="+this.corpid+"&rule_id="+this.rule_id+"&type="+this.memberType+"&keyword="+this.input_keyword,this.get_sender_list(1)},sendCustList_change:function(){this.exportHref_send=this.URL.BASEURL+this.URL.massSendCustList_export+"?admin_id="+this.$cookie.getCookie("admin_id")+"&ttl="+Number(this.$cookie.getCookie("ttl"))+"&sign="+this.$cookie.getCookie("sign")+"&corpid="+this.corpid+"&rule_id="+this.rule_id+"&type="+this.massType+"&name="+this.input_mass_keyword+"&sender="+this.user_id,2==this.operate_type&&(this.exportHref_send=this.exportHref_send+"&sender_corpid="+(this.sender_corpid||"")),this.get_mass_SendCustList(1)},get_allMemberOptions:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.massMsg_data_sender_list,{params:{rule_id:this.rule_id,page:1,page_size:500,type:"all"}}).then(function(e){(e=e.data)&&0==e.errno?t.allMemberOptions=e.rst.data:4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(t){})},get_sender_list:function(t){var e=this;this.page=t||this.page,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.massMsg_data_sender_list,{params:{rule_id:this.rule_id,page:this.page,page_size:this.page_size,type:this.memberType,keyword:this.input_keyword}}).then(function(t){t=t.data;e.loading=!1,t&&0==t.errno?(e.senderList=t.rst.data,"all"==e.memberType&&e.allMemberOptions,e.total=t.rst.pageInfo.total,e.pages=t.rst.pageInfo.pages,document.getElementsByClassName("senderSccrollBox")[0].scrollTop=0):4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(t){e.loading=!1})},handleCurrentChange:function(t){this.get_sender_list(t)},get_mass_SendCustList:function(t){var e=this;this.cy_page=t||this.cy_page,this.cy_loading=!0;var a={rule_id:this.rule_id,page:this.cy_page,page_size:this.page_size,type:this.massType,name:this.input_mass_keyword,sender:this.user_id};2==this.operate_type&&(a.sender_corpid=this.sender_corpid||""),this.$axios.get(this.URL.BASEURL+this.URL.massMsg_massSendCustList,{params:a}).then(function(t){t=t.data;e.cy_loading=!1,t&&0==t.errno?(e.massSendCustList=t.rst.data,e.cy_total=t.rst.pageInfo.total,e.cy_pages=t.rst.pageInfo.pages,document.getElementsByClassName("massSendScroll")[0].scrollTop=0):4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(t){e.cy_loading=!1})},cy_handleCurrentChange:function(t){this.get_mass_SendCustList(t)}}},g={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"modular"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"modularItem"},[a("div",{staticClass:"flex"},[a("div",{staticClass:"big_title flex-align-center"},[t._v("成员详情")]),t._v(" "),a("a",{staticClass:"selfBtn_detial",attrs:{href:t.exportHref}},[t._v("导出")])]),t._v(" "),a("div",{staticClass:"tabBox"},t._l(t.memberTypeList,function(e){return a("div",{key:e.id+"memberTypeList",class:["tabItem",t.memberType==e.id?"active":""],on:{click:function(a){t.memberType=e.id,t.sender_list_change()}}},[t._v(t._s(e.name))])}),0),t._v(" "),a("div",{staticClass:"flex"},[a("div",{staticClass:"totalCustom"},[a("i",{staticClass:"el-icon-user-solid"}),t._v(" 共"),a("span",[t._v(t._s(t.total))]),t._v("人")]),t._v(" "),a("self-input",{attrs:{label_name:"成员昵称",hasLabel:!1},on:{inputChange:function(e){t.input_keyword=e,t.sender_list_change()}}})],1),t._v(" "),a("div",{staticClass:"userListBox self-scrollbar-3 senderSccrollBox"},[t._l(t.senderList,function(e,s){return a("div",{key:e.corpid+e.user_id+"sender"+s,staticClass:"userItem"},[a("div",{staticClass:"time"},[t._v("群发时间:"+t._s(e.send_time?e.send_time:"-"))]),t._v(" "),a("div",{staticClass:"userBox"},[a("img",{staticClass:"userImg",attrs:{src:e.avatar,alt:""}}),t._v(" "),a("div",[a("div",{staticClass:"userName"},[t._v(t._s(e.name))]),t._v(" "),2==t.operate_type?a("div",{staticClass:"corpName"},[t._v(t._s(e.corp_name))]):t._e(),t._v(" "),a("div",{staticClass:"other"},[t._v("共"+t._s(t.$formatNum(e.customer_num))+"个好友,已发送"+t._s(t.$formatNum(e.send_success))+"人")])])])])}),t._v(" "),t.senderList&&t.senderList.length<=0&&!t.loading?a("noData"):t._e()],2),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.total>t.page_size,expression:"total>page_size"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1)]),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.cy_loading,expression:"cy_loading"}],staticClass:"modularItem"},[a("div",{staticClass:"flex"},[a("div",{staticClass:"big_title flex-align-center"},[t._v("客户详情")]),t._v(" "),a("div",{staticClass:"flex-align-center"},[1==t.operate_type?[a("el-select",{attrs:{size:"mini",clearable:"",placeholder:"请选择客服"},on:{change:function(e){return t.sendCustList_change()}},model:{value:t.user_id,callback:function(e){t.user_id=e},expression:"user_id"}},t._l(t.allMemberOptions,function(t){return a("el-option",{key:t.user_id,attrs:{label:t.name,value:t.user_id}})}),1)]:2==t.operate_type?[a("el-select",{attrs:{size:"mini",clearable:"",placeholder:"请选择客服",filterable:""},on:{change:t.onChangeMultiCorpUser},model:{value:t.multiCorpUserInfo,callback:function(e){t.multiCorpUserInfo=e},expression:"multiCorpUserInfo"}},t._l(t.allMemberOptions,function(t){return a("el-option",{key:t.user_id+t.corpid,attrs:{label:t.name+"("+t.corp_name+")",value:t.user_id+"&&&"+t.corpid}})}),1)]:t._e(),t._v(" "),a("a",{staticClass:"selfBtn_detial",staticStyle:{"margin-left":"20px"},attrs:{href:t.exportHref_send}},[t._v("导出")])],2)]),t._v(" "),a("div",{staticClass:"tabBox"},t._l(t.massTypeList,function(e){return a("div",{key:e.id+"massTypeList",class:["tabItem",t.massType==e.id?"active":""],on:{click:function(a){t.massType=e.id,t.sendCustList_change()}}},[t._v(t._s(e.name))])}),0),t._v(" "),a("div",{staticClass:"flex"},[a("div",{staticClass:"totalCustom"},[a("i",{staticClass:"el-icon-user-solid"}),t._v(" 共"),a("span",[t._v(t._s(t.$formatNum(t.cy_total)))]),t._v("人")]),t._v(" "),a("self-input",{attrs:{label_name:"客户昵称",hasLabel:!1},on:{inputChange:t.onChangeMassKeyword}})],1),t._v(" "),a("div",{staticClass:"userListBox self-scrollbar-3 massSendScroll"},[t._l(t.massSendCustList,function(e,s){return a("div",{key:s+"massSend",staticClass:"userItem massList"},[a("div",{staticClass:"userBox"},[a("img",{staticClass:"userImg",attrs:{src:e.external_avatar,alt:""}}),t._v(" "),a("div",[a("div",{staticClass:"userName"},[t._v(t._s(e.external_username))]),t._v(" "),a("div",{class:["statusBox",1!=e.status?"statusBox2":""]},[t._v(t._s(0==e.status?"未发送":1==e.status?"已发送":2==e.status?"已不是好友":3==e.status?"接收已达上限":e.status_description))])])]),t._v(" "),a("div",{staticClass:"userRight"},[t._v("通过 "+t._s(e.sender_name)),2==t.operate_type&&e.corp_name?a("span",{staticStyle:{"font-size":"12px"}},[t._v("("+t._s(e.corp_name)+")")]):t._e(),t._v(" 发送")])])}),t._v(" "),t.massSendCustList&&t.massSendCustList.length<=0&&!t.cy_loading?a("noData"):t._e()],2),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.cy_total>t.page_size,expression:"cy_total>page_size"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.cy_page,layout:"prev, pager, next","page-count":Number(t.cy_pages)},on:{"current-change":t.cy_handleCurrentChange}})],1)])])},staticRenderFns:[]};var v=a("VU/8")(h,g,!1,function(t){a("Z53l")},"data-v-1f871fd3",null).exports,f={0:"未知性别",1:"男性",2:"女性"},y={24:"24小时",168:"7天",360:"15天"},C={0:"未设置标签筛选",1:"以下标签满足其中之一",2:"以下标签同时满足",3:"无任何标签"},x={components:{phonePreview:c.a,dataTranslate:d,userDetail:v},props:["title","rule_id","sysMsgCorpid"],data:function(){return{loading:!1,dataInfo:{},attachments:[],gender:"",pay:"",tagInfo:{},addTime:"",add_days_later:""}},created:function(){this.detail()},methods:{detail:function(){var t=this;this.loading=!0;var e,a={rule_id:this.rule_id};this.sysMsgCorpid&&(a.corpid=this.sysMsgCorpid),this.$axios.get(this.URL.BASEURL+this.URL.massMsg_detail,{params:a}).then((e=o()(r.a.mark(function e(a){var s,i,n,l,o,c,_,d,u,p,m,h,g;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=a.data,t.loading=!1,!a||0!=a.errno){e.next=16;break}if(t.dataInfo=a.rst,t.attachments=a.rst.attachments&&""!=a.rst.attachments?JSON.parse(a.rst.attachments):[],1!=a.rst.customer_filter){e.next=14;break}return s=a.rst,i=s.gender,n=s.pay_status,l=s.pay_num_min,o=s.pay_num_max,c=s.is_customize_time,_=s.timeline,d=s.add_time_start,u=s.add_time_end,p=s.add_days_later,m=s.tag_screen_type,h=s.tag_list,g=s.exclude_tag_list,i&&(t.gender=i.split(",").map(function(t){return f[t]}).join("、")),t.pay=n||"0"===n||0===n?0==n?"未付费":l||o?l||""==o?""==l||o?"已付费("+l+" ~ "+o+"次)":"已付费("+l+"次)以上":"已付费("+o+"次)以下":"已付费":"",t.addTime=1==c?d&&u?"自定义("+d+"~"+u+")":"":y[_]||"",(p||0===p)&&(t.add_days_later="添加客服"+p+"天后"),e.next=13,t.handleGetTagInfo({tag_screen_type:m,tag_list:h,exclude_tag_list:g});case 13:t.tagInfo=e.sent;case 14:e.next=17;break;case 16:4002!=a.errno&&t.$message({message:a.err,type:"warning"});case 17:case"end":return e.stop()}},e,t)})),function(t){return e.apply(this,arguments)})).catch(function(e){console.log("err => ",e),t.loading=!1})},handleGetTagInfo:function(t){var e=this,a=t.tag_screen_type,s=t.tag_list,n=t.exclude_tag_list;return o()(r.a.mark(function t(){return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new i.a(function(){var t=o()(r.a.mark(function t(i,l){var o,c,_,d,u;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(1!=(o=e.dataInfo.operate_type)){t.next=14;break}return t.next=4,e.handleGetTagOptions();case 4:c=t.sent,_=[],c.forEach(function(t){t.tag_list.forEach(function(t){_.push(t)})}),d=[],s&&s.length&&s.split(",").forEach(function(t){var e=_.find(function(e){return e.tag_id===t});e&&d.push(e.tag_name)}),u=[],n&&n&&n.split(",").forEach(function(t){var e=_.find(function(e){return e.tag_id===t});e&&u.push(e.tag_name)}),i({tag_screen_type:C[a],tag_list:d,exclude_tag_list:u}),t.next=15;break;case 14:2==o&&i({tag_screen_type:C[a],tag_list:s&&s.length?s.split(","):[],exclude_tag_list:n&&n.length?n.split(","):[]});case 15:case"end":return t.stop()}},t,e)}));return function(e,a){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}},t,e)}))()},handleGetTagOptions:function(){var t=this;return new i.a(function(e,a){var s={};t.sysMsgCorpid&&(s.corpid=t.sysMsgCorpid),t.$axios.get(t.URL.BASEURL+t.URL.tagList,{params:s}).then(function(s){(s=s.data)&&0==s.errno?e(s.rst):4002!=s.errno&&(t.$message({message:s.err,type:"warning"}),a(!1))}).catch(function(t){a(!1)})})}}},b={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"self_drawer_title"},[a("div",{staticClass:"flex"},[t._v("\n "+t._s(t.title)+"\n ")]),t._v(" "),a("div",{staticClass:"flex-align-center"},[a("i",{staticClass:"el-icon-close pointer",on:{click:function(e){return t.$emit("close")}}})])]),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"modular"},[a("h3",{staticClass:"bigTitle"},[t._v("基础信息\n "),t.rule_id?[-2==t.dataInfo.enable?a("span",{staticClass:"detail_status status_del"},[t._v("已删除")]):t._e(),t._v(" "),-1==t.dataInfo.enable?a("span",{staticClass:"detail_status status_fail"},[t._v("发送失败")]):t._e(),t._v(" "),0==t.dataInfo.enable?a("span",{staticClass:"detail_status status_del"},[t._v("禁用")]):t._e(),t._v(" "),1==t.dataInfo.enable?a("span",{staticClass:"detail_status status_wait"},[t._v("待发送")]):t._e(),t._v(" "),2==t.dataInfo.enable?a("span",{staticClass:"detail_status status_ing"},[t._v("正在发送中")]):t._e(),t._v(" "),3==t.dataInfo.enable?a("span",{staticClass:"detail_status status_success"},[t._v("发送完成")]):t._e()]:t._e()],2),t._v(" "),a("div",{staticClass:"flex-start"},[a("div",{staticClass:"dataInfoBox"},[a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("创建人:")]),t._v(" "),a("div",{staticClass:"customerServiceTagBox"},[a("div",{staticClass:"customerServiceTag"},[a("i",{staticClass:"el-icon-user-solid"}),t._v(" "+t._s(t.dataInfo.creator))])])]),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("群发标题:")]),t._v(" "),a("span",{staticClass:"txt"},[t._v(t._s(t.dataInfo.name))])]),t._v(" "),a("div",{staticClass:"tMar20 flex-start"},[a("span",{staticClass:"lable"},[t._v("群发内容:")]),t._v(" "),a("div",[a("span",{staticClass:"txt"},[t._v(t._s(t.dataInfo.content))]),t._v(" "),a("div",{staticClass:"syllable_ul"},t._l(t.attachments,function(e,s){return a("div",{key:s,staticClass:"fujianItem"},[a("div",{staticClass:"left"},["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(" "),"link"==e.msgtype?a("span",[t._v("【链接】:"+t._s(e.link.title))]):t._e(),t._v(" "),"miniprogram"==e.msgtype?a("span",[t._v("【小程序】:"+t._s(e.miniprogram.title))]):t._e(),t._v(" "),"radar"==e.msgtype?a("span",[t._v("【智能雷达】:"+t._s(e.radar.title))]):t._e(),t._v(" "),"promote"==e.msgtype?a("span",[t._v("【H5推广】:"+t._s(e.promote.title))]):t._e()])])}),0)])]),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("使用员工:")]),t._v(" "),2==t.dataInfo.operate_type&&1==t.dataInfo.is_operation&&t.dataInfo.sender_group?[a("div",{staticClass:"flexWrap"},[a("div",{staticClass:"customerServiceTagBox"},[a("div",{staticClass:"customerServiceTag",staticStyle:{background:"transparent",color:"#00b38a"}},[t._v("运营组【"+t._s(t.dataInfo.sender_group)+"】")])])])]:[t.dataInfo.sender_name&&t.dataInfo.sender_name.length>0?a("div",{staticClass:"flexWrap"},t._l(t.dataInfo.sender_name,function(e,s){return a("div",{key:s,staticClass:"customerServiceTagBox"},[a("div",{staticClass:"customerServiceTag",staticStyle:{background:"transparent",color:"#00b38a"}},[t._v(t._s(e))])])}),0):a("div",{staticClass:"txt"},[t._v("-")])]],2),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("选择客户:")]),t._v(" "),a("div",{staticClass:"customer_all"},[t._v("\n 将群发消息给"+t._s(0==t.dataInfo.customer_filter?"全部客户的":1==t.dataInfo.customer_filter?"筛选客户的":"")+"\n "),a("span",[t._v(t._s(t.dataInfo.estimated_user))]),t._v("\n 个客户\n ")])]),t._v(" "),1==t.dataInfo.customer_filter?a("div",{staticClass:"tMar20 flex-start"},[a("span",{staticClass:"lable"},[t._v("筛选客户:")]),t._v(" "),a("div",[t.gender?a("div",{staticClass:"txt mb-4"},[t._v("性别:"+t._s(t.gender)+";")]):t._e(),t._v(" "),t.pay?a("div",{staticClass:"txt mb-4"},[t._v("付费情况:"+t._s(t.pay)+";")]):t._e(),t._v(" "),t.addTime?a("div",{staticClass:"txt mb-4"},[t._v("添加时间:"+t._s(t.addTime)+";")]):t._e(),t._v(" "),t.add_days_later?a("div",{staticClass:"txt mb-4"},[t._v("快捷筛选:"+t._s(t.add_days_later)+";")]):t._e(),t._v(" "),t.tagInfo.tag_screen_type?a("div",{staticClass:"txt mb-4"},[t._v(t._s(t.tagInfo.tag_screen_type)),t.tagInfo.tag_list&&t.tagInfo.tag_list.length?a("span",[t._v(":"+t._s(t.tagInfo.tag_list.join("、"))+";")]):t._e()]):t._e(),t._v(" "),t.tagInfo.exclude_tag_list&&t.tagInfo.exclude_tag_list.length?a("div",{staticClass:"txt mb-4"},[t._v("排除客户标签:"+t._s(t.tagInfo.exclude_tag_list.join("、"))+";")]):t._e()])]):t._e(),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("发送类型:")]),t._v(" "),a("span",{staticClass:"txt"},[t._v(t._s(1==t.dataInfo.send_type?"立即发送":2==t.dataInfo.send_type?"定时发送":"-"))])]),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("发送时间:")]),t._v(" "),a("span",{staticClass:"txt"},[t._v(t._s(t.dataInfo.send_time))])])]),t._v(" "),a("phonePreview",{staticStyle:{"margin-top":"-30px"},attrs:{phone_width:"260px",position_top:"0px",content:t.dataInfo.content,attachments:t.attachments}})],1)]),t._v(" "),a("div",{staticClass:"splitLine"}),t._v(" "),a("dataTranslate",{attrs:{rule_id:t.rule_id}}),t._v(" "),a("div",{staticClass:"splitLine"}),t._v(" "),a("userDetail",{attrs:{rule_id:t.rule_id,operate_type:t.dataInfo.operate_type}})],1)},staticRenderFns:[]};var w=a("VU/8")(x,b,!1,function(t){a("PJ3F")},"data-v-f4799b02",null);e.a=w.exports},cthc:function(t,e,a){"use strict";var s=a("Gu7T"),i=a.n(s),n=a("ifoU"),r=a.n(n),l=a("McOJ"),o=a("fGUm"),c=a("erru"),_=a("1b6Z"),d=a("bEx1"),u={components:{userTag:a("/X3M").a},props:{dialogVisible:{type:Boolean,default:function(){return!1}},groupOwnList:{type:Array,default:function(){return[]}}},data:function(){return{loading:!1}},computed:{title:function(){return""}},watch:{dialogVisible:function(t){}},methods:{handleCancel:function(){this.$emit("close")}}},p={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{staticClass:"video-dialog",attrs:{visible:t.dialogVisible,"before-close":t.handleCancel,title:t.title,width:"550px","append-to-body":""},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"content-wrap"},t._l(t.groupOwnList,function(e,s){return a("div",{key:s,staticClass:"corp-wrap"},[a("div",{staticClass:"corp-name-wrap"},[a("span",[t._v("企微主体:")]),t._v(" "),a("span",[t._v(t._s(e.corp_name))])]),t._v(" "),a("userTag",{staticClass:"sender-wrap",attrs:{list:e.sender_list||[],bgColor:"transparent",textColor:"#00b38a"}}),t._v(" "),s!==t.groupOwnList.length-1?a("el-divider"):t._e()],1)}),0),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.handleCancel}},[t._v("关 闭")])],1)])},staticRenderFns:[]};var m=a("VU/8")(u,p,!1,function(t){a("HmWx")},"data-v-25618914",null).exports,h=new r.a([[1,"群主已发送"],[0,"群主未发送"],[3,"发送失败"]]),g={components:{selfInput:l.a,selfCustomerservice:o.a,selfChannel:c.a,qunDetail:_.a,phonePreview:d.a,groupOwnDialog:m},props:["title","rule_id","sysMsgCorpid"],data:function(){return{detialFlag:!1,loading:!1,dataInfo:{},attachments:[],input_keyword:"",page:1,pages:0,total:0,page_size:20,listLoading:!1,tableData:[],user_id_list:[],send_status:"",detail_chat_id:"",groupOwnDialogVisible:!1,currentGroupOwnList:[]}},created:function(){this.detail(),this.init(1)},methods:{goDetail:function(t){this.detail_chat_id=t.chat_id,this.detialFlag=!0},detail:function(){var t=this;this.loading=!0;var e={rule_id:this.rule_id};this.sysMsgCorpid&&(e.corpid=this.sysMsgCorpid),this.$axios.get(this.URL.BASEURL+this.URL.chatGroupMassMsg_ruleDetail,{params:e}).then(function(e){e=e.data;t.loading=!1,e&&0==e.errno?(t.dataInfo=e.rst,t.attachments=e.rst.attachments&&""!=e.rst.attachments?JSON.parse(e.rst.attachments):[]):4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})},init:function(t,e){var a=this;if("export"!=e)this.page=t||this.page;else if(0==this.total)return void this.$message({message:"暂无数据可导出",type:"warning"});this.listLoading=!0;var s={rule_id:this.rule_id,page:"export"==e?1:this.page,page_size:"export"==e?this.$store.state.exportNumber:this.page_size,chat_group_name:this.input_keyword,sender_list:this.user_id_list,status:this.send_status};this.sysMsgCorpid&&(s.corpid=this.sysMsgCorpid),this.$axios.get(this.URL.BASEURL+this.URL.chatGroupMassMsg_chatGroupReceiveDetail,{params:s}).then(function(t){t=t.data;a.listLoading=!1,t&&0==t.errno?"export"==e?a.exportEvent(t.rst.data):(a.tableData=t.rst.data,a.total=t.rst.pageInfo.total,a.pages=t.rst.pageInfo.pages):4002!=t.errno&&a.$message({message:t.err,type:"warning"})}).catch(function(t){a.listLoading=!1})},handleCurrentChange:function(t){this.init(t)},exportEvent:function(t){var e=t;e.forEach(function(t){t.self_send_status=1==t.send_status?"群主已发送":2==t.send_status?"群主未发送":3==t.send_status?"发送失败":""});var a=[{tHeader:["群名称","群主","群主所属部门","客户群成员数","消息送达状态","群聊发送时间"],filterVal:["name","owner_name","department_name","chat_member_count","self_send_status","send_time"],tableDatas:e,sheetName:""}];this.$exportOrder({excelDatas:a,name:"("+this.dataInfo.name+")群发详情(导出时间:"+this.$getDay(0)+")"})},onClickShowGroupOwn:function(t){if(!t)return!1;this.currentGroupOwnList=[].concat(i()(t)),this.groupOwnDialogVisible=!0},onCloseGroupOwn:function(){this.groupOwnDialogVisible=!1},handleGetStatusDesc:function(t){return h.get(Number(t))||"-"}}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"self_drawer_title"},[a("div",{staticClass:"flex"},[t._v("\n "+t._s(t.title)+"\n ")]),t._v(" "),a("div",{staticClass:"flex-align-center"},[a("i",{staticClass:"el-icon-close pointer",on:{click:function(e){return t.$emit("close")}}})])]),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"modular"},[a("h3",{staticClass:"bigTitle"},[t._v("基础信息\n "),t.rule_id?[-2==t.dataInfo.enable?a("span",{staticClass:"detail_status status_del"},[t._v("已删除")]):t._e(),t._v(" "),-1==t.dataInfo.enable?a("span",{staticClass:"detail_status status_fail"},[t._v("发送失败")]):t._e(),t._v(" "),0==t.dataInfo.enable?a("span",{staticClass:"detail_status status_del"},[t._v("禁用")]):t._e(),t._v(" "),1==t.dataInfo.enable?a("span",{staticClass:"detail_status status_wait"},[t._v("待发送")]):t._e(),t._v(" "),2==t.dataInfo.enable?a("span",{staticClass:"detail_status status_ing"},[t._v("正在发送中")]):t._e(),t._v(" "),3==t.dataInfo.enable?a("span",{staticClass:"detail_status status_success"},[t._v("待客服确认")]):t._e(),t._v(" "),4==t.dataInfo.enable?a("span",{staticClass:"detail_status status_success"},[t._v("发送完成")]):t._e()]:t._e()],2),t._v(" "),a("div",{staticClass:"flex-start"},[a("div",{staticClass:"dataInfoBox"},[a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("群发标题:")]),t._v(" "),a("span",{staticClass:"txt"},[t._v(t._s(t.dataInfo.name))])]),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("模式:")]),t._v(" "),a("span",{staticClass:"txt"},[t._v(t._s(1==t.dataInfo.operate_type?"单个企微主体":"多个企微主体"))])]),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("群发方式:")]),t._v(" "),a("span",{staticClass:"txt"},[t._v(t._s(1==t.dataInfo.send_mode?"按群主发送":"按群聊发送"))])]),t._v(" "),1==t.dataInfo.send_mode?a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("使用群主:")]),t._v(" "),t.dataInfo.sender_data&&t.dataInfo.sender_data.length?a("div",{staticClass:"btn-text",on:{click:function(e){return t.onClickShowGroupOwn(t.dataInfo.sender_data)}}},[t._v("查看")]):a("div",{staticClass:"txt"},[t._v("-")])]):t._e(),t._v(" "),a("div",{staticClass:"tMar20 flex-start"},[a("span",{staticClass:"lable"},[t._v("群发内容:")]),t._v(" "),a("div",[a("span",{staticClass:"txt"},[t._v(t._s(t.dataInfo.content))]),t._v(" "),t.attachments&&t.attachments.length>0?a("div",{staticClass:"syllable_ul"},t._l(t.attachments,function(e,s){return a("div",{key:s,staticClass:"fujianItem"},[a("div",{staticClass:"left"},["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(" "),"link"==e.msgtype?a("span",[t._v("【链接】:"+t._s(e.link.title))]):t._e(),t._v(" "),"miniprogram"==e.msgtype?a("span",[t._v("【小程序】:"+t._s(e.miniprogram.title))]):t._e(),t._v(" "),"radar"==e.msgtype?a("span",[t._v("【智能雷达】:"+t._s(e.radar.title))]):t._e(),t._v(" "),"promote"==e.msgtype?a("span",[t._v("【H5推广】:"+t._s(e.promote.title))]):t._e()])])}),0):t._e()])]),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("发送类型:")]),t._v(" "),a("span",{staticClass:"txt"},[t._v(t._s(1==t.dataInfo.send_type?"立即发送":2==t.dataInfo.send_type?"定时发送":"-"))])]),t._v(" "),a("div",{staticClass:"tMar20 flex-align-center"},[a("span",{staticClass:"lable"},[t._v("发送时间:")]),t._v(" "),a("span",{staticClass:"txt"},[t._v(t._s(t.dataInfo.send_time))])])]),t._v(" "),a("phonePreview",{staticStyle:{"margin-top":"-30px"},attrs:{phone_width:"260px",position_top:"0px",content:t.dataInfo.content,attachments:t.attachments}})],1)]),t._v(" "),a("div",{staticClass:"splitLine"}),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"modular"},[a("h3",{staticClass:"bigTitle"},[t._v("数据详情")]),t._v(" "),a("div",{staticClass:"flex",staticStyle:{"margin-top":"30px"}},[a("div",{staticClass:"member_total"},[a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v("\n "+t._s(t.dataInfo.send_user_success||0==t.dataInfo.send_user_success?t.$formatNum(t.dataInfo.send_user_success):"-")+"\n ")]),t._v(" "),a("div",{staticClass:"txt"},[t._v("已发送群主")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v("\n "+t._s(t.dataInfo.wait_send_user||0==t.dataInfo.wait_send_user?t.$formatNum(t.dataInfo.wait_send_user):"-"))]),t._v(" "),a("div",{staticClass:"txt"},[t._v("未发送群主")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v("\n "+t._s(t.dataInfo.send_user_fail||0==t.dataInfo.send_user_fail?t.$formatNum(t.dataInfo.send_user_fail):"-")+"\n ")]),t._v(" "),a("div",{staticClass:"txt"},[t._v("发送失败群主")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v("\n "+t._s(t.dataInfo.send_chat_success||0==t.dataInfo.send_chat_success?t.$formatNum(t.dataInfo.send_chat_success):"-")+"\n ")]),t._v(" "),a("div",{staticClass:"txt"},[t._v("已发送群聊")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v("\n "+t._s(t.dataInfo.send_chat_fail||0==t.dataInfo.send_chat_fail?t.$formatNum(t.dataInfo.send_chat_fail):"-")+"\n ")]),t._v(" "),a("div",{staticClass:"txt"},[t._v("未发送群聊")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v("\n "+t._s(t.dataInfo.success_member_count||0==t.dataInfo.success_member_count?t.$formatNum(t.dataInfo.success_member_count):"-")+"\n ")]),t._v(" "),a("div",{staticClass:"txt"},[t._v("已触达群成员数")])]),t._v(" "),a("div",{staticClass:"splitLine_small"}),t._v(" "),a("div",{staticClass:"member_total_item"},[a("div",{staticClass:"num"},[t._v("\n "+t._s(t.dataInfo.fail_member_count||0==t.dataInfo.fail_member_count?t.$formatNum(t.dataInfo.fail_member_count):"-")+"\n ")]),t._v(" "),a("div",{staticClass:"txt"},[t._v("未触达群成员数")])])])])]),t._v(" "),a("div",{staticClass:"splitLine"}),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"modular"},[a("h3",{staticClass:"bigTitle flex"},[t._v("客户群接收详情\n "),a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(e){return t.init(1,"export")}}},[t._v("导出Excel")])],1),t._v(" "),a("div",{staticClass:"screenBox",staticStyle:{"margin-top":"15px"}},[a("div",{staticClass:"flex-align-center",staticStyle:{"flex-wrap":"wrap"}},[a("self-input",{attrs:{labelWidth:!0,label_name:"群聊名称"},on:{inputChange:function(e){t.input_keyword=e,t.init(1)}}}),t._v(" "),a("self-customerservice",{attrs:{source:"chatGroup",title:"群主"},on:{customerDefine:function(e){t.user_id_list=e,t.init(1)}}}),t._v(" "),a("self-channel",{attrs:{title:"送达状态",type:"chat_group_status",labelWidth:!0},on:{channelDefine:function(e){t.send_status=e,t.init(1)}}})],1)]),t._v(" "),a("el-table",{ref:"multipleTable",staticStyle:{width:"100%","margin-top":"15px"},attrs:{data:t.tableData,"tooltip-effect":"dark","header-cell-style":function(){return{backgroundColor:"#f9f9f9 !important"}}}},[a("el-table-column",{attrs:{prop:"name",label:"群名称","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{style:e.row.name?"":"color:#bbb"},[t._v(t._s(e.row.name?e.row.name:"未设置群名"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"群主",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"customerServiceTagBox"},[a("div",{staticClass:"customerServiceTag"},[a("i",{staticClass:"el-icon-user-solid"}),t._v(" "+t._s(e.row.owner_name))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"department_name",label:"企微主体","show-overflow-tooltip":"",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status","min-width":"80",label:"消息送达状态","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("div",[t._v(t._s(t.handleGetStatusDesc(s.status)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"send_time",label:"群聊发送时间","show-overflow-tooltip":"",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{"min-width":"120",label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"c-00B38A pointer table_button",on:{click:function(a){return t.goDetail(e.row)}}},[t._v("群详情")])]}}])})],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1)],1),t._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:t.detialFlag,"with-header":!1,"append-to-body":""},on:{"update:visible":function(e){t.detialFlag=e}}},[t.detialFlag?a("qunDetail",{attrs:{title:"客户群详情",chat_id:t.detail_chat_id},on:{close:function(e){t.detialFlag=!1}}}):t._e()],1),t._v(" "),a("groupOwnDialog",{attrs:{dialogVisible:t.groupOwnDialogVisible,groupOwnList:t.currentGroupOwnList},on:{close:t.onCloseGroupOwn}})],1)},staticRenderFns:[]};var f=a("VU/8")(g,v,!1,function(t){a("R3bO")},"data-v-228848fe",null);e.a=f.exports},hmBP:function(t,e){},jPCu:function(t,e){},jm62:function(t,e){},oR68:function(t,e){},pOcQ:function(t,e){},w87Y:function(t,e){},xA3B:function(t,e,a){t.exports=a.p+"static/img/friendsCircleSend.289dbc8.png"}});