;(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="._searchList_1bbiv_1{display:flex;padding:.32rem .42667rem;background-color:#fff}._dataItem_1bbiv_6{font-size:.37333rem;color:#333;padding-right:.64rem}._countTimer_1bbiv_11{padding:.85333rem .64rem .58667rem;background-color:#fff}._countTimer_1bbiv_11 ._timer_1bbiv_15{padding-left:.05333rem;font-size:.85333rem;font-weight:600;color:#333;padding-bottom:.26667rem}._countTimer_1bbiv_11 ._timer_1bbiv_15 span{color:#666;font-size:.37333rem}._countTimer_1bbiv_11 ._title_1bbiv_26{display:flex;align-items:center;font-size:.37333rem;color:#333;line-height:.45333rem}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.1bb96d98.js','./index-legacy.1cd7b6bb.js','./vendor-legacy.031e1374.js','./index-legacy.637f3556.js','./index-legacy.f25f109a11.js','./index-legacy.f25f109a6.js','./index-legacy.b8640b0e.js','./index-legacy.f25f109a8.js','./title_timers-legacy.616e8b2e.js','./icon_name_active-legacy.e2b0189a.js','./icon_tips-legacy.b7861467.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a.js','./icon_timer2-legacy.90431d1a.js','./index-legacy.901c4933.js'],function(exports){'use strict';var ColHeader,request,ColResult,formatterDate,defineComponent,dayjs,createVNode,Fragment,Row,Col,createTextVNode,Icon,List,isVNode,Popup,DatetimePicker,Course;return{setters:[function(module){ColHeader=module.C;},function(module){request=module.r;ColResult=module.C;formatterDate=module.j;},function(module){defineComponent=module.d;dayjs=module.g;createVNode=module.a;Fragment=module.F;Row=module.k;Col=module.l;createTextVNode=module.j;Icon=module.u;List=module.w;isVNode=module.x;Popup=module.P;DatetimePicker=module.J;},function(){},function(){},function(){},function(module){Course=module.C;},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var searchList="_searchList_1bbiv_1";var dataItem="_dataItem_1bbiv_6";var countTimer="_countTimer_1bbiv_11";var timer="_timer_1bbiv_15";var title="_title_1bbiv_26";var styles={searchList:searchList,dataItem:dataItem,countTimer:countTimer,timer:timer,title:title};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var index=exports('default',defineComponent({name:'courseRecord',data:function data(){return{list:[],dataShow:true,// 判断是否有数据
loading:false,finished:false,monthTxt:dayjs().format('YYYY年MM月'),month:new Date(),params:{status:'COMPLETE',month:dayjs().format('YYYY-MM'),page:1,rows:20},timeShow:false,studentStatus:false,consumeTime:0};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_this.getConsumeTime();_this.getList();case 2:case"end":return _context.stop();}}},_callee);}))();},methods:{onSearch:function onSearch(){this.dataShow=true;this.loading=false;this.finished=false;this.list=[];this.params.page=1;this.getConsumeTime();this.getList();},getConsumeTime:function getConsumeTime(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var res;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get('/api-teacher/courseSchedule/selectConsumeTime',{params:{month:_this2.params.month}});case 3:_context2.next=5;return _context2.sent;case 5:res=_context2.sent;console.log(res);_this2.consumeTime=res.data.consumeTime||0;_context2.next=12;break;case 10:_context2.prev=10;_context2.t0=_context2["catch"](0);case 12:case"end":return _context2.stop();}}},_callee2,null,[[0,10]]);}))();},getList:function getList(){var _this3=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){var res,result;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return request.post('/api-teacher/courseSchedule/selectConsumeTimeList',{data:_this3.params});case 3:res=_context3.sent;_this3.loading=false;result=res.data||{};// 处理重复请求数据
if(!(_this3.list.length>0&&result.pageNo===1)){_context3.next=8;break;}return _context3.abrupt("return");case 8:_this3.list=_this3.list.concat(result.rows||[]);_this3.finished=result.pageNo>=result.totalPage;_this3.params.page=result.pageNo+1;_this3.dataShow=_this3.list.length>0;_context3.next=18;break;case 14:_context3.prev=14;_context3.t0=_context3["catch"](0);_this3.dataShow=false;_this3.finished=true;case 18:case"end":return _context3.stop();}}},_callee3,null,[[0,14]]);}))();}},render:function render(){var _this4=this;var _slot;return createVNode(Fragment,null,[createVNode(ColHeader,null,null),createVNode(Row,{"class":[styles.countTimer,'van-hairline--bottom']},{default:function _default(){return[createVNode(Col,{"span":9},{default:function _default(){return[createVNode("p",{"class":styles.timer},[_this4.consumeTime,createVNode("span",null,[createTextVNode("\u5206\u949F")])]),createVNode("p",{"class":styles.title},[createVNode("span",null,[createTextVNode("\u5DF2\u6D88\u8017\u65F6\u957F")])])];}})];}}),createVNode("div",{"class":styles.searchList},[createVNode("div",{"class":styles.dataItem,"onClick":function onClick(){_this4.timeShow=true;}},[this.monthTxt,createVNode(Icon,{"classPrefix":"iconfont","name":"down","size":8,"style":{marginLeft:'4px'},"color":"#CCCCCC"},null)])]),this.dataShow?createVNode(List,{"loading":this.loading,"onUpdate:loading":function onUpdateLoading($event){return _this4.loading=$event;},"finished":this.finished,"finishedText":" ","class":[styles.liveList,'mb12'],"immediateCheck":false,"onLoad":this.getList},_isSlot(_slot=this.list.map(function(item){return createVNode(Course,{"item":item,"operation":false},null);}))?_slot:{default:function _default(){return[_slot];}}):createVNode(ColResult,{"btnStatus":false,"classImgSize":"SMALL","tips":"暂无课程"},null),createVNode(Popup,{"position":"bottom","show":this.timeShow,"onUpdate:show":function onUpdateShow($event){return _this4.timeShow=$event;},"round":true},{default:function _default(){return[createVNode("div",{"class":styles.picker},[createVNode(DatetimePicker,{"modelValue":_this4.month,"onUpdate:modelValue":function onUpdateModelValue($event){return _this4.month=$event;},"type":"year-month","formatter":formatterDate,"onConfirm":function onConfirm(item){_this4.monthTxt=dayjs(item).format('YYYY年MM月');_this4.params.month=dayjs(item).format('YYYY-MM');_this4.timeShow=false;_this4.onSearch();},"onCancel":function onCancel(){return _this4.timeShow=false;}},null)])];}})]);}}));}};});})();
