webpackJsonp([112],{"1fa5":function(e,t){},OIJK:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("Xxa5"),r=a.n(o),s=a("exGp"),i=a.n(s),l=a("42hH"),n=a("P9l9"),m={name:"setActCode",directives:{loadmore:{inserted:function(e,t){e.querySelector(".el-select-dropdown .el-select-dropdown__wrap").addEventListener("scroll",function(){this.scrollHeight+this.scrollTop>=this.clientHeight&&t.value()})}}},components:{welcomeItem:l.default},props:{actCodeData:{type:Object,default:null}},data:function(){return{form:{hmGroupId:null,passFlag:!0,memberLabelId:"",welcomeId:null},rules:{hmGroupId:[{required:!0,message:"请选择活码分组",trigger:"blur"}]},tagsDialogVisible:!1,pageParam:{groupName:"",pageNum:1,pageSize:20},total:1,groupList:[],data:""}},created:function(){this.searchGroup()},methods:{saveTagPop:function(e){console.log(e),this.data=e},onLoadmore:function(){this.pageParam.pageNum>=this.total||(this.pageParam.pageNum++,this.searchGroup())},searchGroup:function(){var e=this;return i()(r.a.mark(function t(){return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return 1==e.pageParam.pageNum&&(e.groupList=[]),t.next=3,Object(n.b)("/haoban-manage3-web/hm/group/list",e.pageParam).then(function(t){if(0==t.data.code){var a=t.data.result||{},o=a.result,r=a.pages;e.total=r||1,""!=e.pageParam.groupName?e.groupList=o:Array.isArray(o)&&(e.groupList=e.groupList.concat(o))}});case 3:case"end":return t.stop()}},t,e)}))()},remoteMethod:function(e){""!==e?(this.pageParam.groupName=e,this.pageParam.pageNum=1,this.groupList=[],this.searchGroup()):this.groupList=[]},visibleChange:function(e){e||this.remoteMethod()},getWelcomeId:function(e){this.form.welcomeId=e},save:function(){var e,t=this;this.$refs.form.validate((e=i()(r.a.mark(function e(a){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a&&(console.log(t.form,"子组件"),t.form.passFlag=t.form.passFlag?1:0,t.$emit("sumbit",t.form));case 1:case"end":return e.stop()}},e,t)})),function(t){return e.apply(this,arguments)}))}},watch:{actCodeData:{handler:function(e){e&&(console.log(e,"val"),this.form.hmGroupId=e.hmGroupId,this.form.passFlag=1==e.passFlag,this.form.memberLabelId=e.memberLabelId,this.form.welcomeId=e.welcomeId)},immediate:!0,deep:!0}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"m20 formBox"},[a("dm-sub-title",{attrs:{text:"基础信息",type:"line"}}),e._v(" "),a("el-form",{ref:"form",staticClass:"mt20",attrs:{model:e.form,rules:e.rules,"label-width":"110px"}},[e._t("typeCode"),e._v(" "),e._t("codeName"),e._v(" "),a("el-form-item",{attrs:{label:"活码分组",prop:"hmGroupId"}},[a("el-select",{directives:[{name:"loadmore",rawName:"v-loadmore",value:e.onLoadmore,expression:"onLoadmore"}],staticClass:"w340",attrs:{clearable:"",remote:"",filterable:"","remote-method":e.remoteMethod},model:{value:e.form.hmGroupId,callback:function(t){e.$set(e.form,"hmGroupId",t)},expression:"form.hmGroupId"}},e._l(e.groupList,function(e){return a("el-option",{key:e.groupId,attrs:{label:e.groupName,value:e.groupId}})}),1)],1),e._v(" "),e._t("member"),e._v(" "),a("el-form-item",{attrs:{label:"自动通过好友"}},[a("el-switch",{staticClass:"mr15",model:{value:e.form.passFlag,callback:function(t){e.$set(e.form,"passFlag",t)},expression:"form.passFlag"}}),e._v(" "),a("span",{staticClass:"tabs"},[e._v("开启后，客户添加该企业微信时，无需好友验证，将会自动添加成功")])],1),e._v(" "),a("el-form-item",{attrs:{label:"活码标签"}},[a("el-button",{staticClass:"ylbtn",attrs:{plain:""},on:{click:function(t){e.tagsDialogVisible=!0}}},[a("i",{staticClass:"iconfont-components3 icon-cp-PlusOutlined addPic"}),e._v("添加标签")]),e._v(" "),a("dm-memberTag-group",{attrs:{visiable:e.tagsDialogVisible,projectName:"haobao-3"},on:{"update:visiable":function(t){e.tagsDialogVisible=t},save:e.saveTagPop}})],1),e._v(" "),a("dm-sub-title",{staticClass:"mt40b20",attrs:{text:"欢迎语设置",type:"line"}}),e._v(" "),a("welcomeItem",{on:{getWelcomeId:e.getWelcomeId}})],2)],1),e._v(" "),a("div",{staticClass:"saveBtn"},[a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("保存")])],1)])},staticRenderFns:[]};var u=a("VU/8")(m,c,!1,function(e){a("1fa5")},"data-v-1aa04124",null);t.default=u.exports}});