index-legacy-208c0ae9-1710984815184.js 12 KB

1
  1. System.register(["./index-legacy-cc1d7c26-1710984815184.js","./index.module-legacy-2473877d-1710984815184.js","./index-legacy-2b254f57-1710984815184.js","./index-legacy-1052eaad-1710984815184.js","./index-legacy-270d6bb9-1710984815184.js","./add-legacy-e7111c9d-1710984815184.js","./api-legacy-6aa5bacb-1710984815184.js","./api-legacy-bf0251ae-1710984815184.js","./html2canvas.esm-legacy-c49830e0-1710984815184.js","./urlUtils-legacy-6df7f30c-1710984815184.js","./api-legacy-6cd36c03-1710984815184.js","./index-legacy-dbfc64a5-1710984815184.js","./index-legacy-2bf9755e-1710984815184.js","./use-async-legacy-89b8980e-1710984815184.js","./contants-legacy-375f376f-1710984815184.js","./api-legacy-b86ddb54-1710984815184.js"],(function(e,t){"use strict";var a,l,s,n,i,o,d,r,c,u,p,g,m,h,v,y,w,b,f,S,L,C,k,F,x,I,R,T,U,j,B,G,N,Y,D,V,$,A,P,E,O,z,W,J,K,q,M,H,Q,Z,_;return{setters:[e=>{a=e.d,l=e.e,s=e.b,n=e.c,i=e.r,o=e.f,d=e.v,r=e.k,c=e.Y,u=e.p,p=e.A,g=e.Q,m=e.ao,h=e.aA,v=e.F,y=e.a,w=e.u,b=e.N,f=e.g,S=e.x,L=e.w,C=e.j,k=e.aC,F=e.l,x=e.S},e=>{I=e.s},e=>{R=e.S},e=>{T=e.C},e=>{U=e.P},e=>{j=e.a},e=>{B=e.s,G=e.g},e=>{N=e.c},e=>{Y=e.s,D=e.a,V=e.T,$=e.b,A=e.h},e=>{P=e.v},e=>{E=e.g,O=e.s,z=e.a,W=e.b},e=>{J=e.T},e=>{K=e.U},e=>{q=e.i,M=e.s},e=>{H=e.g,Q=e.c},e=>{Z=e.g,_=e.b}],execute:function(){const X=""+new URL("studentTitle-8db8be71.png",t.meta.url).href,ee=""+new URL("strudentCore-ce06266f.png",t.meta.url).href,te=a({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(e,{emit:t}){l({uploading:!1}),s();const a=n();i();const c=i(P()+`/classroom-app/#/student-register?sId=${e.activeRow.id}`);"BUG_GOODS"!=e.activeRow.registerType&&(c.value=P()+`/classroom-app/#/register-member?sId=${e.activeRow.id}`);const u=l({saveLoading:!1,image:null,shareLoading:!1}),p=()=>{if(!u.saveLoading)if(u.saveLoading=!0,u.image)g();else{const e=document.getElementById("preview-container");A(e,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then((async e=>{const t=e.toDataURL("image/png");u.image=t,g()})).catch((()=>{u.saveLoading=!1}))}},g=async()=>{setTimeout((()=>{u.saveLoading=!1}),100);const e=document.createElement("a");e.setAttribute("download","报名图片.png"),e.href=u.image,e.click()};return()=>o("div",{class:[I.addStudentWrap]},[o("div",{onClick:()=>{console.log("点击"),t("close")}},[o(d,{src:Y,previewDisabled:!0,class:I.studentCLose},null)]),o(d,{previewDisabled:!0,class:I.stunentStart,src:D},null),o(d,{class:I.addTitle,previewDisabled:!0,src:X},null),o("div",{class:I.addStudentInfo,id:"preview-container"},[o(d,{class:I.studentInfoBg,previewDisabled:!0,src:ee},null),o("div",{class:I.studentCore},[o("img",{alt:"img",crossorigin:"anonymous",class:I.schoolLogo,src:a.getUserInfo.schoolInfos[0].logo+`?some=${(new Date).getTime()}`},null),o("div",{class:I.studentCoreInfo},[o("h2",null,[a.getUserInfo.schoolInfos[0].name]),o("p",{class:I.studentCoreInfoSubtitle},[r("乐器Ai学练工具"),o("span",null,[r("购买通道")])]),o("div",{class:I.codewrap},[o(V,{margin:0,text:c.value,size:119},null)]),o("div",{class:I.codewrapSubmit},[o(d,{previewDisabled:!0,src:$},null),r("请使用微信扫码")])])])]),o("div",{class:I.studentBottom},[o("p",null,[r("请将二维码图片发送给学生家长,扫码完成报名")]),o("div",{class:I.downBtn,onClick:p},[r("下载图片")])])])}}),ae=a({name:"coai-guide",emits:["close"],setup(e,{emit:t}){const a=l({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:E("student1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:c(-4),left:c(-64),width:c(518),height:c(256)},btnsStyle:{bottom:c(30),left:c(-74)},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:E("student2.png"),imgStyle:{top:c(-4),left:c(-261),width:c(515),height:c(227)},btnsStyle:{bottom:c(30),left:c(-120)},eleRectPadding:{left:7,top:7,width:14,height:14}}],step:0}),s=i(!1),n=i({});(async()=>{try{const e=await z({guideTag:"teacher-guideInfo"});e.data?n.value=JSON.parse(e.data?.guideValue)||null:n.value={},n.value&&n.value.studentGuide?s.value=!1:s.value=!0}catch(e){console.log(e)}})();const d=()=>{const e=document.getElementById(`student-${a.step}`);if(e){const t=e.getBoundingClientRect(),l=a.steps[a.step].eleRectPadding?.left||0,s=a.steps[a.step].eleRectPadding?.top||0,n=a.steps[a.step].eleRectPadding?.width||0,i=a.steps[a.step].eleRectPadding?.height||0;a.box={left:t.x-l+"px",top:t.y-s+"px",width:t.width+n+"px",height:t.height+i+"px"}}else b()},y=async e=>{try{if("studentList"!==e)return;n.value?n.value.studentGuide=!1:n.value={studentGuide:!1};try{await W({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(t){console.log(t)}a.step=0,d(),s.value=!0}catch{}};u((()=>{d(),window.addEventListener("resize",w),p.on("teacher-guideInfo",(e=>y(e)))}));const w=()=>{d()};g((()=>{window.removeEventListener("resize",w),p.off("teacher-guideInfo",y)}));const b=()=>{a.step>=2?f():(a.step=a.step+1,d())},f=async()=>{n.value?n.value.studentGuide=!0:n.value={studentGuide:!0};try{await W({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(e){console.log(e)}s.value=!1};return()=>o(v,null,[s.value?m(o("div",{"onUpdate:show":e=>s.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[o("div",{class:O.content,onClick:()=>b()},[o("div",{class:O.backBtn,onClick:e=>{e.stopPropagation(),f()}},[r("跳过")]),o("div",{class:O.box,style:{...a.box},id:`modeType-${a.step}`},[a.steps.map(((e,t)=>o("div",{onClick:e=>e.stopPropagation(),class:O.item,style:"bottom"==e.type?{display:t===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:t===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`${a.box?.height}`}},[o("img",{class:O.img,style:e.imgStyle,src:e.img},null),o("div",{class:O.btns,style:e.btnsStyle},[a.step+1==a.steps.length?o(v,null,[o("div",{class:[O.endBtn],onClick:()=>f()},[r("完成")]),o("div",{class:O.nextBtn,onClick:()=>{a.step=0,d()}},[r("再看一遍")])]):o("div",{class:O.btn,onClick:()=>b()},[r("下一步 ("),a.step+1,r("/"),a.steps.length,r(")")])])])))])])]),[[h,s.value,"show"]]):null])}});e("default",a({name:"student-studentList",setup(e,{emit:t}){const a=n(),c=l({searchForm:{keyword:"",gender:"",classGroupId:"",membership:"",currentClass:"",currentGradeNum:"",gradeYear:"",gradeLevel:""},gradeNumList:[],searchWord:"",orchestraType:null,courseTypeCode:null,subjectId:null,classId:null,studentType:null,loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],classList:[],addStudentVisible:!1,editStatus:!1,activeRow:{},popSelectYearList:[],popSelectLevelList:[]});c.gradeNumList=H();const p=y(),g=w(),Y=i(!1),D=s(),V=()=>{c.pagination.page=1,P(),M({current:c.searchForm,saveKey:p.path})},$=e=>{const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("Copy"),document.body.removeChild(t),D.success("复制成功")},A=()=>{c.searchForm={keyword:"",gender:"",classGroupId:"",membership:"",currentClass:"",currentGradeNum:"",gradeYear:"",gradeLevel:""},c.popSelectYearList.length>0&&(c.searchForm.gradeYear=c.popSelectYearList[0].id),V(),M({current:c.searchForm,saveKey:p.path})};q({current:c.searchForm,callBack:e=>{c.searchForm=e}});const P=async()=>{try{const e=await G({...c.searchForm,...c.pagination});c.tableList=e.data.rows,c.pagination.pageTotal=e.data.total,c.tableList.length>0&&setTimeout((()=>{Y.value=!0}),500)}catch(e){console.log(e)}console.log("getList")};u((async()=>{c.loading=!0,await(async()=>{try{const{data:e}=await Z(),t=e||[];t.forEach((e=>{e.name=e.name+"学年"})),c.popSelectYearList=t||[],t.length>0&&!c.searchForm.gradeYear&&(c.searchForm.gradeYear=t[0].id)}catch{}})(),await(async()=>{try{const{data:e}=await _(),t=e||[];t.forEach((e=>{e.name=e.name+"级"})),t.unshift({id:"",name:"全部学级"}),c.popSelectLevelList=t||[],t.length>0&&!c.searchForm.gradeLevel&&(c.searchForm.gradeLevel=t[0].id)}catch{}})(),await P(),await(async()=>{try{const e=await N({page:1,rows:999});c.classList=e.data.rows.map((e=>({label:e.name,value:e.id})))}catch(e){console.log(e)}})(),c.loading=!1}));const E=e=>{g.push({path:"/studentDetail",query:{...p.query,studentId:e.id,studentName:e.nickname}})},O=e=>{c.editStatus=!0,c.activeRow=e};return()=>o("div",{class:I.listWrap},[o("div",{class:I.searchList},[o(b,{"label-placement":"left",inline:!0},{default:()=>[o(f,null,{default:()=>[o(R,S({placeholder:"请输入学生姓名"},{class:I.searchInput,style:{width:"160px"},searchWord:c.searchForm.keyword,onChangeValue:e=>c.searchForm.keyword=e}),null)]}),o(f,null,{default:()=>[o(T,S({options:[{label:"全部性别",value:""},{label:"男",value:1},{label:"女",value:0}],placeholder:"性别",clearable:!0,inline:!0},{value:c.searchForm.gender,"onUpdate:value":e=>c.searchForm.gender=e}),null)]}),o(f,null,{default:()=>[o(T,S({options:c.popSelectYearList,placeholder:"选择学年",clearable:!1,inline:!0,labelField:"name",valueField:"id"},{value:c.searchForm.gradeYear,"onUpdate:value":e=>c.searchForm.gradeYear=e}),null)]}),o(f,null,{default:()=>[o(T,S({options:c.popSelectLevelList,placeholder:"选择学级",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:c.searchForm.gradeLevel,"onUpdate:value":e=>c.searchForm.gradeLevel=e}),null)]}),o(f,null,{default:()=>[o(T,S({options:c.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:c.searchForm.currentGradeNum,"onUpdate:value":e=>c.searchForm.currentGradeNum=e}),null)]}),o(f,null,{default:()=>[o(T,S({options:Q,placeholder:"选择班级",clearable:!0,inline:!0},{value:c.searchForm.currentClass,"onUpdate:value":e=>c.searchForm.currentClass=e}),null)]}),o(f,null,{default:()=>[o(T,S({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:c.searchForm.membership,"onUpdate:value":e=>c.searchForm.membership=e}),null)]}),o(f,null,{default:()=>[o(L,{justify:"end"},{default:()=>[o(C,{type:"primary",class:"searchBtn",onClick:V},{default:()=>[r("搜索")]}),o(C,{type:"primary",ghost:!0,class:"resetBtn",onClick:A},{default:()=>[r("重置")]})]})]})]})]),o(C,S({id:"student-0"},{onClick:async()=>{try{const{schoolInfos:e}=a.getUserInfo,t=e.length>0?e[0].id:null;if(t){const{data:e}=await B({id:t});c.activeRow=e,c.addStudentVisible=!0}}catch{}},class:I.addBtn,type:"primary"}),{default:()=>[r("邀请学生")],icon:()=>o(v,null,[o(d,{class:I.addBtnIcon,previewDisabled:!0,src:j},null)])}),o("div",{class:I.tableWrap},[o(k,{class:I.classTable,loading:c.loading,columns:[{title:"学生姓名",key:"nickname",render:e=>o(x,{showArrow:!1,placement:"top-start"},{trigger:()=>o("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>$(e.nickname)},[e.nickname]),default:"点击复制"})},{title:"手机号",key:"phone",render:e=>o(x,{showArrow:!1,placement:"top-start"},{trigger:()=>o("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>$(e.phone)},[e.phone]),default:"点击复制"})},{title:"性别",key:"gender",render:e=>o(v,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"年级班级",key:"classGroupName"},{title:"学生类型",key:"vipMember",render:e=>o(v,null,[e.vipMember?"会员":"普通"])},{title:"操作",key:"id",width:300,render:(e,t)=>o(L,null,{default:()=>[o(C,0==t?S({id:"student-1"},{text:!0,type:"primary",onClick:()=>E(e)}):{text:!0,type:"primary",onClick:()=>E(e)},{default:()=>[r("详情")]}),o(C,{text:!0,type:"primary",onClick:()=>O(e),disabled:e.historyClassStudent},{default:()=>[r("修改")]})]})}],data:c.tableList},{empty:()=>o(J,null,null)}),o(U,{page:c.pagination.page,"onUpdate:page":e=>c.pagination.page=e,pageSize:c.pagination.rows,"onUpdate:pageSize":e=>c.pagination.rows=e,pageTotal:c.pagination.pageTotal,"onUpdate:pageTotal":e=>c.pagination.pageTotal=e,onList:P,sync:!0},null)]),c.addStudentVisible?m(o("div",{"onUpdate:show":e=>c.addStudentVisible=e,class:"n-modal-mask"},[o(te,{activeRow:c.activeRow,onClose:()=>{c.addStudentVisible=!1}},null)]),[[h,c.addStudentVisible,"show"]]):null,o(F,{show:c.editStatus,"onUpdate:show":e=>c.editStatus=e,class:["modalTitle background",I.updateStudent],preset:"card",title:"修改信息"},{default:()=>[o(K,{onClose:()=>c.editStatus=!1,onConfirm:()=>P(),row:c.activeRow},null)]}),Y.value?o(ae,null,null):null])}}))}}}));