1 |
- System.register(["./index.module-legacy-250d90e8-1713776975640.js","./index-legacy-ad496d04-1713776975640.js","./api-legacy-bc71a0e7-1713776975640.js","./catchData-legacy-8b9ed8a7-1713776975640.js","./index-legacy-16682d5c-1713776975640.js"],(function(e,a){"use strict";var t,r,s,l,c,u,d,n,i,o,g,p,v,m,w,y,j;return{setters:[e=>{t=e.s},e=>{r=e.C},e=>{s=e.g,l=e.r},e=>{c=e.u},e=>{u=e.d,d=e.e,n=e.b,i=e.r,o=e.p,g=e.f,p=e.N,v=e.g,m=e.x,w=e.w,y=e.j,j=e.k}],execute:function(){e("U",u({props:{activeRow:{type:Object,default:()=>({id:""})},subjectList:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList","confirm"],setup(e,{emit:a}){c();const u=d({uploading:!1}),f=n(),b=i([]),C=i(),I=d({currentGradeNum:null,currentClass:null,gradeYear:null,subjectId:null,id:null});return o((async()=>{console.log(e.activeRow," props.activeRow"),I.gradeYear=e.activeRow.gradeYear,I.currentGradeNum=e.activeRow.currentGradeNum,I.currentClass=e.activeRow.currentClass,I.subjectId=e.activeRow.subjectId,I.id=e.activeRow.id,(async()=>{try{const{data:e}=await s({gradeYear:I.gradeYear,currentGradeNum:I.currentGradeNum,currentClass:I.currentClass}),a=e||[];b.value=a.map((e=>({label:e.name,value:e.id})))}catch{}})()})),()=>g("div",{class:[t.addClass]},[g(p,{"label-placement":"left",model:I,ref:C},{default:()=>[g(v,{path:"subjectId",rule:[{required:!0,message:"请选择声部"}]},{default:()=>[g(r,m({style:{width:"400px"},options:b.value,placeholder:"选择声部",clearable:!0},{value:I.subjectId,"onUpdate:value":e=>I.subjectId=e}),null)]})]}),g(w,{class:t.btnGroup,justify:"center"},{default:()=>[g(y,{round:!0,onClick:()=>a("close")},{default:()=>[j("取消")]}),g(y,{round:!0,loading:u.uploading,onClick:()=>{C.value.validate((async t=>{if(!t){u.uploading=!0;try{await l({...I}),f.success("修改成功"),a("close"),a("confirm",{lastUseCoursewareId:e.activeRow.lessonCoursewareId,unit:e.activeRow.lessonCoursewareKnowledgeDetailId,subjectId:I.subjectId,name:e.activeRow.name,classGroupId:e.activeRow.id}),a("getList")}catch(r){console.log(r)}u.uploading=!1}}))},type:"primary"},{default:()=>[j("确定")]})]})])}}))}}}));
|