zy-react-library 1.4.16 → 1.4.17

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.4.16",
4
+ "version": "1.4.17",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",
@@ -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};