@yysports/tools 1.0.0-alpha.1 → 1.0.0-alpha.2
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/dist/Track/index.js
CHANGED
|
@@ -223,6 +223,7 @@ var Track = /*#__PURE__*/function () {
|
|
|
223
223
|
key: "init",
|
|
224
224
|
value: function () {
|
|
225
225
|
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref3) {
|
|
226
|
+
var _this$authCenterUserP;
|
|
226
227
|
var userProfile, menuNameMap, routes, getAuth, menuBuild, getDataScopeZonePermissions, restConfig, currentUserProfile;
|
|
227
228
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
228
229
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -249,7 +250,7 @@ var Track = /*#__PURE__*/function () {
|
|
|
249
250
|
}
|
|
250
251
|
|
|
251
252
|
// 传入区部数据权限接口时,设置区部权限数据
|
|
252
|
-
if (this.authCenterUserProfile.dataScopeZonePermissions && this.authCenterUserProfile.dataScopeZonePermissions.
|
|
253
|
+
if (this.authCenterUserProfile.dataScopeZonePermissions && ((_this$authCenterUserP = this.authCenterUserProfile.dataScopeZonePermissions) === null || _this$authCenterUserP === void 0 || (_this$authCenterUserP = _this$authCenterUserP.list) === null || _this$authCenterUserP === void 0 ? void 0 : _this$authCenterUserP.length) > 0) {
|
|
253
254
|
// 提取出所有 zoneId
|
|
254
255
|
Object.assign(currentUserProfile, {
|
|
255
256
|
dataScopeZonePermissions: this.authCenterUserProfile.dataScopeZonePermissions.list.map(function (item) {
|
|
@@ -59,12 +59,10 @@ export interface AuthCenterUserProfile {
|
|
|
59
59
|
accessPage?: string[];
|
|
60
60
|
orgCode: string;
|
|
61
61
|
dataScopeZonePermissions?: {
|
|
62
|
-
size: number;
|
|
63
62
|
list: {
|
|
64
63
|
regionId: string;
|
|
65
64
|
regionName: string;
|
|
66
65
|
list: {
|
|
67
|
-
id: string;
|
|
68
66
|
zoneId: string;
|
|
69
67
|
zoneName: string;
|
|
70
68
|
}[];
|
package/lib/Track/index.js
CHANGED
|
@@ -174,6 +174,7 @@ var Track = class {
|
|
|
174
174
|
getDataScopeZonePermissions,
|
|
175
175
|
...restConfig
|
|
176
176
|
}) {
|
|
177
|
+
var _a, _b;
|
|
177
178
|
this.checkConfig(restConfig);
|
|
178
179
|
this.config = restConfig;
|
|
179
180
|
await this.initAuthCenterData({
|
|
@@ -191,7 +192,7 @@ var Track = class {
|
|
|
191
192
|
orgCode: this.authCenterUserProfile.orgCode
|
|
192
193
|
});
|
|
193
194
|
}
|
|
194
|
-
if (this.authCenterUserProfile.dataScopeZonePermissions && this.authCenterUserProfile.dataScopeZonePermissions.
|
|
195
|
+
if (this.authCenterUserProfile.dataScopeZonePermissions && ((_b = (_a = this.authCenterUserProfile.dataScopeZonePermissions) == null ? void 0 : _a.list) == null ? void 0 : _b.length) > 0) {
|
|
195
196
|
Object.assign(currentUserProfile, {
|
|
196
197
|
dataScopeZonePermissions: this.authCenterUserProfile.dataScopeZonePermissions.list.map((item) => item.list.map((zone) => zone.zoneId).join(",")).join(",")
|
|
197
198
|
});
|
|
@@ -59,12 +59,10 @@ export interface AuthCenterUserProfile {
|
|
|
59
59
|
accessPage?: string[];
|
|
60
60
|
orgCode: string;
|
|
61
61
|
dataScopeZonePermissions?: {
|
|
62
|
-
size: number;
|
|
63
62
|
list: {
|
|
64
63
|
regionId: string;
|
|
65
64
|
regionName: string;
|
|
66
65
|
list: {
|
|
67
|
-
id: string;
|
|
68
66
|
zoneId: string;
|
|
69
67
|
zoneName: string;
|
|
70
68
|
}[];
|