updateSubject-legacy-2cfd4cde-1734950731618.js 2.1 KB

1
  1. System.register(["./index.module-legacy-7948c6f2-1734950731618.js","./api-legacy-37b6770f-1734950731618.js","./catchData-legacy-786f1507-1734950731618.js","./index-legacy-4630884d-1734950731618.js","./Cascader-legacy-24e30d03-1734950731618.js"],(function(e,a){"use strict";var t,r,l,s,n,u,d,i,c,o,m,g,p,v,y,w;return{setters:[e=>{t=e.s},e=>{r=e.g,l=e.u},e=>{s=e.u},e=>{n=e.d,u=e.e,d=e.b,i=e.r,c=e.q,o=e.f,m=e.N,g=e.g,p=e.x,v=e.j,y=e.k},e=>{w=e.N}],execute:function(){e("U",n({props:{activeRow:{type:Object,default:()=>({id:""})},subjectList:{type:Array,default:()=>[]}},name:"resetStudent",emits:["close","getList","confirm"],setup(e,{emit:a}){s();const n=u({uploading:!1}),f=d(),h=i([]),C=i(),I=u({currentGradeNum:null,currentClass:null,gradeYear:null,instrumentId:null,id:null});return c((async()=>{I.gradeYear=e.activeRow.gradeYear,I.currentGradeNum=e.activeRow.currentGradeNum,I.currentClass=e.activeRow.currentClass,I.instrumentId=e.activeRow.instrumentId,I.id=e.activeRow.id,(async()=>{try{const{data:e}=await r({gradeYear:I.gradeYear,currentGradeNum:I.currentGradeNum,currentClass:I.currentClass}),a=e||[];h.value=a}catch{}})()})),()=>o("div",{class:[t.addClass]},[o(m,{"label-placement":"left",model:I,ref:C},{default:()=>[o(g,{path:"instrumentId",rule:[{required:!0,message:"请选择乐器"}]},{default:()=>[o(w,{placeholder:"请选择乐器",value:I.instrumentId,"onUpdate:value":e=>I.instrumentId=e,options:h.value,checkStrategy:"child",showPath:!1,childrenField:"instruments",expandTrigger:"hover",labelField:"name",valueField:"id",clearable:!0,filterable:!0,style:{width:"400px"}},null)]})]}),o(p,{class:t.btnGroup,justify:"center"},{default:()=>[o(v,{round:!0,onClick:()=>a("close")},{default:()=>[y("取消")]}),o(v,{round:!0,loading:n.uploading,onClick:()=>{C.value.validate((async t=>{if(!t){n.uploading=!0;try{await l({...I}),f.success("修改成功"),a("close"),a("confirm",{lastUseCoursewareId:e.activeRow.lessonCoursewareId,unit:e.activeRow.lessonCoursewareKnowledgeDetailId,instrumentId:I.instrumentId,name:e.activeRow.name,classGroupId:e.activeRow.id}),a("getList")}catch(r){console.log(r)}n.uploading=!1}}))},type:"primary"},{default:()=>[y("确定")]})]})])}}))}}}));