hrp-ui-base 1.5.2 → 1.5.3

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/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var s=Object.defineProperty;var l=(i,a,r)=>a in i?s(i,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[a]=r;var n=(i,a,r)=>l(i,typeof a!="symbol"?a+"":a,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./components.cjs"),e=require("./transform-data--ruli7aE.cjs"),o=require("./string-utils-BdintfxS.cjs");class d{constructor(){n(this,"fileId","");n(this,"fileName","");n(this,"url","");n(this,"fileSize","")}}exports.AnnexImgUpload=t.AnnexImgUpload;exports.AnnexUpload=t.AnnexUpload;exports.AnnexUploadWeijian=t.AnnexUploadWeijian;exports.ApprovalCenterDrawer=t.ApprovalCenterDrawer;exports.AvatarComponent=t.AvatarComponent;exports.BaseLayout=t.BaseLayout;exports.CustomButton=t.CustomButton;exports.CustonSwitch=t.CustonSwitch;exports.DarkComponent=t.DarkComponent;exports.DownloadComponent=t.DownloadComponent;exports.ExportCenterDrawer=t.ExportCenterDrawer;exports.FontSizeComponent=t.FontSizeComponent;exports.LayoutContainer=t.LayoutContainer;exports.ListSearchContent=t.ListSearchContent;exports.MenuPositionComponent=t.MenuPositionComponent;exports.MessageComponent=t.MessageComponent;exports.MessageNotificationDrawer=t.MessageNotificationDrawer;exports.NOTIFICATION_TYPE=t.NOTIFICATION_TYPE;exports.PersonalizationGuideDialog=t.PersonalizationGuideDialog;exports.SideMenu=t.SideMenu;exports.SideMenuSonList=t.SideMenuSonList;exports.SysHeader=t.SysHeader;exports.SysHeaderLeft=t.SysHeaderLeft;exports.SysHeaderRight=t.SysHeaderRight;exports.SysHeaderTabs=t.SysHeaderTabs;exports.TodoComponent=t.TodoComponent;exports.UserConfigBo=t.UserConfigBo;exports.createLayoutPlugin=t.createLayoutPlugin;exports.default=t.default;exports.useLayoutConfigStore=t.useLayoutConfigStore;exports.useLayoutMenuStore=t.useLayoutMenuStore;exports.useLayoutNoticeStore=t.useLayoutNoticeStore;exports.useLayoutTabsStore=t.useLayoutTabsStore;exports.Debounce=e.debounce;exports.SocketClass=e.Socket;exports.Throttle=e.throttle;exports.addWujieListener=e.addWujieListener;exports.debounceleading=e.debounceleading;exports.download=e.download;exports.filterKey=e.filterKey;exports.forSureMounted=e.forSureMounted;exports.formatterHandler=e.formatterHandler;exports.getDictConfigs=e.getDictConfigs;exports.getFirstLevelPath=e.getFirstLevelPath;exports.getFirstMenuInList=e.getFirstMenuInList;exports.getModuleFirstMenuPath=e.getModuleFirstMenuPath;exports.getModuleNameByPathName=e.getModuleNameByPathName;exports.getPagePermit=e.getPagePermit;exports.getRouteExistIf=e.getRouteExistIf;exports.getUrlParam=e.getUrlParam;exports.isArray=e.isArray;exports.isExternal=e.isExternal;exports.isHavePermit=e.isHavePermit;exports.isHttp=e.isHttp;exports.isString=e.isString;exports.makeAccessPath=e.makeAccessPath;exports.phoneTableHeaderCellStyle=e.phoneTableHeaderCellStyle;exports.routerPush=e.routerPush;exports.scrollToErrorElement=e.scrollToErrorElement;exports.setDarkStyle=e.setDarkStyle;exports.setFontSizeMode=e.setFontSizeMode;exports.setRouterUtilsContext=e.setRouterUtilsContext;exports.setWhiteStyle=e.setWhiteStyle;exports.tableFontCellStyle=e.tableFontCellStyle;exports.tableHeaderCellStyle=e.tableHeaderCellStyle;exports.toMainRouter=e.toMainRouter;exports.toNoPermitPage=e.toNoPermitPage;exports.transformData=e.transformData;exports.validAlphabets=e.validAlphabets;exports.validEmail=e.validEmail;exports.validLowerCase=e.validLowerCase;exports.validURL=e.validURL;exports.validUpperCase=e.validUpperCase;exports.validUsername=e.validUsername;exports.HttpUtil=o.HttpUtil;exports.IsPc=o.IsPc;exports.IsPhone=o.IsPhone;exports.ddWindowOpen=o.ddWindowOpen;exports.digitUppercase=o.digitUppercase;exports.downloadFile=o.downloadFile;exports.exitLogin=o.exitLogin;exports.formatDecimal=o.formatDecimal;exports.formatTwoDecimal=o.formatTwoDecimal;exports.getEllipsis=o.getEllipsis;exports.getFileType=o.getFileType;exports.getProcessAppIdUrl=o.getProcessAppIdUrl;exports.highlightText=o.highlightText;exports.openEncodeUrl=o.openEncodeUrl;exports.setDingDingTitle=o.setDingDingTitle;exports.setExitLoginRouter=o.setExitLoginRouter;exports.FileBaseInfo=d;
1
+ "use strict";var s=Object.defineProperty;var l=(i,a,r)=>a in i?s(i,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[a]=r;var n=(i,a,r)=>l(i,typeof a!="symbol"?a+"":a,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./components.cjs"),e=require("./transform-data-DIrvR94U.cjs"),o=require("./string-utils-BdXthP1I.cjs");class d{constructor(){n(this,"fileId","");n(this,"fileName","");n(this,"url","");n(this,"fileSize","")}}exports.AnnexImgUpload=t.AnnexImgUpload;exports.AnnexUpload=t.AnnexUpload;exports.AnnexUploadWeijian=t.AnnexUploadWeijian;exports.ApprovalCenterDrawer=t.ApprovalCenterDrawer;exports.AvatarComponent=t.AvatarComponent;exports.BaseLayout=t.BaseLayout;exports.CustomButton=t.CustomButton;exports.CustonSwitch=t.CustonSwitch;exports.DarkComponent=t.DarkComponent;exports.DownloadComponent=t.DownloadComponent;exports.ExportCenterDrawer=t.ExportCenterDrawer;exports.FontSizeComponent=t.FontSizeComponent;exports.LayoutContainer=t.LayoutContainer;exports.ListSearchContent=t.ListSearchContent;exports.MenuPositionComponent=t.MenuPositionComponent;exports.MessageComponent=t.MessageComponent;exports.MessageNotificationDrawer=t.MessageNotificationDrawer;exports.NOTIFICATION_TYPE=t.NOTIFICATION_TYPE;exports.PersonalizationGuideDialog=t.PersonalizationGuideDialog;exports.SideMenu=t.SideMenu;exports.SideMenuSonList=t.SideMenuSonList;exports.SysHeader=t.SysHeader;exports.SysHeaderLeft=t.SysHeaderLeft;exports.SysHeaderRight=t.SysHeaderRight;exports.SysHeaderTabs=t.SysHeaderTabs;exports.TodoComponent=t.TodoComponent;exports.UserConfigBo=t.UserConfigBo;exports.createLayoutPlugin=t.createLayoutPlugin;exports.default=t.default;exports.useLayoutConfigStore=t.useLayoutConfigStore;exports.useLayoutMenuStore=t.useLayoutMenuStore;exports.useLayoutNoticeStore=t.useLayoutNoticeStore;exports.useLayoutTabsStore=t.useLayoutTabsStore;exports.Debounce=e.debounce;exports.SocketClass=e.Socket;exports.Throttle=e.throttle;exports.addWujieListener=e.addWujieListener;exports.debounceleading=e.debounceleading;exports.download=e.download;exports.exitLogin=e.exitLogin;exports.filterKey=e.filterKey;exports.forSureMounted=e.forSureMounted;exports.formatterHandler=e.formatterHandler;exports.getDictConfigs=e.getDictConfigs;exports.getFirstLevelPath=e.getFirstLevelPath;exports.getFirstMenuInList=e.getFirstMenuInList;exports.getModuleFirstMenuPath=e.getModuleFirstMenuPath;exports.getModuleNameByPathName=e.getModuleNameByPathName;exports.getPagePermit=e.getPagePermit;exports.getRouteExistIf=e.getRouteExistIf;exports.getUrlParam=e.getUrlParam;exports.isArray=e.isArray;exports.isExternal=e.isExternal;exports.isHavePermit=e.isHavePermit;exports.isHttp=e.isHttp;exports.isString=e.isString;exports.makeAccessPath=e.makeAccessPath;exports.phoneTableHeaderCellStyle=e.phoneTableHeaderCellStyle;exports.routerPush=e.routerPush;exports.scrollToErrorElement=e.scrollToErrorElement;exports.setDarkStyle=e.setDarkStyle;exports.setExitLoginRouter=e.setExitLoginRouter;exports.setFontSizeMode=e.setFontSizeMode;exports.setRouterUtilsContext=e.setRouterUtilsContext;exports.setWhiteStyle=e.setWhiteStyle;exports.tableFontCellStyle=e.tableFontCellStyle;exports.tableHeaderCellStyle=e.tableHeaderCellStyle;exports.toMainRouter=e.toMainRouter;exports.toNoPermitPage=e.toNoPermitPage;exports.transformData=e.transformData;exports.validAlphabets=e.validAlphabets;exports.validEmail=e.validEmail;exports.validLowerCase=e.validLowerCase;exports.validURL=e.validURL;exports.validUpperCase=e.validUpperCase;exports.validUsername=e.validUsername;exports.HttpUtil=o.HttpUtil;exports.IsPc=o.IsPc;exports.IsPhone=o.IsPhone;exports.ddWindowOpen=o.ddWindowOpen;exports.digitUppercase=o.digitUppercase;exports.downloadFile=o.downloadFile;exports.formatDecimal=o.formatDecimal;exports.formatTwoDecimal=o.formatTwoDecimal;exports.getEllipsis=o.getEllipsis;exports.getFileType=o.getFileType;exports.getProcessAppIdUrl=o.getProcessAppIdUrl;exports.highlightText=o.highlightText;exports.openEncodeUrl=o.openEncodeUrl;exports.setDingDingTitle=o.setDingDingTitle;exports.FileBaseInfo=d;
package/dist/index.es.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var o = Object.defineProperty;
2
2
  var i = (a, e, s) => e in a ? o(a, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[e] = s;
3
3
  var t = (a, e, s) => i(a, typeof e != "symbol" ? e + "" : e, s);
4
- import { AnnexImgUpload as u, AnnexUpload as g, AnnexUploadWeijian as p, ApprovalCenterDrawer as m, AvatarComponent as C, BaseLayout as S, CustomButton as f, CustonSwitch as c, DarkComponent as y, DownloadComponent as h, ExportCenterDrawer as L, FontSizeComponent as P, LayoutContainer as x, ListSearchContent as D, MenuPositionComponent as M, MessageComponent as I, MessageNotificationDrawer as T, NOTIFICATION_TYPE as U, PersonalizationGuideDialog as H, SideMenu as v, SideMenuSonList as w, SysHeader as A, SysHeaderLeft as E, SysHeaderRight as F, SysHeaderTabs as b, TodoComponent as N, UserConfigBo as k, createLayoutPlugin as B, default as R, useLayoutConfigStore as z, useLayoutMenuStore as j, useLayoutNoticeStore as W, useLayoutTabsStore as O } from "./components.es.js";
5
- import { d as K, S as q, t as J, a as Y, b as _, c as Q, f as V, e as X, g as Z, h as $, i as ee, j as ae, k as te, l as se, m as oe, n as ie, o as re, p as ne, q as le, r as de, s as ue, u as ge, v as pe, w as me, x as Ce, y as Se, z as fe, A as ce, B as ye, C as he, D as Le, E as Pe, F as xe, G as De, H as Me, I as Ie, J as Te, K as Ue, L as He, M as ve, N as we } from "./transform-data-APk1LVKg.js";
6
- import { H as Ee, I as Fe, a as be, d as Ne, b as ke, c as Be, e as Re, f as ze, g as je, h as We, i as Oe, j as Ge, k as Ke, o as qe, s as Je, l as Ye } from "./string-utils-B1iXup7H.js";
4
+ import { AnnexImgUpload as u, AnnexUpload as g, AnnexUploadWeijian as p, ApprovalCenterDrawer as m, AvatarComponent as C, BaseLayout as S, CustomButton as f, CustonSwitch as c, DarkComponent as y, DownloadComponent as P, ExportCenterDrawer as h, FontSizeComponent as L, LayoutContainer as x, ListSearchContent as D, MenuPositionComponent as M, MessageComponent as I, MessageNotificationDrawer as T, NOTIFICATION_TYPE as U, PersonalizationGuideDialog as H, SideMenu as v, SideMenuSonList as w, SysHeader as A, SysHeaderLeft as E, SysHeaderRight as F, SysHeaderTabs as b, TodoComponent as N, UserConfigBo as B, createLayoutPlugin as R, default as k, useLayoutConfigStore as z, useLayoutMenuStore as j, useLayoutNoticeStore as O, useLayoutTabsStore as W } from "./components.es.js";
5
+ import { d as K, S as q, t as J, a as Y, b as _, c as Q, e as V, f as X, g as Z, h as $, i as ee, j as ae, k as te, l as se, m as oe, n as ie, o as re, p as ne, q as le, r as de, s as ue, u as ge, v as pe, w as me, x as Ce, y as Se, z as fe, A as ce, B as ye, C as Pe, D as he, E as Le, F as xe, G as De, H as Me, I as Ie, J as Te, K as Ue, L as He, M as ve, N as we, O as Ae, P as Ee } from "./transform-data-Mhkx0O-Z.js";
6
+ import { H as be, I as Ne, a as Be, d as Re, b as ke, c as ze, f as je, e as Oe, g as We, h as Ge, i as Ke, j as qe, o as Je, s as Ye } from "./string-utils-CrDuYEn2.js";
7
7
  class n {
8
8
  constructor() {
9
9
  /**文件ID */
@@ -27,13 +27,13 @@ export {
27
27
  c as CustonSwitch,
28
28
  y as DarkComponent,
29
29
  K as Debounce,
30
- h as DownloadComponent,
31
- L as ExportCenterDrawer,
30
+ P as DownloadComponent,
31
+ h as ExportCenterDrawer,
32
32
  n as FileBaseInfo,
33
- P as FontSizeComponent,
34
- Ee as HttpUtil,
35
- Fe as IsPc,
36
- be as IsPhone,
33
+ L as FontSizeComponent,
34
+ be as HttpUtil,
35
+ Ne as IsPc,
36
+ Be as IsPhone,
37
37
  x as LayoutContainer,
38
38
  D as ListSearchContent,
39
39
  M as MenuPositionComponent,
@@ -50,62 +50,62 @@ export {
50
50
  b as SysHeaderTabs,
51
51
  J as Throttle,
52
52
  N as TodoComponent,
53
- k as UserConfigBo,
53
+ B as UserConfigBo,
54
54
  Y as addWujieListener,
55
- B as createLayoutPlugin,
56
- Ne as ddWindowOpen,
55
+ R as createLayoutPlugin,
56
+ Re as ddWindowOpen,
57
57
  _ as debounceleading,
58
- R as default,
58
+ k as default,
59
59
  ke as digitUppercase,
60
60
  Q as download,
61
- Be as downloadFile,
62
- Re as exitLogin,
63
- V as filterKey,
64
- X as forSureMounted,
65
- ze as formatDecimal,
66
- je as formatTwoDecimal,
67
- Z as formatterHandler,
68
- $ as getDictConfigs,
61
+ ze as downloadFile,
62
+ V as exitLogin,
63
+ X as filterKey,
64
+ Z as forSureMounted,
65
+ je as formatDecimal,
66
+ Oe as formatTwoDecimal,
67
+ $ as formatterHandler,
68
+ ee as getDictConfigs,
69
69
  We as getEllipsis,
70
- Oe as getFileType,
71
- ee as getFirstLevelPath,
72
- ae as getFirstMenuInList,
73
- te as getModuleFirstMenuPath,
74
- se as getModuleNameByPathName,
75
- oe as getPagePermit,
76
- Ge as getProcessAppIdUrl,
77
- ie as getRouteExistIf,
78
- re as getUrlParam,
79
- Ke as highlightText,
80
- ne as isArray,
81
- le as isExternal,
82
- de as isHavePermit,
83
- ue as isHttp,
84
- ge as isString,
85
- pe as makeAccessPath,
86
- qe as openEncodeUrl,
87
- me as phoneTableHeaderCellStyle,
88
- Ce as routerPush,
89
- Se as scrollToErrorElement,
90
- fe as setDarkStyle,
91
- Je as setDingDingTitle,
92
- Ye as setExitLoginRouter,
93
- ce as setFontSizeMode,
94
- ye as setRouterUtilsContext,
95
- he as setWhiteStyle,
96
- Le as tableFontCellStyle,
97
- Pe as tableHeaderCellStyle,
98
- xe as toMainRouter,
99
- De as toNoPermitPage,
100
- Me as transformData,
70
+ Ge as getFileType,
71
+ ae as getFirstLevelPath,
72
+ te as getFirstMenuInList,
73
+ se as getModuleFirstMenuPath,
74
+ oe as getModuleNameByPathName,
75
+ ie as getPagePermit,
76
+ Ke as getProcessAppIdUrl,
77
+ re as getRouteExistIf,
78
+ ne as getUrlParam,
79
+ qe as highlightText,
80
+ le as isArray,
81
+ de as isExternal,
82
+ ue as isHavePermit,
83
+ ge as isHttp,
84
+ pe as isString,
85
+ me as makeAccessPath,
86
+ Je as openEncodeUrl,
87
+ Ce as phoneTableHeaderCellStyle,
88
+ Se as routerPush,
89
+ fe as scrollToErrorElement,
90
+ ce as setDarkStyle,
91
+ Ye as setDingDingTitle,
92
+ ye as setExitLoginRouter,
93
+ Pe as setFontSizeMode,
94
+ he as setRouterUtilsContext,
95
+ Le as setWhiteStyle,
96
+ xe as tableFontCellStyle,
97
+ De as tableHeaderCellStyle,
98
+ Me as toMainRouter,
99
+ Ie as toNoPermitPage,
100
+ Te as transformData,
101
101
  z as useLayoutConfigStore,
102
102
  j as useLayoutMenuStore,
103
- W as useLayoutNoticeStore,
104
- O as useLayoutTabsStore,
105
- Ie as validAlphabets,
106
- Te as validEmail,
107
- Ue as validLowerCase,
108
- He as validURL,
109
- ve as validUpperCase,
110
- we as validUsername
103
+ O as useLayoutNoticeStore,
104
+ W as useLayoutTabsStore,
105
+ Ue as validAlphabets,
106
+ He as validEmail,
107
+ ve as validLowerCase,
108
+ we as validURL,
109
+ Ae as validUpperCase,
110
+ Ee as validUsername
111
111
  };
@@ -0,0 +1 @@
1
+ "use strict";var O=Object.defineProperty;var z=(t,o,e)=>o in t?O(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e;var m=(t,o,e)=>z(t,typeof o!="symbol"?o+"":o,e);const A=require("dingtalk-jsapi"),u=require("element-plus"),P=require("axios"),C=require("qs"),g=require("vant"),D=require("sm-crypto"),E=t=>{if(A.env.platform!=="notInDingTalk")window.open(t+"/?ddtab=true","_blank");else if(window.oaTool&&window.oaTool.isOA){window.oaTool.openNewWindow(t);return}else window.open(t,"_blank")},J=t=>encodeURIComponent(t),v=t=>(t.indexOf("?")>-1&&(t.indexOf("/?")>-1?t=t.split("/?")[0]:t=t.split("?")[0]),t[t.length-1]==="/"&&(t=t.substring(0,t.length-1)),t),j=t=>{if(!(!t||typeof t!="string"))if(A.env.platform!=="notInDingTalk")A.biz.navigation.setTitle({title:t}),document.title=t;else if(window.oaTool&&window.oaTool.isOA){window.oaTool.setTitle(t);return}else document.title=t};function I(t){try{return new URL(t),t}catch{}const o=window.location.origin,e=window.location.pathname;t.startsWith("./")?t=t.substring(2):t.startsWith("/")&&(t=t.substring(1));const n=e.endsWith("/")?e:e.substring(0,e.lastIndexOf("/")+1);return o+n+t}const M=async t=>{let o="";try{o=(sessionStorage.getItem("userConfig")?JSON.parse(sessionStorage.getItem("userConfig")):null).fileUploadType}catch(n){console.log(n)}try{await navigator.clipboard.writeText(I(t.url)),console.log("URL 已复制到剪贴板:",I(t.url)),u.ElMessage.success("文件下载链接已写入剪切板,如遇系统无法下载,自行复制到浏览器打开链接即可下载!")}catch(n){console.error("无法写入剪贴板:",n)}let e=document.createElement("a");e.style="display: none",e.download=t.fileName,e.href=t.url,e.target="_blank",document.body.appendChild(e),e.click(),document.body.removeChild(e)},w=()=>{const t=navigator.userAgent.toLowerCase();return["android","iphone","ipad","ipod","harmonyos","openharmony","huawei","honor","symbianos","windows phone","mobile","webos","blackberry","opera mini","opera mobi","iemobile","wpdesktop"].some(n=>t.includes(n))},L=()=>!w(),q=(t,o)=>D.sm4.encrypt(t,K(o));function K(t){const o=[];for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);n<128?o.push(n):n<2048?o.push(192|n>>6,128|n&63):n<55296||n>=57344?o.push(224|n>>12,128|n>>6&63,128|n&63):(e++,n=65536+((n&1023)<<10|t.charCodeAt(e)&1023),o.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|n&63))}for(let e=0;e<o.length;e++){let n=o[e];n>127&&(o[e]=n-256)}return o}const R=function(){let t=localStorage.getItem("TOKEN")+"IhfN5d11Zk1ZC%Po"+Date.now();return q(t,"*XeL#J@znVJ#sdSv")},W=function(){return localStorage.getItem("TOKEN")},r=function(){return R()},U=window.location.origin+window.location.pathname+"api",i=P.create({timeout:18e5,baseURL:U});i.interceptors.request.use(t=>t);i.interceptors.response.use(t=>(w()?t.data.code==501||t.data.code==510?t.data.msg?g.showNotify({type:"danger",message:t.data.msg}):g.showNotify({type:"danger",message:"发生未知错误!"}):t.data.code==500?g.showNotify({type:"danger",message:"服务发生错误!"}):t.data.code==201?g.showNotify({type:"success",message:t.data.msg}):t.data.code:t.data.code==501||t.data.code==510?t.data.msg?u.ElMessage({type:"error",dangerouslyUseHTMLString:!0,message:`<span style="word-break: break-all">${t.data.msg}</span>`,duration:5e3}):u.ElMessage.error("发生未知错误!"):t.data.code==500?u.ElMessageBox.alert(t.data.msg?t.data.msg:"服务发生错误","错误提示",{confirmButtonText:"确定",callback:()=>{}}):t.data.code==201?u.ElMessage({type:"success",dangerouslyUseHTMLString:!0,message:`<span style="word-break: break-all">${t.data.msg}</span>`,duration:5e3}):t.data.code,t.data),async t=>(t.response.status===401||(w()?g.showNotify({type:"danger",message:"网络请求失败"}):u.ElMessage.error("网络请求失败")),Promise.reject(t.response)));class x{static get(o,e){return e&&(e=e||""),i({method:"get",url:o,params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static post(o,e){return e&&(e=e||""),i({method:"post",url:o,data:C.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r(),"Authorization-origin-Token":localStorage.getItem("TOKEN")}})}static postJson(o,e,n){return e&&(e=e||""),i({method:"post",url:o,data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r(),"Authorization-origin-Token":localStorage.getItem("TOKEN"),...n}})}static uploadOSS(o,e,n){return e&&(e=e||""),i({method:"post",url:o,data:e,headers:{"Content-Type":"multipart/form-data","Authorization-Token":r(),...n}})}static uploadOSSResident(o,e,n){return e&&(e=e||""),i({method:"post",url:o,data:e,headers:{"Content-Type":"multipart/form-data","Authorization-Token":W(),...n}})}static exportFile(o,e){return e&&(e=e||""),i({method:"post",responseType:"arraybuffer",url:o,data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static put(o,e){return e&&(e=e||""),i({method:"put",url:o,data:C.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static putJson(o,e){return e&&(e=e||""),i({method:"put",url:o,data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static putFile(o,e,n){return e&&(e=e||""),i({method:"put",url:o,data:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r(),...n}})}static deleted(o,e){return e&&(e=e||""),i({method:"delete",url:o,data:C.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static deletedjson(o,e){return e&&(e=e||""),i({method:"delete",url:o,data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static downloadGet(o,e){return e&&(e=e||""),i({method:"get",url:o,responseType:"blob",params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static downloadPost(o,e){return e&&(e=e||""),i({method:"post",url:o,responseType:"blob",params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static download(o,e){return e&&(e=e||""),i({method:"post",url:o,responseType:"blob",data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static downloadPostJson(o,e){return e&&(e=e||""),i({method:"post",url:o,responseType:"blob",data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static downloadPut(o,e){return e&&(e=e||""),i({method:"put",url:o,responseType:"blob",params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static downloadPutJson(o,e){return e&&(e=e||""),i({method:"put",url:o,responseType:"blob",data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static downloadFile(o,e){return e&&(e=e||{}),i({method:"post",url:o,responseType:"blob",params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static uploadBase64(o,e,n){let s=new FormData;return s.append("file",e.file),s.append("modulesId",e.modulesId),i({method:"post",url:o,data:s,headers:{"Content-Type":"multipart/form-data","Authorization-Token":r(),...n}})}static postFormData(o,e,n){let s=new FormData;return e.files&&Array.isArray(e.files)&&e.files.forEach(c=>{s.append("files",c)}),e.submitWorkOrderParam&&s.append("submitWorkOrderParam",new Blob([JSON.stringify(e.submitWorkOrderParam)],{type:"application/json;charset=utf-8"})),i({method:"post",url:o,data:s,headers:{"Authorization-Token":r(),"Content-Type":"multipart/form-data",...n}})}}m(x,"baseUrl",U);class B{constructor(){m(this,"havePermission",!1);m(this,"funPointIdList",[])}}const $=(t,o)=>{const e=o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),n=new RegExp(e,"gi");return t.replace(n,c=>`<span style="color:var(--theme-normal-normal)">${c}</span>`)},H=t=>t.split("?")[0].substring(t.lastIndexOf(".")+1).toLowerCase(),V=(t,o,e=0)=>{let n="";if(e>0)for(let s=0;s<e;s++)n+=".";return t.length>o?t.slice(0,o-e)+n:t};function _(t){let o=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),e=new Array("","拾","佰","仟"),n=new Array("","万","亿","兆"),s=new Array("角","分","毫","厘"),c="元",F=1e15,p="",f="",a="",T=["",""],h,y,d,b,S,k,N;if(t==null)return"";if(t>=F)return"超出最大处理数字";if(t==0)return a=o[0]+c,a;if(t.toString().indexOf(".")==-1?(p=t.toString(),f="",c="元整"):(T=t.toString().split("."),p=T[0],f=T[1].substr(0,2)),parseInt(p,10)>0){h=0,y=p.length;for(let l=0;l<y;l++)d=p.substr(l,1),b=y-l-1,S=b/4,k=b%4,d=="0"?h++:(h>0&&(a+=o[0]),h=0,a+=o[parseInt(d)]+e[k]),k==0&&h<4&&(a+=n[S]);a+=c}if(f!=""){N=f.length;for(let l=0;l<N;l++)d=f.substr(l,1),d!="0"&&(a+=o[Number(d)]+s[l])}return a==""&&(a+=o[0]+c),a}function Z(t){const o=parseFloat(t.toString());if(isNaN(o))return t;const e=o.toString();return(e.split(".")[1]||"").length>11?o.toFixed(11):e}function G(t){const o=parseFloat(t.toString());return isNaN(o)?0:Number(Math.round(o*100)/100)}exports.FunPointVo=B;exports.HttpUtil=x;exports.IsPc=L;exports.IsPhone=w;exports.ddWindowOpen=E;exports.digitUppercase=_;exports.downloadFile=M;exports.formatDecimal=Z;exports.formatTwoDecimal=G;exports.getEllipsis=V;exports.getFileType=H;exports.getProcessAppIdUrl=v;exports.highlightText=$;exports.openEncodeUrl=J;exports.setDingDingTitle=j;
@@ -1,25 +1,24 @@
1
- var R = Object.defineProperty;
2
- var j = (t, o, e) => o in t ? R(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e;
3
- var m = (t, o, e) => j(t, typeof o != "symbol" ? o + "" : o, e);
4
- import I from "dingtalk-jsapi";
5
- import { ElMessage as g, ElMessageBox as v } from "element-plus";
6
- import J from "axios";
1
+ var z = Object.defineProperty;
2
+ var F = (t, o, e) => o in t ? z(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e;
3
+ var m = (t, o, e) => F(t, typeof o != "symbol" ? o + "" : o, e);
4
+ import C from "dingtalk-jsapi";
5
+ import { ElMessage as g, ElMessageBox as U } from "element-plus";
6
+ import P from "axios";
7
7
  import k from "qs";
8
- import { debounce as D } from "lodash";
9
8
  import { showNotify as h } from "vant";
10
- import { sm4 as E } from "sm-crypto";
11
- const te = (t) => {
12
- if (I.env.platform !== "notInDingTalk")
9
+ import { sm4 as J } from "sm-crypto";
10
+ const q = (t) => {
11
+ if (C.env.platform !== "notInDingTalk")
13
12
  window.open(t + "/?ddtab=true", "_blank");
14
13
  else if (window.oaTool && window.oaTool.isOA) {
15
14
  window.oaTool.openNewWindow(t);
16
15
  return;
17
16
  } else
18
17
  window.open(t, "_blank");
19
- }, oe = (t) => encodeURIComponent(t), ne = (t) => (t.indexOf("?") > -1 && (t.indexOf("/?") > -1 ? t = t.split("/?")[0] : t = t.split("?")[0]), t[t.length - 1] === "/" && (t = t.substring(0, t.length - 1)), t), ie = (t) => {
18
+ }, _ = (t) => encodeURIComponent(t), V = (t) => (t.indexOf("?") > -1 && (t.indexOf("/?") > -1 ? t = t.split("/?")[0] : t = t.split("?")[0]), t[t.length - 1] === "/" && (t = t.substring(0, t.length - 1)), t), Z = (t) => {
20
19
  if (!(!t || typeof t != "string"))
21
- if (I.env.platform !== "notInDingTalk")
22
- I.biz.navigation.setTitle({
20
+ if (C.env.platform !== "notInDingTalk")
21
+ C.biz.navigation.setTitle({
23
22
  title: t
24
23
  }), document.title = t;
25
24
  else if (window.oaTool && window.oaTool.isOA) {
@@ -28,7 +27,7 @@ const te = (t) => {
28
27
  } else
29
28
  document.title = t;
30
29
  };
31
- function O(t) {
30
+ function N(t) {
32
31
  try {
33
32
  return new URL(t), t;
34
33
  } catch {
@@ -38,7 +37,7 @@ function O(t) {
38
37
  const n = e.endsWith("/") ? e : e.substring(0, e.lastIndexOf("/") + 1);
39
38
  return o + n + t;
40
39
  }
41
- const re = async (t) => {
40
+ const G = async (t) => {
42
41
  let o = "";
43
42
  try {
44
43
  o = (sessionStorage.getItem("userConfig") ? JSON.parse(sessionStorage.getItem("userConfig")) : null).fileUploadType;
@@ -46,7 +45,7 @@ const re = async (t) => {
46
45
  console.log(n);
47
46
  }
48
47
  try {
49
- await navigator.clipboard.writeText(O(t.url)), console.log("URL 已复制到剪贴板:", O(t.url)), g.success("文件下载链接已写入剪切板,如遇系统无法下载,自行复制到浏览器打开链接即可下载!");
48
+ await navigator.clipboard.writeText(N(t.url)), console.log("URL 已复制到剪贴板:", N(t.url)), g.success("文件下载链接已写入剪切板,如遇系统无法下载,自行复制到浏览器打开链接即可下载!");
50
49
  } catch (n) {
51
50
  console.error("无法写入剪贴板:", n);
52
51
  }
@@ -77,52 +76,8 @@ const re = async (t) => {
77
76
  "iemobile",
78
77
  "wpdesktop"
79
78
  ].some((n) => t.includes(n));
80
- }, se = () => !A(), L = [
81
- "imd",
82
- "agoal",
83
- "scm",
84
- "bms",
85
- "coc",
86
- "hws",
87
- "fms",
88
- "hrm",
89
- "hrms",
90
- "itrms",
91
- "personalization",
92
- "projectManagement"
93
- ], K = () => {
94
- const t = window.location.pathname.replace(/\/$/, "").split("/"), o = t[t.length - 1];
95
- L.includes(o) && t.pop();
96
- const e = t.join("/") || "/";
97
- return window.location.origin + (e.endsWith("/") ? e : `${e}/`);
98
- }, U = (t) => {
99
- const o = `${K()}login/index.html`;
100
- return t ? `${o}?host=${encodeURIComponent(t)}` : o;
101
- };
102
- let w = null;
103
- const ae = (t) => {
104
- w = t;
105
- }, z = () => {
106
- var t, o, e;
107
- return ((o = (t = w == null ? void 0 : w.currentRoute) == null ? void 0 : t.value) == null ? void 0 : o.fullPath) || ((e = window.location.hash) == null ? void 0 : e.replace(/^#/, "")) || window.location.pathname + window.location.search;
108
- }, $ = D(() => {
109
- alert("登录失效,请重新登录");
110
- }, 1e3, { leading: !0, trailing: !1 });
111
- function C(t) {
112
- localStorage.setItem("preRoute", z()), localStorage.setItem("toRouter", window.location.search), localStorage.getItem("toRouter");
113
- let o = localStorage.getItem("currentRouterInfo");
114
- if (localStorage.setItem("toRouterObject", o), t && t === 1) {
115
- window.sessionStorage.clear(), window.localStorage.clear(), window.location.href = U();
116
- return;
117
- }
118
- localStorage.setItem("toRouter", window.location.search);
119
- let e = z();
120
- sessionStorage.setItem("preRoute", e), window.localStorage.removeItem("TOKEN"), window.localStorage.removeItem("clientId"), $(), setTimeout(() => {
121
- window.location.href = U();
122
- }, 100);
123
- }
124
- const M = (t, o) => E.encrypt(t, W(o));
125
- function W(t) {
79
+ }, X = () => !A(), D = (t, o) => J.encrypt(t, j(o));
80
+ function j(t) {
126
81
  const o = [];
127
82
  for (let e = 0; e < t.length; e++) {
128
83
  let n = t.charCodeAt(e);
@@ -143,26 +98,26 @@ function W(t) {
143
98
  }
144
99
  return o;
145
100
  }
146
- const B = function() {
101
+ const v = function() {
147
102
  let t = localStorage.getItem("TOKEN") + "IhfN5d11Zk1ZC%Po" + Date.now();
148
- return M(t, "*XeL#J@znVJ#sdSv");
149
- }, q = function() {
103
+ return D(t, "*XeL#J@znVJ#sdSv");
104
+ }, E = function() {
150
105
  return localStorage.getItem("TOKEN");
151
106
  }, r = function() {
152
- return B();
153
- }, F = window.location.origin + window.location.pathname + "api", i = J.create({
107
+ return v();
108
+ }, I = window.location.origin + window.location.pathname + "api", i = P.create({
154
109
  timeout: 18e5,
155
110
  // 请求超时时间
156
- baseURL: F
111
+ baseURL: I
157
112
  });
158
113
  i.interceptors.request.use((t) => t);
159
114
  i.interceptors.response.use(
160
- (t) => (A() ? t.data.code == 501 || t.data.code == 510 ? t.data.msg ? h({ type: "danger", message: t.data.msg }) : h({ type: "danger", message: "发生未知错误!" }) : t.data.code == 500 ? h({ type: "danger", message: "服务发生错误!" }) : t.data.code == 201 ? h({ type: "success", message: t.data.msg }) : t.data.code === 401 && C() : t.data.code == 501 || t.data.code == 510 ? t.data.msg ? g({
115
+ (t) => (A() ? t.data.code == 501 || t.data.code == 510 ? t.data.msg ? h({ type: "danger", message: t.data.msg }) : h({ type: "danger", message: "发生未知错误!" }) : t.data.code == 500 ? h({ type: "danger", message: "服务发生错误!" }) : t.data.code == 201 ? h({ type: "success", message: t.data.msg }) : t.data.code : t.data.code == 501 || t.data.code == 510 ? t.data.msg ? g({
161
116
  type: "error",
162
117
  dangerouslyUseHTMLString: !0,
163
118
  message: `<span style="word-break: break-all">${t.data.msg}</span>`,
164
119
  duration: 5e3
165
- }) : g.error("发生未知错误!") : t.data.code == 500 ? v.alert(
120
+ }) : g.error("发生未知错误!") : t.data.code == 500 ? U.alert(
166
121
  t.data.msg ? t.data.msg : "服务发生错误",
167
122
  "错误提示",
168
123
  {
@@ -177,10 +132,10 @@ i.interceptors.response.use(
177
132
  dangerouslyUseHTMLString: !0,
178
133
  message: `<span style="word-break: break-all">${t.data.msg}</span>`,
179
134
  duration: 5e3
180
- }) : t.data.code === 401 && C(), t.data),
181
- async (t) => (t.response.status === 401 ? C() : A() ? h({ type: "danger", message: "网络请求失败" }) : g.error("网络请求失败"), Promise.reject(t.response))
135
+ }) : t.data.code, t.data),
136
+ async (t) => (t.response.status === 401 || (A() ? h({ type: "danger", message: "网络请求失败" }) : g.error("网络请求失败")), Promise.reject(t.response))
182
137
  );
183
- class H {
138
+ class L {
184
139
  static get(o, e) {
185
140
  return e && (e = e || ""), i({
186
141
  method: "get",
@@ -238,7 +193,7 @@ class H {
238
193
  data: e,
239
194
  headers: {
240
195
  "Content-Type": "multipart/form-data",
241
- "Authorization-Token": q(),
196
+ "Authorization-Token": E(),
242
197
  ...n
243
198
  }
244
199
  //设置header信息
@@ -446,8 +401,8 @@ class H {
446
401
  });
447
402
  }
448
403
  }
449
- m(H, "baseUrl", F);
450
- class le {
404
+ m(L, "baseUrl", I);
405
+ class Q {
451
406
  constructor() {
452
407
  //是否拥有页面权限
453
408
  m(this, "havePermission", !1);
@@ -455,17 +410,17 @@ class le {
455
410
  m(this, "funPointIdList", []);
456
411
  }
457
412
  }
458
- const ce = (t, o) => {
413
+ const Y = (t, o) => {
459
414
  const e = o.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), n = new RegExp(e, "gi");
460
415
  return t.replace(n, (c) => `<span style="color:var(--theme-normal-normal)">${c}</span>`);
461
- }, de = (t) => t.split("?")[0].substring(t.lastIndexOf(".") + 1).toLowerCase(), ue = (t, o, e = 0) => {
416
+ }, ee = (t) => t.split("?")[0].substring(t.lastIndexOf(".") + 1).toLowerCase(), te = (t, o, e = 0) => {
462
417
  let n = "";
463
418
  if (e > 0)
464
419
  for (let s = 0; s < e; s++)
465
420
  n += ".";
466
421
  return t.length > o ? t.slice(0, o - e) + n : t;
467
422
  };
468
- function pe(t) {
423
+ function oe(t) {
469
424
  let o = new Array(
470
425
  "零",
471
426
  "壹",
@@ -477,53 +432,51 @@ function pe(t) {
477
432
  "柒",
478
433
  "捌",
479
434
  "玖"
480
- ), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"), s = new Array("角", "分", "毫", "厘"), c = "元", P = 1e15, u = "", p = "", a = "", T = ["", ""], f, y, d, b, x, S, N;
435
+ ), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"), s = new Array("角", "分", "毫", "厘"), c = "元", O = 1e15, u = "", p = "", a = "", w = ["", ""], f, T, d, y, S, b, x;
481
436
  if (t == null)
482
437
  return "";
483
- if (t >= P)
438
+ if (t >= O)
484
439
  return "超出最大处理数字";
485
440
  if (t == 0)
486
441
  return a = o[0] + c, a;
487
- if (t.toString().indexOf(".") == -1 ? (u = t.toString(), p = "", c = "元整") : (T = t.toString().split("."), u = T[0], p = T[1].substr(0, 2)), parseInt(u, 10) > 0) {
488
- f = 0, y = u.length;
489
- for (let l = 0; l < y; l++)
490
- d = u.substr(l, 1), b = y - l - 1, x = b / 4, S = b % 4, d == "0" ? f++ : (f > 0 && (a += o[0]), f = 0, a += o[parseInt(d)] + e[S]), S == 0 && f < 4 && (a += n[x]);
442
+ if (t.toString().indexOf(".") == -1 ? (u = t.toString(), p = "", c = "元整") : (w = t.toString().split("."), u = w[0], p = w[1].substr(0, 2)), parseInt(u, 10) > 0) {
443
+ f = 0, T = u.length;
444
+ for (let l = 0; l < T; l++)
445
+ d = u.substr(l, 1), y = T - l - 1, S = y / 4, b = y % 4, d == "0" ? f++ : (f > 0 && (a += o[0]), f = 0, a += o[parseInt(d)] + e[b]), b == 0 && f < 4 && (a += n[S]);
491
446
  a += c;
492
447
  }
493
448
  if (p != "") {
494
- N = p.length;
495
- for (let l = 0; l < N; l++)
449
+ x = p.length;
450
+ for (let l = 0; l < x; l++)
496
451
  d = p.substr(l, 1), d != "0" && (a += o[Number(d)] + s[l]);
497
452
  }
498
453
  return a == "" && (a += o[0] + c), a;
499
454
  }
500
- function fe(t) {
455
+ function ne(t) {
501
456
  const o = parseFloat(t.toString());
502
457
  if (isNaN(o))
503
458
  return t;
504
459
  const e = o.toString();
505
460
  return (e.split(".")[1] || "").length > 11 ? o.toFixed(11) : e;
506
461
  }
507
- function he(t) {
462
+ function ie(t) {
508
463
  const o = parseFloat(t.toString());
509
464
  return isNaN(o) ? 0 : Number(Math.round(o * 100) / 100);
510
465
  }
511
466
  export {
512
- le as F,
513
- H,
514
- se as I,
467
+ Q as F,
468
+ L as H,
469
+ X as I,
515
470
  A as a,
516
- pe as b,
517
- re as c,
518
- te as d,
519
- C as e,
520
- fe as f,
521
- he as g,
522
- ue as h,
523
- de as i,
524
- ne as j,
525
- ce as k,
526
- ae as l,
527
- oe as o,
528
- ie as s
471
+ oe as b,
472
+ G as c,
473
+ q as d,
474
+ ie as e,
475
+ ne as f,
476
+ te as g,
477
+ ee as h,
478
+ V as i,
479
+ Y as j,
480
+ _ as o,
481
+ Z as s
529
482
  };