zy-react-library 2.2.16 → 2.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -21
- package/components/Excel/index.js +1 -1
- package/components/Pdf/index.js +1 -1
- package/components/PreviewImg/index.js +1 -1
- package/components/Video/index.js +1 -1
- package/components/Word/index.js +1 -1
- package/hooks/useDownloadFile/index.js +1 -1
- package/package.json +1 -1
- package/regular/index.d.ts +4 -0
- package/regular/index.js +1 -1
- package/components/SelectTree/HiddenLevel/Gwj/index.d.ts +0 -32
- package/components/SelectTree/HiddenLevel/Gwj/index.js +0 -1
package/README.md
CHANGED
|
@@ -224,7 +224,6 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
|
|
224
224
|
| `IndustrySelectTree` | 内部使用 `industry.json`,默认 `nameKey="dict_label"`、`idKey="dict_value"`、`childrenKey="childrenList"`。 |
|
|
225
225
|
| `DepartmentSelectTree` | `params={}`、`placeholder="部门"`、`isNeedCorpInfoId=false`、`isNeedParentId=false`、`searchType="current"`,内部固定 `childrenKey="childrenList"`。 |
|
|
226
226
|
| `DictionarySelectTree` | `appKey="0bb989ecada5470c87635018ece9f327"`、`dictValue=""`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
|
|
227
|
-
| `HiddenLevelSelectTree` | `isShowNeglect=true`、`isShowLarger=true`、`isShowMajor=true`,内部固定 `placeholder="隐患级别"`、`onlyLastLevel=true`、`nameKey="dictLabel"`、`idKey="dictValue"`。 |
|
|
228
227
|
| `HiddenPartSelectTree` | `params={}`、`isNeedCorpInfoId=false`,内部固定 `placeholder="隐患部位"`、`nameKey="hiddenregion"`、`idKey="hiddenregionId"`。 |
|
|
229
228
|
| `BasicCascader` | `getNodePathsIsIncludeOneself=true`、`placeholder=""`、`data=[]`、`nameKey="name"`、`idKey="id"`、`childrenKey="children"`。 |
|
|
230
229
|
| `AreaCascader` | 内部使用 `area.json`,默认 `nameKey="label"`、`idKey="value"`。 |
|
|
@@ -1081,26 +1080,6 @@ import DepartmentSelectTree from "zy-react-library/components/SelectTree/Departm
|
|
|
1081
1080
|
|
|
1082
1081
|
`DepartmentSelectTreeItem`:`id: string`、`name: string`、`childrenList: DepartmentSelectTreeItem[]`。
|
|
1083
1082
|
|
|
1084
|
-
### HiddenLevelSelectTree
|
|
1085
|
-
|
|
1086
|
-
引入:
|
|
1087
|
-
|
|
1088
|
-
```tsx
|
|
1089
|
-
import HiddenLevelSelectTree from "zy-react-library/components/SelectTree/HiddenLevel/Gwj";
|
|
1090
|
-
```
|
|
1091
|
-
|
|
1092
|
-
隐患等级树选择器。
|
|
1093
|
-
|
|
1094
|
-
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|
|
1095
|
-
| --- | --- | --- | --- | --- |
|
|
1096
|
-
| `isShowNeglect` | `boolean` | 否 | `true` | 是否显示可忽略等级。 |
|
|
1097
|
-
| `isShowLarger` | `boolean` | 否 | `true` | 是否显示较大等级。 |
|
|
1098
|
-
| `isShowMajor` | `boolean` | 否 | `true` | 是否显示重大等级。 |
|
|
1099
|
-
| `onGetNodePaths` | `(nodes: HiddenLevelSelectTreeItem[]) => void` | 否 | - | 返回隐患等级节点路径。 |
|
|
1100
|
-
| `onGetData` | `(data: HiddenLevelSelectTreeItem[], processedData: HiddenLevelSelectTreeItem[]) => void` | 否 | - | 返回原始数据和处理后的数据。 |
|
|
1101
|
-
|
|
1102
|
-
`HiddenLevelSelectTreeItem`:`dictValue: string`、`dictLabel: string`、`children: HiddenLevelSelectTreeItem[]`。
|
|
1103
|
-
|
|
1104
1083
|
### HiddenPartSelectTree
|
|
1105
1084
|
|
|
1106
1085
|
引入:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Modal as e,Button as t,message as r,Spin as n}from"antd";import i from"exceljs";import{useRef as o,useState as l,useEffect as c}from"react";import a from"x-data-spreadsheet";import u from"../../hooks/useDownloadFile/index.js";import{
|
|
1
|
+
import{Modal as e,Button as t,message as r,Spin as n}from"antd";import i from"exceljs";import{useRef as o,useState as l,useEffect as c}from"react";import a from"x-data-spreadsheet";import u from"../../hooks/useDownloadFile/index.js";import{HTTP_URL as s}from"../../regular/index.js";import{getFileUrl as d}from"../../utils/index.js";import"x-data-spreadsheet/dist/xspreadsheet.css";import{jsx as h}from"react/jsx-runtime";function m(m){const{visible:p=!1,onCancel:w,file:v,name:g,inline:y=!1,title:C="Excel预览",style:E={},extraButtons:k}=m,I=o(null),j=o(null),T=o(!1),b=d(),[S,D]=l(!1),{downloadFile:M}=u();c(()=>{if(!p&&!y||!v)return;T.current=!1;const e=setTimeout(()=>{(async()=>{D(!0),I.current.innerHTML="";try{const e=await fetch(v.includes(b)||s.test(v)?v:b+v);if(!e.ok)return void r.error("加载 Excel 文件失败");const t=await e.arrayBuffer(),n=new i.Workbook;if(await n.xlsx.load(t),T.current)return;new a(I.current,{mode:"read",showToolbar:!1,showContextmenu:!1,view:{height:()=>I.current?.clientHeight||520,width:()=>I.current?.clientWidth||800}}).loadData(function(e){const t=[];return e.worksheets.forEach(e=>{t.push(function(e){const t={name:e.name,rows:{},cols:{len:e.columnCount||26},merges:e.model?.merges||[]};return e.columns.forEach((e,r)=>{e.width&&(t.cols[r]={width:Math.round(8*e.width)})}),e.eachRow({includeEmpty:!0},(e,r)=>{const n={cells:{}};e.height&&(n.height=Math.round(1.4*e.height)),e.eachCell({includeEmpty:!0},(e,t)=>{n.cells[t-1]={text:f(e)}}),t.rows[r-1]=n}),(t.merges||[]).forEach(e=>{const r=function(e){const[t,r=t]=e.split(":"),n=x(t),i=x(r);return{sri:n.rowIndex,sci:n.colIndex,eri:i.rowIndex,eci:i.colIndex}}(e),n=t.rows[r.sri]?.cells?.[r.sci];n&&(n.merge=[r.eri-r.sri,r.eci-r.sci])}),t}(e))}),t.length>0?t:[{name:"Sheet1",rows:{}}]}(n))}catch{r.error("加载 Excel 文件失败"),w&&w()}finally{T.current||D(!1)}})()},100);return()=>{T.current=!0,I.current&&(I.current.innerHTML=""),e&&clearTimeout(e)}},[p,y,v]);const B=()=>h(n,{spinning:S,children:h("div",{style:{height:"72vh",overflow:"hidden",...E},children:h("div",{ref:I,style:{width:"100%",height:"100%"}})})});return y?B():h("div",{ref:j,children:h(e,{style:{top:100,maxWidth:"calc(100vw - 32px)",paddingBottom:24},open:p,mask:{closable:!1},width:1e3,title:C,onCancel:()=>{w()},getContainer:!1,footer:[h(t,{onClick:()=>{w()},children:"关闭"},"cancel"),h(t,{type:"primary",onClick:()=>{M({url:v,name:g})},children:"下载"},"download"),...k||[]],children:B()})})}function f(e){if(null===e.value||void 0===e.value)return"";if(e.formula)return null===e.result||void 0===e.result?`=${e.formula}`:String(e.result);if(e.text)return e.text;if(e.value instanceof Date)return e.value.toLocaleDateString();if("object"==typeof e.value){if(e.value.text)return e.value.text;if(e.value.richText)return e.value.richText.map(e=>e.text).join("");if(void 0!==e.value.result)return String(e.value.result)}return String(e.value)}function x(e){const t=/^([A-Z]+)(\d+)$/i.exec(e);return t?{rowIndex:Number(t[2])-1,colIndex:(r=t[1],r.toUpperCase().split("").reduce((e,t)=>26*e+t.charCodeAt(0)-64,0)-1)}:{rowIndex:0,colIndex:0};var r}m.displayName="Excel";export{m as default};
|
package/components/Pdf/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFullscreen as e}from"ahooks";import{Modal as t,Button as r,Spin as o,message as
|
|
1
|
+
import{useFullscreen as e}from"ahooks";import{Modal as t,Button as r,Spin as o,message as i}from"antd";import{useState as n,useRef as a}from"react";import{pdfjs as l,Document as c,Page as s}from"react-pdf";import d from"../../hooks/useDownloadFile/index.js";import{HTTP_URL as p}from"../../regular/index.js";import{getFileUrl as m}from"../../utils/index.js";import"react-pdf/dist/Page/AnnotationLayer.css";import"react-pdf/dist/Page/TextLayer.css";import"./index.less";import{jsx as f,Fragment as h}from"react/jsx-runtime";function u(u){const{visible:g=!1,onCancel:x,file:y,name:v,inline:w=!1,title:k="PDF预览",style:b={},extraButtons:L,usePrint:j=!1}=u,C=m(),P=y.includes(C)||p.test(y)?y:C+y,[F,D]=n(0),[R,S]=n(600),U=a(null),[E,{enterFullscreen:O,exitFullscreen:W}]=e(U),{downloadFile:A}=d();l.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${l.version}/build/pdf.worker.min.mjs`;const B=({numPages:e})=>{D(e)},N=()=>{i.error("加载 PDF 文件失败"),x&&x()},T=({width:e})=>{S(e)},$=()=>f(h,{children:f("div",{style:{height:E?"calc(100vh - 40px - 24px - 8px - 32px - 12px)":"72vh",overflowY:"auto",padding:"24px",...b},children:f(c,{file:P,onLoadSuccess:B,onLoadError:N,loading:f("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"65vh"},children:f(o,{size:"large"})}),children:Array.from({length:F}).map((e,t)=>f(s,{pageNumber:t+1,onLoadSuccess:T},`page_${t+1}`))})})});return w?$():f("div",{ref:U,children:f(t,{style:{top:E?0:100,maxWidth:E?"100vw":"calc(100vw - 32px)",paddingBottom:E?0:24},open:g,mask:{closable:!1},width:E?"100vw":R+100,styles:{body:{maxHeight:"auto !important",overflow:"auto"}},title:k,onCancel:()=>{E&&W(),x()},getContainer:!1,footer:[f(r,{onClick:()=>{E&&W(),x()},children:"关闭"},"cancel"),f(r,{onClick:()=>{E?W():O()},children:E?"退出全屏":"全屏"},"fullScreen"),f(r,{type:"primary",onClick:()=>{E&&W(),A({url:y,name:v})},children:"下载"},"download"),j&&f(r,{type:"primary",onClick:async()=>{try{const e=await fetch(P);if(!e.ok)return void i.warning("获取 PDF 文件失败");const t=URL.createObjectURL(await e.blob()),r=document.createElement("iframe");r.style.cssText="position:fixed;width:0;height:0;border:0",r.onload=()=>{const e=r.contentWindow,o=()=>{URL.revokeObjectURL(t),r.remove()};e.addEventListener("afterprint",o,{once:!0});try{e.focus(),e.print()}catch(e){o(),i.error(e.message||"打印失败,请稍后重试")}},r.src=t,document.body.appendChild(r)}catch(e){i.error(e.message||"打印失败,请稍后重试")}},children:"打印"},"print"),...L||[]],children:$()})})}u.displayName="Pdf";export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Image as
|
|
1
|
+
import{Image as r}from"antd";import{HTTP_URL as t}from"../../regular/index.js";import{getFileUrl as e}from"../../utils/index.js";import{jsx as i}from"react/jsx-runtime";const o=o=>{const{files:m=[],fileUrlKey:s="filePath"}=o,l=e();return i(r.PreviewGroup,{children:m.filter(Boolean).map(e=>{const o=e[s]||e,m=o.includes(l)||t.test(o)?o:l+o;return i(r,{src:m,styles:{root:{marginRight:10,marginBottom:10}},width:100,height:100,alt:""},o)})})};o.displayName="PreviewImg";export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Modal as e,Button as r}from"antd";import{forwardRef as t,useState as n,useRef as
|
|
1
|
+
import{Modal as e,Button as r}from"antd";import{forwardRef as t,useState as n,useRef as o,useImperativeHandle as a,useEffect as i}from"react";import{HTTP_URL as l}from"../../regular/index.js";import{getFileUrl as s}from"../../utils/index.js";import c from"./AliPlayer.js";import{jsx as u}from"react/jsx-runtime";const p=t(({source:t="",vid:p="",playAuth:d="",cover:m="",autoplay:y=!0,showProgress:h=!0,playTime:P=0,inline:f=!1,isLive:g=!1,width:v="100%",height:w="600px",title:x="视频",visible:j=!1,onCancel:I,onEnded:T,onTimeupdate:A,onGetPlayerInstance:C,aliPlayerProps:b={}},k)=>{const[E,G]=n(!1),L=o(null);a(k,()=>({play:()=>{L.current&&L.current.play()},pause:()=>{L.current&&L.current.pause()},getPlayerInstance:()=>L.current&&L.current.getPlayerInstance()}));const N=I?j:E,V=I||G;i(()=>{f||(N?L.current&&L.current.play():L.current&&L.current.pause())},[N,f]);const q=u(c,{ref:L,source:(()=>{if(t)return l.test(t)?t:s()+t})(),vid:p,playAuth:d,cover:m,autoplay:y,showProgress:h,playTime:P,isLive:g,width:v,height:w,aliPlayerProps:b,onEnded:T,onTimeupdate:A,onGetPlayerInstance:C});return f?q:u(e,{open:N,width:800,title:x,footer:[u(r,{onClick:()=>V(!1),children:"关闭"},"cancel")],mask:{closable:!1},onCancel:()=>V(!1),children:q})});p.displayName="Video";export{p as default};
|
package/components/Word/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Modal as r,Button as e,message as n,Spin as t}from"antd";import{renderAsync as i}from"docx-preview";import{useRef as o,useState as a,useEffect as l}from"react";import c from"../../hooks/useDownloadFile/index.js";import{
|
|
1
|
+
import{Modal as r,Button as e,message as n,Spin as t}from"antd";import{renderAsync as i}from"docx-preview";import{useRef as o,useState as a,useEffect as l}from"react";import c from"../../hooks/useDownloadFile/index.js";import{HTTP_URL as d}from"../../regular/index.js";import{getFileUrl as u}from"../../utils/index.js";import{jsx as s}from"react/jsx-runtime";function m(m){const{visible:f=!1,onCancel:p,file:h,name:g,inline:w=!1,title:x="Word预览",style:v={},extraButtons:y}=m,k=o(null),W=o(null),C=o(!1),b=u(),[j,T]=a(!1),{downloadFile:B}=c();l(()=>{if(!f&&!w||!h)return;C.current=!1;const r=setTimeout(()=>{(async()=>{T(!0),k.current.innerHTML="";try{const r=await fetch(h.includes(b)||d.test(h)?h:b+h);if(!r.ok)return void n.error("加载 Word 文件失败");const e=await r.arrayBuffer();if(C.current)return;await i(e,k.current,null,{className:"docx-preview",inWrapper:!0,ignoreWidth:!1,ignoreHeight:!1,breakPages:!0})}catch{n.error("加载 Word 文件失败"),p&&p()}finally{C.current||T(!1)}})()},100);return()=>{C.current=!0,k.current&&(k.current.innerHTML=""),r&&clearTimeout(r)}},[f,w,h]);const H=()=>s(t,{spinning:j,children:s("div",{style:{height:"72vh",overflowY:"auto",padding:"24px",background:"#f5f5f5",...v},children:s("div",{ref:k})})});return w?H():s("div",{ref:W,children:s(r,{style:{top:100,maxWidth:"calc(100vw - 32px)",paddingBottom:24},open:f,mask:{closable:!1},width:900,title:x,onCancel:()=>{p()},getContainer:!1,footer:[s(e,{onClick:()=>{p()},children:"关闭"},"cancel"),s(e,{type:"primary",onClick:()=>{B({url:h,name:g})},children:"下载"},"download"),...y||[]],children:H()})})}m.displayName="Word";export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Modal as
|
|
1
|
+
import{Modal as e,message as o}from"antd";import{useState as t}from"react";import{HTTP_URL as n}from"../../regular/index.js";import{getFileUrl as r,getFileSuffix as c,getFileName as l}from"../../utils/index.js";function d(d="object"){const[i,a]=t(!1);let m=0;const s=t=>{m++,m>0&&a(!0);const{url:d,name:i}=t;d?e.confirm({title:"提示",content:"确定要下载此文件吗?",onOk:()=>{const e=r();let t=i;t?!c(t)&&c(d)&&(t=`${t}.${c(d)}`):t=l(d),fetch(d.includes(e)||n.test(e)?d:e+d).then(e=>e.blob()).then(e=>{const o=document.createElement("a");document.body.appendChild(o),o.style.display="none";const n=window.URL.createObjectURL(e);o.href=n,o.download=`${t}`,o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)}).catch(()=>{o.error("下载失败")}).finally(()=>{m--,m<=0&&a(!1)})},onCancel:()=>{m--,m<=0&&a(!1)}}):console.error("【downloadFile】 缺少 url 参数")};return"array"===d?[i,s]:{loading:i,downloadFile:s}}export{d as default};
|
package/package.json
CHANGED
package/regular/index.d.ts
CHANGED
package/regular/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const d=/^(?:(?:\+|00)86)?1(?:3\d|4[5-7|9]|5[0-3|5-9]|6[5-7]|7[0-8]|8\d|9[1|89])\d{8}$/,$=/^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/,A=/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,H=/^(13\d|14[579]|15[0-3,5-9]|166|17[0135-8]|18\d|19[89])\d{8}$/,J=/(^[1-9](\d+)?(\.\d{1,2})?$)|(^(0)$)|(^\d\.\d(\d)?$)/,N=/^\d+\.\d{2}$/,P=/^\d+(\.\d?)?$/,Z=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,
|
|
1
|
+
const d=/^(?:(?:\+|00)86)?1(?:3\d|4[5-7|9]|5[0-3|5-9]|6[5-7]|7[0-8]|8\d|9[1|89])\d{8}$/,$=/^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/,A=/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,H=/^(13\d|14[579]|15[0-3,5-9]|166|17[0135-8]|18\d|19[89])\d{8}$/,J=/(^[1-9](\d+)?(\.\d{1,2})?$)|(^(0)$)|(^\d\.\d(\d)?$)/,N=/^\d+\.\d{2}$/,P=/^\d+(\.\d?)?$/,Z=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,t=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{8,}$/,X=/<[^>]*>/g,a=/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/g,g=/^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,i=/^https?:\/\//i;export{J as FLOATING_POINT_NUMBER,X as HTML_TAG,i as HTTP_URL,A as ID_NUMBER,Z as LICENSE_PLATE_NUMBER,H as MOBILE_PHONE,P as ONE_DECIMAL_PLACES,d as PHONE,a as POSTAL_CODE,t as STRONG_PASSWORD,g as TEL_PHONE,N as TWO_DECIMAL_PLACES,$ as UNIFIED_SOCIAL_CREDIT_CODE};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { FC } from "react";
|
|
2
|
-
import type { BasicSelectTreeProps } from "../../Basic";
|
|
3
|
-
|
|
4
|
-
export interface HiddenLevelSelectTreeItem {
|
|
5
|
-
dictValue: string;
|
|
6
|
-
dictLabel: string;
|
|
7
|
-
children: HiddenLevelSelectTreeItem[];
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* 组件属性
|
|
13
|
-
*/
|
|
14
|
-
export interface HiddenLevelSelectTreeProps extends Omit<BasicSelectTreeProps, "treeData" | "nameKey" | "idKey" | "childrenKey" | "level" | "onGetNodePaths" | "onGetData"> {
|
|
15
|
-
/** 是否显示忽略隐患,默认 true */
|
|
16
|
-
isShowNeglect?: boolean;
|
|
17
|
-
/** 是否显示较大隐患,默认 true */
|
|
18
|
-
isShowLarger?: boolean;
|
|
19
|
-
/** 是否显示重大隐患,默认 true */
|
|
20
|
-
isShowMajor?: boolean;
|
|
21
|
-
/** 获取父级节点 */
|
|
22
|
-
onGetNodePaths?: (nodes: HiddenLevelSelectTreeItem[]) => void;
|
|
23
|
-
/** 获取数据 */
|
|
24
|
-
onGetData?: (data: HiddenLevelSelectTreeItem[], processedData: HiddenLevelSelectTreeItem[]) => void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* 隐患级别下拉树组件(港务局版本)
|
|
29
|
-
*/
|
|
30
|
-
declare const HiddenLevelSelectTree: FC<HiddenLevelSelectTreeProps>;
|
|
31
|
-
|
|
32
|
-
export default HiddenLevelSelectTree;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{request as e}from"@cqsjjb/jjb-common-lib/http.js";import{useState as t,useEffect as i}from"react";import{DICTIONARY_APP_KEY_ENUM as r}from"zy-react-data/enum/dictionary";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]=t([]);return i(()=>{(async()=>{h([]);const{data:t}=await e("/config/dict-trees/list/by/dictValues","get",{appKey:r.GWJ,dictValue:"hiddenLevel"}),i=(e=>{const t=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=t(e.children)),!0)):[];return t(e)})(t);h(i)})()},[]),d(a,{treeData:m,placeholder:"隐患级别",onlyLastLevel:!0,nameKey:"dictLabel",idKey:"dictValue",...s})}c.displayName="HiddenLevelSelectTree";export{c as default};
|