1import{u as e}from"./uploadImg-C1O-HdC5.js";import{u as a}from"./uploadFileList-LwMbd3nI.js";import{s as l}from"./request-Cvf0WNS5.js";import{f as t}from"./token-lKaI-k1E.js";import{d as o,f as u,e as r,u as s,_ as d,c as i,a as n,b as c,w as m,q as p,l as v,r as g,F as f,j as y,o as _,g as h}from"./main-BR8gIwwd.js";import"./Interface-By4Wv6xK.js";/* empty css */import"./commonUtil-CAIvOrzY.js";import"./FilePreviewDialog-BycDcYT_.js";import"./upload-sF7sAh5-.js";/* empty css *//* empty css */import"./index-Dos3PyFQ.js";function I(){const e=s(),a=u(),d=r({}),i=r([]),n=r([]),c=r([]),m=r(""),p=r([]),v=async()=>{try{const e=await l({url:"public/member/getAllLectureCategories",method:"get"});200===e.code&&e.data?p.value=e.data.map(e=>({value:e.categoryId,label:e.categoryName})):p.value=[]}catch(e){p.value=[]}},g=async()=>{let e=new FormData;e.append("lectureId",m.value);try{const t=await(a=e,l({url:"admin/lectureHall/getLectureHallById",method:"post",data:a}));if(200==t.code){const e=t.data;if(d.value={...e,categoryId:e.categoryId||""},""!==d.value.categoryId&&p.value&&p.value.length>0){const e=p.value[0];"string"==typeof e.value&&"string"!=typeof d.value.categoryId?d.value.categoryId=String(d.value.categoryId):"number"==typeof e.value&&"number"!=typeof d.value.categoryId&&(d.value.categoryId=Number(d.value.categoryId))}const a={url:null!==t.data.coverImageUrl?t.data.coverImageUrl:null};a.url?i.value.push(a):i.value=[];const l={url:null!==t.data.speakerPictureUrl?t.data.speakerPictureUrl:null};l.url?n.value.push(l):n.value=[],c.value=t.data.videoFile}}catch(t){}var a};return o(async()=>{try{await v(),"write"==a.query.type&&(m.value=a.query.prevData,g())}catch(e){}}),{formData:d,coverList:i,speakerList:n,fileList:c,goBack:()=>{e.push("/admin/check-cybersecurity-classroom")},getInterface:(e,a)=>{"å°é¢"==a?d.value.coverImage=e:"头å"==a&&(d.value.speakerPicture=e)},onRemove:(e,a)=>{"å°é¢"==a&&0==e.length?d.value.coverImage="":"头å"==a&&0==e.length&&(d.value.speakerPicture="")},getMethods:e=>{d.value.videoId=e.join(",")},onRemoveList:e=>{0==e.length&&(d.value.videoId="")},submitForm:async()=>{d.value.createUser=t();try{"add"==a.query.type?await(o=d.value,l({url:"admin/lectureHall/addLectureHall",method:"post",data:o})):await(e=>l({url:"admin/lectureHall/updateLectureHall",method:"post",data:e}))(d.value),e.push("onlineClassroom")}catch(u){}var o},categoryOptions:p}}const b={class:"productManagement"},k={class:"add_search margBot"},V=d({__name:"onlineClassroomWrite",setup(l){const{formData:t,coverList:o,speakerList:u,fileList:r,goBack:s,getInterface:d,onRemove:V,getMethods:L,onRemoveList:j,categoryOptions:w}=I();return(l,I)=>{const R=g("el-button"),U=g("el-form-item"),q=g("el-option"),H=g("el-select"),O=g("el-input"),z=g("el-date-picker"),D=g("el-form");return _(),i("div",b,[n("div",k,[c(R,{type:"info",onClick:v(s)},{default:m(()=>[...I[11]||(I[11]=[p("è¿å",-1)])]),_:1},8,["onClick"])]),c(D,{model:v(t),"label-width":"auto"},{default:m(()=>[c(U,{label:"å°é¢"},{default:m(()=>[c(e,{uploadType:"oss",fileList:v(o),onOnHttpRequest:I[0]||(I[0]=e=>v(d)(e,"å°é¢")),onOnRemove:I[1]||(I[1]=e=>v(V)(e,"å°é¢"))},null,8,["fileList"])]),_:1}),c(U,{label:"åç±»"},{default:m(()=>[c(H,{modelValue:v(t).categoryId,"onUpdate:modelValue":I[2]||(I[2]=e=>v(t).categoryId=e),placeholder:"è¯·éæ©åç±»",size:"large",clearable:"",class:"half-width-select"},{default:m(()=>[(_(!0),i(f,null,y(v(w),e=>(_(),h(q,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),c(U,{label:"主é¢"},{default:m(()=>[c(O,{size:"large",modelValue:v(t).lectureName,"onUpdate:modelValue":I[3]||(I[3]=e=>v(t).lectureName=e),placeholder:"请è¾å
¥ä¸»é¢"},null,8,["modelValue"])]),_:1}),c(U,{label:"大纲"},{default:m(()=>[c(O,{size:"large",modelValue:v(t).outline,"onUpdate:modelValue":I[4]||(I[4]=e=>v(t).outline=e),type:"textarea",placeholder:"请è¾å
¥å¤§çº²",autosize:{minRows:2}},null,8,["modelValue"])]),_:1}),c(U,{label:"å¼è®²æ¶é´"},{default:m(()=>[c(z,{modelValue:v(t).speakTime,"onUpdate:modelValue":I[5]||(I[5]=e=>v(t).speakTime=e),type:"date",size:"large","value-format":"YYYY-MM-DD",placeholder:"--å¹´--æ--æ¥"},null,8,["modelValue"])]),_:1}),c(U,{label:"主讲人头å"},{default:m(()=>[c(e,{uploadType:"oss",fileList:v(u),onOnHttpRequest:I[6]||(I[6]=e=>
1v(d)(e,"头å")),onOnRemove:I[7]||(I[7]=e=>v(V)(e,"头å"))},null,8,["fileList"])]),_:1}),c(U,{label:"主讲人åç§°"},{default:m(()=>[c(O,{size:"large",modelValue:v(t).speakerName,"onUpdate:modelValue":I[8]||(I[8]=e=>v(t).speakerName=e),placeholder:"请è¾å
¥ä¸»è®²äººåç§°"},null,8,["modelValue"])]),_:1}),c(U,{label:"主讲人èç§°"},{default:m(()=>[c(O,{size:"large",modelValue:v(t).speakerTitles,"onUpdate:modelValue":I[9]||(I[9]=e=>v(t).speakerTitles=e),placeholder:"请è¾å
¥ä¸»è®²äººèç§°"},null,8,["modelValue"])]),_:1}),c(U,{label:"主讲人ä»ç»"},{default:m(()=>[c(O,{size:"large",modelValue:v(t).speakerIntroduce,"onUpdate:modelValue":I[10]||(I[10]=e=>v(t).speakerIntroduce=e),type:"textarea",placeholder:"请è¾å
¥ä¸»è®²äººä»ç»",autosize:{minRows:2}},null,8,["modelValue"])]),_:1}),c(U,{label:"è§é¢æä»¶"},{default:m(()=>[c(a,{uploadType:"oss",fileList:v(r),multiple:!1,onOnHttpRequest:v(L),onOnRemove:v(j)},null,8,["fileList","onOnHttpRequest","onOnRemove"])]),_:1})]),_:1},8,["model"])])}}},[["__scopeId","data-v-6a7ce074"]]);export{V as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.