@deepinnet-components/pc 0.0.61 → 0.0.62

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.
@@ -24,6 +24,7 @@ import CreateAccount from "./components/CreateAccount";
24
24
  import EditPasswordModal from "./components/EditPasswordModal";
25
25
  import { exportFile } from "../utils";
26
26
  import ValueContext from "../context";
27
+ import OrgSelect from "../OrgSelect";
27
28
  var statusMap = {
28
29
  0: {
29
30
  text: '正常',
@@ -47,7 +48,8 @@ var AccountList = function AccountList() {
47
48
  canEditPassword = contextValue.canEditPassword,
48
49
  isNeedExportAccount = contextValue.isNeedExportAccount,
49
50
  requestHeaders = contextValue.requestHeaders,
50
- api = contextValue.api;
51
+ api = contextValue.api,
52
+ accountSearchNeedDepartment = contextValue.accountSearchNeedDepartment;
51
53
  var tableRef = useRef(null);
52
54
  var columns = [{
53
55
  title: '姓名',
@@ -114,7 +116,15 @@ var AccountList = function AccountList() {
114
116
  }
115
117
  }, item.name), !isLast && /*#__PURE__*/React.createElement("div", null, "/"));
116
118
  }));
117
- }
119
+ },
120
+ searchConfig: accountSearchNeedDepartment ? {
121
+ props: {
122
+ allowClear: true,
123
+ placeholder: '请选择组织'
124
+ },
125
+ searchKey: 'orgIds',
126
+ component: 'OrgSelect'
127
+ } : undefined
118
128
  }, {
119
129
  title: '角色',
120
130
  dataIndex: 'roles',
@@ -378,6 +388,9 @@ var AccountList = function AccountList() {
378
388
  search: {
379
389
  labelWidth: 'auto'
380
390
  },
391
+ searchComponents: {
392
+ OrgSelect: OrgSelect
393
+ },
381
394
  actionRef: tableRef,
382
395
  request: ( /*#__PURE__*/function () {
383
396
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchInfo) {
@@ -394,9 +407,12 @@ var AccountList = function AccountList() {
394
407
  phone: (_search$phone = search.phone) === null || _search$phone === void 0 ? void 0 : _search$phone.trim(),
395
408
  userType: userType
396
409
  };
397
- _context.next = 4;
410
+ if (search.orgIds) {
411
+ params.departmentIds = [search.orgIds[search.orgIds.length - 1]];
412
+ }
413
+ _context.next = 5;
398
414
  return ApiService.getAccountList(params);
399
- case 4:
415
+ case 5:
400
416
  _yield$ApiService$get = _context.sent;
401
417
  data = _yield$ApiService$get.data;
402
418
  tableList.current = data.list;
@@ -405,7 +421,7 @@ var AccountList = function AccountList() {
405
421
  success: true,
406
422
  total: data.total || 0
407
423
  });
408
- case 8:
424
+ case 9:
409
425
  case "end":
410
426
  return _context.stop();
411
427
  }
@@ -14,12 +14,13 @@ export interface MainProps {
14
14
  passwordEncryption?: string;
15
15
  passwordEncryptionNeedSalt?: boolean;
16
16
  hideDeleteAccountBtn?: boolean;
17
- hideMemberType?: Boolean;
18
- showMemberPilot?: Boolean;
19
- canEditPassword?: Boolean;
17
+ hideMemberType?: boolean;
18
+ showMemberPilot?: boolean;
19
+ canEditPassword?: boolean;
20
20
  orgSortConfig?: any;
21
21
  isNeedExportAccount?: boolean;
22
22
  requestHeaders?: any;
23
+ accountSearchNeedDepartment?: boolean;
23
24
  }
24
25
  declare const Index: React.FC<MainProps>;
25
26
  export default Index;
@@ -81,7 +81,9 @@ var Index = function Index(props) {
81
81
  _props$isNeedExportAc = props.isNeedExportAccount,
82
82
  isNeedExportAccount = _props$isNeedExportAc === void 0 ? false : _props$isNeedExportAc,
83
83
  _props$requestHeaders = props.requestHeaders,
84
- requestHeaders = _props$requestHeaders === void 0 ? {} : _props$requestHeaders;
84
+ requestHeaders = _props$requestHeaders === void 0 ? {} : _props$requestHeaders,
85
+ _props$accountSearchN = props.accountSearchNeedDepartment,
86
+ accountSearchNeedDepartment = _props$accountSearchN === void 0 ? false : _props$accountSearchN;
85
87
  var _useState = useState(),
86
88
  _useState2 = _slicedToArray(_useState, 2),
87
89
  value = _useState2[0],
@@ -243,7 +245,8 @@ var Index = function Index(props) {
243
245
  canEditPassword: canEditPassword,
244
246
  orgSortConfig: orgSortConfig,
245
247
  isNeedExportAccount: isNeedExportAccount,
246
- requestHeaders: requestHeaders
248
+ requestHeaders: requestHeaders,
249
+ accountSearchNeedDepartment: accountSearchNeedDepartment
247
250
  });
248
251
  }, []);
249
252
  if (!value) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepinnet-components/pc",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",