(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1845ebb3"],{"05d9":function(e,t,r){},"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,r,n){return e/=n/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,r){var i=o(),s=e-i,u=20,c=0;t="undefined"===typeof t?500:t;var l=function e(){c+=u;var o=Math.easeInOutQuad(c,i,s,t);a(o),c0)this.chioseIdList=this.chioseIdList.concat(e),this.chioseIdList=this.$helpers.lodash.uniqBy(this.chioseIdList,"userId");else{if(this.isNewPage)return;var r=this.chioseIdList.map((function(e){return e.userId}));this.$nextTick((function(){var e=[];t.tableList.forEach((function(n){e.push(n.userId),-1!=r.indexOf(n.userId)&&t.$refs.multipleSelection.toggleRowSelection(n,!1)})),t.chioseIdList=t.$helpers.lodash.remove(t.chioseIdList,(function(t){return-1==e.indexOf(t.userId)})),t.chioseIdList.length<=0&&t.clearCom()}))}},clearCom:function(){this.chioseIdList=[],this.$refs.multipleSelection.clearSelection()},onTableSelect:function(e,t){var r=this.chioseIdList.map((function(e){return e.userId}));-1!=r.indexOf(t.userId)&&(this.chioseIdList.splice(r.indexOf(t.userId),1),this.chioseIdList.length<=0&&this.clearCom())},onClose:function(){this.clearCom(),this.searchForm.search="",this.lookVisible=!1},openDioag:function(e){this.activeRow=e,this.lookVisible=!0,this.getList()},onBranchChange:function(){var e=Object(u["a"])(Object(s["a"])().mark((function e(t){var r,n=this;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.$set(this.searchForm,"cooperationOrganId",[]),this.$set(this.searchForm,"musicGroupId",[]),!(t&&t.length>0)){e.next=14;break}return r=t.join(","),e.prev=4,e.next=7,Object(h["E"])({organId:r}).then((function(e){200==e.code&&(n.cooperationList=e.data)}));case 7:return e.next=9,Object(f["a"])({organId:r,page:1,rows:9999,status:"PROGRESS"}).then((function(e){200==e.code&&(n.teamList=e.data.rows)}));case 9:e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](4),console.log(e.t0);case 14:case"end":return e.stop()}}),e,this,[[4,11]])})));function t(t){return e.apply(this,arguments)}return t}(),addAllStudent:function(){var e=Object(u["a"])(Object(s["a"])().mark((function e(){var t,r,n,a,u,l;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this.searchForm,r=t.organIdList,n=t.cooperationOrganId,a=t.musicGroupId,u=t.groupList,l=Object(i["a"])(t,g),r.join(",")||n.join(",")||a.join(",")||u.join(",")||this.searchForm.search||subjectId){e.next=4;break}return this.$message.error("请至少选择一个搜索条件"),e.abrupt("return");case 4:return e.prev=4,e.next=7,this.$confirm("确认后当前所选条件下所有学生都可观看直播","提示",{type:"warning"});case 7:return e.next=9,Object(c["b"])(Object(o["a"])(Object(o["a"])({organIds:r.join(","),schoolIds:n.join(","),teamIds:a.join(","),groupIds:u.join(",")},l),{},{roomUid:this.activeRow.roomUid}));case 9:e.sent,this.$message.success("添加成功"),this.$emit("getList"),this.onClose(),e.next=17;break;case 15:e.prev=15,e.t0=e["catch"](4);case 17:case"end":return e.stop()}}),e,this,[[4,15]])})));function t(){return e.apply(this,arguments)}return t}()}},O=v,L=(r("b7df"),r("2877")),j=Object(L["a"])(O,d,p,!1,null,"a71c158e",null),I=j.exports,w=r("5f87"),y=r("3908"),S=["organIdList","cooperationOrganId","musicGroupId","groupList"],k={name:"liveAddStudentList",components:{pagination:l["a"],addStudentModel:I},data:function(){return{headers:{Authorization:Object(w["b"])(),tenantId:Object(w["a"])()},searchForm:{search:"",organIdList:[],cooperationOrganId:[],musicGroupId:[],groupList:[]},tableList:[],organList:[],cooperationList:[],groupList:[],teamList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},addMuiscVisible:!1,multipleSelection:[],chioseIdList:[],isNewPage:!1,lookVisible:!1,activeRow:{sendFlag:!1}}},mounted:function(){this.$store.dispatch("setSubjects"),this.$store.dispatch("setBranchs"),this.getGroupList(),this.getList()},methods:{getGroupList:function(){var e=Object(u["a"])(Object(s["a"])().mark((function e(){var t;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(m["i"])({page:1,rows:9999});case 2:t=e.sent,this.groupList=t.data.rows;case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getList:function(){var e=Object(u["a"])(Object(s["a"])().mark((function e(){var t,r,n,a,u,l,d,p,m=this;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=this.searchForm,r=t.organIdList,n=t.cooperationOrganId,a=t.musicGroupId,u=t.groupList,l=Object(i["a"])(t,S),e.next=4,Object(c["y"])(Object(o["a"])(Object(o["a"])({organIds:r.join(","),schoolIds:n.join(","),teamIds:a.join(","),groupIds:u.join(",")},l),{},{page:this.rules.page,rows:this.rules.limit,roomUid:this.$route.query.roomUid}));case 4:d=e.sent,this.tableList=d.data.rows,this.rules.total=d.data.total,p=this.chioseIdList.map((function(e){return e.userId})),this.isNewPage=!0,this.$nextTick((function(){m.tableList.forEach((function(e){-1!=p.indexOf(e.userId)&&m.$refs.multipleSelection.toggleRowSelection(e,!0)})),m.isNewPage=!1})),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](0),console.log(e.t0);case 15:case"end":return e.stop()}}),e,this,[[0,12]])})));function t(){return e.apply(this,arguments)}return t}(),search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.searchForm={search:"",organIdList:[],cooperationOrganId:[],musicGroupId:[],groupList:[]},this.clearCom(),this.search()},handleSelectionChange:function(e){var t=this;if(e.length>0)this.chioseIdList=this.chioseIdList.concat(e),this.chioseIdList=this.$helpers.lodash.uniqBy(this.chioseIdList,"userId");else{if(this.isNewPage)return;var r=this.chioseIdList.map((function(e){return e.userId}));this.$nextTick((function(){var e=[];t.tableList.forEach((function(n){e.push(n.userId),-1!=r.indexOf(n.userId)&&t.$refs.multipleSelection.toggleRowSelection(n,!1)})),t.chioseIdList=t.$helpers.lodash.remove(t.chioseIdList,(function(t){return-1==e.indexOf(t.userId)})),t.chioseIdList.length<=0&&t.clearCom()}))}},clearCom:function(){this.chioseIdList=[],this.$refs.multipleSelection.clearSelection()},onTableSelect:function(e,t){var r=this.chioseIdList.map((function(e){return e.userId}));-1!=r.indexOf(t.userId)&&(this.chioseIdList.splice(r.indexOf(t.userId),1),this.chioseIdList.length<=0&&this.clearCom())},onCancel:function(){this.$router.push("/liveClassManager"),this.$store.dispatch("delVisitedViews",this.$route)},deteleBlack:function(){var e=Object(u["a"])(Object(s["a"])().mark((function e(t){var r=this;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$confirm("你确定将".concat(t.username,"移除直播间?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(u["a"])(Object(s["a"])().mark((function e(){return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(c["n"])({roomUid:r.$route.query.roomUid,ids:t.userId+""});case 3:e.sent,r.getList(),r.clearCom(),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).catch();case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),addBlack:function(){this.$refs.addStudentModel.openDioag({roomUid:this.$route.query.roomUid})},removes:function(){var e=this;if(!this.chioseIdList||this.chioseIdList.length<=0)this.$message.error("请至少选择一名学员");else{var t=this.chioseIdList.map((function(e){return e.username})).join(",");this.$confirm("你确定将".concat(t,"移除直播间?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(u["a"])(Object(s["a"])().mark((function t(){var r;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=e.chioseIdList.map((function(e){return e.userId})).join(","),t.prev=1,t.next=4,Object(c["n"])({roomUid:e.$route.query.roomUid,ids:r});case 4:t.sent,e.$message.success("删除成功"),e.getList(),e.clearCom(),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](1),console.log(t.t0);case 13:case"end":return t.stop()}}),t,null,[[1,10]])})))).catch()}},onBranchChange:function(){var e=Object(u["a"])(Object(s["a"])().mark((function e(t){var r,n=this;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.$set(this.searchForm,"cooperationOrganId",[]),this.$set(this.searchForm,"musicGroupId",[]),!(t&&t.length>0)){e.next=14;break}return r=t.join(","),e.prev=4,e.next=7,Object(h["E"])({organId:r}).then((function(e){200==e.code&&(n.cooperationList=e.data)}));case 7:return e.next=9,Object(f["a"])({organId:r,page:1,rows:9999,status:"PROGRESS"}).then((function(e){200==e.code&&(n.teamList=e.data.rows)}));case 9:e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](4),console.log(e.t0);case 14:case"end":return e.stop()}}),e,this,[[4,11]])})));function t(t){return e.apply(this,arguments)}return t}(),beforeUpload:function(e){y["a"].startLoading()},handleSuccess:function(e,t,r){y["a"].endLoading(),200==e.code?(this.$message.success("导入成功"),this.getList()):this.$message.error(e.msg)},handleError:function(e,t,r){y["a"].endLoading()}}},x=k,G=(r("fcbb"),Object(L["a"])(x,n,a,!1,null,"4dbaa771",null));t["default"]=G.exports},fcbb:function(e,t,r){"use strict";r("cab5")}}]);