@zgfe/modules-settings 1.2.11 → 1.2.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.
- package/es/constants/api.d.ts +0 -20
- package/es/constants/api.js +1 -25
- package/es/modules/companySetting/appList/index.js +1 -1
- package/es/modules/companySetting/cost/index.js +2 -2
- package/es/modules/companySetting/index.js +256 -75
- package/es/modules/companySetting/index.less +0 -39
- package/es/modules/companySetting/user/index.js +264 -167
- package/es/modules/companySetting/user/index.less +10 -112
- package/es/modules/companySetting/user/invite.d.ts +8 -3
- package/es/modules/companySetting/user/invite.js +173 -249
- package/es/modules/companySetting/userGroup/groupItem.js +1 -1
- package/es/modules/companySetting/virtualApp/panels/list.js +1 -1
- package/es/modules/companySetting/wechatBinding/index.js +1 -1
- package/es/types/companySetting.d.ts +2 -28
- package/es/utils/util.d.ts +0 -23
- package/es/utils/util.js +0 -77
- package/package.json +4 -4
- package/es/modules/companySetting/department/index.d.ts +0 -7
- package/es/modules/companySetting/department/index.js +0 -356
- package/es/modules/companySetting/department/index.less +0 -104
- package/es/modules/companySetting/role/index.d.ts +0 -6
- package/es/modules/companySetting/role/index.js +0 -561
- package/es/modules/companySetting/role/index.less +0 -160
- package/es/requests/department.d.ts +0 -15
- package/es/requests/department.js +0 -68
- package/es/requests/role.d.ts +0 -16
- package/es/requests/role.js +0 -100
package/es/constants/api.d.ts
CHANGED
|
@@ -39,26 +39,6 @@ declare let apis: {
|
|
|
39
39
|
queryFilter: string;
|
|
40
40
|
queryNoticeConfig: string;
|
|
41
41
|
editNoticeConfig: string;
|
|
42
|
-
queryDeptList: string;
|
|
43
|
-
addDept: string;
|
|
44
|
-
updateDept: string;
|
|
45
|
-
deleteDept: string;
|
|
46
|
-
queryRolePage: string;
|
|
47
|
-
queryRoleDetails: string;
|
|
48
|
-
queryRoleDataConfig: string;
|
|
49
|
-
queryRoleMenuTree: string;
|
|
50
|
-
queryRoleUser: string;
|
|
51
|
-
addRole: string;
|
|
52
|
-
updateRole: string;
|
|
53
|
-
deleteRole: string;
|
|
54
|
-
queryUserPage: string;
|
|
55
|
-
queryRoleListByUserId: string;
|
|
56
|
-
queryDeptListByUserId: string;
|
|
57
|
-
queryCompanyUserDetailsParam: string;
|
|
58
|
-
addCompanyUser: string;
|
|
59
|
-
updateCompanyUser: string;
|
|
60
|
-
delCompanyUser: string;
|
|
61
|
-
updateCompanyUserStatus: string;
|
|
62
42
|
};
|
|
63
43
|
eventMeta: {
|
|
64
44
|
queryEventMeta: string;
|
package/es/constants/api.js
CHANGED
|
@@ -44,32 +44,8 @@ var apis = {
|
|
|
44
44
|
queryFilter: '/user/queryFilter.jsp',
|
|
45
45
|
//系统设置
|
|
46
46
|
queryNoticeConfig: apiPrefix + '/systemSettings/queryNoticeSettings',
|
|
47
|
-
editNoticeConfig: apiPrefix + '/systemSettings/setNoticeSettings'
|
|
48
|
-
// 部门管理
|
|
49
|
-
queryDeptList: '/zg/web/v2/company/setting/queryDeptList',
|
|
50
|
-
addDept: '/zg/web/v2/company/setting/addDept',
|
|
51
|
-
updateDept: '/zg/web/v2/company/setting/updateDept',
|
|
52
|
-
deleteDept: '/zg/web/v2/company/setting/deleteDept',
|
|
53
|
-
// 角色管理
|
|
54
|
-
queryRolePage: '/zg/web/v2/company/setting/queryRolePage',
|
|
55
|
-
queryRoleDetails: '/zg/web/v2/company/setting/queryRoleDetails',
|
|
56
|
-
queryRoleDataConfig: '/zg/web/v2/company/setting/queryRoleDataConfig',
|
|
57
|
-
queryRoleMenuTree: '/zg/web/v2/company/setting/queryRoleMenuTree',
|
|
58
|
-
queryRoleUser: '/zg/web/v2/company/setting/queryRoleUser',
|
|
59
|
-
addRole: '/zg/web/v2/company/setting/addRole',
|
|
60
|
-
updateRole: '/zg/web/v2/company/setting/updateRole',
|
|
61
|
-
deleteRole: '/zg/web/v2/company/setting/deleteRole',
|
|
62
|
-
// 成员管理
|
|
63
|
-
queryUserPage: '/zg/web/v2/company/setting/queryUserPage',
|
|
64
|
-
queryRoleListByUserId: '/zg/web/v2/company/setting/queryRoleListByUserId',
|
|
65
|
-
queryDeptListByUserId: '/zg/web/v2/company/setting/queryDeptListByUserId',
|
|
66
|
-
queryCompanyUserDetailsParam: '/zg/web/v2/company/setting/queryCompanyUserDetailsParam',
|
|
67
|
-
addCompanyUser: '/zg/web/v2/company/setting/addCompanyUser',
|
|
68
|
-
updateCompanyUser: '/zg/web/v2/company/setting/updateCompanyUser',
|
|
69
|
-
delCompanyUser: '/zg/web/v2/company/setting/delCompanyUser',
|
|
70
|
-
updateCompanyUserStatus: '/zg/web/v2/company/setting/updateCompanyUserStatus' // 修改状态
|
|
47
|
+
editNoticeConfig: apiPrefix + '/systemSettings/setNoticeSettings'
|
|
71
48
|
},
|
|
72
|
-
|
|
73
49
|
eventMeta: {
|
|
74
50
|
queryEventMeta: '/zg/web/v2/data/queryEventMetasOfGroup'
|
|
75
51
|
},
|
|
@@ -375,7 +375,7 @@ var appList = function appList(props) {
|
|
|
375
375
|
className: "app-list-desc"
|
|
376
376
|
}, /*#__PURE__*/React.createElement("li", null, "\u65E0\u9700\u4E3A\u4E00\u4E2A\u4EA7\u54C1\u7684\u4E0D\u540C\u5E73\u53F0\u521B\u5EFA\u591A\u4E2A\u5E94\u7528"), /*#__PURE__*/React.createElement("li", null, "\u63A8\u8350\u60A8\u4F7F\u7528\u4EA7\u54C1\u540D\u79F0\u547D\u540D\u5E94\u7528\u540D, \u5982\u3010", zgText, "\u3011\u800C\u975E\u3010", zgText, " IOS\u7248\u3011")))), /*#__PURE__*/React.createElement(BizDialog, {
|
|
377
377
|
title: "\u5220\u9664\u5E94\u7528",
|
|
378
|
-
|
|
378
|
+
visible: delPanelState,
|
|
379
379
|
closable: true,
|
|
380
380
|
onOk: function onOk() {
|
|
381
381
|
setDelPanelState(false);
|
|
@@ -139,9 +139,9 @@ var Cost = function Cost(props) {
|
|
|
139
139
|
}, [accountEvents]);
|
|
140
140
|
return /*#__PURE__*/React.createElement("div", {
|
|
141
141
|
className: "company-setting-cost"
|
|
142
|
-
}, ready ? ENVIRONMENT != 'saas' ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h5", null, "\u6982\u51B5"), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u4F7F\u7528\u5468\u671F"), /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u5E94\u7528\u6570"), /*#__PURE__*/React.createElement("th", null, "\u989D\u5B9A\u5E94\u7528\u6570"), /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u4E8B\u4EF6\u91CF"), /*#__PURE__*/React.createElement("th", null, "\u989D\u5B9A\u4E8B\u4EF6\u603B\u91CF"), /*#__PURE__*/React.createElement("th", null, "\u5408\u540C\u671F\u5185\u4E8B\u4EF6\u91CF"))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, overview.length ? overview.map(function (item
|
|
142
|
+
}, ready ? ENVIRONMENT != 'saas' ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h5", null, "\u6982\u51B5"), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u4F7F\u7528\u5468\u671F"), /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u5E94\u7528\u6570"), /*#__PURE__*/React.createElement("th", null, "\u989D\u5B9A\u5E94\u7528\u6570"), /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u4E8B\u4EF6\u91CF"), /*#__PURE__*/React.createElement("th", null, "\u989D\u5B9A\u4E8B\u4EF6\u603B\u91CF"), /*#__PURE__*/React.createElement("th", null, "\u5408\u540C\u671F\u5185\u4E8B\u4EF6\u91CF"))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, overview.length ? overview.map(function (item) {
|
|
143
143
|
return /*#__PURE__*/React.createElement("td", {
|
|
144
|
-
key:
|
|
144
|
+
key: item
|
|
145
145
|
}, item);
|
|
146
146
|
}) : /*#__PURE__*/React.createElement("td", {
|
|
147
147
|
colSpan: 6
|
|
@@ -15,16 +15,16 @@ import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
|
15
15
|
import request from './../../utils/ajax';
|
|
16
16
|
import api from './../../constants/api';
|
|
17
17
|
import PageLoading from '../../components/pageLoading';
|
|
18
|
-
import {
|
|
18
|
+
import { notification } from 'antd';
|
|
19
|
+
import SettingTabs from '../../components/settingTabs';
|
|
19
20
|
import Info from './info';
|
|
21
|
+
import UserGroup from './userGroup';
|
|
20
22
|
import User from './user';
|
|
21
23
|
import AppList from './appList';
|
|
22
24
|
import VirtualApp from './virtualApp';
|
|
23
25
|
import Cost from './cost';
|
|
24
26
|
import WechatBinding from './wechatBinding';
|
|
25
27
|
import OperationLog from './operationLog';
|
|
26
|
-
import DepartmentList from './department';
|
|
27
|
-
import RoleList from './role';
|
|
28
28
|
var CompanySetting = function CompanySetting(props) {
|
|
29
29
|
var showWeChatMenu = props.showWeChatMenu,
|
|
30
30
|
showMarketMenu = props.showMarketMenu,
|
|
@@ -115,17 +115,12 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
115
115
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
116
116
|
isShowCreateApp = _useState34[0],
|
|
117
117
|
setIsShowCreateApp = _useState34[1];
|
|
118
|
-
var _useState35 = useState('info'),
|
|
119
|
-
_useState36 = _slicedToArray(_useState35, 2),
|
|
120
|
-
activeKey = _useState36[0],
|
|
121
|
-
setActiveKey = _useState36[1]; // 默认值
|
|
122
118
|
useEffect(function () {
|
|
123
119
|
getSettingData();
|
|
124
120
|
apisOkNum = 0;
|
|
125
121
|
}, []);
|
|
126
122
|
useEffect(function () {
|
|
127
123
|
if (action == 'createApp') {
|
|
128
|
-
setActiveKey('appList');
|
|
129
124
|
setIsShowCreateApp(true);
|
|
130
125
|
} else {
|
|
131
126
|
setIsShowCreateApp(false);
|
|
@@ -158,21 +153,21 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
158
153
|
request(api.user.getCurrentUser, {
|
|
159
154
|
method: 'get'
|
|
160
155
|
}).then(function (res) {
|
|
161
|
-
var _res$data
|
|
156
|
+
var _res$data;
|
|
162
157
|
var data = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.user;
|
|
163
158
|
if (!data) return;
|
|
164
159
|
data.isCreator = data.id === data.userId;
|
|
165
160
|
data.isDemoAccount = data.email === 'demo@zhugeio.com';
|
|
166
161
|
setSettingCurrentUser(data);
|
|
167
162
|
// 给 应用页面 传递的数据
|
|
168
|
-
setDataAuth(
|
|
169
|
-
setIsAdmin(data
|
|
170
|
-
setIsDemoAccount(data
|
|
171
|
-
setAuthConfig(data
|
|
172
|
-
setId(data
|
|
173
|
-
setCompanyId(data
|
|
174
|
-
setCompanyName(data
|
|
175
|
-
setServiceType(data
|
|
163
|
+
setDataAuth(data.authConfig.dataAuth || []);
|
|
164
|
+
setIsAdmin(data.isAdmin);
|
|
165
|
+
setIsDemoAccount(data.isDemoAccount);
|
|
166
|
+
setAuthConfig(data.authConfig);
|
|
167
|
+
setId(data.id);
|
|
168
|
+
setCompanyId(data.companyId);
|
|
169
|
+
setCompanyName(data.companyName);
|
|
170
|
+
setServiceType(data.serviceType);
|
|
176
171
|
//
|
|
177
172
|
request(api.app.queryAppList, {
|
|
178
173
|
method: 'get'
|
|
@@ -200,7 +195,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
200
195
|
setPageReady(apisOkNum);
|
|
201
196
|
}).catch(function () {
|
|
202
197
|
notification.error({
|
|
203
|
-
message: '信息获取失败
|
|
198
|
+
message: '信息获取失败'
|
|
204
199
|
});
|
|
205
200
|
});
|
|
206
201
|
request(api.app.queryLeftMenus, {
|
|
@@ -226,12 +221,12 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
226
221
|
setPageReady(apisOkNum);
|
|
227
222
|
}).catch(function () {
|
|
228
223
|
notification.error({
|
|
229
|
-
message: '信息获取失败
|
|
224
|
+
message: '信息获取失败'
|
|
230
225
|
});
|
|
231
226
|
});
|
|
232
227
|
}).catch(function () {
|
|
233
228
|
notification.error({
|
|
234
|
-
message: '信息获取失败
|
|
229
|
+
message: '信息获取失败'
|
|
235
230
|
});
|
|
236
231
|
});
|
|
237
232
|
request(api.setting.groupInfos, {
|
|
@@ -244,7 +239,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
244
239
|
setPageReady(apisOkNum);
|
|
245
240
|
}).catch(function () {
|
|
246
241
|
notification.error({
|
|
247
|
-
message: '信息获取失败
|
|
242
|
+
message: '信息获取失败'
|
|
248
243
|
});
|
|
249
244
|
});
|
|
250
245
|
};
|
|
@@ -275,9 +270,15 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
275
270
|
});
|
|
276
271
|
};
|
|
277
272
|
var changeCompanyNameCallback = function changeCompanyNameCallback() {
|
|
273
|
+
// 对外提供的api, 在设置模块-》公司设置-》公司信息,修改应用名称,成功修改时调用
|
|
274
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
275
|
+
// settingChangeCompanyNameCallback && settingChangeCompanyNameCallback();
|
|
278
276
|
getSettingData();
|
|
279
277
|
settingCallback && settingCallback('settingChangeCompanyNameCallback');
|
|
278
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
279
|
+
// this.$store.dispatch(actions.user.getCurrentUser)
|
|
280
280
|
};
|
|
281
|
+
|
|
281
282
|
var delAppCallback = /*#__PURE__*/function () {
|
|
282
283
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(formData, id) {
|
|
283
284
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -291,6 +292,17 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
291
292
|
formData: formData,
|
|
292
293
|
id: id
|
|
293
294
|
});
|
|
295
|
+
// 刷新setting模块内的数据
|
|
296
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
297
|
+
// await this.$store.dispatch(actions.setting.updateUserAuth, formData)
|
|
298
|
+
// await this.$store.dispatch(actions.user.getCurrentUser)
|
|
299
|
+
// if (appId) {
|
|
300
|
+
// this.$router.push({ params: { appId: appId } })
|
|
301
|
+
// }
|
|
302
|
+
// await this.$store.dispatch(actions.app.queryAppList)
|
|
303
|
+
// if (callback) {
|
|
304
|
+
// callback()
|
|
305
|
+
// }
|
|
294
306
|
case 4:
|
|
295
307
|
case "end":
|
|
296
308
|
return _context.stop();
|
|
@@ -314,6 +326,17 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
314
326
|
formData: formData,
|
|
315
327
|
id: id
|
|
316
328
|
});
|
|
329
|
+
// 刷新setting模块内的数据
|
|
330
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
331
|
+
// await this.$store.dispatch(actions.setting.updateUserAuth, formData)
|
|
332
|
+
// await this.$store.dispatch(actions.user.getCurrentUser)
|
|
333
|
+
// if (appId) {
|
|
334
|
+
// this.$router.push({ params: { appId: appId } })
|
|
335
|
+
// }
|
|
336
|
+
// await this.$store.dispatch(actions.app.queryAppList)
|
|
337
|
+
// if (callback) {
|
|
338
|
+
// callback()
|
|
339
|
+
// }
|
|
317
340
|
case 4:
|
|
318
341
|
case "end":
|
|
319
342
|
return _context2.stop();
|
|
@@ -325,44 +348,141 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
325
348
|
};
|
|
326
349
|
}();
|
|
327
350
|
var gotoAppSetting = function gotoAppSetting(id) {
|
|
351
|
+
// 对外提供的api, 在设置模块-》公司设置-》应用页面,应用设置,点击时调用
|
|
352
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
353
|
+
// settingGotoAppSetting && settingGotoAppSetting({id});
|
|
328
354
|
settingCallback && settingCallback('settingGotoAppSetting', {
|
|
329
355
|
id: id
|
|
330
356
|
});
|
|
357
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
358
|
+
// this.$store.dispatch(actions.app.setCurrentApp, { appId: data.id })
|
|
359
|
+
// this.$router.push({
|
|
360
|
+
// name: routes.setting.app.index
|
|
361
|
+
// })
|
|
331
362
|
};
|
|
363
|
+
|
|
332
364
|
var gotoAppPanel = function gotoAppPanel(id) {
|
|
365
|
+
// 对外提供的api, 在设置模块-》公司设置-》应用页面,应用名称,点击时调用
|
|
366
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
367
|
+
// settingGotoAppPanel && settingGotoAppPanel({id});
|
|
333
368
|
settingCallback && settingCallback('settingGotoAppPanel', {
|
|
334
369
|
id: id
|
|
335
370
|
});
|
|
371
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
372
|
+
// this.$store
|
|
373
|
+
// .dispatch(actions.app.setCurrentApp, { appId: data.id })
|
|
374
|
+
// .then(() => {
|
|
375
|
+
// this.$router.push({
|
|
376
|
+
// name: 'home'
|
|
377
|
+
// })
|
|
378
|
+
// })
|
|
336
379
|
};
|
|
380
|
+
|
|
337
381
|
var removeUserCallback = function removeUserCallback(delIndex) {
|
|
382
|
+
// 对外提供的api, 在设置模块-》用户-》成员列表页面删除成员成功时调用
|
|
383
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
384
|
+
// settingRemoveUserCallback && settingRemoveUserCallback({id});
|
|
338
385
|
settingCallback && settingCallback('settingRemoveUserCallback', {
|
|
339
386
|
delIndex: delIndex
|
|
340
387
|
});
|
|
341
388
|
refreshGroupList();
|
|
389
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
390
|
+
// this.$store.commit(mutations.setting.delMember, delIndex)
|
|
391
|
+
// if (userData.authConfig.groupIds.length) {
|
|
392
|
+
// // 如果成员有权限组 更新权限组接口
|
|
393
|
+
// this.$store.dispatch(actions.setting.getGroupInfos, false)
|
|
394
|
+
// }
|
|
342
395
|
};
|
|
396
|
+
|
|
343
397
|
var changeUserAuthCallback = function changeUserAuthCallback(id) {
|
|
398
|
+
// 对外提供的api, 在设置模块-》用户-》成员列表页面编辑成员权限成功时调用
|
|
399
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
400
|
+
// settingChangeUserAuthCallback && settingChangeUserAuthCallback({id});
|
|
344
401
|
settingCallback && settingCallback('settingChangeUserAuthCallback', {
|
|
345
402
|
id: id
|
|
346
403
|
});
|
|
347
404
|
refreshGroupList();
|
|
405
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
406
|
+
// let arr = []
|
|
407
|
+
// if (this.data && this.data.id === this.currentUser.id) {
|
|
408
|
+
// arr.push(
|
|
409
|
+
// this.$store.dispatch(actions.user.getCurrentUser).then(() => {
|
|
410
|
+
// this.$store.commit(mutations.app.updateAppList, {
|
|
411
|
+
// appList: this.appList,
|
|
412
|
+
// user: this.currentUser
|
|
413
|
+
// })
|
|
414
|
+
// })
|
|
415
|
+
// )
|
|
416
|
+
// }
|
|
417
|
+
// Promise.all(arr).then(() => {
|
|
418
|
+
// this.$message({
|
|
419
|
+
// message: '保存成功',
|
|
420
|
+
// type: 'success'
|
|
421
|
+
// })
|
|
422
|
+
// this.btnLoading = false
|
|
423
|
+
// this.onCancel()
|
|
424
|
+
// })
|
|
348
425
|
};
|
|
426
|
+
|
|
349
427
|
var createMembersCallback = function createMembersCallback(res, userConfig) {
|
|
428
|
+
// 对外提供的api, 在设置模块-》用户-》成员列表页面 创建成员成功时调用
|
|
429
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
430
|
+
// settingCreateMembersCallback && settingCreateMembersCallback(res);
|
|
350
431
|
settingCallback && settingCallback('settingCreateMembersCallback', {
|
|
351
432
|
popup: res.popup,
|
|
352
433
|
userConfig: userConfig
|
|
353
434
|
});
|
|
354
435
|
refreshGroupList();
|
|
436
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
437
|
+
// if (res.popup) {
|
|
438
|
+
// this.$store.commit(mutations.setting.addInviteUser, userConfig)
|
|
439
|
+
// } else {
|
|
440
|
+
// this.$store.dispatch(actions.setting.getGroupMembers, false)
|
|
441
|
+
// }
|
|
355
442
|
};
|
|
443
|
+
|
|
356
444
|
var changeAdminCallback = function changeAdminCallback(res) {
|
|
445
|
+
// 对外提供的api, 在设置模块-》用户-》成员列表页面 移交超级管理员成功时调用
|
|
446
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
447
|
+
// settingChangeAdminCallback && settingChangeAdminCallback(res);
|
|
357
448
|
settingCallback && settingCallback('settingChangeAdminCallback', res);
|
|
449
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
450
|
+
// setTimeout(() => {
|
|
451
|
+
// window.location.href = '/'
|
|
452
|
+
// }, 400)
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
var delGroupCallback = function delGroupCallback(id) {
|
|
456
|
+
// 对外提供的api, 在设置模块-》用户组-》用户组列表页面 删除用户成功时调用
|
|
457
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
458
|
+
// settingDelGroupCallback && settingDelGroupCallback({id});
|
|
459
|
+
settingCallback && settingCallback('settingDelGroupCallback', {
|
|
460
|
+
id: id
|
|
461
|
+
});
|
|
462
|
+
refreshGroupList();
|
|
463
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
464
|
+
// this.$store.commit(mutations.setting.delGroup, this.groupData.id)
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
var updateGroupAuthCallback = function updateGroupAuthCallback(isUser) {
|
|
468
|
+
// 对外提供的api, 在设置模块-》用户组-》用户组列表页面 更新用户组权限成功时调用
|
|
469
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
470
|
+
// settingUpdateGroupAuthCallback && settingUpdateGroupAuthCallback({isUser});
|
|
471
|
+
settingCallback && settingCallback('settingUpdateGroupAuthCallback', {
|
|
472
|
+
isUser: isUser
|
|
473
|
+
});
|
|
474
|
+
refreshGroupList();
|
|
475
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
476
|
+
// if (hasCurrentUser) {
|
|
477
|
+
// this.$store.dispatch(actions.user.getCurrentUser).then(() => {
|
|
478
|
+
// this.$store.commit(mutations.app.updateAppList, {
|
|
479
|
+
// appList: this.appList,
|
|
480
|
+
// user: this.currentUser
|
|
481
|
+
// })
|
|
482
|
+
// })
|
|
483
|
+
// }
|
|
358
484
|
};
|
|
359
|
-
|
|
360
|
-
// settingCallback && settingCallback('settingDelGroupCallback', { id });
|
|
361
|
-
// };
|
|
362
|
-
// const updateGroupAuthCallback = (isUser: boolean) => {
|
|
363
|
-
// settingCallback && settingCallback('settingUpdateGroupAuthCallback', { isUser });
|
|
364
|
-
// refreshGroupList();
|
|
365
|
-
// };
|
|
485
|
+
|
|
366
486
|
var createVirtualAppCallback = /*#__PURE__*/function () {
|
|
367
487
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(res, formData) {
|
|
368
488
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
@@ -376,6 +496,30 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
376
496
|
res: res,
|
|
377
497
|
formData: formData
|
|
378
498
|
});
|
|
499
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
500
|
+
// this.$store.commit(mutations.virtualApp.addVirtualApp, res)
|
|
501
|
+
// // 添加数据权限
|
|
502
|
+
// let authConfig = util.clone(this.currentUser.authConfig)
|
|
503
|
+
// if (
|
|
504
|
+
// !(
|
|
505
|
+
// authConfig.dataAuth.length === 1 &&
|
|
506
|
+
// authConfig.dataAuth[0].appId === 0
|
|
507
|
+
// )
|
|
508
|
+
// ) {
|
|
509
|
+
// authConfig.dataAuth.unshift({
|
|
510
|
+
// appId: res.app_info.id,
|
|
511
|
+
// plats: [0]
|
|
512
|
+
// })
|
|
513
|
+
// }
|
|
514
|
+
// let formData = {
|
|
515
|
+
// userId: this.currentUser.id,
|
|
516
|
+
// authConfig: JSON.stringify(authConfig),
|
|
517
|
+
// groupIds: this.userOfGroups.join(',')
|
|
518
|
+
// }
|
|
519
|
+
// this.$store.dispatch(actions.setting.updateUserAuth, formData)
|
|
520
|
+
// this.$store.dispatch(actions.user.getCurrentUser)
|
|
521
|
+
// // 更新应用列表数据
|
|
522
|
+
// this.$store.dispatch(actions.app.queryAppList)
|
|
379
523
|
case 4:
|
|
380
524
|
case "end":
|
|
381
525
|
return _context3.stop();
|
|
@@ -396,6 +540,43 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
396
540
|
case 2:
|
|
397
541
|
getSettingData();
|
|
398
542
|
settingCallback && settingCallback('settingDelVirtualAppCallback', res);
|
|
543
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
544
|
+
// this.$store.commit(mutations.virtualApp.delVirtualApp, appId)
|
|
545
|
+
// // 更新数据权限
|
|
546
|
+
// let authConfig = util.clone(this.currentUser.authConfig)
|
|
547
|
+
// if (
|
|
548
|
+
// !(
|
|
549
|
+
// authConfig.dataAuth.length === 1 &&
|
|
550
|
+
// authConfig.dataAuth[0].appId === 0
|
|
551
|
+
// )
|
|
552
|
+
// ) {
|
|
553
|
+
// let index = authConfig.dataAuth.findIndex(
|
|
554
|
+
// item => item.appId === appId
|
|
555
|
+
// )
|
|
556
|
+
// if (index > -1) {
|
|
557
|
+
// authConfig.dataAuth.splice(index, 1)
|
|
558
|
+
// }
|
|
559
|
+
// }
|
|
560
|
+
// if (this.currentApp.id === appId) {
|
|
561
|
+
// let hasAuthApplistToDelAfter = this.hasAuthApplist.filter(
|
|
562
|
+
// item => item.id !== appId
|
|
563
|
+
// )
|
|
564
|
+
// let id = hasAuthApplistToDelAfter.length ? hasAuthApplistToDelAfter[0].id : 0
|
|
565
|
+
// this.$router.push({
|
|
566
|
+
// params: {
|
|
567
|
+
// appId: id
|
|
568
|
+
// }
|
|
569
|
+
// })
|
|
570
|
+
// }
|
|
571
|
+
// let formData = {
|
|
572
|
+
// userId: this.currentUser.userId,
|
|
573
|
+
// authConfig: JSON.stringify(authConfig),
|
|
574
|
+
// groupIds: this.userOfGroups.join(',')
|
|
575
|
+
// }
|
|
576
|
+
// this.$store.dispatch(actions.setting.updateUserAuth, formData)
|
|
577
|
+
// this.$store.dispatch(actions.user.getCurrentUser)
|
|
578
|
+
// // 更新应用列表数据
|
|
579
|
+
// this.$store.dispatch(actions.app.queryAppList)
|
|
399
580
|
case 4:
|
|
400
581
|
case "end":
|
|
401
582
|
return _context4.stop();
|
|
@@ -407,34 +588,65 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
407
588
|
};
|
|
408
589
|
}();
|
|
409
590
|
var editVirtualAppCallback = function editVirtualAppCallback(id) {
|
|
591
|
+
// 对外提供的api, 在设置模块-》虚拟应用-》虚拟应用列表页面 删除成功时调用
|
|
592
|
+
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
593
|
+
// settingUpdateGroupAuthCallback && settingUpdateGroupAuthCallback({isUser});
|
|
410
594
|
settingCallback && settingCallback('settingEditVirtualAppCallback', {
|
|
411
595
|
id: id
|
|
412
596
|
});
|
|
413
597
|
getSettingData();
|
|
598
|
+
// 与主应用同步信息 下面为老代码逻辑
|
|
599
|
+
// if (this.currentApp && this.currentApp.id === params.app_id) {
|
|
600
|
+
// this.$store.dispatch(actions.biz.sys.queryEventMeta, {
|
|
601
|
+
// appId: this.appId,
|
|
602
|
+
// platform: this.platform,
|
|
603
|
+
// force: true
|
|
604
|
+
// })
|
|
605
|
+
// }
|
|
414
606
|
};
|
|
607
|
+
|
|
415
608
|
var closeCreateCallback = function closeCreateCallback() {
|
|
416
609
|
// 对外提供的api, 在设置模块-》应用-》创建应用关闭时调用
|
|
417
610
|
// 用来处理同步主应用可能需要的刷新的逻辑, 可不传
|
|
418
611
|
settingCallback && settingCallback('settingCloseCreateCallback');
|
|
419
612
|
};
|
|
420
|
-
var changeTab = function changeTab(
|
|
613
|
+
var changeTab = function changeTab() {
|
|
421
614
|
// setCurrentTab(tab);
|
|
422
|
-
|
|
615
|
+
setIsShowCreateApp(false);
|
|
423
616
|
};
|
|
617
|
+
var title = /*#__PURE__*/React.createElement("div", {
|
|
618
|
+
className: "setting-title"
|
|
619
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
620
|
+
className: "setting-icon icon-company"
|
|
621
|
+
}), /*#__PURE__*/React.createElement("label", null, "\u516C\u53F8\u8BBE\u7F6E"));
|
|
424
622
|
var items = [{
|
|
425
623
|
key: 'info',
|
|
426
624
|
label: '公司信息',
|
|
427
|
-
|
|
625
|
+
content: /*#__PURE__*/React.createElement(Info, {
|
|
428
626
|
ENVIRONMENT: ENVIRONMENT,
|
|
429
627
|
companyId: companyId,
|
|
430
628
|
companyName: companyName,
|
|
431
629
|
changeCompanyNameCallback: changeCompanyNameCallback
|
|
432
630
|
}),
|
|
433
631
|
hidden: false
|
|
632
|
+
}, {
|
|
633
|
+
key: 'userGroup',
|
|
634
|
+
label: '用户组',
|
|
635
|
+
content: /*#__PURE__*/React.createElement(UserGroup, {
|
|
636
|
+
id: id,
|
|
637
|
+
companyAppList: companyAppList,
|
|
638
|
+
allGroupInfos: allGroupInfos,
|
|
639
|
+
leftMenus: leftMenus,
|
|
640
|
+
isAdmin: isAdmin,
|
|
641
|
+
delGroupCallback: delGroupCallback,
|
|
642
|
+
updateGroupAuthCallback: updateGroupAuthCallback,
|
|
643
|
+
serviceType: serviceType
|
|
644
|
+
}),
|
|
645
|
+
hidden: false
|
|
434
646
|
}, {
|
|
435
647
|
key: 'user',
|
|
436
|
-
label: '
|
|
437
|
-
|
|
648
|
+
label: '用户',
|
|
649
|
+
content: /*#__PURE__*/React.createElement(User, {
|
|
438
650
|
ENVIRONMENT: ENVIRONMENT,
|
|
439
651
|
settingCurrentUser: settingCurrentUser,
|
|
440
652
|
id: id,
|
|
@@ -450,37 +662,10 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
450
662
|
serviceType: serviceType
|
|
451
663
|
}),
|
|
452
664
|
hidden: false
|
|
453
|
-
}, {
|
|
454
|
-
key: 'userGroup',
|
|
455
|
-
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, {
|
|
469
|
-
companyId: companyId
|
|
470
|
-
}),
|
|
471
|
-
hidden: false
|
|
472
|
-
}, {
|
|
473
|
-
key: 'department',
|
|
474
|
-
label: '部门管理',
|
|
475
|
-
children: /*#__PURE__*/React.createElement(DepartmentList, {
|
|
476
|
-
companyId: companyId,
|
|
477
|
-
closeCreateCallback: closeCreateCallback
|
|
478
|
-
}),
|
|
479
|
-
hidden: false
|
|
480
665
|
}, {
|
|
481
666
|
key: 'appList',
|
|
482
667
|
label: '应用',
|
|
483
|
-
|
|
668
|
+
content: /*#__PURE__*/React.createElement(AppList, {
|
|
484
669
|
dataAuth: dataAuth,
|
|
485
670
|
isAdmin: isAdmin,
|
|
486
671
|
isDemoAccount: isDemoAccount,
|
|
@@ -501,7 +686,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
501
686
|
}, {
|
|
502
687
|
key: 'virtualApp',
|
|
503
688
|
label: '虚拟应用',
|
|
504
|
-
|
|
689
|
+
content: /*#__PURE__*/React.createElement(VirtualApp, {
|
|
505
690
|
companyId: companyId,
|
|
506
691
|
authConfig: authConfig,
|
|
507
692
|
id: id,
|
|
@@ -514,7 +699,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
514
699
|
}, {
|
|
515
700
|
key: 'cost',
|
|
516
701
|
label: '套餐',
|
|
517
|
-
|
|
702
|
+
content: /*#__PURE__*/React.createElement(Cost, {
|
|
518
703
|
ENVIRONMENT: ENVIRONMENT,
|
|
519
704
|
companyAppList: companyAppList,
|
|
520
705
|
companyId: companyId
|
|
@@ -523,26 +708,22 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
523
708
|
}, {
|
|
524
709
|
key: 'weChatBinding',
|
|
525
710
|
label: '微信账号绑定',
|
|
526
|
-
|
|
711
|
+
content: /*#__PURE__*/React.createElement(WechatBinding, null),
|
|
527
712
|
hidden: !(showWeChatMenu && showMarketMenu && showDataDaily && isAdmin)
|
|
528
713
|
}, {
|
|
529
714
|
key: 'operationLog',
|
|
530
715
|
label: '操作日志',
|
|
531
|
-
|
|
716
|
+
content: /*#__PURE__*/React.createElement(OperationLog, null),
|
|
532
717
|
hidden: !isAdmin
|
|
533
718
|
}];
|
|
534
719
|
return /*#__PURE__*/React.createElement("div", {
|
|
535
720
|
className: "setting setting-content company-setting"
|
|
536
|
-
}, /*#__PURE__*/React.createElement(
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
onChange: changeTab,
|
|
543
|
-
items: items.filter(function (item) {
|
|
544
|
-
return item.hidden !== true;
|
|
545
|
-
})
|
|
721
|
+
}, pageReady >= 3 ? /*#__PURE__*/React.createElement(SettingTabs, {
|
|
722
|
+
typeName: "companySetting",
|
|
723
|
+
currentKey: action == 'createApp' ? 'appList' : '',
|
|
724
|
+
onClick: changeTab,
|
|
725
|
+
title: title,
|
|
726
|
+
items: items
|
|
546
727
|
}) : /*#__PURE__*/React.createElement(PageLoading, {
|
|
547
728
|
"v-else": true
|
|
548
729
|
}));
|