var Ee=Object.defineProperty,xe=Object.defineProperties;var Le=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var ue=(r,w,i)=>w in r?Ee(r,w,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[w]=i,N=(r,w)=>{for(var i in w||(w={}))de.call(w,i)&&ue(r,i,w[i]);if(V)for(var i of V(w))ce.call(w,i)&&ue(r,i,w[i]);return r},M=(r,w)=>xe(r,Le(w));var X=(r,w)=>{var i={};for(var u in r)de.call(r,u)&&w.indexOf(u)<0&&(i[u]=r[u]);if(r!=null&&V)for(var u of V(r))w.indexOf(u)<0&&ce.call(r,u)&&(i[u]=r[u]);return i};var x=(r,w,i)=>new Promise((u,t)=>{var k=g=>{try{p(i.next(g))}catch(n){t(n)}},s=g=>{try{p(i.throw(g))}catch(n){t(n)}},p=g=>g.done?u(g.value):Promise.resolve(g.value).then(k,s);p((i=i.apply(r,w)).next())});import{d as B,f as J,g as Z,o as ee,u as z,e as K,a as F,B as O,i as e,a9 as D,_ as A,p as h,k as c,cg as $,ao as R,ai as ke,aa as j,aj as W,c as ae,r as q,l as E,cf as Te,F as De,dk as Y,q as te,ce as P,a1 as pe,H as ge,cd as Fe,di as Ie,ac as _e,ad as fe,dv as ye,a0 as H,N as Ae,at as Ue,dm as Ne,bn as Be,bC as me,dj as Se,M as qe,dw as Me,W as he,d7 as Re,d8 as we}from"./index.1121c4e8.js";import{F as Oe,G as Pe,H as Ke,I as je,J as ze,n as Ve,K as He,L as We,u as Ge,M as ve,N as $e,O as Ye,P as Xe,Q as Qe,R as Je,S as Ze,T as ea,x as aa,U as ta,V as la,W as oa,X as na}from"./api.91c48519.js";import{P as le}from"./index.aea83c68.js";import{S as be}from"./index.1ac4415f.js";import{g as ra,f as sa}from"./dateUtil.0b94c0b3.js";import{g as ia,l as ua}from"./knowledgeTypeData.3b15dd0b.js";import{T as da}from"./index.138464fe.js";import{a as ca}from"./uploadFile.cd4d0bc0.js";import{D as Ce}from"./DeleteFilled.a5b1e2e7.js";import{U as pa}from"./index.f2e2aeec.js";import{c as ga}from"./teachingData.8ab9ee13.js";import{u as fa}from"./tabsView.0a5e287f.js";import{N as ya}from"./PageHeader.94b0b0ec.js";import"./searchs.b637f0d6.js";import"./dayjs.min.cd8da7a1.js";import"./oss-file-upload.d2b5f9e0.js";const ma={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},ha=Z("path",{d:"M880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32zm-622.3-84c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 0 0 0-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 0 0 9.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9z",fill:"currentColor"},null,-1),wa=[ha],va=B({name:"EditFilled",render:function(w,i){return ee(),J("svg",ma,wa)}}),Ca={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},ka=Z("path",{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM540 701v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 1 1 56 0zm152-237H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224z",fill:"currentColor"},null,-1),Ta=[ka],ba=B({name:"LockFilled",render:function(w,i){return ee(),J("svg",Ca,Ta)}}),Ea={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},xa=Z("path",{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM540 701v53c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-53a48.01 48.01 0 1 1 56 0z",fill:"currentColor"},null,-1),La=[xa],Da=B({name:"UnlockFilled",render:function(w,i){return ee(),J("svg",Ea,La)}}),Fa="_createWrap_17l09_1",Ia="_createCourseware_17l09_4",_a="_courseConfiguration_17l09_8",Aa="_title_17l09_11",G={createWrap:Fa,createCourseware:Ia,courseConfiguration:_a,title:Aa},Ua=B({name:"AddseKnowledge",emits:["close","handleSuccess"],props:{item:{type:Object,default:()=>{}},courseTypeCode:{type:String,default:""}},setup(r,{emit:w}){const i=z();K();const u=F({pagination:{page:1,rows:10,pageTotal:0},searchForm:{lessonCoursewareDetailId:"",keyword:""},loading:!1,dataList:[],checkList:[],addLoading:!1}),t=()=>[{type:"selection",disabled(p){return p.totalMaterialNum<=0}},{title:"\u77E5\u8BC6\u70B9\u540D\u79F0",key:"name"},{title:"\u8BFE\u7A0B\u7C7B\u578B",key:"courseTypeName",width:200,ellipsis:!0,render(p){return e(R,{placement:"top-start"},{default:()=>p.courseTypeName,trigger:()=>p.courseTypeName})}},{title:"\u7D20\u6750\u6570\u91CF",key:"totalMaterialNum"},{title:"\u5EFA\u8BAE\u5B66\u4E60\u65F6\u957F",key:"totalMaterialTimeSecond",render(p){return p.totalMaterialTimeSecond+"s"}}],k=()=>x(this,null,function*(){u.loading=!0;try{const{data:p}=yield Oe(M(N({},u.searchForm),{lessonCoursewareDetailId:r.item.id,courseTypeCode:r.courseTypeCode,page:u.pagination.page,rows:u.pagination.rows}));Array.isArray(p==null?void 0:p.rows)&&(u.dataList=p.rows,u.pagination.pageTotal=p.total)}catch(p){}u.loading=!1});O(()=>{k()});const s=()=>x(this,null,function*(){u.addLoading=!0;const p=yield Pe({id:r.item.id,knowledgePointIds:u.checkList.join(",")});(p==null?void 0:p.code)===200&&(i.success("\u4FDD\u5B58\u6210\u529F"),w("handleSuccess")),u.addLoading=!1});return()=>e("div",null,[e(D,{style:{paddingBottom:"12px"}},{default:()=>[e(A,{placeholder:"\u77E5\u8BC6\u70B9\u540D\u79F0",value:u.searchForm.keyword,"onUpdate:value":p=>u.searchForm.keyword=p},null),e(h,{type:"primary",onClick:()=>{u.pagination.page=1,k()}},{default:()=>[c("\u641C\u7D22")]}),e(h,{onClick:()=>{u.searchForm.keyword=""}},{default:()=>[c("\u91CD\u7F6E")]})]}),e($,{loading:u.loading,rowKey:p=>p.id,columns:t(),data:u.dataList,onUpdateCheckedRowKeys:(p,g)=>{let n=[];g.forEach(I=>{I.children&&I.children.length>0||n.push(I.id)}),u.checkList=n}},null),e(le,{page:u.pagination.page,"onUpdate:page":p=>u.pagination.page=p,pageSize:u.pagination.rows,"onUpdate:pageSize":p=>u.pagination.rows=p,pageTotal:u.pagination.pageTotal,"onUpdate:pageTotal":p=>u.pagination.pageTotal=p,onList:k,sync:!0},null),e(D,{justify:"end",style:{paddingTop:"12px"}},{default:()=>[e(h,{onClick:()=>w("close")},{default:()=>[c("\u53D6\u6D88")]}),e(h,{type:"primary",disabled:!u.checkList.length,loading:u.addLoading,onClick:()=>s()},{default:()=>[c("\u786E\u8BA4")]})]})])}}),Na=B({name:"CourseKnowledgePoint",props:{item:{type:Object,default:()=>{}},courseTypeCode:{type:String,default:""}},emits:["handleSuccess"],setup(r,{emit:w}){const i=z(),u=ke();K();const t=F({pagination:{page:1,rows:1e3,pageTotal:0},searchForm:{keyword:"",knowledgePointId:""},loading:!1,dataList:[],checkList:[],visiableKnowledge:!1}),k=[{type:"selection"},{title:"\u77E5\u8BC6\u70B9\u540D\u79F0",key:"name",render(o){return e(W,null,[o.name,c("("),o.knowledgePointId,c(")")])}},{title:"\u8BFE\u7A0B\u7C7B\u578B",key:"courseTypeName",width:200,ellipsis:!0,render(o){return e(R,{placement:"top-start"},{default:()=>o.courseTypeName,trigger:()=>o.courseTypeName})}},{title:"\u7D20\u6750\u6570\u91CF",key:"totalMaterialNum"},{title:"\u5EFA\u8BAE\u5B66\u4E60\u65F6\u957F",key:"totalMaterialTimeSecond",render(o){return o.totalMaterialTimeSecond+"s"}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(o,m){return e(D,null,{default:()=>[e(h,{text:!0,type:"primary",disabled:o.relOrder===1,onClick:()=>n("up",o)},{default:()=>[c("\u4E0A\u79FB")]}),e(h,{text:!0,type:"primary",disabled:g(o),onClick:()=>n("down",o)},{default:()=>[c("\u4E0B\u79FB")]})]})}}],s=()=>x(this,null,function*(){var o;t.loading=!0;try{const{data:m}=yield Ke(M(N({},t.searchForm),{lessonCoursewareDetailId:(o=r.item)==null?void 0:o.id,page:t.pagination.page,rows:t.pagination.rows}));Array.isArray(m==null?void 0:m.rows)&&(t.dataList=m.rows.map((d,f)=>M(N({},d),{relOrder:f+1,parentId:0})),t.dataList.forEach(d=>{d.children&&d.children.length>0&&d.children.forEach((f,C)=>{f.relOrder=C+1,f.parentId=d.id})}),console.log(t.dataList,"dataList"))}catch(m){}t.loading=!1});O(()=>{s()});const p=()=>{const o=u.warning({title:"\u8B66\u544A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u77E5\u8BC6\u70B9\u5173\u8054?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){var m;o.loading=!0,console.log(r.item);try{const d=yield je({id:(m=r.item)==null?void 0:m.id,knowledgePointIds:t.checkList.join(",")});i.success("\u5220\u9664\u6210\u529F"),t.checkList=[],s(),w("handleSuccess")}catch(d){}o.loading=!1})})},g=o=>{const m=t.dataList||[];if(o.parentId>0){const d=m.find(f=>f.id===o.parentId);return o.relOrder===d.children.length}else return o.relOrder===m.length},n=(o,m)=>{if(t.loading)return;const d=m.relOrder-1;m.parentId>0?t.dataList:t.dataList.find(v=>v.id===m.parentId),o==="up"?m.parentId<=0?t.dataList[d]=t.dataList.splice(d-1,1,t.dataList[d])[0]:t.dataList.forEach(v=>{v.id===m.parentId&&(v.children[d]=v.children.splice(d-1,1,v.children[d])[0])}):m.parentId<=0?t.dataList[d]=t.dataList.splice(d+1,1,t.dataList[d])[0]:t.dataList.forEach(v=>{v.id===m.parentId&&(v.children[d]=v.children.splice(d+1,1,v.children[d])[0])});const f=[];let C=0;t.dataList.forEach((v,S)=>{v.relOrder=S+1,v.children&&v.children.length>0?v.children.forEach((U,l)=>{U.relOrder=l+1,U.parentId=v.id,C=C+1,f.push({sortNo:C,id:U.id})}):(C=C+1,f.push({sortNo:C,id:v.id}))}),console.log(f),I(f)},I=o=>x(this,null,function*(){try{yield ze(o)}catch(m){}});return()=>e("div",null,[e(D,{style:{paddingBottom:"12px"}},{default:()=>[e(h,{type:"primary",onClick:()=>t.visiableKnowledge=!0},{default:()=>[c("\u5173\u8054\u77E5\u8BC6\u70B9")]}),e(h,{type:"error",disabled:!t.checkList.length,onClick:()=>p()},{default:()=>[c("\u6279\u91CF\u5220\u9664")]})]}),e(D,{style:{paddingBottom:"12px"}},{default:()=>[e(A,{placeholder:"\u77E5\u8BC6\u70B9\u540D\u79F0",value:t.searchForm.keyword,"onUpdate:value":o=>t.searchForm.keyword=o},null),e(h,{type:"primary",onClick:()=>{t.pagination.page=1,s()}},{default:()=>[c("\u641C\u7D22")]}),e(h,{onClick:()=>{t.searchForm.keyword="",t.pagination.page=1,s()}},{default:()=>[c("\u91CD\u7F6E")]})]}),e($,{loading:t.loading,rowKey:o=>o.id,columns:k,"onUpdate:columns":o=>k=o,data:t.dataList,onUpdateCheckedRowKeys:(o,m)=>{let d=[];m.forEach(f=>{f.children&&f.children.length>0||d.push(f.id)}),t.checkList=d}},null),e(j,{preset:"dialog",show:t.visiableKnowledge,"onUpdate:show":o=>t.visiableKnowledge=o,title:"\u6DFB\u52A0\u77E5\u8BC6\u70B9",showIcon:!1,style:{width:"1000px"}},{default:()=>[e(Ua,{courseTypeCode:r.courseTypeCode,item:r.item,onClose:()=>{t.visiableKnowledge=!1},onHandleSuccess:()=>{t.visiableKnowledge=!1,s(),w("handleSuccess")}},null)]})])}}),Ba=B({name:"after-class-training-manage",emits:["handleSuccess"],props:{courseTypeCode:{type:String,default:""}},setup(r,{emit:w}){ae();const i=F({loading:!1,pagination:{page:1,rows:10,pageTotal:0},dataList:[]}),u=F({keyword:"",time:null,operatorId:null}),t=()=>x(this,null,function*(){try{i.loading=!0;const o=u,{time:m}=o,d=X(o,["time"]),{data:f}=yield Ve(M(N(N({},d),ra(u.time,["startUpdateTime","endUpdateTime"])),{enableFlag:!0,courseType:r.courseTypeCode,page:i.pagination.page,rows:i.pagination.rows}));i.loading=!1,i.pagination.pageTotal=Number(f.total),i.dataList=f.rows||[]}catch(m){i.loading=!1}});O(()=>{t()});const k=o=>{w("handleSuccess",o)},s=()=>[{title:"\u8BAD\u7EC3\u540D\u79F0",key:"name",fixed:"left"},{title:"\u7F16\u53F7",key:"id"},{title:"\u8BFE\u7A0B\u7C7B\u578B",key:"courseTypeName",width:200,ellipsis:!0,render(o){return e(R,{placement:"top-start"},{default:()=>o.courseTypeName,trigger:()=>o.courseTypeName})}},{title:"\u8BAD\u7EC3\u6761\u6570",key:"trainingNum"},{title:"\u66F4\u65B0\u65F6\u95F4",key:"updateTime"},{title:"\u66F4\u65B0\u4EBA",key:"operatorName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(o){return e(D,null,{default:()=>[e(h,{type:"primary",size:"small",text:!0,onClick:()=>k(o)},{default:()=>[c("\u6DFB\u52A0")]})]})}}],p=q(),g=()=>{i.pagination.page=1,t()},n=()=>{var o;(o=p.value)==null||o.submit()},I=()=>{var o;(o=p.value)==null||o.reset()};return()=>e("div",null,[e(be,{ref:p,model:u,onSubmit:g,onSetModel:o=>Object.assign(u,o),saveKey:"selectAfterClassTraining-key"},{default:()=>[e(E,{path:"search"},{default:()=>[e(A,{value:u.keyword,"onUpdate:value":o=>u.keyword=o,placeholder:"\u8BAD\u7EC3\u540D\u79F0/\u7F16\u53F7",clearable:!0},null)]}),e(E,{path:"time"},{default:()=>[e(Te,{"value-format":"yyyy-MM-dd HH:mm:dd",value:u.time,"onUpdate:value":o=>u.time=o,type:"daterange",clearable:!0},null)]}),e(E,null,{default:()=>[e(D,null,{default:()=>[e(h,{type:"primary",onClick:n},{default:()=>[c("\u641C\u7D22")]}),e(h,{type:"default",onClick:I},{default:()=>[c("\u91CD\u7F6E")]})]})]})]}),e($,{scrollX:1300,loading:i.loading,columns:s(),data:i.dataList,childrenKey:"children","default-expand-all":!1,"row-key":o=>o.id},null),e(le,{saveKey:"selectAfterClassTraining-key",page:i.pagination.page,"onUpdate:page":o=>i.pagination.page=o,pageSize:i.pagination.rows,"onUpdate:pageSize":o=>i.pagination.rows=o,pageTotal:i.pagination.pageTotal,"onUpdate:pageTotal":o=>i.pagination.pageTotal=o,onList:t,sync:!0},null)])}}),Sa=B({name:"AddUnitTest",props:{courseTypeCode:{type:String,default:""},list:{type:Array,default:()=>[]},item:{type:Object,default:()=>{}}},emits:["close"],setup(r,{emit:w}){const i=z(),t=K().query,k=q(!1),s=q(),p=De(()=>r.list.map(l=>({label:l.name,value:l.id}))),g=F({id:null,name:"",desc:"",lessonCoursewareId:t.id,parentCoursewareDetailId:null,details:[{level:1,unitExaminationId:"",unitExaminationName:"",lessonCoursewareExaminationMapperId:""},{level:2,unitExaminationId:"",unitExaminationName:"",lessonCoursewareExaminationMapperId:""},{level:3,unitExaminationId:"",unitExaminationName:"",lessonCoursewareExaminationMapperId:""}]}),n={name:[{required:!0,message:"\u8BF7\u586B\u5199\u6D4B\u9A8C\u540D\u79F0",trigger:["blur","change"]}],desc:[{required:!0,message:"\u8BF7\u586B\u5199\u6D4B\u9A8C\u63CF\u8FF0",trigger:["blur","change"]}],parentCoursewareDetailId:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u4E00\u8282\u8BFE\u7A0B",trigger:["blur","change"]}]},I=()=>x(this,null,function*(){if(!!r.item.id){k.value=!0;try{const l=yield He(r.item.id);(l==null?void 0:l.code)==200&&Object.keys(g).map(L=>{if(L=="details")for(let y=0;y{s.value.validate(l=>x(this,null,function*(){if(!l){const L=N({},g);console.log("\u{1F680} ~ body",L);try{(yield We(L)).code==200&&(i.success("\u4FDD\u5B58\u6210\u529F"),w("close",!0))}catch(y){}}}))},m=F({open:!1,active:0}),d=F({pagination:{page:1,rows:10,total:0},loading:!1,active:"",list:[]}),f=q(),C=F({time:null,keyword:null,courseTypeCode:r.courseTypeCode}),v=()=>x(this,null,function*(){var L;d.loading=!0;try{const l=C,{time:y}=l,b=X(l,["time"]),a=yield Ge(M(N(N({page:d.pagination.page,rows:d.pagination.rows,enableFlag:!0},b),sa(y,["updateStartTime","updateEndTime"])),{courseTypeCode:r.courseTypeCode}));Array.isArray((L=a==null?void 0:a.data)==null?void 0:L.rows)&&(d.list=a.data.rows,d.pagination.total=a.data.total)}catch(y){}d.loading=!1}),S=()=>{d.pagination.page=1,v()};O(()=>{I(),v()});const U=()=>[{title:"\u6D4B\u9A8C\u540D\u79F0",key:"name",width:230,render(l){return e("div",null,[e("div",null,[l.name]),e("div",null,[c("\u7F16\u53F7:"),l.id])])}},{title:"\u8BFE\u7A0B\u7C7B\u578B",key:"courseTypeCode",render(l){return ia(l.courseTypeCode)}},{title:"\u6D4B\u9A8C\u65F6\u957F",key:"timeMinutes",render(l){return l.timeMinutes+"\u5206\u949F"}},{title:"\u66F4\u65B0\u65F6\u95F4",key:"updateTime"},{title:"\u66F4\u65B0\u4EBA",key:"operatorName"},{title:"\u64CD\u4F5C",key:"action",render(l){return e(h,{text:!0,type:"primary",onClick:()=>{g.details[m.active].unitExaminationName=l.name,g.details[m.active].unitExaminationId=l.id,m.open=!1}},{default:()=>[c("\u9009\u62E9")]})}}];return()=>e("div",null,[e(Y,{show:k.value},{default:()=>[e(te,{ref:s,model:g,rules:n},{default:()=>[e(E,{label:"\u6D4B\u9A8C\u540D\u79F0",path:"name",required:!0},{default:()=>[e(A,{value:g.name,"onUpdate:value":l=>g.name=l},null)]}),e(E,{label:"\u6D4B\u9A8C\u63CF\u8FF0",path:"desc",required:!0},{default:()=>[e(A,{type:"textarea",rows:3,maxlength:100,showCount:!0,value:g.desc,"onUpdate:value":l=>g.desc=l},null)]}),e(E,{label:"\u6D4B\u9A8C\u8BFE\u7A0B",path:"parentCoursewareDetailId",required:!0},{default:()=>[e(P,{options:p.value,value:g.parentCoursewareDetailId,"onUpdate:value":l=>g.parentCoursewareDetailId=l},null)]}),e(E,{label:"\u5355\u56E2\u5B66\u751F\u9636\u6BB5\u81EA\u6D4B",path:"details[0].unitExaminationId",required:!0,rule:{required:!0,message:"\u8BF7\u9009\u62E9\u5355\u56E2\u9636\u6BB5\u81EA\u6D4B",trigger:["blur","blur"]}},{default:()=>[e(A,{placeholder:"\u8BF7\u9009\u62E9\u9636\u6BB5\u81EA\u6D4B",readonly:!0,onClick:()=>{m.open=!0,m.active=0},value:g.details[0].unitExaminationName,"onUpdate:value":l=>g.details[0].unitExaminationName=l},null)]}),e(E,{label:"\u53CC\u56E2\u5B66\u751F\u9636\u6BB5\u81EA\u6D4B",path:"details[1].unitExaminationId",required:!0,rule:{required:!0,message:"\u8BF7\u9009\u62E9\u53CC\u56E2\u9636\u6BB5\u81EA\u6D4B",trigger:["blur","blur"]}},{default:()=>[e(A,{placeholder:"\u8BF7\u9009\u62E9\u9636\u6BB5\u81EA\u6D4B",readonly:!0,onClick:()=>{m.open=!0,m.active=1},value:g.details[1].unitExaminationName,"onUpdate:value":l=>g.details[1].unitExaminationName=l},null)]}),e(E,{label:"\u591A\u56E2\u5B66\u751F\u9636\u6BB5\u81EA\u6D4B",path:"details[2].unitExaminationId",required:!0,rule:{required:!0,message:"\u8BF7\u9009\u62E9\u591A\u56E2\u9636\u6BB5\u81EA\u6D4B",trigger:["blur","blur"]}},{default:()=>[e(A,{placeholder:"\u8BF7\u9009\u62E9\u9636\u6BB5\u81EA\u6D4B",readonly:!0,onClick:()=>{m.open=!0,m.active=2},value:g.details[2].unitExaminationName,"onUpdate:value":l=>g.details[2].unitExaminationName=l},null)]}),e(D,{justify:"end"},{default:()=>[e(h,{onClick:()=>w("close")},{default:()=>[c("\u53D6\u6D88")]}),e(h,{type:"primary",onClick:o},{default:()=>[c("\u4FDD\u5B58")]})]})]})]}),e(j,{showIcon:!1,title:"\u9009\u62E9\u9636\u6BB5\u81EA\u6D4B",preset:"dialog",style:{width:"80vw"},show:m.open,"onUpdate:show":l=>m.open=l},{default:()=>[e(be,{style:{padding:0},ref:f,"label-width":"",model:C,onSubmit:S,onSetModel:l=>Object.assign(C,l),saveKey:"AddUnitTest-key"},{default:()=>[e(D,null,{default:()=>[e(E,{path:"keyword",label:"\u5173\u952E\u5B57"},{default:()=>[e(A,{placeholder:"\u8BF7\u8F93\u5165\u7F16\u53F7/\u6D4B\u9A8C\u540D\u79F0",value:C.keyword,"onUpdate:value":l=>C.keyword=l,onKeydown:l=>{l.code==="Enter"&&S()},clearable:!0},null)]}),e(E,{path:"time",label:"\u65F6\u95F4"},{default:()=>[e(Te,{value:C.time,"onUpdate:value":l=>C.time=l,type:"daterange",clearable:!0},null)]}),e(E,null,{default:()=>[e(D,null,{default:()=>[e(h,{type:"primary",onClick:()=>{var l;return(l=f.value)==null?void 0:l.submit()}},{default:()=>[c("\u641C\u7D22")]}),e(h,{type:"default",onClick:()=>{var l;return(l=f.value)==null?void 0:l.reset()}},{default:()=>[c("\u91CD\u7F6E")]})]})]})]})]}),e($,{scrollX:800,maxHeight:"500px",loading:d.loading,columns:U(),data:d.list,"row-key":l=>l.categoryId},null),e(D,{style:{padding:"10px 0"},justify:"space-between",align:"center",wrapItem:!1},{default:()=>[e(le,{style:{margin:0},page:d.pagination.page,"onUpdate:page":l=>d.pagination.page=l,pageSize:d.pagination.rows,"onUpdate:pageSize":l=>d.pagination.rows=l,pageTotal:d.pagination.total,"onUpdate:pageTotal":l=>d.pagination.total=l,onList:v,sync:!0,saveKey:"AddUnitTest-key"},null)]})]})])}});function qa(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!Be(r)}const Q=[];for(let r=1;r<=20;r++)Q.push({label:r,value:r});const Ma=B({name:"courseConfiguration",props:{course:{type:Object,default:()=>{}}},setup(r,w){const i=z(),u=ke(),t=K(),k=q(),s=F({open:!1,id:"",name:"",lessonTargetDesc:"",lessonTrainingId:"",lockEnable:"true",level:null,accessScope:0}),p=()=>{k.value.validate(y=>x(this,null,function*(){if(!y){const b={lessonCoursewareId:t.query.id,name:s.name,level:s.level,lessonTargetDesc:s.lessonTargetDesc,lockEnable:s.lockEnable,accessScope:s.accessScope};let a;if(s.id)try{a=yield ve(M(N({},b),{id:s.id}))}catch(T){}else try{a=yield $e(b)}catch(T){}(a==null?void 0:a.code)==200&&(i.success("\u4FDD\u5B58\u6210\u529F"),s.open=!1,n())}}))},g=F({dataList:[],mapperList:[]}),n=()=>x(this,null,function*(){try{const{data:y}=yield Ye({lessonCoursewareId:t.query.id,page:1,rows:1e3});Array.isArray(y==null?void 0:y.rows)&&(g.dataList=y.rows)}catch(y){}}),I=()=>x(this,null,function*(){try{const{data:y}=yield Xe(t.query.id);Array.isArray(y)&&(g.mapperList=y)}catch(y){}}),o=y=>x(this,null,function*(){const{data:b}=yield Qe({id:y==null?void 0:y.id,lessonCoursewareId:t.query.id});Array.isArray(b)&&Q.forEach(a=>{a.disabled=!!b.includes(a.value)})});O(()=>{n(),I()});const m=y=>{const b=u.warning({title:"\u8B66\u544A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u6B64\u8BFE\u65F6?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){b.loading=!0;try{const a=yield Je(y.id);(a==null?void 0:a.code)==200&&(i.success("\u5220\u9664\u6210\u529F"),n())}catch(a){}b.loading=!1})})},d=F({open:!1,id:""}),f=y=>x(this,null,function*(){console.log("\u{1F680} ~ row",y);const b={id:s.id,lessonTrainingId:y.id,name:s.name,lessonTargetDesc:s.lessonTargetDesc};try{const a=yield ve(b);(a==null?void 0:a.code)==200&&(i.success("\u4FDD\u5B58\u6210\u529F"),d.open=!1,n())}catch(a){}}),C=F({open:!1,title:"",item:null}),v=F({open:!1,model:{}}),S=y=>{const b=u.warning({title:"\u8B66\u544A",content:`\u662F\u5426\u786E\u8BA4${y.lockFlag?"\u89E3\u9501":"\u9501\u5B9A"}\u6B64\u8BFE\u65F6?`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){b.loading=!0;try{const a=yield Ze({id:y.id,lockFlag:!y.lockFlag});i.success("\u64CD\u4F5C\u6210\u529F"),n()}catch(a){}b.loading=!1})})},U=y=>{const b=u.warning({title:"\u8B66\u544A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u4F5C\u4E1A?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){b.loading=!0;try{const a=yield ea(y.id);i.success("\u5220\u9664\u6210\u529F"),n()}catch(a){}b.loading=!1})})},l=F({loading:!1,dataType:"EXAMINATION",importRef:null}),L=y=>x(this,null,function*(){console.log(y.file);const b=i.loading("\u6B63\u5728\u4E0A\u4F20\u6587\u4EF6",{duration:0});l.loading=!0;try{const a=yield ca(y.file.file,()=>{}),T=yield aa({dataType:l.dataType,fileName:y.file.name,importUrl:a,lessonId:t.query.id});if(console.log("\u{1F680} ~ res:",T),l.loading=!1,T.data){if(b.destroy(),T.data.insertRow===0&&T.data.invalidRow===0){i.error("\u5BFC\u5165\u5931\u8D25\uFF0C\u8868\u683C\u4E3A\u7A7A");return}if(T.data.respUrl){u.error({title:"\u4FE1\u606F",content:()=>e(D,null,{default:()=>[e("div",null,[c("\u5BFC\u5165\u5931\u8D25\uFF0C\u70B9\u51FB\u4E0B\u8F7D\u9519\u8BEF\u4FE1\u606F")]),e("a",{href:T.data.respUrl,download:!0},[c("\u4E0B\u8F7D")])]})});return}n(),i.success("\u5BFC\u5165\u6210\u529F")}else i.error("\u8BF7\u4E0B\u8F7D\u6A21\u677F\u540E,\u586B\u5199\u6570\u636E\u518D\u5BFC\u5165")}catch(a){}l.loading=!1,b.destroy()});return()=>{var b;let y;return e("div",{class:G.courseConfiguration},[e(Y,{show:l.loading},{default:()=>[e(D,{justify:"space-between"},{default:()=>[e(D,null,{default:()=>[e(h,{disabled:!!t.query.isLook,type:"primary",onClick:()=>{s.name="",s.lessonTargetDesc="",s.lessonTrainingId="",s.id="",s.level=null,s.lockEnable="",s.accessScope=0,o(),s.open=!0}},{default:()=>[c("\u6DFB\u52A0\u8BFE\u7A0B")]}),e(h,{type:"primary",disabled:!!t.query.isLook,onClick:()=>{v.open=!0,v.model={}}},{default:()=>[c("\u6DFB\u52A0\u9636\u6BB5\u81EA\u6D4B")]})]}),e(D,{style:{marginLeft:"auto"}},{default:()=>[e(pe,{size:"huge",trigger:"hover",options:[{key:"3",type:"render",render:()=>e(h,{size:"large",quaternary:!0,tag:"a",href:"https://oss.dayaedu.com/daya-docs/%E5%8D%95%E5%85%83%E6%B5%8B%E9%AA%8C%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx",download:!0},{default:()=>[c("\u5355\u5143\u6D4B\u9A8C\u6A21\u677F")]})},{key:"1",type:"render",render:()=>e(h,{size:"large",quaternary:!0,tag:"a",href:"https://oss.dayaedu.com/daya-docs/%E8%AF%BE%E5%90%8E%E8%AE%AD%E7%BB%83%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx",download:!0},{default:()=>[c("\u8BFE\u540E\u8BAD\u7EC3\u6A21\u677F")]})}]},{default:()=>[ge(e(h,{type:"primary"},{default:()=>[c("\u4E0B\u8F7D\u6A21\u677F")]}),[[me("auth"),"downloadUnitQuiz1702251742292344833"]])]}),e("div",null,[e(Fe,{multiple:!1,ref:a=>l.importRef=a,showFileList:!1,accept:".xlsx",customRequest:L},{default:()=>[e(pe,{size:"huge",trigger:"hover",options:[{label:"\u8BFE\u4EF6",key:"COURSEWARE"},{label:"\u5355\u5143\u6D4B\u9A8C",key:"EXAMINATION"},{label:"\u8BFE\u540E\u8BAD\u7EC3",key:"HOMEWORK"},{label:"\u7D20\u6750\u5173\u8054\u66F2\u76EE",key:"COURSEWARE_REF_MATERIAL"}],onSelect:a=>{var T,_;l.dataType=a,console.log(l.importRef),(T=l.importRef)==null||T.clear(),(_=l.importRef)==null||_.openOpenFileDialog()}},{default:()=>[e(h,{type:"primary",onClick:a=>a.stopPropagation()},{default:()=>[c("\u5BFC\u5165\u6570\u636E")]})]})]})])]})]}),e(Ie,{class:G.title,title:"\u6559\u5B66\u5185\u5BB9"},null),e(_e,{xGap:12,yGap:8,cols:3},qa(y=g.dataList.map(a=>{const T=g.mapperList.find(_=>_.parentCoursewareDetailId==a.id);return e(W,null,[e(fe,null,{default:()=>[e(ye,{style:{"--n-padding-top":"5px","--n-padding-bottom":"5px",height:"100%"}},{header:()=>e("div",null,[a.name,a.level&&e("span",{style:"color: red"},[c("("),a.level,c(")")])]),default:()=>{var _;return e("div",null,[e("div",{style:"margin-bottom: 12px;text-overflow: ellipsis;-webkit-line-clamp: 3;line-break: anywhere;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;"},[a.lessonTargetDesc]),e("table",{style:{width:"100%"}},[e("tr",null,[e("td",null,[c("\u5EFA\u8BAE\u5B66\u4E60\u65F6\u957F")]),e("td",{style:{"text-align":"right"}},[a.lessonDurationSecond||"0",c("s")])]),e("tr",null,[e("td",null,[c("\u77E5\u8BC6\u70B9")]),e("td",{style:{"text-align":"right"}},[((_=a.knowledgePointIds)==null?void 0:_.split(",").filter(Boolean).length)||0,c("\u4E2A")])]),e("tr",null,[e("td",null,[c("\u8BFE\u540E\u4F5C\u4E1A")]),e("td",{style:{"text-align":"right"}},[a.lessonTrainingId?e(W,null,[e(da,{authLink:"afterClassTrainingManage1599968711187746818",to:{path:"/afterClassTrainingManage",query:{id:a.lessonTrainingId}}},{default:()=>[a.lessonTrainingName]}),e(R,null,{default:()=>"\u5220\u9664",trigger:()=>ge(e(h,{quaternary:!0,size:"small",circle:!0,onClick:()=>U(a)},{default:()=>[e(H,{component:e(Ce,null,null)},null)]}),[[me("auth"),"lessonCoursewareDetail/removeTraining1793827126242213890"]])})]):"\u65E0"])])])])},"header-extra":()=>e(W,null,[e(R,null,{default:()=>a.lockFlag?"\u89E3\u9501":"\u9501\u5B9A",trigger:()=>e(h,{disabled:!!t.query.isLook,quaternary:!0,circle:!0,onClick:()=>S(a)},{default:()=>[e(H,{component:a.lockFlag?e(ba,null,null):e(Da,null,null)},null)]})}),e(R,null,{default:()=>"\u7F16\u8F91",trigger:()=>e(h,{disabled:!!t.query.isLook,quaternary:!0,circle:!0,onClick:()=>{var _;s.name=a.name,s.lessonTargetDesc=a.lessonTargetDesc,s.id=a.id,s.lockEnable=a.lockEnable+"",s.accessScope=(_=a.accessScope)!=null?_:0,s.level=a.level,o(a),s.open=!0}},{default:()=>[e(H,{component:e(va,null,null)},null)]})}),e(R,null,{default:()=>"\u5220\u9664",trigger:()=>e(h,{disabled:!!t.query.isLook,quaternary:!0,circle:!0,onClick:()=>m(a)},{default:()=>[e(H,{component:e(Ce,null,null)},null)]})})]),action:()=>e(D,{justify:"space-around"},{default:()=>[e(h,{text:!0,disabled:!!t.query.isLook,onClick:()=>{C.title=a.name,C.open=!0,C.item=a}},{default:()=>[c("\u9009\u62E9\u77E5\u8BC6\u70B9")]}),e(h,{text:!0,disabled:!!t.query.isLook,onClick:()=>{s.id=a.id,s.lessonTargetDesc=a.lessonTargetDesc,s.name=a.name,d.open=!0}},{default:()=>[c("\u9009\u62E9\u8BFE\u540E\u4F5C\u4E1A")]})]})})]}),T&&e(fe,null,{default:()=>[e(ye,{title:T.name,style:{"--n-padding-top":"5px","--n-padding-bottom":"5px","--n-color":"rgba(238,243,254,1)","--n-action-color":"rgba(238,243,254,1)",height:"100%"}},{default:()=>{var _,oe,ne,re,se,ie;return e("div",null,[e("div",{style:{paddingBottom:"12px"}},[T.desc]),e("table",{style:{width:"100%"}},[e("tr",null,[e("td",null,[c("\u5355\u56E2\u5B66\u751F")]),e("td",{style:{"text-align":"right"}},[((oe=(_=T==null?void 0:T.details)==null?void 0:_[0])==null?void 0:oe.unitExaminationName)||"\u65E0"])]),e("tr",null,[e("td",null,[c("\u53CC\u56E2\u5B66\u751F")]),e("td",{style:{"text-align":"right"}},[((re=(ne=T==null?void 0:T.details)==null?void 0:ne[1])==null?void 0:re.unitExaminationName)||"\u65E0"])]),e("tr",null,[e("td",null,[c("\u591A\u56E2\u5B66\u751F")]),e("td",{style:{"text-align":"right"}},[((ie=(se=T==null?void 0:T.details)==null?void 0:se[2])==null?void 0:ie.unitExaminationName)||"\u65E0"])])])])},action:()=>e(D,{justify:"space-around"},{default:()=>[e(h,{text:!0,disabled:!!t.query.isLook,onClick:()=>{v.open=!0,v.model=T}},{default:()=>[c("\u7F16\u8F91\u9636\u6BB5\u81EA\u6D4B")]})]})})]})])}))?y:{default:()=>[y]})]}),g.dataList.length?null:e(Ae,null,null),e(j,{preset:"dialog",show:s.open,"onUpdate:show":a=>s.open=a,title:s.id?"\u7F16\u8F91\u8BFE\u7A0B":"\u6DFB\u52A0\u8BFE\u7A0B",showIcon:!1,style:"width: 700px"},{default:()=>[e(te,{ref:k,model:s},{default:()=>[e(E,{label:"\u8BFE\u7A0B\u540D\u79F0",required:!0,path:"name",rule:[{required:!0,message:"\u8BF7\u586B\u5199\u8BFE\u7A0B\u540D\u79F0",trigger:["blur","change"]}]},{default:()=>[e(A,{value:s.name,"onUpdate:value":a=>s.name=a},null)]}),e(E,{label:"\u8BFE\u7A0B\u7F16\u53F7",path:"level"},{default:()=>[e(P,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u7F16\u53F7",clearable:!0,value:s.level,"onUpdate:value":a=>s.level=a,options:Q},null)]}),e(E,{label:"\u662F\u5426\u9700\u8981\u89E3\u9501",required:!0,path:"lockEnable",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u89E3\u9501",trigger:["blur","change"]}]},{default:()=>[e(P,{value:s.lockEnable,"onUpdate:value":a=>s.lockEnable=a,options:[{label:"\u662F",value:"true"},{label:"\u5426",value:"false"}],clearable:!0},null)]}),e(E,{label:"\u662F\u5426\u514D\u8D39",required:!0,path:"accessScope",rule:[{type:"number",required:!0,message:"\u8BBE\u7F6E\u662F\u5426\u514D\u8D39",trigger:["blur","change"]}]},{default:()=>[e(P,{value:s.accessScope,"onUpdate:value":a=>s.accessScope=a,options:[{label:"\u662F",value:0},{label:"\u5426",value:1}],clearable:!0},null)]}),e(E,{label:"\u9636\u6BB5\u76EE\u6807",path:"lessonTargetDesc"},{default:()=>[e(A,{type:"textarea",rows:6,value:s.lessonTargetDesc,"onUpdate:value":a=>s.lessonTargetDesc=a,maxlength:1500,showCount:!0},null)]}),e(D,{justify:"end"},{default:()=>[e(h,{onClick:()=>s.open=!1},{default:()=>[c("\u53D6\u6D88")]}),e(h,{type:"primary",onClick:()=>p()},{default:()=>[c("\u786E\u8BA4")]})]})]})]}),e(j,{preset:"dialog",show:d.open,"onUpdate:show":a=>d.open=a,title:"\u9009\u62E9\u8BFE\u540E\u4F5C\u4E1A",showIcon:!1,style:{width:"80vw"}},{default:()=>{var a;return[e(Ba,{courseTypeCode:(a=r.course)==null?void 0:a.courseTypeCode,onHandleSuccess:f},null)]}}),e(Ue,{show:C.open,"onUpdate:show":a=>C.open=a,width:"80vw"},{default:()=>[e(Ne,{title:C.title,closable:!0},{default:()=>{var a;return e(Na,{courseTypeCode:(a=r.course)==null?void 0:a.courseTypeCode,item:C.item,onHandleSuccess:()=>{n()}},null)},footer:()=>e(D,null,{default:()=>[e(h,{onClick:()=>C.open=!1},{default:()=>[c("\u53D6\u6D88")]}),e(h,{type:"primary",onClick:()=>C.open=!1},{default:()=>[c("\u786E\u8BA4")]})]})})]}),e(j,{preset:"dialog",show:v.open,"onUpdate:show":a=>v.open=a,title:(b=v.model)!=null&&b.id?"\u7F16\u8F91\u9636\u6BB5\u81EA\u6D4B":"\u65B0\u589E\u9636\u6BB5\u81EA\u6D4B",showIcon:!1,style:{width:"500px"}},{default:()=>{var a;return[e(Sa,{courseTypeCode:(a=r.course)==null?void 0:a.courseTypeCode,list:g.dataList,item:v.model,onClose:T=>{T&&(n(),I()),v.open=!1}},null)]}})])}}}),Ra=B({name:"createCourseware",emits:["next"],props:{course:{type:Object,default:()=>{}}},setup(r,{emit:w}){const i=z(),u=K(),t=ae(),k=u.query,s=q(!1),p=q(),g=q(Se(ga)),n=F({coverImg:"",orchestraType:"SINGLE_DELIVERY",lessonTargetDesc:"",name:"",courseTypeCode:null,level:null}),I={coverImg:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8BFE\u4EF6\u5C01\u9762",trigger:["blur","change"]}],lessonTargetDesc:[{required:!0,message:"\u8BF7\u586B\u5199\u8BFE\u4EF6\u76EE\u6807",trigger:["blur","change"]}],name:[{required:!0,message:"\u8BF7\u586B\u5199\u8BFE\u4EF6\u540D\u79F0",trigger:["blur","change"]}],courseTypeCode:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u7C7B\u578B",trigger:["blur","change"]}],level:[{required:!0,type:"number",message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u7EA7\u522B",trigger:["blur","change"]}]},o=()=>x(this,null,function*(){if(!!(n.orchestraType&&n.courseTypeCode))try{const{data:f}=yield ta({id:u.query.id,courseTypeCode:n.courseTypeCode,orchestraType:n.orchestraType});Array.isArray(f)&&g.value.forEach(C=>{C.disabled=!!f.includes(C.value)})}catch(f){}}),m=f=>{n.orchestraType!==f&&(n.level=null,n.orchestraType=f,o())};O(()=>{r.course&&(n.coverImg=r.course.coverImg,n.orchestraType=r.course.orchestraType,n.lessonTargetDesc=r.course.lessonTargetDesc,n.name=r.course.name,n.courseTypeCode=r.course.courseTypeCode,n.enableFlag=r.course.enableFlag,n.level=r.course.level,o()),console.log("\u{1F680} ~ props",r.course)}),qe(()=>n.coverImg,()=>{p.value.validate()});const d=f=>{p.value.validate(C=>x(this,null,function*(){var v,S;if(console.log(C),!C){const U=N({},n);let l="";if(k.id){l=U.id=k.id;try{(yield la(U)).code===200&&i.success("\u4FDD\u5B58\u6210\u529F"),f&&w("next")}catch(L){}}else try{const L=yield oa(U);(v=L==null?void 0:L.data)!=null&&v.id&&(i.success("\u4FDD\u5B58\u6210\u529F"),l=(S=L==null?void 0:L.data)==null?void 0:S.id,t.push({path:"coursewareDetail",query:{id:l}}))}catch(L){}}}))};return()=>e("div",{class:G.createCourseware},[e(Y,{show:s.value,"onUpdate:show":f=>s.value=f},{default:()=>[e(te,{ref:p,model:n,rules:I,disabled:!!k.isLook},{default:()=>[e(E,{label:"\u8BFE\u4EF6\u540D\u79F0",path:"name",required:!0},{default:()=>[e(A,{value:n.name,"onUpdate:value":f=>n.name=f},null)]}),e(E,{label:"\u4E50\u56E2\u7C7B\u578B",path:"orchestraType",required:!0},{default:()=>[e(D,null,{default:()=>[e(h,{disabled:!!k.isLook,type:n.orchestraType=="SINGLE_DELIVERY"?"primary":"default",onClick:()=>{m("SINGLE_DELIVERY")}},{default:()=>[c("\u5355\u4EA4\u4ED8\u56E2")]}),e(h,{disabled:!!k.isLook,type:n.orchestraType=="MULTIPLE_DELIVERY"?"primary":"default",onClick:()=>{m("MULTIPLE_DELIVERY")}},{default:()=>[c("\u591A\u4EA4\u4ED8\u5E38\u89C4\u56E2")]}),e(h,{disabled:!!k.isLook,type:n.orchestraType=="MULTIPLE_DELIVERY_SCHOOL"?"primary":"default",onClick:()=>{m("MULTIPLE_DELIVERY_SCHOOL")}},{default:()=>[c("\u591A\u4EA4\u4ED8\u6821\u56E2")]})]})]}),e(E,{label:"\u8BFE\u7A0B\u7C7B\u578B",path:"courseTypeCode",required:!0},{default:()=>[e(P,{disabled:!!u.query.id,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u7C7B\u578B",clearable:!0,filterable:!0,value:n.courseTypeCode,"onUpdate:value":[f=>n.courseTypeCode=f,()=>{n.level=null,o()}],options:ua},null)]}),e(E,{label:"\u8BFE\u7A0B\u7EA7\u522B",path:"level",required:!0},{default:()=>[e(P,{disabled:!(n.orchestraType&&n.courseTypeCode),filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u7EA7\u522B",clearable:!0,value:n.level,"onUpdate:value":f=>n.level=f,options:g.value},null)]}),e(E,{label:"\u6559\u5B66\u76EE\u6807",path:"lessonTargetDesc",required:!0},{default:()=>[e(A,{type:"textarea",rows:4,maxlength:500,placeholder:"\u8BF7\u8F93\u5165\u6559\u5B66\u76EE\u6807",value:n.lessonTargetDesc,"onUpdate:value":f=>n.lessonTargetDesc=f,showCount:!0},null)]}),e(E,{label:"\u6559\u6750\u5C01\u9762",path:"coverImg",required:!0},{default:()=>[e(pa,{disabled:!!k.isLook,path:"courseware/",fileList:n.coverImg,"onUpdate:fileList":f=>n.coverImg=f},null)]}),e(D,null,{default:()=>[e(h,{disabled:!!k.isLook,type:"primary",onClick:()=>d()},{default:()=>[c("\u4FDD \u5B58")]}),k.id&&e(h,{onClick:()=>{d("next")}},{default:()=>[c("\u4E0B\u4E00\u6B65")]})]})]})]})])}}),tt=B({name:"courseware-detail",setup(r,w){const i=K(),u=ae(),t=F({loading:!0,current:1,course:null}),k=n=>{t.current=n},s=fa(),p=()=>{s.closeCurrentTab(i),u.push({path:"/coursewareManage"})},g=()=>x(this,null,function*(){if(!i.query.id){t.loading=!1;return}k(2),t.loading=!0;try{const{data:n}=yield na(i.query.id);t.course=n}catch(n){}t.loading=!1});return O(()=>{g()}),()=>e("div",{class:"system-menu-container"},[e(ya,{"on-back":()=>p(),title:t.course?t.course.name:"\u65B0\u5EFA\u8BFE\u4EF6"},null),e("div",{class:["section-container"]},[e("div",null,[e(Me,{current:t.current,onUpdateCurrent:k},{default:()=>[e(he("n-step"),{title:"\u57FA\u7840\u4FE1\u606F",description:"\u57FA\u7840\u4FE1\u606F\u8BBE\u7F6E"},null),e(he("n-step"),{title:"\u8BFE\u7A0B\u914D\u7F6E",description:"\u8BFE\u4EF6\u53CA\u8BAD\u7EC3\u3001\u6D4B\u9A8C\u914D\u7F6E",disabled:!i.query.id},null)]}),e(Y,{show:t.loading,"onUpdate:show":n=>t.loading=n},{default:()=>[e(Re,{class:G.createWrap,type:"line",value:t.current,"onUpdate:value":n=>t.current=n},{default:()=>[e(we,{name:1},{default:()=>[!t.loading&&e(Ra,{course:t.course,onNext:()=>{g(),k(2)}},null)]}),e(we,{name:2},{default:()=>[!t.loading&&e(Ma,{course:t.course},null)]})]})]})])])])}});export{tt as default};