index-legacy-61915a13.js 9.6 KB

1
  1. System.register(["./index-legacy-f073bf97.js","./api-legacy-0f7a4b4d.js","./index-legacy-4f2516a1.js","./index-legacy-8aa8edaa.js","./index-legacy-fd682661.js","./add-legacy-e7111c9d.js","./api-legacy-6ff284b8.js","./html2canvas.esm-legacy-739c51e6.js","./urlUtils-legacy-b652a21b.js","./api-legacy-dbcbb54e.js","./index-legacy-3b06cf1f.js"],(function(e,t){"use strict";var l,a,s,n,i,o,d,c,u,r,p,g,m,h,v,y,b,f,w,k,S,C,I,L,x,R,T,U,j,B,F,G,D,P,V,O,$,N,E,z,A,W;return{setters:[e=>{l=e.d,a=e.e,s=e.b,n=e.c,i=e.r,o=e.f,d=e.t,c=e.k,u=e.R,r=e.n,p=e.M,g=e.O,m=e.S,h=e.U,v=e.F,y=e.a,b=e.u,f=e.N,w=e.g,k=e.x,S=e.w,C=e.j,I=e.c9},e=>{L=e.s,x=e.a,R=e.g},e=>{T=e.S},e=>{U=e.C},e=>{j=e.P},e=>{B=e.a},e=>{F=e.c},e=>{G=e.s,D=e.a,P=e.T,V=e.b,O=e.h},e=>{$=e.v},e=>{N=e.g,E=e.s,z=e.a,A=e.b},e=>{W=e.T}],execute:function(){const q=""+new URL("studentTitle-8db8be71.png",t.meta.url).href,J=""+new URL("strudentCore-ce06266f.png",t.meta.url).href,M=l({props:{activeRow:{type:Object,default:()=>({id:""})},gradeNumList:{type:Array,default:()=>[]},classArray:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList"],setup(e,{emit:t}){a({uploading:!1}),s();const l=n();i();const u=i($()+`/classroom-app/#/student-register?sId=${e.activeRow.id}`);"BUG_GOODS"!=e.activeRow.registerType&&(u.value=$()+`/classroom-app/#/register-member?sId=${e.activeRow.id}`);const r=a({saveLoading:!1,image:null,shareLoading:!1}),p=()=>{if(!r.saveLoading)if(r.saveLoading=!0,r.image)g();else{const e=document.getElementById("preview-container");O(e,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then((async e=>{const t=e.toDataURL("image/png");r.image=t,g()})).catch((()=>{r.saveLoading=!1}))}},g=async()=>{setTimeout((()=>{r.saveLoading=!1}),100);const e=document.createElement("a");e.setAttribute("download","报名图片.png"),e.href=r.image,e.click()};return()=>o("div",{class:[L.addStudentWrap]},[o("div",{onClick:()=>{console.log("点击"),t("close")}},[o(d,{src:G,previewDisabled:!0,class:L.studentCLose},null)]),o(d,{previewDisabled:!0,class:L.stunentStart,src:D},null),o(d,{class:L.addTitle,previewDisabled:!0,src:q},null),o("div",{class:L.addStudentInfo,id:"preview-container"},[o(d,{class:L.studentInfoBg,previewDisabled:!0,src:J},null),o("div",{class:L.studentCore},[o("img",{alt:"img",crossorigin:"anonymous",class:L.schoolLogo,src:l.getUserInfo.schoolInfos[0].logo+`?some=${(new Date).getTime()}`},null),o("div",{class:L.studentCoreInfo},[o("h2",null,[l.getUserInfo.schoolInfos[0].name]),o("p",{class:L.studentCoreInfoSubtitle},[c("乐器Ai学练工具"),o("span",null,[c("购买通道")])]),o("div",{class:L.codewrap},[o(P,{margin:0,text:u.value,size:119},null)]),o("div",{class:L.codewrapSubmit},[o(d,{previewDisabled:!0,src:V},null),c("请使用微信扫码")])])])]),o("div",{class:L.studentBottom},[o("p",null,[c("请将二维码图片发送给学生家长,扫码完成报名")]),o("div",{class:L.downBtn,onClick:p},[c("下载图片")])])])}}),H=l({name:"coai-guide",emits:["close"],setup(e,{emit:t}){const l=a({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:N("student1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:u(-4),left:u(-64),width:u(518),height:u(256)},btnsStyle:{bottom:u(30),left:u(-74)},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:N("student2.png"),imgStyle:{top:u(-4),left:u(-261),width:u(515),height:u(227)},btnsStyle:{bottom:u(30),left:u(-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-${l.step}`);if(e){const t=e.getBoundingClientRect(),a=l.steps[l.step].eleRectPadding?.left||0,s=l.steps[l.step].eleRectPadding?.top||0,n=l.steps[l.step].eleRectPadding?.width||0,i=l.steps[l.step].eleRectPadding?.height||0;l.box={left:t.x-a+"px",top:t.y-s+"px",width:t.width+n+"px",height:t.height+i+"px"}}else f()},y=async e=>{try{if("studentList"!==e)return;n.value?n.value.studentGuide=!1:n.value={studentGuide:!1};try{await A({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(t){console.log(t)}l.step=0,d(),s.value=!0}catch{}};r((()=>{d(),window.addEventListener("resize",b),p.on("teacher-guideInfo",(e=>y(e)))}));const b=()=>{d()};g((()=>{window.removeEventListener("resize",b),p.off("teacher-guideInfo",y)}));const f=()=>{l.step>=2?w():(l.step=l.step+1,d())},w=async()=>{n.value?n.value.studentGuide=!0:n.value={studentGuide:!0};try{await A({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:E.content,onClick:()=>f()},[o("div",{class:E.backBtn,onClick:e=>{e.stopPropagation(),w()}},[c("跳过")]),o("div",{class:E.box,style:{...l.box},id:`modeType-${l.step}`},[l.steps.map(((e,t)=>o("div",{onClick:e=>e.stopPropagation(),class:E.item,style:"bottom"==e.type?{display:t===l.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:t===l.step?"":"none",left:`${e.eleRect?.left}px`,top:`${l.box?.height}`}},[o("img",{class:E.img,style:e.imgStyle,src:e.img},null),o("div",{class:E.btns,style:e.btnsStyle},[l.step+1==l.steps.length?o(v,null,[o("div",{class:[E.endBtn],onClick:()=>w()},[c("完成")]),o("div",{class:E.nextBtn,onClick:()=>{l.step=0,d()}},[c("再看一遍")])]):o("div",{class:E.btn,onClick:()=>f()},[c("下一步 ("),l.step+1,c("/"),l.steps.length,c(")")])])])))])])]),[[h,s.value,"show"]]):null])}});e("default",l({name:"student-studentList",setup(e,{emit:t}){const l=n(),u=a({searchForm:{keyword:"",gender:null,classGroupId:null,membership:null},searchWord:"",orchestraType:null,courseTypeCode:null,subjectId:null,classId:null,studentType:null,loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],classList:[],addStudentVisible:!1,activeRow:{}}),p=y(),g=b(),G=i(!1),D=s(),P=()=>{u.pagination.page=1,$()},V=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("复制成功")},O=()=>{u.searchForm={keyword:"",gender:null,classGroupId:null,membership:null},P()},$=async()=>{try{const e=await R({...u.searchForm,...u.pagination});u.tableList=e.data.rows,u.pagination.pageTotal=e.data.total,u.tableList.length>0&&setTimeout((()=>{G.value=!0}),500)}catch(e){console.log(e)}console.log("getList")};r((()=>{$(),(async()=>{try{const e=await F({page:1,rows:999});u.classList=e.data.rows.map((e=>({label:e.name,value:e.id})))}catch(e){console.log(e)}})()}));const N=e=>{g.push({path:"/studentDetail",query:{...p.query,studentId:e.id,studentName:e.nickname}})};return()=>o("div",{class:L.listWrap},[o("div",{class:L.searchList},[o(f,{"label-placement":"left",inline:!0},{default:()=>[o(w,null,{default:()=>[o(T,k({placeholder:"请输入学生姓名"},{class:L.searchInput,searchWord:u.searchForm.keyword,onChangeValue:e=>u.searchForm.keyword=e}),null)]}),o(w,null,{default:()=>[o(U,k({options:[{label:"学生性别",value:null},{label:"男",value:1},{label:"女",value:0}],placeholder:"性别",clearable:!0,inline:!0},{value:u.searchForm.gender,"onUpdate:value":e=>u.searchForm.gender=e}),null)]}),o(w,null,{default:()=>[o(U,k({options:[{label:"年级班级",value:null},...u.classList],placeholder:"年级班级",clearable:!0,inline:!0},{value:u.searchForm.classGroupId,"onUpdate:value":e=>u.searchForm.classGroupId=e}),null)]}),o(w,null,{default:()=>[o(U,k({options:[{label:"学生类型",value:null},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:u.searchForm.membership,"onUpdate:value":e=>u.searchForm.membership=e}),null)]}),o(w,null,{default:()=>[o(S,{justify:"end"},{default:()=>[o(C,{type:"primary",class:"searchBtn",onClick:P},{default:()=>[c("搜索")]}),o(C,{type:"primary",ghost:!0,class:"resetBtn",onClick:O},{default:()=>[c("重置")]})]})]})]})]),o(C,k({id:"student-0"},{onClick:async()=>{try{const{schoolInfos:e}=l.getUserInfo,t=e.length>0?e[0].id:null;if(t){const{data:e}=await x({id:t});u.activeRow=e,u.addStudentVisible=!0}}catch{}},class:L.addBtn,type:"primary"}),{default:()=>[c("邀请学生")],icon:()=>o(v,null,[o(d,{class:L.addBtnIcon,previewDisabled:!0,src:B},null)])}),o("div",{class:L.tableWrap},[o(I,{class:L.classTable,loading:u.loading,columns:[{title:"学生姓名",key:"nickname",render:e=>o("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>V(e.nickname)},[e.nickname])},{title:"手机号",key:"phone",render:e=>o("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>V(e.phone)},[e.phone])},{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(v,null,[o(C,0==t?k({id:"student-1"},{text:!0,type:"primary",onClick:()=>N(e)}):{text:!0,type:"primary",onClick:()=>N(e)},{default:()=>[c("详情")]})])}],data:u.tableList},{empty:()=>o(W,null,null)}),o(j,{page:u.pagination.page,"onUpdate:page":e=>u.pagination.page=e,pageSize:u.pagination.rows,"onUpdate:pageSize":e=>u.pagination.rows=e,pageTotal:u.pagination.pageTotal,"onUpdate:pageTotal":e=>u.pagination.pageTotal=e,onList:$,sync:!0},null)]),u.addStudentVisible?m(o("div",{"onUpdate:show":e=>u.addStudentVisible=e,class:"n-modal-mask"},[o(M,{activeRow:u.activeRow,onClose:()=>{u.addStudentVisible=!1}},null)]),[[h,u.addStudentVisible,"show"]]):null,G.value?o(H,null,null):null])}}))}}}));