@zgfe/modules-settings 1.2.10 → 1.2.11
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 +20 -0
- package/es/constants/api.js +25 -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/member/index.js +1 -1
- package/es/modules/companySetting/appList/index.js +1 -1
- package/es/modules/companySetting/cost/index.js +2 -2
- package/es/modules/companySetting/cost/index.less +0 -0
- package/es/modules/companySetting/department/index.d.ts +7 -0
- package/es/modules/companySetting/department/index.js +356 -0
- package/es/modules/companySetting/department/index.less +104 -0
- package/es/modules/companySetting/index.js +76 -257
- package/es/modules/companySetting/index.less +39 -0
- package/es/modules/companySetting/role/index.d.ts +6 -0
- package/es/modules/companySetting/role/index.js +561 -0
- package/es/modules/companySetting/role/index.less +160 -0
- package/es/modules/companySetting/user/index.js +167 -264
- package/es/modules/companySetting/user/index.less +112 -10
- package/es/modules/companySetting/user/invite.d.ts +3 -8
- package/es/modules/companySetting/user/invite.js +249 -173
- 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/modules/companySetting/wechatBinding/index.less +0 -0
- package/es/requests/department.d.ts +15 -0
- package/es/requests/department.js +68 -0
- package/es/requests/role.d.ts +16 -0
- package/es/requests/role.js +100 -0
- package/es/types/companySetting.d.ts +28 -2
- package/es/utils/util.d.ts +23 -0
- package/es/utils/util.js +77 -0
- package/package.json +4 -4
|
@@ -1,216 +1,292 @@
|
|
|
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
|
-
|
|
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 } from 'react';
|
|
14
14
|
import './index.less';
|
|
15
|
-
import
|
|
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 } 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
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
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
|
+
var _Form$useForm = Form.useForm(),
|
|
25
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
26
|
+
form = _Form$useForm2[0];
|
|
27
|
+
var _useState = useState(),
|
|
32
28
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
queryParams = _useState2[0],
|
|
30
|
+
setQueryParams = _useState2[1];
|
|
35
31
|
var _useState3 = useState([]),
|
|
36
32
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var _useState5 = useState(
|
|
33
|
+
userList = _useState4[0],
|
|
34
|
+
setUserList = _useState4[1];
|
|
35
|
+
var _useState5 = useState([]),
|
|
40
36
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
departmentList = _useState6[0],
|
|
38
|
+
setDepartmentList = _useState6[1];
|
|
39
|
+
var _useState7 = useState(false),
|
|
40
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
41
|
+
createAppLoading = _useState8[0],
|
|
42
|
+
setCreateAppLoading = _useState8[1];
|
|
43
|
+
var _useState9 = useState(false),
|
|
44
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
45
|
+
createdAppPanel = _useState10[0],
|
|
46
|
+
setCreatedAppPanel = _useState10[1];
|
|
47
|
+
useEffect(function () {
|
|
48
|
+
if (userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) {
|
|
49
|
+
setCreatedAppPanel(true);
|
|
50
|
+
queryCompanyUserDetailsParamList(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id);
|
|
51
|
+
// 角色下拉数据
|
|
52
|
+
queryRoleListByUserIdList(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id);
|
|
53
|
+
// 部门下拉数据
|
|
54
|
+
queryDeptListByUserIdList(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id);
|
|
55
|
+
}
|
|
56
|
+
}, [userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id]);
|
|
57
|
+
useEffect(function () {
|
|
58
|
+
queryPanel(_objectSpread({}, queryParams));
|
|
59
|
+
}, [queryParams]);
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
// 角色下拉数据
|
|
62
|
+
queryRoleListByUserIdList(null);
|
|
63
|
+
// 部门下拉数据
|
|
64
|
+
queryDeptListByUserIdList(null);
|
|
65
|
+
}, []);
|
|
66
|
+
// 查看详情
|
|
67
|
+
var queryCompanyUserDetailsParamList = function queryCompanyUserDetailsParamList(id) {
|
|
68
|
+
request(apis.setting.queryCompanyUserDetailsParam, {
|
|
69
|
+
method: 'post',
|
|
70
|
+
data: {
|
|
71
|
+
id: id
|
|
51
72
|
}
|
|
52
|
-
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
}).then(function (res) {
|
|
74
|
+
if (res && (res === null || res === void 0 ? void 0 : res.data) && res.code === '101000') {
|
|
75
|
+
var _res$data, _res$data$roleIds;
|
|
76
|
+
form.setFieldsValue(_objectSpread(_objectSpread({}, res.data), {}, {
|
|
77
|
+
roleIds: res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$roleIds = _res$data.roleIds) === null || _res$data$roleIds === void 0 ? void 0 : _res$data$roleIds.map(function (item) {
|
|
78
|
+
return {
|
|
79
|
+
id: item
|
|
80
|
+
};
|
|
81
|
+
})
|
|
82
|
+
}));
|
|
57
83
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
84
|
+
}).catch(function (error) {
|
|
85
|
+
console.log(error);
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
var queryRoleListByUserIdList = function queryRoleListByUserIdList(id) {
|
|
89
|
+
request(apis.setting.queryRoleListByUserId, {
|
|
90
|
+
method: 'post',
|
|
91
|
+
data: {
|
|
92
|
+
id: id
|
|
61
93
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
94
|
+
}).then(function (res) {
|
|
95
|
+
if (res && (res === null || res === void 0 ? void 0 : res.data) && res.code === '101000') {
|
|
96
|
+
setUserList(res === null || res === void 0 ? void 0 : res.data);
|
|
97
|
+
} else {
|
|
98
|
+
setUserList([]);
|
|
99
|
+
}
|
|
100
|
+
}).catch(function (error) {
|
|
101
|
+
console.log(error);
|
|
102
|
+
});
|
|
64
103
|
};
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
80
|
-
inviteEvent(params);
|
|
104
|
+
var queryDeptListByUserIdList = function queryDeptListByUserIdList(id) {
|
|
105
|
+
request(apis.setting.queryDeptListByUserId, {
|
|
106
|
+
method: 'post',
|
|
107
|
+
data: {
|
|
108
|
+
id: id
|
|
109
|
+
}
|
|
110
|
+
}).then(function (res) {
|
|
111
|
+
if (res && (res === null || res === void 0 ? void 0 : res.data) && res.code === '101000') {
|
|
112
|
+
setDepartmentList(res === null || res === void 0 ? void 0 : res.data);
|
|
113
|
+
} else {
|
|
114
|
+
setDepartmentList([]);
|
|
115
|
+
}
|
|
116
|
+
}).catch(function (error) {
|
|
117
|
+
console.log(error);
|
|
118
|
+
});
|
|
81
119
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
120
|
+
// 编辑||创建
|
|
121
|
+
var onFinish = function onFinish(value) {
|
|
122
|
+
var _value$roleIds;
|
|
123
|
+
setCreateAppLoading(true);
|
|
124
|
+
var msg = '';
|
|
125
|
+
var params = _objectSpread(_objectSpread({}, value), {}, {
|
|
126
|
+
id: userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id,
|
|
127
|
+
roleIds: value === null || value === void 0 ? void 0 : (_value$roleIds = value.roleIds) === null || _value$roleIds === void 0 ? void 0 : _value$roleIds.map(function (item) {
|
|
128
|
+
return item.id;
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
request(apis.setting[(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) ? 'updateCompanyUser' : 'addCompanyUser'], {
|
|
85
132
|
method: 'post',
|
|
86
|
-
|
|
133
|
+
data: params
|
|
87
134
|
}).then(function (res) {
|
|
88
|
-
if (res && res.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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([]);
|
|
135
|
+
if (res && res.code === '101000') {
|
|
136
|
+
setCreatedAppPanel(false);
|
|
137
|
+
setCreateAppLoading(false);
|
|
138
|
+
// 通知数据刷新
|
|
139
|
+
msg = (userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) ? '编辑成功' : '创建成功';
|
|
140
|
+
notification.success({
|
|
141
|
+
message: msg
|
|
142
|
+
});
|
|
143
|
+
queryPanel(_objectSpread({}, queryParams));
|
|
117
144
|
} else {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
}
|
|
145
|
+
setCreateAppLoading(false);
|
|
146
|
+
notification.error({
|
|
147
|
+
message: (userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) ? '编辑失败,请重试' : '创建失败,请重试'
|
|
148
|
+
});
|
|
152
149
|
}
|
|
153
150
|
}).catch(function (error) {
|
|
154
151
|
console.log(error);
|
|
155
|
-
}).finally(function () {
|
|
156
|
-
return setInviteBtnLoading(false);
|
|
157
152
|
});
|
|
158
153
|
};
|
|
159
154
|
return /*#__PURE__*/React.createElement("div", {
|
|
160
155
|
className: "invite"
|
|
161
156
|
}, /*#__PURE__*/React.createElement("div", {
|
|
162
157
|
className: "invite-control"
|
|
163
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
158
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u8D26\u53F7"), /*#__PURE__*/React.createElement(Input, {
|
|
159
|
+
onChange: function onChange(e) {
|
|
160
|
+
setQueryParams(_objectSpread(_objectSpread({}, queryParams), {}, {
|
|
161
|
+
email: e.target.value
|
|
162
|
+
}));
|
|
167
163
|
},
|
|
164
|
+
placeholder: '请输入账号'
|
|
165
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u59D3\u540D"), /*#__PURE__*/React.createElement(Input, {
|
|
168
166
|
onChange: function onChange(e) {
|
|
169
|
-
|
|
167
|
+
setQueryParams(_objectSpread(_objectSpread({}, queryParams), {}, {
|
|
168
|
+
username: e.target.value
|
|
169
|
+
}));
|
|
170
170
|
},
|
|
171
|
-
placeholder:
|
|
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",
|
|
171
|
+
placeholder: '请输入姓名'
|
|
172
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u89D2\u8272"), /*#__PURE__*/React.createElement(Select, {
|
|
180
173
|
style: {
|
|
181
|
-
width:
|
|
174
|
+
width: '248px'
|
|
182
175
|
},
|
|
183
|
-
options:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
onChange: function onChange(v, option) {
|
|
189
|
-
setTargetGroup(option);
|
|
176
|
+
options: userList,
|
|
177
|
+
placeholder: '请选择角色',
|
|
178
|
+
fieldNames: {
|
|
179
|
+
label: 'roleName',
|
|
180
|
+
value: 'id'
|
|
190
181
|
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
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);
|
|
182
|
+
allowClear: true,
|
|
183
|
+
onChange: function onChange(e) {
|
|
184
|
+
setQueryParams(_objectSpread(_objectSpread({}, queryParams), {}, {
|
|
185
|
+
roleId: e
|
|
186
|
+
}));
|
|
208
187
|
}
|
|
209
|
-
})), /*#__PURE__*/React.createElement(
|
|
210
|
-
|
|
211
|
-
|
|
188
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
189
|
+
className: "invite-list"
|
|
190
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u6210\u5458\u5217\u8868"), /*#__PURE__*/React.createElement(Button, {
|
|
191
|
+
onClick: function onClick() {
|
|
192
|
+
setCreatedAppPanel(true);
|
|
193
|
+
form.resetFields();
|
|
194
|
+
},
|
|
212
195
|
type: "primary",
|
|
213
196
|
size: "middle"
|
|
214
|
-
}, "\
|
|
197
|
+
}, "\u6DFB\u52A0\u6210\u5458")), /*#__PURE__*/React.createElement(BizDialog, {
|
|
198
|
+
title: (userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) ? '编辑角色' : '新增角色',
|
|
199
|
+
open: createdAppPanel,
|
|
200
|
+
width: 520,
|
|
201
|
+
closable: true,
|
|
202
|
+
onOk: function onOk() {
|
|
203
|
+
form.submit();
|
|
204
|
+
},
|
|
205
|
+
onCancel: function onCancel() {
|
|
206
|
+
queryPanel(_objectSpread({}, queryParams));
|
|
207
|
+
setCreatedAppPanel(false);
|
|
208
|
+
},
|
|
209
|
+
confirmLoading: createAppLoading
|
|
210
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
211
|
+
className: "user-dialog-content"
|
|
212
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
213
|
+
form: form,
|
|
214
|
+
onFinish: onFinish,
|
|
215
|
+
colon: false,
|
|
216
|
+
scrollToFirstError: true
|
|
217
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
218
|
+
name: 'email',
|
|
219
|
+
label: "\u8D26\u53F7",
|
|
220
|
+
rules: [{
|
|
221
|
+
required: true,
|
|
222
|
+
message: '请输入账号'
|
|
223
|
+
}]
|
|
224
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
225
|
+
maxLength: 50,
|
|
226
|
+
placeholder: '请输入账号'
|
|
227
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
228
|
+
name: 'username',
|
|
229
|
+
label: "\u59D3\u540D",
|
|
230
|
+
rules: [{
|
|
231
|
+
required: true,
|
|
232
|
+
message: '请输入姓名'
|
|
233
|
+
}]
|
|
234
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
235
|
+
maxLength: 50,
|
|
236
|
+
placeholder: '请输入姓名'
|
|
237
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
238
|
+
name: 'roleIds',
|
|
239
|
+
label: "\u89D2\u8272",
|
|
240
|
+
rules: [{
|
|
241
|
+
required: true,
|
|
242
|
+
message: '请选择角色'
|
|
243
|
+
}]
|
|
244
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
245
|
+
className: "label-group",
|
|
246
|
+
options: userList,
|
|
247
|
+
multiple: true,
|
|
248
|
+
placeholder: '请选择角色',
|
|
249
|
+
labelField: "roleName",
|
|
250
|
+
keyField: "id"
|
|
251
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
252
|
+
name: 'deptIds',
|
|
253
|
+
label: "\u90E8\u95E8",
|
|
254
|
+
rules: [{
|
|
255
|
+
required: true,
|
|
256
|
+
message: '请选择部门'
|
|
257
|
+
}]
|
|
258
|
+
}, /*#__PURE__*/React.createElement(TreeSelect, {
|
|
259
|
+
treeDefaultExpandAll: true,
|
|
260
|
+
multiple: true,
|
|
261
|
+
fieldNames: {
|
|
262
|
+
label: 'name',
|
|
263
|
+
value: 'id'
|
|
264
|
+
},
|
|
265
|
+
placeholder: "\u8BF7\u9009\u62E9\u4E0A\u7EA7\u90E8\u95E8",
|
|
266
|
+
treeData: departmentList
|
|
267
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
268
|
+
name: 'accountStatus',
|
|
269
|
+
label: "\u72B6\u6001",
|
|
270
|
+
rules: [{
|
|
271
|
+
required: true,
|
|
272
|
+
message: '请选择状态'
|
|
273
|
+
}]
|
|
274
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
275
|
+
buttonStyle: "outline"
|
|
276
|
+
}, /*#__PURE__*/React.createElement(Radio, {
|
|
277
|
+
value: 1
|
|
278
|
+
}, "\u6B63\u5E38"), /*#__PURE__*/React.createElement(Radio, {
|
|
279
|
+
value: 2
|
|
280
|
+
}, "\u505C\u7528"))), !(userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id) && /*#__PURE__*/React.createElement(Form.Item, {
|
|
281
|
+
name: 'password',
|
|
282
|
+
label: "\u5BC6\u7801",
|
|
283
|
+
rules: [{
|
|
284
|
+
required: true,
|
|
285
|
+
message: '请输入密码'
|
|
286
|
+
}]
|
|
287
|
+
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
288
|
+
maxLength: 50,
|
|
289
|
+
placeholder: '请输入密码'
|
|
290
|
+
}))))));
|
|
215
291
|
};
|
|
216
292
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
118
|
+
open: showDelDialog,
|
|
119
119
|
closable: true,
|
|
120
120
|
okText: "\u89E3\u9664\u7ED1\u5B9A",
|
|
121
121
|
cancelText: "\u6682\u4E0D\u89E3\u9664",
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const queryDeptList: (data: {
|
|
2
|
+
name: string;
|
|
3
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, getGroupMembers: () => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, addDept: (data: {
|
|
4
|
+
deptBoss: string;
|
|
5
|
+
parentId: number;
|
|
6
|
+
id: number | null;
|
|
7
|
+
name: string;
|
|
8
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, updateDept: (data: {
|
|
9
|
+
deptBoss: string;
|
|
10
|
+
parentId: number;
|
|
11
|
+
id: number | null;
|
|
12
|
+
name: string;
|
|
13
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, deleteDept: (data: {
|
|
14
|
+
ids: number[];
|
|
15
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>;
|
|
@@ -0,0 +1,68 @@
|
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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
|
+
import api from '../constants/api';
|
|
8
|
+
import { ajax } from '@zgfe/business-lib';
|
|
9
|
+
import apis from '../constants/api';
|
|
10
|
+
var Department = /*#__PURE__*/function () {
|
|
11
|
+
function Department() {
|
|
12
|
+
_classCallCheck(this, Department);
|
|
13
|
+
}
|
|
14
|
+
_createClass(Department, [{
|
|
15
|
+
key: "queryDeptList",
|
|
16
|
+
value:
|
|
17
|
+
// 部门列表
|
|
18
|
+
function queryDeptList(data) {
|
|
19
|
+
return ajax(api.setting.queryDeptList, {
|
|
20
|
+
method: 'post',
|
|
21
|
+
data: data
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
// 负责人列表
|
|
25
|
+
}, {
|
|
26
|
+
key: "getGroupMembers",
|
|
27
|
+
value: function getGroupMembers() {
|
|
28
|
+
return ajax(apis.setting.getGroupMembers, {
|
|
29
|
+
method: 'get'
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
// 添加
|
|
33
|
+
}, {
|
|
34
|
+
key: "addDept",
|
|
35
|
+
value: function addDept(data) {
|
|
36
|
+
return ajax(api.setting.addDept, {
|
|
37
|
+
method: 'post',
|
|
38
|
+
data: data
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// 修改
|
|
42
|
+
}, {
|
|
43
|
+
key: "updateDept",
|
|
44
|
+
value: function updateDept(data) {
|
|
45
|
+
return ajax(api.setting.updateDept, {
|
|
46
|
+
method: 'post',
|
|
47
|
+
data: data
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
// 删除
|
|
51
|
+
}, {
|
|
52
|
+
key: "deleteDept",
|
|
53
|
+
value: function deleteDept(data) {
|
|
54
|
+
return ajax(api.setting.deleteDept, {
|
|
55
|
+
method: 'post',
|
|
56
|
+
data: data
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}]);
|
|
60
|
+
return Department;
|
|
61
|
+
}();
|
|
62
|
+
var _Department = new Department(),
|
|
63
|
+
queryDeptList = _Department.queryDeptList,
|
|
64
|
+
getGroupMembers = _Department.getGroupMembers,
|
|
65
|
+
addDept = _Department.addDept,
|
|
66
|
+
updateDept = _Department.updateDept,
|
|
67
|
+
deleteDept = _Department.deleteDept;
|
|
68
|
+
export { queryDeptList, getGroupMembers, addDept, updateDept, deleteDept };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const queryRolePage: (data: {
|
|
2
|
+
name: string;
|
|
3
|
+
pageNo: number;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, queryRoleDetails: (data: {
|
|
6
|
+
id: number | null;
|
|
7
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, queryRoleDataConfig: (data: {
|
|
8
|
+
id: number | null;
|
|
9
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, queryRoleMenuTree: (data: {
|
|
10
|
+
id: number | null;
|
|
11
|
+
systemVersion: number | null;
|
|
12
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, queryRoleUser: (data: {
|
|
13
|
+
id: number | null;
|
|
14
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, addRole: (data: any) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, updateRole: (data: any) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, deleteRole: (data: {
|
|
15
|
+
id: number | null;
|
|
16
|
+
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>;
|