index.4ff86443.js 18 KB

1
  1. var P=Object.defineProperty,L=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var E=(s,o,l)=>o in s?P(s,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[o]=l,U=(s,o)=>{for(var l in o||(o={}))h.call(o,l)&&E(s,l,o[l]);if(m)for(var l of m(o))x.call(o,l)&&E(s,l,o[l]);return s},C=(s,o)=>L(s,j(o));var I=(s,o)=>{var l={};for(var n in s)h.call(s,n)&&o.indexOf(n)<0&&(l[n]=s[n]);if(s!=null&&m)for(var n of m(s))o.indexOf(n)<0&&x.call(s,n)&&(l[n]=s[n]);return l};import{C as z}from"./index.00497140.js";import{q as G,d as _,r as c,u as y}from"./index.1f84bfe1.js";import{C as R}from"./index.e5e9a5d4.js";import{C as q}from"./index.aed3a62b.js";import{r as Q,d as v,c as e,x as b,a as r,l as u,E as f,y as T,z as A,a3 as g,j as O,w as d,q as K,v as V,k as p,K as W,a1 as J,a2 as X,a8 as Y,F as M}from"./vendor.9f3c6e4d.js";import{i as Z,a as H}from"./icon_course_list.e767783e.js";import{C as $}from"./index.4b2e64e7.js";import{C as ee}from"./index.f892c01e.js";import{v as se}from"./toolsValidate.add49407.js";const B=()=>({groupId:0,active:0,tabIndex:1,loadingStatus:!1,rate: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:"",lessonCoverTemplateUrl:""},lessonList:[]}),t=Q(B()),oe=()=>{Object.assign(t,B())},te="_createSubmit_10oze_7",le="_introduction_10oze_7",re="_userDetail_10oze_12",ae="_banner_10oze_12",ne="_userInfo_10oze_18",Ae="_avatar_10oze_24",ue="_name_10oze_30",ie="_buyNum_10oze_39",ce="_buyNumInfo_10oze_53",de="_iconBuy_10oze_59",pe="_info_10oze_62",me="_userTitle_10oze_68",ve="_videoImg_10oze_74",be="_videoStop_10oze_79",fe="_videoTitle_10oze_91",ge="_videoTitleText_10oze_99",he="_videoTitleContent_10oze_104";var a={"course-preview":"_course-preview_10oze_1",createSubmit:te,introduction:le,userDetail:re,banner:ae,userInfo:ne,avatar:Ae,name:ue,buyNum:ie,buyNumInfo:ce,iconBuy:de,info:pe,userTitle:me,videoImg:ve,videoStop:be,videoTitle:fe,videoTitleText:ge,videoTitleContent:he},xe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA2CAMAAAC/bkrSAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUFDg4OEBAQGRkZHR0dHx8fJSUlKSkpLCwsOzs7Pj4+QEBAVFRUVVVVXl5ea2trbW1teXl5e3t7fX19f39/gYGBkJCQk5OTpKSkp6enp6ensLCwsLCwtra2tra2w8PDxsbGxsbGzs7Oz8/P0NDQ0tLS0tLS09PT29vb29vb4uLi5eXl5ubm5ubm7Ozs7e3t7e3t8PDw8PDw8PDw8fHx8/Pz9vb29/f3+vr6+vr6/f39/f39/v7+/////v7+////////J7wfagAAAIJ0Uk5TAAECAwQFBwgJDQ8VFxkaGyAhIiQqKy4vMDIzNDU3ODk7PT4/QUJDREdJTU5RUlNUVVZXWFpbXV5fYGFkZWZnaGlqa21ucHJydHV1ent8g4SHjI2Sk5OVlp6eqaqrsbK1tr/AwcfIysrNzdPU297e3+bm5+nq6+zu8vL3+Pv8/f3+/h4twksAAAIJSURBVBgZrcEHV9pQAAbQT4SIgKIiigMX7lUVZ7CQzy67996tHa97T631/fI6EPNeEojn9F64qYknu/uGhvq6k/Ea+BLrmbZYYk33xFBBsHWWDrOtQXgLpEy6MlMBeKjP0lO2Hm6qOi2WYXVWwSE0ygpGQ9CEp1jRVBgKY4Y+zBiwqR6nL+PVOJChTxmUJOhbAkWGSd9MA3syVKw+WLt3gl4y2BWxaLf6WUr57Ro9WBHs6Kfivtyx9ewM3fVjWzhPxQu55+dtusqHAbRQJeS+1+fppgXAJFVClvy+u0KnScCwqBLS5t1FOlgGmqgR0m790XHqmtBFjZCqT1eo6cIINUJq/j49RcUIstQI6fDlLO2yWKJGSKfntFvCUWqEdPpKu2UUqBHS6Q3tCshRI6TDnxu0y2GBGiF1369TsYAj1Aip2nxykqpJDFIjpOLjZeoG0UaNkDbrD4/RoQ111Ah54O0FuqhDYJkqIff9urNCF8sBYJiql7Lo1Tm6GgbQQNVjuevHLXpoABBYpOLShpRya+00PSwGsC1F1c0PG++v0lMKO0ImD8EMYVczD6EZRRP0bQL7Ijn6lIugJEGfErDpoC8dUPTSh15o0qwoDYdknmXlk3ARnWMZc1G4Cqbz9JBPB+ElMlCgi8JABOXUpuepmU/XoqJY+5jJInOsPQa/jGi8sTEeNfD//AORQWsF93/GiwAAAABJRU5ErkJggg==",Ee=v({name:"course-preview",computed:{userInfo(){const s=t.lessonGroup,o=G.user.data||{};return{id:o.id,username:o.username||`\u6E38\u5BA2${o.id||""}`,headUrl:o.headUrl,lessonName:s.lessonName,buyNum:0,lessonDesc:s.lessonDesc,lessonPrice:s.lessonPrice,lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl,lessonNum:t.lessonList.length}},lessonList(){return t.lessonList||[]}},render(){return e("div",{class:[a["course-preview"],"pb-3"]},[e("div",{class:a.userDetail},[e(b,{class:[a.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"},[r("\u6807\u9898")]),e("div",{class:[a.userInfo,"mx-[14px] py-[14px]"]},[e("div",{class:"flex"},[e(b,{class:a.avatar,src:this.userInfo.headUrl||_,fit:""},null),e("div",{class:a.name},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.id||""}`,e("div",{class:a.buyNum},[this.userInfo.buyNum,r("\u4EBA\u5DF2\u8D2D\u4E70")])])]),e("div",{class:a.info},[r("\uFFE5"),this.userInfo.lessonPrice,r("/"),this.userInfo.lessonNum,r("\u8BFE\u65F6")])])])]),e("div",{class:[a["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(u,{size:18,class:"mr-2"},{default:()=>[e("img",{src:Z},null)]}),r("\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:[a["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(u,{size:18,class:"mr-2"},{default:()=>[e("img",{src:H},null)]}),r("\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"},[t.lessonList.map(s=>e("div",{class:"flex mb-3"},[e("div",{class:a.videoImg},[e(b,{class:"align-middle h-[70px] w-[100px] rounded overflow-hidden",src:s.coverUrl,fit:"cover"},null),e(u,{class:a.videoStop,size:26},{default:()=>[e("img",{src:xe},null)]})]),e("div",{class:[a.videoTitle,"!h-[70px]"]},[e("p",{class:[a.videoTitleText,"whitespace-nowrap overflow-hidden text-ellipsis"]},[s.videoTitle]),e("p",{class:[a.videoTitleContent]},[s.videoContent])])]))])])])}});const Ue="_courseContent_znys0_1";var Ce={courseContent:Ue},Ie="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",ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAKtQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0DQ0NDg4ODw8PERERExMTFRUVFxcXGBgYGxsbHh4eICAgISEhJCQkQkJCRERER0dHSEhIS0tLTExMTk5OVVVVXFxcYWFhjY2Nk5OTlZWVlpaWmJiYmZmZnZ2dpKSkq6urs7Ozubm5v7+/xcXFysrKzc3N19fX2NjY5eXl6Ojo6+vr7e3t7+/v8/PzQBqgLwAAAAt0Uk5TAAIFUVWKpNjc8v4WawkrAAABMElEQVRIx+3XuXLCMBhF4R9sjO1j9j1hx+xrwqb3f7IUEEKKMLJUpPEp3Gi+Tp65EhERybpePlBaBXnPzcojx1eJ8p07zORClbAwlxERkZwyKCci4oQmNHREsr4yys+KqwxzxTOlnuRNaV4CUxrIq9NZqzX7+/QVHQOMTWgMAHFyuohuNFokpcsC9wrLZHRV5FFxlYSuSzxVWuvTTZlflTe6dFsFoPX4UN3q0V0NgOEEYDIEoLbToYc6AINrDBBfBwDUDxq0A0D/crsTsbr0Aeho0ArA+1l9U3V+A6ho0C7QPqkfqk5toKtBP3qN0VE9U3UcNXqfSf6c+OXtT2lKU5rS/6FzgLkR3UcQ7Y2omjab0xczxGL8WEwui6FnMS8tRq3FlLYZ8DbPBovHiukT6QvDn5DJjUbpuAAAAABJRU5ErkJggg==",Te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAEhQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0AAAACwsLGhoaLS0tNDQ0RUVFi4uLra2t19fX2NjY2dnZ7Ozs8/PzedusZQAAAAt0Uk5TAAIFUVWKpNjc8v4WawkrAAABBElEQVRIx+2XUQ6DIAxAq6KoExHd4P43HbppnNKAVLMf3w9Jw4uVlLQAjKSs4JUJouIFS2EhK80hyuwrJnltDlLnyaTmJoJ8yraOUWubc1qaKMoUmImEQRGrFsCd8V48vogeUTm4K2ExrYvVBphY1SBqQMKYGsI5ar/6QTe/yYPzaFD3fJWQ8H9O+JO0uwRccdgVoEAKU3jU8TDWX5nXOR6gzl+Z1wMqtt7qrd7qRZeOcNW3XKs2dsuwNwcbbjyqtHu6nTt0Niw9qsK7hvKousXMVvsaxxNx25e/52glm63XSKUdPaeK7VYVMnIFwCmDHmG8JAy1hFGaMsBTng2Ex0rsE+kNjFEHody3dJ8AAAAASUVORK5CYII=",Ve=v({name:"course-content",data(){return{show:!1,form:{lessonList:[{key:1,videoTitle:"",videoContent:"",videoUrl:"",coverUrl:""}]}}},methods:{handleUpload(s){console.log(s),(s||[]).forEach(l=>{t.lessonList.push({videoTitle:"",videoContent:"",videoUrl:l,coverUrl:""})})},handleSubmit(){this.$refs.form.validate(async s=>{if(s){if(t.lessonList.length<=0){f.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=t.lessonGroup;let o={lessonList:t.lessonList,lessonGroup:C(U({},s),{lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl})};t.groupId?(await c.post("/api-website/videoLessonGroup/update",{data:o}),f.success("\u4FEE\u6539\u6210\u529F")):(await c.post("/api-website/videoLessonGroup/add",{data:o}),f.success("\u521B\u5EFA\u6210\u529F")),sessionStorage.setItem("videoActiveName","DOING"),this.$router.back()}catch{}},swapItems(s,o,l){return s[o]=s.splice(l,1,s[o])[0],s}},render(){return e("div",{class:Ce.courseContent},[e(T,{class:"px-6 pb-10 pt-7 min-h-[280px]",size:"large",labelWidth:"120px",labelPosition:"left",ref:"form",model:t},{default:()=>[e(A,{label:"\u8BFE\u7A0B\u89C6\u9891",required:!0},{default:()=>[e("div",null,[e(q,{multiple:!0,limit:3,bucket:"video-course",multipleModel:s=>{this.handleUpload(s)}},null)])]}),t.lessonList.map((s,o)=>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"},[o!==0&&e(g,{class:"box-item",effect:"dark",content:"\u4E0A\u79FB",placement:"top"},{default:()=>[e("div",{onClick:()=>{this.swapItems(t.lessonList,o,o-1)}},[e(u,{size:29},{default:()=>[e("img",{src:ye},null)]})])]}),t.lessonList.length-1!==o&&e(g,{class:"box-item",effect:"dark",content:"\u4E0B\u79FB",placement:"top"},{default:()=>[e("div",{onClick:()=>{this.swapItems(t.lessonList,o,o+1)}},[e(u,{size:29,class:"ml-3"},{default:()=>[e("img",{src:Ie,title:"\u5411\u4E0B\u79FB\u52A8"},null)]})])]}),t.lessonList.length>1&&e(g,{class:"box-item",effect:"dark",content:"\u5220\u9664",placement:"top"},{default:()=>[e("div",{onClick:()=>{O.confirm("\u786E\u5B9A\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F","\u63D0\u793A",{type:"warning"}).then(()=>{t.lessonList.splice(o,1)})}},[e(u,{size:29,class:"ml-3"},{default:()=>[e("img",{src:Te},null)]})])]})]),e("h2",{class:"text-xl font-semibold pb-5"},[`\u7B2C ${o+1} \u8BFE`]),e(A,{label:"\u8BFE\u7A0B\u6807\u9898",prop:`lessonList.${o}.videoTitle`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u6807\u9898"}]},{default:()=>[e(d,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u6807\u9898",maxlength:50,modelValue:s.videoTitle,"onUpdate:modelValue":l=>s.videoTitle=l},null)]}),e(A,{label:"\u8BFE\u7A0B\u4ECB\u7ECD",prop:`lessonList.${o}.videoContent`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD"}]},{default:()=>[e(d,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD",modelValue:s.videoContent,"onUpdate:modelValue":l=>s.videoContent=l,type:"textarea",maxlength:200,rows:4,showWordLimit:!0},null)]}),e(K,null,{default:()=>[e(V,{span:12},{default:()=>[e(A,{label:"\u8BFE\u7A0B\u89C6\u9891",required:!0},{default:()=>[e($,{styleValue:{with:"150px",height:"85px"},controls:!1,src:s.videoUrl,volume:!1},null),e("p",null,null)]})]}),e(V,{span:10},{default:()=>[e(A,{label:"\u89C6\u9891\u5C01\u9762",prop:`lessonList.${o}.coverUrl`,rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u89C6\u9891\u5C01\u9762"}]},{default:()=>[e(R,{modelValue:s.coverUrl,"onUpdate:modelValue":l=>s.coverUrl=l,bucket:"video-course"},null)]})]})]})]))]}),e("div",{class:"text-center pt-6 pb-7"},[e(p,{round:!0,class:"!w-44 !h-[48px] !text-base",onClick:()=>{t.active=0;const s=document.documentElement.scrollTop||document.body.scrollTop;y(s,0)}},{default:()=>[r("\u4E0A\u4E00\u6B65")]}),e(p,{round:!0,type:"primary",class:"!w-44 !h-[48px] !text-base",onClick:this.handleSubmit},{default:()=>[r("\u4E0B\u4E00\u6B65")]})]),e(W,{modelValue:this.show,"onUpdate:modelValue":s=>this.show=s,title:"\u9884\u89C8"},{default:()=>[e(Ee,null,null)],footer:()=>e("span",{class:"dialog-footer !text-center block "},[e(p,{size:"large",round:!0,onClick:()=>{this.show=!1}},{default:()=>[r("\u8FD4\u56DE\u7F16\u8F91")]}),e(p,{size:"large",round:!0,type:"primary",onClick:this.createSubmit},{default:()=>[t.groupId?"\u786E\u8BA4\u4FEE\u6539":"\u521B\u5EFA\u5B8C\u6210"]})])})])}});const Be="_tabs_1g4lj_1",De="_imgCover_1g4lj_4",we="_courseInfo_1g4lj_7";var Se={tabs:Be,imgCover:De,courseInfo:we};function Fe(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Y(s)}var Ne=v({name:"course-info",data(){return{url:""}},computed:{choiceSubjectIds(){let s=t.lessonGroup.lessonSubject?Number(t.lessonGroup.lessonSubject):null;return s?[s]:[]},subjectList(){return t.subjectList||[]},lessonSubjectName(){let s="";return this.subjectList.forEach(o=>{this.choiceSubjectIds.includes(o.id)&&(s=o.name)}),s},calcRatePrice(){let s=t.rate||0,o=t.lessonGroup.lessonPrice||0;return(o-s/100*o).toFixed(2)}},async mounted(){try{if(t.subjectList.length<=0){const l=await c.post("/api-website/teacher/querySubject");t.subjectList=l.data||[]}const s=t.rate||0,o=t.lessonGroup.lessonPrice||0}catch{}},methods:{onFormatter(s){s.target.value=se(s.target.value),t.rate,s.target.value},tabChange(s){this.$refs.form.clearValidate("lessonCoverTemplateUrl"),this.$refs.form.clearValidate("lessonCoverUrl"),t.tabIndex=s},selectImg(s){t.lessonGroup.lessonCoverUrl="",t.lessonGroup.lessonCoverTemplateUrl=s}},render(){let s;return e("div",{class:Se.courseInfo},[e(T,{class:"px-6 pb-10 pt-7",size:"large",ref:"form",labelWidth:"120px",labelPosition:"left",model:t.lessonGroup},{default:()=>[e(A,{label:"\u8BFE\u7A0B\u540D\u79F0",prop:"lessonName",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"}]},{default:()=>[e(d,{modelValue:t.lessonGroup.lessonName,"onUpdate:modelValue":o=>t.lessonGroup.lessonName=o,maxlength:20,placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"},null)]}),e(A,{label:"\u8BFE\u7A0B\u58F0\u90E8",prop:"lessonSubject",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8"}]},{default:()=>[e(J,{class:"w-full",modelValue:t.lessonGroup.lessonSubject,"onUpdate:modelValue":o=>t.lessonGroup.lessonSubject=o,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8"},Fe(s=t.subjectList.map(o=>e(X,{key:o.id,value:o.id,label:o.name},null)))?s:{default:()=>[s]})]}),e(A,{label:"\u8BFE\u7A0B\u4ECB\u7ECD",prop:"lessonDesc",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD"}]},{default:()=>[e(d,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD",modelValue:t.lessonGroup.lessonDesc,"onUpdate:modelValue":o=>t.lessonGroup.lessonDesc=o,type:"textarea",maxlength:200,rows:4,showWordLimit:!0},null)]}),e(A,{label:"\u8BFE\u7A0B\u7EC4\u552E\u4EF7",prop:"lessonPrice",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u7EC4\u552E\u4EF7"}]},{default:()=>[e(d,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u7EC4\u552E\u4EF7",modelValue:t.lessonGroup.lessonPrice,"onUpdate:modelValue":o=>t.lessonGroup.lessonPrice=o,onKeyup:this.onFormatter,maxlength:9},{suffix:()=>e("span",{class:"text-base text-[#999]"},[r("\u5143")])})]}),e("div",{class:"text-sm text-[#999] pl-[120px] leading-relaxed pb-2"},[e("p",null,[r("\u6263\u9664\u624B\u7EED\u8D39\u540E\u60A8\u7684\u8BFE\u7A0B\u9884\u8BA1\u6536\u5165\u4E3A\uFF1A ")]),e("p",null,[r("\u8BFE\u7A0B\u7EC4\u603B\u6536\u5165"),e("span",{class:"px-1 text-[#FF4E19]"},[this.calcRatePrice]),r("\u5143/\u4EBA")]),e("p",null,[r("\u60A8\u7684\u8BFE\u7A0B\u6536\u5165\u5C06\u5728\u8BFE\u7A0B\u7ED3\u675F\u540E\u7ED3\u7B97\u5230\u60A8\u7684\u8D26\u6237\u4E2D ")])]),e(A,{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(ee,{modelValue:t.lessonGroup.lessonCoverUrl,bucket:"video-course",cropUploadSuccess:o=>{t.lessonGroup.lessonCoverUrl=o,t.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(p,{type:"primary",round:!0,class:"!w-44 !h-[48px] !text-base",onClick:()=>{this.$refs.form.validate(async o=>{if(o){t.active=1;const l=document.documentElement.scrollTop||document.body.scrollTop;y(l,0)}else return this.$nextTick(()=>{document.getElementsByClassName("is-error")[0].scrollIntoView({block:"center",behavior:"smooth"})}),!1})}},{default:()=>[r("\u4E0B\u4E00\u6B65")]})])])}}),We=v({name:"video-operation",data(){return{type:this.$route.query.type||"create"}},async created(){oe();const s=this.$route.query;if(t.groupId=Number(s.groupId)||0,!t.groupId)return!1;try{t.loadingStatus=!0;const n=(await c.get("/api-website/videoLessonGroup/selectVideoLesson",{params:{groupId:t.groupId}})).data,o=n.lessonGroup,{auditStatus:ke,lessonCoverUrl:D,lessonPrice:w,lessonDesc:S,lessonSubject:F,lessonName:N,id:k}=o,Pe=I(o,["auditStatus","lessonCoverUrl","lessonPrice","lessonDesc","lessonSubject","lessonName","id"]);t.lessonGroup={id:k,lessonName:N,lessonSubject:Number(F),lessonDesc:S,lessonPrice:w,lessonCoverUrl:D},t.lessonList=[],n.detailList&&n.detailList.forEach(i=>{t.lessonList.push({videoTitle:i.videoTitle,videoContent:i.videoContent,videoUrl:i.videoUrl,coverUrl:i.coverUrl,posterUrl:i.posterUrl})}),t.loadingStatus=!1}catch{}t.lessonGroup.lessonCoverUrl&&!t.templateList.includes(t.lessonGroup.lessonCoverUrl)?t.tabIndex=2:t.tabIndex=1},async mounted(){document.title=this.type==="create"?"\u65B0\u5EFA\u89C6\u9891\u8BFE":"\u7F16\u8F91\u89C6\u9891\u8BFE";try{const s=await c.get("/api-website/sysConfig/queryByParamName",{params:{paramName:"video_lesson_service_fee"}});t.rate=s.data.paramValue}catch{}},render(){return e(M,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(z,{class:"pl-[60px] pr-7",type:"large",active:t.active},null),t.active===0&&e(Ne,null,null),t.active===1&&e(Ve,null,null)])])}});export{We as default};