;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._label_1m3l4_1{margin-right:.21333rem;font-size:.37333rem}._label_1m3l4_1 .van-list__loading,._label_1m3l4_1 .van-list__finished-text,._label_1m3l4_1 .van-list__error-text{width:100%}._label_1m3l4_1 .iconfont-down{margin-left:.10667rem}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.1bb96d98.js','./index-legacy.1cd7b6bb.js','./index-legacy.edec5e29.js','./organ-search-legacy.28bb6854.js','./vendor-legacy.031e1374.js','./index-legacy.f25f109a6.js','./index-legacy.f25f109a5.js','./index-legacy.0e006617.js','./index-legacy.f25f109a8.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a3.js','./index-legacy.f25f109a10.js','./icon_student-legacy.45be2fa9.js'],function(exports){'use strict';var ColHeader,request,ColResult,ColSearch,OrganSearch,defineComponent,useRect,createVNode,Fragment,Sticky,Icon,List,createTextVNode,isVNode,Popup,Student;return{setters:[function(module){ColHeader=module.C;},function(module){request=module.r;ColResult=module.C;},function(module){ColSearch=module.C;},function(module){OrganSearch=module.O;},function(module){defineComponent=module.d;useRect=module.v;createVNode=module.a;Fragment=module.F;Sticky=module.S;Icon=module.u;List=module.w;createTextVNode=module.j;isVNode=module.x;Popup=module.P;},function(){},function(){},function(module){Student=module.S;},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var label="_label_1m3l4_1";var styles={label:label};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var index=exports('default',defineComponent({name:'myStudent',data:function data(){return{searchStatus:false,openStatus:false,subjectList:[],list:[],dataShow:true,// 判断是否有数据
loading:false,finished:false,params:{userName:'',subjectName:'全部声部',subjectId:null,page:1,rows:20},height:'auto'};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res,_useRect,height;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.get('/api-teacher/subject/subjectSelect');case 3:res=_context.sent;_this.subjectList=res.data||[];_context.next=9;break;case 7:_context.prev=7;_context.t0=_context["catch"](0);case 9:_this.getList();_useRect=useRect(_this.$refs.headers),height=_useRect.height;_this.height=height;case 12:case"end":return _context.stop();}}},_callee,null,[[0,7]]);}))();},methods:{onSort:function onSort(){this.params.page=1;this.list=[];this.dataShow=true;// 判断是否有数据
this.loading=false;this.finished=false;this.searchStatus=false;this.getList();},onSearch:function onSearch(val){this.params.userName=val;this.onSort();},getList:function getList(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var res,result;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.post('/api-teacher/courseSchedule/selectStudent',{data:_this2.params});case 3:res=_context2.sent;_this2.loading=false;result=res.data||{};// 处理重复请求数据
if(!(_this2.list.length>0&&result.pageNo===1)){_context2.next=8;break;}return _context2.abrupt("return");case 8:_this2.list=_this2.list.concat(result.rows||[]);_this2.finished=result.pageNo>=result.totalPage;_this2.params.page=result.pageNo+1;_this2.dataShow=_this2.list.length>0;_context2.next=18;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](0);_this2.dataShow=false;_this2.finished=true;case 18:case"end":return _context2.stop();}}},_callee2,null,[[0,14]]);}))();}},render:function render(){var _this3=this;var _slot;return createVNode(Fragment,null,[createVNode(Sticky,null,{default:function _default(){return[createVNode("div",{"ref":"headers"},[createVNode(ColHeader,{"isFixed":false,"border":false},null),createVNode(ColSearch,{"placeholder":"请输入学员名称","onSearch":_this3.onSearch},{left:function left(){return createVNode("div",{"class":styles.label,"onClick":function onClick(){_this3.searchStatus=!_this3.searchStatus;_this3.openStatus=!_this3.openStatus;}},[_this3.params.subjectName,createVNode(Icon,{"classPrefix":"iconfont","name":"down","size":12,"color":"#333"},null)]);}})])];}}),this.dataShow?createVNode(List,{"loading":this.loading,"onUpdate:loading":function onUpdateLoading($event){return _this3.loading=$event;},"finished":this.finished,"finishedText":" ","class":[styles.liveList,'mb12'],"immediateCheck":false,"onLoad":this.getList},_isSlot(_slot=this.list.map(function(item){return createVNode(Student,{"item":{userName:item.userName,subjectName:item.subjectName,avatar:item.avatar}},{default:function _default(){return[item.lastEndClass!==0&&createVNode(Fragment,null,[createTextVNode("\u4E0A\u6B21\u8BFE\u7A0B "),item.lastEndClass,createTextVNode(" \u5929\u524D")])];}});}))?_slot:{default:function _default(){return[_slot];}}):createVNode(ColResult,{"btnStatus":false,"classImgSize":"SMALL","tips":"暂无学员"},null),createVNode(Popup,{"show":this.searchStatus,"position":"bottom","round":true,"closeable":true,"safe-area-inset-bottom":true,"onClose":function onClose(){return _this3.searchStatus=false;},"onClosed":function onClosed(){return _this3.openStatus=false;}},{default:function _default(){return[_this3.openStatus&&createVNode(OrganSearch,{"subjectList":_this3.subjectList,"onSort":_this3.onSort,"isReset":true,"modelValue":_this3.params.subjectId,"onUpdate:modelValue":function onUpdateModelValue($event){return _this3.params.subjectId=$event;},"subjectName":_this3.params.subjectName,"onUpdate:subjectName":function onUpdateSubjectName($event){return _this3.params.subjectName=$event;}},null)];}})]);}}));}};});})();
