@fmdeui/fmui 1.0.5 → 1.0.7

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.
Files changed (97) hide show
  1. package/es/components/chart/index.d.ts +1 -1
  2. package/es/components/chart/src/index.vue.d.ts +1 -1
  3. package/es/components/index.d.ts +1 -0
  4. package/es/components/svgIcon/index.d.ts +26 -0
  5. package/es/components/svgIcon/index.vue.d.ts +27 -0
  6. package/es/hooks/index.d.ts +3 -0
  7. package/es/index.mjs +3 -0
  8. package/es/packages/hooks/dateTimeShortCust.mjs +23 -0
  9. package/es/packages/hooks/idleTimeout.mjs +127 -0
  10. package/es/packages/hooks/index.mjs +3 -0
  11. package/es/packages/hooks/sysInfo.mjs +59 -0
  12. package/es/packages/hooks/useInfo.mjs +44 -0
  13. package/es/packages/theme-chalk/assets/logo.png.mjs +3 -0
  14. package/es/packages/utils/signalR.mjs +47 -0
  15. package/es/utils/arrayOperation.d.ts +23 -0
  16. package/es/utils/auto-update.d.ts +11 -0
  17. package/es/utils/base64Conver.d.ts +30 -0
  18. package/es/utils/data-signature.d.ts +17 -0
  19. package/es/utils/download.d.ts +46 -0
  20. package/es/utils/exportExcel.d.ts +12 -0
  21. package/es/utils/flowLoading.d.ts +19 -0
  22. package/es/utils/fontts/font-awesome.d.ts +1 -0
  23. package/es/utils/fontts/font_2298093_rnp72ifj3ba.d.ts +1 -0
  24. package/es/utils/formRule.d.ts +36 -0
  25. package/es/utils/formValidate.d.ts +21 -0
  26. package/es/utils/formatTime.d.ts +37 -0
  27. package/es/utils/getStyleSheets.d.ts +12 -0
  28. package/es/utils/gpsConvertor.d.ts +30 -0
  29. package/es/utils/index.d.ts +23 -0
  30. package/es/utils/json-utils.d.ts +6 -0
  31. package/es/utils/loading.d.ts +4 -0
  32. package/es/utils/md5Signature.d.ts +1 -0
  33. package/es/utils/mitt.d.ts +4 -0
  34. package/es/utils/request.d.ts +53 -0
  35. package/es/utils/saulVModel.d.ts +4 -0
  36. package/es/utils/setIconfont.d.ts +12 -0
  37. package/es/utils/signalR.d.ts +3 -0
  38. package/es/utils/storage.d.ts +27 -0
  39. package/es/utils/theme.d.ts +13 -0
  40. package/es/utils/toolsValidate.d.ts +148 -0
  41. package/es/utils/watermark.d.ts +10 -0
  42. package/index.js +144 -1
  43. package/index.min.js +4 -4
  44. package/index.min.mjs +4 -4
  45. package/index.mjs +123 -2
  46. package/lib/components/chart/index.d.ts +1 -1
  47. package/lib/components/chart/src/index.vue.d.ts +1 -1
  48. package/lib/components/index.d.ts +1 -0
  49. package/lib/components/svgIcon/index.d.ts +26 -0
  50. package/lib/components/svgIcon/index.vue.d.ts +27 -0
  51. package/lib/hooks/index.d.ts +3 -0
  52. package/lib/index.js +25 -0
  53. package/lib/packages/hooks/dateTimeShortCust.js +25 -0
  54. package/lib/packages/hooks/idleTimeout.js +131 -0
  55. package/lib/packages/hooks/index.js +25 -0
  56. package/lib/packages/hooks/sysInfo.js +62 -0
  57. package/lib/packages/hooks/useInfo.js +64 -0
  58. package/lib/packages/theme-chalk/assets/logo.png.js +7 -0
  59. package/lib/packages/utils/signalR.js +68 -0
  60. package/lib/utils/arrayOperation.d.ts +23 -0
  61. package/lib/utils/auto-update.d.ts +11 -0
  62. package/lib/utils/base64Conver.d.ts +30 -0
  63. package/lib/utils/data-signature.d.ts +17 -0
  64. package/lib/utils/download.d.ts +46 -0
  65. package/lib/utils/exportExcel.d.ts +12 -0
  66. package/lib/utils/flowLoading.d.ts +19 -0
  67. package/lib/utils/fontts/font-awesome.d.ts +1 -0
  68. package/lib/utils/fontts/font_2298093_rnp72ifj3ba.d.ts +1 -0
  69. package/lib/utils/formRule.d.ts +36 -0
  70. package/lib/utils/formValidate.d.ts +21 -0
  71. package/lib/utils/formatTime.d.ts +37 -0
  72. package/lib/utils/getStyleSheets.d.ts +12 -0
  73. package/lib/utils/gpsConvertor.d.ts +30 -0
  74. package/lib/utils/index.d.ts +23 -0
  75. package/lib/utils/json-utils.d.ts +6 -0
  76. package/lib/utils/loading.d.ts +4 -0
  77. package/lib/utils/md5Signature.d.ts +1 -0
  78. package/lib/utils/mitt.d.ts +4 -0
  79. package/lib/utils/request.d.ts +53 -0
  80. package/lib/utils/saulVModel.d.ts +4 -0
  81. package/lib/utils/setIconfont.d.ts +12 -0
  82. package/lib/utils/signalR.d.ts +3 -0
  83. package/lib/utils/storage.d.ts +27 -0
  84. package/lib/utils/theme.d.ts +13 -0
  85. package/lib/utils/toolsValidate.d.ts +148 -0
  86. package/lib/utils/watermark.d.ts +10 -0
  87. package/{es/index.css → lib/version.css} +2 -2
  88. package/locale/en.js +1 -1
  89. package/locale/en.min.js +1 -1
  90. package/locale/en.min.mjs +1 -1
  91. package/locale/en.mjs +1 -1
  92. package/locale/zh-cn.js +1 -1
  93. package/locale/zh-cn.min.js +1 -1
  94. package/locale/zh-cn.min.mjs +1 -1
  95. package/locale/zh-cn.mjs +1 -1
  96. package/package.json +1 -1
  97. /package/{lib/component.css → es/make-installer.css} +0 -0
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! fmdeui-fmui v1.0.5 */
1
+ /*! fmdeui-fmui v1.0.7 */
2
2
  import { createPinia, defineStore, storeToRefs } from 'pinia';
