import{request as e}from"@cqsjjb/jjb-common-lib/http.js";import{useState as i,useEffect as t}from"react";import{DICTIONARY_APP_KEY_ENUM as r}from"../../../../enum/dictionary/index.js";import a from"../../Basic/index.js";import{jsx as d}from"react/jsx-runtime";function c(c){const{isShowNeglect:l=!0,isShowLarger:n=!0,isShowMajor:o=!0,...s}=c,[m,h]=i([]);return t(()=>{(async()=>{h([]);const{data:i}=await e("/config/dict-trees/list/by/dictValues","get",{appKey:r.GWJ,dictValue:"hiddenLevel"}),t=(e=>{const i=e=>e&&Array.isArray(e)?e.filter(e=>"hiddenLevel1001"===e.dictValue?l:"jdyh001"===e.dictValue?n:"hiddenLevel0002"===e.dictValue?o:(e.children&&e.children.length>0&&(e.children=i(e.children)),!0)):[];return i(e)})(i);h(t)})()},[]),d(a,{treeData:m,placeholder:"隐患级别",onlyLastLevel:!0,nameKey:"dictLabel",idKey:"dictValue",...s})}c.displayName="HiddenLevelSelectTree";export{c as default};
