1 |
- !function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r,n,a,o,l){try{var s=e[o](l),c=s.value}catch(i){return void r(i)}s.done?t(c):Promise.resolve(c).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,o){var l=e.apply(t,r);function s(e){n(l,a,o,s,c,"next",e)}function c(e){n(l,a,o,s,c,"throw",e)}s(void 0)}))}}var o=document.createElement("style");o.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(o),System.register(["./index-legacy.48c8d62c.js","./index-legacy.8cf5f94f.js","./index-legacy.269a0b91.js","./index-legacy.55fe5b03.js","./index-legacy.384d768f.js","./index-legacy.087e0425.js","./index-legacy.ef66d7bb.js","./use-tab-status-legacy.6949b1de.js","./index-legacy.71047e87.js","./index-legacy.a2ac81dd.js"],(function(e){"use strict";var r,n,o,l,s,c,i,u,p,d,m,f,h,g,_,v,w;return{setters:[function(e){r=e.d,n=e.ag,o=e.r,l=e.R,s=e.$,c=e.m,i=e.o,u=e._,p=e.c,d=e.a5,m=e.q,f=e.P,h=e.F},function(e){g=e.O},function(e){_=e.C},function(e){v=e.F},function(e){w=e.P},function(){},function(){},function(){},function(){},function(){}],execute:function(){var b={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",r({name:"unit-create",setup:function(){var e=n(),r=o({actions:[],classList:[],showPopoverOrchestra:!1,showPopoverClass:!1}),y=l({orchestraId:"",orchestraName:"",classGroupName:"",classGroupId:"",emergencyContact:"",addressLongitudeLatitude:"",unitName:"",unitId:""});l();var x=l(!1),O=function(){y.value.classGroupId?(sessionStorage.setItem("unit-create",JSON.stringify(y.value)),e.push({path:"/unit-Lesson",query:{classGroupId:y.value.classGroupId}})):i("请选择测验班级")};s(a(regeneratorRuntime.mark((function e(){var n,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y.value=t({},JSON.parse(sessionStorage.getItem("unit-create")||"{}")),P(),null===(n=y.value)||void 0===n||!n.orchestraId){e.next=14;break}return e.prev=3,e.next=6,c.post("/api-teacher/classGroup/page",{data:{page:1,rows:9999,orchestraId:null===(a=y.value)||void 0===a?void 0:a.orchestraId}});case 6:o=e.sent,r.classList=o.data.rows.map((function(e){return{name:e.name,value:e.id}})),r.classList.length<1&&i("当前乐团暂无班级"),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),console.log(e.t0,"cuowu");case 14:case"end":return e.stop()}}),e,null,[[3,11]])}))));var P=function(){var e=a(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.post("/api-teacher/orchestra/page",{data:{page:1,rows:9999,status:"DONE"}});case 3:t=e.sent,r.actions=t.data.rows.map((function(e){return{name:e.name,value:e.id}})),u((function(){x.value=!0})),e.next=13;break;case 8:e.prev=8,e.t0=e.catch(0),x.value=!0,n=e.t0.message,i(n);case 13:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=a(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(t.selectedOptions),y.value.orchestraId=t.selectedOptions[0].value,y.value.orchestraName=t.selectedOptions[0].name,y.value.classGroupName="",y.value.classGroupId="",!t.selectedOptions[0].value){e.next=19;break}return e.prev=6,e.next=9,c.post("/api-teacher/classGroup/page",{data:{page:1,rows:9999,orchestraId:t.selectedOptions[0].value}});case 9:n=e.sent,r.classList=n.data.rows.map((function(e){return{name:e.name,value:e.id}})),r.classList.length<1&&i("当前乐团暂无班级"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(6),console.log(e.t0,"cuowu");case 17:e.next=20;break;case 19:r.classList=[];case 20:r.showPopoverOrchestra=!1;case 21:case"end":return e.stop()}}),e,null,[[6,14]])})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=a(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y.value.classGroupName=t.selectedOptions[0].name,y.value.classGroupId=t.selectedOptions[0].value,r.showPopoverClass=!1;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return function(){return p(h,null,[x.value?p("div",{class:b.schoolEidtWrap},[p("div",{class:b.eidtWrap},[p(_,{inset:!0},{default:function(){return[p(v,{placeholder:"请选择乐团",readonly:!0,"input-align":"right",onClick:function(){r.showPopoverOrchestra=!0}},{extra:function(){return p("div",{class:b.loctionIconWrap},[p(d,{name:"arrow",color:"#d8d8d8"},null)])},label:function(){return p("p",{class:b.addP},[m("选择乐团")])},input:function(){return y.value.orchestraName?p("div",{class:[b.orchestraName,"van-ellipsis"]},[y.value.orchestraName]):p("div",{style:{color:"#c8c9cc"}},[m("请选择乐团")])}}),p(v,{rows:3,modelValue:y.value.classGroupName,"onUpdate:modelValue":function(e){return y.value.classGroupName=e},maxlength:50,placeholder:"请选择测验班级",readonly:!0,"input-align":"right",onClick:function(){y.value.orchestraId?r.showPopoverClass=!0:i("请先选择乐团")}},{extra:function(){return p("div",{class:b.loctionIconWrap},[p(d,{name:"arrow",color:"#d8d8d8"},null)])},label:function(){return p("p",{class:b.addP},[m("测验班级")])}}),p(v,{rows:3,modelValue:y.value.unitName,"onUpdate:modelValue":function(e){return y.value.unitName=e},maxlength:50,placeholder:"请选择测验内容",readonly:!0,"input-align":"right",onClick:O},{extra:function(){return p("div",{class:b.loctionIconWrap},[p(d,{name:"arrow",color:"#d8d8d8"},null)])},label:function(){return p("p",{class:b.addP},[m("测验内容")])}})]}})]),p(g,{position:"bottom"},null)]):null,p(f,{show:r.showPopoverOrchestra,"onUpdate:show":function(e){return r.showPopoverOrchestra=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[p(w,{columns:r.actions,columnsFieldNames:{text:"name",value:"value"},onCancel:function(){return r.showPopoverOrchestra=!1},onConfirm:W},null)]}}),p(f,{show:r.showPopoverClass,"onUpdate:show":function(e){return r.showPopoverClass=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[p(w,{columns:r.classList,columnsFieldNames:{text:"name",value:"value"},onCancel:function(){return r.showPopoverClass=!1},onConfirm:j},null)]}})])}}}))}}}))}();
|