3
3
  import CryptoJS from 'crypto-js';
4
4
  import XLSXS from 'xlsx-js-style';
@@ -18743,6 +18743,127 @@ const useVxeTable = (opt, extras) => {
18743
18743
  return extras ? merge(options, extras) : options;
18744
18744
  };
18745
18745
 
18746
+ var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFwmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42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GowU3Pj8SmDXu7viyXyiYpBWF9l0bIC9IQPZPJw6z5SeGMlp7QfT+S+UZDiqVwxAmovbXVnxatL3EoP7dk3EAJgLT5+y/4m10QlQAwdb0ecqg3+hxPRIyGlGy3UPCmHxotgqezx3RMteyPH9WbqqZEEoItglqyIUqQdNgh5ZUbc5hcK5BRwUUJxeYfnzmXl8fuK1ScG1TyCqPcP4yUfK1atjxEdDhsEAMC2X3DcEDtIkYjAZ/Jw63ZccqS+ejR2xtfgZtcMt77ACtBTeMmp6LqQomu9n1x0JL9w37hNk0Zr3ozWTwTMJQLmRggoTgSjjxUbnJRQSwvIpcbxpPRk9bSMVO3TY5NVzyaagAklmoeG/XpyTs5D42PWSCRJCXIAgK35ZlDd6WS+DavjJRGBjxfBIiAgRqK6ZA/whduj1DDjYcUvwpCPqDH4HxmuIUqp1U4vfPfU8K8ODuvlIB/QuzIsPn6LktsnSoighKITXd5f5hxWHrWG8oiAAHC9gHvNQj3jYcVjNwMMBMD6OVTdRbBL4jkUfS8gBPnd0xZ1m4NZNNJAmDzcuuDZYaR5xAWG8meXnaP7SG6VkhtqCIC1+fmCYr0r40WFNcZ4+ab88yWcckqNeFaaVpWZptFNStOmTUjRZKQnqzNTNKoMHMdUjABODyNYSFp02AOC1+LjGbOXEz+b/7Nb8kfuWwKCHOWUGnAcw7Fdz94aY+XoewXhh0I/mj+HRqPbIGAY9j88X5w73RopXgAAAABJRU5ErkJggg==";
18747
+
18748
+ const { t } = useLocale();
18749
+ function updateIdleTimeout(timeout) {
18750
+ if (window.__IDLE_TIMEOUT__) {
18751
+ window.__IDLE_TIMEOUT__.updateIdleTimeout(timeout);
18752
+ }
18753
+ }
18754
+
18755
+ const storesThemeConfig$1 = useThemeConfig();
18756
+ const { themeConfig: themeConfig$1 } = storeToRefs(storesThemeConfig$1);
18757
+ async function loadSysInfo(tenantid) {
18758
+ var _a;
18759
+ const [err, res] = await feature(useBaseApi("sysTenant").gcomm(null, "sysInfo/" + Number(tenantid)));
18760
+ if (err) {
18761
+ themeConfig$1.value.logoUrl = img;
18762
+ Local.remove("themeConfig");
18763
+ Local.set("themeConfig", storesThemeConfig$1.themeConfig);
18764
+ return;
18765
+ } else {
18766
+ if (res.data.type != "success" || res.data.result == null) return;
18767
+ const data = res.data.result;
18768
+ themeConfig$1.value.logoUrl = data.logo;
18769
+ themeConfig$1.value.globalTitle = data.title;
18770
+ themeConfig$1.value.globalViceTitle = data.viceTitle;
18771
+ themeConfig$1.value.globalViceTitleMsg = data.viceDesc;
18772
+ themeConfig$1.value.icp = data.icp;
18773
+ themeConfig$1.value.icpUrl = data.icpUrl;
18774
+ themeConfig$1.value.isWatermark = data.watermark != null;
18775
+ themeConfig$1.value.watermarkText = data.watermark;
18776
+ themeConfig$1.value.copyright = data.copyright;
18777
+ themeConfig$1.value.version = data.version;
18778
+ themeConfig$1.value.carouselFiles = data.carouselFiles;
18779
+ themeConfig$1.value.primary = data.themeColor;
18780
+ themeConfig$1.value.layout = data.layout;
18781
+ themeConfig$1.value.animation = data.animation;
18782
+ themeConfig$1.value.secondVer = data.secondVer;
18783
+ themeConfig$1.value.captcha = data.captcha;
18784
+ themeConfig$1.value.forceChangePassword = data.forceChangePassword;
18785
+ themeConfig$1.value.passwordExpirationTime = data.passwordExpirationTime;
18786
+ themeConfig$1.value.i18NSwitch = data.i18NSwitch;
18787
+ themeConfig$1.value.idleTimeout = data.idleTimeout;
18788
+ themeConfig$1.value.onlineNotice = data.onlineNotice;
18789
+ themeConfig$1.value.mobileLogin = data.mobileLogin;
18790
+ themeConfig$1.value.scanLogin = data.scanLogin;
18791
+ themeConfig$1.value.signUp = data.signUp;
18792
+ window.__env__.VITE_SM_PUBLIC_KEY = data.publicKey;
18793
+ updateFavicon(data.logo);
18794
+ updateIdleTimeout((_a = themeConfig$1.value.idleTimeout) != null ? _a : 0);
18795
+ Local.remove("themeConfig");
18796
+ Local.set("themeConfig", storesThemeConfig$1.themeConfig);
18797
+ }
18798
+ }
18799
+ const updateFavicon = (url) => {
18800
+ const favicon = document.getElementById("favicon");
18801
+ favicon.href = url ? url : "data:;base64,=";
18802
+ };
18803
+
18804
+ const { userInfos } = useUserInfo();
18805
+ const isSupperAdmin = () => {
18806
+ return (userInfos == null ? void 0 : userInfos.accountType) === 999;
18807
+ };
18808
+ const isTenantAdmin = () => {
18809
+ return (userInfos == null ? void 0 : userInfos.accountType) === 888;
18810
+ };
18811
+ const isAdmin = () => {
18812
+ return isSupperAdmin() || isTenantAdmin();
18813
+ };
18814
+ const isNormalUser = () => {
18815
+ return (userInfos == null ? void 0 : userInfos.accountType) === 777;
18816
+ };
18817
+ const isMember = () => {
18818
+ return (userInfos == null ? void 0 : userInfos.accountType) === 666;
18819
+ };
18820
+ const userEmail = () => {
18821
+ return userInfos == null ? void 0 : userInfos.email;
18822
+ };
18823
+ const userName = () => {
18824
+ return userInfos == null ? void 0 : userInfos.userName;
18825
+ };
18826
+ const userFriendName = () => (userInfos == null ? void 0 : userInfos.realName) ? userInfos == null ? void 0 : userInfos.realName : (userInfos == null ? void 0 : userInfos.account) ? userInfos == null ? void 0 : userInfos.account : userInfos == null ? void 0 : userInfos.email;
18827
+ const tenantId = () => {
18828
+ return userInfos == null ? void 0 : userInfos.tenantId;
18829
+ };
18830
+ const userAccount = () => userInfos == null ? void 0 : userInfos.account;
18831
+ const userPhone = () => userInfos == null ? void 0 : userInfos.phone;
18832
+ const userId = () => userInfos == null ? void 0 : userInfos.id;
18833
+ const orgId = () => userInfos == null ? void 0 : userInfos.orgId;
18834
+ const orgName = () => userInfos == null ? void 0 : userInfos.orgName;
18835
+ const posId = () => userInfos == null ? void 0 : userInfos.posId;
18836
+ const posName = () => userInfos == null ? void 0 : userInfos.posName;
18837
+ const roles = () => userInfos == null ? void 0 : userInfos.roles;
18838
+ const hasRoleCode = (code) => {
18839
+ return userInfos.roles.find((u) => u.code === code) ? true : false;
18840
+ };
18841
+ const hasPrivilege = (privilege) => {
18842
+ return userInfos.authApiList.includes(privilege);
18843
+ };
18844
+
18845
+ const useDateTimeShortCust = () => {
18846
+ return [
18847
+ { text: "\u4ECA\u5929", value: /* @__PURE__ */ new Date() },
18848
+ {
18849
+ text: "\u6628\u5929",
18850
+ value: () => {
18851
+ const date = /* @__PURE__ */ new Date();
18852
+ date.setTime(date.getTime() - 3600 * 1e3 * 24);
18853
+ return date;
18854
+ }
18855
+ },
18856
+ {
18857
+ text: "\u4E0A\u5468",
18858
+ value: () => {
18859
+ const date = /* @__PURE__ */ new Date();
18860
+ date.setTime(date.getTime() - 3600 * 1e3 * 24 * 7);
18861
+ return date;
18862
+ }
18863
+ }
18864
+ ];
18865
+ };
18866
+
18746
18867
  const _hoisted_1$6 = { key: 0 };
