1 |
- System.register(["./index-legacy.eb062188.js","./index-legacy.a530d593.js","./index-legacy.ad813f4d.js","./unit-list-item-legacy.93d9b3b6.js","./index-legacy.d64e5695.js","./index-legacy.d552a2f3.js","./index-legacy.fad72574.js","./index-legacy.3a3e070a.js","./index-legacy.918b8c74.js","./icon-edit-legacy.4520ee5d.js","./icon-muit-message-legacy.68290c1f.js","./index-legacy.148f784c.js","./index-legacy.fecc738b.js","./index-legacy.8c254533.js","./use-tab-status-legacy.91417466.js"],(function(e){"use strict";var t,a,i,n,s,o,l,c,d,r,u,p,f,m,g,h,y,A,S,v,x,E,w;return{setters:[function(e){t=e.d,a=e.ag,i=e.r,n=e.g,s=e.R,o=e.$,l=e.e,c=e.b7,d=e.c,r=e.aj,u=e.a5,p=e.q,f=e.ak,m=e.al,g=e.m,h=e.o},function(e){y=e.O},function(e){A=e.O},function(e){S=e.s,v=e.U},function(e){x=e.O},function(e){E=e.O},function(e){w=e.L},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){e("default",t({name:"unit-list",setup(){const e=a(),t=i({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"}]}),R=n.platformApi,j=s(!1),b=s(!1),C=async()=>{if(!t.isClick){t.isClick=!0,b.value=!0;try{j.value&&(t.params.page=1,t.list=[],j.value=!1);const e="TEACHER"===n.platformType?`${R}/studentUnitExamination/queryPageByTeacher`:`${R}/studentUnitExamination/queryPageByManage`,a=await g.post(e,{data:{...t.params}});if(t.list.length>0&&1===a.data.pages)return;t.params.page=a.data.current+1,t.list=a.data.rows,t.listState.dataShow=t.list.length>0,b.value=!1,t.listState.finished=a.data.current>=a.data.pages}catch(e){const a=e.message;h(a),t.listState.dataShow=!1,t.listState.finished=!0}t.isClick=!1}},T=()=>{t.listState.finished=!0,b.value=!0,C()},L=()=>{t.params.page=1,t.list=[],t.listState.dataShow=!0,t.listState.loading=!1,t.listState.finished=!1,C()};o((()=>{C(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",U,!1)}));const U=()=>{l({api:"back"})};c((()=>{window.removeEventListener("popstate",U)}));const P=()=>{sessionStorage.removeItem("unit-create"),e.push("/unit-create")};return()=>{let e;return d("div",{class:S.unitTest},[d(A,{position:"top",onGetHeight:e=>{document.documentElement.style.setProperty("--header-height",e+"px")}},{default:()=>[d(r,{border:!1},{right:()=>"/api-teacher"==R?d(u,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAALtJREFUWEftmNENwyAMRPEgyRJmiUzSmTpJlsBLlEGokKiEojTSxVRC1fFtH9YDzIGEASPGuJVSnlVKRB4ppd0rK16Bmq+qrxDC0rSyma1e3VGFlb4QM3PrugUaMRYGbRFVJTES+0aApxLaG/UGQRPO4nkqUYokRmIXBKQzeR8/hQIbHZ+r2ZSDyRs9yV29PG9h0y7lXdZ9HvsYSpHESOyq86N06MdIDCRAzw8C4ysJBfb/xOb86vzF5/AbfM2i57toBH8AAAAASUVORK5CYII=",size:19,onClick:P},null):null}),d(y,{placeholder:"请输入测验名称",onSearch:e=>{t.params.keyword=e,L()}},{left:()=>d("div",{class:["searchItem-left",t.oPopover?"searchItem-active":""],onClick:()=>t.oPopover=!0},[d("span",null,[t.statusText,p(" ")])])})]}),t.listState.dataShow?d(x,{modelValue:j.value,"onUpdate:modelValue":e=>j.value=e,onRefresh:T,style:"min-height: calc(100vh - var(--header-height));"},{default:()=>{return[d(w,{finished:t.listState.finished,finishedText:" ",class:[S.liveList],onLoad:C,style:{paddingTop:"12px"},immediateCheck:!1},(a=e=t.list.map((e=>d(v,{item:e},null))),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!m(a)?e:{default:()=>[e]}))];var a}}):d(f,{tips:"暂无阶段自测"},null),d(E,{show:t.oPopover,"onUpdate:show":e=>t.oPopover=e,actions:t.action,onSelect:e=>{t.action.forEach((e=>{e.selected=!1})),e.selected=!0,t.statusText=e.name,t.params.classTypeCode="ALL"===e.id?null:e.id,t.oPopover=!1,L()}},null)])}}}))}}}));
|