webpackJsonp([20],{mmLS:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("Ch4/"),s=i("2CGT"),a={props:{visible:Boolean,data:{type:Object,default:function(){return{}}},type:String,title:String},data:function(){return{list:[],isOpenPage:!1,loading:!0}},computed:{desc:function(){return"deactive"==this.type?this.list.length?"当前分组正在被以下模块使用，失效后使用该分组的活动将匹配不到分组下的人群并且分组客户数据将同步清空，是否继续处理为失效？":"失效后非实时分组客户数据将同步清空，是否继续处理为失效？":this.list.length?"当前分组正在被以下模块使用，请先删除对应的内容后再来删除分组。":"删除后无法恢复，确认要删除该分组吗？"}},methods:{checkGroup:function(){var t=this;this.loading=!0;var e={memberTagGroupIds:this.data.memberTagGroupId,requestProject:"gic-member-tag-web",operateType:"deactive"==this.type?1:2};Object(s.n)(e).then(function(e){var i=e.errorCode,s=e.result;1!==i?n.a.errorMsg(e.data):t.list=s||[]}).finally(function(){return t.loading=!1})},onClose:function(){this.$emit("update:visible",!1),this.$emit("close")},onSubmit:function(){this.$emit("update:visible",!1),this.$emit("submit",this.data,this.type)},subWindowChange:function(){addEventListener("visibilitychange",this.visibleityWindowFn)},visibleityWindowFn:function(){!document.hidden&&this.isOpenPage&&this.checkGroup()}},watch:{visible:function(t){t&&this.checkGroup(),this.subWindowChange(),t||(removeEventListener("visibilitychange",this.visibleityWindowFn),this.isOpenPage=!1)}}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{visible:t.visible,"custom-class":"delete-dialog",width:"416px"},on:{"update:visible":function(e){t.visible=e},close:t.onClose}},[i("div",{staticClass:"dialog-content"},[i("i",{staticClass:"el-alert__icon el-icon-warning is-big icon"}),t._v(" "),i("h2",[t._v(t._s(t.title))]),t._v(" "),i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[i("p",{staticClass:"desc"},[t._v(t._s(t.desc))]),t._v(" "),t._l(t.list,function(e,n){return i("p",{key:n,staticClass:"item"},[i("a",{attrs:{href:e.businessLink,target:"_blank"},on:{click:function(e){t.isOpenPage=!0}}},[t._v(t._s(e.businessModuleName)+"-"+t._s(e.businessName))])])}),t._v(" "),"delete"==t.type&&t.list.length?t._e():i("footer",{staticClass:"footer"},[i("el-button",{staticClass:"ml10",on:{click:function(e){return t.$emit("update:visible",!1)}}},[t._v("取消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v(t._s("deactive"==t.type?"失效":"删除"))])],1)],2)])])},staticRenderFns:[]};var l=i("VU/8")(a,o,!1,function(t){i("n0qE")},"data-v-925d9224",null);e.default=l.exports},n0qE:function(t,e){}});