18747
18868
  const _hoisted_2$3 = { key: 0 };
18748
18869
  var _sfc_main$c = /* @__PURE__ */ defineComponent({
@@ -22278,4 +22399,4 @@ const version = "1.0.0";
22278
22399
 
22279
22400
  const install = installer.install;
22280
22401
 
22281
- export { AccountTypeEnum, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, Session, StringToObj, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, buildLocaleContext, buildTranslator, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, configureRoutes, dataURLtoBlob, decryptJWT, installer as default, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, en, exportExcel, feature, fileToBase64, flowLoading, formatAxis, formatDate, formatPast, gcj02ToBd09, getCountryCode, getFileName, getHeader, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, initBackEndControlRoutes, initFrontEndControlRoutes, initRouter, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, reLoadLoginAccessToken, refreshAccessTokenKey, removeDuplicate, request2, saulVModel, service, setCssCdn, setDynamicViewsModules, setJsCdn, setPathPrefix, setupI18n, signatureByKSort, sleep, tansParams, translate, urlToBase64, useApi, useBaseApi, useChangeColor, useFormRulePresets, useKeepALiveNames, useLocale, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, validateFormWithScroll, validateFormWithScrollCallback, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version, wgs84ToBd09, wgs84ToGcj02, plusZhCn as zhCn };
22402
+ export { AccountTypeEnum, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, Session, StringToObj, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, buildLocaleContext, buildTranslator, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, configureRoutes, dataURLtoBlob, decryptJWT, installer as default, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, en, exportExcel, feature, fileToBase64, flowLoading, formatAxis, formatDate, formatPast, gcj02ToBd09, getCountryCode, getFileName, getHeader, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, hasPrivilege, hasRoleCode, i18n, initBackEndControlRoutes, initFrontEndControlRoutes, initRouter, install, isAdmin, isMember, isNormalUser, isObjectValueEqual, isSupperAdmin, isTenantAdmin, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, loadSysInfo, mergMessage, openWindow, orgId, orgName, posId, posName, reLoadLoginAccessToken, refreshAccessTokenKey, removeDuplicate, request2, roles, saulVModel, service, setCssCdn, setDynamicViewsModules, setJsCdn, setPathPrefix, setupI18n, signatureByKSort, sleep, tansParams, tenantId, translate, updateFavicon, urlToBase64, useApi, useBaseApi, useChangeColor, useDateTimeShortCust, useFormRulePresets, useKeepALiveNames, useLocale, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, userAccount, userEmail, userFriendName, userId, userName, userPhone, validateFormWithScroll, validateFormWithScrollCallback, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version, wgs84ToBd09, wgs84ToGcj02, plusZhCn as zhCn };
@@ -9,8 +9,8 @@ export declare const FChart: {
9
9
  id: string;
10
10
  options: Record<string, any>;
11
11
  theme: string;
12
- isEmpty: boolean | ((options: Record<string, any>) => boolean);
13
12
  description: string;
13
+ isEmpty: boolean | ((options: Record<string, any>) => boolean);
14
14
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
15
15
  $slots: {
16
16
  empty?(_: {}): any;
@@ -16,8 +16,8 @@ declare const __VLS_component: DefineComponent<FChartProps, {}, {}, {}, {}, Comp
16
16
  id: string;
17
17
  options: Record<string, any>;
18
18
  theme: string;
19
- isEmpty: boolean | ((options: Record<string, any>) => boolean);
20
19
  description: string;
20
+ isEmpty: boolean | ((options: Record<string, any>) => boolean);
21
21
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
22
22
  echartRef: HTMLDivElement;
23
23
  }, HTMLDivElement>;
@@ -7,3 +7,4 @@ export * from './select';
7
7
  export * from './select-table';
8
8
  export * from './query-condition';
9
9
  export * from './form';
10
+ export * from './svgIcon';
@@ -0,0 +1,26 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ export declare const FSvgIcon: DefineComponent<ExtractPropTypes<{
3
+ name: {
4
+ type: StringConstructor;
5
+ };
6
+ size: {
7
+ type: NumberConstructor;
8
+ default: () => number;
9
+ };
10
+ color: {
11
+ type: StringConstructor;
12
+ };
13
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
14
+ name: {
15
+ type: StringConstructor;
16
+ };
17
+ size: {
18
+ type: NumberConstructor;
19
+ default: () => number;
20
+ };
21
+ color: {
22
+ type: StringConstructor;
23
+ };
24
+ }>> & Readonly<{}>, {
25
+ size: number;
26
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,27 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ name: {
4
+ type: StringConstructor;
5
+ };
6
+ size: {
7
+ type: NumberConstructor;
8
+ default: () => number;
9
+ };
10
+ color: {
11
+ type: StringConstructor;
12
+ };
13
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
14
+ name: {
15
+ type: StringConstructor;
16
+ };
17
+ size: {
18
+ type: NumberConstructor;
19
+ default: () => number;
20
+ };
21
+ color: {
22
+ type: StringConstructor;
23
+ };
24
+ }>> & Readonly<{}>, {
25
+ size: number;
26
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
27
+ export default _default;
@@ -1,3 +1,6 @@
1
1
  export * from './useLocale';
2
2
  export * from './authFunction';
3
3
  export * from './useVxeTableOptionsHook';
4
+ export * from './sysInfo';
5
+ export * from './useInfo';
6
+ export * from './dateTimeShortCust';
package/lib/index.js CHANGED
@@ -27,14 +27,17 @@ var index$1 = require('./packages/api/sys/index.js');
27
27
  var flowLoading = require('./packages/utils/flowLoading.js');
28
28
  var formatTime = require('./packages/utils/formatTime.js');
29
29
  var gpsConvertor = require('./packages/utils/gpsConvertor.js');
30
+ var useInfo = require('./packages/hooks/useInfo.js');
30
31
  var backEnd = require('./packages/router/backEnd.js');
31
32
  var frontEnd = require('./packages/router/frontEnd.js');
32
33
  var toolsValidate = require('./packages/utils/toolsValidate.js');
34
+ var sysInfo = require('./packages/hooks/sysInfo.js');
33
35
  var saulVModel = require('./packages/utils/saulVModel.js');
34
36
  var setIconfont = require('./packages/utils/setIconfont.js');
35
37
  var dataSignature = require('./packages/utils/data-signature.js');
36
38
  var index$4 = require('./packages/api/base/index.js');
37
39
  var theme = require('./packages/utils/theme.js');
40
+ var dateTimeShortCust = require('./packages/hooks/dateTimeShortCust.js');
38
41
  var formRule = require('./packages/utils/formRule.js');
39
42
  var keepAliveNames = require('./packages/stores/keepAliveNames.js');
40
43
  var requestOldRoutes = require('./packages/stores/requestOldRoutes.js');
@@ -120,6 +123,25 @@ exports.getWeek = formatTime.getWeek;
120
123
  exports.gcj02ToBd09 = gpsConvertor.gcj02ToBd09;
121
124
  exports.wgs84ToBd09 = gpsConvertor.wgs84ToBd09;
122
125
  exports.wgs84ToGcj02 = gpsConvertor.wgs84ToGcj02;
126
+ exports.hasPrivilege = useInfo.hasPrivilege;
127
+ exports.hasRoleCode = useInfo.hasRoleCode;
128
+ exports.isAdmin = useInfo.isAdmin;
129
+ exports.isMember = useInfo.isMember;
130
+ exports.isNormalUser = useInfo.isNormalUser;
131
+ exports.isSupperAdmin = useInfo.isSupperAdmin;
132
+ exports.isTenantAdmin = useInfo.isTenantAdmin;
133
+ exports.orgId = useInfo.orgId;
134
+ exports.orgName = useInfo.orgName;
135
+ exports.posId = useInfo.posId;
136
+ exports.posName = useInfo.posName;
137
+ exports.roles = useInfo.roles;
138
+ exports.tenantId = useInfo.tenantId;
139
+ exports.userAccount = useInfo.userAccount;
140
+ exports.userEmail = useInfo.userEmail;
141
+ exports.userFriendName = useInfo.userFriendName;
142
+ exports.userId = useInfo.userId;
143
+ exports.userName = useInfo.userName;
144
+ exports.userPhone = useInfo.userPhone;
123
145
  exports.initBackEndControlRoutes = backEnd.initBackEndControlRoutes;
124
146
  exports.setDynamicViewsModules = backEnd.setDynamicViewsModules;
125
147
  exports.initFrontEndControlRoutes = frontEnd.initFrontEndControlRoutes;
@@ -147,6 +169,8 @@ exports.verifyPostalCode = toolsValidate.verifyPostalCode;
147
169
  exports.verifyTelPhone = toolsValidate.verifyTelPhone;
148
170
  exports.verifyTextColor = toolsValidate.verifyTextColor;
149
171
  exports.verifyUrl = toolsValidate.verifyUrl;
172
+ exports.loadSysInfo = sysInfo.loadSysInfo;
173
+ exports.updateFavicon = sysInfo.updateFavicon;
150
174
  exports.saulVModel = saulVModel.saulVModel;
151
175
  exports.setCssCdn = setIconfont.setCssCdn;
152
176
  exports.setJsCdn = setIconfont.setJsCdn;
@@ -154,6 +178,7 @@ exports.signatureByKSort = dataSignature.signatureByKSort;
154
178
  exports.useApi = index$4.useApi;
155
179
  exports.useBaseApi = index$4.useBaseApi;
156
180
  exports.useChangeColor = theme.useChangeColor;
181
+ exports.useDateTimeShortCust = dateTimeShortCust.useDateTimeShortCust;
157
182
  exports.useFormRulePresets = formRule.useFormRulePresets;
158
183
  exports.useKeepALiveNames = keepAliveNames.useKeepALiveNames;
159
184
  exports.useRequestOldRoutes = requestOldRoutes.useRequestOldRoutes;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ const useDateTimeShortCust = () => {
4
+ return [
5
+ { text: "\u4ECA\u5929", value: /* @__PURE__ */ new Date() },
6
+ {
7
+ text: "\u6628\u5929",
8
+ value: () => {
9
+ const date = /* @__PURE__ */ new Date();
10
+ date.setTime(date.getTime() - 3600 * 1e3 * 24);
11
+ return date;
12
+ }
13
+ },
14
+ {
15
+ text: "\u4E0A\u5468",
16
+ value: () => {
17
+ const date = /* @__PURE__ */ new Date();
18
+ date.setTime(date.getTime() - 3600 * 1e3 * 24 * 7);
19
+ return date;
20
+ }
21
+ }
22
+ ];
23
+ };
24
+
25
+ exports.useDateTimeShortCust = useDateTimeShortCust;
@@ -0,0 +1,131 @@
1
+ 'use strict';
2
+
3
+ var lodashEs = require('lodash-es');
4
+ var storage = require('../utils/storage.js');
5
+ var elementPlus = require('element-plus');
6
+ var request = require('../utils/request.js');
7
+ var useLocale = require('./useLocale.js');
8
+
9
+ var __defProp = Object.defineProperty;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
12
+ let signalR;
13
+ async function loadSignalR() {
14
+ if (!signalR) {
15
+ const module = await Promise.resolve().then(function () { return require('../utils/signalR.js'); });
16
+ signalR = module.signalR;
17
+ }
18
+ return signalR;
19
+ }
20
+ const { t } = useLocale.useLocale();
21
+ class IdleTimeoutManager {
22
+ constructor(config = {}) {
23
+ __publicField(this, "timerId", null);
24
+ __publicField(this, "config");
25
+ __publicField(this, "debouncedReset");
26
+ /** 检查闲置超时时间间隔 */
27
+ __publicField(this, "checkTimeoutInterval", 2 * 1e3);
28
+ __publicField(this, "handleVisibilityChange", () => {
29
+ if (document.visibilityState === "visible") {
30
+ this.setLastActivityTime();
31
+ }
32
+ });
33
+ this.config = {
34
+ timeout: 30 * 60,
35
+ events: ["mousewheel", "keydown", "click"],
36
+ onTimeout: this.timeOutExec.bind(this),
37
+ debounceInterval: 200,
38
+ ...config
39
+ };
40
+ this.debouncedReset = this.config.debounceInterval > 0 ? lodashEs.debounce(this.setLastActivityTime.bind(this), this.config.debounceInterval) : this.setLastActivityTime.bind(this);
41
+ this.init();
42
+ }
43
+ init() {
44
+ this.config.events.forEach((event) => {
45
+ window.addEventListener(event, this.debouncedReset);
46
+ });
47
+ document.addEventListener("visibilitychange", this.handleVisibilityChange);
48
+ this.setLastActivityTime();
49
+ this.updateIdleTimeout(this.config.timeout);
50
+ }
51
+ /** 设置最后活动时间 */
52
+ setLastActivityTime() {
53
+ storage.Local.set("lastActivityTime", (/* @__PURE__ */ new Date()).getTime());
54
+ }
55
+ /**
56
+ * 更新空闲超时时间
57
+ * @param timeout - 新的超时时间(毫秒)
58
+ */
59
+ updateIdleTimeout(timeout) {
60
+ this.config.timeout = timeout;
61
+ if (this.config.timeout > 0 && this.timerId == null) {
62
+ this.timerId = window.setInterval(this.checkTimeout.bind(this), this.checkTimeoutInterval);
63
+ } else if (this.config.timeout == 0 && this.timerId != null) {
64
+ window.clearInterval(this.timerId);
65
+ this.timerId = null;
66
+ }
67
+ }
68
+ /** 检查是否超时 */
69
+ checkTimeout() {
70
+ const currentTime = (/* @__PURE__ */ new Date()).getTime();
71
+ const lastActivityTime = Number(storage.Local.get("lastActivityTime"));
72
+ if (lastActivityTime == 0) return;
73
+ const accessToken = storage.Local.get(request.accessTokenKey);
74
+ if (!accessToken || accessToken == "invalid_token") return;
75
+ const timeout = this.config.timeout * 1e3;
76
+ if (currentTime - lastActivityTime > timeout) {
77
+ this.destroy();
78
+ this.config.onTimeout();
79
+ }
80
+ }
81
+ /** 销毁实例 */
82
+ destroy() {
83
+ this.config.events.forEach((event) => {
84
+ window.removeEventListener(event, this.debouncedReset);
85
+ });
86
+ document.removeEventListener("visibilitychange", this.handleVisibilityChange);
87
+ if (this.timerId !== null) {
88
+ window.clearInterval(this.timerId);
89
+ this.timerId = null;
90
+ }
91
+ }
92
+ /** 超时时执行 */
93
+ timeOutExec() {
94
+ const appEl = document.getElementById("app");
95
+ appEl == null ? void 0 : appEl.remove();
96
+ loadSignalR().then((signalR2) => {
97
+ signalR2.stop();
98
+ });
99
+ storage.Local.remove(request.accessTokenKey);
100
+ storage.Local.remove(request.refreshAccessTokenKey);
101
+ storage.Session.clear();
102
+ elementPlus.ElMessageBox.alert(t("plus.list.idleTimeoutMessage"), t("plus.list.sysMessage"), {
103
+ type: "warning",
104
+ draggable: true,
105
+ callback: () => {
106
+ window.location.reload();
107
+ }
108
+ });
109
+ }
110
+ }
111
+ function initIdleTimeout(config) {
112
+ if (!window.__IDLE_TIMEOUT__) {
113
+ window.__IDLE_TIMEOUT__ = new IdleTimeoutManager(config);
114
+ }
115
+ return window.__IDLE_TIMEOUT__;
116
+ }
117
+ function destroyIdleTimeout() {
118
+ if (window.__IDLE_TIMEOUT__) {
119
+ window.__IDLE_TIMEOUT__.destroy();
120
+ window.__IDLE_TIMEOUT__ = void 0;
121
+ }
122
+ }
123
+ function updateIdleTimeout(timeout) {
124
+ if (window.__IDLE_TIMEOUT__) {
125
+ window.__IDLE_TIMEOUT__.updateIdleTimeout(timeout);
126
+ }
127
+ }
128
+
129
+ exports.destroyIdleTimeout = destroyIdleTimeout;
130
+ exports.initIdleTimeout = initIdleTimeout;
131
+ exports.updateIdleTimeout = updateIdleTimeout;
@@ -3,6 +3,9 @@
3
3
  var useLocale = require('./useLocale.js');
4
4
  var authFunction = require('./authFunction.js');
5
5
  var useVxeTableOptionsHook = require('./useVxeTableOptionsHook.js');
6
+ var sysInfo = require('./sysInfo.js');
7
+ var useInfo = require('./useInfo.js');
8
+ var dateTimeShortCust = require('./dateTimeShortCust.js');
6
9
 
7
10
 
8
11
 
@@ -17,3 +20,25 @@ exports.hAuth = authFunction.hAuth;
17
20
  exports.hAuthAll = authFunction.hAuthAll;
18
21
  exports.hAuths = authFunction.hAuths;
19
22
  exports.useVxeTable = useVxeTableOptionsHook.useVxeTable;
23
+ exports.loadSysInfo = sysInfo.loadSysInfo;
24
+ exports.updateFavicon = sysInfo.updateFavicon;
25
+ exports.hasPrivilege = useInfo.hasPrivilege;
26
+ exports.hasRoleCode = useInfo.hasRoleCode;
27
+ exports.isAdmin = useInfo.isAdmin;
28
+ exports.isMember = useInfo.isMember;
29
+ exports.isNormalUser = useInfo.isNormalUser;
30
+ exports.isSupperAdmin = useInfo.isSupperAdmin;
31
+ exports.isTenantAdmin = useInfo.isTenantAdmin;
32
+ exports.orgId = useInfo.orgId;
33
+ exports.orgName = useInfo.orgName;
34
+ exports.posId = useInfo.posId;
35
+ exports.posName = useInfo.posName;
36
+ exports.roles = useInfo.roles;
37
+ exports.tenantId = useInfo.tenantId;
38
+ exports.userAccount = useInfo.userAccount;
39
+ exports.userEmail = useInfo.userEmail;
40
+ exports.userFriendName = useInfo.userFriendName;
41
+ exports.userId = useInfo.userId;
42
+ exports.userName = useInfo.userName;
43
+ exports.userPhone = useInfo.userPhone;
44
+ exports.useDateTimeShortCust = dateTimeShortCust.useDateTimeShortCust;
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+
3
+ var storage = require('../utils/storage.js');
4
+ var pinia = require('pinia');
5
+ var themeConfig$1 = require('../stores/themeConfig.js');
6
+ var logo = require('../theme-chalk/assets/logo.png.js');
7
+ var idleTimeout = require('./idleTimeout.js');
8
+ require('../api/index.js');
9
+ var index = require('../api/sys/index.js');
10
+ var index$1 = require('../api/base/index.js');
11
+
12
+ const storesThemeConfig = themeConfig$1.useThemeConfig();
13
+ const { themeConfig } = pinia.storeToRefs(storesThemeConfig);
14
+ async function loadSysInfo(tenantid) {
15
+ var _a;
16
+ const [err, res] = await index.feature(index$1.useBaseApi("sysTenant").gcomm(null, "sysInfo/" + Number(tenantid)));
17
+ if (err) {
18
+ themeConfig.value.logoUrl = logo.default;
19
+ storage.Local.remove("themeConfig");
20
+ storage.Local.set("themeConfig", storesThemeConfig.themeConfig);
21
+ return;
22
+ } else {
23
+ if (res.data.type != "success" || res.data.result == null) return;
24
+ const data = res.data.result;
25
+ themeConfig.value.logoUrl = data.logo;
26
+ themeConfig.value.globalTitle = data.title;
27
+ themeConfig.value.globalViceTitle = data.viceTitle;
28
+ themeConfig.value.globalViceTitleMsg = data.viceDesc;
29
+ themeConfig.value.icp = data.icp;
30
+ themeConfig.value.icpUrl = data.icpUrl;
31
+ themeConfig.value.isWatermark = data.watermark != null;
32
+ themeConfig.value.watermarkText = data.watermark;
33
+ themeConfig.value.copyright = data.copyright;
34
+ themeConfig.value.version = data.version;
35
+ themeConfig.value.carouselFiles = data.carouselFiles;
36
+ themeConfig.value.primary = data.themeColor;
37
+ themeConfig.value.layout = data.layout;
38
+ themeConfig.value.animation = data.animation;
39
+ themeConfig.value.secondVer = data.secondVer;
40
+ themeConfig.value.captcha = data.captcha;
41
+ themeConfig.value.forceChangePassword = data.forceChangePassword;
42
+ themeConfig.value.passwordExpirationTime = data.passwordExpirationTime;
43
+ themeConfig.value.i18NSwitch = data.i18NSwitch;
44
+ themeConfig.value.idleTimeout = data.idleTimeout;
45
+ themeConfig.value.onlineNotice = data.onlineNotice;
46
+ themeConfig.value.mobileLogin = data.mobileLogin;
47
+ themeConfig.value.scanLogin = data.scanLogin;
48
+ themeConfig.value.signUp = data.signUp;
49
+ window.__env__.VITE_SM_PUBLIC_KEY = data.publicKey;
50
+ updateFavicon(data.logo);
51
+ idleTimeout.updateIdleTimeout((_a = themeConfig.value.idleTimeout) != null ? _a : 0);
52
+ storage.Local.remove("themeConfig");
53
+ storage.Local.set("themeConfig", storesThemeConfig.themeConfig);
54
+ }
55
+ }
56
+ const updateFavicon = (url) => {
57
+ const favicon = document.getElementById("favicon");
58
+ favicon.href = url ? url : "data:;base64,=";
59
+ };
60
+
61
+ exports.loadSysInfo = loadSysInfo;
62
+ exports.updateFavicon = updateFavicon;
@@ -0,0 +1,64 @@
1
+ 'use strict';
2
+
3
+ var userInfo = require('../stores/userInfo.js');
4
+
5
+ const { userInfos } = userInfo.useUserInfo();
6
+ const isSupperAdmin = () => {
7
+ return (userInfos == null ? void 0 : userInfos.accountType) === 999;
8
+ };
9
+ const isTenantAdmin = () => {
10
+ return (userInfos == null ? void 0 : userInfos.accountType) === 888;
11
+ };
12
+ const isAdmin = () => {
13
+ return isSupperAdmin() || isTenantAdmin();
14
+ };
15
+ const isNormalUser = () => {
16
+ return (userInfos == null ? void 0 : userInfos.accountType) === 777;
17
+ };
18
+ const isMember = () => {
19
+ return (userInfos == null ? void 0 : userInfos.accountType) === 666;
20
+ };
21
+ const userEmail = () => {
22
+ return userInfos == null ? void 0 : userInfos.email;
23
+ };
24
+ const userName = () => {
25
+ return userInfos == null ? void 0 : userInfos.userName;
26
+ };
27
+ const userFriendName = () => (userInfos == null ? void 0 : userInfos.realName) ? userInfos == null ? void 0 : userInfos.realName : (userInfos == null ? void 0 : userInfos.account) ? userInfos == null ? void 0 : userInfos.account : userInfos == null ? void 0 : userInfos.email;
28
+ const tenantId = () => {
29
+ return userInfos == null ? void 0 : userInfos.tenantId;
30
+ };
31
+ const userAccount = () => userInfos == null ? void 0 : userInfos.account;
32
+ const userPhone = () => userInfos == null ? void 0 : userInfos.phone;
33
+ const userId = () => userInfos == null ? void 0 : userInfos.id;
34
+ const orgId = () => userInfos == null ? void 0 : userInfos.orgId;
35
+ const orgName = () => userInfos == null ? void 0 : userInfos.orgName;
36
+ const posId = () => userInfos == null ? void 0 : userInfos.posId;
37
+ const posName = () => userInfos == null ? void 0 : userInfos.posName;
38
+ const roles = () => userInfos == null ? void 0 : userInfos.roles;
39
+ const hasRoleCode = (code) => {
40
+ return userInfos.roles.find((u) => u.code === code) ? true : false;
41
+ };
42
+ const hasPrivilege = (privilege) => {
43
+ return userInfos.authApiList.includes(privilege);
44
+ };
45
+
46
+ exports.hasPrivilege = hasPrivilege;
47
+ exports.hasRoleCode = hasRoleCode;
48
+ exports.isAdmin = isAdmin;
49
+ exports.isMember = isMember;
50
+ exports.isNormalUser = isNormalUser;
51
+ exports.isSupperAdmin = isSupperAdmin;
52
+ exports.isTenantAdmin = isTenantAdmin;
53
+ exports.orgId = orgId;
54
+ exports.orgName = orgName;
55
+ exports.posId = posId;
56
+ exports.posName = posName;
57
+ exports.roles = roles;
58
+ exports.tenantId = tenantId;
59
+ exports.userAccount = userAccount;
60
+ exports.userEmail = userEmail;
61
+ exports.userFriendName = userFriendName;
62
+ exports.userId = userId;
63
+ exports.userName = userName;
64
+ exports.userPhone = userPhone;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAA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