!function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(t){for(var o=1;o0&&1===a.current)){o.next=11;break}return o.abrupt("return");case 11:i=a.rows||[],n.list=n.list.concat(i),n.listState.finished=a.current>=a.pages,n.params.page=a.current+1,n.listState.dataShow=n.list.length>0,n.isLoading=!1,o.next=24;break;case 19:o.prev=19,o.t0=o.catch(0),n.listState.dataShow=!1,n.listState.finished=!0,n.isLoading=!1;case 24:case"end":return o.stop()}}),o,null,[[0,19]])})));return function(){return o.apply(this,arguments)}}(),j=function(e){return!!(e.size/1024/1024<5)||(A("上传文件大小不能超过 5MB"),!1)},N=function(e,t){return!0},L=function(){var e=r(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.status="uploading",t.message="上传中...",e.next=5,Y(t);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),m();case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}(),Y=function(){var e=r(regeneratorRuntime.mark((function e(t){var o,r,a,i,c,s,u,l,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.log(t,"files"),o=t.file,"/api-school/open/getUploadSign",r=o.name||"",a="/orchestra/"+(r&&r.replace(/ /gi,"_")),i=(new Date).getTime()+a,e.next=9,g.post("/api-school/open/getUploadSign",{data:{filename:a,bucketName:n.bucket,postData:{filename:a,acl:"public-read",key:i,unknowValueField:[]}}});case 9:for(l in c=e.sent,b({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),s={policy:c.data.policy,signature:c.data.signature,key:i,KSSAccessKeyId:c.data.kssAccessKeyId,acl:"public-read",name:a},u=new FormData,s)u.append(l,s[l]);return u.append("file",o,a),e.next=17,v(w(n.bucket),{method:"POST",data:u});case 17:f=w(n.bucket)+i,m(),t.src=f,t.status="done",e.next=27;break;case 23:e.prev=23,e.t0=e.catch(0),t.status="failed",console.log(e.t0,"uploadFile");case 27:case"end":return e.stop()}}),e,null,[[0,23]])})));return function(t){return e.apply(this,arguments)}}(),q=function(){var t=r(regeneratorRuntime.mark((function t(){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(n.fileList.length<=0)){t.next=4;break}return A("请上传照片"),t.abrupt("return");case 4:return o=n.fileList.map((function(e){return e.src})),console.log(o,"onSubmitPhoto"),t.next=8,g.post("/api-school/orchestraPhoto/save",{data:{orchestraPhotoAlbumId:e.query.photoId,fileUrl:o.join(",")}});case 8:n.showPhoto=!1,n.fileList=[],n.params.page=1,n.list=[],n.listState.dataShow=!0,n.listState.loading=!1,n.listState.finished=!1,P(),t.next=20;break;case 18:t.prev=18,t.t0=t.catch(0);case 20:case"end":return t.stop()}}),t,null,[[0,18]])})));return function(){return t.apply(this,arguments)}}(),K=a({show:!1,startPosition:0,downIndex:0,downLoading:!1}),Q=i((function(){return n.list.map((function(e){return e.fileUrl}))})),I=function(e){var t=document.createElement("canvas");t.width=e.width,t.height=e.height;var n=t.getContext("2d");return null==n||n.drawImage(e,0,0,t.width,t.height),console.log(e,t),t.toDataURL("image/png")},T=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Q.value[K.downIndex],!K.downLoading&&t){e.next=3;break}return e.abrupt("return");case 3:n=b({message:"保存中",duration:0}),(o=document.createElement("img")).crossOrigin="anonymous",o.onload=r(regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=I(o),e.prev=1,e.next=4,k({api:"savePicture",content:{base64:t}});case 4:"success"===(null==(a=e.sent)||null===(r=a.content)||void 0===r?void 0:r.status)?y("保存成功"):_("保存失败"),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(1);case 10:n.close(),K.downLoading=!1;case 12:case"end":return e.stop()}}),e,null,[[1,8]])}))),o.src=t+"?v=".concat(Date.now());case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){n.check.length<=0?A("请选择需要删除的图片"):x({title:"确认删除",message:"删除选择的照片",confirmButtonText:"确认",showCancelButton:!0}).then(r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(n.check,"check"),e.prev=1,e.next=4,g.post("/api-school/orchestraPhoto/remove",{requestType:"form",data:{ids:n.check.join(",")}});case 4:n.params.page=1,n.list=[],n.listState.dataShow=!0,n.listState.loading=!1,n.listState.finished=!1,P(),e.next=14;break;case 12:e.prev=12,e.t0=e.catch(1);case 14:case"end":return e.stop()}}),e,null,[[1,12]])}))))};return c((function(){P()})),function(){var t;return s("div",{class:[E.phoneDetail,!n.listState.dataShow&&"emptyRootContainer"]},[s(U,{position:"top"},{default:function(){return[s(C,{title:e.query.name||""},{right:function(){return s(u,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABB9JREFUaEPtWU1oXFUU/s6b28SQpq1FaFC0WlFBSszMfcyrVTELN0LdGVO60GzsSisWU7Ow5KkBsS0F/0BcVQKSVHFjoRsXUarxDe/MxFBcWNTYCFqQUh1cmN6ZK7fNjC/JzLyfNpMJzN29d8/5zvneOefec98lbPBBG9x/JCLQ39+/LZVKHQbwNIBdADoTfoh/AfwM4LNSqXRydnb2Slyc2AQcx3lQKXUWwF1xjYXIXxRCPOl53g9xcGMR6Ovr6xZCnCeiu+MYiSqrtZ5XSu2em5v7J6pOLAKZTGaEiI5FBU8ip7U+ks/nj0fVjUVASnkOwCMB8FNCiJc8z/s7qsGgnOM4W5RS7wAYDrw/x8yPRcWLS+AigDsr4KlUalcul/slqrFactls9p5SqWQKuTIWmDlyfcUl8AeAHRVLQohez/Mu3QgBx3F2KKUMbmVcYubeqJhtAi0TgWw2+7BS6l0iquZ4jTDeBiAVeK8A6KjhriNnskAE5koA/qyHqbVeEEIcyuVyM0ammkKZTOZHIrrvBp1pirrW+kI+n79/GQEp5bICbYonyY1UC70aASnlAQAfAehOjtsUTbNLH2TmT5ZFwDxIKTcJIbY3ckMpZWmtt3V0dNxUbxcXF0FEV4QQ5RD7l5n5akUmdBm1bXu32X211l8y80831es6YFLKe4noCQDf+L5/vpHNhgTS6bRtWda3ADYBMKF7aK1JGOcBfL+UylfL5fLeQqHg1yPRkICU8k0Ar1XDRfSi7/vvrwTTJwe7ULQOAnQLOksf0uinf9UyqMcP7ERJDQOpeegHJsh1V6WLbdsvaK3fC+iPM/PRpARMV/hKQHmEmU+sIuDunwL0M9feE31FY5MDq2ReHuzCVusCgDuuz+mj5J4eXyknpTT2gt3oCWYeWVsCrw9dhsatS45pbC920aGz5rRVHfqNQYmyFUyFr8mderw1CLhDRQCbq850d2ymkYllhxLtDu0BcG33XIrUDI1N7m0TaLRESSkj1kA7AtXvuD5F3K6B/xO5HYFgUbeLOLiRtfeB2gt+WDPX3gcq363dStRpGdYvhUAz5LZOM1cA0L/UTv9O7unbV58ZBnsBWgDo+j8gwgSNTT3bKt1oBsAH0OgE0WFyJ6drRVy7+4cB/Sqg5wH1PLmf/9YSBBp1tHHn1qWViOtkSAvf/CNlyxKwbfuY1rp6oI57/ZOE2MprLCI67vv+kXpYYcvoKIC3AspeuVweKhQKvyZxLkwnnU7vtCxrCoATkB1l5reTEjBA34UZXuP5PczsJSJglKSUXwDYt8ZO1oM/w8xPNbId+m9USrkVwBkAjzaZhLkR3cfMNf/yVXwJJWAEBwYGRLFYNFehzwHoA7BljciY69o5AB/39PScmp6eNjdADUckAmEg6zm/4Qn8B3AYpU8W4qBEAAAAAElFTkSuQmCC",size:22,onClick:function(){return n.isEdit=!n.isEdit}},null)}}),s(l,{icon:"plus",block:!0,class:E.addPhone,onClick:function(){return n.showPhoto=!0}},{default:function(){return[f("上传照片")]}})]}}),n.listState.dataShow?s(V,{finished:n.listState.finished,finishedText:" ",onLoad:P,immediateCheck:!1},{default:function(){return[s(B,{class:E.phoneContainer,modelValue:n.check,"onUpdate:modelValue":function(e){return n.check=e}},(e=t=n.list.map((function(e,t){return s("div",{class:[E.item,n.check.includes(e.id)&&E.itemBorder],onClick:function(){var o;n.isEdit?(o=e.id,n.checkboxRefs[o].toggle()):function(e){K.downIndex=K.startPosition=e,K.show=!0}(t)}},[s(O,{name:e.id,checkedColor:"#64a9ff",class:[E.checkbox,!n.isEdit&&E.checkboxHide],ref:function(t){return n.checkboxRefs[e.id]=t},onClick:function(e){e.stopPropagation()}},{icon:function(e){return s(u,{class:E.iconChecked,name:e.checked?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA7JJREFUWEfNmN9vFFUUxz9nd6HYVkoDbSAoCkpExZg08qM/0jRg8MGEt7YQEmO1xVYlMWri32AiQQIJP9pQMBLd9oEnHiSQQFMosEpCJKEEIj9UgrSSlkJtoe0xd8Zte6c7u7OtTea+bLLzPed+5px77rl3hCxHfZsuF+UdhQqBVxWWITzruFEGBO4oXBXoVOGnlhq5mc0UEkRc3abRBUK1jvEpUAYEsnMQ4ZxE2NuntLfXyGim+TI6bojr26rsQViVyVna50q3CDuaa+VkOp0v0PutOm9OLt+qsB0NHJH0zIKKcvDpIJ8drpOhVOKUQHVtWhRVjgNrZhQVf+PEqPBua430eCVTgAxMDDpUZ5iiDG8iQvcIVHqhLCCTplguHbMYGS9mYmSQysnps4Aa4rpf4aNZSlNKtwIHmmulMflwHMipJuHE/7aAg76Vu9A3JavPATL7TMEYV2Zc2kEhvDqluz/CarNPOUAN7bpFx/hhuv6C2G1+HTauhPuP4EAX9D62rSTC1uZq+dEBqo9rJ1AexPF0NNtKoOrlCcuuW3Do4hRPZ1tqpUI+OKorIjFuZNEOAjOZt33vLahYYZv4AJnt9yVpiGujwr7AswQUikDdGih90TboH4KvT0GPJ2VGJdAk9XH9HtgWcJ5AsojAh+tg7TJb3vcPfHMa/hrwdXPUROgXhRKvpDgfmsrA/J66Dsd+dVt3phEV2F4KJc/ZygeDLkzPI38PApdMhEw/WeSVmTdc/8LEv2dvwpFEeqhYBBpL4c2ltjdTUTtPT62sFGi9Ut+mQyg53ocm/2XL7X/P34bWizCWIlRzItBUDm8ssW1MmRsYE6GMQxj2BVqYC19tgMJc203iDrRcsKHmRuGTcnhtsa299xB2ngGzdgINB8gnZcZBUR58UQUL82x3l/6Ag10wqpATgx0V8Eqxrbnb78I8THnq8cXr9V3USRMTKQNVlG87ufwnHE7Ax+Wwssh+9nsf7DoDA8OB4jIuSi7qjGVf+Ax8WQXF7lF+fAyPuBGaPG4/gF0d8PhJdjD/qZ2yD7QxFsxzI7Vkvv9Ev/0Nuztg8Om0YNyNMZvWMT8HPq+CpQVTJ7zR68IMjUwPxrmhmNZhzLNprvkGqhKeL5yY+Np92NMJJoUzGG5zNQ6yPX7kzXX7lKmsy3fhu5/hScYbV3pU6/gRugOaE6UwHWGTwQzVId9Ahe4aZKBCdVFMpi5UV+kkVKg+NkzeMULzOWYyVKg+WHn3V9P7ojE2zdYnvX8Bag2LhmGJrgoAAAAASUVORK5CYII=":S},null)}}),s("div",{class:E.img,style:e.fileUrl?{backgroundImage:"url(".concat(e.fileUrl,")"),backgroundSize:"cover"}:""},null)])})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!h(e)?t:{default:function(){return[t]}}))];var e}}):s(d,{btnStatus:!1,tips:"暂无照片"},null),n.isEdit&&s(U,{position:"bottom"},{default:function(){return[s("div",{class:"btnGroup"},[s(l,{block:!0,round:!0,type:"primary",onClick:z},{default:function(){return[f("删除")]}})])]}}),s(p,{show:n.showPhoto,"onUpdate:show":function(e){return n.showPhoto=e},round:!0,style:{width:"92%"}},{default:function(){return[s("div",{class:E.container},[s("div",{class:E.dialogTitle},[s("i",null,null),f("上传照片")]),s("div",{class:E.photos},[s(R,{modelValue:n.fileList,"onUpdate:modelValue":function(e){return n.fileList=e},afterRead:L,beforeRead:j,beforeDelete:N,accept:"image/*",maxCount:9},null)]),s("div",{class:["van-hairline--top van-dialog__footer"]},[s(l,{onClick:function(){n.showPhoto=!1,n.fileList=[]},class:["van-button van-button--default van-button--large van-dialog__cancel"]},{default:function(){return[f("取消")]}}),s(l,{onClick:q,class:["van-button van-button--default van-button--large van-dialog__confirm van-hairline--left"]},{default:function(){return[f("确认")]}})])])]}}),s(D,{show:K.show,"onUpdate:show":function(e){return K.show=e},startPosition:K.startPosition,images:Q.value,onChange:function(e){return K.downIndex=e}},{cover:function(){return s("div",{class:E.downBtn,onClick:function(){return T()}},[s("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAetJREFUWEftlz1OAzEQhd8EboH4KamT3AEQDQ0kIISoEiquEOcKFAgoEQI2aSjhEJuWmizHgB20PwHHu+s4u04kJKfdmXmfn2ccm2Dpx/32Pji8ASgEcYd6gzcbpclGkagG91ufYKyl9T5IeFs2alsBZCFqwPu3BBSS8FYcoKkDzkFTp4rinIPOwQoOuHOwgnlxqnPQOWjigDuoZ7nE4ngXFN7FccyXJAYvco6pgyyODkB0ldSpdUg8vc7Spnq9vkNEt4k2d0ejUeYmzP3WGIz1pBh/gWqn1Hv2JsVNALnfboHDB4BW0/MjoJ63oQI2m809Zo55iKhLjUZjDEzEMfZ9f1NNmgbMQs4CzMAlB1wuoMITRIAsA/m+nzkb460Bhr+rV5zUAebCRbsAHKqtEpVVeYwAY8/ULZIgwdvDvCu/LkduEdmg0oB6SJyB6VESCkF0MtVzBf2rtlMlQC3kpPkTxRDgsKgldJNbGbAYUiebnfyiaCuA80Gaw1UakrwV5w+BHDkfnHVAvZPzwy0E8A+Soymupf7FU1x0lCx8SHK3W7TPAb5Ov12Q8O51IAsfkjLiJjnWpthErEyMAyzjmrX/4qriJvn/f4tNVrnMmMx9cJniJlrqld8kZ5kxAUmPlPRRtEx9rVYQPZp+ANi5nail81YsAAAAAElFTkSuQmCC"},null)])}})])}}}))}}}))}();