1 |
- import{c as A,d as h,aa as y,w as v,Y as w,a3 as C,a as t,n as b,ab as x,ac as V,t as _,ad as O,e as S,ae as F,h as T,k as P,q as M,r as z,x as K,y as R,S as U,R as X,a6 as G,A as m,a1 as I,C as H,a2 as D,D as J,E as q}from"./index-5e5e4ebc.js";import{M as k}from"./index-9096eaf6.js";import{c as j,s as L}from"./Checker-d0f399df.js";import{C as N}from"./index-9827a1cb.js";import{C as Q}from"./index-4bcfa431.js";import{I as Y}from"./index-fa23aaeb.js";import"./index-572087e5.js";const[E,W]=A("checkbox-group"),Z={max:b,disabled:Boolean,iconSize:b,direction:String,modelValue:x(),checkedColor:String},B=Symbol(E);var $=h({name:E,props:Z,emits:["change","update:modelValue"],setup(o,{emit:u,slots:a}){const{children:l,linkChildren:g}=y(B),d=e=>u("update:modelValue",e),n=(e={})=>{typeof e=="boolean"&&(e={checked:e});const{checked:r,skipDisabled:p}=e,i=l.filter(s=>s.props.bindGroup?s.props.disabled&&p?s.checked.value:r!=null?r:!s.checked.value:!1).map(s=>s.name);d(i)};return v(()=>o.modelValue,e=>u("change",e)),w({toggleAll:n}),C(()=>o.modelValue),g({props:o,updateValue:d}),()=>{var e;return t("div",{class:W([o.direction])},[(e=a.default)==null?void 0:e.call(a)])}}});const[ee,te]=A("checkbox"),oe=V({},j,{bindGroup:_});var ae=h({name:ee,props:oe,emits:["change","update:modelValue"],setup(o,{emit:u,slots:a}){const{parent:l}=O(B),g=e=>{const{name:r}=o,{max:p,modelValue:f}=l.props,i=f.slice();if(e)!(p&&i.length>=+p)&&!i.includes(r)&&(i.push(r),o.bindGroup&&l.updateValue(i));else{const s=i.indexOf(r);s!==-1&&(i.splice(s,1),o.bindGroup&&l.updateValue(i))}},d=S(()=>l&&o.bindGroup?l.props.modelValue.indexOf(o.name)!==-1:!!o.modelValue),n=(e=!d.value)=>{l&&o.bindGroup?g(e):u("update:modelValue",e)};return v(()=>o.modelValue,e=>u("change",e)),w({toggle:n,props:o,checked:d}),C(()=>o.modelValue),()=>t(L,T({bem:te,role:"checkbox",parent:l,checked:d.value,onToggle:n},o),F(a,["default","icon"]))}});const ne=P(ae),le=P($),ce="_woringBook_1ig9h_1",se="_woringHeader_1ig9h_9",re="_leftArrow_1ig9h_14",ie="_title_1ig9h_17",ue="_woringSecgtion_1ig9h_40",de="_emptyContainer_1ig9h_48",pe="_cell_1ig9h_75",ge="_iconImg_1ig9h_78",me="_cellTitle_1ig9h_83",he="_cellContent_1ig9h_93",c={woringBook:ce,woringHeader:se,leftArrow:re,title:ie,woringSecgtion:ue,emptyContainer:de,cell:pe,iconImg:ge,cellTitle:me,cellContent:he},fe="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+xJREFUWMPU0UEKhDAUA9D8FtpKKaXgYgJzqTnA7AbG+59AEBTtTs3Gt08IBBtfU7PAk4K1VD16Lhsvs+xwUCJviQU7A28bsBkpMHbbRPsKRcryaaRIdAAyZTLgjTLmUSlUkSiU8KJQg1HIECgUQKmu7n3S8+t+n9X0/+7D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3ro4i3pl6ai4KkOaaSQNWbcSa0SEtr/B10hmc4FT6bxV+NFL3uqfSPF3jwRXkXGsmG3iKWva7ybpAqGwvR7lj1fHSllh8AMtbwifpv+6wAAAAAElFTkSuQmCC";function be(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!D(o)}const Be=h({name:"wroing-book",setup(){const o=M(),u=z([]),a=K({loading:!1,list:[],checked:[]}),l=async()=>{a.loading=!0;try{const{data:n}=await J.post("/edu-app/knowledgePoint/studentPage");a.list=n||[]}catch(n){}a.loading=!1},g=n=>{u.value[n].toggle()},d=()=>{try{if(a.checked.length<=0){q("请选择练习知识点");return}o.push({path:"/examination-mode",query:{type:"ai",knowledgePointIds:a.checked.join(",")}})}catch(n){}};return R(()=>{l()}),()=>{let n;return t("div",{class:c.woringBook},[t(k,{position:"top"},{default:()=>[t(U,{border:!1,background:"transparent"},{content:()=>t("div",{class:c.woringHeader},[t("i",{onClick:()=>{X().isApp?G({api:"goBack"}):o.back()},class:["van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow",c.leftArrow]},null),t("span",{class:c.title},[t("i",null,null)])])})]}),t("div",{class:c.woringSecgtion},[t("div",{class:c.title},[m("请选择练习知识点")]),t(N,{border:!1},{default:()=>[t(le,{modelValue:a.checked,"onUpdate:modelValue":e=>a.checked=e},be(n=a.list.map((e,r)=>t(Q,{center:!0,onClick:()=>g(r),class:c.cell},{icon:()=>t(Y,{src:fe,class:c.iconImg},null),title:()=>t("div",{class:c.cellTitle},[e.name]),label:()=>t("p",{class:c.cellContent},[t("span",null,[e.questionNum]),m("道错题")]),"right-icon":()=>t(ne,{name:e.pointId,ref:p=>u.value[r]=p,onClick:p=>p.stopPropagation()},null)})))?n:{default:()=>[n]}),a.list.length<=0&&!a.loading&&t("div",{class:c.emptyContainer},[t(I,{description:"暂无知识点"},null)])]})]),t(k,{position:"bottom",varName:"--bottom-height"},{default:()=>[t("div",{class:"btnGroup"},[t(H,{round:!0,block:!0,type:"primary",onClick:d},{default:()=>[m("确认")]})])]})])}}});export{Be as default};
|