1 |
- import{d as I,c as e,q as l,a5 as b,F as W,ah as T,ag as N,R as f,r as x,$ as A,o as E,m as v,g as _,aj as S,B as M,b3 as V,e as G}from"./index.5f7ffb46.js";import{O as q}from"./index.7790de2a.js";import{i as L}from"./icon-edit.664c5ff1.js";import{c as U}from"./clock-icon.6fd57365.js";import{q as $}from"./quest-icon.f1b2f4e3.js";import{C}from"./index.abd668f7.js";import{F as R}from"./index.6438a25f.js";import{T as O,a as h}from"./index.6bbd7daa.js";import"./use-tab-status.69b57a37.js";import"./index.99e0cf1f.js";import"./index.61ab9823.js";const j="_lastWrap_nlkfh_1",z="_uniTitle_nlkfh_4",H="_editIcon_nlkfh_14",J="_infoWrap_nlkfh_18",K="_loctionIconWrap_nlkfh_30",P="_wrapValue_nlkfh_37",Q="_heightValue_nlkfh_42",X="_tabsWrap_nlkfh_65",Y="_rankTabs_nlkfh_69",Z="_tabsWrapIcon_nlkfh_76",ee="_DialogTitle_nlkfh_82",ae="_DialogConent_nlkfh_102";var o={lastWrap:j,uniTitle:z,editIcon:H,infoWrap:J,loctionIconWrap:K,wrapValue:P,heightValue:Q,tabsWrap:X,rankTabs:Y,tabsWrapIcon:Z,DialogTitle:ee,DialogConent:ae};const te="_itemWrap_1eb41_1",ue="_titleWrap_1eb41_7",oe="_itemBottom_1eb41_15",le="_itemBottomDot_1eb41_24",se="_dotMain_1eb41_28",ne="_dotSub_1eb41_42",ie="_uniTimeWrap_1eb41_48",re="_uniTimeWrapLeft_1eb41_57",ce="_clockIcon_1eb41_64";var u={itemWrap:te,titleWrap:ue,itemBottom:oe,itemBottomDot:le,dotMain:se,dotSub:ne,uniTimeWrap:ie,uniTimeWrapLeft:re,clockIcon:ce},D=I({props:["item"],name:"newspaper-item",setup(s){const B=()=>{};return()=>{var p,a,i,c,d;return e(W,null,[e("div",null,[e("div",{class:u.itemWrap,onClick:B},[e("div",{class:u.titleWrap},[(p=s.item)==null?void 0:p.unitExaminationName]),e("div",{class:u.itemBottom},[e("div",{class:[u.itemBottomDot,"gridBorderRight"]},[e("p",{class:u.dotMain},[((a=s.item)==null?void 0:a.totalScore)||0]),e("p",{class:u.dotSub},[l(" \u603B\u5206")])]),e("div",{class:[u.itemBottomDot,"gridBorderRight"]},[e("p",{class:u.dotMain,style:{color:"#F67146"}},[((i=s.item)==null?void 0:i.passScore)||0]),e("p",{class:u.dotSub},[l("\u5408\u683C\u5206 ")])]),e("div",{class:u.itemBottomDot},[e("p",{class:u.dotMain},[((c=s.item)==null?void 0:c.questionNum)||0]),e("p",{class:u.dotSub},[l("\u9898\u76EE\u6570\u91CF ")])])]),e("div",{class:u.uniTimeWrap},[e("div",{class:u.uniTimeWrapLeft},[" ",e(b,{name:U,class:u.clockIcon},null),l(" \u6D4B\u9A8C\u65F6\u957F\uFF1A"),e("span",{style:{color:"#F67146"}},[((d=s.item)==null?void 0:d.timeMinutes)||0,l(" ")]),l(" \u5206\u949F")])])])])])}}}),be=I({name:"uni-test",setup(){const s=T(),B=N(),p=f("one"),a=f({}),i=x({loading:!0,list:[],uniDetail:{}}),c=f(!1),d=async()=>{try{const{data:t}=await v.get(_.platformApi+`/classGroup/detail/${a.value.classGroupId}`);a.value.preStudentNum=t.preStudentNum||0}catch(t){console.log(t)}},w=async()=>{try{const{data:t}=await v.post(_.platformApi+"/lessonCoursewareExaminationMapper/detailByCourseId",{requestType:"form",data:{courseScheduleId:s.query.courseScheduleId}});a.value.classGroupId=t.classGroupId,a.value.classGroupName=t.classGroupName,a.value.testName=t.lessonCoursewareExaminationMapperName,a.value.orchestraName=t.orchestraName,a.value.coursewareName=t.lessonCoursewareName,a.value.lessonCoursewareId=t.lessonCoursewareExaminationMapper.lessonCoursewareId,a.value.preStudentNum=t.studentNum||0,a.value.testId=t.lessonCoursewareExaminationMapper.id,(t.lessonCoursewareExaminationMapper.details||[]).forEach(r=>{i.uniDetail[r.level]=r}),console.log(a.value,"forms")}catch(t){console.log(t)}};A(()=>{if(a.value={...JSON.parse(sessionStorage.getItem("unit-create")||"{}")},console.log(a.value),s.query.courseScheduleId)w();else{if(!a.value.classGroupId){E("\u8BF7\u9009\u62E9\u73ED\u7EA7");return}d(),y()}});const y=async()=>{try{(await v.post(_.platformApi+"/lessonCoursewareExaminationMapper/detail",{requestType:"form",data:{lessonCoursewareExaminationMapperId:a.value.testId}})).data.details.forEach(n=>{i.uniDetail[n.level]=n})}catch(t){console.log(t)}},k=async()=>{var t,n;if(!a.value.expiryDate){E("\u8BF7\u8F93\u5165\u622A\u6B62\u65F6\u95F4");return}try{await v.post(_.platformApi+"/classGroupUnitExamination/publishUnitExamination",{hideLoading:!1,data:{classGroupId:a.value.classGroupId,lessonCoursewareExaminationMapperId:a.value.testId,unitExaminationName:`${(t=a.value)==null?void 0:t.coursewareName}-${(n=a.value)==null?void 0:n.testName}`,expiryDate:a.value.expiryDate}}),E("\u521B\u5EFA\u6210\u529F"),sessionStorage.removeItem("unit-create"),s.query.classGroupId?G({api:"back"}):B.replace("/unit-list")}catch(r){console.log(r)}};return()=>{var t,n,r,g,F;return e(W,null,[e("div",{class:o.lastWrap},[e(S,null,null),e("h4",{class:o.uniTitle},[e(b,{name:L,class:o.editIcon},null),(t=a.value)==null?void 0:t.coursewareName,l("-"),(n=a.value)==null?void 0:n.testName]),e("div",{class:o.infoWrap},[e(C,{center:!0,valueClass:o.wrapValue,value:(r=a.value)==null?void 0:r.orchestraName,title:"\u4E50\u56E2",border:!1},null),e(C,{center:!0,valueClass:o.wrapValue,value:(g=a.value)==null?void 0:g.classGroupName,title:"\u73ED\u7EA7",border:!1},null),e(C,{center:!0,class:o.heightValue,valueClass:o.wrapValue,value:(((F=a.value)==null?void 0:F.preStudentNum)||0)+"\u4EBA",title:"\u5B66\u5458\u4EBA\u6570"},null),e(R,{modelValue:a.value.expiryDate,"onUpdate:modelValue":m=>a.value.expiryDate=m,type:"number",placeholder:"\u8BF7\u8F93\u5165\u622A\u6B62\u65E5\u671F","input-align":"right",label:"\u622A\u6B62\u65F6\u95F4"},{extra:()=>e("div",{class:o.loctionIconWrap},[e("span",{style:{color:"#777"}},[l(" \u5929\u540E\u622A\u6B62")])])})]),e("div",{class:o.tabsWrap},[e(b,{class:o.tabsWrapIcon,name:$,size:18,color:"#333",onClick:()=>{c.value=!0}},null),e(O,{active:p.value,"onUpdate:active":m=>p.value=m,class:o.rankTabs,background:"#F8F8F8","title-active-color":"#333333","title-inactive-color":"#777",color:"#FF8057",shrink:!0},{default:()=>[e(h,{name:"one",title:"\u5355\u56E2\u5B66\u5458"},{default:()=>[e(D,{item:i.uniDetail[1]},null)]}),e(h,{name:"two",title:"\u53CC\u56E2\u5B66\u5458"},{default:()=>[e(D,{item:i.uniDetail[2]},null)]}),e(h,{name:"three",title:"\u591A\u56E2\u5B66\u5458"},{default:()=>[e(D,{item:i.uniDetail[3]},null)]})]})]),e(q,{position:"bottom"},{default:()=>[e("div",{class:"btnGroup"},[e(M,{block:!0,round:!0,type:"primary",onClick:k},{default:()=>[l("\u521B\u5EFA\u5B8C\u6210")]})])]}),e(V,{class:"exercisDetailDialog",show:c.value,"onUpdate:show":m=>c.value=m,title:"\u63D0\u793A\u6846",confirmButtonText:"\u6211\u77E5\u9053\u4E86"},{title:()=>e("div",{class:o.DialogTitle},[e("span",null,null),e("p",null,[l("\u5B66\u5458\u5206\u7C7B")])]),default:()=>e("div",{class:o.DialogConent},[e("p",null,[l("\u6839\u636E\u5B66\u5458\u5165\u56E2\u7684\u6279\u6B21\u5BF9\u4E0D\u540C\u8BAD\u7EC3\u9636\u6BB5\u7684\u5B66\u5458\u8FDB\u884C\u5206\u7C7B\uFF0C\u4E0D\u540C\u8BAD\u7EC3\u9636\u6BB5\u7684\u5B66\u5458\u53EF\u5E03\u7F6E\u4E0D\u540C\u6807\u51C6\u7684\u8BFE\u540E\u4F5C\u4E1A\u548C\u9636\u6BB5\u81EA\u6D4B\u5185\u5BB9\u3002")]),e("br",null,null),e("p",null,[l("\u5355\u56E2\u5B66\u5458\uFF1A\u6700\u65B0\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458")]),e("p",null,[l("\u53CC\u56E2\u5B66\u5458\uFF1A\u8F83\u65E9\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458")]),e("p",null,[l("\u591A\u56E2\u5B66\u5458\uFF1A\u6700\u65E9\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458")])])})])])}}});export{be as default};
|