zy-react-library 1.1.23 → 1.1.24

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.
@@ -1,7 +1,18 @@
1
1
  import type { FC } from "react";
2
- import type { Params } from "../../../LeftTree/Department/Gwj";
3
2
  import type { BasicSelectTreeProps } from "../../Basic";
4
3
 
4
+ /**
5
+ * 请求参数
6
+ */
7
+ export interface Params {
8
+ /** 企业id */
9
+ eqCorpinfoId?: string;
10
+ /** 父级部门id */
11
+ eqParentId?: string;
12
+ /** 企业类型 */
13
+ corpinfoTypeList?: number[];
14
+ }
15
+
5
16
  /**
6
17
  * 组件属性
7
18
  */
@@ -14,8 +25,8 @@ export interface DepartmentSelectTreeProps extends Omit<BasicSelectTreeProps, "t
14
25
  isNeedCorpInfoId?: boolean;
15
26
  /** 是否需要父级部门id,默认 false */
16
27
  isNeedParentId?: boolean;
17
- /** 查询当前登陆人部门还是所有企业部门,all 的话 isNeedCorpInfoId、isNeedParentId、params 不生效 */
18
- searchType?: "current" | "all";
28
+ /** 查询当前登陆人部门还是所有企业部门 */
29
+ searchType?: "current" | "all" | "company";
19
30
  }
20
31
 
21
32
  /**
@@ -1 +1 @@
1
- import{request as e}from"@cqsjjb/jjb-common-lib/http.js";import{useState as r,useEffect as t}from"react";import a from"../../Basic/index.js";import{jsx as i}from"react/jsx-runtime";function n(n){const{params:o={},placeholder:s="部门",isNeedCorpInfoId:c=!1,isNeedParentId:p=!1,searchType:d="current",...m}=n,[f,l]=r([]);return t(()=>{(async()=>{if(l([]),"current"===d){if(c&&!o.eqCorpinfoId)return;if(p&&!o.eqParentId)return}const{data:r}=await e("current"===d?"/basicInfo/department/listTree":"/basicInfo/department/listAllTree","post",o);l(r)})()},[JSON.stringify(o),c,p,d]),i(a,{treeData:f,placeholder:s,childrenKey:"childrenList",...m})}n.displayName="DepartmentSelectTree";export{n as default};
1
+ import{request as e}from"@cqsjjb/jjb-common-lib/http.js";import{useState as r,useEffect as t}from"react";import a from"../../Basic/index.js";import{jsx as n}from"react/jsx-runtime";function i(i){const{params:o={},placeholder:s="部门",isNeedCorpInfoId:c=!1,isNeedParentId:p=!1,searchType:l="current",...m}=i,[d,f]=r([]);return t(()=>{(async()=>{if(f([]),"current"===l){if(c&&!o.eqCorpinfoId)return;if(p&&!o.eqParentId)return}let r="";"current"===l&&(r="/basicInfo/department/listTree"),"all"===l&&(r="/basicInfo/department/listAllTree"),"company"===l&&(r="/basicInfo/department/listAllTreeByCorpType");const{data:t}=await e(r,"post",o);f(t)})()},[JSON.stringify(o),c,p,l]),n(a,{treeData:d,placeholder:s,childrenKey:"childrenList",...m})}i.displayName="DepartmentSelectTree";export{i as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.1.23",
4
+ "version": "1.1.24",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",