@deepinnet-components/pc 0.0.60 → 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.
|
@@ -12,6 +12,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
12
12
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
import { Tooltip } from 'antd';
|
|
15
|
+
import React from 'react';
|
|
15
16
|
import { useEffect, useRef, useState } from 'react';
|
|
16
17
|
function joinClassNames() {
|
|
17
18
|
for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -103,19 +104,15 @@ export default function OverflowTooltipText(props) {
|
|
|
103
104
|
textOverflow: 'ellipsis',
|
|
104
105
|
whiteSpace: 'nowrap'
|
|
105
106
|
}, style);
|
|
106
|
-
return (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
className: joinClassNames(className),
|
|
118
|
-
style: textStyle
|
|
119
|
-
}, text)))
|
|
120
|
-
);
|
|
107
|
+
return /*#__PURE__*/React.createElement(Tooltip, _extends({}, tooltipProps, {
|
|
108
|
+
title: isOverflow ? text : null
|
|
109
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
ref: wrapperRef,
|
|
111
|
+
className: joinClassNames(wrapperClassName),
|
|
112
|
+
style: wrapperStyle
|
|
113
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
114
|
+
ref: textRef,
|
|
115
|
+
className: joinClassNames(className),
|
|
116
|
+
style: textStyle
|
|
117
|
+
}, text)));
|
|
121
118
|
}
|
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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?:
|
|
18
|
-
showMemberPilot?:
|
|
19
|
-
canEditPassword?:
|
|
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;
|