@indfnd/utils 0.1.29 → 0.1.31

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.31](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.30...v0.1.31) (2026-01-14)
6
+
7
+ ### [0.1.30](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.29...v0.1.30) (2026-01-14)
8
+
9
+
10
+ ### Features
11
+
12
+ * 获取组织树和资源树增加Localstorage缓存 ([6d2983b](http://git.inspur.com/imp-ec/ind-front/ind-utils/commit/6d2983ba9cb7dda646395343fed23321af78bc36))
13
+
5
14
  ### [0.1.29](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.28...v0.1.29) (2026-01-13)
6
15
 
7
16
 
@@ -11375,9 +11375,9 @@ function listComTreeApi(params) {
11375
11375
  }
11376
11376
  return instance.get(`${CONTEXT$1}/tree/com/listComTree`, { params });
11377
11377
  }
11378
- const UC_CONTEXT$1 = config.ucExtServerContext;
11378
+ const UC_CONTEXT$2 = config.ucExtServerContext;
11379
11379
  function listIndexDescApi(params) {
11380
- return instance.get(`${UC_CONTEXT$1}/index-desc/list`, { params });
11380
+ return instance.get(`${UC_CONTEXT$2}/index-desc/list`, { params });
11381
11381
  }
11382
11382
  const CONTEXT = config.ismAmServerContext;
11383
11383
  function listItemTreeApi(params) {
@@ -11394,8 +11394,44 @@ function getPriceInfo() {
11394
11394
  function getItem(params) {
11395
11395
  return instance.get(`${CONTEXT}/basic/getItem`, { params });
11396
11396
  }
11397
- const UC_CONTEXT = config.ucExtServerContext;
11397
+ const UC_CONTEXT$1 = config.ucExtServerContext;
11398
+ const DATAVERSION_KEY$1 = "ind-cache-dataVersion-organTree";
11398
11399
  function listUserTreeApi(params) {
11399
- return instance.get(`${UC_CONTEXT}/tree/uc-user/listUserTree`, { params });
11400
+ return __async(this, null, function* () {
11401
+ var _a;
11402
+ const cachedData = getLocalStorage(DATAVERSION_KEY$1);
11403
+ const dataVersionList = yield instance.get(`${UC_CONTEXT$1}/cacheManage/getCacheDataVersion`, {});
11404
+ const serverVersion = dataVersionList.data["organTree"];
11405
+ if ((cachedData == null ? void 0 : cachedData.dataVersion) !== serverVersion) {
11406
+ const response = yield instance.get(`${UC_CONTEXT$1}/tree/uc-user/listUserTree`, { params });
11407
+ const dataValue = {
11408
+ dataVersion: serverVersion,
11409
+ response
11410
+ };
11411
+ setLocalStorage(DATAVERSION_KEY$1, dataValue);
11412
+ }
11413
+ return (_a = getLocalStorage(DATAVERSION_KEY$1)) == null ? void 0 : _a.response;
11414
+ });
11415
+ }
11416
+ const UC_CONTEXT = config.ucExtServerContext;
11417
+ const DATAVERSION_KEY = "ind-cache-dataVersion-applicationTree";
11418
+ function getApplicationTreeApi(params) {
11419
+ return __async(this, null, function* () {
11420
+ var _a;
11421
+ const cachedData = getLocalStorage(DATAVERSION_KEY);
11422
+ const dataVersionList = yield instance.get(`${UC_CONTEXT}/cacheManage/getCacheDataVersion`, {});
11423
+ const serverVersion = dataVersionList.data["applicationTree"];
11424
+ if ((cachedData == null ? void 0 : cachedData.dataVersion) !== serverVersion) {
11425
+ const response = yield instance.get(`${UC_CONTEXT}/tree/uc-application/getApplicationTree`, {
11426
+ params
11427
+ });
11428
+ const dataValue = {
11429
+ dataVersion: serverVersion,
11430
+ response
11431
+ };
11432
+ setLocalStorage(DATAVERSION_KEY, dataValue);
11433
+ }
11434
+ return (_a = getLocalStorage(DATAVERSION_KEY)) == null ? void 0 : _a.response;
11435
+ });
11400
11436
  }
11401
- export { Base64ForLogin, CONTENT_TYPE, IS_OR_NOT_ENUM, IS_OR_NOT_ENUM_KEY, IS_OR_NOT_ENUM_LIST, MIME_TYPE, UC_ENUM, addMenuCollectApi, instance as axios, base64ToBlob, blobToBase64, checkIdCard, checkPhone, checkTel, checkVehicleNo, clearIndexDescCache, clearPermissionCache, clearSessionStorage, clearUserInfoCache, config, cryptor, deleteMenuCollectApi, deleteMenuHistoryApi, exportJsonToExcel, flattenRow2ColumnData, formatDate, formatDateChinese, formatDecimal, formatHalfYear, formatQuarter, getAppListApi, getCaptchaURL, getContentType, getDictApi, getDictMapApi, getDictsMapApi, getExcelColumnIdx, getGlobalPolicyApi, getHalfYear, getHalfYearBeginMonth, getHalfYearEndMonth, getHalfYearNum, getIndexDescCache, getItem, getLocalStorage, getMaxTabNumValueApi, getMenuCollectApi, getMenuHistoryApi, getOssFileApi, getOssFileUrl, getPermissionApi, getPermissionCache, getPreviewUrlApi, getPriceInfo, getQuarter, getQuarterBeginMonth, getQuarterEndMonth, getQuarterNum, getSessionStorage, getToken, getType, getUrlParams, getUserInfoApi, getUserInfoCache, guid, importJsonFromExcel, isArguments, isArray, isArrayLike, isBoolean, isDate, isDecimal, isElement, isEmpty, isEqual, isEqualWith, isError, isEven, isFinite$1 as isFinite, isFunction, isInteger, isNegative, isNil, isNull, isNumber, isNumberEqual, isObject, isObjectLike, isOdd, isPlainObject, isPositive, isPromise, isPrototype, isRegExp2 as isRegExp, isString, isType, isUndefined, listComTreeApi, listIndexDescApi, listItemTreeApi, listUserTreeApi, loginApi, logoutApi, menuHistoryApi, numToChineseNumerals, numToDX, off, on, preventDefault, putOssFileApi, putOssFileUrl, quarter2Chinese, removeLocalStorage, removeMenuCollectApi, removeSessionStorage, renderColumnEnums, renderEnumData, renderEnumList, renderFieldEnums, responseInterceptors, round, row2column, setConfig, setContentType, setIndexDescCache, setLocalStorage, setPermissionCache, setSessionStorage, setToken, setUserInfoCache, stopPropagation, str2Date, toChies, toFixed, toThousands, updatePasswordApi, useConfig, uuid, wrapApi };
11437
+ export { Base64ForLogin, CONTENT_TYPE, IS_OR_NOT_ENUM, IS_OR_NOT_ENUM_KEY, IS_OR_NOT_ENUM_LIST, MIME_TYPE, UC_ENUM, addMenuCollectApi, instance as axios, base64ToBlob, blobToBase64, checkIdCard, checkPhone, checkTel, checkVehicleNo, clearIndexDescCache, clearPermissionCache, clearSessionStorage, clearUserInfoCache, config, cryptor, deleteMenuCollectApi, deleteMenuHistoryApi, exportJsonToExcel, flattenRow2ColumnData, formatDate, formatDateChinese, formatDecimal, formatHalfYear, formatQuarter, getAppListApi, getApplicationTreeApi, getCaptchaURL, getContentType, getDictApi, getDictMapApi, getDictsMapApi, getExcelColumnIdx, getGlobalPolicyApi, getHalfYear, getHalfYearBeginMonth, getHalfYearEndMonth, getHalfYearNum, getIndexDescCache, getItem, getLocalStorage, getMaxTabNumValueApi, getMenuCollectApi, getMenuHistoryApi, getOssFileApi, getOssFileUrl, getPermissionApi, getPermissionCache, getPreviewUrlApi, getPriceInfo, getQuarter, getQuarterBeginMonth, getQuarterEndMonth, getQuarterNum, getSessionStorage, getToken, getType, getUrlParams, getUserInfoApi, getUserInfoCache, guid, importJsonFromExcel, isArguments, isArray, isArrayLike, isBoolean, isDate, isDecimal, isElement, isEmpty, isEqual, isEqualWith, isError, isEven, isFinite$1 as isFinite, isFunction, isInteger, isNegative, isNil, isNull, isNumber, isNumberEqual, isObject, isObjectLike, isOdd, isPlainObject, isPositive, isPromise, isPrototype, isRegExp2 as isRegExp, isString, isType, isUndefined, listComTreeApi, listIndexDescApi, listItemTreeApi, listUserTreeApi, loginApi, logoutApi, menuHistoryApi, numToChineseNumerals, numToDX, off, on, preventDefault, putOssFileApi, putOssFileUrl, quarter2Chinese, removeLocalStorage, removeMenuCollectApi, removeSessionStorage, renderColumnEnums, renderEnumData, renderEnumList, renderFieldEnums, responseInterceptors, round, row2column, setConfig, setContentType, setIndexDescCache, setLocalStorage, setPermissionCache, setSessionStorage, setToken, setUserInfoCache, stopPropagation, str2Date, toChies, toFixed, toThousands, updatePasswordApi, useConfig, uuid, wrapApi };