@titaui/pc 1.12.9-beta.1 → 1.12.9-beta.2

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.
@@ -66,6 +66,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
66
66
  selectNodes = _props$selectNodes === void 0 ? defauleSelectNodes : _props$selectNodes,
67
67
  sourceFrom = props.sourceFrom,
68
68
  departOnly = props.departOnly,
69
+ searchUserOnly = props.searchUserOnly,
70
+ isVerify = props.isVerify,
69
71
  _props$departId = props.departId,
70
72
  departId = _props$departId === void 0 ? "-1" : _props$departId,
71
73
  _props$auth = props.auth,
@@ -307,6 +309,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
307
309
  value: {
308
310
  sourceFrom: sourceFrom,
309
311
  departOnly: departOnly,
312
+ searchUserOnly: searchUserOnly,
313
+ isVerify: isVerify,
310
314
  auth: auth,
311
315
  departId: departId,
312
316
  authType: authType,
@@ -159,13 +159,28 @@ exports.getSubordinateData = getSubordinateData;
159
159
  var search = function search(_ref4) {
160
160
  var searchKey = _ref4.searchKey,
161
161
  departOnly = _ref4.departOnly,
162
- sourceFrom = _ref4.sourceFrom;
162
+ searchUserOnly = _ref4.searchUserOnly,
163
+ sourceFrom = _ref4.sourceFrom,
164
+ _ref4$isVerify = _ref4.isVerify,
165
+ isVerify = _ref4$isVerify === void 0 ? false : _ref4$isVerify;
163
166
  var args = [];
164
- if (departOnly) args.push("isGetUser=false");
165
- if (sourceFrom) args.push("sourceFrom=".concat(sourceFrom)); // 追加来源,用于企业微信搜索
166
167
 
167
- args.push("source=".concat((0, _openData.getSource)()));
168
- return _axios["default"].get("".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/search/searchAll?keyWork=").concat(searchKey).concat(args.length ? "&".concat(args.join("&")) : "")).then(function (searchRes) {
168
+ if (departOnly) {
169
+ args.push("isGetUser=false&isGetDep=true&isGetGroup=false");
170
+ } else if (searchUserOnly) {
171
+ args.push("isGetUser=true&isGetDep=false&isGetGroup=false");
172
+ } else {
173
+ args.push("isGetUser=true&isGetDep=true&isGetGroup=true");
174
+ }
175
+
176
+ ;
177
+
178
+ if (!!sourceFrom) {
179
+ // 这个是遗留的管控群组的,后面逐步替换掉
180
+ isVerify = true;
181
+ }
182
+
183
+ return _axios["default"].get("".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/search/searchAll?keyWord=").concat(searchKey, "&isVerify=").concat(isVerify, "&").concat(args[0])).then(function (searchRes) {
169
184
  return searchRes.data;
170
185
  });
171
186
  };
@@ -59,7 +59,9 @@ function _default(props) {
59
59
 
60
60
  var _useContext = (0, _react.useContext)(_context.CommonContext),
61
61
  departOnly = _useContext.departOnly,
62
+ searchUserOnly = _useContext.searchUserOnly,
62
63
  sourceFrom = _useContext.sourceFrom,
64
+ isVerify = _useContext.isVerify,
63
65
  _useContext$panes = _useContext.panes,
64
66
  panes = _useContext$panes === void 0 ? {
65
67
  depart: true,
@@ -97,7 +99,9 @@ function _default(props) {
97
99
  (0, _requestApis.search)({
98
100
  searchKey: searchKey,
99
101
  departOnly: departOnly,
100
- sourceFrom: sourceFrom
102
+ searchUserOnly: searchUserOnly,
103
+ sourceFrom: sourceFrom,
104
+ isVerify: isVerify
101
105
  }).then(function (res) {
102
106
  var Code = res.Code,
103
107
  Data = res.Data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.12.9-beta.1",
3
+ "version": "1.12.9-beta.2",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",