企微助手 ,仓库名 短剧

24.5cb7c0ed2078bf18c896.js 25KB

1
  1. webpackJsonp([24],{"5wuF":function(t,e,a){"use strict";var i=a("mvHQ"),n=a.n(i),s=a("Dd8w"),r=a.n(s),o=a("Xxa5"),l=a.n(o),c=a("exGp"),d=a.n(c),u=a("u2KI"),p=a.n(u),m=a("gzej"),h=a("UOPL"),_=a("M4fF"),g=a.n(_),f=a("2Uyi"),v=a("CZ54"),C={components:{datePicker:m.a,editCon:h.a,templateGroupDialog:v.a},props:["drawer_title","template_id"],data:function(){return{loading:!0,resetFlag:!1,send_conf:[{natural_day:"",send_time:"",add_time:null,add_start_time:"",add_end_time:""}],title:"",content:"",attachments:[],detailFromApi:p()({}),group_id:"",groupOptions:[],tempGroupVisible:!1}},created:function(){this.handleGetGroupOptions(),this.template_id?this.detail():this.loading=!1},methods:{handleGetGroupOptions:function(){var t=this;return d()(l.a.mark(function e(){var a,i,n,s;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={status:1,page:1,page_size:1e3},e.next=3,t.$axios.post(t.URL.BASEURL+t.URL.smartPushV3_tempGroupList,a);case 3:i=e.sent,n=i.data,(s=void 0===n?{}:n)&&0==s.errno&&Array.isArray(s.rst.data)?t.groupOptions=s.rst.data:4002!=s.errno&&(t.$message.warning(s.err),t.groupOptions=[]);case 7:case"end":return e.stop()}},e,t)}))()},onChangeGroupId:function(t){this.group_id=t||""},onClickCreateGroup:function(){this.tempGroupVisible=!0},onConfirmGroup:function(){this.handleGetGroupOptions(),this.tempGroupVisible=!1},onCancelGroup:function(){this.tempGroupVisible=!1},detail:function(){var t=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.smartPushV3_templateDetail,{params:{template_id:this.template_id}}).then(function(e){e=e.data;t.loading=!1,e&&0==e.errno?(t.detailFromApi=p()(g.a.cloneDeep(e.rst)),e.rst.send_conf?t.send_conf=JSON.parse(e.rst.send_conf).map(function(t){return r()({},t,{add_start_time:t.add_start_time||"",add_end_time:t.add_end_time||"",add_time:t.add_start_time&&t.add_end_time?[t.add_start_time,t.add_end_time]:null})}):t.send_conf=[{natural_day:"",send_time:"",add_start_time:"",add_end_time:"",add_time:null}],t.title=e.rst.title,t.content=e.rst.content,t.attachments=e.rst.attachments&&""!=e.rst.attachments&&"null"!=e.rst.attachments?JSON.parse(e.rst.attachments):[],t.group_id=e.rst.group_id&&0!=e.rst.group_id?e.rst.group_id:""):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(this.send_conf.some(function(t){return!t.natural_day||!t.send_time}))this.$message.warning('请完善"添加客服时间"');else if(this.send_conf.some(function(t){return!(1!=t.natural_day||t.add_time&&t.add_time.length)}))this.$message.warning("请选择客户添加起止时间");else if(""!=this.title)if(""!=this.content||this.attachments&&""!=this.attachments&&0!=this.attachments.length)if(""!=this.content&&this.$getStrBytes(this.content)>4e3)this.$message.error("请检查消息文本内容,最多4000个字节,已超出!");else{var e={title:this.title,content:this.content,attachments:""==this.attachments||0==this.attachments.length?"":n()(this.attachments),send_conf:n()(this.send_conf),group_id:this.group_id?this.group_id:0};this.template_id?e.template_id=this.template_id:e.template_id="",this.$loading(this.$loadingConfig),this.$axios.post(this.URL.BASEURL+this.URL.smartPushV3_setTemplate,e).then(function(e){e=e.data;t.$loading(t.$loadingConfig).close(),e&&0==e.errno?t.template_id?t.$emit("close","update"):t.$emit("close","update_new"):4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.$loading(t.$loadingConfig).close()})}else this.$message.warning("请输入内容!");else this.$message.warning("请输入标题!")},onInputDays:function(t,e){this.send_conf[e].natural_day=Object(f.k)(t),1!=this.send_conf[e].natural_day||this.send_conf[e].add_time&&this.send_conf[e].add_time.length||(this.send_conf[e].add_time=["00:00:00","23:59:59"],this.send_conf[e].add_start_time=this.send_conf[e].add_time[0],this.send_conf[e].add_end_time=this.send_conf[e].add_time[1])},onChangeDays:function(t,e){""!==t&&0===Number(t)&&(this.send_conf[e].natural_day="",this.$message.warning("天数不能为0"))},onChangeAddTime:function(t,e){t&&t.length?(this.send_conf[e].add_start_time=t[0],this.send_conf[e].add_end_time=t[1]):(this.send_conf[e].add_start_time="",this.send_conf[e].add_end_time="")},onClickDelConf:function(t){this.send_conf.splice(t,1)},onClickAddConf:function(){this.send_conf.push({natural_day:"",send_time:"",add_start_time:"",add_end_time:"",add_time:null})}}},b={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"createMassMsg"},[a("div",{staticClass:"self_drawer_title"},[a("div",{staticClass:"flex"},[t._v("\n "+t._s(t.drawer_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(" "),t.loading?t._e():a("div",{staticClass:"bg-ffffff",staticStyle:{padding:"15px 30px"}},[a("h3",{staticClass:"bigTitle"},[t._v("基础信息")]),t._v(" "),a("div",{staticClass:"regulations"},[a("div",{staticClass:"screeningCustomers",staticStyle:{"margin-top":"10px"}},[a("div",{staticClass:"screeningItem",staticStyle:{"align-items":"flex-start"}},[t._m(0),t._v(" "),a("div",{staticClass:"send-time-wrap"},t._l(t.send_conf,function(e,i){return a("div",{key:i,staticClass:"send-time-item"},[a("el-input",{attrs:{size:"mini",maxlength:"3",clearable:""},on:{input:function(e){return t.onInputDays(e,i)},change:function(e){return t.onChangeDays(e,i)}},model:{value:e.natural_day,callback:function(a){t.$set(e,"natural_day","string"==typeof a?a.trim():a)},expression:"conf.natural_day"}}),t._v(" "),a("span",{staticClass:"text"},[t._v("天  ")]),t._v(" "),1==e.natural_day?a("el-time-picker",{staticClass:"add-time",attrs:{"is-range":"",size:"mini",placeholder:"客户添加起止时间","start-placeholder":"起始时间","end-placeholder":"截止时间","value-format":"HH:mm:ss",clearable:!1},on:{change:function(e){return t.onChangeAddTime(e,i)}},model:{value:e.add_time,callback:function(a){t.$set(e,"add_time",a)},expression:"conf.add_time"}}):t._e(),t._v(" "),a("span",{staticClass:"text"},[t._v("当天")]),t._v(" "),a("div",{staticClass:"timeNums-wrap"},[a("div",{staticClass:"timeNums"},[a("el-time-picker",{attrs:{size:"mini",placeholder:"请选择","value-format":"HH:mm:ss",clearable:!1},model:{value:e.send_time,callback:function(a){t.$set(e,"send_time",a)},expression:"conf.send_time"}})],1)]),t._v(" "),a("span",{staticClass:"text"},[t._v("提醒发送")]),t._v(" "),i>0?a("i",{staticClass:"el-icon-error",on:{click:function(e){return t.onClickDelConf(i)}}}):t._e(),t._v(" "),i===t.send_conf.length-1?a("i",{staticClass:"el-icon-circle-plus-outline",on:{click:t.onClickAddConf}}):t._e()],1)}),0)])])]),t._v(" "),a("div",{staticClass:"regulations",staticStyle:{"margin-bottom":"20px","align-items":"center"}},[a("label",[t._v("选择分组")]),t._v(" "),a("div",[a("el-select",{staticClass:"select-cls",staticStyle:{width:"300px"},attrs:{size:"small",placeholder:"请选择",filterable:"",clearable:""},on:{change:t.onChangeGroupId},model:{value:t.group_id,callback:function(e){t.group_id=e},expression:"group_id"}},t._l(t.groupOptions,function(t){return a("el-option",{key:t.group_id,attrs:{label:t.title,value:t.group_id}})}),1)],1),t._v(" "),a("div",{staticClass:"newGroupCss",on:{click:t.onClickCreateGroup}},[t._v("新建模板分组")])]),t._v(" "),a("div",{staticClass:"line"}),t._v(" "),a("h3",{staticClass:"bigTitle"},[t._v("编辑群发消息")]),t._v(" "),a("div",{staticClass:"regulations regulations2"},[t._m(1),t._v(" "),a("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"例:活动推送/拉新等",clearable:"",size:"small"},model:{value:t.title,callback:function(e){t.title="string"==typeof e?e.trim():e},expression:"title"}}),t._v(" "),a("p",{staticStyle:{"font-size":"13px","line-height":"30px",color:"#f9a527","margin-left":"10px"}},[t._v("*仅作为企业内部人员记录群发摘要,不会推送给客户")])],1),t._v(" "),a("div",{staticClass:"regulations regulations2"},[t._m(2),t._v(" "),a("edit-con",{ref:"editCon",attrs:{isShowTips:!1,afferent_content:t.content,afferent_attachments:t.attachments},on:{editContent:function(e){t.content=e},changeAttachment:t.getAttachment}})],1),t._v(" "),a("div",{staticClass:"button_box"},[a("button",{staticClass:"button",on:{click:t.massMsg_set}},[t._v("保存模板")])])]),t._v(" "),a("templateGroupDialog",{attrs:{dialogVisible:t.tempGroupVisible},on:{confirm:t.onConfirmGroup,cancel:t.onCancelGroup}})],1)},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",{staticStyle:{"margin-top":"4px"}},[e("em",[this._v("*")]),this._v("内容")])}]};var x=a("VU/8")(C,b,!1,function(t){a("J6Ba")},"data-v-282633ca",null);e.a=x.exports},CZ54:function(t,e,a){"use strict";var i=a("//Fk"),n=a.n(i),s=a("Xxa5"),r=a.n(s),o=a("exGp"),l=a.n(o),c={name:"templateGroupDialog",props:{dialogVisible:{type:Boolean,default:function(){return!1}},groupInfo:{type:Object,default:function(){return{group_id:"",title:""}}}},data:function(){return{loading:!1,form:{title:""}}},computed:{dialogTitle:function(){return this.groupInfo.group_id?"编辑模板分组":"新建模板分组"}},watch:{dialogVisible:function(t){t&&this.handleGetFormData()}},methods:{handleConfirm:function(){var t=this;return l()(r.a.mark(function e(){var a,i,n,s,o;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.handleFormValidate();case 3:return a=""+t.URL.BASEURL+t.URL.smartPushV3_editTempGroup,i={group_id:t.groupInfo&&t.groupInfo.group_id?t.groupInfo.group_id:"",title:t.form.title},t.loading=!0,e.next=8,t.$axios.post(a,i);case 8:n=e.sent,s=n.data,(o=void 0===s?{}:s)&&0==o.errno?(t.$message.success("操作成功"),t.handleClearFormData(),t.$emit("confirm")):4002!=o.errno&&t.$message.warning(o.err||"操作失败"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log("error => ",e.t0);case 17:return e.prev=17,t.loading=!1,e.finish(17);case 20:case"end":return e.stop()}},e,t,[[0,14,17,20]])}))()},handleCancel:function(){this.handleClearFormData(),this.$emit("cancel")},handleFormValidate:function(){var t=this;return new n.a(function(e,a){t.form.title?e("表单校验通过"):(t.$message.warning("请输入模板分组名称"),a("表单校验未通过"))})},handleGetFormData:function(){var t=this.groupInfo.title,e=void 0===t?"":t;this.form.title=e||""},handleClearFormData:function(){this.form.title=""}}},d={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{staticClass:"bind-dialog",attrs:{visible:t.dialogVisible,"before-close":t.handleCancel,title:t.dialogTitle,width:"450px","close-on-click-modal":!1,"append-to-body":!0},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"form-wrap"},[a("div",{staticClass:"form-item"},[a("span",{staticClass:"lable required"},[t._v("模板分组名称")]),t._v(" "),a("el-input",{model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1)]),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini"},on:{click:t.handleCancel}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.handleConfirm}},[t._v("确 定")])],1)])},staticRenderFns:[]};var u=a("VU/8")(c,d,!1,function(t){a("mUNO")},"data-v-2d85e51c",null);e.a=u.exports},EHbW:function(t,e){},J6Ba:function(t,e){},ew9f:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Xxa5"),n=a.n(i),s=a("exGp"),r=a.n(s),o=a("gzej"),l=a("pdUL"),c=a("5wuF"),d=a("v/uv"),u=a("//Fk"),p=a.n(u),m={name:"batchGroupDialog",components:{templateGroupDialog:a("CZ54").a},props:{dialogVisible:{type:Boolean,default:function(){return!1}},temp_ids:{type:String,default:function(){return""}}},data:function(){return{loading:!1,form:{group_id:""},groupOptions:[],tempGroupVisible:!1}},computed:{dialogTitle:function(){return"批量设置模板分组"}},watch:{dialogVisible:function(t){t&&this.handleGetGroupOptions()}},methods:{handleConfirm:function(){var t=this;return r()(n.a.mark(function e(){var a,i,s,r,o;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.handleFormValidate();case 3:return a=""+t.URL.BASEURL+t.URL.smartPushV3_changeTempGroupBatch,i={group_id:t.form.group_id,rule_ids:t.temp_ids},t.loading=!0,e.next=8,t.$axios.post(a,i);case 8:s=e.sent,r=s.data,(o=void 0===r?{}:r)&&0==o.errno?(t.$message.success("操作成功"),t.handleClearFormData(),t.$emit("confirm")):4002!=o.errno&&t.$message.warning(o.err||"操作失败"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log("error => ",e.t0);case 17:return e.prev=17,t.loading=!1,e.finish(17);case 20:case"end":return e.stop()}},e,t,[[0,14,17,20]])}))()},handleCancel:function(){this.handleClearFormData(),this.$emit("cancel")},handleFormValidate:function(){var t=this;return new p.a(function(e,a){t.form.group_id?e("表单校验通过"):(t.$message.warning("请选择模板分组"),a("表单校验未通过"))})},handleClearFormData:function(){this.form.group_id=""},handleGetGroupOptions:function(){var t=this;return r()(n.a.mark(function e(){var a,i,s,r;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={status:1,page:1,page_size:1e3},e.next=3,t.$axios.post(t.URL.BASEURL+t.URL.smartPushV3_tempGroupList,a);case 3:i=e.sent,s=i.data,(r=void 0===s?{}:s)&&0==r.errno&&Array.isArray(r.rst.data)?t.groupOptions=r.rst.data:4002!=r.errno&&(t.$message.warning(r.err),t.groupOptions=[]);case 7:case"end":return e.stop()}},e,t)}))()},onChangeGroupId:function(t){this.group_id=t||""},onClickCreateGroup:function(){this.tempGroupVisible=!0},onConfirmGroup:function(){this.handleGetGroupOptions(),this.tempGroupVisible=!1},onCancelGroup:function(){this.tempGroupVisible=!1}}},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{staticClass:"bind-dialog",attrs:{visible:t.dialogVisible,"before-close":t.handleCancel,title:t.dialogTitle,width:"500px","close-on-click-modal":!1,"append-to-body":!0},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"form-wrap"},[a("div",{staticClass:"form-item"},[a("span",{staticClass:"lable required"},[t._v("模板分组")]),t._v(" "),a("div",[a("el-select",{staticClass:"select-cls",staticStyle:{width:"280px"},attrs:{size:"small",placeholder:"请选择",filterable:"",clearable:""},on:{change:t.onChangeGroupId},model:{value:t.form.group_id,callback:function(e){t.$set(t.form,"group_id",e)},expression:"form.group_id"}},t._l(t.groupOptions,function(t){return a("el-option",{key:t.group_id,attrs:{label:t.title,value:t.group_id}})}),1)],1),t._v(" "),a("div",{staticClass:"newGroupCss",on:{click:t.onClickCreateGroup}},[t._v("新建模板分组")])])]),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini"},on:{click:t.handleCancel}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.handleConfirm}},[t._v("确 定")])],1),t._v(" "),a("templateGroupDialog",{attrs:{dialogVisible:t.tempGroupVisible},on:{confirm:t.onConfirmGroup,cancel:t.onCancelGroup}})],1)},staticRenderFns:[]};var _=a("VU/8")(m,h,!1,function(t){a("zjV3")},"data-v-c12a8758",null).exports,g={components:{datePicker:o.a,selfInputV2:l.a,createTemplate:c.a,createMassMsg:d.a,batchTempGroupDialog:_},data:function(){return{massMsgFlag:!1,createMassMsgFlag:!1,loading:!1,page:1,pages:0,total:0,page_size:20,tableData:[],create_time_start:"",create_time_end:"",resetFlag:!1,height:"",detail_template_group_id:"",detail_template_id:"",title:"",groupName:"",multipleSelection:[],currentSelectedTemps:"",batchTempGroupVisible:!1}},created:function(){this.height=document.documentElement.clientHeight-260>400?document.documentElement.clientHeight-260:400,this.init(1)},methods:{onClickBack:function(){this.$router.replace({path:"smartPushV3",query:{tag:2}})},detailClose:function(t){"update"==t?this.init(this.page):"update_new"==t&&(this.init(1),this.$refs.multipleTable.bodyWrapper.scrollTop=0),this.massMsgFlag=!1},onClickCreateTemp:function(){this.detail_template_id="",this.massMsgFlag=!0},onClickEditRule:function(t){this.detail_template_id=t.template_id,this.massMsgFlag=!0},onClickDelRule:function(t){var e=this,a=t.template_id,i=t.title;return r()(n.a.mark(function t(){return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$confirm("确定删除【"+i+"】推送模板?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:e.handleDelRule(a),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log("error => ",t.t0);case 9:case"end":return t.stop()}},t,e,[[0,6]])}))()},handleDelRule:function(t){var e=this;return r()(n.a.mark(function a(){var i,s,r,o,l;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,i=""+e.URL.BASEURL+e.URL.smartPushV3_delTemplate,s={template_ids:t},e.$loading(e.$loadingConfig),a.next=6,e.$axios.get(i,{params:s});case 6:r=a.sent,o=r.data,(l=void 0===o?{}:o)&&0==l.errno?(e.$message.success("操作成功"),e.init()):4002!=l.errno&&e.$message.warning(l.err),a.next=15;break;case 12:a.prev=12,a.t0=a.catch(0),console.log("error => ",a.t0);case 15:return a.prev=15,e.$loading(e.$loadingConfig).close(),a.finish(15);case 18:case"end":return a.stop()}},a,e,[[0,12,15,18]])}))()},onClickCreateSmartPush:function(t){this.detail_template_group_id=t.group_id,this.detail_template_id=t.template_id,this.createMassMsgFlag=!0},createMassMsgClose:function(){this.detail_template_group_id="",this.detail_template_id="",this.createMassMsgFlag=!1,this.$refs.multipleTable.bodyWrapper.scrollTop=0},onClickStatus:function(t){var e=this;this.$confirm("确定"+(0==t.status?"启用":"禁用")+"【"+t.title+"】?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$loading(e.$loadingConfig),e.$axios.get(e.URL.BASEURL+e.URL.smartPushV3_tempChangeStatus,{params:{template_id:t.template_id,status:0==t.status?1:0}}).then(function(t){t=t.data;e.$loading(e.$loadingConfig).close(),t&&0==t.errno?(e.$message({message:"操作成功!",type:"success"}),e.init()):e.$message({message:t.err,type:"warning"})}).catch(function(){e.$loading(e.$loadingConfig).close()})}).catch(function(){})},onChangeTime:function(t){!t||t&&0==t.length?(this.create_time_start="",this.create_time_end=""):(this.create_time_start=t[0],this.create_time_end=t[1]),this.init(1)},onChangeTitle:function(t){this.title=t,this.init(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.loading=!0;var i={group_id:this.$route.query.group_id,title:this.title,create_time_start:this.create_time_start?this.create_time_start+" 00:00:00":"",create_time_end:this.create_time_end?this.$day_format(this.$date_compatible(this.create_time_end+" 24:00:00")):"",page:"export"==e?1:this.page,page_size:"export"==e?this.$store.state.exportNumber:this.page_size};this.$axios.get(this.URL.BASEURL+this.URL.smartPushV3_templateList,{params:i}).then(function(t){t=t.data;a.loading=!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,a.groupName=t.rst.extra.group_name):4002!=t.errno&&a.$message({message:t.err,type:"warning"})}).catch(function(t){a.loading=!1})},handleCurrentChange:function(t){this.init(t)},exportEvent:function(t){var e=t;e.forEach(function(t){t.status=1==t.status?"启用":"禁用"});var a=[{tHeader:["标题","规则","创建时间","状态"],filterVal:["title","desc","created_at","status"],tableDatas:e,sheetName:""}];this.$exportOrder({excelDatas:a,name:"智能推送-模板列表(导出时间:"+this.$getDay(0)+")"})},handleSelectionChange:function(t){this.multipleSelection=t},onClickBatchGroup:function(){if(!this.multipleSelection||!this.multipleSelection.length)return this.$message.warning("请选择推送模板"),!1;this.currentSelectedTemps=this.multipleSelection.map(function(t){return t.template_id}).join(","),this.batchTempGroupVisible=!0},onConfirmBatchGroup:function(){this.$refs.multipleTable.clearSelection(),this.currentSelectedTemps="",this.init(1),this.batchTempGroupVisible=!1},onCancelBatchGroup:function(){this.batchTempGroupVisible=!1}}},f={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:"screenBox",staticStyle:{"align-items":"center","padding-right":"16px"}},[a("div",{staticClass:"flex-align-center",staticStyle:{flex:"1"}},[a("div",{on:{click:t.onClickBack}},[a("i",{staticClass:"el-icon-back"})]),t._v(" "),t.groupName?a("div",{staticStyle:{margin:"10px"}},[t._v("模板分组【"+t._s(t.groupName)+"】详情")]):t._e()])]),t._v(" "),a("div",{staticClass:"screenBox",staticStyle:{"align-items":"center","padding-right":"16px","margin-top":"10px"}},[a("div",{staticClass:"flex-align-center",staticStyle:{flex:"1"}},[a("datePicker",{attrs:{title:"创建时间",reset:t.resetFlag},on:{changeTime:t.onChangeTime}}),t._v(" "),a("selfInputV2",{staticStyle:{"margin-left":"-30px"},attrs:{label_name:"标题",placeholder:"请输入"},on:{change:t.onChangeTitle},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}})],1)]),t._v(" "),a("div",{staticClass:"tableInfo"},[a("div",[a("div",{staticClass:"flex"},[a("div",{staticClass:"totalCustom"},[t._v("共有"),a("span",[t._v(t._s(t.total))]),t._v("条推送模板")]),t._v(" "),t.multipleSelection&&t.multipleSelection.length?a("div",{staticClass:"totalCustom",staticStyle:{"margin-left":"20px"}},[t._v("已选择"),a("span",[t._v(t._s(t.multipleSelection.length))]),t._v("条")]):t._e()])]),t._v(" "),a("div",{staticClass:"flex"},[a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:t.onClickBatchGroup}},[t._v("批量设置模板分组")]),t._v(" "),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("el-table",{ref:"multipleTable",staticStyle:{width:"100%","margin-top":"10px"},attrs:{height:t.height,data:t.tableData,"tooltip-effect":"dark","row-key":"template_id"},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection","reserve-selection":"",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"title",label:"标题","show-overflow-tooltip":"",align:"center","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"desc",label:"规则",align:"center","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间",prop:"created_at","min-width":"120","show-overflow-tooltip":"",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"状态","show-overflow-tooltip":"",align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,disabled:""},nativeOn:{click:function(e){return t.onClickStatus(i)}},model:{value:i.status,callback:function(e){t.$set(i,"status",e)},expression:"row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right",width:"190"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex",staticStyle:{"justify-content":"center"}},[a("div",{staticClass:"c-00B38A pointer table_button",on:{click:function(a){return t.onClickEditRule(e.row)}}},[t._v("编辑")]),t._v(" "),1==e.row.status?a("div",{staticClass:"c-00B38A pointer table_button",on:{click:function(a){return t.onClickCreateSmartPush(e.row)}}},[t._v("创建智能推送")]):t._e(),t._v(" "),a("div",{staticClass:"c-FF604D pointer table_button",on:{click:function(a){return t.onClickDelRule(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),t._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:t.massMsgFlag,"with-header":!1},on:{"update:visible":function(e){t.massMsgFlag=e}}},[t.massMsgFlag?a("createTemplate",{ref:"createTemplate",attrs:{drawer_title:t.detail_template_id?"编辑模板":"新建模板",template_id:t.detail_template_id},on:{close:t.detailClose}}):t._e()],1),t._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:t.createMassMsgFlag,"with-header":!1},on:{"update:visible":function(e){t.createMassMsgFlag=e}}},[t.createMassMsgFlag?a("createMassMsg",{ref:"createMassMsg",attrs:{createTempGroupId:t.detail_template_group_id,createTemplateId:t.detail_template_id,title:"新建智能推送"},on:{close:t.createMassMsgClose}}):t._e()],1),t._v(" "),a("batchTempGroupDialog",{attrs:{dialogVisible:t.batchTempGroupVisible,temp_ids:t.currentSelectedTemps},on:{confirm:t.onConfirmBatchGroup,cancel:t.onCancelBatchGroup}})],1)},staticRenderFns:[]};var v=a("VU/8")(g,f,!1,function(t){a("EHbW")},"data-v-8af53afe",null);e.default=v.exports},mUNO:function(t,e){},zjV3:function(t,e){}});