@zgfe/modules-settings 1.2.12 → 1.2.13

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.
Files changed (56) hide show
  1. package/es/components/settingTabs/index.less +3 -0
  2. package/es/constants/api.d.ts +21 -0
  3. package/es/constants/api.js +26 -1
  4. package/es/constants/icons/demo.css +0 -0
  5. package/es/constants/icons/demo_index.html +0 -0
  6. package/es/constants/icons/iconfont.css +0 -0
  7. package/es/constants/icons/iconfont.js +0 -0
  8. package/es/constants/icons/iconfont.json +0 -0
  9. package/es/constants/icons/iconfont.ttf +0 -0
  10. package/es/constants/icons/iconfont.woff +0 -0
  11. package/es/constants/icons/iconfont.woff2 +0 -0
  12. package/es/modules/appSettings/demo/index.d.ts +3 -1
  13. package/es/modules/appSettings/demo/index.js +16 -12
  14. package/es/modules/appSettings/index.js +6 -7
  15. package/es/modules/appSettings/member/index.js +75 -82
  16. package/es/modules/appSettings/member/index.less +4 -1
  17. package/es/modules/appSettings/member/modal.js +1 -1
  18. package/es/modules/companySetting/appList/index.js +24 -21
  19. package/es/modules/companySetting/appList/index.less +22 -0
  20. package/es/modules/companySetting/cost/index.js +2 -2
  21. package/es/modules/companySetting/cost/index.less +7 -0
  22. package/es/modules/companySetting/demo.js +3 -4
  23. package/es/modules/companySetting/department/index.d.ts +7 -0
  24. package/es/modules/companySetting/department/index.js +414 -0
  25. package/es/modules/companySetting/department/index.less +157 -0
  26. package/es/modules/companySetting/index.d.ts +0 -2
  27. package/es/modules/companySetting/index.js +189 -372
  28. package/es/modules/companySetting/index.less +65 -0
  29. package/es/modules/companySetting/info/index.js +6 -1
  30. package/es/modules/companySetting/info/index.less +7 -0
  31. package/es/modules/companySetting/operationLog/index.js +10 -4
  32. package/es/modules/companySetting/operationLog/index.less +6 -0
  33. package/es/modules/companySetting/role/index.d.ts +6 -0
  34. package/es/modules/companySetting/role/index.js +716 -0
  35. package/es/modules/companySetting/role/index.less +220 -0
  36. package/es/modules/companySetting/style/common.less +13 -2
  37. package/es/modules/companySetting/user/index.d.ts +1 -0
  38. package/es/modules/companySetting/user/index.js +224 -278
  39. package/es/modules/companySetting/user/index.less +199 -10
  40. package/es/modules/companySetting/user/invite.d.ts +4 -8
  41. package/es/modules/companySetting/user/invite.js +335 -174
  42. package/es/modules/companySetting/userGroup/groupItem.js +1 -1
  43. package/es/modules/companySetting/virtualApp/panels/list.js +1 -1
  44. package/es/modules/companySetting/wechatBinding/index.js +1 -1
  45. package/es/modules/companySetting/wechatBinding/index.less +10 -0
  46. package/es/modules/systemSetting/demo.d.ts +3 -0
  47. package/es/modules/systemSetting/demo.js +10 -0
  48. package/es/modules/systemSetting/notice/configItem/index.js +5 -1
  49. package/es/requests/department.d.ts +15 -0
  50. package/es/requests/department.js +68 -0
  51. package/es/requests/role.d.ts +25 -0
  52. package/es/requests/role.js +100 -0
  53. package/es/types/companySetting.d.ts +29 -2
  54. package/es/utils/util.d.ts +29 -0
  55. package/es/utils/util.js +77 -0
  56. package/package.json +5 -5
@@ -1,216 +1,377 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
8
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
9
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
11
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
7
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
- import React, { useState } from 'react';
13
+ import React, { useEffect, useState, useContext } from 'react';
14
14
  import './index.less';
15
- import constants from './../../../utils/constants';
16
- import { Button, Input, notification, Select } from 'antd';
15
+ import { Button, Form, Input, notification, Radio, Select, TreeSelect } from 'antd';
17
16
  import request from './../../../utils/ajax';
18
17
  import apis from './../../../constants/api';
