1 |
- var L=Object.defineProperty,j=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var C=(s,t,l)=>t in s?L(s,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[t]=l,I=(s,t)=>{for(var l in t||(t={}))E.call(t,l)&&C(s,l,t[l]);if(m)for(var l of m(t))U.call(t,l)&&C(s,l,t[l]);return s},T=(s,t)=>j(s,z(t));var y=(s,t)=>{var l={};for(var n in s)E.call(s,n)&&t.indexOf(n)<0&&(l[n]=s[n]);if(s!=null&&m)for(var n of m(s))t.indexOf(n)<0&&U.call(s,n)&&(l[n]=s[n]);return l};import{C as G}from"./index.34e84526.js";import{q as R,d as _,r as c,u as V}from"./index.9dd659e5.js";import{C as q}from"./index.bd2ddb50.js";import{C as Q}from"./index.32f70ed9.js";import{r as O,d as v,c as e,x as f,a as r,l as u,E as g,y as B,z as A,a3 as h,j as K,w as d,q as W,v as D,k as p,K as J,a1 as X,a2 as Y,a6 as M,F as Z}from"./vendor.402ecc1a.js";import{i as H,a as $}from"./icon_course_list.e767783e.js";import{C as ee}from"./index.06472696.js";import{C as se}from"./index.34d04255.js";import{v as te}from"./toolsValidate.add49407.js";const w=()=>({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:[]}),o=O(w()),oe=()=>{Object.assign(o,w())},le="_createSubmit_10oze_7",re="_introduction_10oze_7",ae="_userDetail_10oze_12",ne="_banner_10oze_12",Ae="_userInfo_10oze_18",ue="_avatar_10oze_24",ie="_name_10oze_30",ce="_buyNum_10oze_39",de="_buyNumInfo_10oze_53",pe="_iconBuy_10oze_59",me="_info_10oze_62",ve="_userTitle_10oze_68",be="_videoImg_10oze_74",fe="_videoStop_10oze_79",ge="_videoTitle_10oze_91",he="_videoTitleText_10oze_99",xe="_videoTitleContent_10oze_104";var a={"course-preview":"_course-preview_10oze_1",createSubmit:le,introduction:re,userDetail:ae,banner:ne,userInfo:Ae,avatar:ue,name:ie,buyNum:ce,buyNumInfo:de,iconBuy:pe,info:me,userTitle:ve,videoImg:be,videoStop:fe,videoTitle:ge,videoTitleText:he,videoTitleContent:xe},Ee="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==",Ue=v({name:"course-preview",computed:{userInfo(){const s=o.lessonGroup,t=R.user.data||{};return{id:t.id,username:t.username||`\u6E38\u5BA2${t.id||""}`,headUrl:t.headUrl,lessonName:s.lessonName,buyNum:0,lessonDesc:s.lessonDesc,lessonPrice:s.lessonPrice,lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl,lessonNum:o.lessonList.length}},lessonList(){return o.lessonList||[]}},render(){return e("div",{class:[a["course-preview"],"pb-3"]},[e("div",{class:a.userDetail},[e(f,{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(f,{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:H},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:$},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"},[o.lessonList.map(s=>e("div",{class:"flex mb-3"},[e("div",{class:a.videoImg},[e(f,{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:Ee},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 Ce="_courseContent_15viv_1";var Ie={courseContent:Ce},Te="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==",Ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAAXNSR0IArs4c6QAAAEhQTFRFAAAA////////9vb28/Pz9PT09PT08/Pz8/Pz8/Pz9PT0AAAACwsLGhoaLS0tNDQ0RUVFi4uLra2t19fX2NjY2dnZ7Ozs8/PzedusZQAAAAt0Uk5TAAIFUVWKpNjc8v4WawkrAAABBElEQVRIx+2XUQ6DIAxAq6KoExHd4P43HbppnNKAVLMf3w9Jw4uVlLQAjKSs4JUJouIFS2EhK80hyuwrJnltDlLnyaTmJoJ8yraOUWubc1qaKMoUmImEQRGrFsCd8V48vogeUTm4K2ExrYvVBphY1SBqQMKYGsI5ar/6QTe/yYPzaFD3fJWQ8H9O+JO0uwRccdgVoEAKU3jU8TDWX5nXOR6gzl+Z1wMqtt7qrd7qRZeOcNW3XKs2dsuwNwcbbjyqtHu6nTt0Niw9qsK7hvKousXMVvsaxxNx25e/52glm63XSKUdPaeK7VYVMnIFwCmDHmG8JAy1hFGaMsBTng2Ex0rsE+kNjFEHody3dJ8AAAAASUVORK5CYII=",Be=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=>{o.lessonList.push({videoTitle:"",videoContent:"",videoUrl:l,coverUrl:""})})},handleSubmit(){this.$refs.form.validate(async s=>{if(s){if(o.lessonList.length<=0){g.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=o.lessonGroup;let t={lessonList:o.lessonList,lessonGroup:T(I({},s),{lessonCoverUrl:s.lessonCoverTemplateUrl||s.lessonCoverUrl})};o.groupId?(await c.post("/api-website/videoLessonGroup/update",{data:t}),g.success("\u4FEE\u6539\u6210\u529F")):(await c.post("/api-website/videoLessonGroup/add",{data:t}),g.success("\u521B\u5EFA\u6210\u529F")),sessionStorage.setItem("videoActiveName","DOING"),this.$router.back()}catch{}},swapItems(s,t,l){return s[t]=s.splice(l,1,s[t])[0],s}},render(){return e("div",{class:Ie.courseContent},[e(B,{class:"px-6 pb-10 pt-7 min-h-[280px]",size:"large",labelWidth:"120px",labelPosition:"left",ref:"form",model:o},{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)])]}),o.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(h,{class:"box-item",effect:"dark",content:"\u4E0A\u79FB",placement:"top"},{default:()=>[e("div",{onClick:()=>{this.swapItems(o.lessonList,t,t-1)}},[e(u,{size:29},{default:()=>[e("img",{src:ye},null)]})])]}),o.lessonList.length-1!==t&&e(h,{class:"box-item",effect:"dark",content:"\u4E0B\u79FB",placement:"top"},{default:()=>[e("div",{onClick:()=>{this.swapItems(o.lessonList,t,t+1)}},[e(u,{size:29,class:"ml-3"},{default:()=>[e("img",{src:Te,title:"\u5411\u4E0B\u79FB\u52A8"},null)]})])]}),o.lessonList.length>1&&e(h,{class:"box-item",effect:"dark",content:"\u5220\u9664",placement:"top"},{default:()=>[e("div",{onClick:()=>{K.confirm("\u786E\u5B9A\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F","\u63D0\u793A",{type:"warning"}).then(()=>{o.lessonList.splice(t,1)})}},[e(u,{size:29,class:"ml-3"},{default:()=>[e("img",{src:Ve},null)]})])]})]),e("h2",{class:"text-xl font-semibold pb-5"},[`\u7B2C ${t+1} \u8BFE`]),e(A,{label:"\u8BFE\u7A0B\u6807\u9898",prop:`lessonList.${t}.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.${t}.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(W,null,{default:()=>[e(D,{span:12},{default:()=>[e(A,{label:"\u8BFE\u7A0B\u89C6\u9891",required:!0},{default:()=>[e(ee,{styleValue:{with:"150px",height:"85px"},controls:!1,src:s.videoUrl,volume:!1},null),e("p",null,null)]})]}),e(D,{span:10},{default:()=>[e(A,{label:"\u89C6\u9891\u5C01\u9762",prop:`lessonList.${t}.coverUrl`,rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u89C6\u9891\u5C01\u9762"}]},{default:()=>[e(q,{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:()=>{o.active=0;const s=document.documentElement.scrollTop||document.body.scrollTop;V(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(J,{modelValue:this.show,"onUpdate:modelValue":s=>this.show=s,title:"\u9884\u89C8"},{default:()=>[e(Ue,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:()=>[r("\u521B\u5EFA\u5B8C\u6210")]})])})])}});const De="_tabs_1g4lj_1",we="_imgCover_1g4lj_4",Se="_courseInfo_1g4lj_7";var Fe={tabs:De,imgCover:we,courseInfo:Se};function Ne(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!M(s)}var Pe=v({name:"course-info",data(){return{url:"",calcRatePrice:0}},computed:{choiceSubjectIds(){let s=o.lessonGroup.lessonSubject?Number(o.lessonGroup.lessonSubject):null;return s?[s]:[]},subjectList(){return o.subjectList||[]},lessonSubjectName(){let s="";return this.subjectList.forEach(t=>{this.choiceSubjectIds.includes(t.id)&&(s=t.name)}),s}},async mounted(){try{if(o.subjectList.length<=0){const l=await c.post("/api-website/teacher/querySubject");o.subjectList=l.data||[]}const s=o.rate||0,t=o.lessonGroup.lessonPrice||0;this.calcRatePrice=(t-s/100*t).toFixed(2)}catch{}},methods:{onFormatter(s){s.target.value=te(s.target.value);let t=o.rate||0,l=s.target.value||0;this.calcRatePrice=(l-t/100*l).toFixed(2)},tabChange(s){this.$refs.form.clearValidate("lessonCoverTemplateUrl"),this.$refs.form.clearValidate("lessonCoverUrl"),o.tabIndex=s},selectImg(s){o.lessonGroup.lessonCoverUrl="",o.lessonGroup.lessonCoverTemplateUrl=s}},render(){let s;return e("div",{class:Fe.courseInfo},[e(B,{class:"px-6 pb-10 pt-7",size:"large",ref:"form",labelWidth:"120px",labelPosition:"left",model:o.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:o.lessonGroup.lessonName,"onUpdate:modelValue":t=>o.lessonGroup.lessonName=t,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(X,{class:"w-full",modelValue:o.lessonGroup.lessonSubject,"onUpdate:modelValue":t=>o.lessonGroup.lessonSubject=t,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8"},Ne(s=o.subjectList.map(t=>e(Y,{key:t.id,value:t.id,label:t.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:o.lessonGroup.lessonDesc,"onUpdate:modelValue":t=>o.lessonGroup.lessonDesc=t,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:o.lessonGroup.lessonPrice,"onUpdate:modelValue":t=>o.lessonGroup.lessonPrice=t,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(se,{modelValue:o.lessonGroup.lessonCoverUrl,bucket:"video-course",cropUploadSuccess:t=>{o.lessonGroup.lessonCoverUrl=t,o.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 t=>{if(t){o.active=1;const l=document.documentElement.scrollTop||document.body.scrollTop;V(l,0)}else return this.$nextTick(()=>{document.getElementsByClassName("is-error")[0].scrollIntoView({block:"center",behavior:"smooth"})}),!1})}},{default:()=>[r("\u4E0B\u4E00\u6B65")]})])])}}),Je=v({name:"video-operation",data(){return{type:this.$route.query.type||"create"}},async created(){oe();const s=this.$route.query;if(o.groupId=Number(s.groupId)||0,!o.groupId)return!1;try{o.loadingStatus=!0;const n=(await c.get("/api-website/videoLessonGroup/selectVideoLesson",{params:{groupId:o.groupId}})).data,t=n.lessonGroup,{auditStatus:ke,lessonCoverUrl:b,lessonPrice:S,lessonDesc:F,lessonSubject:N,lessonName:P,id:k}=t,Le=y(t,["auditStatus","lessonCoverUrl","lessonPrice","lessonDesc","lessonSubject","lessonName","id"]),x=!!o.templateList.includes(b);o.lessonGroup={id:k,lessonName:P,lessonSubject:Number(N),lessonDesc:F,lessonPrice:S,lessonCoverTemplateUrl:x?b:"",lessonCoverUrl:x?"":b},o.lessonList=[],n.detailList&&n.detailList.forEach(i=>{o.lessonList.push({videoTitle:i.videoTitle,videoContent:i.videoContent,videoUrl:i.videoUrl,coverUrl:i.coverUrl,posterUrl:i.posterUrl})}),o.loadingStatus=!1}catch{}o.lessonGroup.lessonCoverUrl&&!o.templateList.includes(o.lessonGroup.lessonCoverUrl)?o.tabIndex=2:o.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"}});o.rate=s.data.paramValue}catch{}},render(){return e(Z,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(G,{class:"pl-[60px] pr-7",type:"large",active:o.active},null),o.active===0&&e(Pe,null,null),o.active===1&&e(Be,null,null)])])}});export{Je as default};
|