hrp-ui-base 1.3.6 → 1.3.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.
- package/dist/components.cjs +1 -1
- package/dist/components.es.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +2 -2
- package/dist/string-utils-BH3jGZDF.cjs +1 -0
- package/dist/{string-utils-DPWu4Qfh.js → string-utils-DjRg4NCR.js} +86 -95
- package/dist/{transform-data-DDmK9TEL.cjs → transform-data-CkMSs3ZE.cjs} +1 -1
- package/dist/{transform-data-jyYW8phC.js → transform-data-_KBQqEax.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +1 -1
- package/packages/approval-process/package.json +1 -1
- package/src/utils/crypto.ts +12 -12
- package/dist/string-utils-DKz4mfHd.cjs +0 -1
package/dist/components.es.js
CHANGED
|
@@ -4,7 +4,7 @@ var eA = (s, t, r) => Se(s, typeof t != "symbol" ? t + "" : t, r);
|
|
|
4
4
|
import { openBlock as e, createElementBlock as u, createVNode as b, unref as N, withCtx as v, createTextVNode as nA, toDisplayString as $, ref as n, defineComponent as mA, resolveComponent as Z, createBlock as C, createElementVNode as o, createCommentVNode as L, watch as bA, onMounted as CA, resolveDirective as FA, Fragment as pA, renderList as wA, withModifiers as UA, withDirectives as TA, nextTick as OA, reactive as pe, mergeProps as Je, normalizeClass as BA, defineAsyncComponent as _e, onActivated as ge, renderSlot as KA, resolveDynamicComponent as $e, onUnmounted as $A, computed as hA, normalizeStyle as RA, withKeys as At, createSlots as et, Transition as JA, vShow as IA, inject as Ae, Teleport as te, provide as tt } from "vue";
|
|
5
5
|
import { ElButton as nt, ElSwitch as rt, ElMessage as rA, ElMessageBox as ot, ElScrollbar as lt, ElNotification as at } from "element-plus";
|
|
6
6
|
import "axios";
|
|
7
|
-
import { H as Q, i as F, c as _A, d as re, F as st, e as ut } from "./string-utils-
|
|
7
|
+
import { H as Q, i as F, c as _A, d as re, F as st, e as ut } from "./string-utils-DjRg4NCR.js";
|
|
8
8
|
import { debounce as dt } from "lodash";
|
|
9
9
|
import it from "vuedraggable";
|
|
10
10
|
import ct from "dingtalk-jsapi";
|
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-
|
|
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-CkMSs3ZE.cjs"),o=require("./string-utils-BH3jGZDF.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;
|
package/dist/index.es.js
CHANGED
|
@@ -2,8 +2,8 @@ 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
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-
|
|
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-
|
|
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-_KBQqEax.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-DjRg4NCR.js";
|
|
7
7
|
class n {
|
|
8
8
|
constructor() {
|
|
9
9
|
/**文件ID */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var E=Object.defineProperty;var R=(t,o,e)=>o in t?E(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e;var w=(t,o,e)=>R(t,typeof o!="symbol"?o+"":o,e);const y=require("dingtalk-jsapi"),u=require("element-plus"),D=require("axios"),A=require("qs"),v=require("lodash"),g=require("vant"),J=require("sm-crypto"),L=t=>{if(y.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),M=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),K=t=>{if(!(!t||typeof t!="string"))if(y.env.platform!=="notInDingTalk")y.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 F(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 W=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(F(t.url)),console.log("URL 已复制到剪贴板:",F(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)},b=()=>{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))},q=()=>!b();let m=null;const $=t=>{m=t},x=()=>{var t,o,e;return((o=(t=m==null?void 0:m.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},B=v.debounce(()=>{alert("登录失效,请重新登录")},1e3,{leading:!0,trailing:!1});function T(t){const o=localStorage.getItem("TenantHost");localStorage.setItem("preRoute",x()),localStorage.setItem("toRouter",window.location.search),localStorage.getItem("toRouter");let e=localStorage.getItem("currentRouterInfo");if(localStorage.setItem("toRouterObject",e),y.env.platform!=="notInDingTalk")window.location.href=window.location.origin+window.location.pathname+"login/index.html?host="+o;else if(window.oaTool&&window.oaTool.isOA){const n=window.location.origin+(window.location.pathname.endsWith("/")?window.location.pathname:window.location.pathname+"/");let r=x();sessionStorage.setItem("preRoute",r),window.localStorage.removeItem("TOKEN"),window.location.href=`${n}oa-login/index.html?url=${r}`}else if(t&&t===1)window.sessionStorage.clear(),window.localStorage.clear(),window.location.href=window.location.origin+window.location.pathname+"login/index.html";else{localStorage.setItem("toRouter",window.location.search);let n=x();sessionStorage.setItem("preRoute",n),window.localStorage.removeItem("TOKEN"),window.localStorage.removeItem("clientId"),B();const r=window.location.origin+(window.location.pathname.endsWith("/")?window.location.pathname:window.location.pathname+"/");setTimeout(()=>{window.location.href=`${r}login/index.html?host=${o}`},100)}}const H=(t,o)=>J.sm4.encrypt(t,V(o));function V(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 _=function(){let t=localStorage.getItem("TOKEN")+"IhfN5d11Zk1ZC%Po"+Date.now();return H(t,"*XeL#J@znVJ#sdSv")},Z=function(){return localStorage.getItem("TOKEN")},a=function(){return _()},U=window.location.origin+window.location.pathname+"api",i=D.create({timeout:18e5,baseURL:U});i.interceptors.request.use(t=>t);i.interceptors.response.use(t=>(b()?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===401&&T():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===401&&T(),t.data),async t=>(t.response.status===401?T():b()?g.showNotify({type:"danger",message:"网络请求失败"}):u.ElMessage.error("网络请求失败"),Promise.reject(t.response)));class P{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":a()}})}static post(o,e){return e&&(e=e||""),i({method:"post",url:o,data:A.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":a(),"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":a(),"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":a(),...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":Z(),...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":a()}})}static put(o,e){return e&&(e=e||""),i({method:"put",url:o,data:A.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":a()}})}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":a()}})}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":a(),...n}})}static deleted(o,e){return e&&(e=e||""),i({method:"delete",url:o,data:A.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":a()}})}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":a()}})}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":a()}})}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":a()}})}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":a()}})}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":a()}})}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":a()}})}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":a()}})}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":a()}})}static uploadBase64(o,e,n){let r=new FormData;return r.append("file",e.file),r.append("modulesId",e.modulesId),i({method:"post",url:o,data:r,headers:{"Content-Type":"multipart/form-data","Authorization-Token":a(),...n}})}static postFormData(o,e,n){let r=new FormData;return e.files&&Array.isArray(e.files)&&e.files.forEach(c=>{r.append("files",c)}),e.submitWorkOrderParam&&r.append("submitWorkOrderParam",new Blob([JSON.stringify(e.submitWorkOrderParam)],{type:"application/json;charset=utf-8"})),i({method:"post",url:o,data:r,headers:{"Authorization-Token":a(),"Content-Type":"multipart/form-data",...n}})}}w(P,"baseUrl",U);class G{constructor(){w(this,"havePermission",!1);w(this,"funPointIdList",[])}}const X=(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>`)},Q=t=>t.split("?")[0].substring(t.lastIndexOf(".")+1).toLowerCase(),Y=(t,o,e=0)=>{let n="";if(e>0)for(let r=0;r<e;r++)n+=".";return t.length>o?t.slice(0,o-e)+n:t};function ee(t){let o=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),e=new Array("","拾","佰","仟"),n=new Array("","万","亿","兆"),r=new Array("角","分","毫","厘"),c="元",z=1e15,p="",h="",s="",S=["",""],f,I,d,k,N,C,O;if(t==null)return"";if(t>=z)return"超出最大处理数字";if(t==0)return s=o[0]+c,s;if(t.toString().indexOf(".")==-1?(p=t.toString(),h="",c="元整"):(S=t.toString().split("."),p=S[0],h=S[1].substr(0,2)),parseInt(p,10)>0){f=0,I=p.length;for(let l=0;l<I;l++)d=p.substr(l,1),k=I-l-1,N=k/4,C=k%4,d=="0"?f++:(f>0&&(s+=o[0]),f=0,s+=o[parseInt(d)]+e[C]),C==0&&f<4&&(s+=n[N]);s+=c}if(h!=""){O=h.length;for(let l=0;l<O;l++)d=h.substr(l,1),d!="0"&&(s+=o[Number(d)]+r[l])}return s==""&&(s+=o[0]+c),s}function te(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 oe(t){const o=parseFloat(t.toString());return isNaN(o)?0:Number(Math.round(o*100)/100)}exports.FunPointVo=G;exports.HttpUtil=P;exports.IsPc=q;exports.IsPhone=b;exports.ddWindowOpen=L;exports.digitUppercase=ee;exports.downloadFile=W;exports.exitLogin=T;exports.formatDecimal=te;exports.formatTwoDecimal=oe;exports.getEllipsis=Y;exports.getFileType=Q;exports.getProcessAppIdUrl=M;exports.highlightText=X;exports.openEncodeUrl=j;exports.setDingDingTitle=K;exports.setExitLoginRouter=$;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var m = (t, o, e) =>
|
|
1
|
+
var P = Object.defineProperty;
|
|
2
|
+
var R = (t, o, e) => o in t ? P(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e;
|
|
3
|
+
var m = (t, o, e) => R(t, typeof o != "symbol" ? o + "" : o, e);
|
|
4
4
|
import T from "dingtalk-jsapi";
|
|
5
5
|
import { ElMessage as w, ElMessageBox as v } from "element-plus";
|
|
6
|
-
import
|
|
6
|
+
import D from "axios";
|
|
7
7
|
import I from "qs";
|
|
8
|
-
import { debounce as
|
|
9
|
-
import { showNotify as
|
|
10
|
-
import { sm4 as
|
|
11
|
-
const
|
|
8
|
+
import { debounce as J } from "lodash";
|
|
9
|
+
import { showNotify as h } from "vant";
|
|
10
|
+
import { sm4 as j } from "sm-crypto";
|
|
11
|
+
const Q = (t) => {
|
|
12
12
|
if (T.env.platform !== "notInDingTalk")
|
|
13
13
|
window.open(t + "/?ddtab=true", "_blank");
|
|
14
14
|
else if (window.oaTool && window.oaTool.isOA) {
|
|
@@ -16,7 +16,7 @@ const Y = (t) => {
|
|
|
16
16
|
return;
|
|
17
17
|
} else
|
|
18
18
|
window.open(t, "_blank");
|
|
19
|
-
},
|
|
19
|
+
}, Y = (t) => encodeURIComponent(t), ee = (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), te = (t) => {
|
|
20
20
|
if (!(!t || typeof t != "string"))
|
|
21
21
|
if (T.env.platform !== "notInDingTalk")
|
|
22
22
|
T.biz.navigation.setTitle({
|
|
@@ -38,7 +38,7 @@ function F(t) {
|
|
|
38
38
|
const n = e.endsWith("/") ? e : e.substring(0, e.lastIndexOf("/") + 1);
|
|
39
39
|
return o + n + t;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const oe = async (t) => {
|
|
42
42
|
let o = "";
|
|
43
43
|
try {
|
|
44
44
|
o = (sessionStorage.getItem("userConfig") ? JSON.parse(sessionStorage.getItem("userConfig")) : null).fileUploadType;
|
|
@@ -77,14 +77,14 @@ const ne = async (t) => {
|
|
|
77
77
|
"iemobile",
|
|
78
78
|
"wpdesktop"
|
|
79
79
|
].some((n) => t.includes(n));
|
|
80
|
-
},
|
|
80
|
+
}, ne = () => !x();
|
|
81
81
|
let g = null;
|
|
82
|
-
const
|
|
82
|
+
const ie = (t) => {
|
|
83
83
|
g = t;
|
|
84
84
|
}, C = () => {
|
|
85
85
|
var t, o, e;
|
|
86
86
|
return ((o = (t = g == null ? void 0 : g.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;
|
|
87
|
-
},
|
|
87
|
+
}, E = J(() => {
|
|
88
88
|
alert("登录失效,请重新登录");
|
|
89
89
|
}, 1e3, { leading: !0, trailing: !1 });
|
|
90
90
|
function A(t) {
|
|
@@ -95,21 +95,21 @@ function A(t) {
|
|
|
95
95
|
window.location.href = window.location.origin + window.location.pathname + "login/index.html?host=" + o;
|
|
96
96
|
else if (window.oaTool && window.oaTool.isOA) {
|
|
97
97
|
const n = window.location.origin + (window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/");
|
|
98
|
-
let
|
|
99
|
-
sessionStorage.setItem("preRoute",
|
|
98
|
+
let r = C();
|
|
99
|
+
sessionStorage.setItem("preRoute", r), window.localStorage.removeItem("TOKEN"), window.location.href = `${n}oa-login/index.html?url=${r}`;
|
|
100
100
|
} else if (t && t === 1)
|
|
101
101
|
window.sessionStorage.clear(), window.localStorage.clear(), window.location.href = window.location.origin + window.location.pathname + "login/index.html";
|
|
102
102
|
else {
|
|
103
103
|
localStorage.setItem("toRouter", window.location.search);
|
|
104
104
|
let n = C();
|
|
105
|
-
sessionStorage.setItem("preRoute", n), window.localStorage.removeItem("TOKEN"), window.localStorage.removeItem("clientId"),
|
|
106
|
-
const
|
|
105
|
+
sessionStorage.setItem("preRoute", n), window.localStorage.removeItem("TOKEN"), window.localStorage.removeItem("clientId"), E();
|
|
106
|
+
const r = window.location.origin + (window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/");
|
|
107
107
|
setTimeout(() => {
|
|
108
|
-
window.location.href = `${
|
|
108
|
+
window.location.href = `${r}login/index.html?host=${o}`;
|
|
109
109
|
}, 100);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
const
|
|
112
|
+
const L = (t, o) => j.encrypt(t, K(o));
|
|
113
113
|
function K(t) {
|
|
114
114
|
const o = [];
|
|
115
115
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -131,30 +131,21 @@ function K(t) {
|
|
|
131
131
|
}
|
|
132
132
|
return o;
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const W = function() {
|
|
135
135
|
let t = localStorage.getItem("TOKEN") + "IhfN5d11Zk1ZC%Po" + Date.now();
|
|
136
|
-
return
|
|
137
|
-
},
|
|
136
|
+
return L(t, "*XeL#J@znVJ#sdSv");
|
|
137
|
+
}, $ = function() {
|
|
138
138
|
return localStorage.getItem("TOKEN");
|
|
139
|
-
}, $ = function(t) {
|
|
140
|
-
let o = t + "IhfN5d11Zk1ZC%Po" + Date.now();
|
|
141
|
-
return z(o, "*XeL#J@znVJ#sdSv");
|
|
142
139
|
}, a = function() {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const i = localStorage.getItem(`TOKEN-${n}`);
|
|
146
|
-
if (i)
|
|
147
|
-
return $(i);
|
|
148
|
-
}
|
|
149
|
-
return M();
|
|
150
|
-
}, P = window.location.origin + window.location.pathname + "api", r = J.create({
|
|
140
|
+
return W();
|
|
141
|
+
}, z = window.location.origin + window.location.pathname + "api", i = D.create({
|
|
151
142
|
timeout: 18e5,
|
|
152
143
|
// 请求超时时间
|
|
153
|
-
baseURL:
|
|
144
|
+
baseURL: z
|
|
154
145
|
});
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
(t) => (x() ? t.data.code == 501 || t.data.code == 510 ? t.data.msg ?
|
|
146
|
+
i.interceptors.request.use((t) => t);
|
|
147
|
+
i.interceptors.response.use(
|
|
148
|
+
(t) => (x() ? 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 && A() : t.data.code == 501 || t.data.code == 510 ? t.data.msg ? w({
|
|
158
149
|
type: "error",
|
|
159
150
|
dangerouslyUseHTMLString: !0,
|
|
160
151
|
message: `<span style="word-break: break-all">${t.data.msg}</span>`,
|
|
@@ -175,11 +166,11 @@ r.interceptors.response.use(
|
|
|
175
166
|
message: `<span style="word-break: break-all">${t.data.msg}</span>`,
|
|
176
167
|
duration: 5e3
|
|
177
168
|
}) : t.data.code === 401 && A(), t.data),
|
|
178
|
-
async (t) => (t.response.status === 401 ? A() : x() ?
|
|
169
|
+
async (t) => (t.response.status === 401 ? A() : x() ? h({ type: "danger", message: "网络请求失败" }) : w.error("网络请求失败"), Promise.reject(t.response))
|
|
179
170
|
);
|
|
180
|
-
class
|
|
171
|
+
class M {
|
|
181
172
|
static get(o, e) {
|
|
182
|
-
return e && (e = e || ""),
|
|
173
|
+
return e && (e = e || ""), i({
|
|
183
174
|
method: "get",
|
|
184
175
|
url: o,
|
|
185
176
|
params: e,
|
|
@@ -190,7 +181,7 @@ class B {
|
|
|
190
181
|
});
|
|
191
182
|
}
|
|
192
183
|
static post(o, e) {
|
|
193
|
-
return e && (e = e || ""),
|
|
184
|
+
return e && (e = e || ""), i({
|
|
194
185
|
method: "post",
|
|
195
186
|
url: o,
|
|
196
187
|
data: I.stringify(e),
|
|
@@ -202,7 +193,7 @@ class B {
|
|
|
202
193
|
});
|
|
203
194
|
}
|
|
204
195
|
static postJson(o, e, n) {
|
|
205
|
-
return e && (e = e || ""),
|
|
196
|
+
return e && (e = e || ""), i({
|
|
206
197
|
method: "post",
|
|
207
198
|
url: o,
|
|
208
199
|
data: JSON.stringify(e),
|
|
@@ -216,7 +207,7 @@ class B {
|
|
|
216
207
|
});
|
|
217
208
|
}
|
|
218
209
|
static uploadOSS(o, e, n) {
|
|
219
|
-
return e && (e = e || ""),
|
|
210
|
+
return e && (e = e || ""), i({
|
|
220
211
|
method: "post",
|
|
221
212
|
url: o,
|
|
222
213
|
data: e,
|
|
@@ -229,20 +220,20 @@ class B {
|
|
|
229
220
|
});
|
|
230
221
|
}
|
|
231
222
|
static uploadOSSResident(o, e, n) {
|
|
232
|
-
return e && (e = e || ""),
|
|
223
|
+
return e && (e = e || ""), i({
|
|
233
224
|
method: "post",
|
|
234
225
|
url: o,
|
|
235
226
|
data: e,
|
|
236
227
|
headers: {
|
|
237
228
|
"Content-Type": "multipart/form-data",
|
|
238
|
-
"Authorization-Token":
|
|
229
|
+
"Authorization-Token": $(),
|
|
239
230
|
...n
|
|
240
231
|
}
|
|
241
232
|
//设置header信息
|
|
242
233
|
});
|
|
243
234
|
}
|
|
244
235
|
static exportFile(o, e) {
|
|
245
|
-
return e && (e = e || ""),
|
|
236
|
+
return e && (e = e || ""), i({
|
|
246
237
|
method: "post",
|
|
247
238
|
responseType: "arraybuffer",
|
|
248
239
|
url: o,
|
|
@@ -255,7 +246,7 @@ class B {
|
|
|
255
246
|
});
|
|
256
247
|
}
|
|
257
248
|
static put(o, e) {
|
|
258
|
-
return e && (e = e || ""),
|
|
249
|
+
return e && (e = e || ""), i({
|
|
259
250
|
method: "put",
|
|
260
251
|
url: o,
|
|
261
252
|
data: I.stringify(e),
|
|
@@ -266,7 +257,7 @@ class B {
|
|
|
266
257
|
});
|
|
267
258
|
}
|
|
268
259
|
static putJson(o, e) {
|
|
269
|
-
return e && (e = e || ""),
|
|
260
|
+
return e && (e = e || ""), i({
|
|
270
261
|
method: "put",
|
|
271
262
|
url: o,
|
|
272
263
|
data: JSON.stringify(e),
|
|
@@ -278,7 +269,7 @@ class B {
|
|
|
278
269
|
});
|
|
279
270
|
}
|
|
280
271
|
static putFile(o, e, n) {
|
|
281
|
-
return e && (e = e || ""),
|
|
272
|
+
return e && (e = e || ""), i({
|
|
282
273
|
method: "put",
|
|
283
274
|
url: o,
|
|
284
275
|
data: e,
|
|
@@ -290,7 +281,7 @@ class B {
|
|
|
290
281
|
});
|
|
291
282
|
}
|
|
292
283
|
static deleted(o, e) {
|
|
293
|
-
return e && (e = e || ""),
|
|
284
|
+
return e && (e = e || ""), i({
|
|
294
285
|
method: "delete",
|
|
295
286
|
url: o,
|
|
296
287
|
data: I.stringify(e),
|
|
@@ -301,7 +292,7 @@ class B {
|
|
|
301
292
|
});
|
|
302
293
|
}
|
|
303
294
|
static deletedjson(o, e) {
|
|
304
|
-
return e && (e = e || ""),
|
|
295
|
+
return e && (e = e || ""), i({
|
|
305
296
|
method: "delete",
|
|
306
297
|
url: o,
|
|
307
298
|
data: JSON.stringify(e),
|
|
@@ -312,7 +303,7 @@ class B {
|
|
|
312
303
|
});
|
|
313
304
|
}
|
|
314
305
|
static downloadGet(o, e) {
|
|
315
|
-
return e && (e = e || ""),
|
|
306
|
+
return e && (e = e || ""), i({
|
|
316
307
|
method: "get",
|
|
317
308
|
url: o,
|
|
318
309
|
responseType: "blob",
|
|
@@ -324,7 +315,7 @@ class B {
|
|
|
324
315
|
});
|
|
325
316
|
}
|
|
326
317
|
static downloadPost(o, e) {
|
|
327
|
-
return e && (e = e || ""),
|
|
318
|
+
return e && (e = e || ""), i({
|
|
328
319
|
method: "post",
|
|
329
320
|
url: o,
|
|
330
321
|
responseType: "blob",
|
|
@@ -336,7 +327,7 @@ class B {
|
|
|
336
327
|
});
|
|
337
328
|
}
|
|
338
329
|
static download(o, e) {
|
|
339
|
-
return e && (e = e || ""),
|
|
330
|
+
return e && (e = e || ""), i({
|
|
340
331
|
method: "post",
|
|
341
332
|
url: o,
|
|
342
333
|
responseType: "blob",
|
|
@@ -348,7 +339,7 @@ class B {
|
|
|
348
339
|
});
|
|
349
340
|
}
|
|
350
341
|
static downloadPostJson(o, e) {
|
|
351
|
-
return e && (e = e || ""),
|
|
342
|
+
return e && (e = e || ""), i({
|
|
352
343
|
method: "post",
|
|
353
344
|
url: o,
|
|
354
345
|
responseType: "blob",
|
|
@@ -360,7 +351,7 @@ class B {
|
|
|
360
351
|
});
|
|
361
352
|
}
|
|
362
353
|
static downloadPut(o, e) {
|
|
363
|
-
return e && (e = e || ""),
|
|
354
|
+
return e && (e = e || ""), i({
|
|
364
355
|
method: "put",
|
|
365
356
|
url: o,
|
|
366
357
|
responseType: "blob",
|
|
@@ -372,7 +363,7 @@ class B {
|
|
|
372
363
|
});
|
|
373
364
|
}
|
|
374
365
|
static downloadPutJson(o, e) {
|
|
375
|
-
return e && (e = e || ""),
|
|
366
|
+
return e && (e = e || ""), i({
|
|
376
367
|
method: "put",
|
|
377
368
|
url: o,
|
|
378
369
|
responseType: "blob",
|
|
@@ -384,7 +375,7 @@ class B {
|
|
|
384
375
|
});
|
|
385
376
|
}
|
|
386
377
|
static downloadFile(o, e) {
|
|
387
|
-
return e && (e = e || {}),
|
|
378
|
+
return e && (e = e || {}), i({
|
|
388
379
|
method: "post",
|
|
389
380
|
url: o,
|
|
390
381
|
responseType: "blob",
|
|
@@ -396,11 +387,11 @@ class B {
|
|
|
396
387
|
});
|
|
397
388
|
}
|
|
398
389
|
static uploadBase64(o, e, n) {
|
|
399
|
-
let
|
|
400
|
-
return
|
|
390
|
+
let r = new FormData();
|
|
391
|
+
return r.append("file", e.file), r.append("modulesId", e.modulesId), i({
|
|
401
392
|
method: "post",
|
|
402
393
|
url: o,
|
|
403
|
-
data:
|
|
394
|
+
data: r,
|
|
404
395
|
headers: {
|
|
405
396
|
"Content-Type": "multipart/form-data",
|
|
406
397
|
"Authorization-Token": a(),
|
|
@@ -422,18 +413,18 @@ class B {
|
|
|
422
413
|
// });
|
|
423
414
|
// }
|
|
424
415
|
static postFormData(o, e, n) {
|
|
425
|
-
let
|
|
416
|
+
let r = new FormData();
|
|
426
417
|
return e.files && Array.isArray(e.files) && e.files.forEach((c) => {
|
|
427
|
-
|
|
428
|
-
}), e.submitWorkOrderParam &&
|
|
418
|
+
r.append("files", c);
|
|
419
|
+
}), e.submitWorkOrderParam && r.append(
|
|
429
420
|
"submitWorkOrderParam",
|
|
430
421
|
new Blob([JSON.stringify(e.submitWorkOrderParam)], {
|
|
431
422
|
type: "application/json;charset=utf-8"
|
|
432
423
|
})
|
|
433
|
-
),
|
|
424
|
+
), i({
|
|
434
425
|
method: "post",
|
|
435
426
|
url: o,
|
|
436
|
-
data:
|
|
427
|
+
data: r,
|
|
437
428
|
headers: {
|
|
438
429
|
"Authorization-Token": a(),
|
|
439
430
|
"Content-Type": "multipart/form-data",
|
|
@@ -443,8 +434,8 @@ class B {
|
|
|
443
434
|
});
|
|
444
435
|
}
|
|
445
436
|
}
|
|
446
|
-
m(
|
|
447
|
-
class
|
|
437
|
+
m(M, "baseUrl", z);
|
|
438
|
+
class re {
|
|
448
439
|
constructor() {
|
|
449
440
|
//是否拥有页面权限
|
|
450
441
|
m(this, "havePermission", !1);
|
|
@@ -452,17 +443,17 @@ class ae {
|
|
|
452
443
|
m(this, "funPointIdList", []);
|
|
453
444
|
}
|
|
454
445
|
}
|
|
455
|
-
const
|
|
446
|
+
const ae = (t, o) => {
|
|
456
447
|
const e = o.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), n = new RegExp(e, "gi");
|
|
457
448
|
return t.replace(n, (c) => `<span style="color:var(--theme-normal-normal)">${c}</span>`);
|
|
458
|
-
},
|
|
449
|
+
}, se = (t) => t.split("?")[0].substring(t.lastIndexOf(".") + 1).toLowerCase(), le = (t, o, e = 0) => {
|
|
459
450
|
let n = "";
|
|
460
451
|
if (e > 0)
|
|
461
|
-
for (let
|
|
452
|
+
for (let r = 0; r < e; r++)
|
|
462
453
|
n += ".";
|
|
463
454
|
return t.length > o ? t.slice(0, o - e) + n : t;
|
|
464
455
|
};
|
|
465
|
-
function
|
|
456
|
+
function ce(t) {
|
|
466
457
|
let o = new Array(
|
|
467
458
|
"零",
|
|
468
459
|
"壹",
|
|
@@ -474,7 +465,7 @@ function de(t) {
|
|
|
474
465
|
"柒",
|
|
475
466
|
"捌",
|
|
476
467
|
"玖"
|
|
477
|
-
), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"),
|
|
468
|
+
), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"), r = new Array("角", "分", "毫", "厘"), c = "元", U = 1e15, u = "", p = "", s = "", y = ["", ""], f, b, d, S, O, k, N;
|
|
478
469
|
if (t == null)
|
|
479
470
|
return "";
|
|
480
471
|
if (t >= U)
|
|
@@ -482,45 +473,45 @@ function de(t) {
|
|
|
482
473
|
if (t == 0)
|
|
483
474
|
return s = o[0] + c, s;
|
|
484
475
|
if (t.toString().indexOf(".") == -1 ? (u = t.toString(), p = "", c = "元整") : (y = t.toString().split("."), u = y[0], p = y[1].substr(0, 2)), parseInt(u, 10) > 0) {
|
|
485
|
-
|
|
476
|
+
f = 0, b = u.length;
|
|
486
477
|
for (let l = 0; l < b; l++)
|
|
487
|
-
d = u.substr(l, 1), S = b - l - 1,
|
|
478
|
+
d = u.substr(l, 1), S = b - l - 1, O = S / 4, k = S % 4, d == "0" ? f++ : (f > 0 && (s += o[0]), f = 0, s += o[parseInt(d)] + e[k]), k == 0 && f < 4 && (s += n[O]);
|
|
488
479
|
s += c;
|
|
489
480
|
}
|
|
490
481
|
if (p != "") {
|
|
491
|
-
|
|
492
|
-
for (let l = 0; l <
|
|
493
|
-
d = p.substr(l, 1), d != "0" && (s += o[Number(d)] +
|
|
482
|
+
N = p.length;
|
|
483
|
+
for (let l = 0; l < N; l++)
|
|
484
|
+
d = p.substr(l, 1), d != "0" && (s += o[Number(d)] + r[l]);
|
|
494
485
|
}
|
|
495
486
|
return s == "" && (s += o[0] + c), s;
|
|
496
487
|
}
|
|
497
|
-
function
|
|
488
|
+
function de(t) {
|
|
498
489
|
const o = parseFloat(t.toString());
|
|
499
490
|
if (isNaN(o))
|
|
500
491
|
return t;
|
|
501
492
|
const e = o.toString();
|
|
502
493
|
return (e.split(".")[1] || "").length > 11 ? o.toFixed(11) : e;
|
|
503
494
|
}
|
|
504
|
-
function
|
|
495
|
+
function ue(t) {
|
|
505
496
|
const o = parseFloat(t.toString());
|
|
506
497
|
return isNaN(o) ? 0 : Number(Math.round(o * 100) / 100);
|
|
507
498
|
}
|
|
508
499
|
export {
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
500
|
+
re as F,
|
|
501
|
+
M as H,
|
|
502
|
+
ne as I,
|
|
512
503
|
x as a,
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
504
|
+
ce as b,
|
|
505
|
+
oe as c,
|
|
506
|
+
Q as d,
|
|
516
507
|
A as e,
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
508
|
+
de as f,
|
|
509
|
+
ue as g,
|
|
510
|
+
le as h,
|
|
511
|
+
se as i,
|
|
512
|
+
ee as j,
|
|
513
|
+
ae as k,
|
|
514
|
+
ie as l,
|
|
515
|
+
Y as o,
|
|
516
|
+
te as s
|
|
526
517
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var P=(t,e,r)=>e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var d=(t,e,r)=>P(t,typeof e!="symbol"?e+"":e,r);const y=require("element-plus"),m=require("./string-utils-
|
|
1
|
+
"use strict";var g=Object.defineProperty;var P=(t,e,r)=>e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var d=(t,e,r)=>P(t,typeof e!="symbol"?e+"":e,r);const y=require("element-plus"),m=require("./string-utils-BH3jGZDF.cjs"),b=t=>{try{let e=[];sessionStorage.getItem("readyAppList")?(e=JSON.parse(sessionStorage.getItem("readyAppList")),e.push(t)):e=[t],sessionStorage.setItem("readyAppList",JSON.stringify(e))}catch{sessionStorage.setItem("readyAppList",JSON.stringify([t]))}};function x({row:t,column:e,rowIndex:r,columnIndex:o}){return{color:"var(--mh-table-text-color)",fontWeight:"bold",background:"var(--mh-table-bg-color)",fontSize:"var(--font-size-description)"}}function w({row:t,column:e,rowIndex:r,columnIndex:o}){return{color:"var(--custom-theme-text-3)",fontWeight:"bold",background:"var(--custom-theme-fill-4)",fontSize:"var(--font-size-description)"}}const F=()=>{const t=document.querySelector(".is-error");t&&t.scrollIntoView({behavior:"smooth",block:"start"})};function C({row:t,column:e,rowIndex:r,columnIndex:o}){return{"font-size":"var(--font-size-description)"}}class A{constructor(){d(this,"use",(e,r,o=!1)=>{let n;return(...l)=>{o&&(e.apply(this,l),o=!1),n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,l)},r)}})}}class v{constructor(){d(this,"use",(e,r)=>{let o=null,n=!0,l=0;return(...s)=>{n?(e.apply(this,s),l=Date.now(),n=!1):(o&&clearTimeout(o),Date.now()-l<r?y.ElMessage({message:"请不要频繁点击哦..",type:"warning",grouping:!0}):(l=Date.now(),e.apply(this,s))),o=setTimeout(()=>{o=null,n=!0},r)}})}}const i=(t,e,r)=>{const o=new Blob([t],{type:r});window.URL=window.URL||window.webkitURL;const n=URL.createObjectURL(o),l=document.createElement("a");l.href=n,l.download=e,l.click(),window.URL.revokeObjectURL(n)},D={excel:(t,e)=>{i(t,e,"application/vnd.ms-excel")},word:(t,e)=>{i(t,e,"application/msword")},zip:(t,e)=>{i(t,e,"application/zip")},html:(t,e)=>{i(t,e,"text/html")},markdown:(t,e)=>{i(t,e,"text/markdown")}};function S(t){return t.indexOf("/")===0&&(t=t.substring(1,t.length)),t.indexOf("/")>-1&&(t=t.substring(0,t.indexOf("/"))),t.indexOf("?")>-1&&(t=t.substring(0,t.indexOf("?"))),t.indexOf("#")>-1&&(t=t.substring(0,t.indexOf("#"))),t="/"+t,t}function k(t){const e=window.location.search;return new URLSearchParams(e).get(t)}const T="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='320'%20height='320'%20viewBox='0%200%20320%20320'%3e%3cg%20id='组_1341'%20data-name='组%201341'%20transform='translate(-678%20-170)'%20opacity='0.5'%3e%3cg%20id='组_1126'%20data-name='组%201126'%20transform='translate(449.087%2034.086)'%3e%3crect%20id='BG'%20width='320'%20height='320'%20transform='translate(228.913%20135.914)'%20fill='none'/%3e%3c/g%3e%3cg%20id='ic_无权限'%20transform='translate(576.361%20-1.649)'%3e%3cpath%20id='路径_324'%20data-name='路径%20324'%20d='M0,654.326c0,25.553,71.632,46.268,160,46.268s160-20.712,160-46.267-71.638-46.263-160-46.263S0,628.78,0,654.326Z'%20transform='translate(101.639%20-221.483)'%20fill='%23f4f4f5'/%3e%3cpath%20id='路径_325'%20data-name='路径%20325'%20d='M243.984,656.332c0,16.787,47.114,30.388,105.234,30.388s105.235-13.6,105.235-30.39-47.114-30.39-105.233-30.39-105.237,13.6-105.237,30.39v0Z'%20transform='translate(-87.58%20-235.347)'%20fill='%23e6e8eb'/%3e%3cpath%20id='路径_393'%20data-name='路径%20393'%20d='M229.517,573.793H394.705v98.074a10.324,10.324,0,0,1-10.324,10.324H239.841a10.324,10.324,0,0,1-10.324-10.324V573.793Z'%20transform='translate(-50.187%20-261.211)'%20fill='%23d2d4d6'/%3e%3cpath%20id='路径_394'%20data-name='路径%20394'%20d='M460.526,687.644a18.066,18.066,0,1,1,15.485,0v17.225a5.162,5.162,0,0,1-5.162,5.162h-5.162a5.162,5.162,0,0,1-5.162-5.162V687.644Z'%20transform='translate(-206.629%20-317.288)'%20fill='%23f4f4f5'/%3e%3cpath%20id='路径_395'%20data-name='路径%20395'%20d='M244.841,520.828H379.382a5.162,5.162,0,0,1,3.967,1.859l11.356,13.627H229.517l11.357-13.627a5.162,5.162,0,0,1,3.967-1.858Z'%20transform='translate(-50.187%20-223.387)'%20fill='%23acaeb2'/%3e%3cpath%20id='路径_396'%20data-name='路径%20396'%20d='M410.706,251.136V225.327a36.133,36.133,0,0,0-72.265,0v25.809c0,2.852-4.62,5.162-10.324,5.162s-10.324-2.31-10.324-5.162V225.327a56.78,56.78,0,0,1,113.56,0v25.809c0,2.852-4.62,5.162-10.324,5.162s-10.324-2.31-10.324-5.162Zm77.427-61.942c19.956,0,36.133-12.711,36.133-28.39s-16.177-28.39-36.133-28.39S452,145.125,452,160.8a23.879,23.879,0,0,0,5.053,14.489q-1.412,7.566-2.473,15.191a112.438,112.438,0,0,0,13.841-5.884A43.267,43.267,0,0,0,488.133,189.194Z'%20transform='translate(-113.321%2051.773)'%20fill='%23c2c3c7'/%3e%3cpath%20id='路径_397'%20data-name='路径%20397'%20d='M834.955,222.185a5.162,5.162,0,1,1,5.162-5.162A5.162,5.162,0,0,1,834.955,222.185Zm15.485,0a5.162,5.162,0,1,1,5.162-5.162A5.162,5.162,0,0,1,850.44,222.185Zm15.486,0a5.162,5.162,0,1,1,5.162-5.162,5.162,5.162,0,0,1-5.162,5.162Z'%20transform='translate(-475.628%20-4.448)'%20fill='%23f4f4f5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";class z{static selectPermissionGroupPage(e){return m.HttpUtil.get("/bms/safety/permission/group/selectPermissionGroupPage",e)}static getPermissionGroupList(){return m.HttpUtil.postJson("/bms/safety/permission/group/getPermissionGroupList")}static getTheFirstStep(e){return m.HttpUtil.get("/bms/safety/permission/group/getTheFirstStep",{permissionGroupId:e})}static saveTheFirstStepWhenAll(e){return m.HttpUtil.postJson("/bms/safety/permission/group/saveTheFirstStepWhenAll",e)}static saveTheFirstStepWhenNotAll(e){return m.HttpUtil.postJson("/bms/safety/permission/group/saveTheFirstStepWhenNotAll",e)}static getTheSecondStepData(e){return m.HttpUtil.get("/bms/safety/permission/group/getTheSecondStepData",{secondStepId:e})}static saveTheSecondStepWhenNotAll(e){return m.HttpUtil.postJson("/bms/safety/permission/group/saveTheSecondStepWhenNotAll",e)}static savePermissionGroup(e){return m.HttpUtil.postJson("/bms/safety/permission/group/savePermissionGroup",e)}static deletePermissionGroup(e){return m.HttpUtil.deleted("/bms/safety/permission/group/deletePermissionGroup",{safetyPermissionGroupId:e})}static updatePermissionGroup(e){return m.HttpUtil.putJson("/bms/safety/permission/group/updatePermissionGroup",e)}static getPermissionGroupMemberById(e){return m.HttpUtil.get("/bms/safety/permission/group/getPermissionGroupMemberById",{permissionGroupId:e})}static savePermissionGroupMember(e){return m.HttpUtil.postJson("/bms/safety/permission/group/savePermissionGroupMember",e)}static getFunPointVoByPageId(e){return m.HttpUtil.get("/bms/safety/permission/group/getFunPointVoByPageId",{pageId:e})}}const H=(t,e)=>{t?(y.ElMessage({type:"warning",message:"当前无权限!"}),console.dir(t),console.dir(e),t.innerHTML=`
|
|
2
2
|
<div style="width:100%;height:100%;display: flex;flex-direction: column;justify-content: center;align-items: center;background:var(--custom-theme-fill-7);">
|
|
3
3
|
<img src="${T}" alt="" style="width: 25vw;">
|
|
4
4
|
<div style="font-weight: 400;
|
|
@@ -2,7 +2,7 @@ var E = Object.defineProperty;
|
|
|
2
2
|
var g = (t, e, r) => e in t ? E(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var d = (t, e, r) => g(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import { ElMessage as y } from "element-plus";
|
|
5
|
-
import { H as m, F as P } from "./string-utils-
|
|
5
|
+
import { H as m, F as P } from "./string-utils-DjRg4NCR.js";
|
|
6
6
|
const k = (t) => {
|
|
7
7
|
try {
|
|
8
8
|
let e = [];
|
package/dist/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./transform-data-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./transform-data-CkMSs3ZE.cjs"),t=require("./string-utils-BH3jGZDF.cjs");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=t.HttpUtil;exports.IsPc=t.IsPc;exports.IsPhone=t.IsPhone;exports.ddWindowOpen=t.ddWindowOpen;exports.digitUppercase=t.digitUppercase;exports.downloadFile=t.downloadFile;exports.exitLogin=t.exitLogin;exports.formatDecimal=t.formatDecimal;exports.formatTwoDecimal=t.formatTwoDecimal;exports.getEllipsis=t.getEllipsis;exports.getFileType=t.getFileType;exports.getProcessAppIdUrl=t.getProcessAppIdUrl;exports.highlightText=t.highlightText;exports.openEncodeUrl=t.openEncodeUrl;exports.setDingDingTitle=t.setDingDingTitle;exports.setExitLoginRouter=t.setExitLoginRouter;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as s, S as t, t as i, a as l, b as o, c as r, f as n, e as d, g, h as m, i as p, j as u, k as c, l as h, m as P, n as f, o as y, p as S, q as v, r as x, s as C, u as D, v as E, w as U, x as b, y as F, z as H, A as L, B as M, C as I, D as T, E as w, F as k, G as A, H as R, I as N, J as j, K as W, L as z, M as B, N as K } from "./transform-data-
|
|
2
|
-
import { H as G, I as J, a as O, d as Q, b as V, c as X, e as Y, f as Z, g as _, h as $, i as aa, j as ea, k as sa, o as ta, s as ia, l as la } from "./string-utils-
|
|
1
|
+
import { d as s, S as t, t as i, a as l, b as o, c as r, f as n, e as d, g, h as m, i as p, j as u, k as c, l as h, m as P, n as f, o as y, p as S, q as v, r as x, s as C, u as D, v as E, w as U, x as b, y as F, z as H, A as L, B as M, C as I, D as T, E as w, F as k, G as A, H as R, I as N, J as j, K as W, L as z, M as B, N as K } from "./transform-data-_KBQqEax.js";
|
|
2
|
+
import { H as G, I as J, a as O, d as Q, b as V, c as X, e as Y, f as Z, g as _, h as $, i as aa, j as ea, k as sa, o as ta, s as ia, l as la } from "./string-utils-DjRg4NCR.js";
|
|
3
3
|
export {
|
|
4
4
|
s as Debounce,
|
|
5
5
|
G as HttpUtil,
|
package/package.json
CHANGED