!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var e=1;e=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var i=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(i&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),m}},e}function u(t,e,n,r,o,a,u){try{var i=t[a](u),c=i.value}catch(l){return void n(l)}i.done?e(c):Promise.resolve(c).then(r,o)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(t){u(a,r,o,i,c,"next",t)}function c(t){u(a,r,o,i,c,"throw",t)}i(void 0)}))}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,u,i=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(i.push(r.value),i.length!==e);c=!0);}catch(s){l=!0,o=s}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw o}}return i}}(t,e)||l(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);no)return String(o)}return t}))}(t,l.value),y(t,o.value)||(o.value=t)}),{immediate:!0});var s=function(){for(var t=arguments.length,e=new Array(t),r=0;r=0?J(t):""},u=function(t){if(t&&t>=0){var e=J(t);return(Number(e)>=60?59:e)+""}return""};return h((function(){return t.show}),(function(){if(!t.show){var e=It(t.time);o.minute=e.minute,o.second=e.secord}})),h((function(){return t.time}),(function(){var e=It(t.time);o.minute=e.minute,o.second=e.secord})),function(){return v("div",{class:gt.popupContainer},[v("h2",{class:gt.popupTitle},[j("请输入节目时长")]),v("div",{class:gt.popupContent},[v("div",{class:gt.popupTimer},[v(st,{modelValue:o.minute,"onUpdate:modelValue":function(t){return o.minute=t},type:"tel",formatter:a,border:!1,maxlength:2,autocomplete:"off"},null),j("分"),v(st,{modelValue:o.second,"onUpdate:modelValue":function(t){return o.second=t},type:"tel",formatter:u,border:!1,maxlength:2,autocomplete:"off"},null),j("秒")])]),v("div",{class:["btnGroupPopup"]},[v(w,{round:!0,onClick:function(){return n("close")}},{default:function(){return[j("取消")]}}),v(w,{type:"primary",round:!0,onClick:function(){o.minute&&o.second?60*o.minute+o.second<=0?L("时长输入必须大于0"):n("confirm",o):L("时长输入有误")}},{default:function(){return[j("确定")]}})])])}}});var _t=f({name:"performance-team",props:{show:{type:Boolean,default:!1},performances:{type:Array,default:function(){return[]}},selectIds:{type:Array,default:function(){return[]}}},emits:["close","confirm"],setup:function(t,e){var n=e.emit,r=m([]),o=x({performanceList:t.performances||[],checkboxs:t.selectIds||[]});return h((function(){return t.performances}),(function(){console.log(t.performances,"props.performances"),o.performanceList=t.performances})),h((function(){return t.selectIds}),(function(){o.checkboxs=t.selectIds})),h((function(){return t.show}),(function(){t.show||(o.checkboxs=t.selectIds)})),function(){var t,e;return v("div",{class:gt.popupContainer},[v("h2",{class:gt.popupTitle},[j("选择表演团队")]),v(H,{class:[gt.searchTypeFlex,gt.multFlex],modelValue:o.checkboxs,"onUpdate:modelValue":function(t){return o.checkboxs=t}},(e=t=o.performanceList.map((function(t,e){return v(X,{type:o.checkboxs.includes(t.subjectId)?"primary":"default"},{default:function(){return[v(Z,{name:t.subjectId,ref:function(t){return r.value[e]=t},onClick:function(t){t.stopPropagation()}},null),v("span",{class:"van-ellipsis"},[t.subjectName])]}})})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!I(e)?t:{default:function(){return[t]}})),v("div",{class:["btnGroupPopup"]},[v(w,{round:!0,onClick:function(){return n("close")}},{default:function(){return[j("取消")]}}),v(w,{type:"primary",round:!0,onClick:function(){return n("confirm",o.checkboxs)}},{default:function(){return[j("确定")]}})])])}}});var xt=f({name:"group-chat",props:{type:{type:String,default:"edit"},height:{type:[Number],default:0},bottomHeight:{type:[String,Number],default:0},headerHeight:{type:[Number],default:0},studentList:{type:Array,default:function(){return[]}},selectItem:{type:Array,default:function(){return[]}}},emits:["update:selectItem"],setup:function(t,e){var n=e.emit,r=m([]),o=x({height:t.height,check:[]}),u=function(e){if("look"!==t.type){r.value[e].toggle();var a=[];t.studentList.forEach((function(t){o.check.includes(t.studentId)&&a.push({studentId:t.studentId,studentName:t.studentName,studentAvatar:t.studentAvatar,subjectId:t.subjectId})})),n("update:selectItem",a)}};h((function(){return t.height}),(function(){o.height=t.height})),h((function(){return t.selectItem}),(function(){c()}),{deep:!0});var c=function(){var e=t.selectItem||[],n=[];e.forEach((function(t){n.push(t.studentId)})),o.check=n};return A(i(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c();case 1:case"end":return t.stop()}}),t)})))),function(){var e,n;return v("div",{style:{"min-height":"calc(100vh - ".concat(t.headerHeight,"px - ").concat(o.height,"px - ").concat(t.bottomHeight,"px )")}},[v(H,{modelValue:o.check,"onUpdate:modelValue":function(t){return o.check=t}},(n=e=t.studentList.map((function(e,n){return v(rt,{center:!0,onClick:function(){return u(n)},class:tt.popupCell},{icon:function(){return v(ot,{src:e.studentAvatar||nt,class:tt.imgLogo,fit:"cover"},null)},title:function(){return v("div",{class:tt.infos},[v("div",{class:tt.infoTitle},[e.studentName]),v("div",{class:tt.infoContent},[e.subjectName])])},"right-icon":function(){return"edit"===t.type&&v(Z,{name:e.studentId,ref:function(t){return r.value[n]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),u(n)}},{icon:function(t){return v(k,{class:tt.boxStyle,name:t.checked?et:W},null)}})}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!I(n)?e:{default:function(){return[e]}}))])}}});var jt=t("C",f({name:"cast-modal",props:{type:{type:String,default:"edit"},subjectAllList:{type:Array,default:function(){return[]}},performerList:{type:Array,default:function(){return[]}}},emits:["close","update:performerList","confirm"],setup:function(t,e){var n=e.emit,r=function(){var e=t.performerList||[];return t.subjectAllList.forEach((function(t){var n=e.find((function(e){return e.subjectId==t.subjectId}));t.selectList=n?Y(n.studentList):[]})),console.log(t.subjectAllList,"props.subjectAllList"),t.subjectAllList||[]},o=x({varName:"--popup-navbar-height",popupHeight:0,height:0,bottomHeight:0,subjectList:r()});A((function(){var t=C(document.querySelector(".van-tab")).height;o.height=t})),h((function(){return t.subjectAllList}),(function(){o.subjectList=r()})),h((function(){return t.performerList}),(function(){o.subjectList=r()}));var a=function(){var t=[];o.subjectList.forEach((function(e){e.selectList&&e.selectList.length>0&&t.push({studentCount:e.selectList.length,studentList:e.selectList,subjectId:e.subjectId,subjectName:e.subjectName})})),console.log(t,"selectList"),n("close"),n("update:performerList",t),n("confirm",t)};return function(){var e,n;return v("div",{class:tt.castPopupContainer,style:"background-color: #f8f9fc; height: 100%"},[v(B,{varName:o.varName,onBarHeight:function(t){o.popupHeight=t}},{default:function(){return[v(O,{title:"演员名单"},null)]}}),v(at,{shrink:!0,sticky:!0,offsetTop:o.popupHeight},(n=e=o.subjectList.map((function(e){return v(ut,{name:e.subjectId,title:e.subjectName+"(".concat(e.studentCount,")")},{default:function(){return[v(xt,{type:t.type,height:o.height,headerHeight:o.popupHeight,bottomHeight:o.bottomHeight,studentList:e.studentList,selectItem:e.selectList,"onUpdate:selectItem":function(t){return e.selectList=t}},null)]}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!I(n)?e:{default:function(){return[e]}})),"edit"===t.type&&v(B,{position:"bottom",onBarHeight:function(t){o.bottomHeight=t}},{default:function(){return[v("div",{class:"btnGroupFixed"},[v(w,{round:!0,block:!0,type:"primary",onClick:a},{default:function(){return[j("确认")]}})])]}})])}}}));function wt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!I(t)}var Lt={id:null,name:"",type:"",musicGroupId:null,musicGroupName:null,subjectAllList:[],subjectIdList:[],time:null,performerList:[],attachmentUrl:[],attachmentVideoUrl:[],attachmentImgUrl:[]},It=t("f",(function(t){return t?{minute:Math.floor(t/60),secord:t%60}:{minute:null,secord:null}})),At=f({name:"operation-page",setup:function(){var t=G(),n=N(),o=x({activityDetailId:t.query.id,timerStatus:!1,currentDate:[S().format("YYYY"),S().format("MM"),S().format("DD")],orchestraStatus:!1,orchestraColumns:[],programType:"",programTimerStatus:!1,deleteStatus:!1,teamStatus:!1,castStatus:!1,selectOrchestra:[],deleteIndex:0,startTime:S().format("YYYY-MM-DD"),name:"",type:"",detail:[r({},Lt)]}),u=function(){var t=i(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,U.get("/api-web/cooperationOrgan/musicGroupPage");case 3:e=t.sent,(e.data||[]).forEach((function(t){o.orchestraColumns.push({text:t.name,value:t.id})})),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}(),c=function(){var t=i(a().mark((function t(){var e,n,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,U.post("/api-web/schoolActivity/userList",{data:{activityDetailId:o.activityDetailId,musicGroupId:o.selectOrchestra.musicGroupId,subjectIds:[]}});case 3:e=t.sent,n=e.data,r=n||[],o.selectOrchestra.subjectAllList=r,o.selectOrchestra.performerList=r,o.selectOrchestra.subjectIdList=[],r.forEach((function(t){o.selectOrchestra.subjectIdList.push(t.subjectId)})),t.next=14;break;case 12:t.prev=12,t.t0=t.catch(0);case 14:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(){return t.apply(this,arguments)}}(),l=function(){o.detail.push(r({},Lt))},s=function(t){var e=0;return t.forEach((function(t){e+=t.studentCount})),e},p=function(t){var e,n,r=[];null===(e=o.selectOrchestra.performerList)||void 0===e||e.forEach((function(e){t.includes(e.subjectId)&&r.push(e)})),null===(n=o.selectOrchestra.subjectAllList)||void 0===n||n.forEach((function(e){var n,a=null===(n=o.selectOrchestra.performerList)||void 0===n?void 0:n.findIndex((function(t){return t.subjectId==e.subjectId}));t.includes(e.subjectId)&&a<0&&r.push(e)})),o.selectOrchestra.performerList=r},f=function(){var t=i(a().mark((function t(){var e,n,r,u,i,c,l,s;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,U.get("/api-web/schoolActivity/detail/"+o.activityDetailId);case 3:e=t.sent,n=e.data,u=(r=n||{}).detail,i=r.name,c=r.startTime,l=r.type,o.startTime=S(c).format("YYYY-MM-DD"),o.name=i,o.type=l,o.currentDate=[S(c).format("YYYY"),S(c).format("MM"),S(c).format("DD")],s=[],u.forEach((function(t){var e=t.attachmentUrl?t.attachmentUrl.split(","):[],n=[],r=[];e.forEach((function(t){Q(t,"image")?r.push(t):n.push(t)}));var o,a,u={id:t.id,name:t.name,type:t.type,musicGroupId:t.musicGroupId,musicGroupName:t.musicGroupName,subjectAllList:t.studentList,subjectIdList:t.subjectIdList?t.subjectIdList.split(",").map((function(t){return Number(t)})):[],time:t.time,performerList:(o=t.studentList,a=[],o.map((function(t){var e=0,n=[];t.studentList.forEach((function(t){t.selected&&(e++,n.push(t))})),e>0&&a.push({studentCount:n.length,subjectId:t.subjectId,subjectName:t.subjectName,studentList:n})})),a||[]),attachmentUrl:e,attachmentVideoUrl:n,attachmentImgUrl:r};s.push(u)})),o.detail=s,t.next=17;break;case 15:t.prev=15,t.t0=t.catch(0);case 17:case"end":return t.stop()}}),t,null,[[0,15]])})));return function(){return t.apply(this,arguments)}}();A((function(){u(),o.activityDetailId&&f()}));var m=function(){if(!o.name.trim())return L("请填写活动名称"),!1;if(o.name.length<3||o.name.length>15)return L("活动名称长度3~15"),!1;if(!o.type)return L("请选择活动类别"),!1;for(var t=0,e=o.detail.length;t0?"":"请选择表演乐团",border:t.subjectIdList.length<=0,class:t.subjectIdList.length>0?gt.teamCell:""},null),t.subjectIdList.length>0&&v(rt,{class:gt.tagCell,center:!0},{title:function(){return t.subjectIdList.map((function(e,n){var r="";return t.subjectAllList.forEach((function(t){t.subjectId===e&&(r=t.subjectName)})),v(X,{type:"primary",plain:!0,class:gt.tagItem,onClick:function(){t.subjectIdList.splice(n,1),p(t.subjectIdList)}},{default:function(){return[r,v(k,{name:"cross",class:gt.closeable},null)]}})}))}}),v(st,{isLink:!0,label:"演员",inputAlign:"right",readonly:!0,clearable:!1,onClick:function(){t.subjectIdList.length<=0?L("请选择表演团队"):(o.selectOrchestra=[],o.selectOrchestra=t,o.castStatus=!0)}},{input:function(){return s(t.performerList)>0?v("div",{class:gt.performance},[j("共 "),v("span",null,[s(t.performerList)]),j(" 名")]):v("div",{class:gt.placeholder},[j("请选择演员")])}}),v(st,{label:"节目时长",inputAlign:"right",onClick:function(){o.selectOrchestra=[],o.selectOrchestra=t,o.programTimerStatus=!0},center:!0,placeholder:"请选择节目时长"},{input:function(){var e=It(t.time);return v("div",{class:gt.programTimer},[v("span",null,[null==e?void 0:e.minute]),j("分"),v("span",null,[null==e?void 0:e.secord]),j("秒")])}}),v(st,{label:"上传附件",labelAlign:"top"},{input:function(){return v("div",{class:gt.uploadGroup},[v(P,{uploadIcon:z,maxCount:5,native:!0,modelValue:t.attachmentImgUrl,"onUpdate:modelValue":function(e){return t.attachmentImgUrl=e},style:{marginTop:"6px"}},{default:function(){return[v(q,{uploadIcon:K,uploadType:"VIDEO",native:!0,uploadSize:50,accept:".mp4",maxCount:3,modelValue:t.attachmentVideoUrl,"onUpdate:modelValue":function(e){return t.attachmentVideoUrl=e}},null)]}})])}})]}})})),v("div",{class:gt.addButtonGroup},[v(w,{icon:"plus",block:!0,type:"primary",plain:!0,class:gt.addButton,onClick:l},{default:function(){return[j("添加节目")]}})]),v(B,{position:"bottom"},{default:function(){return[v("div",{class:["btnGroupFixed",gt.bottonGroup]},[v(w,{type:"primary",round:!0,block:!0,onClick:d},{default:function(){return[j("确认")]}})])]}}),v(T,{show:o.timerStatus,"onUpdate:show":function(t){return o.timerStatus=t},round:!0,position:"bottom"},{default:function(){return[v(vt,{modelValue:o.currentDate,"onUpdate:modelValue":function(t){return o.currentDate=t},formatter:E,onCancel:function(){return o.timerStatus=!1},onConfirm:function(t){var e=t.selectedValues;o.startTime=e.join("-"),o.timerStatus=!1}},null)]}}),v(T,{show:o.orchestraStatus,"onUpdate:show":function(t){return o.orchestraStatus=t},round:!0,position:"bottom"},{default:function(){return[v(ct,{columns:o.orchestraColumns,onCancel:function(){return o.orchestraStatus=!1},onConfirm:function(t){var e=t.selectedOptions;o.selectOrchestra.musicGroupId!=e[0].value?(o.selectOrchestra.subjectAllList=[],o.selectOrchestra.performerList=[],o.selectOrchestra.subjectIdList=[],o.selectOrchestra.musicGroupName=e[0].text,o.selectOrchestra.musicGroupId=e[0].value,o.orchestraStatus=!1,c()):o.orchestraStatus=!1}},null)]}}),v(T,{show:o.programTimerStatus,"onUpdate:show":function(t){return o.programTimerStatus=t},round:!0,style:{width:"82%"}},{default:function(){return[v(bt,{show:o.programTimerStatus,time:o.selectOrchestra.time,onClose:function(){return o.programTimerStatus=!1},onConfirm:function(t){var e=60*Number(t.minute||0)+Number(t.second||0);o.selectOrchestra.time=e,o.programTimerStatus=!1}},null)]}}),v(T,{show:o.deleteStatus,"onUpdate:show":function(t){return o.deleteStatus=t},round:!0,style:{width:"82%"}},{default:function(){return[v("div",{class:gt.popupContainer},[v("h2",{class:gt.popupTitle},[j("删除节目")]),v("div",{class:gt.popupContent},[v("p",{class:gt.tipContent},[j("删除"),v("span",null,[j("《节目"),F(o.deleteIndex+1),j("》")]),j(",删除后内容不可恢复")])]),v("div",{class:["btnGroupPopup"]},[v(w,{type:"primary",round:!0,onClick:function(){o.detail.splice(o.deleteIndex,1),o.deleteStatus=!1}},{default:function(){return[j("确定")]}}),v(w,{round:!0,onClick:function(){return o.deleteStatus=!1}},{default:function(){return[j("取消")]}})])])]}}),v(T,{show:o.teamStatus,"onUpdate:show":function(t){return o.teamStatus=t},round:!0,position:"bottom",closeable:!0},{default:function(){return[v(_t,{show:o.teamStatus,performances:o.selectOrchestra.subjectAllList,selectIds:o.selectOrchestra.subjectIdList,onClose:function(){return o.teamStatus=!1},onConfirm:function(t){o.selectOrchestra.subjectIdList=t,p(t),o.teamStatus=!1}},null)]}}),v($,{modelValue:o.castStatus,"onUpdate:modelValue":function(t){return o.castStatus=t}},{default:function(){return[v(jt,{subjectAllList:o.selectOrchestra.subjectAllList,performerList:o.selectOrchestra.performerList,"onUpdate:performerList":function(t){return o.selectOrchestra.performerList=t},onClose:function(){return o.castStatus=!1},onConfirm:function(t){var e=[];(t||[]).forEach((function(t){e.push(t.subjectId)})),o.selectOrchestra.subjectIdList=e||[]}},null)]}})])}}}),kt=Object.freeze(Object.defineProperty({__proto__:null,default:At,formatterTimer:It},Symbol.toStringTag,{value:"Module"}));t("o",kt)}}}))}();