hrp-ui-base 1.3.5 → 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.
@@ -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-DkXGtIS5.js";
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-4Ib3OXms.cjs"),o=require("./string-utils-BDHaWaqb.cjs");class d{constructor(){n(this,"fileId","");n(this,"fileName","");n(this,"url","");n(this,"fileSize","")}}exports.AnnexImgUpload=t.AnnexImgUpload;exports.AnnexUpload=t.AnnexUpload;exports.AnnexUploadWeijian=t.AnnexUploadWeijian;exports.ApprovalCenterDrawer=t.ApprovalCenterDrawer;exports.AvatarComponent=t.AvatarComponent;exports.BaseLayout=t.BaseLayout;exports.CustomButton=t.CustomButton;exports.CustonSwitch=t.CustonSwitch;exports.DarkComponent=t.DarkComponent;exports.DownloadComponent=t.DownloadComponent;exports.ExportCenterDrawer=t.ExportCenterDrawer;exports.FontSizeComponent=t.FontSizeComponent;exports.LayoutContainer=t.LayoutContainer;exports.ListSearchContent=t.ListSearchContent;exports.MenuPositionComponent=t.MenuPositionComponent;exports.MessageComponent=t.MessageComponent;exports.MessageNotificationDrawer=t.MessageNotificationDrawer;exports.NOTIFICATION_TYPE=t.NOTIFICATION_TYPE;exports.PersonalizationGuideDialog=t.PersonalizationGuideDialog;exports.SideMenu=t.SideMenu;exports.SideMenuSonList=t.SideMenuSonList;exports.SysHeader=t.SysHeader;exports.SysHeaderLeft=t.SysHeaderLeft;exports.SysHeaderRight=t.SysHeaderRight;exports.SysHeaderTabs=t.SysHeaderTabs;exports.TodoComponent=t.TodoComponent;exports.UserConfigBo=t.UserConfigBo;exports.createLayoutPlugin=t.createLayoutPlugin;exports.default=t.default;exports.useLayoutConfigStore=t.useLayoutConfigStore;exports.useLayoutMenuStore=t.useLayoutMenuStore;exports.useLayoutNoticeStore=t.useLayoutNoticeStore;exports.useLayoutTabsStore=t.useLayoutTabsStore;exports.Debounce=e.debounce;exports.SocketClass=e.Socket;exports.Throttle=e.throttle;exports.addWujieListener=e.addWujieListener;exports.debounceleading=e.debounceleading;exports.download=e.download;exports.filterKey=e.filterKey;exports.forSureMounted=e.forSureMounted;exports.formatterHandler=e.formatterHandler;exports.getDictConfigs=e.getDictConfigs;exports.getFirstLevelPath=e.getFirstLevelPath;exports.getFirstMenuInList=e.getFirstMenuInList;exports.getModuleFirstMenuPath=e.getModuleFirstMenuPath;exports.getModuleNameByPathName=e.getModuleNameByPathName;exports.getPagePermit=e.getPagePermit;exports.getRouteExistIf=e.getRouteExistIf;exports.getUrlParam=e.getUrlParam;exports.isArray=e.isArray;exports.isExternal=e.isExternal;exports.isHavePermit=e.isHavePermit;exports.isHttp=e.isHttp;exports.isString=e.isString;exports.makeAccessPath=e.makeAccessPath;exports.phoneTableHeaderCellStyle=e.phoneTableHeaderCellStyle;exports.routerPush=e.routerPush;exports.scrollToErrorElement=e.scrollToErrorElement;exports.setDarkStyle=e.setDarkStyle;exports.setFontSizeMode=e.setFontSizeMode;exports.setRouterUtilsContext=e.setRouterUtilsContext;exports.setWhiteStyle=e.setWhiteStyle;exports.tableFontCellStyle=e.tableFontCellStyle;exports.tableHeaderCellStyle=e.tableHeaderCellStyle;exports.toMainRouter=e.toMainRouter;exports.toNoPermitPage=e.toNoPermitPage;exports.transformData=e.transformData;exports.validAlphabets=e.validAlphabets;exports.validEmail=e.validEmail;exports.validLowerCase=e.validLowerCase;exports.validURL=e.validURL;exports.validUpperCase=e.validUpperCase;exports.validUsername=e.validUsername;exports.HttpUtil=o.HttpUtil;exports.IsPc=o.IsPc;exports.IsPhone=o.IsPhone;exports.ddWindowOpen=o.ddWindowOpen;exports.digitUppercase=o.digitUppercase;exports.downloadFile=o.downloadFile;exports.exitLogin=o.exitLogin;exports.formatDecimal=o.formatDecimal;exports.formatTwoDecimal=o.formatTwoDecimal;exports.getEllipsis=o.getEllipsis;exports.getFileType=o.getFileType;exports.getProcessAppIdUrl=o.getProcessAppIdUrl;exports.highlightText=o.highlightText;exports.openEncodeUrl=o.openEncodeUrl;exports.setDingDingTitle=o.setDingDingTitle;exports.setExitLoginRouter=o.setExitLoginRouter;exports.FileBaseInfo=d;
1
+ "use strict";var s=Object.defineProperty;var l=(i,a,r)=>a in i?s(i,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[a]=r;var n=(i,a,r)=>l(i,typeof a!="symbol"?a+"":a,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./components.cjs"),e=require("./transform-data-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-DLpie48c.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-DkXGtIS5.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-_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=$;
@@ -5,10 +5,10 @@ import T from "dingtalk-jsapi";
5
5
  import { ElMessage as w, ElMessageBox as v } from "element-plus";
6
6
  import D from "axios";
7
7
  import I from "qs";
8
- import { debounce as E } from "lodash";
8
+ import { debounce as J } from "lodash";
9
9
  import { showNotify as h } from "vant";
10
- import { sm4 as J } from "sm-crypto";
11
- const X = (t) => {
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 X = (t) => {
16
16
  return;
17
17
  } else
18
18
  window.open(t, "_blank");
19
- }, Q = (t) => encodeURIComponent(t), Y = (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), ee = (t) => {
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({
@@ -28,7 +28,7 @@ const X = (t) => {
28
28
  } else
29
29
  document.title = t;
30
30
  };
31
- function z(t) {
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 te = async (t) => {
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;
@@ -46,7 +46,7 @@ const te = async (t) => {
46
46
  console.log(n);
47
47
  }
48
48
  try {
49
- await navigator.clipboard.writeText(z(t.url)), console.log("URL 已复制到剪贴板:", z(t.url)), w.success("文件下载链接已写入剪切板,如遇系统无法下载,自行复制到浏览器打开链接即可下载!");
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
- }, oe = () => !x();
80
+ }, ne = () => !x();
81
81
  let g = null;
82
- const ne = (t) => {
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
- }, j = E(() => {
87
+ }, E = J(() => {
88
88
  alert("登录失效,请重新登录");
89
89
  }, 1e3, { leading: !0, trailing: !1 });
90
90
  function A(t) {
@@ -102,15 +102,15 @@ function A(t) {
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"), j();
105
+ sessionStorage.setItem("preRoute", n), window.localStorage.removeItem("TOKEN"), window.localStorage.removeItem("clientId"), E();
106
106
  const r = window.location.origin + (window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/");
107
107
  setTimeout(() => {
108
108
  window.location.href = `${r}login/index.html?host=${o}`;
109
109
  }, 100);
110
110
  }
111
111
  }
112
- const K = (t, o) => J.encrypt(t, L(o));
113
- function L(t) {
112
+ const L = (t, o) => j.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,15 +131,17 @@ function L(t) {
131
131
  }
132
132
  return o;
133
133
  }
134
- const a = function() {
134
+ const W = function() {
135
135
  let t = localStorage.getItem("TOKEN") + "IhfN5d11Zk1ZC%Po" + Date.now();
136
- return K(t, "*XeL#J@znVJ#sdSv");
137
- }, W = function() {
138
- return localStorage.getItem("TOKEN") + "" + Date.now(), localStorage.getItem("TOKEN");
139
- }, F = window.location.origin + window.location.pathname + "api", i = D.create({
136
+ return L(t, "*XeL#J@znVJ#sdSv");
137
+ }, $ = function() {
138
+ return localStorage.getItem("TOKEN");
139
+ }, a = function() {
140
+ return W();
141
+ }, z = window.location.origin + window.location.pathname + "api", i = D.create({
140
142
  timeout: 18e5,
141
143
  // 请求超时时间
142
- baseURL: F
144
+ baseURL: z
143
145
  });
144
146
  i.interceptors.request.use((t) => t);
145
147
  i.interceptors.response.use(
@@ -148,13 +150,17 @@ i.interceptors.response.use(
148
150
  dangerouslyUseHTMLString: !0,
149
151
  message: `<span style="word-break: break-all">${t.data.msg}</span>`,
150
152
  duration: 5e3
151
- }) : w.error("发生未知错误!") : t.data.code == 500 ? v.alert(t.data.msg ? t.data.msg : "服务发生错误", "错误提示", {
152
- // if you want to disable its autofocus
153
- // autofocus: false,
154
- confirmButtonText: "确定",
155
- callback: () => {
153
+ }) : w.error("发生未知错误!") : t.data.code == 500 ? v.alert(
154
+ t.data.msg ? t.data.msg : "服务发生错误",
155
+ "错误提示",
156
+ {
157
+ // if you want to disable its autofocus
158
+ // autofocus: false,
159
+ confirmButtonText: "确定",
160
+ callback: () => {
161
+ }
156
162
  }
157
- }) : t.data.code == 201 ? w({
163
+ ) : t.data.code == 201 ? w({
158
164
  type: "success",
159
165
  dangerouslyUseHTMLString: !0,
160
166
  message: `<span style="word-break: break-all">${t.data.msg}</span>`,
@@ -162,7 +168,7 @@ i.interceptors.response.use(
162
168
  }) : t.data.code === 401 && A(), t.data),
163
169
  async (t) => (t.response.status === 401 ? A() : x() ? h({ type: "danger", message: "网络请求失败" }) : w.error("网络请求失败"), Promise.reject(t.response))
164
170
  );
165
- class $ {
171
+ class M {
166
172
  static get(o, e) {
167
173
  return e && (e = e || ""), i({
168
174
  method: "get",
@@ -220,7 +226,7 @@ class $ {
220
226
  data: e,
221
227
  headers: {
222
228
  "Content-Type": "multipart/form-data",
223
- "Authorization-Token": W(),
229
+ "Authorization-Token": $(),
224
230
  ...n
225
231
  }
226
232
  //设置header信息
@@ -410,9 +416,12 @@ class $ {
410
416
  let r = new FormData();
411
417
  return e.files && Array.isArray(e.files) && e.files.forEach((c) => {
412
418
  r.append("files", c);
413
- }), e.submitWorkOrderParam && r.append("submitWorkOrderParam", new Blob([JSON.stringify(e.submitWorkOrderParam)], {
414
- type: "application/json;charset=utf-8"
415
- })), i({
419
+ }), e.submitWorkOrderParam && r.append(
420
+ "submitWorkOrderParam",
421
+ new Blob([JSON.stringify(e.submitWorkOrderParam)], {
422
+ type: "application/json;charset=utf-8"
423
+ })
424
+ ), i({
416
425
  method: "post",
417
426
  url: o,
418
427
  data: r,
@@ -425,8 +434,8 @@ class $ {
425
434
  });
426
435
  }
427
436
  }
428
- m($, "baseUrl", F);
429
- class ie {
437
+ m(M, "baseUrl", z);
438
+ class re {
430
439
  constructor() {
431
440
  //是否拥有页面权限
432
441
  m(this, "havePermission", !1);
@@ -434,17 +443,17 @@ class ie {
434
443
  m(this, "funPointIdList", []);
435
444
  }
436
445
  }
437
- const re = (t, o) => {
446
+ const ae = (t, o) => {
438
447
  const e = o.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), n = new RegExp(e, "gi");
439
448
  return t.replace(n, (c) => `<span style="color:var(--theme-normal-normal)">${c}</span>`);
440
- }, ae = (t) => t.split("?")[0].substring(t.lastIndexOf(".") + 1).toLowerCase(), se = (t, o, e = 0) => {
449
+ }, se = (t) => t.split("?")[0].substring(t.lastIndexOf(".") + 1).toLowerCase(), le = (t, o, e = 0) => {
441
450
  let n = "";
442
451
  if (e > 0)
443
452
  for (let r = 0; r < e; r++)
444
453
  n += ".";
445
454
  return t.length > o ? t.slice(0, o - e) + n : t;
446
455
  };
447
- function le(t) {
456
+ function ce(t) {
448
457
  let o = new Array(
449
458
  "零",
450
459
  "壹",
@@ -456,7 +465,7 @@ function le(t) {
456
465
  "柒",
457
466
  "捌",
458
467
  "玖"
459
- ), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"), r = new Array("角", "分", "毫", "厘"), c = "元", U = 1e15, u = "", p = "", s = "", y = ["", ""], f, b, d, S, N, k, O;
468
+ ), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"), r = new Array("角", "分", "毫", "厘"), c = "元", U = 1e15, u = "", p = "", s = "", y = ["", ""], f, b, d, S, O, k, N;
460
469
  if (t == null)
461
470
  return "";
462
471
  if (t >= U)
@@ -466,43 +475,43 @@ function le(t) {
466
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) {
467
476
  f = 0, b = u.length;
468
477
  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" ? f++ : (f > 0 && (s += o[0]), f = 0, s += o[parseInt(d)] + e[k]), k == 0 && f < 4 && (s += n[N]);
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]);
470
479
  s += c;
471
480
  }
472
481
  if (p != "") {
473
- O = p.length;
474
- for (let l = 0; l < O; l++)
482
+ N = p.length;
483
+ for (let l = 0; l < N; l++)
475
484
  d = p.substr(l, 1), d != "0" && (s += o[Number(d)] + r[l]);
476
485
  }
477
486
  return s == "" && (s += o[0] + c), s;
478
487
  }
479
- function ce(t) {
488
+ function de(t) {
480
489
  const o = parseFloat(t.toString());
481
490
  if (isNaN(o))
482
491
  return t;
483
492
  const e = o.toString();
484
493
  return (e.split(".")[1] || "").length > 11 ? o.toFixed(11) : e;
485
494
  }
486
- function de(t) {
495
+ function ue(t) {
487
496
  const o = parseFloat(t.toString());
488
497
  return isNaN(o) ? 0 : Number(Math.round(o * 100) / 100);
489
498
  }
490
499
  export {
491
- ie as F,
492
- $ as H,
493
- oe as I,
500
+ re as F,
501
+ M as H,
502
+ ne as I,
494
503
  x as a,
495
- le as b,
496
- te as c,
497
- X as d,
504
+ ce as b,
505
+ oe as c,
506
+ Q as d,
498
507
  A as e,
499
- ce as f,
500
- de as g,
501
- se as h,
502
- ae as i,
503
- Y as j,
504
- re as k,
505
- ne as l,
506
- Q as o,
507
- ee as s
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
508
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-BDHaWaqb.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=`
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-DkXGtIS5.js";
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-4Ib3OXms.cjs"),t=require("./string-utils-BDHaWaqb.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;
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-DLpie48c.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-DkXGtIS5.js";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hrp-ui-base",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "HRP 前端公共组件、工具方法和基础样式包",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -11,7 +11,7 @@
11
11
  "devDependencies": {},
12
12
  "module": "index.ts",
13
13
  "peerDependencies": {
14
- "hrp-ui-base": "1.3.4",
14
+ "hrp-ui-base": "1.3.6",
15
15
  "vue": "^3.0.0"
16
16
  }
17
17
  }
@@ -3,9 +3,9 @@ import { ElMessage, ElMessageBox } from "element-plus";
3
3
  import qs from "qs";
4
4
  import exitLogin from "./exitLogin";
5
5
  import { IsPhone } from "./get-env";
6
- const ConfigBaseURL = window.location.origin + window.location.pathname +"api";
7
- import { showNotify } from 'vant';
8
- import {getFinalToken, getFinalTokenResident} from "./crypto"
6
+ const ConfigBaseURL = window.location.origin + window.location.pathname + "api";
7
+ import { showNotify } from "vant";
8
+ import { getFinalToken, getFinalTokenResident } from "./crypto";
9
9
  //使用create方法创建axios实例
10
10
  const service = axios.create({
11
11
  timeout: 1800000, // 请求超时时间
@@ -21,15 +21,14 @@ service.interceptors.response.use(
21
21
  if (IsPhone()) {
22
22
  if (response.data.code == 501 || response.data.code == 510) {
23
23
  if (response.data.msg) {
24
-
25
- showNotify({ type: 'danger', message: response.data.msg });
24
+ showNotify({ type: "danger", message: response.data.msg });
26
25
  } else {
27
- showNotify({ type: 'danger', message: "发生未知错误!" });
26
+ showNotify({ type: "danger", message: "发生未知错误!" });
28
27
  }
29
28
  } else if (response.data.code == 500) {
30
- showNotify({ type: 'danger', message: "服务发生错误!" });
29
+ showNotify({ type: "danger", message: "服务发生错误!" });
31
30
  } else if (response.data.code == 201) {
32
- showNotify({ type: 'success', message: response.data.msg });
31
+ showNotify({ type: "success", message: response.data.msg });
33
32
  } else if (response.data.code === 401) {
34
33
  exitLogin();
35
34
  }
@@ -40,30 +39,32 @@ service.interceptors.response.use(
40
39
  type: "error",
41
40
  dangerouslyUseHTMLString: true,
42
41
  message: `<span style="word-break: break-all">${response.data.msg}</span>`,
43
- duration: 5000
42
+ duration: 5000,
44
43
  });
45
44
  } else {
46
45
  ElMessage.error("发生未知错误!");
47
46
  }
48
47
  } else if (response.data.code == 500) {
49
48
  // ElMessage.error("服务发生错误!");
50
- ElMessageBox.alert(response.data.msg ? response.data.msg : '服务发生错误', '错误提示', {
51
- // if you want to disable its autofocus
52
- // autofocus: false,
53
- confirmButtonText: '确定',
54
- callback: () => {
55
-
49
+ ElMessageBox.alert(
50
+ response.data.msg ? response.data.msg : "服务发生错误",
51
+ "错误提示",
52
+ {
53
+ // if you want to disable its autofocus
54
+ // autofocus: false,
55
+ confirmButtonText: "确定",
56
+ callback: () => {},
56
57
  },
57
- })
58
+ );
58
59
  } else if (response.data.code == 201) {
59
60
  ElMessage({
60
61
  type: "success",
61
62
  dangerouslyUseHTMLString: true,
62
63
  message: `<span style="word-break: break-all">${response.data.msg}</span>`,
63
- duration: 5000
64
+ duration: 5000,
64
65
  });
65
66
  } else if (response.data.code === 401) {
66
- exitLogin()
67
+ exitLogin();
67
68
  }
68
69
  }
69
70
 
@@ -71,17 +72,16 @@ service.interceptors.response.use(
71
72
  },
72
73
  async (error) => {
73
74
  if (error.response.status === 401) {
74
- exitLogin()
75
+ exitLogin();
75
76
  } else {
76
77
  if (IsPhone()) {
77
- showNotify({ type: 'danger', message: "网络请求失败" });
78
+ showNotify({ type: "danger", message: "网络请求失败" });
78
79
  } else {
79
80
  ElMessage.error("网络请求失败");
80
-
81
81
  }
82
82
  }
83
83
  return Promise.reject(error.response);
84
- }
84
+ },
85
85
  );
86
86
  export default class HttpUtil {
87
87
  static baseUrl = ConfigBaseURL;
@@ -148,21 +148,25 @@ export default class HttpUtil {
148
148
  });
149
149
  }
150
150
 
151
- static uploadOSSResident(url: string, data?: object, header?: object): Promise<any> {
152
- if (data) {
153
- data = data || "";
154
- }
155
- return service({
156
- method: "post",
157
- url: url,
158
- data: data,
159
- headers: {
160
- "Content-Type": "multipart/form-data",
161
- "Authorization-Token": getFinalTokenResident(),
162
- ...header,
163
- }, //设置header信息
164
- });
151
+ static uploadOSSResident(
152
+ url: string,
153
+ data?: object,
154
+ header?: object,
155
+ ): Promise<any> {
156
+ if (data) {
157
+ data = data || "";
165
158
  }
159
+ return service({
160
+ method: "post",
161
+ url: url,
162
+ data: data,
163
+ headers: {
164
+ "Content-Type": "multipart/form-data",
165
+ "Authorization-Token": getFinalTokenResident(),
166
+ ...header,
167
+ }, //设置header信息
168
+ });
169
+ }
166
170
 
167
171
  static exportFile(url: string, data?: object): Promise<any> {
168
172
  if (data) {
@@ -220,7 +224,7 @@ export default class HttpUtil {
220
224
  headers: {
221
225
  "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
222
226
  "Authorization-Token": getFinalToken(),
223
- ...config
227
+ ...config,
224
228
  },
225
229
  });
226
230
  }
@@ -398,12 +402,15 @@ export default class HttpUtil {
398
402
  formData.append("files", file);
399
403
  });
400
404
  }
401
-
405
+
402
406
  // 为 submitWorkOrderParam 设置 application/json 类型
403
407
  if (data.submitWorkOrderParam) {
404
- formData.append("submitWorkOrderParam", new Blob([JSON.stringify(data.submitWorkOrderParam)], {
405
- type: "application/json;charset=utf-8"
406
- }));
408
+ formData.append(
409
+ "submitWorkOrderParam",
410
+ new Blob([JSON.stringify(data.submitWorkOrderParam)], {
411
+ type: "application/json;charset=utf-8",
412
+ }),
413
+ );
407
414
  }
408
415
 
409
416
  return service({