1import{M as j,f as P,k as Q,g as $,s as h,j as E,h as O,i as W,l as Y,v as u,W as z,ai as G,r as H,o as k,A as J,w as y,u as m,c as K,d,D as X,y as F,a5 as b}from"./index.js";import{_ as Z}from"./CmmnCancelButton.js";import{_ as ee}from"./CmmnSaveButton.js";/* empty css *//* empty css *//* empty css */import{_ as te}from"./QuestionLessonVideoForm.js";import{u as oe}from"./QuestionLessonStore.js";import"./CmmnEditor.js";import"./vee-validate.js";import"./CmmnSelect.js";import"./CmmnTextInput.js";import"./CmmnTable.js";import"./CmmnInnorixFileUpload.js";import"./ContsService.js";const se={key:0,class:"flex_end"},ye={__name:"QuestionLessonVideoUpdate",setup(ne){var C;j();const f=P(),R=f.params.menuId,{modalAlert:i,modalConfirm:p}=Q(),g=$(),w=(C=g.currentMenuItem)==null?void 0:C.prgrmId,{accessAuthByRegId:ae,checkAuthByActnSe:S,checkAuthByRegId:le,checkAuthByActnSeModal:re}=g,{questionLessonConts:o}=h(oe()),{logRegForm:v,insRegLog:B}=E(),{lgnUserInfo:A}=h(O()),{namedPageLink:x}=W();Y(()=>{D()});const U=u(f.params.contsId),l=u(null),c=u({vod:[],file:[]}),D=async()=>{const s="/questionLesson/getContsData",n={contsId:U.value},{data:e}=await z(s,n);if(!e)return i({msg:"ë°ì´í°ë¥¼ ì¡°íí ì ììµëë¤."});if(o.value=e.contsData,o.value.oriInstClsfId=e.contsData.instClsfId,o.value.oriSbjtClsfId=e.contsData.sbjtClsfId,e.fileList){const t=G(e.fileList,"vod");c.value.vod=t,c.value.file=e.fileList.filter(a=>!t.includes(a))}},M=async()=>{l.value.validateForm()&&p({msg:F("common.insert"),confirmCallback:async()=>{await N()}})},N=async()=>{var t,a,_,L;const s="/questionLesson/updConts",n={...o.value};o.value.mdfcnId||(o.value.mdfcnId=A.lgnNm);const e=((t=l.value.vodUploadRef)==null?void 0:t.fileList.length)||((a=l.value.fileUploadRef)==null?void 0:a.fileList.length)||((_=l.value.vodUploadRef)==null?void 0:_.delFileList.length)||((L=l.value.fileUploadRef)==null?void 0:L.delFileList.length);await b(s,n,{},!e).then(async({data:I})=>{if(!I)return i({msg:"ìì ì¤í¨. ë¤ì ìëí´ì£¼ì¸ì.",confirmCallback:()=>r()});if(v.ttlCn=o.value.contsNm,await B(v.idntrId),!e){r();return}await l.value.uploadPhysFile(I.contsId)})},q=async({insFiles:s,delFiles:n})=>{const e=[...s.vod.map(a=>({...a})),...s.file.map(a=>({...a}))];if(!await T({files:e,delFileList:[...n.vod,...n.file]}))return i({msg:"íì¼ ì ì¥ ì¤ ì¤ë¥ ë°ì. ë¤ì ìëí´ì£¼ì¸ì.",confirmCallback:()=>r()});r()},T=async({files:s,delFileList:n})=>{const e={contsId:o.value.contsId,files:s,delFileList:n,prgrmType:"CONTS",prgrmId:w,menuId:R,idntrId:o.value.contsId};try{const{data:t}=await b("/questionLesson/saveContsFile",e,{},!0);return t===!0||t==="true"}catch(t){return console.error(t),!1}},r=()=>x("QuestionLessonVideoList"),V=()=>{p({msg:F("common.cancel"),confirmCallback:()=>r()})};return(s,n)=>{const e=H("FormLayout");return k(),J(e,{wrapperClass:"sub_content_box board_list",boxClass:"board_write_box"},{content:y(()=>[d(te,{ref_key:"formRef",ref:l,onInsFile:q,orgnlFileList:c.value},null,8,["orgnlFileList"])]),bottom:y(()=>[m(S)("insert")?(k(),K("div",se,[d(m(Z),{onClick:V}),d(m(ee),{onClick:M})])):X("",!0)]),_:1})}}};export{ye 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.