18
+ import { BizDialog, BizSelect, BizGlobalDataContext } from '@zgfe/business-lib';
19
+ // import companySettingUserGroup from '../edit/userGroup'
20
+ // import groupItem from './groupItem.vue'
19
21
  var UserGroup = function UserGroup(props) {
20
- var ENVIRONMENT = props.ENVIRONMENT,
21
- allGroupInfos = props.allGroupInfos,
22
- isSso = props.isSso,
23
- showPwdPanel = props.showPwdPanel,
24
- createMembersCallback = props.createMembersCallback;
25
- var dealAllGroupInfos = allGroupInfos.map(function (item) {
26
- return _objectSpread(_objectSpread({}, item), {}, {
27
- value: item.id,
28
- label: item.groupName
29
- });
30
- });
31
- var _useState = useState(''),
22
+ var queryPanel = props.queryPanel,
23
+ userEditAuthData = props.userEditAuthData,
24
+ companyId = props.companyId;
25
+ var _Form$useForm = Form.useForm(),
26
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
27
+ form = _Form$useForm2[0];
28
+ var _useContext = useContext(BizGlobalDataContext),
29
+ authority = _useContext.authority,
30
+ isDemo = _useContext.isDemo;
31
+ var _useState = useState(),
32
32
  _useState2 = _slicedToArray(_useState, 2),
33
- inviteVal = _useState2[0],
34
- setInviteVal = _useState2[1];
33
+ queryParams = _useState2[0],
34
+ setQueryParams = _useState2[1];
35
35
  var _useState3 = useState([]),
36
36
  _useState4 = _slicedToArray(_useState3, 2),
37
- targetGroup = _useState4[0],
38
- setTargetGroup = _useState4[1];
39
- var _useState5 = useState(false),
37
+ userList = _useState4[0],
38
+ setUserList = _useState4[1];
39
+ var _useState5 = useState([]),
40
40
  _useState6 = _slicedToArray(_useState5, 2),
41
- inviteBtnLoading = _useState6[0],
42
- setInviteBtnLoading = _useState6[1];
43
- var validatorPhone = function validatorPhone() {
44
- var message = '';
45
- if (ENVIRONMENT === 'saas') {
46
- if (isSso) {
47
- if (!inviteVal || !inviteVal.trim()) {
48
- message = '账户不能为空';
49
- }
50
- return message;
41
+ departmentList = _useState6[0],
42
+ setDepartmentList = _useState6[1];
43
+ var _useState7 = useState(false),
44
+ _useState8 = _slicedToArray(_useState7, 2),
45
+ isAdmin = _useState8[0],
46
+ setIsAdmin = _useState8[1];
47
+ var _useState9 = useState({
48
+ rule: /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9~!@#$%^&*]{8,20}$/,
49
+ description: '请输入8-20个字符,可包括大小写字母和数字 特殊字符(!@#$%^&*)'
50
+ }),
51
+ _useState10 = _slicedToArray(_useState9, 2),
52
+ passwordRule = _useState10[0],
53
+ setPasswordRule = _useState10[1];
54
+ var _useState11 = useState(false),
55
+ _useState12 = _slicedToArray(_useState11, 2),
56
+ createAppLoading = _useState12[0],
57
+ setCreateAppLoading = _useState12[1];
58
+ var _useState13 = useState(false),
59
+ _useState14 = _slicedToArray(_useState13, 2),
60
+ createdAppPanel = _useState14[0],
61
+ setCreatedAppPanel = _useState14[1];
62
+ useEffect(function () {
63
+ if (userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) {
64
+ setCreatedAppPanel(true);
65
+ queryCompanyUserDetailsParamList(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id);
66
+ // 角色下拉数据
67
+ queryRoleListByUserIdList(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id);
68
+ // 部门下拉数据
69
+ queryDeptListByUserIdList(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id);
70
+ }
71
+ }, [userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id]);
72
+ useEffect(function () {
73
+ queryPanel(_objectSpread({}, queryParams));
74
+ }, [queryParams]);
75
+ useEffect(function () {
76
+ // 密码正则
77
+ getPasswordRuleList(companyId);
78
+ // 角色下拉数据
79
+ queryRoleListByUserIdList(null);
80
+ // 部门下拉数据
81
+ queryDeptListByUserIdList(null);
82
+ }, []);
83
+ // 查看详情
84
+ var queryCompanyUserDetailsParamList = function queryCompanyUserDetailsParamList(id) {
85
+ request(apis.setting.queryCompanyUserDetailsParam, {
86
+ method: 'post',
87
+ data: {
88
+ id: id
89
+ }
90
+ }).then(function (res) {
91
+ if (res && (res === null || res === void 0 ? void 0 : res.data) && res.code === '101000') {
92
+ var _res$data, _res$data$deptIds, _res$data2, _res$data2$roleIds, _res$data3;
93
+ var flattenArray = function flattenArray(array) {
94
+ var flatArray = [];
95
+ array.forEach(function (item) {
96
+ var children = item.children || [];
97
+ delete item.children;
98
+ var childArray = flattenArray(children);
99
+ flatArray.push(item);
100
+ flatArray = flatArray.concat(childArray);
101
+ });
102
+ return flatArray;
103
+ };
104
+ var deptIdsList = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$deptIds = _res$data.deptIds) === null || _res$data$deptIds === void 0 ? void 0 : _res$data$deptIds.map(function (item) {
105
+ var _flattenArray, _app$;
106
+ var app = (_flattenArray = flattenArray(departmentList)) === null || _flattenArray === void 0 ? void 0 : _flattenArray.filter(function (v) {
107
+ return v.id === item;
108
+ });
109
+ return (_app$ = app[0]) === null || _app$ === void 0 ? void 0 : _app$.id;
110
+ });
111
+ var roleIdsList = res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : (_res$data2$roleIds = _res$data2.roleIds) === null || _res$data2$roleIds === void 0 ? void 0 : _res$data2$roleIds.map(function (item) {
112
+ var _app$2;
113
+ var app = userList === null || userList === void 0 ? void 0 : userList.filter(function (v) {
114
+ return v.id === item;
115
+ });
116
+ return {
117
+ id: (_app$2 = app[0]) === null || _app$2 === void 0 ? void 0 : _app$2.id
118
+ };
119
+ });
120
+ form.setFieldsValue(_objectSpread(_objectSpread({}, res.data), {}, {
121
+ deptIds: deptIdsList.filter(function (v) {
122
+ return v !== undefined;
123
+ }),
124
+ roleIds: roleIdsList.filter(function (v) {
125
+ return v.id !== undefined;
126
+ })
127
+ }));
128
+ setIsAdmin(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.isAdmin);
51
129
  }
52
- // 手机号输入框验证
53
- if (!inviteVal) {
54
- message = '手机号码不能为空';
55
- } else if (!constants.regExp.phone.test(inviteVal)) {
56
- message = '手机号码格式错误';
130
+ }).catch(function (error) {
131
+ console.log(error);
132
+ });
133
+ };
134
+ var queryRoleListByUserIdList = function queryRoleListByUserIdList(id) {
135
+ request(apis.setting.queryRoleListByUserId, {
136
+ method: 'post',
137
+ data: {
138
+ id: id
57
139
  }
58
- } else {
59
- if (!constants.regExp.account.test(inviteVal)) {
60
- message = '5~30个字符,可包含大、小写字母和数字、特殊字符(_.@)';
140
+ }).then(function (res) {
141
+ if (res && (res === null || res === void 0 ? void 0 : res.data) && res.code === '101000') {
142
+ setUserList(res === null || res === void 0 ? void 0 : res.data);
143
+ } else {
144
+ setUserList([]);
61
145
  }
62
- }
63
- return message;
146
+ }).catch(function (error) {
147
+ console.log(error);
148
+ });
64
149
  };
65
- var inviteMember = function inviteMember() {
66
- var message = validatorPhone();
67
- if (message) {
68
- notification.error({
69
- message: message
70
- });
71
- return;
72
- }
73
- var params = {
74
- mobile: inviteVal,
75
- is_new: true,
76
- groupIds: targetGroup.map(function (item) {
77
- return item.id;
78
- }).join(',')
79
- };
80
- inviteEvent(params);
150
+ var queryDeptListByUserIdList = function queryDeptListByUserIdList(id) {
151
+ request(apis.setting.queryDeptListByUserId, {
152
+ method: 'post',
153
+ data: {
154
+ id: id
155
+ }
156
+ }).then(function (res) {
157
+ if (res && (res === null || res === void 0 ? void 0 : res.data) && res.code === '101000') {
158
+ setDepartmentList(res === null || res === void 0 ? void 0 : res.data);
159
+ } else {
160
+ setDepartmentList([]);
161
+ }
162
+ }).catch(function (error) {
163
+ console.log(error);
164
+ });
165
+ };
166
+ var getPasswordRuleList = function getPasswordRuleList(id) {
167
+ request(apis.setting.getPasswordRule, {
168
+ method: 'get',
169
+ params: {
170
+ companyId: id
171
+ }
172
+ }).then(function (res) {
173
+ if (res && (res === null || res === void 0 ? void 0 : res.data) && res.code === '101000') {
174
+ setPasswordRule(res === null || res === void 0 ? void 0 : res.data);
175
+ } else {
176
+ setPasswordRule({
177
+ rule: /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9~!@#$%^&*]{8,20}$/,
178
+ description: '请输入8-20个字符,可包括大小写字母和数字 特殊字符(!@#$%^&*)'
179
+ });
180
+ }
181
+ }).catch(function (error) {
182
+ console.log(error);
183
+ });
81
184
  };
82
- var inviteEvent = function inviteEvent(params) {
83
- setInviteBtnLoading(true);
84
- request(apis.setting.inviteUserByPhone, {
185
+ // 编辑||创建
186
+ var onFinish = function onFinish(value) {
187
+ var _value$roleIds;
188
+ setCreateAppLoading(true);
189
+ var msg = '';
190
+ var params = _objectSpread(_objectSpread({}, value), {}, {
191
+ id: userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id,
192
+ roleIds: value === null || value === void 0 ? void 0 : (_value$roleIds = value.roleIds) === null || _value$roleIds === void 0 ? void 0 : _value$roleIds.map(function (item) {
193
+ return item.id;
194
+ })
195
+ });
196
+ request(apis.setting[(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) ? 'updateCompanyUser' : 'addCompanyUser'], {
85
197
  method: 'post',
86
- params: params
198
+ data: params
87
199
  }).then(function (res) {
88
- if (res && res.flag === 101) {
89
- if (res.popup) {
90
- var userConfig = {
91
- id: res.userId,
92
- authConfig: {
93
- defaultAuth: {
94
- dataAuth: [],
95
- funAuth: []
96
- },
97
- groupIds: targetGroup.map(function (item) {
98
- return item.id;
99
- })
100
- },
101
- email: res.email,
102
- username: '',
103
- inv_status: 0,
104
- is_admin: false
105
- };
106
- showPwdPanel({
107
- account: res.email || '',
108
- pwd: res.password || '',
109
- userConfig: userConfig
110
- });
111
- createMembersCallback && createMembersCallback(res, userConfig);
112
- } else {
113
- createMembersCallback && createMembersCallback(res, false);
114
- }
115
- setInviteVal('');
116
- setTargetGroup([]);
200
+ if (res && res.code === '101000') {
201
+ setCreatedAppPanel(false);
202
+ setCreateAppLoading(false);
203
+ // 通知数据刷新
204
+ msg = (userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) ? '编辑成功' : '创建成功';
205
+ notification.success({
206
+ message: msg
207
+ });
208
+ queryPanel(_objectSpread({}, queryParams));
117
209
  } else {
118
- switch (res && res.flag) {
119
- case -101:
120
- notification.error({
121
- message: '成员创建失败,无权限'
122
- });
123
- break;
124
- case -102:
125
- notification.error({
126
- message: '今日创建次数已达上限(每日100条)'
127
- });
128
- break;
129
- case -103:
130
- notification.error({
131
- message: '已在本公司中,无需创建'
132
- });
133
- // this.$emit('updateMember')
134
- break;
135
- case -105:
136
- notification.error({
137
- message: '此手机号接收短信数量已达上限(每日5条)'
138
- });
139
- break;
140
- case -104:
141
- notification.error({
142
- message: '已创建,不能重复创建'
143
- });
144
- // this.$emit('updateMember')
145
- break;
146
- default:
147
- notification.error({
148
- message: '成员创建异常,请重试'
149
- });
150
- throw new Error('创建接口返回错误');
151
- }
210
+ setCreateAppLoading(false);
152
211
  }
153
212
  }).catch(function (error) {
154
213
  console.log(error);
155
- }).finally(function () {
156
- return setInviteBtnLoading(false);
157
214
  });
158
215
  };
159
216
  return /*#__PURE__*/React.createElement("div", {
160
217
  className: "invite"
161
218
  }, /*#__PURE__*/React.createElement("div", {
162
219
  className: "invite-control"
163
- }, /*#__PURE__*/React.createElement(Input, {
164
- value: inviteVal,
165
- style: {
166
- width: 250
220
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u8D26\u53F7"), /*#__PURE__*/React.createElement(Input, {
221
+ onChange: function onChange(e) {
222
+ setQueryParams(_objectSpread(_objectSpread({}, queryParams), {}, {
223
+ email: e.target.value
224
+ }));
167
225
  },
226
+ placeholder: '请输入账号'
227
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u59D3\u540D"), /*#__PURE__*/React.createElement(Input, {
168
228
  onChange: function onChange(e) {
169
- setInviteVal(e.target.value);
229
+ setQueryParams(_objectSpread(_objectSpread({}, queryParams), {}, {
230
+ username: e.target.value
231
+ }));
232
+ },
233
+ placeholder: '请输入姓名'
234
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u89D2\u8272"), /*#__PURE__*/React.createElement(Select, {
235
+ options: userList,
236
+ placeholder: '请选择角色',
237
+ fieldNames: {
238
+ label: 'roleName',
239
+ value: 'id'
170
240
  },
171
- placeholder: ENVIRONMENT === 'saas' ? '输入手机号邀请成员' : '输入账号进行创建'
172
- }), /*#__PURE__*/React.createElement("div", {
173
- style: {
174
- display: 'inline-block',
175
- width: 200,
176
- marginRight: 10
177
- }
178
- }, /*#__PURE__*/React.createElement(Select, {
179
- placeholder: "\u9009\u62E9\u52A0\u5165\u7528\u6237\u7EC4",
180
241
  style: {
181
- width: 200
242
+ width: '248px'
182
243
  },
183
- options: dealAllGroupInfos,
184
- value: targetGroup,
185
- showArrow: true,
186
- showSearch: true,
187
- mode: "multiple",
188
- onChange: function onChange(v, option) {
189
- setTargetGroup(option);
244
+ allowClear: true,
245
+ onChange: function onChange(e) {
246
+ setQueryParams(_objectSpread(_objectSpread({}, queryParams), {}, {
247
+ roleId: e
248
+ }));
190
249
  },
191
- maxTagCount: 1,
192
- dropdownRender: function dropdownRender(menu) {
193
- return /*#__PURE__*/React.createElement("div", {
194
- id: "ant-select"
195
- }, /*#__PURE__*/React.createElement("div", {
196
- className: "select-group"
197
- }, /*#__PURE__*/React.createElement("span", {
198
- onClick: function onClick() {
199
- setTargetGroup(dealAllGroupInfos);
200
- },
201
- className: "all-btn"
202
- }, "\u5168\u9009"), /*#__PURE__*/React.createElement("span", {
203
- onClick: function onClick() {
204
- setTargetGroup([]);
205
- },
206
- className: "delete-btn"
207
- }, "\u6E05\u7A7A")), menu);
208
- }
209
- })), /*#__PURE__*/React.createElement(Button, {
210
- onClick: inviteMember,
211
- loading: inviteBtnLoading,
250
+ suffixIcon: /*#__PURE__*/React.createElement("i", {
251
+ style: {
252
+ fontSize: 14,
253
+ color: '#5f6085'
254
+ },
255
+ className: "bsicon xiangxia"
256
+ })
257
+ }))), /*#__PURE__*/React.createElement("div", {
258
+ className: "invite-list"
259
+ }, /*#__PURE__*/React.createElement("div", null, "\u6210\u5458\u5217\u8868"), /*#__PURE__*/React.createElement(Button, {
260
+ onClick: function onClick() {
261
+ setCreatedAppPanel(true);
262
+ form.resetFields();
263
+ form.setFieldsValue({
264
+ accountStatus: 1
265
+ });
266
+ },
267
+ disabled: !authority[10088],
212
268
  type: "primary",
213
269
  size: "middle"
214
- }, "\u521B\u5EFA")));
270
+ }, "\u6DFB\u52A0\u6210\u5458")), /*#__PURE__*/React.createElement(BizDialog, {
271
+ title: (userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) ? '编辑成员' : '新增成员',
272
+ open: createdAppPanel,
273
+ width: 520,
274
+ className: "setting-bizDialog",
275
+ closable: true,
276
+ onOk: function onOk() {
277
+ form.submit();
278
+ },
279
+ onCancel: function onCancel() {
280
+ queryPanel(_objectSpread({}, queryParams));
281
+ setCreatedAppPanel(false);
282
+ },
283
+ confirmLoading: createAppLoading
284
+ }, /*#__PURE__*/React.createElement("div", {
285
+ className: "user-dialog-content"
286
+ }, /*#__PURE__*/React.createElement(Form, {
287
+ form: form,
288
+ onFinish: onFinish,
289
+ colon: false,
290
+ scrollToFirstError: true
291
+ }, /*#__PURE__*/React.createElement(Form.Item, {
292
+ name: 'email',
293
+ label: "\u8D26\u53F7",
294
+ rules: [{
295
+ required: true,
296
+ message: '请输入账号'
297
+ }, {
298
+ pattern: isDemo ? /^[a-z0-9._@]{5,30}$/ : /^1[3-9]\d{8,9}$/,
299
+ message: isDemo ? '请输入5~30个字符,可包含小写字母和数字、特殊字符(_.@)' : '手机号格式错误'
300
+ }]
301
+ }, /*#__PURE__*/React.createElement(Input, {
302
+ disabled: (userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) !== undefined,
303
+ maxLength: 50,
304
+ placeholder: '请输入账号'
305
+ })), /*#__PURE__*/React.createElement(Form.Item, {
306
+ name: 'username',
307
+ label: "\u59D3\u540D",
308
+ rules: [{
309
+ required: true,
310
+ message: '请输入姓名'
311
+ }]
312
+ }, /*#__PURE__*/React.createElement(Input, {
313
+ onBlur: function onBlur(event) {
314
+ var _event$target, _event$target$value;
315
+ form.setFieldsValue({
316
+ username: event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : (_event$target$value = _event$target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.replace(/ /g, '')
317
+ });
318
+ },
319
+ maxLength: 10,
320
+ placeholder: '请输入姓名'
321
+ })), /*#__PURE__*/React.createElement(Form.Item, {
322
+ name: 'roleIds',
323
+ label: "\u89D2\u8272",
324
+ rules: [{
325
+ required: true,
326
+ message: '请选择角色'
327
+ }]
328
+ }, /*#__PURE__*/React.createElement(BizSelect, {
329
+ className: "label-group",
330
+ options: userList,
331
+ multiple: true,
332
+ placeholder: '请选择角色',
333
+ labelField: "roleName",
334
+ keyField: "id"
335
+ })), /*#__PURE__*/React.createElement(Form.Item, {
336
+ name: 'deptIds',
337
+ label: "\u90E8\u95E8",
338
+ className: "no-rules-label"
339
+ }, /*#__PURE__*/React.createElement(TreeSelect, {
340
+ treeDefaultExpandAll: true,
341
+ multiple: true,
342
+ fieldNames: {
343
+ label: 'name',
344
+ value: 'id'
345
+ },
346
+ placeholder: "\u8BF7\u9009\u62E9\u4E0A\u7EA7\u90E8\u95E8",
347
+ treeData: departmentList
348
+ })), !isAdmin && /*#__PURE__*/React.createElement(Form.Item, {
349
+ name: 'accountStatus',
350
+ label: "\u72B6\u6001",
351
+ className: "account-status",
352
+ rules: [{
353
+ required: true,
354
+ message: '请选择状态'
355
+ }]
356
+ }, /*#__PURE__*/React.createElement(Radio.Group, {
357
+ buttonStyle: "outline"
358
+ }, /*#__PURE__*/React.createElement(Radio, {
359
+ value: 1
360
+ }, "\u6B63\u5E38"), /*#__PURE__*/React.createElement(Radio, {
361
+ value: 2
362
+ }, "\u505C\u7528"))), !(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) && /*#__PURE__*/React.createElement(Form.Item, {
363
+ name: 'password',
364
+ label: "\u5BC6\u7801",
365
+ rules: [{
366
+ required: true,
367
+ message: '请输入密码'
368
+ }, {
369
+ pattern: new RegExp(passwordRule === null || passwordRule === void 0 ? void 0 : passwordRule.rule, 'g'),
370
+ message: passwordRule === null || passwordRule === void 0 ? void 0 : passwordRule.description
371
+ }]
372
+ }, /*#__PURE__*/React.createElement(Input.Password, {
373
+ maxLength: 50,
374
+ placeholder: '请输入密码'
375
+ }))))));
215
376
  };
216
377
  export default UserGroup;
@@ -119,7 +119,7 @@ var GroupItem = function GroupItem(props) {
119
119
  className: "delete-btn"
120
120
  }, "\u5220\u9664")), /*#__PURE__*/React.createElement(BizDialog, {
121
121
  title: "\u786E\u8BA4\u5220\u9664",
122
- visible: deleteDialog,
122
+ open: deleteDialog,
123
123
  closable: true,
124
124
  onOk: function onOk() {
125
125
  deleteConfirm();
@@ -152,7 +152,7 @@ var VirtualApp = function VirtualApp(props) {
152
152
  className: "virtual-app-list-item empty-data"
153
153
  }, "\u6682\u65E0\u6570\u636E"))), /*#__PURE__*/React.createElement(BizDialog, {
154
154
  title: "\u5220\u9664\u865A\u62DF\u5E94\u7528",
155
- visible: deleteDialogShow,
155
+ open: deleteDialogShow,
156
156
  closable: true,
157
157
  onOk: toDelete,
158
158
  onCancel: function onCancel() {
@@ -115,7 +115,7 @@ var Cost = function Cost(props) {
115
115
  pagination: false
116
116
  }), /*#__PURE__*/React.createElement(BizDialog, {
117
117
  title: "\u89E3\u9664\u7ED1\u5B9A",
118
- visible: showDelDialog,
118
+ open: showDelDialog,
119
119
  closable: true,
120
120
  okText: "\u89E3\u9664\u7ED1\u5B9A",
121
121
  cancelText: "\u6682\u4E0D\u89E3\u9664",
@@ -1,26 +1,32 @@
1
1
  .company-setting-wechat-binding {
2
2
  min-height: 300px;
3
3
  max-height: 100%;
4
+ margin-top: 8px;
4
5
  padding: 0;
5
6
  overflow: auto;
7
+
6
8
  .wechat-title {
7
9
  display: flex;
8
10
  justify-content: space-between;
9
11
  margin-bottom: 20px;
10
12
  line-height: 16px;
13
+
11
14
  h4 {
12
15
  font-weight: normal;
13
16
  font-size: 16px;
14
17
  }
18
+
15
19
  a {
16
20
  color: #00a0ea;
17
21
  }
18
22
  }
23
+
19
24
  .wechat-account {
20
25
  img {
21
26
  width: 20px;
22
27
  height: 20px;
23
28
  }
29
+
24
30
  .wechat-name {
25
31
  display: inline-block;
26
32
  width: 80px;
@@ -30,18 +36,22 @@
30
36
  text-overflow: ellipsis;
31
37
  }
32
38
  }
39
+
33
40
  .untied-wechat {
34
41
  color: #00a0ea;
35
42
  cursor: pointer;
36
43
  }
44
+
37
45
  .c-dialog .c-dialog-content {
38
46
  padding: 20px;
39
47
  color: #858585;
40
48
  font-size: 14px;
49
+
41
50
  .c-input {
42
51
  color: initial;
43
52
  }
44
53
  }
54
+
45
55
  .c-data-grid {
46
56
  border-radius: 0;
47
57
  }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { DemoWrapper } from '@zgfe/business-lib';
2
+ import React from 'react';
3
+ import { SystemSetting } from '../..';
4
+ export default (function () {
5
+ return /*#__PURE__*/React.createElement(DemoWrapper, {
6
+ defaultApp: 348
7
+ }, /*#__PURE__*/React.createElement(SystemSetting, {
8
+ appList: []
9
+ }));
10
+ });