isCollaose-legacy-4389e193.js 14 KB

1
  1. System.register(["./index-legacy-5a4851d5.js","./index-legacy-73b279db.js","./api-legacy-5bc08f7e.js","./Scrollbar-legacy-d22012a6.js"],(function(e,l){"use strict";var t,a,n,i,o,d,s,r,v,u,g,c,m,p,A,w,h,f,_,b,P;return{setters:[e=>{t=e.Y,a=e.d,n=e.b,i=e.e,o=e.r,d=e.q,s=e.f,r=e.N,v=e.g,u=e.k,g=e.h,c=e.W,m=e.al,p=e.X,A=e.j,w=e.b5,h=e.a8,f=e.dn},e=>{_=e.U},e=>{b=e.d},e=>{P=e.N}],execute:function(){var k=document.createElement("style");k.textContent="._container_15dlv_1{min-height:100%;display:flex;flex-direction:column}._container_15dlv_1 .n-base-selection--error-status,._container_15dlv_1 .n-input--error-status{animation:errorRotate .3s ease 3}._closeBtn_15dlv_10{position:absolute;top:-.78125vw;right:-.52083333vw}._closeBtn_15dlv_10 img{width:2.29166667vw;height:2.29166667vw}._topForms_15dlv_19{padding:2.08333333vw 2.08333333vw 0;display:flex;align-items:center}._topForms_15dlv_19 .n-upload{width:10.9375vw!important}._topForms_15dlv_19 .n-upload-trigger.n-upload-trigger--image-card{width:10.9375vw!important;height:15.46875vw!important}._topForms_15dlv_19 .n-upload-file.n-upload-file--image-card-type{width:10.9375vw!important;height:15.46875vw!important;border-radius:.625vw}._topForms_15dlv_19 .n-upload-dragger{border-radius:.625vw;background:#F9FAFD;border:.10416667vw solid #DCE2F1}._topForms_15dlv_19 .n-upload-dragger:hover{border:.10416667vw solid #198CFE}._topForms_15dlv_19 ._uploadContent_15dlv_44 ._iconUpload_15dlv_44{width:3.125vw;height:3.125vw}._topForms_15dlv_19 ._uploadContent_15dlv_44 p{padding-top:1.66666667vw;font-size:.9375rem;color:#9eadd9;line-height:1.30208333vw}._topForms_15dlv_19 ._topFormInput_15dlv_54{margin-left:3.125vw}._menuTitle_15dlv_57{display:flex;align-items:center;padding:1.04166667vw 2.08333333vw;font-size:.9375rem;font-weight:600;color:#131415}._menuTitle_15dlv_57 ._iconMenu_15dlv_65{margin-right:.41666667vw;width:1.25vw;height:1.25vw}._lessonItem_15dlv_70{border-radius:1.04166667vw;background:#F7F9FF;position:relative;margin:0 2.08333333vw 1.25vw;padding:1.25vw 1.35416667vw 0;--n-border: 1px solid #289bff !important}._lessonItem_15dlv_70 .n-input{width:16.66666667vw}._lessonItem_15dlv_70 ._btnGroupAll_15dlv_81{gap:.41666667vw 1.25vw!important}._lessonItem_15dlv_70 ._btnImg_15dlv_84{width:2.60416667vw;height:2.60416667vw}._line_15dlv_88{background-color:#edeef3;width:calc(100% - 4.16666667vw);margin:0 auto;height:1px}._addUnitBtn_15dlv_94{height:2.70833333vw;border-radius:.625vw;margin:1.25vw 2.08333333vw 0;width:calc(100% - 4.16666667vw)!important;background:#E8F4FF}._addUnitBtn_15dlv_94:not(._n-button--disabled_15dlv_101):hover,._addUnitBtn_15dlv_94:not(._n-button--disabled_15dlv_101):active,._addUnitBtn_15dlv_94:not(._n-input--disabled_15dlv_103)._n-input--focus_15dlv_103{background:#E8F4FF}._addUnitBtn_15dlv_94 img{width:.83333333vw;height:.83333333vw}._btnGroup_15dlv_81{padding:2.08333333vw 0}._btnGroup_15dlv_81 .n-button{height:2.44791667vw;min-width:8.125vw}\n",document.head.appendChild(k);const j="_container_15dlv_1",y="_closeBtn_15dlv_10",C="_topForms_15dlv_19",L="_uploadContent_15dlv_44",U="_iconUpload_15dlv_44",F="_topFormInput_15dlv_54",B="_menuTitle_15dlv_57",I="_iconMenu_15dlv_65",R="_lessonItem_15dlv_70",D="_btnGroupAll_15dlv_81",Q="_btnImg_15dlv_84",E="_line_15dlv_88",x="_addUnitBtn_15dlv_94",T="_btnGroup_15dlv_81",q=(e("m",(e=>t.post("/edu-app/material/queryPage",{data:e}))),e("f",(e=>t.post("/edu-app/material/favorite",{data:e}))),e("e",(e=>t.post("/edu-app/material/remove",{requestType:"form",data:e}))),e("c",(e=>t.post("/edu-app/material/save",{data:e}))),e("b",(e=>t.post("/edu-app/material/updateAll",{data:e}))),e("d",(e=>t.post("/edu-app/material/removeAll",{data:e}))),e("a",""+new URL("icon-add-e1bd484b.svg",l.meta.url).href)),O=""+new URL("btn-add-ed51c33d.svg",l.meta.url).href,N=""+new URL("btn-delete-3a352649.svg",l.meta.url).href,z=""+new URL("btn-up-4013c910.svg",l.meta.url).href,S=""+new URL("btn-down-1fcdd4f7.svg",l.meta.url).href,K=""+new URL("btn-remove-405e9f91.svg",l.meta.url).href;function Z(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!w(e)}const G=e("B",{grades:[{label:"一年级",value:1},{label:"二年级",value:2},{label:"三年级",value:3},{label:"四年级",value:4},{label:"五年级",value:5},{label:"六年级",value:6},{label:"七年级",value:7},{label:"八年级",value:8},{label:"九年级",value:9}],bookTypes:[{label:"上册",value:"LAST"},{label:"下册",value:"NEXT"}]}),M=()=>({key:"item"+Date.now(),name:"",lessonTargetDesc:"",knowledgeList:[{key:Date.now()+"0",name:""}]}),H=()=>({id:null,name:"",currentGradeNum:null,coverImg:"",enableFlag:!0,type:"COURSEWARE",lessonList:[M()]});e("A",a({name:"addNatural",props:{item:{type:Object,default:()=>({})}},emits:["close","confirm"],setup(e,{emit:l}){const a=n(),w=i({uploading:!1}),k=o(),Y=i(H()),V=async()=>{w.uploading=!0;try{await(n=Y,t.post("/edu-app/lessonCourseware/save",{data:n})),Object.assign(Y,H()),a.success(e.item.id?"保存成功":"添加成功"),l("close",!0),l("confirm")}catch{}var n;w.uploading=!1};return d((async()=>{if(e.item.id){const{data:l}=await b({id:e.item.id});Y.id=l.id,Y.name=l.name,Y.currentGradeNum=l.currentGradeNum,Y.coverImg=l.coverImg,Y.lessonList=[];const t=l.lessonList||[],a=[];t.forEach((e=>{const l={id:e.id,key:"item"+Date.now()+"-"+100*Math.random(),name:e.name,lessonTargetDesc:e.lessonTargetDesc,knowledgeList:[]};e.knowledgeList&&e.knowledgeList.length&&e.knowledgeList.forEach((e=>{l.knowledgeList.push({id:e.id,key:Date.now()+"-"+100*Math.random(),name:e.name})})),a.push(l)})),Y.lessonList=a}})),()=>{let e;return s("div",{class:j},[s(P,{style:{"max-height":"65vh"}},{default:()=>[s(r,{ref:k,labelPlacement:"left",labelWidth:120,model:Y},{default:()=>[s("div",{class:C},[s(v,{path:"coverImg",rule:[{required:!0,message:"请上传教材封面",trigger:["change"]}]},{default:()=>[s(_,{cropper:!0,fileList:Y.coverImg,"onUpdate:fileList":e=>Y.coverImg=e,showType:"custom",size:2,accept:".jpg,jpeg,.png",options:{autoCropWidth:210,autoCropHeight:297,fixedBox:!0}},{custom:()=>s("div",{class:L},[s("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAAAdVBMVEUAAAAajP8ajf8ajf8Zjf8bj/8cj/8ej/8aj/8ZjP8ajf8Zjf8Zjf8ajv8bjv8imf8ajf8ZjP8Zjf8Zjf8ajP8Zjf8ajf8bjf8ajf8cj/8ajP8cjv9Av/8ZjP7///+Wyv7o8/7R6P6k0f4ok/5jsf7P5v5ksf6AAsC8AAAAHXRSTlMA7MX44Ek2KlX8uqSZYxwH7+fSy7Ksi3trQBQSBEplAkUAAAJ+SURBVGjevNVXjuNADEXRV8ml2HLOz7ln/0uchv0xwMhNuSzRZwMXoEQWkjUxW5WFnXrjnPFTW5SrLDbQFdcLn/OJ3C/WETq2dTmhaFLWWwysyeaOL3DzbMipj6oxXzauRhjGpmCiYoP+guUbbOg75BnfNOsz8F3FHqod3lQb9mJqvOPLsjf7hWTBcAAmIM1+yYEs9/3HrD/u6DkgH19eXsNBmRdXOjgOzAW8IMs5uDxDp5BTQR46v6+jCjeCKBoqMVHcX081XtjnvaUiu8dvllS1xC8ClQU89WWozDz/zJbqLJ6o+QE1WnaGH2B2rXDFj6hap5If8v/pnPFDZsIK6woJq6S3Uhumu15Op8uV6Tb4p2C68+HHmemKfr/0n8PdjelGvXb4+AgfKZJ3uRmzRTM8bvCQUaAQZoaHOQUa4Tnuto4CjbDbCu/hIGH5dSwp0AmX9/CEAp3wBD8iBUphRgBrCrTCawALCrTCCwCeAq2wB5qcAq1w3iBSoBZmlA61ZjjDigK98Eq6W5rhEgUFeuEClgK9sMWU3W7Htu9H+PvYdmO3KTy7XM+HROcru3gYdrkckl3YxcCxyyk9fGIX97d7M7kBEAZiYA/8+dJ/iZSAgNgzGxpAinJ47TH2Y2ypuc11nM/fFThO2AWCXZnYI4E9i5gQwKQPJvYoeYsJemyEwYY2akzFBnPMisDMF8puwgw2zFKkTFTeNi4b5YZooBqGOOKfYuBlifhqoaYnxi0F16aovgInuHCMPIDiQ27CkJERq0qCZFZ0LgULmvHIBBBqR2BXQ78TMOeFYPcclH0JvD+trvCzoDGzkvK1hDO7dvS2aLVHtSxQpqPqgzdYI/tnm7bT0QAAAABJRU5ErkJggg==",class:U},null),s("p",null,[u("请上传教材封面")])])})]}),s("div",{class:F},[s(v,{style:{minWidth:"360px"},path:"name",rule:[{required:!0,message:"请输入教材名称",trigger:["blur","change"]}]},{default:()=>[s(g,{placeholder:"请输入教材名称",maxlength:25,value:Y.name,"onUpdate:value":e=>Y.name=e,clearable:!0},null)]}),s(v,{path:"currentGradeNum",rule:{required:!0,message:"请选择年级",trigger:"change",type:"number"}},{default:()=>[s(c,{style:{minWidth:"360px"},placeholder:"请选择年级",options:G.grades,value:Y.currentGradeNum,"onUpdate:value":e=>Y.currentGradeNum=e,clearable:!0,filterable:!0},null)]})])]),s("div",{class:B},[s("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAABlVBMVEUAAAAOjP8Pjv8wuP8QkP84xP8Ihv8wuf8wuf8RkP84wv8Jhv8xuf8Rj/8ipv84w/8ipv8iqP8yvP8orv85w/8Jhv8kqv8gpf8dn/82wP8Ymf8MiP8Skf8Pj/8zvP8vt/8Ojf8pr/8Ymv8kqf8doP8UlP8PjP85w/8cnf8mrP81v/8ss/8Xlf8Oiv8gpf8pr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7o+NtjKRbcWIC3QCuB8MAoQ+neSf9C32d6IUnpgqp+oMdAyEGDHAfLYEO4UhRw40P93lm9L2Sv4APmxhcNF2OB2J7yk/9QdHOQHG7aKRKkd9qnywdv8DT+BJz/hra0u0UN+9pEPKmnMzoms7Ek2++vOo/OuVK8oOzDuHwem/cDAFCAPzEv7Id7lKheVwBv/QDLQFAhPUvqBBt+weA+BIP2gxseNvBYIG/O+KjGRgHlzAsQHwIPRfohP+XxTYm6HAwe48hUrk8lc0YPk/RO/hXzAJOqR1/xnbniTNxnWZ95FfKBAiAb5gg2HS3Og2Q80AN8hhOiT/q8Nx1JfjM6nSD9QAQ0zHFCY9zqt1t01+0FDpI/80VETNCw0yEDTvdRA0wuW+1H5kiUBNfYw0BZe0IZ+sBQ2AH/8SWDV6g9M/rHYP/E0L/LH84JqAA9MD4x5DhAackkeRqaqa0ZDMhD8gIGneyEfAL6kQGhVjfOyHzxYUt8PBchH+scmodd0XA2Qxi/nLAj5JmGo6pZdqQ94Ll/C+jzHIA/MA8jAoaEK9i+rdrQVeAqEPLA6b8nHeZGvFmf72x8ELoWB6KhoWhJPV4Fpsmqo/HVnUVFXb/lw1ZTpsZX/jMp0mWZohN0AAAAASUVORK5CYII=",class:I},null),u("目录")]),s(m,{name:"list",tag:"div"},Z(e=Y.lessonList.map(((e,l)=>{let t;return s(p,{class:R,wrap:!1,wrapItem:!1,align:"start",key:e.key},{default:()=>[s(v,{label:"单元名称",labelPlacement:"top",path:`lessonList[${l}].name`,rule:{required:!0,message:"填写单元名称",trigger:["blur","change"]}},{default:()=>[s(g,{placeholder:"填写单元名称",maxlength:25,value:e.name,"onUpdate:value":l=>e.name=l,clearable:!0},null)]}),s(m,{name:"list",tag:"div"},Z(t=e.knowledgeList.map(((t,a)=>s(v,{style:{"--n-label-height":0===a?"26px":"0"},labelPlacement:"top",label:0===a?"章节名称":"",key:t.key,path:`lessonList[${l}].knowledgeList[${a}].name`,rule:{required:!0,message:"填写章节名称",trigger:["blur","change"]}},{default:()=>[s(p,{wrap:!1,align:"center",class:D,wrapItem:!1},{default:()=>[s(g,{maxlength:25,placeholder:"填写章节名称",value:t.name,"onUpdate:value":e=>t.name=e,clearable:!0},null),s(A,{quaternary:!0,circle:!0,onClick:()=>{e.knowledgeList.splice(a+1,0,{name:"",key:Date.now()+""+a})}},{icon:()=>s("img",{src:O,class:Q},null)}),s(A,{quaternary:!0,circle:!0,disabled:e.knowledgeList.length<2,onClick:()=>{e.knowledgeList.splice(a,1)}},{icon:()=>s("img",{src:N,class:Q},null)}),s(A,{quaternary:!0,circle:!0,disabled:0===a,onClick:()=>{if(0===a)return;const l=e.knowledgeList[a-1];e.knowledgeList[a-1]=e.knowledgeList[a],e.knowledgeList[a]=l}},{icon:()=>s("img",{src:z,class:Q},null)}),s(A,{quaternary:!0,circle:!0,disabled:a===e.knowledgeList.length-1,onClick:()=>{if(a===e.knowledgeList.length-1)return;const l=e.knowledgeList[a+1];e.knowledgeList[a+1]=e.knowledgeList[a],e.knowledgeList[a]=l}},{icon:()=>s("img",{src:S,class:Q},null)})]})]}))))?t:{default:()=>[t]}),s(A,{class:y,secondary:!0,circle:!0,size:"small",disabled:Y.lessonList.length<2,onClick:()=>{Y.lessonList.splice(l,1)}},{default:()=>[s("img",{src:K},null)]})]})})))?e:{default:()=>[e]}),s("div",{class:E},null),s(A,{block:!0,class:x,ghost:!0,color:"#198CFE",onClick:()=>{Y.lessonList.push(M())}},{icon:()=>s("img",{src:q},null),default:()=>"新增单元"})]})]}),s(p,{class:T,justify:"center"},{default:()=>[s(A,{round:!0,onClick:()=>l("close")},{default:()=>[u("取消")]}),s(A,{round:!0,loading:w.uploading,type:"primary",onClick:()=>{k.value?.validate((e=>{e?h(f):V()}))}},{default:()=>[u("保存")]})]})])}}})),e("i","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABPFJREFUeF7tm01sG0UUx///9cbxrhUJRA23tumhoAa4UDg0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