index.a103ffd6.js 28 KB

1
  1. var J=Object.defineProperty,H=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var S=(s,t,o)=>t in s?J(s,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[t]=o,I=(s,t)=>{for(var o in t||(t={}))U.call(t,o)&&S(s,o,t[o]);if(v)for(var o of v(t))T.call(t,o)&&S(s,o,t[o]);return s},V=(s,t)=>H(s,Z(t));var B=(s,t)=>{var o={};for(var n in s)U.call(s,n)&&t.indexOf(n)<0&&(o[n]=s[n]);if(s!=null&&v)for(var n of v(s))t.indexOf(n)<0&&T.call(s,n)&&(o[n]=s[n]);return o};import{C as $}from"./index.c1c9884e.js";import{c as ee,f as se,g as y,r as A,d as N}from"./index.6fc5f983.js";import{C as te}from"./index.34a5d4ba.js";import{C as le}from"./index.721c1be5.js";import{r as oe,d,c as e,J as x,a,C as p,F as g,aK as ae,G as E,H as h,I as u,l as m,aw as L,ax as c,O as ie,P as _,f as w,K as D,L as r,ae as C,k as ne,aL as re,W as F,ab as ue,ac as ce,al as Ae,am as G,ai as de}from"./vendor.63aa8b19.js";import{i as pe,a as me}from"./icon_course_list.e767783e.js";import{a as fe}from"./icon_album_active.66672e6b.js";import{C as he}from"./index.444118ed.js";import{C as P}from"./index.ba731085.js";import{P as j}from"./index.404471e8.js";import{I as ge}from"./index.4fe30080.js";import{m as k}from"./index.6af6c3f0.js";import{C as be}from"./index.f524f8ad.js";import{v as ve}from"./toolsValidate.add49407.js";import"./lineStart.9340661e.js";import"./icon.6e6f91da.js";import"./music.f2b8674a.js";const R=()=>({groupId:0,active:0,tabIndex:1,loadingStatus:!1,rate:0,video_account_period:0,subjectList:[],templateList:["https://oss.dayaedu.com/video-course/1657853010619green.png","https://oss.dayaedu.com/video-course/1657853051064gray.png","https://oss.dayaedu.com/video-course/1657853062314yellow.png","https://oss.dayaedu.com/video-course/1657853076136linear.png"],lessonGroup:{id:null,lessonName:"",lessonSubject:null,lessonDesc:"",payType:"PAY",lessonPrice:null,lessonCoverUrl:"",relationType:"RECOMMEND",lessonCoverTemplateUrl:""},lessonList:[]}),l=oe(R()),Ie=()=>{Object.assign(l,R())},ye="_createSubmit_1cmfh_7",xe="_introduction_1cmfh_7",Ee="_userDetail_1cmfh_12",we="_banner_1cmfh_12",Ce="_userInfo_1cmfh_18",Ue="_avatar_1cmfh_24",Te="_name_1cmfh_30",Se="_userName_1cmfh_39",Ve="_buyNum_1cmfh_45",Be="_buyNumInfo_1cmfh_51",Ne="_iconBuy_1cmfh_57",Le="_info_1cmfh_60",_e="_infoVip_1cmfh_66",De="_memberIcon_1cmfh_70",Fe="_userTitle_1cmfh_73",Ge="_videoImg_1cmfh_79",Pe="_videoStop_1cmfh_84",je="_videoTitle_1cmfh_96",ke="_videoTitleText_1cmfh_104",Re="_videoTitleContent_1cmfh_109",Me="_infoVideo_1cmfh_118",qe="_albumInfo_1cmfh_143",Qe="_musicInfo_1cmfh_147";var i={"course-preview":"_course-preview_1cmfh_1",createSubmit:ye,introduction:xe,userDetail:Ee,banner:we,userInfo:Ce,avatar:Ue,name:Te,userName:Se,buyNum:Ve,buyNumInfo:Be,iconBuy:Ne,info:Le,infoVip:_e,memberIcon:De,userTitle:Fe,videoImg:Ge,videoStop:Pe,videoTitle:je,videoTitleText:ke,videoTitleContent:Re,infoVideo:Me,albumInfo:qe,musicInfo:Qe},ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA2CAMAAAC/bkrSAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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JVB1Q6IrIOdHfB1HC5rAAiTot4NkITOyWgAqEnACQ+AFWug+TxE785yOBCHX7QMDIl6mw7wKUNj4ZIobHsV7qyH0tVQEYMuOwRObB96HWpeyQ1gfxx+9gDw3qJmGb6jOYge7YENT+Y67/QwsPM4bH4+16a3CX7/QpdV+wwAEWYLHMXPXYewpT2tSlHwXgQyN7PvbrsX9lyA8Err3bWL8PEO+DuvCnPmpSii0rqM3vJcRu7b8Il+WNuQXWziBzhTk7szw76sCtbvhvQNuPqJtbi3/Nx+Q3TLi8QtAG8SgzzXsfExug4e6YKq7TDxPXzVCn9e1lGr+54GquUl+zo2QbzxPwoSoV1edgkSE8BxwkwzsIRK2I+FQZbTIC9YMj1XlLZTCS5RGlz/2wlqr+knWg1RCnVyICvPF8rypC3LWWJZji3LDxaQ5fOVZjCRWeLGpJgW986dtfxbMyMnpjgC7J8Xq36zvKHKPhvZfowoh52YexND35y2EaOIBGoRzSmkwG5O2/5lc+pFqtqIGK0Vil2I3Z5jt+fY7bniEkKf0dpJW7D2/B9uhkq/8pKvsQAAAABJRU5ErkJggg==",Ke=d({name:"course-preview",computed:{userInfo(){const s=l.lessonGroup,t=ee.user.data||{};return console.log(t),{id:t.userId,username:t.username||`\u6E38\u5BA2${t.userId||""}`,headUrl:t.heardUrl,lessonName:s.lessonName,buyNum:0,payType:s.payType,lessonDesc:s.lessonDesc,lessonPrice:s.lessonPrice,lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl,lessonNum:l.lessonList.length}},lessonList(){return l.lessonList||[]}},render(){return console.log(this.userInfo),e("div",{class:[i["course-preview"],"pb-3"]},[e("div",{class:i.userDetail},[e(x,{class:[i.banner],src:this.userInfo.lessonCoverUrl,fit:"cover"},null),e("div",{class:"bg-white"},[e("div",{class:"p-[14px] text-lg text-[#1a1a1a] font-semibold leading-none"},[this.userInfo.lessonName]),e("div",{class:[i.userInfo,"mx-[14px] py-[14px]"]},[e("div",{class:"flex",style:{alignItems:"center"}},[e(x,{class:i.avatar,src:this.userInfo.headUrl||se,fit:""},null),e("div",{class:i.name},[e("div",{class:i.userName},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.id||""}`])])]),this.userInfo.payType==="VIP"?e("div",{class:[i.info]},[e("div",null,[e("span",{class:i.memberIcon},[a("\u4F1A\u5458")]),a("/"),this.userInfo.lessonNum,a("\u8BFE\u65F6")]),e("div",{class:i.buyNum},[this.userInfo.buyNum,a("\u4EBA\u5B66\u4E60")])]):e("div",{class:i.info},[e("div",null,[a("\uFFE5"),this.userInfo.lessonPrice,a("/"),this.userInfo.lessonNum,a("\u8BFE\u65F6")]),e("div",{class:i.buyNum},[this.userInfo.buyNum,a("\u4EBA\u5B66\u4E60")])])])])]),e("div",{class:[i["section-detail"],"mt-[10px] mx-[14px] rounded-lg bg-white"]},[e("div",{class:"flex items-center py-3 px-[10px] text-[#333333] text-base"},[e(p,{size:18,class:"mr-2"},{default:()=>[e("img",{src:pe},null)]}),a("\u8BFE\u7A0B\u4ECB\u7ECD")]),e("div",{class:"mx-[10px] pt-[10px] pb-4 text-sm text-[#7A7A7A] border-t border-t-[#EBEBEB]"},[this.userInfo.lessonDesc])]),e("div",{class:[i["section-detail"],"mt-[10px] mx-[14px] rounded-lg bg-white"]},[e("div",{class:"flex items-center py-3 px-[10px] text-[#333333] text-base"},[e(p,{size:18,class:"mr-2"},{default:()=>[e("img",{src:me},null)]}),a("\u8BFE\u7A0B\u5217\u8868")]),e("div",{class:"mx-[10px] pt-[10px] pb-4 text-sm text-[#7A7A7A] border-t border-t-[#EBEBEB] flex flex-col"},[l.lessonList.map(s=>e(g,null,[e("div",{class:"flex"},[e("div",{class:i.videoImg},[e(x,{class:"align-middle h-[70px] w-[100px] rounded overflow-hidden",src:s.coverUrl,fit:"cover"},null),e(p,{class:i.videoStop,size:26},{default:()=>[e("img",{src:ze},null)]})]),e("div",{class:[i.videoTitle,"!h-[70px]"]},[e("p",{class:[i.videoTitleText,"whitespace-nowrap overflow-hidden text-ellipsis"]},[s.videoTitle]),e("p",{class:[i.videoTitleContent]},[s.videoContent])])]),s.relationList&&s.relationList.map(t=>e("div",{class:[i.infoVideo,t.relationMusicAlbum==="ALBUM"?i.albumInfo:i.musicInfo]},[e("div",null,[e("img",{src:t.relationMusicAlbum==="ALBUM"?fe:Oe},null),t.relationMusicAlbum==="ALBUM"?e("span",null,[a("\u4E13\u8F91\uFF1A"),t.musicAlbumName]):e("span",null,[a("\u66F2\u76EE\uFF1A"),t.musicAlbumName])]),e(p,null,{default:()=>[e(ae,null,null)]})]))]))])])])}});const We="_courseContent_1il47_1",Ye="_relationList_1il47_37";var M={courseContent:We,relationList:Ye},Xe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAKtQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0DQ0NDg4ODw8PERERExMTFRUVFxcXGBgYGxsbHh4eICAgISEhJCQkQUFBRERER0dHS0tLTExMTk5OVVVVXFxcYWFhjY2Nk5OTlZWVlpaWmJiYmZmZnZ2dpaWlrKyss7Ozubm5v7+/xcXFysrKzc3N19fX2NjY5eXl6Ojo6+vr7e3t7u7u7+/v8/PzuMr56AAAAAt0Uk5TAAIFUVWKpNjc8v4WawkrAAABMklEQVRIx+3Xt3LDMBBF0RWDGC6Vc7ICZeVgK9j8/y9zISsV1oBA44KvYIM5DbGYeSsiImI5eS9IlBJ4eceSW2w/SRXf/oU5N0xSJnRzIiLiJhpxRUTsUIeGtojlJ1rxLXESzTiS16V58XSpJ4EuDeTV6bTZnP59+oruIoh2WnQGMNOiMUCc0YxmNKP/gn70G6PDMz2MGv1PBdoD2sdHemwDPQVaAeie7vTUBago0A4Ag/OVngcAdBTovg7A2/eFfr0BUN+r/OFtDYDhBGAyBKC2VbucTRWA1u1DdaN6r+syTymv1UdiVXqUpVWaaVoW77K4TDeIi8JVFhZpZ3geXWQ0Tz/+8YXGOi9nDDDWenTJe6s1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RIx+2XUQ6DIAxAq6KoExHd4P43HbppnNKAVLMf3w9Jw4uVlLQAjKSs4JUJouIFS2EhK80hyuwrJnltDlLnyaTmJoJ8yraOUWubc1qaKMoUmImEQRGrFsCd8V48vogeUTm4K2ExrYvVBphY1SBqQMKYGsI5ar/6QTe/yYPzaFD3fJWQ8H9O+JO0uwRccdgVoEAKU3jU8TDWX5nXOR6gzl+Z1wMqtt7qrd7qRZeOcNW3XKs2dsuwNwcbbjyqtHu6nTt0Niw9qsK7hvKousXMVvsaxxNx25e/52glm63XSKUdPaeK7VYVMnIFwCmDHmG8JAy1hFGaMsBTng2Ex0rsE+kNjFEHody3dJ8AAAAASUVORK5CYII=";const Ze="_albumList_tm2yu_1";var $e={albumList:Ze},es=d({name:"album-list",props:{subjectIds:{type:Number},onSelect:{type:Function,default:s=>{}}},data(){return{clientType:"",idAndName:"",pageInfo:{limit:8,page:1,total:0,page_size:[8,16]},list:[],loading:!1,dataShow:!1}},mounted(){const s=y();s==="TEACHER"&&(this.clientType=s),this.getList()},methods:{onSearch(){this.pageInfo.page=1,this.list=[],this.dataShow=!1,this.loading=!1,this.getList()},async getList(){this.loading=!0;try{const{data:s}=await A.post("/api-website/open/music/album/list",{data:{idAndName:this.idAndName,albumStatus:1,subjectIds:this.subjectIds,page:this.pageInfo.page,rows:this.pageInfo.limit,clientType:this.clientType},params:{clientType:y()}});this.list=s.rows||[],this.pageInfo.total=s.total,s.total<=0&&(this.dataShow=!0)}catch{}this.dataShow?this.loading=!1:setTimeout(()=>{this.loading=!1},200)}},render(){return e("div",{class:$e.albumList},[e(E,{style:{paddingBottom:"16px"}},{default:()=>[e(h,{span:12},{default:()=>[e(u,{placeholder:"\u8BF7\u8F93\u5165\u4E13\u8F91\u540D\u79F0",clearable:!0,size:"large",modelValue:this.idAndName,"onUpdate:modelValue":s=>this.idAndName=s},null)]}),e(h,{span:11,offset:1},{default:()=>[e(m,{type:"primary",size:"large",onClick:()=>{this.onSearch()}},{default:()=>[a("\u641C\u7D22")]})]})]}),e("div",{class:"flex flex-wrap"},[e(L,{loading:this.loading,animated:!0,class:"px-[14px] flex items-center flex-row justify-between",count:4},{default:()=>[this.list.map(s=>e(g,null,[e("div",{class:"w-1/4 pb-5"},[e(ge,{class:"m-auto",item:s,onItemClick:t=>{this.onSelect(I({selectType:"ALBUM"},t))}},null)])]))],template:()=>e("div",{class:"flex items-center flex-col justify-between w-[156px]"},[e(c,{variant:"image",style:{width:"156px",height:"156px"}},null),e(c,{variant:"p",style:{width:"100%",margin:"4px 0"}},null),e("div",{class:"flex w-full justify-between"},[e(c,{variant:"p",style:{width:"35%"}},null),e(c,{variant:"p",style:{width:"35%"}},null)])])})]),e(j,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":s=>this.pageInfo.page=s,limit:this.pageInfo.limit,"onUpdate:limit":s=>this.pageInfo.limit=s,pageSizes:this.pageInfo.page_size,pagination:this.getList},null),this.dataShow&&e(P,null,null)])}}),ss=d({name:"album-list",props:{subjectIds:{type:Number},onSelect:{type:Function,default:s=>{}}},components:{musicLIstItem:k},data(){return{clientType:"",idAndName:"",pageInfo:{limit:5,page:1,total:0,page_size:[5,10]},list:[],loading:!1,dataShow:!1}},mounted(){const s=y();s==="TEACHER"&&(this.clientType=s),this.getList()},methods:{onSearch(){this.pageInfo.page=1,this.list=[],this.dataShow=!1,this.loading=!1,this.getList()},async getList(){this.loading=!0;try{const{data:s}=await A.post("/api-website/open/music/sheet/list",{data:{idAndName:this.idAndName,subjectIds:this.subjectIds,albumStatus:"PASS",page:this.pageInfo.page,rows:this.pageInfo.limit,state:1},params:{clientType:y()}});this.list=s.rows||[],this.pageInfo.total=s.total,s.total<=0&&(this.dataShow=!0)}catch{}this.dataShow?this.loading=!1:setTimeout(()=>{this.loading=!1},200)}},render(){return e(g,null,[e(E,{style:{paddingBottom:"16px"}},{default:()=>[e(h,{span:12},{default:()=>[e(u,{placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0",clearable:!0,size:"large",modelValue:this.idAndName,"onUpdate:modelValue":s=>this.idAndName=s},null)]}),e(h,{span:11,offset:1},{default:()=>[e(m,{type:"primary",size:"large",onClick:()=>{this.onSearch()}},{default:()=>[a("\u641C\u7D22")]})]})]}),e("div",{class:"mt-2"},[e(L,{loading:this.loading,animated:!0,class:" w-full m-auto px-[14px] flex items-center flex-col",count:3},{default:()=>[this.list.map(s=>e(k,{item:s,hiddenCollect:!0,isClick:!0,onClick:t=>{this.onSelect(I({selectType:"MUSIC"},t))}},null))],template:()=>e("div",{class:"h-[94px] flex items-center justify-between w-full pt-2 mb-2"},[e("div",{class:"w-2/3 flex items-center"},[e(c,{variant:"circle",style:{width:"88px",height:"88px"}},null),e("div",{class:"w-1/2 pl-2"},[e(c,{variant:"h3"},null),e(c,{variant:"p",style:{width:"50%"}},null)])]),e(c,{variant:"p",style:{width:"20%"}},null)])})]),e(j,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":s=>this.pageInfo.page=s,limit:this.pageInfo.limit,"onUpdate:limit":s=>this.pageInfo.limit=s,pageSizes:this.pageInfo.page_size,pagination:this.getList},null),this.dataShow&&e(P,{style:{marginBottom:"30px"}},null)])}}),ts=d({name:"select-music-album",props:{subjectIds:{type:Number},onSelect:{type:Function,default:s=>{}}},data(){return{tabVal:"music"}},render(){return e("div",{style:"padding: 0 16px 16px;"},[e(ie,{modelValue:this.tabVal,"onUpdate:modelValue":s=>this.tabVal=s},{default:()=>[e(_,{label:"\u66F2\u76EE",name:"music"},{default:()=>[e(ss,{subjectIds:this.subjectIds,onSelect:s=>{this.onSelect(s)}},null)]}),e(_,{label:"\u4E13\u8F91",name:"album"},{default:()=>[e(es,{subjectIds:this.subjectIds,onSelect:s=>{this.onSelect(s)}},null)]})]})])}}),ls=d({name:"course-content",data(){return{show:!1,form:{lessonList:[{key:1,videoTitle:"",videoContent:"",videoUrl:"",relationList:[],coverUrl:""}]},musicStatus:!1,selectItem:{}}},methods:{handleUpload(s){console.log(s),(s||[]).forEach(o=>{l.lessonList.push({videoTitle:"",videoContent:"",videoUrl:o,relationList:[],coverUrl:""})})},handleSubmit(){this.$refs.form.validate(async s=>{if(s){if(l.lessonList.length<=0){w.error("\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u89C6\u9891");return}console.log("\u63D0\u4EA4\u6570\u636E"),this.show=!0}else return this.$nextTick(()=>{document.getElementsByClassName("is-error")[0].scrollIntoView({block:"center",behavior:"smooth"})}),!1})},async createSubmit(){try{const s=l.lessonGroup,t={lessonList:l.lessonList,lessonGroup:V(I({},s),{lessonPrice:s.payType==="VIP"?0:s.lessonPrice,lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl})};l.groupId?(await A.post("/api-website/videoLessonGroup/update",{data:t}),w.success("\u4FEE\u6539\u6210\u529F")):(await A.post("/api-website/videoLessonGroup/add",{data:t}),w.success("\u521B\u5EFA\u6210\u529F")),sessionStorage.setItem("videoActiveName","DOING"),this.$router.back()}catch{}},swapItems(s,t,o){return s[t]=s.splice(o,1,s[t])[0],s},getName(s){const t=s.relationList.length>0?s.relationList[0]:null;return t?(t.relationMusicAlbum==="ALBUM"?"\u4E13\u8F91\uFF1A":"\u66F2\u76EE\uFF1A")+t.musicAlbumName:""}},render(){return e("div",{class:M.courseContent},[e(D,{class:"px-6 pb-10 pt-7 min-h-[280px]",size:"large",labelWidth:"140px",labelPosition:"left",ref:"form",model:l},{default:()=>[e(r,{label:"\u8BFE\u7A0B\u89C6\u9891",required:!0},{default:()=>[e("div",null,[e(le,{multiple:!0,limit:3,bucket:"video-course",multipleModel:s=>{this.handleUpload(s)}},null)])]}),l.lessonList.map((s,t)=>e("div",{class:"p-4 mb-10 border-b border-solid border-[#E7E6E6] relative",key:s.key},[e("div",{class:"absolute right-4 top-4 z-10 flex"},[t!==0&&e(C,{class:"box-item",effect:"dark",content:"\u4E0A\u79FB",placement:"top"},{default:()=>[e("div",{onClick:()=>{this.swapItems(l.lessonList,t,t-1)}},[e(p,{size:29},{default:()=>[e("img",{src:Je},null)]})])]}),l.lessonList.length-1!==t&&e(C,{class:"box-item",effect:"dark",content:"\u4E0B\u79FB",placement:"top"},{default:()=>[e("div",{onClick:()=>{this.swapItems(l.lessonList,t,t+1)}},[e(p,{size:29,class:"ml-3"},{default:()=>[e("img",{src:Xe,title:"\u5411\u4E0B\u79FB\u52A8"},null)]})])]}),l.lessonList.length>1&&e(C,{class:"box-item",effect:"dark",content:"\u5220\u9664",placement:"top"},{default:()=>[e("div",{onClick:()=>{ne.confirm("\u786E\u5B9A\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F","\u63D0\u793A",{type:"warning"}).then(()=>{l.lessonList.splice(t,1)})}},[e(p,{size:29,class:"ml-3"},{default:()=>[e("img",{src:He},null)]})])]})]),e("h2",{class:"text-xl font-semibold pb-5"},[`\u7B2C ${t+1} \u8BFE`]),e(r,{label:"\u8BFE\u7A0B\u6807\u9898",prop:`lessonList.${t}.videoTitle`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u6807\u9898"}]},{default:()=>[e(u,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u6807\u9898",maxlength:50,modelValue:s.videoTitle,"onUpdate:modelValue":o=>s.videoTitle=o},null)]}),e(r,{label:"\u8BFE\u7A0B\u4ECB\u7ECD",prop:`lessonList.${t}.videoContent`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD"}]},{default:()=>[e(u,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD",modelValue:s.videoContent,"onUpdate:modelValue":o=>s.videoContent=o,type:"textarea",maxlength:200,rows:4,showWordLimit:!0},null)]}),e(E,null,{default:()=>[e(h,{span:12},{default:()=>[e(r,{label:"\u8BFE\u7A0B\u89C6\u9891",required:!0},{default:()=>[e(he,{styleValue:{with:"150px",height:"85px"},controls:!1,preview:!0,src:s.videoUrl,volume:!1},null),e("p",null,null)]})]}),e(h,{span:11},{default:()=>[e(r,{label:"\u89C6\u9891\u5C01\u9762",prop:`lessonList.${t}.coverUrl`,rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u89C6\u9891\u5C01\u9762"}]},{default:()=>[e(te,{modelValue:s.coverUrl,"onUpdate:modelValue":o=>s.coverUrl=o,bucket:"video-course"},null)]})]})]}),e(r,{label:"\u5173\u8054\u66F2\u76EE\u6216\u4E13\u8F91",prop:`lessonList.${t}.relationList`,onClick:()=>{this.selectItem=s,this.musicStatus=!0}},{default:()=>[e("div",{class:M.relationList},null),e(u,{placeholder:"\u8BF7\u9009\u62E9\u5173\u8054\u66F2\u76EE\u6216\u4E13\u8F91",modelValue:s.relationList.length>0?this.getName(s):"",readonly:!0,suffixIcon:re},null)]})]))]}),e("div",{class:"text-center pt-6 pb-7"},[e(m,{round:!0,class:"!w-44 !h-[48px] !text-base",onClick:()=>{l.active=0;const s=document.documentElement.scrollTop||document.body.scrollTop;N(s,0)}},{default:()=>[a("\u4E0A\u4E00\u6B65")]}),e(m,{round:!0,type:"primary",class:"!w-44 !h-[48px] !text-base",onClick:this.handleSubmit},{default:()=>[a("\u4E0B\u4E00\u6B65")]})]),e(F,{modelValue:this.show,"onUpdate:modelValue":s=>this.show=s,width:375,title:"\u9884\u89C8"},{default:()=>[e(Ke,null,null)],footer:()=>e("span",{class:"dialog-footer !text-center block "},[e(m,{size:"large",round:!0,onClick:()=>{this.show=!1}},{default:()=>[a("\u8FD4\u56DE\u7F16\u8F91")]}),e(m,{size:"large",round:!0,type:"primary",onClick:this.createSubmit},{default:()=>[l.groupId?"\u786E\u8BA4\u4FEE\u6539":"\u521B\u5EFA\u5B8C\u6210"]})])}),e(F,{modelValue:this.musicStatus,"onUpdate:modelValue":s=>this.musicStatus=s,title:"\u9009\u62E9\u66F2\u76EE\u6216\u4E13\u8F91",width:750},{default:()=>[e(ts,{subjectIds:l.lessonGroup.lessonSubject,onSelect:s=>{this.musicStatus=!1,this.selectItem.relationList=[{musicAlbumId:s.id,musicAlbumName:s.selectType==="ALBUM"?s.albumName:s.musicSheetName,relationMusicAlbum:s.selectType,useRelationType:"RECOMMEND"}]}},null)]})])}});const os="_tabs_10c1i_1",as="_imgCover_10c1i_4",is="_courseInfo_10c1i_7";var ns={tabs:os,imgCover:as,courseInfo:is};function rs(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!de(s)}var us=d({name:"course-info",data(){return{url:""}},computed:{choiceSubjectIds(){const s=l.lessonGroup.lessonSubject?Number(l.lessonGroup.lessonSubject):null;return s?[s]:[]},subjectList(){return l.subjectList||[]},lessonSubjectName(){let s="";return this.subjectList.forEach(t=>{this.choiceSubjectIds.includes(t.id)&&(s=t.name)}),s},calcRatePrice(){const s=l.rate||0,t=l.lessonGroup.lessonPrice||0;return(t-s/100*t).toFixed(2)}},async mounted(){try{if(l.subjectList.length<=0){const o=await A.post("/api-website/teacher/querySubject");l.subjectList=o.data||[]}const s=l.rate||0,t=l.lessonGroup.lessonPrice||0}catch{}},methods:{onFormatter(s){s.target.value=ve(s.target.value),l.rate,s.target.value},tabChange(s){this.$refs.form.clearValidate("lessonCoverTemplateUrl"),this.$refs.form.clearValidate("lessonCoverUrl"),l.tabIndex=s},selectImg(s){l.lessonGroup.lessonCoverUrl="",l.lessonGroup.lessonCoverTemplateUrl=s}},render(){let s;return e("div",{class:ns.courseInfo},[e(D,{class:"px-6 pb-10 pt-7",size:"large",ref:"form",labelWidth:"120px",labelPosition:"left",model:l.lessonGroup},{default:()=>[e(r,{label:"\u8BFE\u7A0B\u540D\u79F0",prop:"lessonName",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"}]},{default:()=>[e(u,{modelValue:l.lessonGroup.lessonName,"onUpdate:modelValue":t=>l.lessonGroup.lessonName=t,maxlength:20,placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"},null)]}),e(r,{label:"\u8BFE\u7A0B\u58F0\u90E8",prop:"lessonSubject",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8"}]},{default:()=>[e(ue,{class:"w-full",modelValue:l.lessonGroup.lessonSubject,"onUpdate:modelValue":t=>l.lessonGroup.lessonSubject=t,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8",onChange:()=>{l.lessonList.forEach(t=>{t.relationList=[]})}},rs(s=l.subjectList.map(t=>e(ce,{key:t.id,value:t.id,label:t.name},null)))?s:{default:()=>[s]})]}),e(r,{label:"\u8BFE\u7A0B\u4ECB\u7ECD",prop:"lessonDesc",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD"}]},{default:()=>[e(u,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD",modelValue:l.lessonGroup.lessonDesc,"onUpdate:modelValue":t=>l.lessonGroup.lessonDesc=t,type:"textarea",maxlength:200,rows:4,showWordLimit:!0},null)]}),e(r,{label:"\u6536\u8D39\u65B9\u5F0F",prop:"payType",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"}]},{default:()=>[e(Ae,{modelValue:l.lessonGroup.payType,"onUpdate:modelValue":t=>l.lessonGroup.payType=t},{default:()=>[e(G,{label:"PAY",class:"mr-3 w-24"},{default:()=>[a("\u8D2D\u4E70")]}),e(G,{label:"VIP",class:"w-24"},{default:()=>[a("\u4F1A\u5458")]})]})]}),l.lessonGroup.payType==="PAY"&&e(g,null,[e(r,{label:"\u8BFE\u7A0B\u7EC4\u552E\u4EF7",prop:"lessonPrice",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u7EC4\u552E\u4EF7"}]},{default:()=>[e(u,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u7EC4\u552E\u4EF7",modelValue:l.lessonGroup.lessonPrice,"onUpdate:modelValue":t=>l.lessonGroup.lessonPrice=t,onKeyup:this.onFormatter,maxlength:9},{suffix:()=>e("span",{class:"text-base text-[#999]"},[a("\u5143")])})]}),e("div",{class:"text-sm text-[#999] pl-[120px] leading-relaxed pb-2"},[e("p",null,[a("\u6263\u9664\u624B\u7EED\u8D39\u540E\u60A8\u7684\u8BFE\u7A0B\u9884\u8BA1\u6536\u5165\u4E3A\uFF1A ")]),e("p",null,[a("\u8BFE\u7A0B\u7EC4\u603B\u6536\u5165"),e("span",{class:"px-1 text-[#FF4E19]"},[this.calcRatePrice]),a("\u5143/\u4EBA")]),e("p",null,[a("\u60A8\u7684\u8BFE\u7A0B\u6536\u5165\u5C06\u5728\u5B66\u5458\u8D2D\u4E70"),l.video_account_period,a("\u5929\u540E\u7ED3\u7B97\u5230\u60A8\u7684\u8D26\u6237\u4E2D")])])]),e(r,{label:"\u8BFE\u7A0B\u5C01\u9762",class:"!mb-0",prop:"lessonCoverUrl",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u5C01\u9762",trigger:"change"}]},{default:()=>[e(be,{modelValue:l.lessonGroup.lessonCoverUrl,bucket:"video-course",cropUploadSuccess:t=>{l.lessonGroup.lessonCoverUrl=t,l.lessonGroup.lessonCoverTemplateUrl=""},options:{title:"\u8BFE\u7A0B\u5C01\u9762",fixedNumber:[3.34,2],autoCropWidth:375,autoCropHeight:212}},null)]})]}),e("div",{class:" text-center pt-6 pb-7"},[e(m,{type:"primary",round:!0,class:"!w-44 !h-[48px] !text-base",onClick:()=>{this.$refs.form.validate(async t=>{if(t){l.active=1;const o=document.documentElement.scrollTop||document.body.scrollTop;N(o,0)}else return this.$nextTick(()=>{document.getElementsByClassName("is-error")[0].scrollIntoView({block:"center",behavior:"smooth"})}),!1})}},{default:()=>[a("\u4E0B\u4E00\u6B65")]})])])}}),Ns=d({name:"video-operation",data(){return{type:this.$route.query.type||"create"}},async created(){Ie();const s=this.$route.query;if(l.groupId=Number(s.groupId)||0,!l.groupId)return!1;try{l.loadingStatus=!0;const n=(await A.get("/api-website/videoLessonGroup/selectVideoLesson",{params:{groupId:l.groupId}})).data,t=n.lessonGroup,{auditStatus:cs,lessonCoverUrl:q,lessonPrice:Q,lessonDesc:z,payType:O,lessonSubject:K,lessonName:W,id:Y}=t,As=B(t,["auditStatus","lessonCoverUrl","lessonPrice","lessonDesc","payType","lessonSubject","lessonName","id"]);l.lessonGroup={id:Y,lessonName:W,lessonSubject:Number(K),lessonDesc:z,payType:O,lessonPrice:Q,relationType:"RECOMMEND",lessonCoverUrl:q},l.lessonList=[],n.detailList&&n.detailList.forEach(f=>{const X=(f.musicAlbumInfos||[]).map(b=>({relationMusicAlbum:b.relationType,musicAlbumName:b.name,musicAlbumId:b.musicAlbumId,relationId:b.id,useRelationType:"RECOMMEND"}));l.lessonList.push({videoTitle:f.videoTitle,videoContent:f.videoContent,videoUrl:f.videoUrl,coverUrl:f.coverUrl,relationList:X,posterUrl:f.posterUrl})}),l.loadingStatus=!1}catch{}l.lessonGroup.lessonCoverUrl&&!l.templateList.includes(l.lessonGroup.lessonCoverUrl)?l.tabIndex=2:l.tabIndex=1},async mounted(){document.title=this.type==="create"?"\u65B0\u5EFA\u89C6\u9891\u8BFE":"\u7F16\u8F91\u89C6\u9891\u8BFE";try{A.get("/api-website/sysConfig/queryByParamNameList",{params:{paramNames:"video_lesson_service_fee,video_account_period"}}).then(s=>{(s.data||[]).forEach(o=>{o.paramName==="video_lesson_service_fee"?l.rate=o.paramValue:o.paramName==="video_account_period"&&(l.video_account_period=o.paramValue)})})}catch{}},render(){return e(g,null,[e("div",{class:"text-2xl font-semibold text-black leading-none px-6 py-5 "},[this.type==="create"?"\u65B0\u5EFA\u89C6\u9891\u8BFE":"\u7F16\u8F91\u89C6\u9891\u8BFE"]),e("div",{class:"pt-12"},[e($,{class:"pl-[60px] pr-7",type:"large",active:l.active},null),l.active===0&&e(us,null,null),l.active===1&&e(ls,null,null)])])}});export{Ns as default};