1 |
- import{d as m,aV as p,ag as g,e as _,R as v,r as f,$ as y,c as e,q as n,a5 as I,ai as q,ak as k,m as N,f as T}from"./index.ffe80dbe.js";import{i as C}from"./icon-course.310d3f1d.js";import{G as S,a as h}from"./index.72ca63b9.js";const b="_grid_14l1q_1",G="_gridItem_14l1q_8",O="_cover_14l1q_15",w="_title_14l1q_27",x="_coreTitle_14l1q_32",F="_num_14l1q_38",V="_playIcon_14l1q_54",j="_look_14l1q_58";var o={grid:b,gridItem:G,cover:O,title:w,coreTitle:x,num:F,playIcon:V,look:j},E="./assets/look.565abde8.svg";function L(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!k(s)}var B=m({name:"uni-test",setup(){const s=p(),u=g();_();const a=v({}),r=f({loading:!0,list:[]}),c=async()=>{r.loading=!0;try{const t=await N.post(T.platformApi+"/courseSchedule/queryUnitExamination",{requestType:"form",data:{lessonCoursewareId:s.query.lessonCoursewareId,classGroupId:a.value.classGroupId}});r.list=t.data||[]}catch{}r.loading=!1};y(()=>{a.value={...JSON.parse(sessionStorage.getItem("unit-create")||"{}")},c()});const i=async t=>{if(s.query.code==="select"){console.log("\u9009\u62E9\u8BFE\u65F6");return}a.value.testName=t.name,a.value.testId=t.id,sessionStorage.setItem("unit-create",JSON.stringify(a.value)),u.push({path:"/uni-last"})};return()=>{let t;return e("div",{style:{paddingTop:"14px"}},[r.list.length>0?e(S,{gutter:14,columnNum:3,class:o.grid},L(t=r.list.map(l=>e(h,null,{default:()=>[e("div",{class:o.gridItem,onClick:()=>i(l)},[e("img",{src:C,class:o.cover},null),e("div",{class:o.title},[e("div",{class:o.coreTitle},[l.name]),e("div",null,[n("\u5DF2\u4F7F\u7528 "),l.useNum,n(" \u6B21")])]),!l.unLockFlag&&e("div",{class:o.look,onClick:d=>d.stopPropagation()},[e(I,{name:E},null),n(" \u672A\u89E3\u9501")])])]})))?t:{default:()=>[t]}):e(q,null,null)])}}});export{B as default};
|