hrp-ui-base 1.3.4 → 1.3.6
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 +4 -4
- package/dist/components.es.js +668 -649
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +2 -2
- package/dist/string-utils-DKz4mfHd.cjs +1 -0
- package/dist/{string-utils-DkXGtIS5.js → string-utils-DPWu4Qfh.js} +110 -92
- package/dist/{transform-data-4Ib3OXms.cjs → transform-data-DDmK9TEL.cjs} +1 -1
- package/dist/{transform-data-DLpie48c.js → transform-data-jyYW8phC.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/components/layout/LayoutContainer.vue +31 -1
- package/src/init.ts +1 -1
- package/src/utils/HttpUtil.ts +48 -41
- package/src/utils/crypto.ts +36 -11
- package/dist/string-utils-BDHaWaqb.cjs +0 -1
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-DDmK9TEL.cjs"),o=require("./string-utils-DKz4mfHd.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-jyYW8phC.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-DPWu4Qfh.js";
|
|
7
7
|
class n {
|
|
8
8
|
constructor() {
|
|
9
9
|
/**文件ID */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var D=Object.defineProperty;var R=(t,o,e)=>o in t?D(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e;var g=(t,o,e)=>R(t,typeof o!="symbol"?o+"":o,e);const y=require("dingtalk-jsapi"),u=require("element-plus"),v=require("axios"),A=require("qs"),j=require("lodash"),w=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")},M=t=>encodeURIComponent(t),K=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),W=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 q=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))},$=()=>!b();let m=null;const B=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},H=j.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 i=x();sessionStorage.setItem("preRoute",i),window.localStorage.removeItem("TOKEN"),window.location.href=`${n}oa-login/index.html?url=${i}`}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"),H();const i=window.location.origin+(window.location.pathname.endsWith("/")?window.location.pathname:window.location.pathname+"/");setTimeout(()=>{window.location.href=`${i}login/index.html?host=${o}`},100)}}const P=(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 Z=function(){let t=localStorage.getItem("TOKEN")+"IhfN5d11Zk1ZC%Po"+Date.now();return P(t,"*XeL#J@znVJ#sdSv")},_=function(){return localStorage.getItem("TOKEN")},X=function(t){let o=t+"IhfN5d11Zk1ZC%Po"+Date.now();return P(o,"*XeL#J@znVJ#sdSv")},a=function(){const t=window.location.hash,o=window.location.pathname,e=t.match(/\/project\/([^\/\?]+)/),n=e?e[1]:null;if(n&&o.includes("/pms/")){const i=localStorage.getItem(`TOKEN-${n}`);if(i)return X(i)}return Z()},U=window.location.origin+window.location.pathname+"api",r=v.create({timeout:18e5,baseURL:U});r.interceptors.request.use(t=>t);r.interceptors.response.use(t=>(b()?t.data.code==501||t.data.code==510?t.data.msg?w.showNotify({type:"danger",message:t.data.msg}):w.showNotify({type:"danger",message:"发生未知错误!"}):t.data.code==500?w.showNotify({type:"danger",message:"服务发生错误!"}):t.data.code==201?w.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()?w.showNotify({type:"danger",message:"网络请求失败"}):u.ElMessage.error("网络请求失败"),Promise.reject(t.response)));class z{static get(o,e){return e&&(e=e||""),r({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||""),r({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||""),r({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||""),r({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||""),r({method:"post",url:o,data:e,headers:{"Content-Type":"multipart/form-data","Authorization-Token":_(),...n}})}static exportFile(o,e){return e&&(e=e||""),r({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||""),r({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||""),r({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||""),r({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||""),r({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||""),r({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||""),r({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||""),r({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||""),r({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||""),r({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||""),r({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||""),r({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||{}),r({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 i=new FormData;return i.append("file",e.file),i.append("modulesId",e.modulesId),r({method:"post",url:o,data:i,headers:{"Content-Type":"multipart/form-data","Authorization-Token":a(),...n}})}static postFormData(o,e,n){let i=new FormData;return e.files&&Array.isArray(e.files)&&e.files.forEach(c=>{i.append("files",c)}),e.submitWorkOrderParam&&i.append("submitWorkOrderParam",new Blob([JSON.stringify(e.submitWorkOrderParam)],{type:"application/json;charset=utf-8"})),r({method:"post",url:o,data:i,headers:{"Authorization-Token":a(),"Content-Type":"multipart/form-data",...n}})}}g(z,"baseUrl",U);class G{constructor(){g(this,"havePermission",!1);g(this,"funPointIdList",[])}}const Q=(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>`)},Y=t=>t.split("?")[0].substring(t.lastIndexOf(".")+1).toLowerCase(),ee=(t,o,e=0)=>{let n="";if(e>0)for(let i=0;i<e;i++)n+=".";return t.length>o?t.slice(0,o-e)+n:t};function te(t){let o=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),e=new Array("","拾","佰","仟"),n=new Array("","万","亿","兆"),i=new Array("角","分","毫","厘"),c="元",E=1e15,p="",h="",s="",S=["",""],f,I,d,k,N,C,O;if(t==null)return"";if(t>=E)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)]+i[l])}return s==""&&(s+=o[0]+c),s}function oe(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 ne(t){const o=parseFloat(t.toString());return isNaN(o)?0:Number(Math.round(o*100)/100)}exports.FunPointVo=G;exports.HttpUtil=z;exports.IsPc=$;exports.IsPhone=b;exports.ddWindowOpen=L;exports.digitUppercase=te;exports.downloadFile=q;exports.exitLogin=T;exports.formatDecimal=oe;exports.formatTwoDecimal=ne;exports.getEllipsis=ee;exports.getFileType=Y;exports.getProcessAppIdUrl=K;exports.highlightText=Q;exports.openEncodeUrl=M;exports.setDingDingTitle=W;exports.setExitLoginRouter=B;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var m = (t, o, e) =>
|
|
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
4
|
import T from "dingtalk-jsapi";
|
|
5
5
|
import { ElMessage as w, ElMessageBox as v } from "element-plus";
|
|
6
|
-
import
|
|
6
|
+
import J 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 D } from "lodash";
|
|
9
|
+
import { showNotify as f } from "vant";
|
|
10
|
+
import { sm4 as E } from "sm-crypto";
|
|
11
|
+
const Y = (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 X = (t) => {
|
|
|
16
16
|
return;
|
|
17
17
|
} else
|
|
18
18
|
window.open(t, "_blank");
|
|
19
|
-
},
|
|
19
|
+
}, ee = (t) => encodeURIComponent(t), te = (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), oe = (t) => {
|
|
20
20
|
if (!(!t || typeof t != "string"))
|
|
21
21
|
if (T.env.platform !== "notInDingTalk")
|
|
22
22
|
T.biz.navigation.setTitle({
|
|
@@ -28,7 +28,7 @@ const X = (t) => {
|
|
|
28
28
|
} else
|
|
29
29
|
document.title = t;
|
|
30
30
|
};
|
|
31
|
-
function
|
|
31
|
+
function F(t) {
|
|
32
32
|
try {
|
|
33
33
|
return new URL(t), t;
|
|
34
34
|
} catch {
|
|
@@ -38,7 +38,7 @@ function z(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 ne = async (t) => {
|
|
42
42
|
let o = "";
|
|
43
43
|
try {
|
|
44
44
|
o = (sessionStorage.getItem("userConfig") ? JSON.parse(sessionStorage.getItem("userConfig")) : null).fileUploadType;
|
|
@@ -46,7 +46,7 @@ const te = async (t) => {
|
|
|
46
46
|
console.log(n);
|
|
47
47
|
}
|
|
48
48
|
try {
|
|
49
|
-
await navigator.clipboard.writeText(
|
|
49
|
+
await navigator.clipboard.writeText(F(t.url)), console.log("URL 已复制到剪贴板:", F(t.url)), w.success("文件下载链接已写入剪切板,如遇系统无法下载,自行复制到浏览器打开链接即可下载!");
|
|
50
50
|
} catch (n) {
|
|
51
51
|
console.error("无法写入剪贴板:", n);
|
|
52
52
|
}
|
|
@@ -77,14 +77,14 @@ const te = async (t) => {
|
|
|
77
77
|
"iemobile",
|
|
78
78
|
"wpdesktop"
|
|
79
79
|
].some((n) => t.includes(n));
|
|
80
|
-
},
|
|
80
|
+
}, ie = () => !x();
|
|
81
81
|
let g = null;
|
|
82
|
-
const
|
|
82
|
+
const re = (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
|
+
}, L = D(() => {
|
|
88
88
|
alert("登录失效,请重新登录");
|
|
89
89
|
}, 1e3, { leading: !0, trailing: !1 });
|
|
90
90
|
function A(t) {
|
|
@@ -95,22 +95,22 @@ 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 i = C();
|
|
99
|
+
sessionStorage.setItem("preRoute", i), window.localStorage.removeItem("TOKEN"), window.location.href = `${n}oa-login/index.html?url=${i}`;
|
|
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"), L();
|
|
106
|
+
const i = window.location.origin + (window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/");
|
|
107
107
|
setTimeout(() => {
|
|
108
|
-
window.location.href = `${
|
|
108
|
+
window.location.href = `${i}login/index.html?host=${o}`;
|
|
109
109
|
}, 100);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
function
|
|
112
|
+
const z = (t, o) => E.encrypt(t, K(o));
|
|
113
|
+
function K(t) {
|
|
114
114
|
const o = [];
|
|
115
115
|
for (let e = 0; e < t.length; e++) {
|
|
116
116
|
let n = t.charCodeAt(e);
|
|
@@ -131,40 +131,55 @@ function L(t) {
|
|
|
131
131
|
}
|
|
132
132
|
return o;
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const M = function() {
|
|
135
135
|
let t = localStorage.getItem("TOKEN") + "IhfN5d11Zk1ZC%Po" + Date.now();
|
|
136
|
-
return
|
|
136
|
+
return z(t, "*XeL#J@znVJ#sdSv");
|
|
137
137
|
}, W = function() {
|
|
138
|
-
return localStorage.getItem("TOKEN")
|
|
139
|
-
},
|
|
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
|
+
}, a = function() {
|
|
143
|
+
const t = window.location.hash, o = window.location.pathname, e = t.match(/\/project\/([^\/\?]+)/), n = e ? e[1] : null;
|
|
144
|
+
if (n && o.includes("/pms/")) {
|
|
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
151
|
timeout: 18e5,
|
|
141
152
|
// 请求超时时间
|
|
142
|
-
baseURL:
|
|
153
|
+
baseURL: P
|
|
143
154
|
});
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
(t) => (x() ? t.data.code == 501 || t.data.code == 510 ? t.data.msg ?
|
|
155
|
+
r.interceptors.request.use((t) => t);
|
|
156
|
+
r.interceptors.response.use(
|
|
157
|
+
(t) => (x() ? t.data.code == 501 || t.data.code == 510 ? t.data.msg ? f({ type: "danger", message: t.data.msg }) : f({ type: "danger", message: "发生未知错误!" }) : t.data.code == 500 ? f({ type: "danger", message: "服务发生错误!" }) : t.data.code == 201 ? f({ type: "success", message: t.data.msg }) : t.data.code === 401 && A() : t.data.code == 501 || t.data.code == 510 ? t.data.msg ? w({
|
|
147
158
|
type: "error",
|
|
148
159
|
dangerouslyUseHTMLString: !0,
|
|
149
160
|
message: `<span style="word-break: break-all">${t.data.msg}</span>`,
|
|
150
161
|
duration: 5e3
|
|
151
|
-
}) : w.error("发生未知错误!") : t.data.code == 500 ? v.alert(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
162
|
+
}) : w.error("发生未知错误!") : t.data.code == 500 ? v.alert(
|
|
163
|
+
t.data.msg ? t.data.msg : "服务发生错误",
|
|
164
|
+
"错误提示",
|
|
165
|
+
{
|
|
166
|
+
// if you want to disable its autofocus
|
|
167
|
+
// autofocus: false,
|
|
168
|
+
confirmButtonText: "确定",
|
|
169
|
+
callback: () => {
|
|
170
|
+
}
|
|
156
171
|
}
|
|
157
|
-
|
|
172
|
+
) : t.data.code == 201 ? w({
|
|
158
173
|
type: "success",
|
|
159
174
|
dangerouslyUseHTMLString: !0,
|
|
160
175
|
message: `<span style="word-break: break-all">${t.data.msg}</span>`,
|
|
161
176
|
duration: 5e3
|
|
162
177
|
}) : t.data.code === 401 && A(), t.data),
|
|
163
|
-
async (t) => (t.response.status === 401 ? A() : x() ?
|
|
178
|
+
async (t) => (t.response.status === 401 ? A() : x() ? f({ type: "danger", message: "网络请求失败" }) : w.error("网络请求失败"), Promise.reject(t.response))
|
|
164
179
|
);
|
|
165
|
-
class
|
|
180
|
+
class B {
|
|
166
181
|
static get(o, e) {
|
|
167
|
-
return e && (e = e || ""),
|
|
182
|
+
return e && (e = e || ""), r({
|
|
168
183
|
method: "get",
|
|
169
184
|
url: o,
|
|
170
185
|
params: e,
|
|
@@ -175,7 +190,7 @@ class $ {
|
|
|
175
190
|
});
|
|
176
191
|
}
|
|
177
192
|
static post(o, e) {
|
|
178
|
-
return e && (e = e || ""),
|
|
193
|
+
return e && (e = e || ""), r({
|
|
179
194
|
method: "post",
|
|
180
195
|
url: o,
|
|
181
196
|
data: I.stringify(e),
|
|
@@ -187,7 +202,7 @@ class $ {
|
|
|
187
202
|
});
|
|
188
203
|
}
|
|
189
204
|
static postJson(o, e, n) {
|
|
190
|
-
return e && (e = e || ""),
|
|
205
|
+
return e && (e = e || ""), r({
|
|
191
206
|
method: "post",
|
|
192
207
|
url: o,
|
|
193
208
|
data: JSON.stringify(e),
|
|
@@ -201,7 +216,7 @@ class $ {
|
|
|
201
216
|
});
|
|
202
217
|
}
|
|
203
218
|
static uploadOSS(o, e, n) {
|
|
204
|
-
return e && (e = e || ""),
|
|
219
|
+
return e && (e = e || ""), r({
|
|
205
220
|
method: "post",
|
|
206
221
|
url: o,
|
|
207
222
|
data: e,
|
|
@@ -214,7 +229,7 @@ class $ {
|
|
|
214
229
|
});
|
|
215
230
|
}
|
|
216
231
|
static uploadOSSResident(o, e, n) {
|
|
217
|
-
return e && (e = e || ""),
|
|
232
|
+
return e && (e = e || ""), r({
|
|
218
233
|
method: "post",
|
|
219
234
|
url: o,
|
|
220
235
|
data: e,
|
|
@@ -227,7 +242,7 @@ class $ {
|
|
|
227
242
|
});
|
|
228
243
|
}
|
|
229
244
|
static exportFile(o, e) {
|
|
230
|
-
return e && (e = e || ""),
|
|
245
|
+
return e && (e = e || ""), r({
|
|
231
246
|
method: "post",
|
|
232
247
|
responseType: "arraybuffer",
|
|
233
248
|
url: o,
|
|
@@ -240,7 +255,7 @@ class $ {
|
|
|
240
255
|
});
|
|
241
256
|
}
|
|
242
257
|
static put(o, e) {
|
|
243
|
-
return e && (e = e || ""),
|
|
258
|
+
return e && (e = e || ""), r({
|
|
244
259
|
method: "put",
|
|
245
260
|
url: o,
|
|
246
261
|
data: I.stringify(e),
|
|
@@ -251,7 +266,7 @@ class $ {
|
|
|
251
266
|
});
|
|
252
267
|
}
|
|
253
268
|
static putJson(o, e) {
|
|
254
|
-
return e && (e = e || ""),
|
|
269
|
+
return e && (e = e || ""), r({
|
|
255
270
|
method: "put",
|
|
256
271
|
url: o,
|
|
257
272
|
data: JSON.stringify(e),
|
|
@@ -263,7 +278,7 @@ class $ {
|
|
|
263
278
|
});
|
|
264
279
|
}
|
|
265
280
|
static putFile(o, e, n) {
|
|
266
|
-
return e && (e = e || ""),
|
|
281
|
+
return e && (e = e || ""), r({
|
|
267
282
|
method: "put",
|
|
268
283
|
url: o,
|
|
269
284
|
data: e,
|
|
@@ -275,7 +290,7 @@ class $ {
|
|
|
275
290
|
});
|
|
276
291
|
}
|
|
277
292
|
static deleted(o, e) {
|
|
278
|
-
return e && (e = e || ""),
|
|
293
|
+
return e && (e = e || ""), r({
|
|
279
294
|
method: "delete",
|
|
280
295
|
url: o,
|
|
281
296
|
data: I.stringify(e),
|
|
@@ -286,7 +301,7 @@ class $ {
|
|
|
286
301
|
});
|
|
287
302
|
}
|
|
288
303
|
static deletedjson(o, e) {
|
|
289
|
-
return e && (e = e || ""),
|
|
304
|
+
return e && (e = e || ""), r({
|
|
290
305
|
method: "delete",
|
|
291
306
|
url: o,
|
|
292
307
|
data: JSON.stringify(e),
|
|
@@ -297,7 +312,7 @@ class $ {
|
|
|
297
312
|
});
|
|
298
313
|
}
|
|
299
314
|
static downloadGet(o, e) {
|
|
300
|
-
return e && (e = e || ""),
|
|
315
|
+
return e && (e = e || ""), r({
|
|
301
316
|
method: "get",
|
|
302
317
|
url: o,
|
|
303
318
|
responseType: "blob",
|
|
@@ -309,7 +324,7 @@ class $ {
|
|
|
309
324
|
});
|
|
310
325
|
}
|
|
311
326
|
static downloadPost(o, e) {
|
|
312
|
-
return e && (e = e || ""),
|
|
327
|
+
return e && (e = e || ""), r({
|
|
313
328
|
method: "post",
|
|
314
329
|
url: o,
|
|
315
330
|
responseType: "blob",
|
|
@@ -321,7 +336,7 @@ class $ {
|
|
|
321
336
|
});
|
|
322
337
|
}
|
|
323
338
|
static download(o, e) {
|
|
324
|
-
return e && (e = e || ""),
|
|
339
|
+
return e && (e = e || ""), r({
|
|
325
340
|
method: "post",
|
|
326
341
|
url: o,
|
|
327
342
|
responseType: "blob",
|
|
@@ -333,7 +348,7 @@ class $ {
|
|
|
333
348
|
});
|
|
334
349
|
}
|
|
335
350
|
static downloadPostJson(o, e) {
|
|
336
|
-
return e && (e = e || ""),
|
|
351
|
+
return e && (e = e || ""), r({
|
|
337
352
|
method: "post",
|
|
338
353
|
url: o,
|
|
339
354
|
responseType: "blob",
|
|
@@ -345,7 +360,7 @@ class $ {
|
|
|
345
360
|
});
|
|
346
361
|
}
|
|
347
362
|
static downloadPut(o, e) {
|
|
348
|
-
return e && (e = e || ""),
|
|
363
|
+
return e && (e = e || ""), r({
|
|
349
364
|
method: "put",
|
|
350
365
|
url: o,
|
|
351
366
|
responseType: "blob",
|
|
@@ -357,7 +372,7 @@ class $ {
|
|
|
357
372
|
});
|
|
358
373
|
}
|
|
359
374
|
static downloadPutJson(o, e) {
|
|
360
|
-
return e && (e = e || ""),
|
|
375
|
+
return e && (e = e || ""), r({
|
|
361
376
|
method: "put",
|
|
362
377
|
url: o,
|
|
363
378
|
responseType: "blob",
|
|
@@ -369,7 +384,7 @@ class $ {
|
|
|
369
384
|
});
|
|
370
385
|
}
|
|
371
386
|
static downloadFile(o, e) {
|
|
372
|
-
return e && (e = e || {}),
|
|
387
|
+
return e && (e = e || {}), r({
|
|
373
388
|
method: "post",
|
|
374
389
|
url: o,
|
|
375
390
|
responseType: "blob",
|
|
@@ -381,11 +396,11 @@ class $ {
|
|
|
381
396
|
});
|
|
382
397
|
}
|
|
383
398
|
static uploadBase64(o, e, n) {
|
|
384
|
-
let
|
|
385
|
-
return
|
|
399
|
+
let i = new FormData();
|
|
400
|
+
return i.append("file", e.file), i.append("modulesId", e.modulesId), r({
|
|
386
401
|
method: "post",
|
|
387
402
|
url: o,
|
|
388
|
-
data:
|
|
403
|
+
data: i,
|
|
389
404
|
headers: {
|
|
390
405
|
"Content-Type": "multipart/form-data",
|
|
391
406
|
"Authorization-Token": a(),
|
|
@@ -407,15 +422,18 @@ class $ {
|
|
|
407
422
|
// });
|
|
408
423
|
// }
|
|
409
424
|
static postFormData(o, e, n) {
|
|
410
|
-
let
|
|
425
|
+
let i = new FormData();
|
|
411
426
|
return e.files && Array.isArray(e.files) && e.files.forEach((c) => {
|
|
412
|
-
|
|
413
|
-
}), e.submitWorkOrderParam &&
|
|
414
|
-
|
|
415
|
-
|
|
427
|
+
i.append("files", c);
|
|
428
|
+
}), e.submitWorkOrderParam && i.append(
|
|
429
|
+
"submitWorkOrderParam",
|
|
430
|
+
new Blob([JSON.stringify(e.submitWorkOrderParam)], {
|
|
431
|
+
type: "application/json;charset=utf-8"
|
|
432
|
+
})
|
|
433
|
+
), r({
|
|
416
434
|
method: "post",
|
|
417
435
|
url: o,
|
|
418
|
-
data:
|
|
436
|
+
data: i,
|
|
419
437
|
headers: {
|
|
420
438
|
"Authorization-Token": a(),
|
|
421
439
|
"Content-Type": "multipart/form-data",
|
|
@@ -425,8 +443,8 @@ class $ {
|
|
|
425
443
|
});
|
|
426
444
|
}
|
|
427
445
|
}
|
|
428
|
-
m(
|
|
429
|
-
class
|
|
446
|
+
m(B, "baseUrl", P);
|
|
447
|
+
class ae {
|
|
430
448
|
constructor() {
|
|
431
449
|
//是否拥有页面权限
|
|
432
450
|
m(this, "havePermission", !1);
|
|
@@ -434,17 +452,17 @@ class ie {
|
|
|
434
452
|
m(this, "funPointIdList", []);
|
|
435
453
|
}
|
|
436
454
|
}
|
|
437
|
-
const
|
|
455
|
+
const se = (t, o) => {
|
|
438
456
|
const e = o.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), n = new RegExp(e, "gi");
|
|
439
457
|
return t.replace(n, (c) => `<span style="color:var(--theme-normal-normal)">${c}</span>`);
|
|
440
|
-
},
|
|
458
|
+
}, le = (t) => t.split("?")[0].substring(t.lastIndexOf(".") + 1).toLowerCase(), ce = (t, o, e = 0) => {
|
|
441
459
|
let n = "";
|
|
442
460
|
if (e > 0)
|
|
443
|
-
for (let
|
|
461
|
+
for (let i = 0; i < e; i++)
|
|
444
462
|
n += ".";
|
|
445
463
|
return t.length > o ? t.slice(0, o - e) + n : t;
|
|
446
464
|
};
|
|
447
|
-
function
|
|
465
|
+
function de(t) {
|
|
448
466
|
let o = new Array(
|
|
449
467
|
"零",
|
|
450
468
|
"壹",
|
|
@@ -456,7 +474,7 @@ function le(t) {
|
|
|
456
474
|
"柒",
|
|
457
475
|
"捌",
|
|
458
476
|
"玖"
|
|
459
|
-
), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"),
|
|
477
|
+
), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"), i = new Array("角", "分", "毫", "厘"), c = "元", U = 1e15, u = "", p = "", s = "", y = ["", ""], h, b, d, S, N, k, O;
|
|
460
478
|
if (t == null)
|
|
461
479
|
return "";
|
|
462
480
|
if (t >= U)
|
|
@@ -464,45 +482,45 @@ function le(t) {
|
|
|
464
482
|
if (t == 0)
|
|
465
483
|
return s = o[0] + c, s;
|
|
466
484
|
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) {
|
|
467
|
-
|
|
485
|
+
h = 0, b = u.length;
|
|
468
486
|
for (let l = 0; l < b; l++)
|
|
469
|
-
d = u.substr(l, 1), S = b - l - 1, N = S / 4, k = S % 4, d == "0" ?
|
|
487
|
+
d = u.substr(l, 1), S = b - l - 1, N = S / 4, k = S % 4, d == "0" ? h++ : (h > 0 && (s += o[0]), h = 0, s += o[parseInt(d)] + e[k]), k == 0 && h < 4 && (s += n[N]);
|
|
470
488
|
s += c;
|
|
471
489
|
}
|
|
472
490
|
if (p != "") {
|
|
473
491
|
O = p.length;
|
|
474
492
|
for (let l = 0; l < O; l++)
|
|
475
|
-
d = p.substr(l, 1), d != "0" && (s += o[Number(d)] +
|
|
493
|
+
d = p.substr(l, 1), d != "0" && (s += o[Number(d)] + i[l]);
|
|
476
494
|
}
|
|
477
495
|
return s == "" && (s += o[0] + c), s;
|
|
478
496
|
}
|
|
479
|
-
function
|
|
497
|
+
function ue(t) {
|
|
480
498
|
const o = parseFloat(t.toString());
|
|
481
499
|
if (isNaN(o))
|
|
482
500
|
return t;
|
|
483
501
|
const e = o.toString();
|
|
484
502
|
return (e.split(".")[1] || "").length > 11 ? o.toFixed(11) : e;
|
|
485
503
|
}
|
|
486
|
-
function
|
|
504
|
+
function pe(t) {
|
|
487
505
|
const o = parseFloat(t.toString());
|
|
488
506
|
return isNaN(o) ? 0 : Number(Math.round(o * 100) / 100);
|
|
489
507
|
}
|
|
490
508
|
export {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
509
|
+
ae as F,
|
|
510
|
+
B as H,
|
|
511
|
+
ie as I,
|
|
494
512
|
x as a,
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
513
|
+
de as b,
|
|
514
|
+
ne as c,
|
|
515
|
+
Y as d,
|
|
498
516
|
A as e,
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
517
|
+
ue as f,
|
|
518
|
+
pe as g,
|
|
519
|
+
ce as h,
|
|
520
|
+
le as i,
|
|
521
|
+
te as j,
|
|
522
|
+
se as k,
|
|
523
|
+
re as l,
|
|
524
|
+
ee as o,
|
|
525
|
+
oe as s
|
|
508
526
|
};
|
|
@@ -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-DKz4mfHd.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-DPWu4Qfh.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-DDmK9TEL.cjs"),t=require("./string-utils-DKz4mfHd.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-jyYW8phC.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-DPWu4Qfh.js";
|
|
3
3
|
export {
|
|
4
4
|
s as Debounce,
|
|
5
5
|
G as HttpUtil,
|
package/package.json
CHANGED