hrp-ui-base 1.3.7 → 1.4.1
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 +5 -5
- package/dist/components.es.js +3302 -3253
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +2 -2
- package/dist/{string-utils-DjRg4NCR.js → string-utils-B1iXup7H.js} +137 -125
- package/dist/string-utils-BdintfxS.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/{transform-data-CkMSs3ZE.cjs → transform-data--ruli7aE.cjs} +1 -1
- package/dist/{transform-data-_KBQqEax.js → transform-data-APk1LVKg.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/ApprovalCenterDrawer.vue +2 -7
- package/src/components/layout/LayoutContainer.vue +15 -20
- package/src/components/layout/message/message-notification-drawer.vue +4 -0
- package/src/components/layout/utils/redirect.ts +120 -0
- package/src/utils/exitLogin.ts +19 -47
- package/src/utils/login-path.ts +35 -0
- package/dist/string-utils-BH3jGZDF.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--ruli7aE.cjs"),o=require("./string-utils-BdintfxS.cjs");class d{constructor(){n(this,"fileId","");n(this,"fileName","");n(this,"url","");n(this,"fileSize","")}}exports.AnnexImgUpload=t.AnnexImgUpload;exports.AnnexUpload=t.AnnexUpload;exports.AnnexUploadWeijian=t.AnnexUploadWeijian;exports.ApprovalCenterDrawer=t.ApprovalCenterDrawer;exports.AvatarComponent=t.AvatarComponent;exports.BaseLayout=t.BaseLayout;exports.CustomButton=t.CustomButton;exports.CustonSwitch=t.CustonSwitch;exports.DarkComponent=t.DarkComponent;exports.DownloadComponent=t.DownloadComponent;exports.ExportCenterDrawer=t.ExportCenterDrawer;exports.FontSizeComponent=t.FontSizeComponent;exports.LayoutContainer=t.LayoutContainer;exports.ListSearchContent=t.ListSearchContent;exports.MenuPositionComponent=t.MenuPositionComponent;exports.MessageComponent=t.MessageComponent;exports.MessageNotificationDrawer=t.MessageNotificationDrawer;exports.NOTIFICATION_TYPE=t.NOTIFICATION_TYPE;exports.PersonalizationGuideDialog=t.PersonalizationGuideDialog;exports.SideMenu=t.SideMenu;exports.SideMenuSonList=t.SideMenuSonList;exports.SysHeader=t.SysHeader;exports.SysHeaderLeft=t.SysHeaderLeft;exports.SysHeaderRight=t.SysHeaderRight;exports.SysHeaderTabs=t.SysHeaderTabs;exports.TodoComponent=t.TodoComponent;exports.UserConfigBo=t.UserConfigBo;exports.createLayoutPlugin=t.createLayoutPlugin;exports.default=t.default;exports.useLayoutConfigStore=t.useLayoutConfigStore;exports.useLayoutMenuStore=t.useLayoutMenuStore;exports.useLayoutNoticeStore=t.useLayoutNoticeStore;exports.useLayoutTabsStore=t.useLayoutTabsStore;exports.Debounce=e.debounce;exports.SocketClass=e.Socket;exports.Throttle=e.throttle;exports.addWujieListener=e.addWujieListener;exports.debounceleading=e.debounceleading;exports.download=e.download;exports.filterKey=e.filterKey;exports.forSureMounted=e.forSureMounted;exports.formatterHandler=e.formatterHandler;exports.getDictConfigs=e.getDictConfigs;exports.getFirstLevelPath=e.getFirstLevelPath;exports.getFirstMenuInList=e.getFirstMenuInList;exports.getModuleFirstMenuPath=e.getModuleFirstMenuPath;exports.getModuleNameByPathName=e.getModuleNameByPathName;exports.getPagePermit=e.getPagePermit;exports.getRouteExistIf=e.getRouteExistIf;exports.getUrlParam=e.getUrlParam;exports.isArray=e.isArray;exports.isExternal=e.isExternal;exports.isHavePermit=e.isHavePermit;exports.isHttp=e.isHttp;exports.isString=e.isString;exports.makeAccessPath=e.makeAccessPath;exports.phoneTableHeaderCellStyle=e.phoneTableHeaderCellStyle;exports.routerPush=e.routerPush;exports.scrollToErrorElement=e.scrollToErrorElement;exports.setDarkStyle=e.setDarkStyle;exports.setFontSizeMode=e.setFontSizeMode;exports.setRouterUtilsContext=e.setRouterUtilsContext;exports.setWhiteStyle=e.setWhiteStyle;exports.tableFontCellStyle=e.tableFontCellStyle;exports.tableHeaderCellStyle=e.tableHeaderCellStyle;exports.toMainRouter=e.toMainRouter;exports.toNoPermitPage=e.toNoPermitPage;exports.transformData=e.transformData;exports.validAlphabets=e.validAlphabets;exports.validEmail=e.validEmail;exports.validLowerCase=e.validLowerCase;exports.validURL=e.validURL;exports.validUpperCase=e.validUpperCase;exports.validUsername=e.validUsername;exports.HttpUtil=o.HttpUtil;exports.IsPc=o.IsPc;exports.IsPhone=o.IsPhone;exports.ddWindowOpen=o.ddWindowOpen;exports.digitUppercase=o.digitUppercase;exports.downloadFile=o.downloadFile;exports.exitLogin=o.exitLogin;exports.formatDecimal=o.formatDecimal;exports.formatTwoDecimal=o.formatTwoDecimal;exports.getEllipsis=o.getEllipsis;exports.getFileType=o.getFileType;exports.getProcessAppIdUrl=o.getProcessAppIdUrl;exports.highlightText=o.highlightText;exports.openEncodeUrl=o.openEncodeUrl;exports.setDingDingTitle=o.setDingDingTitle;exports.setExitLoginRouter=o.setExitLoginRouter;exports.FileBaseInfo=d;
|
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-APk1LVKg.js";
|
|
6
|
+
import { H as Ee, I as Fe, a as be, d as Ne, b as ke, c as Be, e as Re, f as ze, g as je, h as We, i as Oe, j as Ge, k as Ke, o as qe, s as Je, l as Ye } from "./string-utils-B1iXup7H.js";
|
|
7
7
|
class n {
|
|
8
8
|
constructor() {
|
|
9
9
|
/**文件ID */
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var m = (t, o, e) =>
|
|
4
|
-
import
|
|
5
|
-
import { ElMessage as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { debounce as
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var j = (t, o, e) => o in t ? R(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e;
|
|
3
|
+
var m = (t, o, e) => j(t, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import I from "dingtalk-jsapi";
|
|
5
|
+
import { ElMessage as g, ElMessageBox as v } from "element-plus";
|
|
6
|
+
import J from "axios";
|
|
7
|
+
import k from "qs";
|
|
8
|
+
import { debounce as D } from "lodash";
|
|
9
9
|
import { showNotify as h } from "vant";
|
|
10
|
-
import { sm4 as
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
10
|
+
import { sm4 as E } from "sm-crypto";
|
|
11
|
+
const te = (t) => {
|
|
12
|
+
if (I.env.platform !== "notInDingTalk")
|
|
13
13
|
window.open(t + "/?ddtab=true", "_blank");
|
|
14
14
|
else if (window.oaTool && window.oaTool.isOA) {
|
|
15
15
|
window.oaTool.openNewWindow(t);
|
|
16
16
|
return;
|
|
17
17
|
} else
|
|
18
18
|
window.open(t, "_blank");
|
|
19
|
-
},
|
|
19
|
+
}, oe = (t) => encodeURIComponent(t), ne = (t) => (t.indexOf("?") > -1 && (t.indexOf("/?") > -1 ? t = t.split("/?")[0] : t = t.split("?")[0]), t[t.length - 1] === "/" && (t = t.substring(0, t.length - 1)), t), ie = (t) => {
|
|
20
20
|
if (!(!t || typeof t != "string"))
|
|
21
|
-
if (
|
|
22
|
-
|
|
21
|
+
if (I.env.platform !== "notInDingTalk")
|
|
22
|
+
I.biz.navigation.setTitle({
|
|
23
23
|
title: t
|
|
24
24
|
}), document.title = t;
|
|
25
25
|
else if (window.oaTool && window.oaTool.isOA) {
|
|
@@ -28,7 +28,7 @@ const Q = (t) => {
|
|
|
28
28
|
} else
|
|
29
29
|
document.title = t;
|
|
30
30
|
};
|
|
31
|
-
function
|
|
31
|
+
function O(t) {
|
|
32
32
|
try {
|
|
33
33
|
return new URL(t), t;
|
|
34
34
|
} catch {
|
|
@@ -38,7 +38,7 @@ function F(t) {
|
|
|
38
38
|
const n = e.endsWith("/") ? e : e.substring(0, e.lastIndexOf("/") + 1);
|
|
39
39
|
return o + n + t;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const re = async (t) => {
|
|
42
42
|
let o = "";
|
|
43
43
|
try {
|
|
44
44
|
o = (sessionStorage.getItem("userConfig") ? JSON.parse(sessionStorage.getItem("userConfig")) : null).fileUploadType;
|
|
@@ -46,13 +46,13 @@ const oe = async (t) => {
|
|
|
46
46
|
console.log(n);
|
|
47
47
|
}
|
|
48
48
|
try {
|
|
49
|
-
await navigator.clipboard.writeText(
|
|
49
|
+
await navigator.clipboard.writeText(O(t.url)), console.log("URL 已复制到剪贴板:", O(t.url)), g.success("文件下载链接已写入剪切板,如遇系统无法下载,自行复制到浏览器打开链接即可下载!");
|
|
50
50
|
} catch (n) {
|
|
51
51
|
console.error("无法写入剪贴板:", n);
|
|
52
52
|
}
|
|
53
53
|
let e = document.createElement("a");
|
|
54
54
|
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);
|
|
55
|
-
},
|
|
55
|
+
}, A = () => {
|
|
56
56
|
const t = navigator.userAgent.toLowerCase();
|
|
57
57
|
return [
|
|
58
58
|
"android",
|
|
@@ -77,40 +77,52 @@ const oe = async (t) => {
|
|
|
77
77
|
"iemobile",
|
|
78
78
|
"wpdesktop"
|
|
79
79
|
].some((n) => t.includes(n));
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
}, se = () => !A(), L = [
|
|
81
|
+
"imd",
|
|
82
|
+
"agoal",
|
|
83
|
+
"scm",
|
|
84
|
+
"bms",
|
|
85
|
+
"coc",
|
|
86
|
+
"hws",
|
|
87
|
+
"fms",
|
|
88
|
+
"hrm",
|
|
89
|
+
"hrms",
|
|
90
|
+
"itrms",
|
|
91
|
+
"personalization",
|
|
92
|
+
"projectManagement"
|
|
93
|
+
], K = () => {
|
|
94
|
+
const t = window.location.pathname.replace(/\/$/, "").split("/"), o = t[t.length - 1];
|
|
95
|
+
L.includes(o) && t.pop();
|
|
96
|
+
const e = t.join("/") || "/";
|
|
97
|
+
return window.location.origin + (e.endsWith("/") ? e : `${e}/`);
|
|
98
|
+
}, U = (t) => {
|
|
99
|
+
const o = `${K()}login/index.html`;
|
|
100
|
+
return t ? `${o}?host=${encodeURIComponent(t)}` : o;
|
|
101
|
+
};
|
|
102
|
+
let w = null;
|
|
103
|
+
const ae = (t) => {
|
|
104
|
+
w = t;
|
|
105
|
+
}, z = () => {
|
|
85
106
|
var t, o, e;
|
|
86
|
-
return ((o = (t =
|
|
87
|
-
},
|
|
107
|
+
return ((o = (t = w == null ? void 0 : w.currentRoute) == null ? void 0 : t.value) == null ? void 0 : o.fullPath) || ((e = window.location.hash) == null ? void 0 : e.replace(/^#/, "")) || window.location.pathname + window.location.search;
|
|
108
|
+
}, $ = D(() => {
|
|
88
109
|
alert("登录失效,请重新登录");
|
|
89
110
|
}, 1e3, { leading: !0, trailing: !1 });
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
else if (window.oaTool && window.oaTool.isOA) {
|
|
97
|
-
const n = window.location.origin + (window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/");
|
|
98
|
-
let r = C();
|
|
99
|
-
sessionStorage.setItem("preRoute", r), window.localStorage.removeItem("TOKEN"), window.location.href = `${n}oa-login/index.html?url=${r}`;
|
|
100
|
-
} else if (t && t === 1)
|
|
101
|
-
window.sessionStorage.clear(), window.localStorage.clear(), window.location.href = window.location.origin + window.location.pathname + "login/index.html";
|
|
102
|
-
else {
|
|
103
|
-
localStorage.setItem("toRouter", window.location.search);
|
|
104
|
-
let n = C();
|
|
105
|
-
sessionStorage.setItem("preRoute", n), window.localStorage.removeItem("TOKEN"), window.localStorage.removeItem("clientId"), E();
|
|
106
|
-
const r = window.location.origin + (window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/");
|
|
107
|
-
setTimeout(() => {
|
|
108
|
-
window.location.href = `${r}login/index.html?host=${o}`;
|
|
109
|
-
}, 100);
|
|
111
|
+
function C(t) {
|
|
112
|
+
localStorage.setItem("preRoute", z()), localStorage.setItem("toRouter", window.location.search), localStorage.getItem("toRouter");
|
|
113
|
+
let o = localStorage.getItem("currentRouterInfo");
|
|
114
|
+
if (localStorage.setItem("toRouterObject", o), t && t === 1) {
|
|
115
|
+
window.sessionStorage.clear(), window.localStorage.clear(), window.location.href = U();
|
|
116
|
+
return;
|
|
110
117
|
}
|
|
118
|
+
localStorage.setItem("toRouter", window.location.search);
|
|
119
|
+
let e = z();
|
|
120
|
+
sessionStorage.setItem("preRoute", e), window.localStorage.removeItem("TOKEN"), window.localStorage.removeItem("clientId"), $(), setTimeout(() => {
|
|
121
|
+
window.location.href = U();
|
|
122
|
+
}, 100);
|
|
111
123
|
}
|
|
112
|
-
const
|
|
113
|
-
function
|
|
124
|
+
const M = (t, o) => E.encrypt(t, W(o));
|
|
125
|
+
function W(t) {
|
|
114
126
|
const o = [];
|
|
115
127
|
for (let e = 0; e < t.length; e++) {
|
|
116
128
|
let n = t.charCodeAt(e);
|
|
@@ -131,26 +143,26 @@ function K(t) {
|
|
|
131
143
|
}
|
|
132
144
|
return o;
|
|
133
145
|
}
|
|
134
|
-
const
|
|
146
|
+
const B = function() {
|
|
135
147
|
let t = localStorage.getItem("TOKEN") + "IhfN5d11Zk1ZC%Po" + Date.now();
|
|
136
|
-
return
|
|
137
|
-
},
|
|
148
|
+
return M(t, "*XeL#J@znVJ#sdSv");
|
|
149
|
+
}, q = function() {
|
|
138
150
|
return localStorage.getItem("TOKEN");
|
|
139
|
-
},
|
|
140
|
-
return
|
|
141
|
-
},
|
|
151
|
+
}, r = function() {
|
|
152
|
+
return B();
|
|
153
|
+
}, F = window.location.origin + window.location.pathname + "api", i = J.create({
|
|
142
154
|
timeout: 18e5,
|
|
143
155
|
// 请求超时时间
|
|
144
|
-
baseURL:
|
|
156
|
+
baseURL: F
|
|
145
157
|
});
|
|
146
158
|
i.interceptors.request.use((t) => t);
|
|
147
159
|
i.interceptors.response.use(
|
|
148
|
-
(t) => (
|
|
160
|
+
(t) => (A() ? t.data.code == 501 || t.data.code == 510 ? t.data.msg ? h({ type: "danger", message: t.data.msg }) : h({ type: "danger", message: "发生未知错误!" }) : t.data.code == 500 ? h({ type: "danger", message: "服务发生错误!" }) : t.data.code == 201 ? h({ type: "success", message: t.data.msg }) : t.data.code === 401 && C() : t.data.code == 501 || t.data.code == 510 ? t.data.msg ? g({
|
|
149
161
|
type: "error",
|
|
150
162
|
dangerouslyUseHTMLString: !0,
|
|
151
163
|
message: `<span style="word-break: break-all">${t.data.msg}</span>`,
|
|
152
164
|
duration: 5e3
|
|
153
|
-
}) :
|
|
165
|
+
}) : g.error("发生未知错误!") : t.data.code == 500 ? v.alert(
|
|
154
166
|
t.data.msg ? t.data.msg : "服务发生错误",
|
|
155
167
|
"错误提示",
|
|
156
168
|
{
|
|
@@ -160,15 +172,15 @@ i.interceptors.response.use(
|
|
|
160
172
|
callback: () => {
|
|
161
173
|
}
|
|
162
174
|
}
|
|
163
|
-
) : t.data.code == 201 ?
|
|
175
|
+
) : t.data.code == 201 ? g({
|
|
164
176
|
type: "success",
|
|
165
177
|
dangerouslyUseHTMLString: !0,
|
|
166
178
|
message: `<span style="word-break: break-all">${t.data.msg}</span>`,
|
|
167
179
|
duration: 5e3
|
|
168
|
-
}) : t.data.code === 401 &&
|
|
169
|
-
async (t) => (t.response.status === 401 ?
|
|
180
|
+
}) : t.data.code === 401 && C(), t.data),
|
|
181
|
+
async (t) => (t.response.status === 401 ? C() : A() ? h({ type: "danger", message: "网络请求失败" }) : g.error("网络请求失败"), Promise.reject(t.response))
|
|
170
182
|
);
|
|
171
|
-
class
|
|
183
|
+
class H {
|
|
172
184
|
static get(o, e) {
|
|
173
185
|
return e && (e = e || ""), i({
|
|
174
186
|
method: "get",
|
|
@@ -176,7 +188,7 @@ class M {
|
|
|
176
188
|
params: e,
|
|
177
189
|
headers: {
|
|
178
190
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
179
|
-
"Authorization-Token":
|
|
191
|
+
"Authorization-Token": r()
|
|
180
192
|
}
|
|
181
193
|
});
|
|
182
194
|
}
|
|
@@ -184,10 +196,10 @@ class M {
|
|
|
184
196
|
return e && (e = e || ""), i({
|
|
185
197
|
method: "post",
|
|
186
198
|
url: o,
|
|
187
|
-
data:
|
|
199
|
+
data: k.stringify(e),
|
|
188
200
|
headers: {
|
|
189
201
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
190
|
-
"Authorization-Token":
|
|
202
|
+
"Authorization-Token": r(),
|
|
191
203
|
"Authorization-origin-Token": localStorage.getItem("TOKEN")
|
|
192
204
|
}
|
|
193
205
|
});
|
|
@@ -199,7 +211,7 @@ class M {
|
|
|
199
211
|
data: JSON.stringify(e),
|
|
200
212
|
headers: {
|
|
201
213
|
"Content-Type": "application/json;charset=utf-8",
|
|
202
|
-
"Authorization-Token":
|
|
214
|
+
"Authorization-Token": r(),
|
|
203
215
|
"Authorization-origin-Token": localStorage.getItem("TOKEN"),
|
|
204
216
|
...n
|
|
205
217
|
}
|
|
@@ -213,7 +225,7 @@ class M {
|
|
|
213
225
|
data: e,
|
|
214
226
|
headers: {
|
|
215
227
|
"Content-Type": "multipart/form-data",
|
|
216
|
-
"Authorization-Token":
|
|
228
|
+
"Authorization-Token": r(),
|
|
217
229
|
...n
|
|
218
230
|
}
|
|
219
231
|
//设置header信息
|
|
@@ -226,7 +238,7 @@ class M {
|
|
|
226
238
|
data: e,
|
|
227
239
|
headers: {
|
|
228
240
|
"Content-Type": "multipart/form-data",
|
|
229
|
-
"Authorization-Token":
|
|
241
|
+
"Authorization-Token": q(),
|
|
230
242
|
...n
|
|
231
243
|
}
|
|
232
244
|
//设置header信息
|
|
@@ -240,7 +252,7 @@ class M {
|
|
|
240
252
|
data: JSON.stringify(e),
|
|
241
253
|
headers: {
|
|
242
254
|
"Content-Type": "application/json;charset=utf-8",
|
|
243
|
-
"Authorization-Token":
|
|
255
|
+
"Authorization-Token": r()
|
|
244
256
|
}
|
|
245
257
|
//设置header信息
|
|
246
258
|
});
|
|
@@ -249,10 +261,10 @@ class M {
|
|
|
249
261
|
return e && (e = e || ""), i({
|
|
250
262
|
method: "put",
|
|
251
263
|
url: o,
|
|
252
|
-
data:
|
|
264
|
+
data: k.stringify(e),
|
|
253
265
|
headers: {
|
|
254
266
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
255
|
-
"Authorization-Token":
|
|
267
|
+
"Authorization-Token": r()
|
|
256
268
|
}
|
|
257
269
|
});
|
|
258
270
|
}
|
|
@@ -263,7 +275,7 @@ class M {
|
|
|
263
275
|
data: JSON.stringify(e),
|
|
264
276
|
headers: {
|
|
265
277
|
"Content-Type": "application/json;charset=utf-8",
|
|
266
|
-
"Authorization-Token":
|
|
278
|
+
"Authorization-Token": r()
|
|
267
279
|
}
|
|
268
280
|
//设置header信息
|
|
269
281
|
});
|
|
@@ -275,7 +287,7 @@ class M {
|
|
|
275
287
|
data: e,
|
|
276
288
|
headers: {
|
|
277
289
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
278
|
-
"Authorization-Token":
|
|
290
|
+
"Authorization-Token": r(),
|
|
279
291
|
...n
|
|
280
292
|
}
|
|
281
293
|
});
|
|
@@ -284,10 +296,10 @@ class M {
|
|
|
284
296
|
return e && (e = e || ""), i({
|
|
285
297
|
method: "delete",
|
|
286
298
|
url: o,
|
|
287
|
-
data:
|
|
299
|
+
data: k.stringify(e),
|
|
288
300
|
headers: {
|
|
289
301
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
290
|
-
"Authorization-Token":
|
|
302
|
+
"Authorization-Token": r()
|
|
291
303
|
}
|
|
292
304
|
});
|
|
293
305
|
}
|
|
@@ -298,7 +310,7 @@ class M {
|
|
|
298
310
|
data: JSON.stringify(e),
|
|
299
311
|
headers: {
|
|
300
312
|
"Content-Type": "application/json;charset=utf-8",
|
|
301
|
-
"Authorization-Token":
|
|
313
|
+
"Authorization-Token": r()
|
|
302
314
|
}
|
|
303
315
|
});
|
|
304
316
|
}
|
|
@@ -310,7 +322,7 @@ class M {
|
|
|
310
322
|
params: e,
|
|
311
323
|
headers: {
|
|
312
324
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
313
|
-
"Authorization-Token":
|
|
325
|
+
"Authorization-Token": r()
|
|
314
326
|
}
|
|
315
327
|
});
|
|
316
328
|
}
|
|
@@ -322,7 +334,7 @@ class M {
|
|
|
322
334
|
params: e,
|
|
323
335
|
headers: {
|
|
324
336
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
325
|
-
"Authorization-Token":
|
|
337
|
+
"Authorization-Token": r()
|
|
326
338
|
}
|
|
327
339
|
});
|
|
328
340
|
}
|
|
@@ -334,7 +346,7 @@ class M {
|
|
|
334
346
|
data: JSON.stringify(e),
|
|
335
347
|
headers: {
|
|
336
348
|
"Content-Type": "application/json;charset=utf-8",
|
|
337
|
-
"Authorization-Token":
|
|
349
|
+
"Authorization-Token": r()
|
|
338
350
|
}
|
|
339
351
|
});
|
|
340
352
|
}
|
|
@@ -346,7 +358,7 @@ class M {
|
|
|
346
358
|
data: JSON.stringify(e),
|
|
347
359
|
headers: {
|
|
348
360
|
"Content-Type": "application/json;charset=utf-8",
|
|
349
|
-
"Authorization-Token":
|
|
361
|
+
"Authorization-Token": r()
|
|
350
362
|
}
|
|
351
363
|
});
|
|
352
364
|
}
|
|
@@ -358,7 +370,7 @@ class M {
|
|
|
358
370
|
params: e,
|
|
359
371
|
headers: {
|
|
360
372
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
361
|
-
"Authorization-Token":
|
|
373
|
+
"Authorization-Token": r()
|
|
362
374
|
}
|
|
363
375
|
});
|
|
364
376
|
}
|
|
@@ -370,7 +382,7 @@ class M {
|
|
|
370
382
|
data: JSON.stringify(e),
|
|
371
383
|
headers: {
|
|
372
384
|
"Content-Type": "application/json;charset=utf-8",
|
|
373
|
-
"Authorization-Token":
|
|
385
|
+
"Authorization-Token": r()
|
|
374
386
|
}
|
|
375
387
|
});
|
|
376
388
|
}
|
|
@@ -382,19 +394,19 @@ class M {
|
|
|
382
394
|
params: e,
|
|
383
395
|
headers: {
|
|
384
396
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
385
|
-
"Authorization-Token":
|
|
397
|
+
"Authorization-Token": r()
|
|
386
398
|
}
|
|
387
399
|
});
|
|
388
400
|
}
|
|
389
401
|
static uploadBase64(o, e, n) {
|
|
390
|
-
let
|
|
391
|
-
return
|
|
402
|
+
let s = new FormData();
|
|
403
|
+
return s.append("file", e.file), s.append("modulesId", e.modulesId), i({
|
|
392
404
|
method: "post",
|
|
393
405
|
url: o,
|
|
394
|
-
data:
|
|
406
|
+
data: s,
|
|
395
407
|
headers: {
|
|
396
408
|
"Content-Type": "multipart/form-data",
|
|
397
|
-
"Authorization-Token":
|
|
409
|
+
"Authorization-Token": r(),
|
|
398
410
|
...n
|
|
399
411
|
}
|
|
400
412
|
});
|
|
@@ -413,10 +425,10 @@ class M {
|
|
|
413
425
|
// });
|
|
414
426
|
// }
|
|
415
427
|
static postFormData(o, e, n) {
|
|
416
|
-
let
|
|
428
|
+
let s = new FormData();
|
|
417
429
|
return e.files && Array.isArray(e.files) && e.files.forEach((c) => {
|
|
418
|
-
|
|
419
|
-
}), e.submitWorkOrderParam &&
|
|
430
|
+
s.append("files", c);
|
|
431
|
+
}), e.submitWorkOrderParam && s.append(
|
|
420
432
|
"submitWorkOrderParam",
|
|
421
433
|
new Blob([JSON.stringify(e.submitWorkOrderParam)], {
|
|
422
434
|
type: "application/json;charset=utf-8"
|
|
@@ -424,9 +436,9 @@ class M {
|
|
|
424
436
|
), i({
|
|
425
437
|
method: "post",
|
|
426
438
|
url: o,
|
|
427
|
-
data:
|
|
439
|
+
data: s,
|
|
428
440
|
headers: {
|
|
429
|
-
"Authorization-Token":
|
|
441
|
+
"Authorization-Token": r(),
|
|
430
442
|
"Content-Type": "multipart/form-data",
|
|
431
443
|
...n
|
|
432
444
|
}
|
|
@@ -434,8 +446,8 @@ class M {
|
|
|
434
446
|
});
|
|
435
447
|
}
|
|
436
448
|
}
|
|
437
|
-
m(
|
|
438
|
-
class
|
|
449
|
+
m(H, "baseUrl", F);
|
|
450
|
+
class le {
|
|
439
451
|
constructor() {
|
|
440
452
|
//是否拥有页面权限
|
|
441
453
|
m(this, "havePermission", !1);
|
|
@@ -443,17 +455,17 @@ class re {
|
|
|
443
455
|
m(this, "funPointIdList", []);
|
|
444
456
|
}
|
|
445
457
|
}
|
|
446
|
-
const
|
|
458
|
+
const ce = (t, o) => {
|
|
447
459
|
const e = o.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), n = new RegExp(e, "gi");
|
|
448
460
|
return t.replace(n, (c) => `<span style="color:var(--theme-normal-normal)">${c}</span>`);
|
|
449
|
-
},
|
|
461
|
+
}, de = (t) => t.split("?")[0].substring(t.lastIndexOf(".") + 1).toLowerCase(), ue = (t, o, e = 0) => {
|
|
450
462
|
let n = "";
|
|
451
463
|
if (e > 0)
|
|
452
|
-
for (let
|
|
464
|
+
for (let s = 0; s < e; s++)
|
|
453
465
|
n += ".";
|
|
454
466
|
return t.length > o ? t.slice(0, o - e) + n : t;
|
|
455
467
|
};
|
|
456
|
-
function
|
|
468
|
+
function pe(t) {
|
|
457
469
|
let o = new Array(
|
|
458
470
|
"零",
|
|
459
471
|
"壹",
|
|
@@ -465,53 +477,53 @@ function ce(t) {
|
|
|
465
477
|
"柒",
|
|
466
478
|
"捌",
|
|
467
479
|
"玖"
|
|
468
|
-
), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"),
|
|
480
|
+
), e = new Array("", "拾", "佰", "仟"), n = new Array("", "万", "亿", "兆"), s = new Array("角", "分", "毫", "厘"), c = "元", P = 1e15, u = "", p = "", a = "", T = ["", ""], f, y, d, b, x, S, N;
|
|
469
481
|
if (t == null)
|
|
470
482
|
return "";
|
|
471
|
-
if (t >=
|
|
483
|
+
if (t >= P)
|
|
472
484
|
return "超出最大处理数字";
|
|
473
485
|
if (t == 0)
|
|
474
|
-
return
|
|
475
|
-
if (t.toString().indexOf(".") == -1 ? (u = t.toString(), p = "", c = "元整") : (
|
|
476
|
-
f = 0,
|
|
477
|
-
for (let l = 0; l <
|
|
478
|
-
d = u.substr(l, 1),
|
|
479
|
-
|
|
486
|
+
return a = o[0] + c, a;
|
|
487
|
+
if (t.toString().indexOf(".") == -1 ? (u = t.toString(), p = "", c = "元整") : (T = t.toString().split("."), u = T[0], p = T[1].substr(0, 2)), parseInt(u, 10) > 0) {
|
|
488
|
+
f = 0, y = u.length;
|
|
489
|
+
for (let l = 0; l < y; l++)
|
|
490
|
+
d = u.substr(l, 1), b = y - l - 1, x = b / 4, S = b % 4, d == "0" ? f++ : (f > 0 && (a += o[0]), f = 0, a += o[parseInt(d)] + e[S]), S == 0 && f < 4 && (a += n[x]);
|
|
491
|
+
a += c;
|
|
480
492
|
}
|
|
481
493
|
if (p != "") {
|
|
482
494
|
N = p.length;
|
|
483
495
|
for (let l = 0; l < N; l++)
|
|
484
|
-
d = p.substr(l, 1), d != "0" && (
|
|
496
|
+
d = p.substr(l, 1), d != "0" && (a += o[Number(d)] + s[l]);
|
|
485
497
|
}
|
|
486
|
-
return
|
|
498
|
+
return a == "" && (a += o[0] + c), a;
|
|
487
499
|
}
|
|
488
|
-
function
|
|
500
|
+
function fe(t) {
|
|
489
501
|
const o = parseFloat(t.toString());
|
|
490
502
|
if (isNaN(o))
|
|
491
503
|
return t;
|
|
492
504
|
const e = o.toString();
|
|
493
505
|
return (e.split(".")[1] || "").length > 11 ? o.toFixed(11) : e;
|
|
494
506
|
}
|
|
495
|
-
function
|
|
507
|
+
function he(t) {
|
|
496
508
|
const o = parseFloat(t.toString());
|
|
497
509
|
return isNaN(o) ? 0 : Number(Math.round(o * 100) / 100);
|
|
498
510
|
}
|
|
499
511
|
export {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
512
|
+
le as F,
|
|
513
|
+
H,
|
|
514
|
+
se as I,
|
|
515
|
+
A as a,
|
|
516
|
+
pe as b,
|
|
517
|
+
re as c,
|
|
518
|
+
te as d,
|
|
519
|
+
C as e,
|
|
520
|
+
fe as f,
|
|
521
|
+
he as g,
|
|
522
|
+
ue as h,
|
|
523
|
+
de as i,
|
|
524
|
+
ne as j,
|
|
525
|
+
ce as k,
|
|
526
|
+
ae as l,
|
|
527
|
+
oe as o,
|
|
528
|
+
ie as s
|
|
517
529
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var R=Object.defineProperty;var D=(t,o,e)=>o in t?R(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e;var m=(t,o,e)=>D(t,typeof o!="symbol"?o+"":o,e);const A=require("dingtalk-jsapi"),u=require("element-plus"),v=require("axios"),C=require("qs"),j=require("lodash"),g=require("vant"),J=require("sm-crypto"),L=t=>{if(A.env.platform!=="notInDingTalk")window.open(t+"/?ddtab=true","_blank");else if(window.oaTool&&window.oaTool.isOA){window.oaTool.openNewWindow(t);return}else window.open(t,"_blank")},M=t=>encodeURIComponent(t),q=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(A.env.platform!=="notInDingTalk")A.biz.navigation.setTitle({title:t}),document.title=t;else if(window.oaTool&&window.oaTool.isOA){window.oaTool.setTitle(t);return}else document.title=t};function U(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(U(t.url)),console.log("URL 已复制到剪贴板:",U(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)},y=()=>{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))},$=()=>!y(),B=["imd","agoal","scm","bms","coc","hws","fms","hrm","hrms","itrms","personalization","projectManagement"],H=()=>{const t=window.location.pathname.replace(/\/$/,"").split("/"),o=t[t.length-1];B.includes(o)&&t.pop();const e=t.join("/")||"/";return window.location.origin+(e.endsWith("/")?e:`${e}/`)},O=t=>{const o=`${H()}login/index.html`;return t?`${o}?host=${encodeURIComponent(t)}`:o};let w=null;const V=t=>{w=t},F=()=>{var t,o,e;return((o=(t=w==null?void 0:w.currentRoute)==null?void 0:t.value)==null?void 0:o.fullPath)||((e=window.location.hash)==null?void 0:e.replace(/^#/,""))||window.location.pathname+window.location.search},_=j.debounce(()=>{alert("登录失效,请重新登录")},1e3,{leading:!0,trailing:!1});function T(t){localStorage.setItem("preRoute",F()),localStorage.setItem("toRouter",window.location.search),localStorage.getItem("toRouter");let o=localStorage.getItem("currentRouterInfo");if(localStorage.setItem("toRouterObject",o),t&&t===1){window.sessionStorage.clear(),window.localStorage.clear(),window.location.href=O();return}localStorage.setItem("toRouter",window.location.search);let e=F();sessionStorage.setItem("preRoute",e),window.localStorage.removeItem("TOKEN"),window.localStorage.removeItem("clientId"),_(),setTimeout(()=>{window.location.href=O()},100)}const Z=(t,o)=>J.sm4.encrypt(t,G(o));function G(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 X=function(){let t=localStorage.getItem("TOKEN")+"IhfN5d11Zk1ZC%Po"+Date.now();return Z(t,"*XeL#J@znVJ#sdSv")},Q=function(){return localStorage.getItem("TOKEN")},r=function(){return X()},P=window.location.origin+window.location.pathname+"api",i=v.create({timeout:18e5,baseURL:P});i.interceptors.request.use(t=>t);i.interceptors.response.use(t=>(y()?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():y()?g.showNotify({type:"danger",message:"网络请求失败"}):u.ElMessage.error("网络请求失败"),Promise.reject(t.response)));class z{static get(o,e){return e&&(e=e||""),i({method:"get",url:o,params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static post(o,e){return e&&(e=e||""),i({method:"post",url:o,data:C.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r(),"Authorization-origin-Token":localStorage.getItem("TOKEN")}})}static postJson(o,e,n){return e&&(e=e||""),i({method:"post",url:o,data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r(),"Authorization-origin-Token":localStorage.getItem("TOKEN"),...n}})}static uploadOSS(o,e,n){return e&&(e=e||""),i({method:"post",url:o,data:e,headers:{"Content-Type":"multipart/form-data","Authorization-Token":r(),...n}})}static uploadOSSResident(o,e,n){return e&&(e=e||""),i({method:"post",url:o,data:e,headers:{"Content-Type":"multipart/form-data","Authorization-Token":Q(),...n}})}static exportFile(o,e){return e&&(e=e||""),i({method:"post",responseType:"arraybuffer",url:o,data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static put(o,e){return e&&(e=e||""),i({method:"put",url:o,data:C.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static putJson(o,e){return e&&(e=e||""),i({method:"put",url:o,data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static putFile(o,e,n){return e&&(e=e||""),i({method:"put",url:o,data:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r(),...n}})}static deleted(o,e){return e&&(e=e||""),i({method:"delete",url:o,data:C.stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static deletedjson(o,e){return e&&(e=e||""),i({method:"delete",url:o,data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static downloadGet(o,e){return e&&(e=e||""),i({method:"get",url:o,responseType:"blob",params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static downloadPost(o,e){return e&&(e=e||""),i({method:"post",url:o,responseType:"blob",params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static download(o,e){return e&&(e=e||""),i({method:"post",url:o,responseType:"blob",data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static downloadPostJson(o,e){return e&&(e=e||""),i({method:"post",url:o,responseType:"blob",data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static downloadPut(o,e){return e&&(e=e||""),i({method:"put",url:o,responseType:"blob",params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static downloadPutJson(o,e){return e&&(e=e||""),i({method:"put",url:o,responseType:"blob",data:JSON.stringify(e),headers:{"Content-Type":"application/json;charset=utf-8","Authorization-Token":r()}})}static downloadFile(o,e){return e&&(e=e||{}),i({method:"post",url:o,responseType:"blob",params:e,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization-Token":r()}})}static uploadBase64(o,e,n){let s=new FormData;return s.append("file",e.file),s.append("modulesId",e.modulesId),i({method:"post",url:o,data:s,headers:{"Content-Type":"multipart/form-data","Authorization-Token":r(),...n}})}static postFormData(o,e,n){let s=new FormData;return e.files&&Array.isArray(e.files)&&e.files.forEach(c=>{s.append("files",c)}),e.submitWorkOrderParam&&s.append("submitWorkOrderParam",new Blob([JSON.stringify(e.submitWorkOrderParam)],{type:"application/json;charset=utf-8"})),i({method:"post",url:o,data:s,headers:{"Authorization-Token":r(),"Content-Type":"multipart/form-data",...n}})}}m(z,"baseUrl",P);class Y{constructor(){m(this,"havePermission",!1);m(this,"funPointIdList",[])}}const ee=(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>`)},te=t=>t.split("?")[0].substring(t.lastIndexOf(".")+1).toLowerCase(),oe=(t,o,e=0)=>{let n="";if(e>0)for(let s=0;s<e;s++)n+=".";return t.length>o?t.slice(0,o-e)+n:t};function ne(t){let o=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),e=new Array("","拾","佰","仟"),n=new Array("","万","亿","兆"),s=new Array("角","分","毫","厘"),c="元",E=1e15,p="",f="",a="",b=["",""],h,S,d,k,x,I,N;if(t==null)return"";if(t>=E)return"超出最大处理数字";if(t==0)return a=o[0]+c,a;if(t.toString().indexOf(".")==-1?(p=t.toString(),f="",c="元整"):(b=t.toString().split("."),p=b[0],f=b[1].substr(0,2)),parseInt(p,10)>0){h=0,S=p.length;for(let l=0;l<S;l++)d=p.substr(l,1),k=S-l-1,x=k/4,I=k%4,d=="0"?h++:(h>0&&(a+=o[0]),h=0,a+=o[parseInt(d)]+e[I]),I==0&&h<4&&(a+=n[x]);a+=c}if(f!=""){N=f.length;for(let l=0;l<N;l++)d=f.substr(l,1),d!="0"&&(a+=o[Number(d)]+s[l])}return a==""&&(a+=o[0]+c),a}function ie(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 re(t){const o=parseFloat(t.toString());return isNaN(o)?0:Number(Math.round(o*100)/100)}exports.FunPointVo=Y;exports.HttpUtil=z;exports.IsPc=$;exports.IsPhone=y;exports.ddWindowOpen=L;exports.digitUppercase=ne;exports.downloadFile=W;exports.exitLogin=T;exports.formatDecimal=ie;exports.formatTwoDecimal=re;exports.getEllipsis=oe;exports.getFileType=te;exports.getProcessAppIdUrl=q;exports.highlightText=ee;exports.openEncodeUrl=M;exports.setDingDingTitle=K;exports.setExitLoginRouter=V;
|