webpackJsonp([49],{"/hW9":function(e,t){},"3XIC":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Xxa5"),i=a.n(n),r=a("exGp"),s=a.n(r),o=a("ifoU"),l=a.n(o),c=a("pdUL"),d=a("FsX6"),u=a("3uEH"),f=a("Dd8w"),p=a.n(f),h=a("mvHQ"),m=a.n(h),v=a("//Fk"),g=a.n(v),_=a("Gu7T"),w=a.n(_),C=a("fGUm"),b=a("M4fF"),y=a.n(b),x=a("McOJ"),S={name:"chatGroupOptions",components:{selfInput:x.a},props:{width:{type:String,default:function(){return""}},isHasRoomId:{type:Boolean,default:function(){return!1}},isDataIdx:{type:Boolean,default:function(){return!1}},dataIdx:{type:Number,default:function(){return 0}},chatListResult:{type:Array,default:function(){return[]}}},data:function(){return{reset:!1,loading:!1,dialogVisible:!1,ownerOptions:[],owner:"",keyword:"",chatList:[],chatListSelected:[]}},computed:{chatListResultName:function(){return this.chatListResult.map(function(e){return e.name}).join(",")}},watch:{dialogVisible:function(e){e?(this.handleGetOwnerOptions(),this.handleGetChatList()):(this.owner="",this.keyword="",this.reset=!this.reset)}},methods:{handleGetChatList:function(){var e=this;return s()(i.a.mark(function t(){var a,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,e.chatList=[],t.next=5,e.$axios.get(e.URL.BASEURL+e.URL.groupCode_chatGroupList,{params:{keyword:e.keyword,owner:e.owner,has_room_id:!!e.isHasRoomId}});case 5:a=t.sent,n=a.data,(r=void 0===n?{}:n)&&0==r.errno?(e.chatList=r.rst.map(function(e){return p()({},e,{name:e.name||"未设置群名",isSelected:!1})}),e.chatListResult.length&&e.handleGetChatListSelected(),e.handleGetIsSelectedChatStatus()):4002!=r.errno&&e.$message.warning(r.err),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.log("error => ",t.t0);case 14:return t.prev=14,e.loading=!1,t.finish(14);case 17:case"end":return t.stop()}},t,e,[[0,11,14,17]])}))()},handleGetOwnerOptions:function(){var e=this;return s()(i.a.mark(function t(){var a,n,r,s,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.ownerOptions=[],a=""+e.URL.BASEURL+e.URL.chatGroup_chatGroupOwnerIndex,n={},t.next=6,e.$axios.get(a,{params:n});case 6:r=t.sent,s=r.data,(o=void 0===s?{}:s)&&0==o.errno?e.ownerOptions=Array.isArray(o.rst)?o.rst:[]:4002!=o.errno&&e.$message.warning(o.err),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),console.log("error => ",t.t0);case 15:case"end":return t.stop()}},t,e,[[0,12]])}))()},onChangeOwner:function(e){this.owner=e,this.handleGetChatList()},onChangeKeyword:function(e){this.keyword=e,this.handleGetChatList()},handleCloseAllChatList:function(){this.chatList.forEach(function(e){e.isSelected=!1})},handleGetChatListSelected:function(){var e=this;this.chatListResult.forEach(function(t){var a=e.chatList.find(function(e){return e.chat_id===t.chat_id});a&&(!e.chatListSelected.find(function(e){return e.chat_id===a.chat_id})&&e.chatListSelected.push(a))})},handleGetIsSelectedChatStatus:function(){var e=this;this.handleCloseAllChatList(),this.chatListSelected.forEach(function(t){var a=e.chatList.findIndex(function(e){return e.chat_id===t.chat_id});-1!==a&&(e.chatList[a].isSelected=!0)})},handleSwitchChatItem:function(e,t){if(e.isSelected){this.chatList[t].isSelected=!1;var a=this.chatListSelected.findIndex(function(t){return t.chat_id===e.chat_id});-1!==a&&this.chatListSelected.splice(a,1)}else this.chatList[t].isSelected=!0,this.chatListSelected=[].concat(w()(this.chatListSelected),[e])},handleDelSelectedChat:function(e){this.chatListSelected.splice(e,1),this.handleGetIsSelectedChatStatus()},handleDelAllSelectedChat:function(){this.chatListSelected=[],this.handleGetIsSelectedChatStatus()},onClickConfirm:function(){this.chatListSelected.length?(this.isDataIdx?this.$emit("change",{idx:this.dataIdx,res:y.a.cloneDeep(this.chatListSelected)}):this.$emit("change",y.a.cloneDeep(this.chatListSelected)),this.dialogVisible=!1):this.$message.warning("请选择群聊")},handleSetChatGroupsName:function(e){var t=this;return s()(i.a.mark(function a(){var n,r,s;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,t.$axios.get(t.URL.BASEURL+t.URL.groupCode_chatGroupList,{params:{keyword:"",owner:""}});case 3:if(n=a.sent,r=n.data,!(s=void 0===r?{}:r)||0!=s.errno||!Array.isArray(s.rst)){a.next=11;break}return e.forEach(function(t,a){var n=s.rst.find(function(e){return e.chat_id===t.chat_id});n&&(e[a].name=n.name)}),a.abrupt("return",g.a.resolve([].concat(w()(e))));case 11:return a.abrupt("return",g.a.resolve([].concat(w()(e))));case 12:a.next=17;break;case 14:return a.prev=14,a.t0=a.catch(0),a.abrupt("return",g.a.resolve([].concat(w()(e))));case 17:case"end":return a.stop()}},a,t,[[0,14]])}))()}}},k={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"common-screen-item",staticStyle:{"margin-top":"0"}},[a("el-popover",{attrs:{"append-to-body":"",placement:"bottom",trigger:"click"},model:{value:e.dialogVisible,callback:function(t){e.dialogVisible=t},expression:"dialogVisible"}},[a("div",{class:["common-screen-self-box","common-input-select",e.chatListResult.length?"common-input-select-hover":""],style:e.width?"width:"+e.width:"",attrs:{slot:"reference"},slot:"reference"},[a("div",{class:["common-screen-self-con",e.chatListResult.length?"":"common-screen-self-placeholder"]},[a("div",{staticClass:"common-screen-self-con-div"},[e.chatListResult.length?a("span",[e._v(e._s(e.chatListResultName))]):a("span",[e._v("请选择群聊")])])]),e._v(" "),a("div",{staticClass:"common-screen-self-icon"},[a("i",{staticClass:"el-icon-arrow-down"})])]),e._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"flex",staticStyle:{padding:"10px"}},[a("div",{staticClass:"propoverItem"},[a("div",{staticClass:"filter-wrap"},[a("el-select",{staticClass:"select-wrap",attrs:{size:"small",placeholder:"全部群主",clearable:""},on:{change:e.onChangeOwner},model:{value:e.owner,callback:function(t){e.owner=t},expression:"owner"}},e._l(e.ownerOptions,function(e){return a("el-option",{key:e.user_id,attrs:{label:e.name,value:e.user_id}})}),1),e._v(" "),a("self-input",{staticStyle:{"margin-top":"0","margin-bottom":"0"},attrs:{reset:e.reset,hasLabel:!1,label_name:"群名称",width:"180px"},on:{inputChange:e.onChangeKeyword}})],1),e._v(" "),a("div",{staticClass:"allMember"},[e._v("全部群聊("+e._s(e.chatList&&e.chatList.length)+"):")]),e._v(" "),a("div",{staticClass:"memberBoxBig self-scrollbar-3"},e._l(e.chatList,function(t,n){return a("div",{key:t.chat_id,staticClass:"memberBox"},[a("div",{staticClass:"meberList"},[a("div",{staticClass:"memberItem",on:{click:function(a){return e.handleSwitchChatItem(t,n)}}},[a("div",{staticClass:"flex",staticStyle:{flex:"1"}},[a("i",{staticClass:"el-icon-chat-dot-round chat-icon"}),e._v(" "),a("div",{staticClass:"memberInfo"},[a("div",{staticClass:"name"},[e._v(e._s(t.name))]),e._v(" "),a("div",{staticClass:"other"},[e._v("群主:"+e._s(t.owner_name))])])]),e._v(" "),a("div",{class:["checkbox",t.isSelected?"checkbox_active":""]},[a("i",{staticClass:"el-icon-check"})])])])])}),0)]),e._v(" "),a("div",{staticClass:"line"}),e._v(" "),a("div",{staticClass:"propoverItem",staticStyle:{"padding-left":"20px"}},[a("div",{staticClass:"title"},[e._v("已选择的群聊")]),e._v(" "),a("div",{staticClass:"choice_result_top"},[a("div",{staticClass:"clear",on:{click:e.handleDelAllSelectedChat}},[e._v("全部清空")]),e._v(" "),a("div",{staticClass:"result_num"},[e._v("已选择"),a("span",[e._v(e._s(e.chatListSelected.length))]),e._v("个群")])]),e._v(" "),a("div",{staticClass:"member_result self-scrollbar-3"},e._l(e.chatListSelected,function(t,n){return a("div",{key:t.chat_id,staticClass:"memberItem"},[a("div",{staticClass:"flex",staticStyle:{flex:"1"}},[a("i",{staticClass:"el-icon-chat-dot-round chat-icon"}),e._v(" "),a("div",{staticClass:"memberInfo"},[a("div",{staticClass:"name"},[e._v(e._s(t.name))]),e._v(" "),a("div",{staticClass:"other"},[e._v("群主:"+e._s(t.owner_name))])])]),e._v(" "),a("i",{staticClass:"el-icon-close",staticStyle:{"margin-left":"10px"},on:{click:function(t){return e.handleDelSelectedChat(n)}}})])}),0),e._v(" "),a("div",{staticClass:"buttons"},[a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.onClickConfirm}},[e._v("确定")])],1)])])])],1)},staticRenderFns:[]};var L=a("VU/8")(S,k,!1,function(e){a("YaDj")},"data-v-74c81143",null).exports,R={components:{serviceSingle:u.a,selfCustomerservice:C.a,selfChatGroupOptions:L},props:{value:{type:Boolean,default:function(){return!1}},config_id:{type:String|Number,default:function(){return""}}},data:function(){return{pickerOptions:{disabledDate:function(e){return e0,expression:"pagination.total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":e.pagination.page,layout:"prev, pager, next","page-count":Number(e.pagination.pages)},on:{"current-change":e.handleCurrentChange}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"})])},staticRenderFns:[]};var V=a("VU/8")(I,D,!1,function(e){a("b/ZB")},"data-v-0a217100",null).exports,U=new l.a([[0,{label:"禁用",cls:"c-F03F5C"}],[1,{label:"待分配",cls:"c-FFB055"}],[2,{label:"分配中",cls:"c-448AFF"}],[3,{label:"分配完成",cls:"c-58BCA6"}],[4,{label:"无目标客户群",cls:"c-F03F5C"}],[5,{label:"分配失败",cls:"c-F03F5C"}]]),O={name:"groupTransfer",components:{selfInputV2:c.a,selfChannelV2:d.a,serviceSingle:u.a,configDrawer:$,transferResDialog:V},data:function(){return{height:"",loading:!1,pagination:{page:1,page_size:20,pages:0,total:0},filter:{keyword:"",new_owner:"",status:""},list:[],transferResVisible:!1,configDrawerVisible:!1,currentConfigId:""}},created:function(){this.height=document.documentElement.clientHeight-200,this.handleGetList()},methods:{handleGetStatusDesc:function(e){return U.get(Number(e))||{}},handleGetList:function(){var e=this;return s()(i.a.mark(function t(){var a,n,r,s,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,a=""+e.URL.BASEURL+e.URL.groupTransfer_configList,n={keyword:e.filter.keyword,new_owner:e.filter.new_owner,status:e.filter.status,page:e.pagination.page,page_size:e.pagination.page_size},t.next=6,e.$axios.get(a,{params:n});case 6:r=t.sent,s=r.data,(o=void 0===s?{}:s)&&0==o.errno&&Array.isArray(o.rst.data)?(e.list=o.rst.data,e.pagination.total=o.rst.pageInfo.total,e.pagination.pages=o.rst.pageInfo.pages):4002!=o.errno&&(e.$message.warning(o.err),e.list=[],e.pagination.total=0,e.pagination.pages=0),t.next=18;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0),e.list=[],e.pagination.total=0,e.pagination.pages=0;case 18:return t.prev=18,e.loading=!1,t.finish(18);case 21:case"end":return t.stop()}},t,e,[[0,12,18,21]])}))()},onChangeKeyword:function(e){this.filter.keyword=e,this.pagination.page=1,this.handleGetList()},onChangeNewOwner:function(e){this.filter.new_owner=e?e.user_id:"",this.pagination.page=1,this.handleGetList()},onChangeStatus:function(e){this.filter.status=e,this.pagination.page=1,this.handleGetList()},handleCurrentChange:function(e){this.pagination.page=e,this.handleGetList()},onClickStatus:function(e,t){var a=this,n=e.title,r=e.config_id;return s()(i.a.mark(function e(){return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.$confirm("确定"+(1==t?"启用":"禁用")+"【"+n+"】?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:a.handleChangeStatus(r,t),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.log(e.t0);case 9:case"end":return e.stop()}},e,a,[[0,6]])}))()},handleChangeStatus:function(e,t){var a=this;return s()(i.a.mark(function n(){var r,s,o,l,c;return i.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,a.loading=!0,r=""+a.URL.BASEURL+a.URL.groupTransfer_changeStatus,s={config_id:e,status:t},n.next=6,a.$axios.get(r,{params:s});case 6:o=n.sent,l=o.data,(c=void 0===l?{}:l)&&0==c.errno?(a.$message.success("操作成功"),a.handleGetList()):4002!=c.errno&&a.$message.warning(c.err),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(0),console.log(n.t0);case 15:return n.prev=15,a.loading=!1,n.finish(15);case 18:case"end":return n.stop()}},n,a,[[0,12,15,18]])}))()},onClickCreateBtn:function(){this.currentConfigId="",this.configDrawerVisible=!0},onClickEditBtn:function(e){this.currentConfigId=e.config_id,this.configDrawerVisible=!0},onConfirmConfig:function(e){var t=e.isEdit;this.configDrawerVisible=!1,!t&&(this.pagination.page=1),this.handleGetList()},onCancelConfig:function(){this.configDrawerVisible=!1},onClickTransferRes:function(e){this.currentConfigId=e.config_id,this.transferResVisible=!0},onCloseTransferRes:function(){this.currentConfigId="",this.transferResVisible=!1}}},B={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"customerShare-wrap"},[a("div",{staticClass:"screenBox"},[a("div",{staticClass:"filter-wrap"},[a("selfInputV2",{staticStyle:{width:"auto"},attrs:{label_name:"标题",placeholder:"请输入",labelWidth:!0},on:{change:e.onChangeKeyword},model:{value:e.filter.keyword,callback:function(t){e.$set(e.filter,"keyword",t)},expression:"filter.keyword"}}),e._v(" "),a("serviceSingle",{attrs:{title:"新群主",placeholder:"请选择",source:"chatGroup"},on:{customerDefine:e.onChangeNewOwner}}),e._v(" "),a("selfChannelV2",{attrs:{type:"groupTransfer",title:"状态",labelWidth:!0},on:{change:e.onChangeStatus},model:{value:e.filter.status,callback:function(t){e.$set(e.filter,"status",t)},expression:"filter.status"}})],1),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.onClickCreateBtn}},[e._v("客户群分配")])],1),e._v(" "),a("el-table",{staticStyle:{width:"100%","margin-top":"10px"},attrs:{height:e.height,data:e.list,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"配置标题",prop:"title","min-width":"200",align:"center",fixed:"left"}}),e._v(" "),a("el-table-column",{attrs:{label:"创建人",align:"center","min-width":"140"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("div",{staticClass:"customerServiceTagBox"},[a("div",{staticClass:"customerServiceTag"},[a("i",{staticClass:"el-icon-user-solid"}),e._v(" "+e._s(n.create_user))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"转移类型",align:"center","min-width":"140"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("span",[e._v(e._s(1==n.type?"在职迁移":"离职迁移"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"筛选方式",align:"center","min-width":"140"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("span",[e._v(e._s(1==n.filter_type?"按群聊":"按群主"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"新群主",prop:"new_owner_name","min-width":"200",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态",align:"center","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("span",{class:[e.handleGetStatusDesc(n.status).cls]},[e._v(e._s(e.handleGetStatusDesc(n.status).label))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"160",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[0==n.status?a("span",{staticClass:"btn c-007AFF",on:{click:function(t){return e.onClickStatus(n,1)}}},[e._v("启用")]):e._e(),e._v(" "),1==n.status?a("span",{staticClass:"btn c-FF604D",on:{click:function(t){return e.onClickStatus(n,0)}}},[e._v("禁用")]):e._e(),e._v(" "),3==n.status?a("span",{staticClass:"btn c-00b38a",on:{click:function(t){return e.onClickTransferRes(n)}}},[e._v("分配结果")]):e._e(),e._v(" "),0==n.status||1==n.status?a("span",{staticClass:"btn c-00b38a",on:{click:function(t){return e.onClickEditBtn(n)}}},[e._v("编辑")]):e._e()]}}])})],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.pagination.total>0,expression:"pagination.total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":e.pagination.page,layout:"prev, pager, next","page-count":Number(e.pagination.pages)},on:{"current-change":e.handleCurrentChange}})],1),e._v(" "),a("transferResDialog",{attrs:{dialogVisible:e.transferResVisible,config_id:e.currentConfigId},on:{close:e.onCloseTransferRes}}),e._v(" "),a("configDrawer",{attrs:{config_id:e.currentConfigId},on:{confirm:e.onConfirmConfig,cancel:e.onCancelConfig},model:{value:e.configDrawerVisible,callback:function(t){e.configDrawerVisible=t},expression:"configDrawerVisible"}})],1)},staticRenderFns:[]};var E=a("VU/8")(O,B,!1,function(e){a("/hW9")},"data-v-23270022",null);t.default=E.exports},YaDj:function(e,t){},"b/ZB":function(e,t){},"bKq+":function(e,t){}});