(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["selectStudent"],{"209e":function(t,e,r){"use strict";r("a933")},4359:function(t,e,r){},"59cd":function(t,e,r){"use strict";r("4359")},"672c":function(t,e,r){"use strict";r("fd2e")},"6e6e":function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mheader"},[r("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[r("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),r("div",{staticClass:"m-nav-bar__title"},[t._t("default",(function(){return[t._v(t._s(t.name?t.name:t.$route.meta.descrition))]}))],2),r("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},o=[],i={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}}},a=i,c=(r("70bb"),r("2877")),u=Object(c["a"])(a,n,o,!1,null,"10a70108",null);e["a"]=u.exports},"70bb":function(t,e,r){"use strict";r("c905")},"852e":function(t,e,r){},a933:function(t,e,r){},bad8:function(t,e,r){"use strict";r("852e")},c262:function(t,e,r){"use strict";r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return s})),r.d(e,"c",(function(){return l})),r.d(e,"f",(function(){return f})),r.d(e,"g",(function(){return h})),r.d(e,"d",(function(){return p})),r.d(e,"e",(function(){return d}));var n=r("2b7c");function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",c=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(E){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(E){return{type:"throw",arg:E}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var y={};s(y,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==e&&r.call(g,a)&&(y=g);var b=v.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(i,a,c,u){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==o(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function S(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function j(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function a(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)}))}}var u=function(){var t=c(i().mark((function t(e){return i().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(n["a"])({url:"/activityUserMapper/createVipGroup",method:"post",data:e}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),s=function(){var t=c(i().mark((function t(e){return i().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(n["a"])({url:"/activityUserMapper/createPracticeGroup",method:"post",data:e}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),l=function(){var t=c(i().mark((function t(e){return i().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(n["a"])({url:"/activityUserMapper/queryActivityCourseTimeList",method:"post",data:e}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),f=function(t){return Object(n["a"])({url:"/student/queryStuSubjectId",method:"get"})},h=function(){var t=c(i().mark((function t(e){var r;return i().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(n["a"])({url:"/activityUserMapper/queryActivityStudentList",method:"post",data:e});case 3:return r=t.sent,t.abrupt("return",r);case 7:t.prev=7,t.t0=t["catch"](0);case 9:return t.abrupt("return","");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),p=function(){var t=c(i().mark((function t(){var e;return i().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(n["a"])({url:"/activityUserMapper/queryWaitCourseCategory",method:"post"});case 3:return e=t.sent,t.abrupt("return",e);case 7:t.prev=7,t.t0=t["catch"](0);case 9:return t.abrupt("return","");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),d=function(){var t=c(i().mark((function t(){return i().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(n["a"])({url:"/organization/queryEmployeeOrgan",method:"get"}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},c905:function(t,e,r){},d678:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mempty",class:t.full?"full":null},[r("div",{class:[t.icon?t.icon:"icon_nodata","icon"]}),r("div",{staticClass:"msg"},[t._v(t._s(t.msg?t.msg:"暂无内容"))])])},o=[],i={name:"mempty",props:{icon:String,msg:String,full:Boolean}},a=i,c=(r("bad8"),r("2877")),u=Object(c["a"])(a,n,o,!1,null,"31cc2a9d",null);e["a"]=u.exports},fb87:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"selectStudent"},[r("div",{staticClass:"selectStudentWrap"},[r("m-header",{attrs:{isBack:!0}}),r("van-search",{staticClass:"searchWrap",attrs:{shape:"round","show-action":""},on:{search:function(e){return t.onSearch()}},scopedSlots:t._u([{key:"action",fn:function(){return[r("div",{on:{click:function(e){return t.onSearch()}}},[t._v("筛选")])]},proxy:!0}]),model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),r("van-dropdown-menu",{staticClass:"selectStudent-dropdown",attrs:{"active-color":"#01C1B5"}},[r("van-dropdown-item",{ref:"dropdown",attrs:{title:"声部"},on:{close:function(e){return t.onOpenDropdown("dropdownDrop")}}},[r("template",{slot:"default"},[r("DropSelect",{ref:"dropdownDrop",attrs:{options:t.option2},on:{onFilter:t.onFilter2}})],1)],2),t.options3.length?r("van-dropdown-item",{attrs:{options:t.options3},on:{change:t.getStudents},model:{value:t.value3,callback:function(e){t.value3=e},expression:"value3"}}):t._e()],1)],1),r("div",{staticClass:"students"},[t._l(t.studentsData,(function(e,n){return r("van-cell",{key:e.value,attrs:{title:e.text,label:e.subjectName,center:"",clickable:""},on:{click:function(e){return t.onSelectStudent(n)}}},[e.avatar?r("img",{staticClass:"stuAvatar",attrs:{slot:"icon",src:e.avatar},slot:"icon"}):r("img",{staticClass:"stuAvatar",attrs:{slot:"icon"},slot:"icon"}),r("div",{staticClass:"students-right"},[r("span",{staticStyle:{"margin-left":"auto","margin-right":"20px"}},[t._v(t._s(e.subCourseNum)+"课时")]),r("van-checkbox",{attrs:{value:e.checked}})],1)])})),t.loading||t.studentsData.length?t._e():r("MEmpty",{attrs:{msg:"暂无学员"}})],2),r("div",{staticStyle:{height:"50px"}}),r("van-submit-bar",{staticClass:"selectStudent-submit-bar",attrs:{"button-text":"下一步","button-type":"info",disabled:!t.selectStudents.length},on:{submit:t.onSubmit}},[r("van-dropdown-menu",{attrs:{"active-color":"#01C1B5",direction:"up"}},[r("van-dropdown-item",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v("\n 已选学生\n "),r("span",{staticStyle:{color:"red"}},[t._v(t._s(t.selectStudents.length))]),t._v(" 名\n ")]},proxy:!0}])},[r("template",{slot:"default"},[r("div",{staticClass:"submit-bar-popup-title"},[t._v("已选学生")]),t._l(t.selectStudents,(function(e){return r("van-cell",{key:e.value,attrs:{title:e.text,label:e.subjectName,center:""}},[e.avatar?r("img",{staticClass:"stuAvatar",attrs:{slot:"icon",src:e.avatar},slot:"icon"}):r("van-icon",{attrs:{slot:"icon",name:"manager"},slot:"icon"}),r("van-icon",{attrs:{name:"clear",size:"25"},on:{click:function(r){return t.onDelete(e)}}})],1)}))],2)],2)],1)],1)],1)},o=[],i=r("c262"),a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"checkboxs"},t._l(t.list,(function(e){return r("van-cell",{key:e.value,attrs:{clickable:"",title:e.text},on:{click:function(t){e.checked=!e.checked}},scopedSlots:t._u([{key:"right-icon",fn:function(){return[r("van-checkbox",{attrs:{value:e.checked,name:e.value}})]},proxy:!0}],null,!0)})})),1),r("van-cell",{staticClass:"selectStudent-action-cell",attrs:{center:""},scopedSlots:t._u([{key:"title",fn:function(){return[r("van-checkbox",{staticStyle:{"margin-right":"15px"},attrs:{value:t.checkAll},on:{click:t.setCheckAll}},[t._v("全选"),t.getSelectedLength?r("span",[t._v("(已选 "+t._s(t.getSelectedLength)+")")]):t._e()])]},proxy:!0}])},[r("van-button",{staticStyle:{"margin-right":"10px"},attrs:{size:"small",round:"",block:""},on:{click:t.onreSet}},[t._v("重置")]),r("van-button",{attrs:{size:"small",round:"",block:"",type:"info"},on:{click:t.onFilter}},[t._v("确定")])],1)],1)},c=[];function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function k(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function _(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){k(i,n,o,a,c,"next",t)}function c(t){k(i,n,o,a,c,"throw",t)}a(void 0)}))}}var O={name:"selectStudent",components:{DropSelect:v,MEmpty:y["a"],MHeader:m["a"]},data:function(){return{activityId:this.$route.query.categoryId,search:"",option1:[],option2:[],studentsData:[],selectStudents:[],value3:0,options3:[],loading:!0}},mounted:function(){this.selectStudents=this.$store.state.activeStudents,this.init()},methods:{init:function(){var t=_(S().mark((function t(){var e=this;return S().wrap((function(t){while(1)switch(t.prev=t.next){case 0:Promise.all([Object(i["e"])(),Object(i["f"])(),Object(i["c"])({categoryId:this.$route.query.categoryId})]).then((function(t){var r=t[0],n=t[1],o=t[2];r&&r.data&&Array.isArray(r.data)&&(e.option1=r.data.map((function(t){return{text:t.name,value:t.id,checked:!0}}))),n&&n.data&&Array.isArray(n.data)&&(e.option2=n.data.filter((function(t){return t})).map((function(t){return{text:t.value,value:t.key,checked:!0}}))),o&&o.data&&Array.isArray(o.data)&&(e.options3=o.data.map((function(t,r){return 0===r&&(e.value3=t),{text:"单课时长".concat(t,"分钟"),value:t}}))),e.getStudents(),console.log(t)}));case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getStudents:function(){var t=_(S().mark((function t(){var e,r,n,o=this;return S().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,e=this.option2.map((function(t){return t.checked?t.value:void 0})).filter((function(t){return t})),r=this.option1.map((function(t){return t.checked?t.value:void 0})).filter((function(t){return t})),t.next=5,Object(i["g"])({categoryId:this.$route.query.categoryId,search:this.search,singleCourseTime:this.value3,subjectIds:e.join(",")||void 0,organIds:r.join(",")||void 0});case 5:n=t.sent,n&&n.data&&Array.isArray(n.data)&&(this.studentsData=n.data.map((function(t){return t.checked=o.selectStudents.filter((function(e){return e.value==t.userId})).length>0,t.text=t.username,t.value=t.userId,w({},t)}))),this.loading=!1;case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),onSearch:function(){this.getStudents()},onFilter1:function(t){this.option1=t.map((function(t){return w({},t)})),this.getStudents(),this.$refs.fenbu.toggle(!1)},onFilter2:function(t){this.option2=t.map((function(t){return w({},t)})),this.getStudents(),this.$refs.dropdown.toggle(!1)},onOpenDropdown:function(t){var e=this;this.$nextTick((function(){e.$refs[t].setList()}))},onSelectStudent:function(t){var e=this,r=this.selectStudents.findIndex((function(r){return r.value==e.studentsData[t].value}));if(r>-1)this.studentsData[t].checked&&(this.selectStudents.splice(r,1),this.studentsData[t].checked=!1);else{var n=parseInt(this.$route.query.studentNum);if(n&&this.selectStudents.length==n)return void this.$toast("已到达该类型课程学生人数上限");this.studentsData[t].checked=!0,this.selectStudents.push(w({},this.studentsData[t]))}},onDelete:function(t){var e=this.selectStudents.findIndex((function(e){return e.value==t.value})),r=this.selectStudents.find((function(e){return e.value==t.value}));if(this.selectStudents.splice(e,1),r){var n=this.studentsData.findIndex((function(e){return e.value==t.value}));n>-1&&(this.studentsData[n].checked=!1)}},onSubmit:function(){var t=parseInt(this.$route.query.studentNum);if("乐理课"==this.$store.state.activeCourse.name){if(this.selectStudents.length>t)return void this.$toast("已到达该类型课程学生人数上限")}else if(t!=this.selectStudents.length)return void this.$toast("所选学生人数不足");for(var e={id:null,name:null},r=0;r