index-legacy.a5b7e9a9.js 5.9 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML="._schoolEidtWrap_595gl_1 ._eidtWrap_595gl_1{margin:.32rem 0}._schoolEidtWrap_595gl_1 ._eidtWrap_595gl_1 .van-cell{padding:.48rem .32rem}._schoolEidtWrap_595gl_1 ._eidtWrap_595gl_1 .van-field__control:disabled{color:#333!important}._schoolEidtWrap_595gl_1 ._eidtWrap_595gl_1 ._orchestraName_595gl_10{max-width:5.33333rem}._wall_595gl_13{height:1.17333rem}._bottomWrap_595gl_16{position:fixed;width:100%;left:0;bottom:1.6rem;display:flex;flex-direction:column;align-items:center}._bottomWrap_595gl_16 .van-button{line-height:1.17333rem;border-radius:1.04rem;width:8.66667rem}._addP_595gl_30{font-size:.42667rem;color:#333!important;line-height:.58667rem}._schoolDtailWrap_595gl_35{padding:.37333rem .32rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between}._schoolDtailWrap_595gl_35 ._schoolICon_595gl_42{border-radius:50%;overflow:hidden}._schoolDtailWrap_595gl_35 ._schoolBtnWrap_595gl_46{display:flex;flex-direction:row;align-items:center}._schoolDtailWrap_595gl_35 ._schoolBtnWrap_595gl_46 p{font-size:.42667rem;font-weight:400;color:#aaa;margin-right:.26667rem}._upload_595gl_57{position:absolute;top:-266.64rem;left:-266.64rem}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.ad813f4d.js","./index-legacy.148f784c.js","./index-legacy.3a3e070a.js","./index-legacy.38b799d5.js","./index-legacy.918b8c74.js","./Picker-legacy.95f03705.js","./index-legacy.ac7c51db.js","./use-tab-status-legacy.91417466.js","./index-legacy.fab451f1.js","./index-legacy.10d8486a.js"],(function(e){"use strict";var a,o,l,s,t,r,n,c,i,d,u,p,_,h,m,g,v,f;return{setters:[function(e){a=e.d,o=e.ag,l=e.r,s=e.R,t=e.$,r=e.m,n=e.o,c=e._,i=e.c,d=e.aj,u=e.a5,p=e.q,_=e.P,h=e.F},function(e){m=e.O},function(e){g=e.C},function(e){v=e.F},function(e){f=e.P},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var w={schoolEidtWrap:"_schoolEidtWrap_595gl_1",eidtWrap:"_eidtWrap_595gl_1",orchestraName:"_orchestraName_595gl_10",wall:"_wall_595gl_13",bottomWrap:"_bottomWrap_595gl_16",addP:"_addP_595gl_30",schoolDtailWrap:"_schoolDtailWrap_595gl_35",schoolICon:"_schoolICon_595gl_42",schoolBtnWrap:"_schoolBtnWrap_595gl_46",upload:"_upload_595gl_57"};e("default",a({name:"unit-create",setup(){const e=o(),a=l({actions:[],classList:[],showPopoverOrchestra:!1,showPopoverClass:!1}),y=s({orchestraId:"",orchestraName:"",classGroupName:"",classGroupId:"",emergencyContact:"",addressLongitudeLatitude:"",unitName:"",unitId:""});s();const W=s(!1),x=()=>{y.value.classGroupId?(sessionStorage.setItem("unit-create",JSON.stringify(y.value)),e.push({path:"/unit-Lesson",query:{classGroupId:y.value.classGroupId}})):n("请选择测验班级")};t((async()=>{var e;if(y.value={...JSON.parse(sessionStorage.getItem("unit-create")||"{}")},b(),null!==(e=y.value)&&void 0!==e&&e.orchestraId)try{var o;const e=await r.post("/api-teacher/classGroup/page",{data:{page:1,rows:9999,orchestraId:null===(o=y.value)||void 0===o?void 0:o.orchestraId}});a.classList=e.data.rows.map((e=>({name:e.name,value:e.id}))),a.classList.length<1&&n("当前乐团暂无班级")}catch(l){console.log(l,"cuowu")}}));const b=async()=>{try{const e=await r.post("/api-teacher/orchestra/page",{data:{page:1,rows:9999,status:"DONE"}});a.actions=e.data.rows.map((e=>({name:e.name,value:e.id}))),c((()=>{W.value=!0}))}catch(e){W.value=!0;const a=e.message;n(a)}},I=async e=>{if(console.log(e.selectedOptions),y.value.orchestraId=e.selectedOptions[0].value,y.value.orchestraName=e.selectedOptions[0].name,y.value.classGroupName="",y.value.classGroupId="",e.selectedOptions[0].value)try{const o=await r.post("/api-teacher/classGroup/page",{data:{page:1,rows:9999,orchestraId:e.selectedOptions[0].value}});a.classList=o.data.rows.map((e=>({name:e.name,value:e.id}))),a.classList.length<1&&n("当前乐团暂无班级")}catch(o){console.log(o,"cuowu")}else a.classList=[];a.showPopoverOrchestra=!1},N=async e=>{y.value.classGroupName=e.selectedOptions[0].name,y.value.classGroupId=e.selectedOptions[0].value,a.showPopoverClass=!1};return()=>i(h,null,[W.value?i("div",{class:w.schoolEidtWrap},[i(d,null,null),i("div",{class:w.eidtWrap},[i(g,{inset:!0},{default:()=>[i(v,{placeholder:"请选择乐团",readonly:!0,"input-align":"right",onClick:()=>{a.actions.length<=0?n("暂无乐团"):a.showPopoverOrchestra=!0}},{extra:()=>i("div",{class:w.loctionIconWrap},[i(u,{name:"arrow",color:"#d8d8d8"},null)]),label:()=>i("p",{class:w.addP},[p("选择乐团")]),input:()=>y.value.orchestraName?i("div",{class:[w.orchestraName,"van-ellipsis"]},[y.value.orchestraName]):i("div",{style:{color:"#c8c9cc"}},[p("请选择乐团")])}),i(v,{rows:3,modelValue:y.value.classGroupName,"onUpdate:modelValue":e=>y.value.classGroupName=e,maxlength:50,placeholder:"请选择测验班级",readonly:!0,"input-align":"right",onClick:()=>{y.value.orchestraId?a.showPopoverClass=!0:n("请先选择乐团")}},{extra:()=>i("div",{class:w.loctionIconWrap},[i(u,{name:"arrow",color:"#d8d8d8"},null)]),label:()=>i("p",{class:w.addP},[p("测验班级")])}),i(v,{rows:3,modelValue:y.value.unitName,"onUpdate:modelValue":e=>y.value.unitName=e,maxlength:50,placeholder:"请选择测验内容",readonly:!0,"input-align":"right",onClick:x},{extra:()=>i("div",{class:w.loctionIconWrap},[i(u,{name:"arrow",color:"#d8d8d8"},null)]),label:()=>i("p",{class:w.addP},[p("测验内容")])})]})]),i(m,{position:"bottom"},null)]):null,i(_,{show:a.showPopoverOrchestra,"onUpdate:show":e=>a.showPopoverOrchestra=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[i(f,{columns:a.actions,columnsFieldNames:{text:"name",value:"value"},onCancel:()=>a.showPopoverOrchestra=!1,onConfirm:I},null)]}),i(_,{show:a.showPopoverClass,"onUpdate:show":e=>a.showPopoverClass=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[i(f,{columns:a.classList,columnsFieldNames:{text:"name",value:"value"},onCancel:()=>a.showPopoverClass=!1,onConfirm:N},null)]})])}}))}}}))}();