@deepinnet-components/pc 0.0.10 → 0.0.12

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.
@@ -151,7 +151,8 @@ var CreateAccount = function CreateAccount(props) {
151
151
  addOrEdit = props.addOrEdit;
152
152
  var contextValue = useContext(ValueContext);
153
153
  var ApiService = contextValue.ApiService,
154
- Components = contextValue.Components;
154
+ Components = contextValue.Components,
155
+ userType = contextValue.userType;
155
156
  var getRoleDetail = /*#__PURE__*/function () {
156
157
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
157
158
  var params, _yield$ApiService$get, data;
@@ -241,7 +242,8 @@ var CreateAccount = function CreateAccount(props) {
241
242
  phone: values.phone.trim(),
242
243
  roleCodeList: values.roleCodeList,
243
244
  password: md5(values.password.trim()),
244
- departmentIdList: values.orgArr || []
245
+ departmentIdList: values.orgArr || [],
246
+ userType: userType
245
247
  };
246
248
  setLoading(true);
247
249
  _context2.next = 11;
@@ -269,7 +271,8 @@ var CreateAccount = function CreateAccount(props) {
269
271
  accountNo: actionRow.accountNo,
270
272
  name: values.name.trim(),
271
273
  roleCodeList: values.roleCodeList,
272
- departmentIdList: values.orgArr || []
274
+ departmentIdList: values.orgArr || [],
275
+ userType: userType
273
276
  };
274
277
  setLoading(true);
275
278
  _context2.next = 24;
@@ -29,7 +29,8 @@ var AccountList = function AccountList() {
29
29
  var ApiService = contextValue.ApiService,
30
30
  Components = contextValue.Components,
31
31
  pageUrl = contextValue.pageUrl,
32
- navigate = contextValue.navigate;
32
+ navigate = contextValue.navigate,
33
+ userType = contextValue.userType;
33
34
  var tableRef = useRef(null);
34
35
  var columns = [{
35
36
  title: '姓名',
@@ -186,7 +187,8 @@ var AccountList = function AccountList() {
186
187
  pageNum: pageNum,
187
188
  pageSize: pageSize,
188
189
  username: (_search$username = search.username) === null || _search$username === void 0 ? void 0 : _search$username.trim(),
189
- phone: (_search$phone = search.phone) === null || _search$phone === void 0 ? void 0 : _search$phone.trim()
190
+ phone: (_search$phone = search.phone) === null || _search$phone === void 0 ? void 0 : _search$phone.trim(),
191
+ userType: userType
190
192
  };
191
193
  _context.next = 4;
192
194
  return ApiService.getAccountList(params);
@@ -6,6 +6,7 @@ export interface MainProps {
6
6
  pageUrl?: any;
7
7
  children?: any;
8
8
  navigate: any;
9
+ userType?: string;
9
10
  }
10
11
  declare const Index: React.FC<MainProps>;
11
12
  export default Index;
@@ -12,6 +12,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import React, { useEffect, useState } from 'react';
14
14
  import ValueContext from "../context";
15
+ import locale from 'antd/locale/zh_CN';
16
+ import { ConfigProvider } from 'antd';
15
17
  var Index = function Index(props) {
16
18
  var request = props.request,
17
19
  _props$api = props.api,
@@ -40,7 +42,8 @@ var Index = function Index(props) {
40
42
  rolePage: '/role',
41
43
  orgPage: '/org'
42
44
  } : _props$pageUrl,
43
- navigate = props.navigate;
45
+ navigate = props.navigate,
46
+ userType = props.userType;
44
47
  var _useState = useState(),
45
48
  _useState2 = _slicedToArray(_useState, 2),
46
49
  value = _useState2[0],
@@ -165,13 +168,16 @@ var Index = function Index(props) {
165
168
  Components: components,
166
169
  pageUrl: pageUrl,
167
170
  ApiService: Service,
168
- navigate: navigate
171
+ navigate: navigate,
172
+ userType: userType
169
173
  });
170
174
  }, []);
171
175
  if (!value) return null;
172
- return /*#__PURE__*/React.createElement(ValueContext.Provider, {
176
+ return /*#__PURE__*/React.createElement(ConfigProvider, {
177
+ locale: locale
178
+ }, /*#__PURE__*/React.createElement(ValueContext.Provider, {
173
179
  // @ts-ignore
174
180
  value: value
175
- }, props.children);
181
+ }, props.children));
176
182
  };
177
183
  export default Index;
@@ -211,7 +211,7 @@ var CreateRole = function CreateRole(props) {
211
211
  _yield$ApiService$sav2 = _context2.sent;
212
212
  _success = _yield$ApiService$sav2.success;
213
213
  if (_success) {
214
- message.success('新增成功');
214
+ message.success('保存成功');
215
215
  onClose === null || onClose === void 0 || onClose();
216
216
  onSuccess === null || onSuccess === void 0 || onSuccess();
217
217
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepinnet-components/pc",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",