1 |
- var X=Object.defineProperty,J=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var S=(s,t,o)=>t in s?X(s,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[t]=o,v=(s,t)=>{for(var o in t||(t={}))U.call(t,o)&&S(s,o,t[o]);if(b)for(var o of b(t))T.call(t,o)&&S(s,o,t[o]);return s},V=(s,t)=>J(s,Y(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&&b)for(var n of b(s))t.indexOf(n)<0&&T.call(s,n)&&(o[n]=s[n]);return o};import{C as H}from"./index.e352b1ba.js";import{c as Z,f as $,g as I,r as c,d as N}from"./index.ebd578f0.js";import{C as ee}from"./index.ea964dc5.js";import{C as se}from"./index.b7fa29fb.js";import{r as te,d,c as e,x as E,a,l as p,F as x,aA as le,q as y,v as h,w as u,k as m,al as L,am as A,C as oe,D,E as w,y as j,z as r,a4 as C,j as ae,aB as ie,K as F,a1 as ne,a2 as re,a9 as ue}from"./vendor.f5bf56e4.js";import{i as Ae,a as ce}from"./icon_course_list.e767783e.js";import{a as de}from"./icon_album_active.66672e6b.js";import{C as pe}from"./index.18f3d15d.js";import{C as _}from"./index.3ca9292b.js";import{P as k}from"./index.2830ae7c.js";import{I as me}from"./index.710c4036.js";import{m as G}from"./index.e81c7af0.js";import{C as fe}from"./index.70f820ec.js";import{v as he}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://ks3-cn-beijing.ksyuncs.com/video-course/1657853010619green.png","https://ks3-cn-beijing.ksyuncs.com/video-course/1657853051064gray.png","https://ks3-cn-beijing.ksyuncs.com/video-course/1657853062314yellow.png","https://ks3-cn-beijing.ksyuncs.com/video-course/1657853076136linear.png"],lessonGroup:{id:null,lessonName:"",lessonSubject:null,lessonDesc:"",lessonPrice:null,lessonCoverUrl:"",relationType:"RECOMMEND",lessonCoverTemplateUrl:""},lessonList:[]}),l=te(R()),ge=()=>{Object.assign(l,R())},be="_createSubmit_1m2f7_7",ve="_introduction_1m2f7_7",Ie="_userDetail_1m2f7_12",xe="_banner_1m2f7_12",Ee="_userInfo_1m2f7_18",ye="_avatar_1m2f7_24",we="_name_1m2f7_30",Ce="_userName_1m2f7_39",Ue="_buyNum_1m2f7_45",Te="_buyNumInfo_1m2f7_59",Se="_iconBuy_1m2f7_65",Ve="_info_1m2f7_68",Be="_userTitle_1m2f7_74",Ne="_videoImg_1m2f7_80",Le="_videoStop_1m2f7_85",De="_videoTitle_1m2f7_97",je="_videoTitleText_1m2f7_105",Fe="_videoTitleContent_1m2f7_110",_e="_infoVideo_1m2f7_119",ke="_albumInfo_1m2f7_144",Ge="_musicInfo_1m2f7_148";var i={"course-preview":"_course-preview_1m2f7_1",createSubmit:be,introduction:ve,userDetail:Ie,banner:xe,userInfo:Ee,avatar:ye,name:we,userName:Ce,buyNum:Ue,buyNumInfo:Te,iconBuy:Se,info:Ve,userTitle:Be,videoImg:Ne,videoStop:Le,videoTitle:De,videoTitleText:je,videoTitleContent:Fe,infoVideo:_e,albumInfo:ke,musicInfo:Ge},Re="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA2CAMAAAC/bkrSAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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yOBCHX7QMDIl6mw7wKUNj4ZIobHsV7qyH0tVQEYMuOwRObB96HWpeyQ1gfxx+9gDw3qJmGb6jOYge7YENT+Y67/QwsPM4bH4+16a3CX7/QpdV+wwAEWYLHMXPXYewpT2tSlHwXgQyN7PvbrsX9lyA8Err3bWL8PEO+DuvCnPmpSii0rqM3vJcRu7b8Il+WNuQXWziBzhTk7szw76sCtbvhvQNuPqJtbi3/Nx+Q3TLi8QtAG8SgzzXsfExug4e6YKq7TDxPXzVCn9e1lGr+54GquUl+zo2QbzxPwoSoV1edgkSE8BxwkwzsIRK2I+FQZbTIC9YMj1XlLZTCS5RGlz/2wlqr+knWg1RCnVyICvPF8rypC3LWWJZji3LDxaQ5fOVZjCRWeLGpJgW986dtfxbMyMnpjgC7J8Xq36zvKHKPhvZfowoh52YexND35y2EaOIBGoRzSmkwG5O2/5lc+pFqtqIGK0Vil2I3Z5jt+fY7bniEkKf0dpJW7D2/B9uhkq/8pKvsQAAAABJRU5ErkJggg==",Me=d({name:"course-preview",computed:{userInfo(){const s=l.lessonGroup,t=Z.user.data||{};return console.log(t),{id:t.userId,username:t.username||`\u6E38\u5BA2${t.userId||""}`,headUrl:t.heardUrl,lessonName:s.lessonName,buyNum:0,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(E,{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"},[e(E,{class:i.avatar,src:this.userInfo.headUrl||$,fit:""},null),e("div",{class:i.name},[e("div",{class:i.userName},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.id||""}`]),e("div",{class:i.buyNum},[this.userInfo.buyNum,a("\u4EBA\u5DF2\u8D2D\u4E70")])])]),e("div",{class:i.info},[a("\uFFE5"),this.userInfo.lessonPrice,a("/"),this.userInfo.lessonNum,a("\u8BFE\u65F6")])])])]),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:Ae},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:ce},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(x,null,[e("div",{class:"flex"},[e("div",{class:i.videoImg},[e(E,{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:Re},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"?de:Pe},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(le,null,null)]})]))]))])])])}});const qe="_courseContent_5onho_1",ze="_relationList_5onho_29";var P={courseContent:qe,relationList:ze},Qe="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/+8YXGOi9nDDDWenTJe6s1e1FDDMqPQeUyKHoG9dKg1BpUaZMCb7I2GCwruivSD/jVkGLI5Sc4AAAAAElFTkSuQmCC",Oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAKtQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0DQ0NDg4ODw8PERERExMTFRUVFxcXGBgYGxsbHh4e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eOcNW3XKs2dsuwNwcbbjyqtHu6nTt0Niw9qsK7hvKousXMVvsaxxNx25e/52glm63XSKUdPaeK7VYVMnIFwCmDHmG8JAy1hFGaMsBTng2Ex0rsE+kNjFEHody3dJ8AAAAASUVORK5CYII=";const We="_albumList_tm2yu_1";var Xe={albumList:We},Je=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=I();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 c.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:I()}});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:Xe.albumList},[e(y,{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(x,null,[e("div",{class:"w-1/4 pb-5"},[e(me,{class:"m-auto",item:s,onItemClick:t=>{this.onSelect(v({selectType:"ALBUM"},t))}},null)])]))],template:()=>e("div",{class:"flex items-center flex-col justify-between w-[156px]"},[e(A,{variant:"image",style:{width:"156px",height:"156px"}},null),e(A,{variant:"p",style:{width:"100%",margin:"4px 0"}},null),e("div",{class:"flex w-full justify-between"},[e(A,{variant:"p",style:{width:"35%"}},null),e(A,{variant:"p",style:{width:"35%"}},null)])])})]),e(k,{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(_,null,null)])}}),Ye=d({name:"album-list",props:{subjectIds:{type:Number},onSelect:{type:Function,default:s=>{}}},components:{musicLIstItem:G},data(){return{clientType:"",idAndName:"",pageInfo:{limit:5,page:1,total:0,page_size:[5,10]},list:[],loading:!1,dataShow:!1}},mounted(){const s=I();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 c.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:I()}});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(x,null,[e(y,{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(G,{item:s,hiddenCollect:!0,isClick:!0,onClick:t=>{this.onSelect(v({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(A,{variant:"circle",style:{width:"88px",height:"88px"}},null),e("div",{class:"w-1/2 pl-2"},[e(A,{variant:"h3"},null),e(A,{variant:"p",style:{width:"50%"}},null)])]),e(A,{variant:"p",style:{width:"20%"}},null)])})]),e(k,{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(_,{style:{marginBottom:"30px"}},null)])}}),He=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(oe,{modelValue:this.tabVal,"onUpdate:modelValue":s=>this.tabVal=s},{default:()=>[e(D,{label:"\u66F2\u76EE",name:"music"},{default:()=>[e(Ye,{subjectIds:this.subjectIds,onSelect:s=>{this.onSelect(s)}},null)]}),e(D,{label:"\u4E13\u8F91",name:"album"},{default:()=>[e(Je,{subjectIds:this.subjectIds,onSelect:s=>{this.onSelect(s)}},null)]})]})])}}),Ze=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(v({},s),{lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl})};l.groupId?(await c.post("/api-website/videoLessonGroup/update",{data:t}),w.success("\u4FEE\u6539\u6210\u529F")):(await c.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:P.courseContent},[e(j,{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(se,{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:Oe},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:Qe,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:()=>{ae.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:Ke},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(y,null,{default:()=>[e(h,{span:12},{default:()=>[e(r,{label:"\u8BFE\u7A0B\u89C6\u9891",required:!0},{default:()=>[e(pe,{styleValue:{with:"150px",height:"85px"},controls:!1,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(ee,{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:P.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:ie},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(Me,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(He,{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 $e="_tabs_1g4lj_1",es="_imgCover_1g4lj_4",ss="_courseInfo_1g4lj_7";var ts={tabs:$e,imgCover:es,courseInfo:ss};function ls(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!ue(s)}var os=d({name:"course-info",data(){return{url:""}},computed:{choiceSubjectIds(){let 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(){let 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 c.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=he(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:ts.courseInfo},[e(j,{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(ne,{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=[]})}},ls(s=l.subjectList.map(t=>e(re,{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:"\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(fe,{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")]})])])}}),Us=d({name:"video-operation",data(){return{type:this.$route.query.type||"create"}},async created(){ge();const s=this.$route.query;if(l.groupId=Number(s.groupId)||0,!l.groupId)return!1;try{l.loadingStatus=!0;const n=(await c.get("/api-website/videoLessonGroup/selectVideoLesson",{params:{groupId:l.groupId}})).data,t=n.lessonGroup,{auditStatus:as,lessonCoverUrl:M,lessonPrice:q,lessonDesc:z,lessonSubject:Q,lessonName:O,id:K}=t,is=B(t,["auditStatus","lessonCoverUrl","lessonPrice","lessonDesc","lessonSubject","lessonName","id"]);l.lessonGroup={id:K,lessonName:O,lessonSubject:Number(Q),lessonDesc:z,lessonPrice:q,relationType:"RECOMMEND",lessonCoverUrl:M},l.lessonList=[],n.detailList&&n.detailList.forEach(f=>{const W=(f.musicAlbumInfos||[]).map(g=>({relationMusicAlbum:g.relationType,musicAlbumName:g.name,musicAlbumId:g.musicAlbumId,relationId:g.id,useRelationType:"RECOMMEND"}));l.lessonList.push({videoTitle:f.videoTitle,videoContent:f.videoContent,videoUrl:f.videoUrl,coverUrl:f.coverUrl,relationList:W,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{c.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(x,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(H,{class:"pl-[60px] pr-7",type:"large",active:l.active},null),l.active===0&&e(os,null,null),l.active===1&&e(Ze,null,null)])])}});export{Us as default};
|