import{d as m,P as A,q as h,r as b,x as k,y as w,a as e,W as v,R as C,S,A as r,a2 as y,C as B,a3 as E,D as P,E as T}from"./index-521a9826.js";import{M as d}from"./index-c0ea6da9.js";import{C as _,a as F}from"./index-f6f96797.js";import{L as M}from"./index-b1810e0a.js";import{C as x}from"./index-9b272659.js";import{C as O}from"./index-1ad6a58d.js";import{I as R}from"./index-25b5c9d0.js";import"./index-fdaad3c0.js";import"./Checker-1ada2d85.js";import"./use-tab-status-da6d8e9f.js";const z="_woringBook_1no5g_1",I="_woringHeader_1no5g_9",K="_leftArrow_1no5g_14",U="_title_1no5g_17",X="_woringSecgtion_1no5g_40",q="_emptyContainer_1no5g_48",H="_cell_1no5g_75",J="_iconImg_1no5g_78",L="_cellTitle_1no5g_83",D="_cellContent_1no5g_93",o={woringBook:z,woringHeader:I,leftArrow:K,title:U,woringSecgtion:X,emptyContainer:q,cell:H,iconImg:J,cellTitle:L,cellContent:D},j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAABOCAMAAAC5dNAvAAABX1BMVEUAAADn8//w6er//+3869v/6tXn9P/n9P/n8//o8//+69fn8//96tfq9f//7Njo9f/+69ro9f/77d3/6tTn8//96tb67Nz/6tPo8//n8/8crPH669zl8v7769r86tj+6tb/6dT269/u8PL47ODy7+ro8v3v8PD27eP369707ujv7+3s8ffq8vj5697/so//tpT/wqL/qIPt8fTz7eX17eX/yKn/wJ/q8vr/o3z/qoX/tJH/vp3/oXr/pH/o8fn////x7+3/uJb/xqb/vJv/rYn/n3j/xKT/p4D+nnf/rIj/upjm8vzK3uP/sIz/r4v/u5r/yav6075Jrd1Jq9qd0+n/3MyZ1PGb0+3/3tD/yqzp8PX/4tRJr9/r6uzx7en07OL/y6yY1fPs6OhHue3w4dsrsfBSvO3z3dH12Mn8ya79waP/y63d7fjP6PfA4/bL3uXa5OLO4OLp6OFAqt2uo6KtnXa4AAAAGXRSTlMA6hAF6ur46JKEhICAVFRMTMXFxaiokpLFgycpDwAAA+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v0FqWu295/0XGosUkQgs1zmIl+Mvh4husMBo8x71tgWm5PYfI2ZgiE62Kv6c6ml4mlr4ulrLO/b9aaL0t4Ul9F+WD9+7CzcWH3cdchRk/nsfND030f6bitEzhEK7jcEur8Eltz54Bzl9EZ7TyUorYpPW9RCpWNKIFaZVMDKOj3ro4i3pl6ai4KkOaaSQNWbcSa0SEtr/B10hmc4FT6bxV+NFL3uqfSPF3jwRXkXGsmG3iKWva7ybpAqGwvR7lj1fHSllh8AMtbwifpv+6wAAAAAElFTkSuQmCC";function V(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!E(s)}const nt=m({name:"wroing-book",setup(){const s=A(),l=h(),c=b([]),t=k({type:s.query.type,list:[],checked:[],isClick:!1,listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20}}),u=async()=>{try{if(t.isClick)return;t.isClick=!0;const a=await P.post("/edu-app/knowledgePoint/list ",{data:{...t.params}});t.listState.loading=!1;const n=a.data||{};if(t.list.length>0&&n.current===1)return;t.list=t.list.concat(n.rows||[]),t.listState.finished=n.current>=n.pages,t.params.page=n.current+1,t.listState.dataShow=t.list.length>0,t.isClick=!1}catch(a){t.listState.dataShow=!1,t.listState.finished=!0,t.isClick=!1}},f=a=>{c.value[a].toggle()},g=()=>{try{if(t.checked.length<=0){T("请选择知识点");return}t.type==="TEST"?l.push({path:"/examination-mode",query:{knowledgePointIds:t.checked.join(",")}}):l.push({path:"/practice-mode",query:{knowledgePointIds:t.checked.join(",")}})}catch(a){}};return w(()=>{u()}),()=>{let a;return e("div",{class:o.woringBook},[e(d,{position:"top"},{default:()=>[e(v,{border:!1,background:"transparent"},{content:()=>e("div",{class:o.woringHeader},[e("i",{onClick:()=>{C().isApp?S({api:"goBack"}):l.back()},class:["van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow",o.leftArrow]},null),e("span",{class:o.title},[e("i",null,null)])])})]}),e("div",{class:o.woringSecgtion},[e("div",{class:o.title},[r("请选择知识点")]),t.listState.dataShow?e(M,{finished:t.listState.finished,finishedText:" ",class:[o.container,o.containerInformation],onLoad:u,immediateCheck:!1},{default:()=>[e(x,{border:!1},{default:()=>[e(_,{modelValue:t.checked,"onUpdate:modelValue":n=>t.checked=n},V(a=t.list.map((n,p)=>e(O,{center:!0,onClick:()=>f(p),class:o.cell},{icon:()=>e(R,{src:j,class:o.iconImg},null),title:()=>e("div",{class:o.cellTitle},[n.name]),label:()=>e("p",{class:o.cellContent},[r("共"),e("span",null,[n.questionNum]),r("道题")]),"right-icon":()=>e(F,{name:n.id,ref:i=>c.value[p]=i,onClick:i=>i.stopPropagation()},null)})))?a:{default:()=>[a]})]})]}):e(y,{description:"暂无知识点"},null)]),e(d,{position:"bottom",varName:"--bottom-height"},{default:()=>[e("div",{class:"btnGroup"},[e(B,{round:!0,block:!0,type:"primary",onClick:g},{default:()=>[r("确认")]})])]})])}}});export{nt as default};