@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,29 +1,36 @@
1
1
  @import './../../../constants/icons/iconfont.css';
2
+
2
3
  .company-setting-cost {
3
4
  min-height: 400px;
4
5
  max-height: 100%;
6
+ margin-top: 8px;
5
7
  padding: 0;
6
8
  overflow: auto;
9
+
7
10
  h5 {
8
11
  font-weight: normal;
9
12
  font-size: 14px;
10
13
  }
14
+
11
15
  table {
12
16
  width: 100%;
13
17
  margin: 15px 0 40px 0;
14
18
  border-collapse: collapse;
19
+
15
20
  thead {
16
21
  color: #636363;
17
22
  font-weight: bold;
18
23
  font-size: 14px;
19
24
  background: #fbfbfb;
20
25
  }
26
+
21
27
  td,
22
28
  th {
23
29
  padding: 10px 15px;
24
30
  text-align: center;
25
31
  border: 1px solid #cecece;
26
32
  }
33
+
27
34
  td {
28
35
  height: 50px;
29
36
  }
@@ -6,16 +6,15 @@ import util from '../../utils/util';
6
6
  import { CompanySetting } from '../..';
7
7
  export default (function () {
8
8
  return /*#__PURE__*/React.createElement(DemoWrapper, {
9
- needMeta: true
9
+ defaultApp: 348
10
10
  }, /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
11
11
  value: {
12
12
  funPermissions: funPermissions,
13
13
  menusName: constants.menusName,
14
- getMenuRouterByName: util.getMenuRouterByName
14
+ getMenuRouterByName: util.getMenuRouterByName,
15
+ authority: sessionStorage.getItem('authorityList') ? JSON.parse(sessionStorage.getItem('authorityList')) : {}
15
16
  }
16
17
  }, /*#__PURE__*/React.createElement(CompanySetting, {
17
- showWeChatMenu: true,
18
- showMarketMenu: true,
19
18
  action: ''
20
19
  })));
21
20
  });
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const DepartmentList: React.FC<{
4
+ companyId: number;
5
+ closeCreateCallback: () => void;
6
+ }>;
7
+ export default DepartmentList;
@@ -0,0 +1,414 @@
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); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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."); }
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); }
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; }
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; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React, { useEffect, useState, useContext } from 'react';
14
+ import './index.less';
15
+ import util from './../../../utils/util';
16
+ import { Button, Form, Input, Spin, TreeSelect, notification } from 'antd';
17
+ import moment from 'moment';
18
+ import { BizTable, BizDialog, BizSelect, IconFont, BizGlobalDataContext } from '@zgfe/business-lib';
19
+ import { addDept, deleteDept,
20
+ // getGroupMembers,
21
+ queryDeptList, updateDept } from '../../../requests/department';
22
+ import { queryCompanyUser } from '../../../requests/role';
23
+ var DepartmentList = function DepartmentList(props) {
24
+ var _departmentList$, _departmentList$2, _departmentList$3;
25
+ var closeCreateCallback = props.closeCreateCallback;
26
+ // 弹窗
27
+ var _useState = useState(false),
28
+ _useState2 = _slicedToArray(_useState, 2),
29
+ createdAppPanel = _useState2[0],
30
+ setCreatedAppPanel = _useState2[1];
31
+ var _useState3 = useState(false),
32
+ _useState4 = _slicedToArray(_useState3, 2),
33
+ createAppLoading = _useState4[0],
34
+ setCreateAppLoading = _useState4[1];
35
+ var _useState5 = useState(false),
36
+ _useState6 = _slicedToArray(_useState5, 2),
37
+ delPanelState = _useState6[0],
38
+ setDelPanelState = _useState6[1];
39
+ var _useState7 = useState(false),
40
+ _useState8 = _slicedToArray(_useState7, 2),
41
+ loading = _useState8[0],
42
+ setLoading = _useState8[1];
43
+ var _useContext = useContext(BizGlobalDataContext),
44
+ authority = _useContext.authority;
45
+ // 初始数据
46
+ var _useState9 = useState(''),
47
+ _useState10 = _slicedToArray(_useState9, 2),
48
+ name = _useState10[0],
49
+ setName = _useState10[1];
50
+ var _useState11 = useState({
51
+ id: -1,
52
+ name: '',
53
+ parentId: -1,
54
+ deptBoss: '',
55
+ children: []
56
+ }),
57
+ _useState12 = _slicedToArray(_useState11, 2),
58
+ formParams = _useState12[0],
59
+ setFormParams = _useState12[1];
60
+ // 下拉数据
61
+ var _useState13 = useState([]),
62
+ _useState14 = _slicedToArray(_useState13, 2),
63
+ departmentList = _useState14[0],
64
+ setDepartmentList = _useState14[1];
65
+ var _useState15 = useState([]),
66
+ _useState16 = _slicedToArray(_useState15, 2),
67
+ allMembers = _useState16[0],
68
+ setAllMembers = _useState16[1];
69
+ var _Form$useForm = Form.useForm(),
70
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
71
+ form = _Form$useForm2[0];
72
+ useEffect(function () {
73
+ if (createdAppPanel || delPanelState) return;
74
+ setLoading(true);
75
+ // 请求部门列表数据
76
+ setTimeout(function () {
77
+ queryDeptList({
78
+ name: name
79
+ }).then(function (res) {
80
+ if (res && (res === null || res === void 0 ? void 0 : res.data) && res.code === '101000') {
81
+ var app = util.convertData(res === null || res === void 0 ? void 0 : res.data, name);
82
+ setLoading(false);
83
+ setDepartmentList(app);
84
+ } else {
85
+ setTimeout(function () {
86
+ setLoading(false);
87
+ }, 2000);
88
+ }
89
+ }).catch(function (err) {
90
+ setDepartmentList([]);
91
+ console.error(err);
92
+ });
93
+ }, 500);
94
+ if (name) return;
95
+ // 请求负责人数据
96
+ queryCompanyUser({
97
+ id: null
98
+ }).then(function (res) {
99
+ if (res === null || res === void 0 ? void 0 : res.data) {
100
+ setAllMembers(res === null || res === void 0 ? void 0 : res.data);
101
+ }
102
+ }).catch(function (err) {
103
+ setAllMembers([]);
104
+ console.error(err);
105
+ });
106
+ // getGroupMembers()
107
+ // .then((res) => {
108
+ // const result = res as ApiResult<void>; // 使用类型断言将返回的数据转换为ApiResult<void>
109
+ // if (result && result?.company_members) {
110
+ // setAllMembers(
111
+ // (result?.company_members || []).map((item) => {
112
+ // return {
113
+ // ...item,
114
+ // value: item.email,
115
+ // label: item.email,
116
+ // };
117
+ // }),
118
+ // );
119
+ // } else {
120
+ // setAllMembers([]);
121
+ // }
122
+ // })
123
+ // .catch((err) => {
124
+ // setAllMembers([]);
125
+ // console.error(err);
126
+ // });
127
+ }, [createdAppPanel, delPanelState, name]);
128
+ // 列表数据
129
+ var columns = [{
130
+ title: '部门名称',
131
+ dataIndex: 'name',
132
+ ellipsis: true,
133
+ with: 334
134
+ }, {
135
+ title: '负责人',
136
+ with: 334,
137
+ ellipsis: true,
138
+ render: function render(data) {
139
+ var _data$deptBoss;
140
+ return data === null || data === void 0 ? void 0 : (_data$deptBoss = data.deptBoss) === null || _data$deptBoss === void 0 ? void 0 : _data$deptBoss.replace(/,/g, '、');
141
+ }
142
+ }, {
143
+ title: '创建时间',
144
+ with: 334,
145
+ render: function render(data) {
146
+ return moment(data === null || data === void 0 ? void 0 : data.createdTime).format('YYYY-MM-DD HH:mm:ss');
147
+ }
148
+ }, {
149
+ title: '操作',
150
+ with: 150,
151
+ render: function render(data) {
152
+ return /*#__PURE__*/React.createElement("div", {
153
+ className: "operating"
154
+ }, data.parentId !== 0 && /*#__PURE__*/React.createElement(React.Fragment, null, authority[10097] && /*#__PURE__*/React.createElement("a", {
155
+ onClick: function onClick() {
156
+ return toAppSetting(data);
157
+ }
158
+ }, "\u7F16\u8F91"), authority[10098] && /*#__PURE__*/React.createElement("a", {
159
+ onClick: function onClick() {
160
+ return showDelPanel(data);
161
+ }
162
+ }, "\u5220\u9664")));
163
+ }
164
+ }];
165
+ // 打开编辑弹窗
166
+ var toAppSetting = function toAppSetting(data) {
167
+ var _data$deptBoss$split;
168
+ var arr = (_data$deptBoss$split = data.deptBoss.split(',')) === null || _data$deptBoss$split === void 0 ? void 0 : _data$deptBoss$split.map(function (item) {
169
+ var _app$, _app$2;
170
+ var app = allMembers.filter(function (v) {
171
+ return v.email === item;
172
+ });
173
+ return {
174
+ email: (_app$ = app[0]) === null || _app$ === void 0 ? void 0 : _app$.email,
175
+ id: (_app$2 = app[0]) === null || _app$2 === void 0 ? void 0 : _app$2.id
176
+ };
177
+ });
178
+ form.setFieldsValue(_objectSpread(_objectSpread({}, data), {}, {
179
+ parentId: data.parentId,
180
+ deptBoss: data.deptBoss ? arr.filter(function (v) {
181
+ return v.email !== undefined;
182
+ }) : []
183
+ }));
184
+ setCreatedAppPanel(true);
185
+ setFormParams(_objectSpread(_objectSpread({}, data), {}, {
186
+ children: data.children
187
+ }));
188
+ };
189
+ // 打开删除弹窗
190
+ var showDelPanel = function showDelPanel(data) {
191
+ setFormParams(_objectSpread(_objectSpread({}, data), {}, {
192
+ children: data.children
193
+ }));
194
+ setDelPanelState(true);
195
+ };
196
+ // 删除
197
+ var onDelConfirm = function onDelConfirm() {
198
+ var params = {
199
+ ids: util.getAllIds(formParams)
200
+ };
201
+ deleteDept(params).then(function (res) {
202
+ if ((res === null || res === void 0 ? void 0 : res.code) === '101000') {
203
+ notification.success({
204
+ message: '删除成功'
205
+ });
206
+ setDelPanelState(false);
207
+ }
208
+ }).catch(function (err) {
209
+ setDelPanelState(false);
210
+ notification.error({
211
+ message: '删除失败,请重试'
212
+ });
213
+ console.error(err);
214
+ });
215
+ };
216
+ // 编辑||创建
217
+ var onFinish = function onFinish() {
218
+ setCreateAppLoading(true);
219
+ var msg = '';
220
+ var params = {
221
+ deptBoss: formParams.deptBoss,
222
+ parentId: formParams.parentId,
223
+ id: formParams.id === -1 ? null : formParams.id,
224
+ name: formParams.name
225
+ };
226
+ (formParams.id === -1 ? addDept : updateDept)(params).then(function (res) {
227
+ if ((res === null || res === void 0 ? void 0 : res.code) !== '101000') {
228
+ setTimeout(function () {
229
+ setCreateAppLoading(false);
230
+ }, 1000);
231
+ return;
232
+ }
233
+ setCreatedAppPanel(false);
234
+ setCreateAppLoading(false);
235
+ // 通知数据刷新
236
+ msg = formParams.id === -1 ? '创建成功' : '编辑成功';
237
+ notification.success({
238
+ message: msg
239
+ });
240
+ }).catch(function () {
241
+ setCreateAppLoading(false);
242
+ notification.error({
243
+ message: formParams.id === -1 ? '创建失败,请重试' : '编辑失败,请重试'
244
+ });
245
+ });
246
+ };
247
+ return /*#__PURE__*/React.createElement(Spin, {
248
+ spinning: loading
249
+ }, /*#__PURE__*/React.createElement("div", {
250
+ className: "department-list"
251
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
252
+ style: {
253
+ marginTop: '8px',
254
+ marginLeft: '2px'
255
+ }
256
+ }, /*#__PURE__*/React.createElement(Input, {
257
+ prefix: /*#__PURE__*/React.createElement(IconFont, {
258
+ type: "sousuo"
259
+ }),
260
+ onChange: function onChange(e) {
261
+ var _e$target, _e$target$value;
262
+ setName(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : (_e$target$value = _e$target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim());
263
+ },
264
+ style: {
265
+ width: '264px',
266
+ marginBottom: '24px'
267
+ },
268
+ placeholder: '请输入部门名称'
269
+ }))), /*#__PURE__*/React.createElement("div", {
270
+ className: "app-list-head"
271
+ }, /*#__PURE__*/React.createElement("div", null, "\u90E8\u95E8\u5217\u8868"), /*#__PURE__*/React.createElement(Button, {
272
+ type: "primary",
273
+ disabled: !authority[10096],
274
+ onClick: function onClick() {
275
+ setCreatedAppPanel(true);
276
+ setFormParams({
277
+ id: -1,
278
+ name: '',
279
+ parentId: -1,
280
+ deptBoss: '',
281
+ children: []
282
+ });
283
+ form.resetFields();
284
+ }
285
+ }, "\u65B0\u589E\u90E8\u95E8")), /*#__PURE__*/React.createElement(BizDialog, {
286
+ className: "setting-bizDialog",
287
+ title: formParams.id === -1 ? '新增部门' : '编辑部门',
288
+ open: createdAppPanel,
289
+ width: 520,
290
+ closable: true,
291
+ onOk: function onOk() {
292
+ form.submit();
293
+ },
294
+ onCancel: function onCancel() {
295
+ setCreatedAppPanel(false);
296
+ closeCreateCallback && closeCreateCallback();
297
+ },
298
+ confirmLoading: createAppLoading
299
+ }, /*#__PURE__*/React.createElement("div", {
300
+ className: "department-dialog-content"
301
+ }, /*#__PURE__*/React.createElement(Form, {
302
+ form: form,
303
+ onFinish: onFinish,
304
+ colon: false,
305
+ scrollToFirstError: true,
306
+ onValuesChange: function onValuesChange(value) {
307
+ var _value$name;
308
+ if (value === null || value === void 0 ? void 0 : (_value$name = value.name) === null || _value$name === void 0 ? void 0 : _value$name.trim()) {
309
+ setFormParams(_objectSpread(_objectSpread({}, formParams), {}, {
310
+ name: value === null || value === void 0 ? void 0 : value.name
311
+ }));
312
+ } else if (value === null || value === void 0 ? void 0 : value.parentId) {
313
+ setFormParams(_objectSpread(_objectSpread({}, formParams), {}, {
314
+ parentId: value === null || value === void 0 ? void 0 : value.parentId
315
+ }));
316
+ } else {
317
+ var _value$deptBoss;
318
+ var obj = value === null || value === void 0 ? void 0 : (_value$deptBoss = value.deptBoss) === null || _value$deptBoss === void 0 ? void 0 : _value$deptBoss.map(function (item) {
319
+ return item.email;
320
+ });
321
+ setFormParams(_objectSpread(_objectSpread({}, formParams), {}, {
322
+ deptBoss: obj === null || obj === void 0 ? void 0 : obj.join(',')
323
+ }));
324
+ }
325
+ }
326
+ }, /*#__PURE__*/React.createElement(Form.Item, {
327
+ name: 'parentId',
328
+ label: "\u4E0A\u7EA7\u90E8\u95E8",
329
+ rules: [{
330
+ required: true,
331
+ message: '请选择上级部门'
332
+ }]
333
+ }, /*#__PURE__*/React.createElement(TreeSelect, {
334
+ treeDefaultExpandedKeys: (_departmentList$ = departmentList[0]) === null || _departmentList$ === void 0 ? void 0 : _departmentList$.defaultRowKeys,
335
+ placeholder: "\u8BF7\u9009\u62E9\u4E0A\u7EA7\u90E8\u95E8",
336
+ treeData: departmentList,
337
+ suffixIcon: /*#__PURE__*/React.createElement("i", {
338
+ style: {
339
+ fontSize: 14,
340
+ color: '#5f6085'
341
+ },
342
+ className: "bsicon xiangxia"
343
+ })
344
+ })), /*#__PURE__*/React.createElement(Form.Item, {
345
+ name: 'name',
346
+ label: "\u90E8\u95E8\u540D\u79F0",
347
+ rules: [{
348
+ required: true,
349
+ message: '请输入部门名称'
350
+ }]
351
+ }, /*#__PURE__*/React.createElement(Input, {
352
+ onBlur: function onBlur(event) {
353
+ var _event$target, _event$target$value;
354
+ form.setFieldsValue({
355
+ name: 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, '')
356
+ });
357
+ },
358
+ maxLength: 50,
359
+ placeholder: '请输入部门名称'
360
+ })), /*#__PURE__*/React.createElement(Form.Item, {
361
+ name: 'deptBoss',
362
+ label: "\u8D1F\u8D23\u4EBA",
363
+ rules: [{
364
+ required: true,
365
+ message: '请选择负责人'
366
+ }]
367
+ }, /*#__PURE__*/React.createElement(BizSelect, {
368
+ className: "label-group",
369
+ options: allMembers,
370
+ multiple: true,
371
+ placeholder: '请选择负责人',
372
+ labelField: "email",
373
+ keyField: "id"
374
+ }))))), /*#__PURE__*/React.createElement(BizDialog, {
375
+ title: "\u5220\u9664\u5E94\u7528",
376
+ open: delPanelState,
377
+ closable: true,
378
+ className: "setting-bizDialog",
379
+ onOk: function onOk() {
380
+ setDelPanelState(false);
381
+ onDelConfirm();
382
+ },
383
+ onCancel: function onCancel() {
384
+ setDelPanelState(false);
385
+ }
386
+ }, "\u786E\u8BA4\u8981\u5220\u9664\u5F53\u524D\u90E8\u95E8\u5417?"), /*#__PURE__*/React.createElement("div", {
387
+ className: "department-list-content"
388
+ }, ((_departmentList$2 = departmentList[0]) === null || _departmentList$2 === void 0 ? void 0 : _departmentList$2.defaultRowKeys.length) > 0 && !name ? /*#__PURE__*/React.createElement(BizTable, {
389
+ rowKey: "key",
390
+ dataSource: departmentList,
391
+ expandable: {
392
+ defaultExpandedRowKeys: (_departmentList$3 = departmentList[0]) === null || _departmentList$3 === void 0 ? void 0 : _departmentList$3.defaultRowKeys
393
+ },
394
+ columns: columns,
395
+ scroll: {
396
+ x: 1000,
397
+ y: 550
398
+ },
399
+ pagination: false
400
+ }) : null, name ? /*#__PURE__*/React.createElement(BizTable, {
401
+ rowKey: "key",
402
+ dataSource: departmentList,
403
+ expandable: {
404
+ defaultExpandAllRows: true
405
+ },
406
+ scroll: {
407
+ x: 1000,
408
+ y: 550
409
+ },
410
+ columns: columns,
411
+ pagination: false
412
+ }) : null)));
413
+ };
414
+ export default DepartmentList;
@@ -0,0 +1,157 @@
1
+ @import './../../../constants/icons/iconfont.css';
2
+
3
+ .department-list {
4
+ height: 100%;
5
+ padding: 0;
6
+ overflow: auto;
7
+
8
+ .ant-form-item {
9
+ .ant-form-item-control-input {
10
+ width: 392px;
11
+ height: 32px;
12
+ }
13
+ }
14
+
15
+ .ant-input {
16
+ border-color: @background-color-base !important;
17
+
18
+ &:focus {
19
+ border-color: @primary-color !important;
20
+ }
21
+ }
22
+
23
+ .ant-table-cell {
24
+ height: 50px;
25
+ }
26
+
27
+ .ant-table-row-indent + .ant-table-row-expand-icon {
28
+ margin-top: 0;
29
+ }
30
+
31
+ .app-list-head {
32
+ display: flex;
33
+ align-items: center;
34
+ justify-content: space-between;
35
+
36
+ > div {
37
+ color: var(--io-n, #021429);
38
+ font-weight: 500;
39
+ font-size: 16px;
40
+ font-family: PingFang SC;
41
+ font-style: normal;
42
+ line-height: 24px;
43
+ /* 150% */
44
+ }
45
+ }
46
+
47
+ .platform-icons {
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: flex-start;
51
+ width: 100%;
52
+
53
+ span {
54
+ margin-right: 10px;
55
+ color: #cfcfcf;
56
+ font-size: 16px;
57
+ }
58
+ }
59
+
60
+ .department-list-content {
61
+ margin-top: 16px;
62
+
63
+ .c-grid-cell,
64
+ .c-grid-header-cell {
65
+ text-align: left !important;
66
+ border: none;
67
+ border-bottom: 1px solid #d1d1d1;
68
+ }
69
+
70
+ .c-grid-cell {
71
+ text-align: left !important;
72
+ }
73
+
74
+ .c-grid-body .c-grid-row:nth-child(2n) {
75
+ background: #fff !important;
76
+ }
77
+
78
+ .app-name {
79
+ cursor: pointer;
80
+
81
+ &:hover {
82
+ color: #00a0ea;
83
+ }
84
+ }
85
+
86
+ .operating {
87
+ display: flex;
88
+ gap: 16px;
89
+ }
90
+ }
91
+ }
92
+
93
+ .department-dialog-content {
94
+ .ant-input {
95
+ border-color: @background-color-base !important;
96
+
97
+ &:focus {
98
+ border-color: @primary-color !important;
99
+ }
100
+ }
101
+
102
+ .ant-select-selector {
103
+ border-color: @background-color-base !important;
104
+ }
105
+
106
+ .biz-select-handle-input {
107
+ .ant-input {
108
+ border-color: @background-color-base !important;
109
+
110
+ &:focus {
111
+ border-color: @background-color-base !important;
112
+ }
113
+ }
114
+
115
+ &:focus {
116
+ border-color: @primary-color !important;
117
+ }
118
+ }
119
+
120
+ .ant-input-status-error {
121
+ border: 1px solid #fb5547 !important;
122
+
123
+ &:focus {
124
+ border-color: #fb5547 !important;
125
+ }
126
+ }
127
+
128
+ .ant-select-status-error {
129
+ border: none !important;
130
+
131
+ &:focus {
132
+ box-shadow: 0 0 0 2px rgba(251, 85, 71, 0.2) !important;
133
+ }
134
+ }
135
+
136
+ .biz-select-handle-status-error.active:not(.disable) {
137
+ box-shadow: 0 0 0 2px rgba(251, 85, 71, 0.2) !important;
138
+ }
139
+
140
+ .biz-select-handle-status-error {
141
+ .ant-input.ant-input-status-error:focus:not(.ant-input-disable):not(.ant-input-borderless),
142
+ .ant-input.ant-input-status-error-focused:not(.ant-input-disable):not(.ant-input-borderless) {
143
+ box-shadow: none !important;
144
+ }
145
+ }
146
+
147
+ .ant-form-item:last-of-type {
148
+ margin-bottom: 0;
149
+ }
150
+
151
+ color: #5f6085;
152
+
153
+ .ant-form-item-label {
154
+ width: 80px;
155
+ text-align: right;
156
+ }
157
+ }
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
3
  declare const CompanySetting: React.FC<{
4
- showWeChatMenu: boolean;
5
- showMarketMenu: boolean;
6
4
  action: string;
7
5
  settingCallback?: (type: string, obj?: {
8
6
  [key: string]: any;