@yysports/tools 1.0.0-alpha.1 → 1.0.0

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/README.md CHANGED
@@ -2,3 +2,12 @@
2
2
 
3
3
  [![NPM version](https://img.shields.io/npm/v/@yysports/tools.svg?style=flat)](https://npmjs.org/package/@yysports/tools)
4
4
  [![NPM downloads](http://img.shields.io/npm/dm/@yysports/tools.svg?style=flat)](https://npmjs.org/package/@yysports/tools)
5
+
6
+ ## 更新日志
7
+
8
+ ### 1.0.0
9
+
10
+ `2025-07-15`
11
+
12
+ - 🆕 用户信息增加人资组织编码 orgCode
13
+ - 🆕 用户信息增加权限中心配置的部门数据权限 dataScopeZonePermissions
@@ -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.size > 0) {
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
  }[];
@@ -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.size > 0) {
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
  }[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yysports/tools",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0",
4
4
  "description": "常用工具函数库",
5
5
  "homepage": "https://git.pousheng.com/sport-service-department/pousheng-guard/yysports_tools#readme",
6
6
  "bugs": {
@@ -71,10 +71,10 @@
71
71
  "@types/react": "^18.3.23",
72
72
  "@types/react-dom": "^18.3.7",
73
73
  "@umijs/lint": "^4.4.11",
74
- "antd": "^5.26.4",
74
+ "antd": "^5.26.5",
75
75
  "dumi": "^2.4.21",
76
- "eslint": "^9.30.1",
77
- "father": "^4.5.6",
76
+ "eslint": "^9.31.0",
77
+ "father": "^4.6.1",
78
78
  "husky": "^9.1.7",
79
79
  "lint-staged": "^16.1.2",
80
80
  "prettier": "^3.6.2",