(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d216086"],{c179:function(e,t,n){"use strict";n.r(t);var c=(n("d3b7"),n("2b0e")).a.extend({name:"ContactSelector",components:{"main-page":function(){return n.e("chunk-6119f298").then(n.bind(null,"4c9e"))},"app-icon":function(){return Promise.all([n.e("chunk-0a381f90"),n.e("chunk-7c0e491e")]).then(n.bind(null,"73f7"))},"team-tree":function(){return n.e("chunk-42f4ba39").then(n.bind(null,"1659"))},"team-contacts":function(){return Promise.all([n.e("chunk-07fa00a8"),n.e("chunk-2d2176a6")]).then(n.bind(null,"0438"))},"c-button":function(){return n.e("chunk-2d0df078").then(n.bind(null,"87be"))},"switch-cell":function(){return n.e("chunk-16315759").then(n.bind(null,"233c"))}},props:{show:Boolean,entId:String,dep:Object,multiple:{type:Boolean,default:!1},checkedMemberId:{type:Array},title:{type:String,default:"团队成员"},contacts:{type:Array,default:function(){return[]}},leader:{type:Object,default:function(){return{list:[]}}},action:String,contactTitle:String},data:function(){return{loading:!1,changed:!1,changedVal:[],checkedMember:[]}},watch:{checkedMemberId:function(e){this.checkedMember=e}},methods:{confirm:function(){var e=this;if(void 0!==this.checkedMember&&0!==this.checkedMember.length){var t={entId:this.entId,depId:"",ids:this.checkedMember};if("remove"===this.action){var n=JSON.parse(localStorage.getItem("ENT_INFO")||"{}").rootDepId;t.depId=n,this.$dialog.confirm({title:"提示",message:"移出成员后，将移出对应的部门群，若是主管，则对应部门群群主将随机抽取群管理员或群内成员临时担任，确定移出吗？"}).then((function(){e.loading=!0,e.$service.staff.changeDep(t).then((function(t){e.loading=!1;var n=t.data;if(n.code===e.$global.success){if("remove"===e.action){e.$toast("移除成功"),e.$emit("update:show",!1),e.$emit("update:checkedMemberId",e.checkedMember);var c=JSON.parse(localStorage.getItem("USR_INFO")).id;e.checkedMember.indexOf(c)>-1&&e.getStaffInfo(c),e.checkedMember=[]}}else e.$toast(n.msg)}))})).catch((function(){}))}}else this.$toast("请选择成员")},getStaffInfo:function(e){var t=this;this.$service.staff.getInfo({id:e}).then((function(e){var n=e.data;n.code===t.$global.success&&localStorage.setItem("USR_INFO",JSON.stringify(n.data))}))},goBack:function(){this.$emit("update:show",!1)}}}),a=n("2877"),i=Object(a.a)(c,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("van-overlay",{attrs:{show:e.show,"z-index":"2000","lock-scroll":!1}},[n("div",{staticClass:"select-team w-screen h-screen overflow-auto",attrs:{id:"contact-selector"}},[n("main-page",{attrs:{"main-bg":"bg-white","header-bg":"bg-white",title:e.title,loading:e.loading,"left-arrow":""},on:{"click-left":e.goBack}},[n("div",{staticClass:"px-4 pt-14"},[n("div",{staticClass:"py-2 font-medium"},[e._v(e._s(e.contactTitle?e.contactTitle:e.dep.name))]),n("div",{staticClass:"pb-16"},[n("team-contacts",{attrs:{"container-id":"contact-selector",leader:e.leader,radio:!0,multiple:e.multiple,checked:e.checkedMember,"contact-list":e.contacts},on:{"update:checked":function(t){e.checkedMember=t}}})],1),n("div",{staticClass:"py-2 px-4 bg-white w-screen fixed bottom-0 left-0 z-30"},[n("c-button",{attrs:{round:""},on:{click:e.confirm}},[e._v("确定")])],1)])])],1)])}),[],!1,null,null,null);t.default=i.exports}}]);
//# sourceMappingURL=chunk-2d216086.9e087045.js.map