@zgfe/modules-settings 1.2.11 → 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.
- package/es/components/settingTabs/index.less +3 -0
- package/es/constants/api.d.ts +2 -1
- package/es/constants/api.js +2 -1
- package/es/constants/icons/demo.css +0 -0
- package/es/constants/icons/demo_index.html +0 -0
- package/es/constants/icons/iconfont.css +0 -0
- package/es/constants/icons/iconfont.js +0 -0
- package/es/constants/icons/iconfont.json +0 -0
- package/es/constants/icons/iconfont.ttf +0 -0
- package/es/constants/icons/iconfont.woff +0 -0
- package/es/constants/icons/iconfont.woff2 +0 -0
- package/es/modules/appSettings/demo/index.d.ts +3 -1
- package/es/modules/appSettings/demo/index.js +16 -12
- package/es/modules/appSettings/index.js +6 -7
- package/es/modules/appSettings/member/index.js +75 -82
- package/es/modules/appSettings/member/index.less +4 -1
- package/es/modules/appSettings/member/modal.js +1 -1
- package/es/modules/companySetting/appList/index.js +23 -20
- package/es/modules/companySetting/appList/index.less +22 -0
- package/es/modules/companySetting/cost/index.less +7 -0
- package/es/modules/companySetting/demo.js +3 -4
- package/es/modules/companySetting/department/index.js +104 -46
- package/es/modules/companySetting/department/index.less +57 -4
- package/es/modules/companySetting/index.d.ts +0 -2
- package/es/modules/companySetting/index.js +135 -137
- package/es/modules/companySetting/index.less +30 -4
- package/es/modules/companySetting/info/index.js +6 -1
- package/es/modules/companySetting/info/index.less +7 -0
- package/es/modules/companySetting/operationLog/index.js +10 -4
- package/es/modules/companySetting/operationLog/index.less +6 -0
- package/es/modules/companySetting/role/index.js +242 -87
- package/es/modules/companySetting/role/index.less +62 -2
- package/es/modules/companySetting/style/common.less +13 -2
- package/es/modules/companySetting/user/index.d.ts +1 -0
- package/es/modules/companySetting/user/index.js +75 -32
- package/es/modules/companySetting/user/index.less +90 -3
- package/es/modules/companySetting/user/invite.d.ts +1 -0
- package/es/modules/companySetting/user/invite.js +112 -27
- package/es/modules/companySetting/wechatBinding/index.less +10 -0
- package/es/modules/systemSetting/demo.d.ts +3 -0
- package/es/modules/systemSetting/demo.js +10 -0
- package/es/modules/systemSetting/notice/configItem/index.js +5 -1
- package/es/requests/role.d.ts +12 -3
- package/es/requests/role.js +6 -6
- package/es/types/companySetting.d.ts +1 -0
- package/es/utils/util.d.ts +7 -1
- package/package.json +4 -4
|
@@ -14,7 +14,7 @@ import './index.less';
|
|
|
14
14
|
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
15
15
|
import request from './../../utils/ajax';
|
|
16
16
|
import api from './../../constants/api';
|
|
17
|
-
import PageLoading from '../../components/pageLoading';
|
|
17
|
+
// import PageLoading from '../../components/pageLoading';
|
|
18
18
|
import { Tabs, notification } from 'antd';
|
|
19
19
|
import Info from './info';
|
|
20
20
|
import User from './user';
|
|
@@ -25,17 +25,15 @@ import WechatBinding from './wechatBinding';
|
|
|
25
25
|
import OperationLog from './operationLog';
|
|
26
26
|
import DepartmentList from './department';
|
|
27
27
|
import RoleList from './role';
|
|
28
|
+
import PageLoading from '../../components/pageLoading';
|
|
28
29
|
var CompanySetting = function CompanySetting(props) {
|
|
29
|
-
var
|
|
30
|
-
showMarketMenu = props.showMarketMenu,
|
|
31
|
-
action = props.action,
|
|
30
|
+
var action = props.action,
|
|
32
31
|
settingCallback = props.settingCallback;
|
|
33
32
|
// #todo 需要修改主应用传入参数和business-lib数据仓库
|
|
34
33
|
var apisOkNum = 0;
|
|
35
34
|
var _useContext = useContext(BizGlobalDataContext),
|
|
36
35
|
envs = _useContext.envs,
|
|
37
|
-
|
|
38
|
-
currentApp = _useContext.currentApp;
|
|
36
|
+
authority = _useContext.authority;
|
|
39
37
|
var _ref = envs || {},
|
|
40
38
|
zgText = _ref.zgText,
|
|
41
39
|
showVirtualApp = _ref.showVirtualApp,
|
|
@@ -76,9 +74,8 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
76
74
|
setCompanyId = _useState16[1];
|
|
77
75
|
// groupInfos
|
|
78
76
|
var _useState17 = useState([]),
|
|
79
|
-
_useState18 = _slicedToArray(_useState17,
|
|
80
|
-
allGroupInfos = _useState18[0]
|
|
81
|
-
setAllGroupInfos = _useState18[1];
|
|
77
|
+
_useState18 = _slicedToArray(_useState17, 1),
|
|
78
|
+
allGroupInfos = _useState18[0];
|
|
82
79
|
var _useState19 = useState({}),
|
|
83
80
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
84
81
|
groupHashList = _useState20[0],
|
|
@@ -100,9 +97,8 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
100
97
|
setCompanyRealAppList = _useState26[1];
|
|
101
98
|
// queryLeftMenus
|
|
102
99
|
var _useState27 = useState([]),
|
|
103
|
-
_useState28 = _slicedToArray(_useState27,
|
|
104
|
-
leftMenus = _useState28[0]
|
|
105
|
-
setLeftMenus = _useState28[1];
|
|
100
|
+
_useState28 = _slicedToArray(_useState27, 1),
|
|
101
|
+
leftMenus = _useState28[0];
|
|
106
102
|
var _useState29 = useState(0),
|
|
107
103
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
108
104
|
serviceType = _useState30[0],
|
|
@@ -178,24 +174,27 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
178
174
|
method: 'get'
|
|
179
175
|
}).then(function (res) {
|
|
180
176
|
setCompanyAppList(res && res.data.appList || []);
|
|
181
|
-
if (settingCurrentUser && authConfig && authConfig.dataAuth) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
177
|
+
// if (settingCurrentUser && authConfig && authConfig.dataAuth) {
|
|
178
|
+
// let appIds = authConfig.dataAuth.map((item) => {
|
|
179
|
+
// return item.appId;
|
|
180
|
+
// });
|
|
181
|
+
// if (appIds.includes(0) || isAdmin) {
|
|
182
|
+
// setAppList((res && res.data.appList) || []);
|
|
183
|
+
// } else {
|
|
184
|
+
// let result: AppListItem[] = [];
|
|
185
|
+
// res &&
|
|
186
|
+
// res.data.appList &&
|
|
187
|
+
// res.data.appList.forEach((item: AppListItem) => {
|
|
188
|
+
// if (appIds.includes(item.id)) {
|
|
189
|
+
// result.push(item);
|
|
190
|
+
// }
|
|
191
|
+
// });
|
|
192
|
+
// setAppList(result);
|
|
193
|
+
// }
|
|
194
|
+
// } else {
|
|
195
|
+
// setAppList((res && res.data.appList) || []);
|
|
196
|
+
// }
|
|
197
|
+
setAppList(res && res.data.appList || []);
|
|
199
198
|
apisOkNum += 1;
|
|
200
199
|
setPageReady(apisOkNum);
|
|
201
200
|
}).catch(function () {
|
|
@@ -203,77 +202,85 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
203
202
|
message: '信息获取失败1'
|
|
204
203
|
});
|
|
205
204
|
});
|
|
206
|
-
request(api.app.queryLeftMenus, {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
})
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
205
|
+
// request<void>(api.app.queryLeftMenus, {
|
|
206
|
+
// method: 'get',
|
|
207
|
+
// params: {
|
|
208
|
+
// appId: currentApp?.appId,
|
|
209
|
+
// },
|
|
210
|
+
// })
|
|
211
|
+
// .then((res: ApiResult<void> | null) => {
|
|
212
|
+
// let menus = (res && res.data) || [];
|
|
213
|
+
// let menusNameMap: { [key: string]: LeftMenusItem } = {};
|
|
214
|
+
// let formatMenus = (menus: LeftMenusItem[]) => {
|
|
215
|
+
// menus.forEach((item) => {
|
|
216
|
+
// item.routeName = getMenuRouterByName!(item.name);
|
|
217
|
+
// menusNameMap[item.name] = item;
|
|
218
|
+
// if (item.childrens) {
|
|
219
|
+
// formatMenus(item.childrens);
|
|
220
|
+
// }
|
|
221
|
+
// });
|
|
222
|
+
// };
|
|
223
|
+
// formatMenus(menus);
|
|
224
|
+
// setLeftMenus(menus);
|
|
225
|
+
// apisOkNum += 1;
|
|
226
|
+
// setPageReady(apisOkNum);
|
|
227
|
+
// })
|
|
228
|
+
// .catch(() => {
|
|
229
|
+
// notification.error({
|
|
230
|
+
// message: '信息获取失败3',
|
|
231
|
+
// });
|
|
232
|
+
// });
|
|
232
233
|
}).catch(function () {
|
|
233
234
|
notification.error({
|
|
234
235
|
message: '信息获取失败4'
|
|
235
236
|
});
|
|
236
237
|
});
|
|
237
|
-
request(api.setting.groupInfos, {
|
|
238
|
-
|
|
239
|
-
})
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
request(api.setting.groupInfos, {
|
|
253
|
-
method: 'get'
|
|
254
|
-
}).then(function (res) {
|
|
255
|
-
if (res && res.flag === 101) {
|
|
256
|
-
setAllGroupInfos((res.infos || []).reverse());
|
|
257
|
-
}
|
|
258
|
-
}).catch(function () {
|
|
259
|
-
notification.error({
|
|
260
|
-
message: '信息获取失败'
|
|
261
|
-
});
|
|
262
|
-
});
|
|
263
|
-
};
|
|
264
|
-
var updateUserAuth = function updateUserAuth(params) {
|
|
265
|
-
return request(api.setting.updateUserAuth, {
|
|
266
|
-
method: 'post',
|
|
267
|
-
params: params
|
|
268
|
-
}).then(function () {
|
|
269
|
-
// if (res.flag === 101) {
|
|
270
|
-
// }
|
|
271
|
-
}).catch(function () {
|
|
272
|
-
notification.error({
|
|
273
|
-
message: '信息获取失败'
|
|
274
|
-
});
|
|
275
|
-
});
|
|
238
|
+
// request<void>(api.setting.groupInfos, {
|
|
239
|
+
// method: 'get',
|
|
240
|
+
// })
|
|
241
|
+
// .then((res: ApiResult<void> | null) => {
|
|
242
|
+
// if (res && res.flag === 101) {
|
|
243
|
+
// setAllGroupInfos((res.infos || []).reverse());
|
|
244
|
+
// }
|
|
245
|
+
// apisOkNum += 1;
|
|
246
|
+
// setPageReady(apisOkNum);
|
|
247
|
+
// })
|
|
248
|
+
// .catch(() => {
|
|
249
|
+
// notification.error({
|
|
250
|
+
// message: '信息获取失败2',
|
|
251
|
+
// });
|
|
252
|
+
// });
|
|
276
253
|
};
|
|
254
|
+
// const refreshGroupList = () => {
|
|
255
|
+
// request<void>(api.setting.groupInfos, {
|
|
256
|
+
// method: 'get',
|
|
257
|
+
// })
|
|
258
|
+
// .then((res: ApiResult<void> | null) => {
|
|
259
|
+
// if (res && res.flag === 101) {
|
|
260
|
+
// setAllGroupInfos((res.infos || []).reverse());
|
|
261
|
+
// }
|
|
262
|
+
// })
|
|
263
|
+
// .catch(() => {
|
|
264
|
+
// notification.error({
|
|
265
|
+
// message: '信息获取失败',
|
|
266
|
+
// });
|
|
267
|
+
// });
|
|
268
|
+
// };
|
|
269
|
+
// const updateUserAuth = (params: FormData) => {
|
|
270
|
+
// return request<{}>(api.setting.updateUserAuth, {
|
|
271
|
+
// method: 'post',
|
|
272
|
+
// params,
|
|
273
|
+
// })
|
|
274
|
+
// .then(() => {
|
|
275
|
+
// // if (res.flag === 101) {
|
|
276
|
+
// // }
|
|
277
|
+
// })
|
|
278
|
+
// .catch(() => {
|
|
279
|
+
// notification.error({
|
|
280
|
+
// message: '信息获取失败',
|
|
281
|
+
// });
|
|
282
|
+
// });
|
|
283
|
+
// };
|
|
277
284
|
var changeCompanyNameCallback = function changeCompanyNameCallback() {
|
|
278
285
|
getSettingData();
|
|
279
286
|
settingCallback && settingCallback('settingChangeCompanyNameCallback');
|
|
@@ -283,15 +290,13 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
283
290
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
284
291
|
while (1) switch (_context.prev = _context.next) {
|
|
285
292
|
case 0:
|
|
286
|
-
|
|
287
|
-
return updateUserAuth(formData);
|
|
288
|
-
case 2:
|
|
293
|
+
// await updateUserAuth(formData);
|
|
289
294
|
getSettingData();
|
|
290
295
|
settingCallback && settingCallback('settingDelAppCallback', {
|
|
291
296
|
formData: formData,
|
|
292
297
|
id: id
|
|
293
298
|
});
|
|
294
|
-
case
|
|
299
|
+
case 2:
|
|
295
300
|
case "end":
|
|
296
301
|
return _context.stop();
|
|
297
302
|
}
|
|
@@ -306,15 +311,13 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
306
311
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
307
312
|
while (1) switch (_context2.prev = _context2.next) {
|
|
308
313
|
case 0:
|
|
309
|
-
|
|
310
|
-
return updateUserAuth(formData);
|
|
311
|
-
case 2:
|
|
314
|
+
// await updateUserAuth(formData);
|
|
312
315
|
getSettingData();
|
|
313
316
|
settingCallback && settingCallback('settingCreateAppCallback', {
|
|
314
317
|
formData: formData,
|
|
315
318
|
id: id
|
|
316
319
|
});
|
|
317
|
-
case
|
|
320
|
+
case 2:
|
|
318
321
|
case "end":
|
|
319
322
|
return _context2.stop();
|
|
320
323
|
}
|
|
@@ -338,21 +341,24 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
338
341
|
settingCallback && settingCallback('settingRemoveUserCallback', {
|
|
339
342
|
delIndex: delIndex
|
|
340
343
|
});
|
|
341
|
-
refreshGroupList();
|
|
344
|
+
// refreshGroupList();
|
|
342
345
|
};
|
|
346
|
+
|
|
343
347
|
var changeUserAuthCallback = function changeUserAuthCallback(id) {
|
|
344
348
|
settingCallback && settingCallback('settingChangeUserAuthCallback', {
|
|
345
349
|
id: id
|
|
346
350
|
});
|
|
347
|
-
refreshGroupList();
|
|
351
|
+
// refreshGroupList();
|
|
348
352
|
};
|
|
353
|
+
|
|
349
354
|
var createMembersCallback = function createMembersCallback(res, userConfig) {
|
|
350
355
|
settingCallback && settingCallback('settingCreateMembersCallback', {
|
|
351
356
|
popup: res.popup,
|
|
352
357
|
userConfig: userConfig
|
|
353
358
|
});
|
|
354
|
-
refreshGroupList();
|
|
359
|
+
// refreshGroupList();
|
|
355
360
|
};
|
|
361
|
+
|
|
356
362
|
var changeAdminCallback = function changeAdminCallback(res) {
|
|
357
363
|
settingCallback && settingCallback('settingChangeAdminCallback', res);
|
|
358
364
|
};
|
|
@@ -368,15 +374,13 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
368
374
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
369
375
|
while (1) switch (_context3.prev = _context3.next) {
|
|
370
376
|
case 0:
|
|
371
|
-
|
|
372
|
-
return updateUserAuth(formData);
|
|
373
|
-
case 2:
|
|
377
|
+
// await updateUserAuth(formData);
|
|
374
378
|
getSettingData();
|
|
375
379
|
settingCallback && settingCallback('settingCreateVirtualAppCallback', {
|
|
376
380
|
res: res,
|
|
377
381
|
formData: formData
|
|
378
382
|
});
|
|
379
|
-
case
|
|
383
|
+
case 2:
|
|
380
384
|
case "end":
|
|
381
385
|
return _context3.stop();
|
|
382
386
|
}
|
|
@@ -391,12 +395,10 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
391
395
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
392
396
|
while (1) switch (_context4.prev = _context4.next) {
|
|
393
397
|
case 0:
|
|
394
|
-
|
|
395
|
-
return updateUserAuth(formData);
|
|
396
|
-
case 2:
|
|
398
|
+
// await updateUserAuth(formData);
|
|
397
399
|
getSettingData();
|
|
398
400
|
settingCallback && settingCallback('settingDelVirtualAppCallback', res);
|
|
399
|
-
case
|
|
401
|
+
case 2:
|
|
400
402
|
case "end":
|
|
401
403
|
return _context4.stop();
|
|
402
404
|
}
|
|
@@ -418,7 +420,6 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
418
420
|
settingCallback && settingCallback('settingCloseCreateCallback');
|
|
419
421
|
};
|
|
420
422
|
var changeTab = function changeTab(key) {
|
|
421
|
-
// setCurrentTab(tab);
|
|
422
423
|
setActiveKey(key);
|
|
423
424
|
};
|
|
424
425
|
var items = [{
|
|
@@ -430,7 +431,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
430
431
|
companyName: companyName,
|
|
431
432
|
changeCompanyNameCallback: changeCompanyNameCallback
|
|
432
433
|
}),
|
|
433
|
-
hidden:
|
|
434
|
+
hidden: !authority[10078]
|
|
434
435
|
}, {
|
|
435
436
|
key: 'user',
|
|
436
437
|
label: '成员管理',
|
|
@@ -439,6 +440,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
439
440
|
settingCurrentUser: settingCurrentUser,
|
|
440
441
|
id: id,
|
|
441
442
|
groupHashList: groupHashList,
|
|
443
|
+
companyId: companyId,
|
|
442
444
|
companyAppList: companyAppList,
|
|
443
445
|
allGroupInfos: allGroupInfos,
|
|
444
446
|
leftMenus: leftMenus,
|
|
@@ -449,26 +451,14 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
449
451
|
isAdmin: isAdmin,
|
|
450
452
|
serviceType: serviceType
|
|
451
453
|
}),
|
|
452
|
-
hidden:
|
|
454
|
+
hidden: !authority[10079]
|
|
453
455
|
}, {
|
|
454
456
|
key: 'userGroup',
|
|
455
457
|
label: '角色管理',
|
|
456
|
-
children:
|
|
457
|
-
/*#__PURE__*/
|
|
458
|
-
// <UserGroup
|
|
459
|
-
// id={id as number}
|
|
460
|
-
// companyAppList={companyAppList}
|
|
461
|
-
// allGroupInfos={allGroupInfos}
|
|
462
|
-
// leftMenus={leftMenus}
|
|
463
|
-
// isAdmin={isAdmin}
|
|
464
|
-
// delGroupCallback={delGroupCallback}
|
|
465
|
-
// updateGroupAuthCallback={updateGroupAuthCallback}
|
|
466
|
-
// serviceType={serviceType}
|
|
467
|
-
// />
|
|
468
|
-
React.createElement(RoleList, {
|
|
458
|
+
children: /*#__PURE__*/React.createElement(RoleList, {
|
|
469
459
|
companyId: companyId
|
|
470
460
|
}),
|
|
471
|
-
hidden:
|
|
461
|
+
hidden: !authority[10080]
|
|
472
462
|
}, {
|
|
473
463
|
key: 'department',
|
|
474
464
|
label: '部门管理',
|
|
@@ -476,7 +466,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
476
466
|
companyId: companyId,
|
|
477
467
|
closeCreateCallback: closeCreateCallback
|
|
478
468
|
}),
|
|
479
|
-
hidden:
|
|
469
|
+
hidden: !authority[10081]
|
|
480
470
|
}, {
|
|
481
471
|
key: 'appList',
|
|
482
472
|
label: '应用',
|
|
@@ -497,7 +487,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
497
487
|
gotoAppPanel: gotoAppPanel,
|
|
498
488
|
closeCreateCallback: closeCreateCallback
|
|
499
489
|
}),
|
|
500
|
-
hidden:
|
|
490
|
+
hidden: !authority[10082]
|
|
501
491
|
}, {
|
|
502
492
|
key: 'virtualApp',
|
|
503
493
|
label: '虚拟应用',
|
|
@@ -519,23 +509,31 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
519
509
|
companyAppList: companyAppList,
|
|
520
510
|
companyId: companyId
|
|
521
511
|
}),
|
|
522
|
-
hidden:
|
|
512
|
+
hidden: !authority[10083]
|
|
523
513
|
}, {
|
|
524
514
|
key: 'weChatBinding',
|
|
525
515
|
label: '微信账号绑定',
|
|
526
516
|
children: /*#__PURE__*/React.createElement(WechatBinding, null),
|
|
527
|
-
hidden: !(
|
|
517
|
+
hidden: !(authority[1016] && authority[1019] && showDataDaily && isAdmin)
|
|
528
518
|
}, {
|
|
529
519
|
key: 'operationLog',
|
|
530
520
|
label: '操作日志',
|
|
531
521
|
children: /*#__PURE__*/React.createElement(OperationLog, null),
|
|
532
|
-
hidden: !isAdmin
|
|
522
|
+
hidden: !isAdmin && !authority[10084]
|
|
533
523
|
}];
|
|
524
|
+
useEffect(function () {
|
|
525
|
+
if (action !== 'createApp') {
|
|
526
|
+
var _items$filter$;
|
|
527
|
+
changeTab(items === null || items === void 0 ? void 0 : (_items$filter$ = items.filter(function (item) {
|
|
528
|
+
return (item === null || item === void 0 ? void 0 : item.hidden) !== true;
|
|
529
|
+
})[0]) === null || _items$filter$ === void 0 ? void 0 : _items$filter$.key);
|
|
530
|
+
}
|
|
531
|
+
}, [pageReady]);
|
|
534
532
|
return /*#__PURE__*/React.createElement("div", {
|
|
535
533
|
className: "setting setting-content company-setting"
|
|
536
534
|
}, /*#__PURE__*/React.createElement("div", {
|
|
537
535
|
className: "company-setting-title"
|
|
538
|
-
}, "\u516C\u53F8\u8BBE\u7F6E"), pageReady >=
|
|
536
|
+
}, "\u516C\u53F8\u8BBE\u7F6E"), pageReady >= 1 ? /*#__PURE__*/React.createElement(Tabs, {
|
|
539
537
|
className: "company-setting-tabs",
|
|
540
538
|
destroyInactiveTabPane: true,
|
|
541
539
|
activeKey: activeKey,
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
.company-setting {
|
|
9
9
|
border: 1px solid var(--unnamed, #ecedf0);
|
|
10
|
-
border-radius: 8px;
|
|
11
10
|
|
|
12
11
|
.company-setting-title {
|
|
13
12
|
display: flex;
|
|
@@ -16,25 +15,31 @@
|
|
|
16
15
|
align-items: center;
|
|
17
16
|
width: 100%;
|
|
18
17
|
height: 48px;
|
|
19
|
-
padding:
|
|
18
|
+
padding: 0 24px;
|
|
20
19
|
background: #fff;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
.company-setting-tabs {
|
|
24
|
-
|
|
23
|
+
min-height: 800px;
|
|
24
|
+
margin: 16px;
|
|
25
25
|
background: #fff !important;
|
|
26
|
+
border-radius: 8px;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.hidden-tab {
|
|
29
30
|
display: none;
|
|
30
31
|
}
|
|
31
32
|
|
|
33
|
+
.ant-tabs-nav {
|
|
34
|
+
margin-bottom: 16px;
|
|
35
|
+
}
|
|
36
|
+
|
|
32
37
|
.ant-tabs-nav-wrap {
|
|
33
38
|
margin: 0 24px;
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
.ant-tabs-content {
|
|
37
|
-
padding:
|
|
42
|
+
padding: 0 24px 24px;
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
.setting-tab {
|
|
@@ -61,3 +66,24 @@
|
|
|
61
66
|
font-weight: bold;
|
|
62
67
|
}
|
|
63
68
|
}
|
|
69
|
+
|
|
70
|
+
.setting-bizDialog {
|
|
71
|
+
.ant-modal-header {
|
|
72
|
+
padding-bottom: 24px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ant-modal-close-x {
|
|
76
|
+
width: 24px;
|
|
77
|
+
height: 24px;
|
|
78
|
+
margin-right: 22px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ant-modal-close .qingchu {
|
|
82
|
+
font-weight: normal;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ant-modal-body {
|
|
86
|
+
padding: 0 24px;
|
|
87
|
+
padding-bottom: 24px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -4,9 +4,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
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; }
|
|
5
5
|
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; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useState } from 'react';
|
|
7
|
+
import React, { useState, useContext } from 'react';
|
|
8
8
|
import './index.less';
|
|
9
9
|
import { Button, Form, Input, notification } from 'antd';
|
|
10
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
10
11
|
import request from './../../../utils/ajax';
|
|
11
12
|
import api from './../../../constants/api';
|
|
12
13
|
var TextArea = Input.TextArea;
|
|
@@ -23,6 +24,8 @@ var Info = function Info(props) {
|
|
|
23
24
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
24
25
|
isChange = _useState4[0],
|
|
25
26
|
setIsChange = _useState4[1];
|
|
27
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
28
|
+
authority = _useContext.authority;
|
|
26
29
|
var updateLicense = function updateLicense(license) {
|
|
27
30
|
request(api.setting.updateLicense, {
|
|
28
31
|
method: 'post',
|
|
@@ -103,6 +106,7 @@ var Info = function Info(props) {
|
|
|
103
106
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
104
107
|
type: 'text',
|
|
105
108
|
placeholder: '请填写公司名称',
|
|
109
|
+
disabled: !authority[10086],
|
|
106
110
|
onChange: function onChange(e) {
|
|
107
111
|
setIsChange(e.target.value === companyName);
|
|
108
112
|
}
|
|
@@ -112,6 +116,7 @@ var Info = function Info(props) {
|
|
|
112
116
|
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
113
117
|
rows: 5,
|
|
114
118
|
placeholder: '请输入您的授权码',
|
|
119
|
+
disabled: !authority[10087],
|
|
115
120
|
onChange: function onChange(e) {
|
|
116
121
|
setIsChange(!e.target.value);
|
|
117
122
|
}
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
2
|
@import './../style/common.less';
|
|
3
|
+
|
|
3
4
|
.company-setting-info {
|
|
5
|
+
margin-top: 8px;
|
|
4
6
|
padding: 0;
|
|
7
|
+
|
|
5
8
|
> p {
|
|
6
9
|
margin-bottom: 13px;
|
|
7
10
|
color: #565656;
|
|
8
11
|
}
|
|
12
|
+
|
|
9
13
|
li {
|
|
10
14
|
margin-bottom: 30px;
|
|
11
15
|
color: #333333;
|
|
12
16
|
}
|
|
17
|
+
|
|
13
18
|
.c-button {
|
|
14
19
|
width: 90px;
|
|
15
20
|
height: 40px;
|
|
16
21
|
}
|
|
22
|
+
|
|
17
23
|
.c-input.c-size-big {
|
|
18
24
|
height: 40px;
|
|
19
25
|
color: initial;
|
|
20
26
|
line-height: 40px;
|
|
21
27
|
}
|
|
28
|
+
|
|
22
29
|
.el-textarea {
|
|
23
30
|
width: 350px;
|
|
24
31
|
}
|
|
@@ -10,16 +10,19 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
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
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
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useEffect, useState } from 'react';
|
|
13
|
+
import React, { useEffect, useState, useContext } from 'react';
|
|
14
14
|
import request from '../../../utils/ajax';
|
|
15
15
|
import apis from '../../../constants/api';
|
|
16
16
|
import { DatePicker, Radio, Table } from 'antd';
|
|
17
17
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
18
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
18
19
|
import moment from 'moment';
|
|
19
20
|
import './index.less';
|
|
20
21
|
import { setColumnsList } from './util';
|
|
21
22
|
var OperationLog = function OperationLog() {
|
|
22
23
|
var classPrefix = 'operation-log-page';
|
|
24
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
25
|
+
authority = _useContext.authority;
|
|
23
26
|
var _useState = useState({
|
|
24
27
|
page: 1,
|
|
25
28
|
size: 10,
|
|
@@ -187,11 +190,14 @@ var OperationLog = function OperationLog() {
|
|
|
187
190
|
onChange: onChangeType,
|
|
188
191
|
value: logType
|
|
189
192
|
}, /*#__PURE__*/React.createElement(Radio.Button, {
|
|
190
|
-
value: "1"
|
|
193
|
+
value: "1",
|
|
194
|
+
disabled: !authority[10102]
|
|
191
195
|
}, "\u67E5\u8BE2\u65E5\u5FD7"), /*#__PURE__*/React.createElement(Radio.Button, {
|
|
192
|
-
value: "2"
|
|
196
|
+
value: "2",
|
|
197
|
+
disabled: !authority[10103]
|
|
193
198
|
}, "\u64CD\u4F5C\u65E5\u5FD7"), /*#__PURE__*/React.createElement(Radio.Button, {
|
|
194
|
-
value: "3"
|
|
199
|
+
value: "3",
|
|
200
|
+
disabled: !authority[10104]
|
|
195
201
|
}, "\u6743\u9650\u7BA1\u7406\u65E5\u5FD7")), condition.year && /*#__PURE__*/React.createElement(DatePicker, {
|
|
196
202
|
value: moment("".concat(condition.year, "-").concat(condition.month), 'YYYY-MM'),
|
|
197
203
|
picker: "month",
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
.operation-log-page {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
+
margin-top: 8px;
|
|
5
|
+
|
|
4
6
|
&-header {
|
|
5
7
|
display: flex;
|
|
6
8
|
justify-content: space-between;
|
|
7
9
|
margin-bottom: 30px;
|
|
8
10
|
}
|
|
11
|
+
|
|
9
12
|
&-table {
|
|
10
13
|
flex: 1;
|
|
11
14
|
overflow-y: auto;
|
|
12
15
|
}
|
|
16
|
+
|
|
13
17
|
.ant-radio-group {
|
|
14
18
|
.ant-radio-button-wrapper:first-child {
|
|
15
19
|
border-radius: 4px 0 0 4px;
|
|
16
20
|
}
|
|
21
|
+
|
|
17
22
|
.ant-radio-button-wrapper:last-child {
|
|
18
23
|
border-radius: 0 4px 4px 0;
|
|
19
24
|
}
|
|
20
25
|
}
|
|
26
|
+
|
|
21
27
|
&-columns {
|
|
22
28
|
width: 120px;
|
|
23
29
|
overflow: hidden;
|