@zgfe/modules-settings 1.2.13 → 1.2.14
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.
|
@@ -28,9 +28,7 @@ var showAppAlias = function showAppAlias(data) {
|
|
|
28
28
|
return data.appAlias && util.isString(data.appAlias);
|
|
29
29
|
};
|
|
30
30
|
var appList = function appList(props) {
|
|
31
|
-
var
|
|
32
|
-
isAdmin = props.isAdmin,
|
|
33
|
-
isDemoAccount = props.isDemoAccount,
|
|
31
|
+
var isDemoAccount = props.isDemoAccount,
|
|
34
32
|
id = props.id,
|
|
35
33
|
allGroupInfos = props.allGroupInfos,
|
|
36
34
|
isShowCreateApp = props.isShowCreateApp,
|
|
@@ -141,49 +139,29 @@ var appList = function appList(props) {
|
|
|
141
139
|
}, [props.isShowCreateApp]);
|
|
142
140
|
var toPanel = function toPanel(data) {
|
|
143
141
|
if (gotoAppPanel) {
|
|
144
|
-
if (!checkAppAuth(data.id)) {
|
|
145
|
-
notification.error({
|
|
146
|
-
message: '此应用无权限'
|
|
147
|
-
});
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
142
|
gotoAppPanel(data.id);
|
|
151
143
|
}
|
|
152
144
|
};
|
|
153
145
|
var toAppSetting = function toAppSetting(data) {
|
|
154
146
|
if (gotoAppSetting) {
|
|
155
|
-
if (!checkAppAuth(data.id)) {
|
|
156
|
-
notification.error({
|
|
157
|
-
message: '此应用无权限'
|
|
158
|
-
});
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
147
|
gotoAppSetting(data.id);
|
|
162
148
|
}
|
|
163
149
|
};
|
|
164
150
|
var showDelPanel = function showDelPanel(data) {
|
|
165
|
-
if (isAdmin && !checkAppAuth(data.id)) {
|
|
166
|
-
notification.error({
|
|
167
|
-
message: '删除失败,无权限'
|
|
168
|
-
});
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
151
|
setDelAppId(data.id);
|
|
172
152
|
setDelPanelState(true);
|
|
173
153
|
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return flag;
|
|
186
|
-
};
|
|
154
|
+
// const checkAppAuth = (appId: number) => {
|
|
155
|
+
// let flag = false;
|
|
156
|
+
// if (dataAuth.length === 1 && dataAuth[0].appId === 0) {
|
|
157
|
+
// flag = true;
|
|
158
|
+
// } else if (isAdmin) {
|
|
159
|
+
// flag = true;
|
|
160
|
+
// } else {
|
|
161
|
+
// flag = dataAuth.map((item) => item.appId).includes(appId);
|
|
162
|
+
// }
|
|
163
|
+
// return flag;
|
|
164
|
+
// };
|
|
187
165
|
var inDemoMode = function inDemoMode() {
|
|
188
166
|
if (isDemoAccount) {
|
|
189
167
|
notification.error({
|
|
@@ -224,7 +202,6 @@ var appList = function appList(props) {
|
|
|
224
202
|
app_id: delAppId
|
|
225
203
|
}
|
|
226
204
|
}).then(function (res) {
|
|
227
|
-
console.log(77777, res);
|
|
228
205
|
if ((res === null || res === void 0 ? void 0 : res.flag) === 101) {
|
|
229
206
|
notification.success({
|
|
230
207
|
message: '删除成功'
|