import{d as H,t as J,q as K,r as c,y as O,c as m,w as W,o as l,b as f,A as v,L as h,g as r,e as u,u as V,aS as X,f as i,F as z,$ as B,c0 as Y,z as y,i as T,a1 as x,bj as Z,k as ee,C as te,an as ae,b3 as se,b4 as oe,p as ne,bl as le,aR as re,_ as ie}from"./index-BeAZaivf.js";/* empty css                 */import{R as ue}from"./ReportParam-S-sbt3ww.js";/* empty css                  *//* empty css                       *//* empty css                 */const ce={class:"container"},de={class:"search-container"},_e={class:"groupTitle"},pe={class:"group-div"},me=["onClick"],fe={class:"div-left"},ve={class:"item-right"},ye=H({__name:"report",setup(be){const P=J();K();const _=c(!1),s=c(""),b=c(P.reportInfo||[]),U=e=>{if(!e)return"";try{return re(e,{pattern:"first",toneType:"none"}).replace(/\s+/g,"").toLowerCase()}catch{return""}},p=(e,t)=>{if(!e||!t)return!1;const a=e.toLowerCase(),d=t.toLowerCase();return a.includes(d)?!0:U(e).includes(d)},D=()=>{k()};O(()=>{D()});const E=m(()=>s.value?C.value.filter(e=>b.value.filter(a=>a.parentid===e.id).some(a=>p(a.name,s.value)||p(a.explain||"",s.value))):C.value),S=m(()=>function(e){const t=b.value.filter(a=>e===a.parentid);return s.value?t.filter(a=>p(a.name,s.value)||p(a.explain||"",s.value)):t}),w=m(()=>function(e){return S.value(e).length}),A=()=>{s.value&&k()},F=()=>{s.value=""};W(s,e=>{e&&k()},{immediate:!0});const C=m(()=>b.value.filter(e=>e.parentid==0)),g=c([]),k=()=>{let e=[];C.value.forEach((t,a)=>{e.push(a)}),g.value=e},L=c(""),N=c(""),M=e=>{e.sid==="7000_001"||e.sid==="6000_006"||["3000_005","3000_008","1000_002","4000_002","1000_001","1000_003","4000_001","4000_003","1000_004","4000_004","2000_001","5000_001","3000_001","3000_003","3000_002","3000_004","3000_006","3000_007","6000_001","6000_002","6000_003","6000_004","6000_005","6000_007","6000_008","6000_009","6000_010"].includes(e.sid)&&(N.value=e.sid,L.value=e.name,_.value=!0)};return(e,t)=>{const a=ee,d=te,R=ae,Q=se,$=oe,j=ne,q=le;return l(),f("div",ce,[_.value?(l(),v(ue,{key:0,modelValue:_.value,"onUpdate:modelValue":t[0]||(t[0]=o=>_.value=o),reportSid:N.value,reportName:L.value},null,8,["modelValue","reportSid","reportName"])):h("",!0),r("div",de,[u(a,{modelValue:s.value,"onUpdate:modelValue":t[1]||(t[1]=o=>s.value=o),placeholder:"搜索报表名称或说明文字，支持简拼搜索（如：库存报表 → kcbb）",clearable:"",class:"search-input","prefix-icon":V(X),onInput:A},null,8,["modelValue","prefix-icon"])]),u($,{modelValue:g.value,"onUpdate:modelValue":t[2]||(t[2]=o=>g.value=o),accordion:!1},{default:i(()=>[(l(!0),f(z,null,B(E.value,(o,I)=>(l(),v(Q,{key:I,title:o.name,name:I},{title:i(()=>[r("div",_e,[u(d,{size:18,color:"#2b71ad"},{default:i(()=>[u(V(Y))]),_:1}),r("span",null,y(o.name),1),s.value&&w.value(o.id)>0?(l(),v(R,{key:0,size:"small",type:"info",class:"count-tag"},{default:i(()=>[T(y(w.value(o.id)),1)]),_:2},1024)):h("",!0)])]),default:i(()=>[r("div",pe,[(l(!0),f(z,null,B(S.value(o.id),(n,G)=>(l(),f("div",{key:G,class:x(["item",{"item-disabled":n.sid==="7000_001"||n.sid==="6000_006"}]),onClick:Ce=>M(n)},[r("div",fe,[u(d,{size:30,color:n.sid==="7000_001"||n.sid==="6000_006"?"#c0c4cc":"#2b71ad"},{default:i(()=>[u(V(Z))]),_:2},1032,["color"])]),r("div",ve,[r("div",{class:x(["div-reportName",{"text-disabled":n.sid==="7000_001"||n.sid==="6000_006"}])},y(n.name),3),r("div",{class:x(["div-reportExplain",{"text-disabled":n.sid==="7000_001"||n.sid==="6000_006"}])},y(n.explain),3)])],10,me))),128))])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"]),s.value&&E.value.length===0?(l(),v(q,{key:1,description:"未找到匹配的报表","image-size":150},{default:i(()=>[u(j,{type:"primary",onClick:F},{default:i(()=>t[3]||(t[3]=[T("清除搜索")])),_:1})]),_:1})):h("",!0)])}}}),Se=ie(ye,[["__scopeId","data-v-b95bc3fd"]]);export{Se as default};
//# sourceMappingURL=report-DDistDa5.js.map
