!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],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&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:q(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),m}},e}function i(t,e,n,r,o,a,i){try{var u=t[a](i),c=u.value}catch(l){return void n(l)}u.done?e(c):Promise.resolve(c).then(r,o)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function u(t){i(a,r,o,u,c,"next",t)}function c(t){i(a,r,o,u,c,"throw",t)}u(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,i,u=[],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)&&(u.push(r.value),u.length!==e);c=!0);}catch(s){l=!0,o=s}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(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),g(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):""},i=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||null,o.second=e.secord||null}})),h((function(){return t.time}),(function(){var e=It(t.time);o.minute=e.minute||null,o.second=e.secord||null})),function(){return y("div",{class:yt.popupContainer},[y("h2",{class:yt.popupTitle},[j("请输入节目时长")]),y("div",{class:yt.popupContent},[y("div",{class:yt.popupTimer},[y(lt,{modelValue:o.minute,"onUpdate:modelValue":function(t){return o.minute=t},type:"tel",formatter:a,border:!1,maxlength:2,autocomplete:"off"},null),j("分"),y(lt,{modelValue:o.second,"onUpdate:modelValue":function(t){return o.second=t},type:"tel",formatter:i,border:!1,maxlength:2,autocomplete:"off"},null),j("秒")])]),y("div",{class:["btnGroupPopup"]},[y(x,{round:!0,onClick:function(){return n("close")}},{default:function(){return[j("取消")]}}),y(x,{type:"primary",round:!0,onClick:function(){o.minute&&o.second?60*o.minute+o.second<=0?I("时长输入必须大于0"):n("confirm",o):I("时长输入有误")}},{default:function(){return[j("确定")]}})])])}}});var bt=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=w({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 y("div",{class:yt.popupContainer},[y("h2",{class:yt.popupTitle},[j("选择表演团队")]),y(Q,{class:[yt.searchTypeFlex,yt.multFlex],modelValue:o.checkboxs,"onUpdate:modelValue":function(t){return o.checkboxs=t}},(e=t=o.performanceList.map((function(t,e){return y(X,{type:o.checkboxs.includes(t.subjectId)?"primary":"default"},{default:function(){return[y(H,{name:t.subjectId,ref:function(t){return r.value[e]=t},onClick:function(t){t.stopPropagation()}},null),t.subjectName]}})})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!L(e)?t:{default:function(){return[t]}})),y("div",{class:["btnGroupPopup"]},[y(x,{round:!0,onClick:function(){return n("close")}},{default:function(){return[j("取消")]}}),y(x,{type:"primary",round:!0,onClick:function(){return n("confirm",o.checkboxs)}},{default:function(){return[j("确定")]}})])])}}});var _t=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=w({height:t.height,check:[]}),i=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(u(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 y("div",{style:{"min-height":"calc(100vh - ".concat(t.headerHeight,"px - ").concat(o.height,"px - ").concat(t.bottomHeight,"px )")}},[y(Q,{modelValue:o.check,"onUpdate:modelValue":function(t){return o.check=t}},(n=e=t.studentList.map((function(e,n){return y(nt,{center:!0,onClick:function(){return i(n)},class:$.popupCell},{icon:function(){return y(rt,{src:e.studentAvatar||et,class:$.imgLogo,fit:"cover"},null)},title:function(){return y("div",{class:$.infos},[y("div",{class:$.infoTitle},[e.studentName]),y("div",{class:$.infoContent},[e.subjectName])])},"right-icon":function(){return"edit"===t.type&&y(H,{name:e.studentId,ref:function(t){return r.value[n]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),i(n)}},{icon:function(t){return y(k,{class:$.boxStyle,name:t.checked?tt:Z},null)}})}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!L(n)?e:{default:function(){return[e]}}))])}}});var wt=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?V(n.studentList):[]})),console.log(t.subjectAllList,"props.subjectAllList"),t.subjectAllList||[]},o=w({varName:"--popup-navbar-height",popupHeight:0,height:0,bottomHeight:0,subjectList:r()});A((function(){var t=q(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 y("div",{class:$.castPopupContainer,style:"background-color: #f8f9fc; height: 100%"},[y(K,{varName:o.varName,onBarHeight:function(t){o.popupHeight=t}},{default:function(){return[y(C,{title:"演员名单"},null)]}}),y(ot,{shrink:!0,sticky:!0,offsetTop:o.popupHeight},(n=e=o.subjectList.map((function(e){return y(at,{name:e.subjectId,title:e.subjectName+"(".concat(e.studentCount,")")},{default:function(){return[y(_t,{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)&&!L(n)?e:{default:function(){return[e]}})),"edit"===t.type&&y(K,{position:"bottom",onBarHeight:function(t){o.bottomHeight=t}},{default:function(){return[y("div",{class:"btnGroupFixed"},[y(x,{round:!0,block:!0,type:"primary",onClick:a},{default:function(){return[j("确认")]}})])]}})])}}}));function jt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}var xt={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}})),Lt=f({name:"operation-page",setup:function(){var t=F(),n=G(),o=w({activityDetailId:t.query.id,timerStatus:!1,currentDate:[O().format("YYYY"),O().format("MM"),O().format("DD")],orchestraStatus:!1,orchestraColumns:[],programType:"",programTimerStatus:!1,deleteStatus:!1,teamStatus:!1,castStatus:!1,selectOrchestra:[],deleteIndex:0,startTime:O().format("YYYY-MM-DD"),name:"",type:"",detail:[r({},xt)]}),i=function(){var t=u(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,E.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=u(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,E.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({},xt))},s=function(t){var e=0;return t.forEach((function(t){e+=t.studentCount})),e},p=function(t){var e=[];o.selectOrchestra.performerList.forEach((function(n){t.includes(n.subjectId)&&e.push(n)})),o.selectOrchestra.subjectAllList.forEach((function(n){var r=o.selectOrchestra.performerList.findIndex((function(t){return t.subjectId==n.subjectId}));t.includes(n.subjectId)&&r<0&&e.push(n)})),o.selectOrchestra.performerList=e},f=function(){var t=u(a().mark((function t(){var e,n,r,i,u,c,l,s;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,E.get("/api-web/schoolActivity/detail/"+o.activityDetailId);case 3:e=t.sent,n=e.data,i=(r=n||{}).detail,u=r.name,c=r.startTime,l=r.type,o.startTime=O(c).format("YYYY-MM-DD"),o.name=u,o.type=l,o.currentDate=[O(c).format("YYYY"),O(c).format("MM"),O(c).format("DD")],s=[],i.forEach((function(t){var e=t.attachmentUrl?t.attachmentUrl.split(","):[],n=[],r=[];e.forEach((function(t){B(t,"image")?r.push(t):n.push(t)}));var o,a,i={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(i)})),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(){i(),o.activityDetailId&&f()}));var m=function(){if(!o.name.trim())return I("请填写活动名称"),!1;if(o.name.length<3||o.name.length>25)return I("活动名称长度3~25"),!1;if(!o.type)return I("请选择活动类别"),!1;for(var t=0,e=o.detail.length;t0?"":"请选择表演乐团",border:t.subjectIdList.length<=0,class:t.subjectIdList.length>0?yt.teamCell:""},null),t.subjectIdList.length>0&&y(nt,{class:yt.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)})),y(X,{type:"primary",plain:!0,class:yt.tagItem},{default:function(){return[r,y(k,{name:"cross",class:yt.closeable,onClick:function(){t.subjectIdList.splice(n,1),p(t.subjectIdList)}},null)]}})}))}}),y(lt,{isLink:!0,label:"演员",inputAlign:"right",readonly:!0,clearable:!1,onClick:function(){t.subjectIdList.length<=0?I("请选择表演团队"):(o.selectOrchestra=[],o.selectOrchestra=t,o.castStatus=!0)}},{input:function(){return s(t.performerList)>0?y("div",{class:yt.performance},[j("共 "),y("span",null,[s(t.performerList)]),j(" 名")]):y("div",{class:yt.placeholder},[j("请选择演员")])}}),y(lt,{label:"节目时长",inputAlign:"right",onClick:function(){o.selectOrchestra=[],o.selectOrchestra=t,o.programTimerStatus=!0},center:!0,placeholder:"请选择节目时长"},{input:function(){var e=It(t.time);return y("div",{class:yt.programTimer},[y("span",null,[null==e?void 0:e.minute]),j("分"),y("span",null,[null==e?void 0:e.secord]),j("秒")])}}),y(lt,{label:"上传附件",labelAlign:"top"},{input:function(){return y("div",{class:yt.uploadGroup},[y(D,{uploadIcon:M,maxCount:5,native:!0,modelValue:t.attachmentImgUrl,"onUpdate:modelValue":function(e){return t.attachmentImgUrl=e},style:{marginTop:"6px"}},{default:function(){return[y(R,{uploadIcon:z,uploadType:"VIDEO",native:!0,uploadSize:50,accept:".mp4",maxCount:3,modelValue:t.attachmentVideoUrl,"onUpdate:modelValue":function(e){return t.attachmentVideoUrl=e}},null)]}})])}})]}})})),y("div",{class:yt.addButtonGroup},[y(x,{icon:"plus",block:!0,type:"primary",plain:!0,class:yt.addButton,onClick:l},{default:function(){return[j("添加节目")]}})]),y(K,{position:"bottom"},{default:function(){return[y("div",{class:["btnGroupFixed",yt.bottonGroup]},[y(x,{type:"primary",round:!0,block:!0,onClick:d},{default:function(){return[j("确认")]}})])]}}),y(S,{show:o.timerStatus,"onUpdate:show":function(t){return o.timerStatus=t},round:!0,position:"bottom"},{default:function(){return[y(gt,{modelValue:o.currentDate,"onUpdate:modelValue":function(t){return o.currentDate=t},formatter:T,onCancel:function(){return o.timerStatus=!1},onConfirm:function(t){var e=t.selectedValues;o.startTime=e.join("-"),o.timerStatus=!1}},null)]}}),y(S,{show:o.orchestraStatus,"onUpdate:show":function(t){return o.orchestraStatus=t},round:!0,position:"bottom"},{default:function(){return[y(ut,{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())}},null)]}}),y(S,{show:o.programTimerStatus,"onUpdate:show":function(t){return o.programTimerStatus=t},round:!0,style:{width:"82%"}},{default:function(){return[y(vt,{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)]}}),y(S,{show:o.deleteStatus,"onUpdate:show":function(t){return o.deleteStatus=t},round:!0,style:{width:"82%"}},{default:function(){return[y("div",{class:yt.popupContainer},[y("h2",{class:yt.popupTitle},[j("删除节目")]),y("div",{class:yt.popupContent},[y("p",{class:yt.tipContent},[j("删除"),y("span",null,[j("《节目"),o.deleteIndex+1,j("》")]),j(",删除后内容不可恢复")])]),y("div",{class:["btnGroupPopup"]},[y(x,{type:"primary",round:!0,onClick:function(){o.detail.splice(o.deleteIndex,1),o.deleteStatus=!1}},{default:function(){return[j("确定")]}}),y(x,{round:!0,onClick:function(){return o.deleteStatus=!1}},{default:function(){return[j("取消")]}})])])]}}),y(S,{show:o.teamStatus,"onUpdate:show":function(t){return o.teamStatus=t},round:!0,position:"bottom",closeable:!0},{default:function(){return[y(bt,{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)]}}),y(W,{modelValue:o.castStatus,"onUpdate:modelValue":function(t){return o.castStatus=t}},{default:function(){return[y(wt,{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)]}})])}}}),At=Object.freeze(Object.defineProperty({__proto__:null,default:Lt,formatterTimer:It},Symbol.toStringTag,{value:"Module"}));t("o",At)}}}))}();