1"use strict";(self.webpackChunkcmp_fe_cli4_0=self.webpackChunkcmp_fe_cli4_0||[]).push([["12898"],{33768:function(e,t,s){s.d(t,{Z:function(){return u}});var i=s("18588"),r=s("23042"),a=s("94606"),o=s("74116"),l=s("64778"),n=s("53965"),d=s("56093"),p={props:{accountId:Number,confirm:Function},components:{SupportPartnerDialog:i.Z},data:()=>({partnerTypeList:n.xX.$getValues(),userType:"platformUser",dialogLoading:!0,confirmLoading:!1,userData:{thead:[{id:"name",label:"ç¨æ·åç§°"},{id:"roles",label:"å¹³å°è§è²"}],tbody:[],totalItems:0},userOptions:{},selectedUser:[]}),computed:{getPartnerPlaceholder(){return n.xX.$is(this.userType,"platformUser","externalUser")?"请è¾å
¥ç¨æ·åç§°":"请è¾å
¥ç¨æ·ç»åç§°"},getPartnerFetch(){return this[({platformUser:"getUserLists",platformUserGroup:"getUserGroupList",externalUser:"getExternalUserList",externalUserGroup:"getExternalUserGroupList"})[this.userType]]}},methods:{open(){this.$refs.dialogAddUser.open()},setData({platformUser:e=[],platformUserGroup:t=[],externalUser:s=[],externalUserGroup:i=[]}){this.selectedUser=[...e.map(e=>({...e,type:"platformUser"})),...t.map(e=>({...e,type:"platformUserGroup"})),...s.map(e=>({...e,type:"externalUser"})),...i.map(e=>({...e,type:"externalUserGroup"}))]},handleSelectionChange(e){this.selectedUser=e},confirmAddUser(){let{platformUser:e=[],platformUserGroup:t=[],externalUser:s=[],externalUserGroup:i=[]}=(0,d.groupBy)(this.selectedUser,"type"),a={ticketUserIds:e.map(e=>e.id),visibleUserGroupIds:t.map(e=>e.id),externalUserIds:s.map(e=>e.id),externalGroupIds:i.map(e=>e.id)};if("function"==typeof this.confirm){this.confirm({platformUser:e,platformUserGroup:t,externalUser:s,externalUserGroup:i}),this.$refs.dialogAddUser.close(),this.$refs.dialogAddUser.clearSelection();return}this.confirmLoading=!0;let o={data:{ticketNo:this.ticketNo,...a}};r.Z.updateTicketUser(o).then(()=>{this.$message.success("ä¿®æ¹æå"),this.getSupportDetail(),this.$refs.dialogAddUser.close(),this.$refs.dialogAddUser.clearSelection(),this.confirmLoading=!1}).catch(()=>this.confirmLoading=!1)},changeUserType(){this.$refs.dialogAddUser.open(),n.xX.$is(this.userType,"platformUser")?this.userData.thead=[{id:"name",label:"ç¨æ·åç§°"},{id:"roles",label:"å¹³å°è§è²"}]:this.userData.thead=[{id:"name",label:"ç¨æ·åç§°"},{id:"description",label:"夿³¨"}]},getUserLists(e={}){this.userOptions=e,this.dialogLoading=!0,e.params.accountId=this.accountId,r.Z.getTicketUserList(e).then(({data:e})=>{this.userData.tbody=e.data.map(e=>({...e,type:"platformUser"})),this.userData.totalItems=e.page.total,this.dialogLoading=!1}).catch(()=>this.dialogLoading=!1)},getUserGroupList(e={}){this.userOptions=e,this.dialogLoading=!0,e.accountId=this.accountId,a.Z.getTicketUserGroupList(e).then(({data:e})=>{this.userData.tbody=e.data.map(e=>({...e,type:"platformUserGroup"})),this.userData.totalItems=e.page.total,this.dialogLoading=!1}).catch(()=>this.dialogLoading=!1)},async getExternalUserList(e={}){this.userOptions=e,this.dialogLoading=!0,e.params.accountId=this.accountId;try{let{data:t}=await o.Z.getExternalUserList(e);this.userData.tbody=t.data.map(e=>({...e,type:"externalUser"})),this.userData.totalItems=t.page.total}catch(e){console.log(e)}this.dialogLoading=!1},async getExternalUserGroupList(e={}){this.userOptions=e,this.dialogLoading=!0,e.params.accountId=this.accountId;try{let{data:t}=await l.Z.getExternalUserGroupsList(e);this.userData.tbody=t.data.map(e=>({...e,type:"externalUserGroup"})),this.userData.totalItems=t.page.total}catch(e){console.log(e)}this.dialogLoading=!1}}},u=(0,s("41772").Z)(p,function(){var e=this,t=e._self._c;return t("SupportPartnerDialog",e._b({ref:"dialogAddUser",attrs:{title:"å·¥ååå人",dialogWidth:"50%",placeholder:e.getPartnerPlaceholder,isTableDialog:!0,loading:e.dialogLoading,tableData:e.userData,getTableData:e.getPartnerFetch,limitLength:!0,handleMultipleChange:e.handleSelectionChange,pageOptions:e.userOptions,confirmLoading:e.confirmLoading,selectedData:e.selectedUser},on:{handleConfirm:e.confirmAddUser,"update:selectedData":function(t){e.selectedUser=t},"update:selected-data":function(t){e.selectedUser=t}}},"SupportPartnerDialog",e.$attrs,!1),[t("el-radio-group",{attrs:{slot:"userType",size:"mini"},on:{change:e.changeUserType},slot:"userType",model:{value:e.userType,callback:function(t){e.userType=t},expression:"userType"}},e._l(e.partnerTypeList,function(s){return t("el-radio-button",{key:s.value,attrs:{label:s.value}},[e._v(" "+e._s(s.label)+" ")])}),1)],1)},[],!1,null,"d3015936",null).exports},48129:function(e,t,s){s.d(t,{Z:function(){return n}});var i,r,a=s("64601"),o=s("90007"),l=s("23042"),n=(0,s("41772").Z)({props:{accountId:Number,confirm:Function,initSelected:Array,isLimit:{type:Boolean,default:!0},limitLength:{type:Number,default:7}},data:()=>({selectedDispose:[],disposeLoading:!1,userDispose:{thead:[{id:"name",label:"ç¨æ·åç§°"},{id:"roleName",label:"å¹³å°è§è²"}],tbody:[],totalItems:0}}),render(){return(0,a.h)(o.Z,{props:{...this.$attrs},ref:"AddUser",attrs:{title:"å·¥åå¤ç人",dialogWidth:"50%",placeholder:"请è¾å
¥ç¨æ·åç§°",isTableDialog:!0,loading:this.disposeLoading,tableData:this.userDispose,getTableData:this.getDisposeList,limitLength:!0,handleMultipleChange:this.disposeSelectionChange,pageOptions:this.disposeOptions,confirmLoading:this.confirmLoading,selectedData:this.selectedDispose},on:{handleConfirm:this.confirmDispose,cancelDialog:this.closeDialog}})},watch:{initSelected(e){e&&e.length>0&&(this.selectedDispose=this.initSelected)}},methods:{getDisposeList(e={}){this.disposeOptions=e,this.disposeLoading=!0,e.params.accountId=this.accountId,l.Z.getDisposeUserList(e).then(({data:e})=>{this.userDispose.tbody=e.data,this.userDispose.totalItems=e.page.total,this.disposeLoading=!1}
1).catch(()=>this.disposeLoading=!1)},disposeSelectionChange(e){this.selectedDispose=e},confirmDispose(){if(this.isLimit&&this.selectedDispose.length>this.limitLength)return this.selectedDispose=this.initSelected,this.$message.info(`å·¥åå¤ç人æå¤æ·»å ${this.limitLength}个`);if(0===this.selectedDispose.length)return this.$message.info("å·¥åå¤ç人æå°æ·»å 1个");let e=[];if(this.selectedDispose.forEach(t=>{t.id&&e.push(t.id)}),"function"==typeof this.confirm){this.confirm(this.selectedDispose),this.$refs.AddUser.close(),this.$refs.AddUser.clearSelection();return}this.confirmLoading=!0;let t={data:{ticketNo:this.ticketNo,ticketDisposeIds:e}};l.Z.updateDisposeUser(t).then(()=>{this.$message.success("ä¿®æ¹æå"),this.getSupportDetail(),this.$refs.AddUser.close(),this.$refs.AddUser.clearSelection(),this.confirmLoading=!1}).catch(()=>this.confirmLoading=!1)},open(){this.$refs.AddUser.open()},closeDialog(){console.log(this.initSelected,"closeDialog----------------"),this.selectedDispose=this.initSelected}}},i,r,!1,null,"6e604f86",null).exports},64778:function(e,t,s){var i=s(47534);class r extends i.Z{constructor(){super(),this.baseURL+="/ops/ams"}getExternalUserGroupsList(e={}){return e.url="/external/groups",this.get(e)}createExternalUserGroups(e={}){return e.url="/external/groups",this.put(e)}deleteExternalUserGroups(e={}){return e.url="/external/groups",this.delete(e)}bindExternalUser(e={}){return e.url=`/external/${e.groupId}/user`,this.put(e)}}let a=new r;t.Z=a},74116:function(e,t,s){var i=s(47534);class r extends i.Z{constructor(){super(),this.baseURL+="/ops/ams"}getExternalUserList(e={}){return e.url="/external/users",this.get(e)}createExternalUser(e={}){return e.url="/external/users",this.put(e)}deleteExternalUser(e={}){return e.url="/external/users",this.delete(e)}bindExternalUserGroup(e={}){return e.url="/external/to/group",this.put(e)}}let a=new r;t.Z=a},94606:function(e,t,s){var i=s(47534);class r extends i.Z{constructor(){super(),this.baseURL+="/ops/ams"}getUserGroupList(e={}){return e.url="/groups",this.api(e)}getTicketUserGroupList(e={}){return e.url=`/${e.accountId}/groups`,this.api(e)}addUserGroup(e={}){return e.url="/group",e.method="post",this.api(e)}editUserGroup(e={}){return e.url=`/group/${e.id}`,e.method="patch",this.api(e)}getUserGroupDetail(e={id:""}){return e.url=`/group/${e.id}`,this.api(e)}deleteUserGroup(e={id:""}){return e.url=`/group/${e.id}`,e.method="delete",this.api(e)}removeUser(e={id:""}){return e.url=`/group/${e.id}/users/removal`,e.method="delete",this.api(e)}updateUsers(e={}){return e.url=`/group/${e.id}/users`,e.method="patch",this.api(e)}}let a=new r;t.Z=a}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.