1 |
- import{d as I,c as e,q as s,a5 as D,F as W,aV as T,ag as N,R as B,r as x,$ as S,o as C,m as v,f as _,B as M,aW as A,k as V}from"./index.ffe80dbe.js";import{O as G}from"./index.4ddd16f0.js";import{i as q}from"./icon-edit.664c5ff1.js";import{c as L}from"./clock-icon.6fd57365.js";import{q as U}from"./quest-icon.f1b2f4e3.js";import{C as h}from"./index.ea031708.js";import{F as $}from"./index.92ec0bf4.js";import{T as R,a as E}from"./index.466e527a.js";import"./use-tab-status.5a3cd090.js";import"./index.b4b77b5a.js";import"./index.02edecb1.js";const O="_lastWrap_nlkfh_1",z="_uniTitle_nlkfh_4",J="_editIcon_nlkfh_14",j="_infoWrap_nlkfh_18",H="_loctionIconWrap_nlkfh_30",K="_wrapValue_nlkfh_37",P="_heightValue_nlkfh_42",Q="_tabsWrap_nlkfh_65",X="_rankTabs_nlkfh_69",Y="_tabsWrapIcon_nlkfh_76",Z="_DialogTitle_nlkfh_82",ee="_DialogConent_nlkfh_102";var o={lastWrap:O,uniTitle:z,editIcon:J,infoWrap:j,loctionIconWrap:H,wrapValue:K,heightValue:P,tabsWrap:Q,rankTabs:X,tabsWrapIcon:Y,DialogTitle:Z,DialogConent:ee};const ae="_itemWrap_1eb41_1",te="_titleWrap_1eb41_7",ue="_itemBottom_1eb41_15",oe="_itemBottomDot_1eb41_24",se="_dotMain_1eb41_28",le="_dotSub_1eb41_42",ne="_uniTimeWrap_1eb41_48",ie="_uniTimeWrapLeft_1eb41_57",re="_clockIcon_1eb41_64";var u={itemWrap:ae,titleWrap:te,itemBottom:ue,itemBottomDot:oe,dotMain:se,dotSub:le,uniTimeWrap:ne,uniTimeWrapLeft:ie,clockIcon:re},F=I({props:["item"],name:"newspaper-item",setup(l){const f=()=>{};return()=>{var p,a,i,c,d;return e(W,null,[e("div",null,[e("div",{class:u.itemWrap,onClick:f},[e("div",{class:u.titleWrap},[(p=l.item)==null?void 0:p.unitExaminationName]),e("div",{class:u.itemBottom},[e("div",{class:[u.itemBottomDot,"gridBorderRight"]},[e("p",{class:u.dotMain},[((a=l.item)==null?void 0:a.totalScore)||0]),e("p",{class:u.dotSub},[s(" \u603B\u5206")])]),e("div",{class:[u.itemBottomDot,"gridBorderRight"]},[e("p",{class:u.dotMain,style:{color:"#F67146"}},[((i=l.item)==null?void 0:i.passScore)||0]),e("p",{class:u.dotSub},[s("\u5408\u683C\u5206 ")])]),e("div",{class:u.itemBottomDot},[e("p",{class:u.dotMain},[((c=l.item)==null?void 0:c.questionNum)||0]),e("p",{class:u.dotSub},[s("\u9898\u76EE\u6570\u91CF ")])])]),e("div",{class:u.uniTimeWrap},[e("div",{class:u.uniTimeWrapLeft},[" ",e(D,{name:L,class:u.clockIcon},null),s(" \u6D4B\u9A8C\u65F6\u957F\uFF1A"),e("span",{style:{color:"#F67146"}},[((d=l.item)==null?void 0:d.timeMinutes)||0,s(" ")]),s(" \u5206\u949F")])])])])])}}}),Fe=I({name:"uni-test",setup(){const l=T(),f=N(),p=B("one"),a=B({}),i=x({loading:!0,list:[],uniDetail:{}}),c=B(!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:l.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)}};S(()=>{if(a.value={...JSON.parse(sessionStorage.getItem("unit-create")||"{}")},console.log(a.value),l.query.courseScheduleId)w();else{if(!a.value.classGroupId){C("\u8BF7\u9009\u62E9\u73ED\u7EA7");return}d(),k()}});const k=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)}},y=async()=>{var t,n;if(!a.value.expiryDate){C("\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}}),C("\u521B\u5EFA\u6210\u529F"),sessionStorage.removeItem("unit-create"),l.query.classGroupId?V({api:"back"}):f.replace("/unit-list")}catch(r){console.log(r)}};return()=>{var t,n,r,b,g;return e(W,null,[e("div",{class:o.lastWrap},[e("h4",{class:o.uniTitle},[e(D,{name:q,class:o.editIcon},null),(t=a.value)==null?void 0:t.coursewareName,s("-"),(n=a.value)==null?void 0:n.testName]),e("div",{class:o.infoWrap},[e(h,{center:!0,valueClass:o.wrapValue,value:(r=a.value)==null?void 0:r.orchestraName,title:"\u4E50\u56E2",border:!1},null),e(h,{center:!0,valueClass:o.wrapValue,value:(b=a.value)==null?void 0:b.classGroupName,title:"\u73ED\u7EA7",border:!1},null),e(h,{center:!0,class:o.heightValue,valueClass:o.wrapValue,value:(((g=a.value)==null?void 0:g.preStudentNum)||0)+"\u4EBA",title:"\u5B66\u751F\u4EBA\u6570"},null),e($,{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"}},[s(" \u5929\u540E\u622A\u6B62")])])})]),e("div",{class:o.tabsWrap},[e(D,{class:o.tabsWrapIcon,name:U,size:18,color:"#333",onClick:()=>{c.value=!0}},null),e(R,{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(E,{name:"one",title:"\u5355\u56E2\u5B66\u751F"},{default:()=>[e(F,{item:i.uniDetail[1]},null)]}),e(E,{name:"two",title:"\u53CC\u56E2\u5B66\u751F"},{default:()=>[e(F,{item:i.uniDetail[2]},null)]}),e(E,{name:"three",title:"\u591A\u56E2\u5B66\u751F"},{default:()=>[e(F,{item:i.uniDetail[3]},null)]})]})]),e(G,{position:"bottom"},{default:()=>[e("div",{class:"btnGroup"},[e(M,{block:!0,round:!0,type:"primary",onClick:y},{default:()=>[s("\u521B\u5EFA\u5B8C\u6210")]})])]}),e(A,{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,[s("\u5B66\u751F\u5206\u7C7B")])]),default:()=>e("div",{class:o.DialogConent},[e("p",null,[s("\u6839\u636E\u5B66\u751F\u5165\u56E2\u7684\u6279\u6B21\u5BF9\u4E0D\u540C\u8BAD\u7EC3\u9636\u6BB5\u7684\u5B66\u751F\u8FDB\u884C\u5206\u7C7B\uFF0C\u4E0D\u540C\u8BAD\u7EC3\u9636\u6BB5\u7684\u5B66\u751F\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,[s("\u5355\u56E2\u5B66\u751F\uFF1A\u6700\u65B0\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458")]),e("p",null,[s("\u53CC\u56E2\u5B66\u751F\uFF1A\u8F83\u65E9\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458")]),e("p",null,[s("\u591A\u56E2\u5B66\u751F\uFF1A\u6700\u65E9\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458")])])})])])}}});export{Fe as default};
|