index-legacy-427e7ba9-1724872791500.js 9.2 KB

1
  1. System.register(["./index.module-legacy-85d3d2e3-1724872791500.js","./index-legacy-037be70c-1724872791500.js","./index-legacy-3d00793d-1724872791500.js","./index-legacy-5692c59a-1724872791500.js","./index-legacy-508a3c9b-1724872791500.js","./api-legacy-67ba6d57-1724872791500.js","./api-legacy-d9cc2912-1724872791500.js","./index-legacy-7dba2a59-1724872791500.js","./api-legacy-5675c09e-1724872791500.js","./index-legacy-d33e259a-1724872791500.js","./index-legacy-f6019b45-1724872791500.js","./use-async-legacy-3ddebaea-1724872791500.js","./contants-legacy-7e501506-1724872791500.js","./api-legacy-1273aff5-1724872791500.js"],(function(e,t){"use strict";var a,l,s,n,i,o,r,c,d,u,p,g,h,m,y,v,b,f,w,S,k,L,F,C,x,j,T,R,G,I,N,U,Y,P,$,B,E,V,W,z,q,J;return{setters:[e=>{a=e.s},e=>{l=e.S},e=>{s=e.C},e=>{n=e.P},e=>{i=e.d,o=e.e,r=e.$,c=e.r,d=e.q,u=e.C,p=e.T,g=e.f,h=e.a0,m=e.a1,y=e.k,v=e.F,b=e.c,f=e.a,w=e.u,S=e.b,k=e.N,L=e.g,F=e.y,C=e.x,x=e.j,j=e.aG,T=e.l,R=e.m,G=e.V},e=>{I=e.g},e=>{N=e.c},e=>{U=e.g,Y=e.s},e=>{P=e.s},e=>{$=e.T},e=>{B=e.U},e=>{E=e.i,V=e.s},e=>{W=e.g,z=e.c},e=>{q=e.g,J=e.b}],execute:function(){const t=i({name:"coai-guide",emits:["close"],setup(e,{emit:t}){const a=o({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:U("student1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:r(-4),left:r(-64),width:r(518),height:r(256)},btnsStyle:{bottom:r(30),left:r(-74)},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:U("student2.png"),imgStyle:{top:r(-4),left:r(-261),width:r(515),height:r(227)},btnsStyle:{bottom:r(30),left:r(-120)},eleRectPadding:{left:7,top:7,width:14,height:14}}],step:0}),l=c(!1),s=c({});(async()=>{try{const e=localStorage.getItem("teacher-guideInfo");s.value=e?JSON.parse(e)||null:{},s.value&&s.value.studentGuide?l.value=!1:l.value=!0}catch(e){console.log(e)}})();const n=()=>{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 f()},i=async e=>{try{if("studentList"!==e)return;s.value?s.value.studentGuide=!1:s.value={studentGuide:!1};try{P({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(s.value)})}catch(t){console.log(t)}a.step=0,n(),l.value=!0}catch{}};d((()=>{n(),window.addEventListener("resize",b),u.on("teacher-guideInfo",i)}));const b=()=>{n()};p((()=>{window.removeEventListener("resize",b),u.off("teacher-guideInfo",i)}));const f=()=>{a.step>=2?w():(a.step=a.step+1,n())},w=async()=>{s.value?s.value.studentGuide=!0:s.value={studentGuide:!0};try{P({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(s.value)})}catch(e){console.log(e)}l.value=!1};return()=>g(v,null,[l.value?h(g("div",{"onUpdate:show":e=>l.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[g("div",{class:Y.content,onClick:()=>f()},[g("div",{class:Y.backBtn,onClick:e=>{e.stopPropagation(),w()}},[y("跳过")]),g("div",{class:Y.box,style:{...a.box},id:`modeType-${a.step}`},[a.steps.map(((e,t)=>g("div",{onClick:e=>e.stopPropagation(),class:Y.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}`}},[g("img",{class:Y.img,style:e.imgStyle,src:e.img},null),g("div",{class:Y.btns,style:e.btnsStyle},[a.step+1==a.steps.length?g(v,null,[g("div",{class:[Y.btn],onClick:()=>w()},[y("完成")])]):g("div",{class:Y.btn,onClick:()=>f()},[y("下一步 ("),a.step+1,y("/"),a.steps.length,y(")")])])])))])])]),[[m,l.value,"show"]]):null])}});e("default",i({name:"student-studentList",setup(e,{emit:i}){b();const r=o({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:[]});r.gradeNumList=W();const u=f(),p=w(),h=c(!1),m=S(),U=()=>{r.pagination.page=1,O(),V({current:r.searchForm,saveKey:u.path})},Y=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),m.success("复制成功")},P=()=>{r.searchForm={keyword:"",gender:"",classGroupId:"",membership:"",currentClass:"",currentGradeNum:"",gradeYear:"",gradeLevel:""},r.popSelectYearList.length>1&&(r.searchForm.gradeYear=r.popSelectYearList[1].id),U(),V({current:r.searchForm,saveKey:u.path})};E({current:r.searchForm,callBack:e=>{r.searchForm=e}});const O=async()=>{try{const e=await I({...r.searchForm,...r.pagination});r.tableList=e.data.rows,r.pagination.pageTotal=e.data.total,r.tableList.length>0&&setTimeout((()=>{h.value=!0}),500)}catch(e){console.log(e)}console.log("getList")};d((async()=>{r.loading=!0,await(async()=>{try{const{data:e}=await q(),t=e||[];t.forEach((e=>{e.name=e.name+"学年"})),r.popSelectYearList=t||[],t.length>1&&!r.searchForm.gradeYear&&(r.searchForm.gradeYear=t[1].id)}catch{}})(),await(async()=>{try{const{data:e}=await J(),t=e||[];t.forEach((e=>{e.name=e.name+"级"})),t.unshift({id:"",name:"全部学级"}),r.popSelectLevelList=t||[],t.length>0&&!r.searchForm.gradeLevel&&(r.searchForm.gradeLevel=t[0].id)}catch{}})(),await O(),await(async()=>{try{const e=await N({page:1,rows:999});r.classList=e.data.rows.map((e=>({label:e.name,value:e.id})))}catch(e){console.log(e)}})(),r.loading=!1}));const A=e=>{p.push({path:"/studentDetail",query:{...u.query,studentId:e.id,studentName:e.nickname}})},K=e=>{r.editStatus=!0,r.activeRow=e};return()=>g("div",{class:a.listWrap},[g("div",{class:a.searchList},[g(k,{"label-placement":"left",inline:!0},{default:()=>[g(L,null,{default:()=>[g(l,F({placeholder:"请输入学生姓名"},{class:a.searchInput,style:{width:"160px"},searchWord:r.searchForm.keyword,onChangeValue:e=>r.searchForm.keyword=e}),null)]}),g(L,null,{default:()=>[g(s,F({options:[{label:"全部性别",value:""},{label:"男",value:1},{label:"女",value:0}],placeholder:"性别",clearable:!0,inline:!0},{value:r.searchForm.gender,"onUpdate:value":e=>r.searchForm.gender=e}),null)]}),g(L,null,{default:()=>[g(s,F({options:r.popSelectYearList,placeholder:"选择学年",clearable:!1,inline:!0,labelField:"name",valueField:"id"},{value:r.searchForm.gradeYear,"onUpdate:value":e=>r.searchForm.gradeYear=e}),null)]}),g(L,null,{default:()=>[g(s,F({options:r.popSelectLevelList,placeholder:"选择学级",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:r.searchForm.gradeLevel,"onUpdate:value":e=>r.searchForm.gradeLevel=e}),null)]}),g(L,null,{default:()=>[g(s,F({options:r.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:r.searchForm.currentGradeNum,"onUpdate:value":e=>r.searchForm.currentGradeNum=e}),null)]}),g(L,null,{default:()=>[g(s,F({options:z,placeholder:"选择班级",clearable:!0,inline:!0},{value:r.searchForm.currentClass,"onUpdate:value":e=>r.searchForm.currentClass=e}),null)]}),g(L,null,{default:()=>[g(s,F({options:[{label:"全部类型",value:""},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:r.searchForm.membership,"onUpdate:value":e=>r.searchForm.membership=e}),null)]}),g(L,null,{default:()=>[g(C,{justify:"end"},{default:()=>[g(x,{type:"primary",class:"searchBtn",onClick:U},{default:()=>[y("搜索")]}),g(x,{type:"primary",ghost:!0,class:"resetBtn",onClick:P},{default:()=>[y("重置")]})]})]})]})]),g("div",{class:a.tableWrap},[g(j,{class:a.classTable,loading:r.loading,columns:[{title:"学生姓名",key:"nickname",render:e=>g(G,{showArrow:!1,placement:"top-start"},{trigger:()=>g("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>Y(e.nickname)},[e.nickname]),default:"点击复制"})},{title:"手机号",key:"phone",render:e=>g(G,{showArrow:!1,placement:"top-start"},{trigger:()=>g("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>Y(e.phone)},[e.phone]),default:"点击复制"})},{title:"性别",key:"gender",render:e=>g(v,null,[e.gender+""!="null"?"0"==e.gender?"女":"男":"--"])},{title:"年级班级",key:"classGroupName"},{title:"学生类型",key:"vipMember",render:e=>g(v,null,[e.vipMember?"会员":"普通"])},{title:"操作",key:"id",width:300,render:(e,t)=>g(C,null,{default:()=>[g(x,0==t?F({id:"student-1"},{text:!0,type:"primary",onClick:()=>A(e)}):{text:!0,type:"primary",onClick:()=>A(e)},{default:()=>[y("详情")]}),g(x,{text:!0,type:"primary",onClick:()=>K(e),disabled:e.historyClassStudent},{default:()=>[y("修改")]})]})}],data:r.tableList},{empty:()=>g($,null,null)}),g(n,{page:r.pagination.page,"onUpdate:page":e=>r.pagination.page=e,pageSize:r.pagination.rows,"onUpdate:pageSize":e=>r.pagination.rows=e,pageTotal:r.pagination.pageTotal,"onUpdate:pageTotal":e=>r.pagination.pageTotal=e,onList:O,sync:!0},null)]),g(T,{maskClosable:R,show:r.editStatus,"onUpdate:show":e=>r.editStatus=e,class:["modalTitle background",a.updateStudent],preset:"card",title:"修改信息"},{default:()=>[g(B,{onClose:()=>r.editStatus=!1,onConfirm:()=>O(),row:r.activeRow},null)]}),h.value?g(t,null,null):null])}}))}}}));