1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(t){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t,n,a,i,r,o){try{var c=e[r](o),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(a,i)}System.register(["./index-legacy.90c82f08.js","./index-legacy.e11fad33.js","./index-legacy.84457c4c.js","./unit-list-item-legacy.880f4444.js","./index-legacy.02f13b7a.js","./index-legacy.5d5ea365.js","./index-legacy.789a0824.js","./index-legacy.3c5580aa.js","./index-legacy.f3e5e283.js","./icon-edit-legacy.4520ee5d.js","./icon-muit-message-legacy.68290c1f.js","./index-legacy.55839436.js","./index-legacy.eb4bc59e.js","./index-legacy.2870cc6d.js","./use-tab-status-legacy.bafe466c.js"],(function(e){"use strict";var n,i,r,o,c,s,u,l,f,d,p,m,g,y,h,v,b,S,A,j,w,x,O;return{setters:[function(e){n=e.d,i=e.ag,r=e.r,o=e.g,c=e.R,s=e.$,u=e.e,l=e.b3,f=e.c,d=e.aj,p=e.a5,m=e.q,g=e.ak,y=e.al,h=e.m,v=e.o},function(e){b=e.O},function(e){S=e.O},function(e){A=e.s,j=e.U},function(e){w=e.O},function(e){x=e.O},function(e){O=e.L},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){e("default",n({name:"unit-list",setup:function(){var e=i(),n=r({oPopover:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},statusText:"班级类型",params:{keyword:null,classTypeCode:null,page:1,rows:20},isClick:!1,action:[{name:"班级类型",id:"ALL",selected:!0},{name:"单技班",id:"SINGLE"},{name:"乐理班",id:"MUSIC_THEORY"},{name:"合奏班",id:"INSTRUMENTAL_ENSEMBLE"}]}),E=o.platformApi,P=c(!1),R=c(!1),k=function(){var e,i=(e=regeneratorRuntime.mark((function e(){var a,i,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.isClick){e.next=2;break}return e.abrupt("return");case 2:return n.isClick=!0,R.value=!0,e.prev=4,P.value&&(n.params.page=1,n.list=[],P.value=!1),a="TEACHER"===o.platformType?"".concat(E,"/studentUnitExamination/queryPageByTeacher"):"".concat(E,"/studentUnitExamination/queryPageByManage"),e.next=9,h.post(a,{data:t({},n.params)});case 9:if(i=e.sent,!(n.list.length>0&&1===i.data.pages)){e.next=12;break}return e.abrupt("return");case 12:n.params.page=i.data.current+1,n.list=i.data.rows,n.listState.dataShow=n.list.length>0,R.value=!1,n.listState.finished=i.data.current>=i.data.pages,e.next=25;break;case 19:e.prev=19,e.t0=e.catch(4),r=e.t0.message,v(r),n.listState.dataShow=!1,n.listState.finished=!0;case 25:n.isClick=!1;case 26:case"end":return e.stop()}}),e,null,[[4,19]])})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function c(e){a(o,i,r,c,s,"next",e)}function s(e){a(o,i,r,c,s,"throw",e)}c(void 0)}))});return function(){return i.apply(this,arguments)}}(),C=function(){n.listState.finished=!0,R.value=!0,k()},T=function(){n.params.page=1,n.list=[],n.listState.dataShow=!0,n.listState.loading=!1,n.listState.finished=!1,k()};s((function(){k(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",L,!1)}));var L=function(){u({api:"back"})};l((function(){window.removeEventListener("popstate",L)}));var U=function(){sessionStorage.removeItem("unit-create"),e.push("/unit-create")};return function(){var e;return f("div",{class:A.unitTest},[f(S,{position:"top",onGetHeight:function(e){document.documentElement.style.setProperty("--header-height",e+"px")}},{default:function(){return[f(d,{border:!1},{right:function(){return"/api-teacher"==E?f(p,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAALtJREFUWEftmNENwyAMRPEgyRJmiUzSmTpJlsBLlEGokKiEojTSxVRC1fFtH9YDzIGEASPGuJVSnlVKRB4ppd0rK16Bmq+qrxDC0rSyma1e3VGFlb4QM3PrugUaMRYGbRFVJTES+0aApxLaG/UGQRPO4nkqUYokRmIXBKQzeR8/hQIbHZ+r2ZSDyRs9yV29PG9h0y7lXdZ9HvsYSpHESOyq86N06MdIDCRAzw8C4ysJBfb/xOb86vzF5/AbfM2i57toBH8AAAAASUVORK5CYII=",size:19,onClick:U},null):null}}),f(b,{placeholder:"请输入测验名称",onSearch:function(e){n.params.keyword=e,T()}},{left:function(){return f("div",{class:["searchItem-left",n.oPopover?"searchItem-active":""],onClick:function(){return n.oPopover=!0}},[f("span",null,[n.statusText,m(" ")])])}})]}}),n.listState.dataShow?f(w,{modelValue:P.value,"onUpdate:modelValue":function(e){return P.value=e},onRefresh:C,style:"min-height: calc(100vh - var(--header-height));"},{default:function(){return[f(O,{finished:n.listState.finished,finishedText:" ",class:[A.liveList],onLoad:k,style:{paddingTop:"12px"},immediateCheck:!1},(t=e=n.list.map((function(e){return f(j,{item:e},null)})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!y(t)?e:{default:function(){return[e]}}))];var t}}):f(g,{tips:"暂无阶段自测"},null),f(x,{show:n.oPopover,"onUpdate:show":function(e){return n.oPopover=e},actions:n.action,onSelect:function(e){n.action.forEach((function(e){e.selected=!1})),e.selected=!0,n.statusText=e.name,n.params.classTypeCode="ALL"===e.id?null:e.id,n.oPopover=!1,T()}},null)])}}}))}}}))}();
|