@utogether/udp-core 2.0.0-beta.27 → 2.0.0-beta.28
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/{403-gdcH0-Bo.js → 403-CyoOD-Ik.js} +1 -1
- package/dist/{404-Se2SF97M.js → 404-Ch_OHTw0.js} +1 -1
- package/dist/{500-B6j9AqLo.js → 500-Cf9am7HK.js} +1 -1
- package/dist/{AuthorityInfo-CQ8ydZvr.js → AuthorityInfo-BJ427cqG.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-C4NRvS8p.js → AuthorityInfo.vue_vue_type_style_index_0_lang-D9y7AwbB.js} +11 -12
- package/dist/{Company-BzSVBSC4.js → Company-qo-lKPkv.js} +3 -3
- package/dist/{CompanyPanel-DBjZB4aJ.js → CompanyPanel-DkKWAKvY.js} +7 -7
- package/dist/{Department-BkgseHo8.js → Department-CHUQByKX.js} +3 -3
- package/dist/{DepartmentPanel-Sen93_2M.js → DepartmentPanel-C742dfOO.js} +27 -28
- package/dist/{DesignPanel-pqDcwaFC.js → DesignPanel-D9oE5R7m.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-BjtYyEw7.js → DesignPanel.vue_vue_type_style_index_0_lang-hYldVEbo.js} +192 -108
- package/dist/{DictView-CJLG4LlE.js → DictView-CrFXprP9.js} +1 -1
- package/dist/{InvOrganization-D0Jq1IAa.js → InvOrganization-Cz8SzIgs.js} +6 -7
- package/dist/{Org-CO_1WT39.js → Org-Bzt6yKox.js} +9 -10
- package/dist/{Preview-DLI4Bwel.js → Preview-jonigfMQ.js} +1 -1
- package/dist/{ReportDefine-Cw46OnJ_.js → ReportDefine-BpiM5Ovq.js} +1 -1
- package/dist/{ReportDesign-D4sHTXT7.js → ReportDesign-fp09cXJ7.js} +24 -25
- package/dist/{ReportQuery-DtOCvQSN.js → ReportQuery-52ZP1PYP.js} +1 -1
- package/dist/{ReportQueryFrom-QjL-ETPq.js → ReportQueryFrom-DSYavJb1.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-Dj9ne87n.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-DBGYEp0u.js} +4 -4
- package/dist/{ReportTemplate-BxAgc_Aj.js → ReportTemplate-CA_UW0eD.js} +3 -3
- package/dist/{Role-Df77BBD-.js → Role-DqOt8Bk0.js} +3 -3
- package/dist/{RoleAssign-BrunouML.js → RoleAssign-BdxhefhQ.js} +3 -3
- package/dist/{RolePanel-HLA7XBlN.js → RolePanel-2gZ3H0ET.js} +1 -1
- package/dist/{RolePanel-DSVwqhiD.js → RolePanel-BsNd0svJ.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CN0rUxKz.js → RolePanel.vue_vue_type_script_setup_true_lang-DLOwgF99.js} +9 -9
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CKlbqRa5.js → RolePanel.vue_vue_type_script_setup_true_lang-DmzD9kab.js} +26 -27
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-D_FeSXKv.js → ScrollPanel.vue_vue_type_style_index_0_lang-B9ptUMeI.js} +7 -7
- package/dist/{Staff-BeL1xcRf.js → Staff-D3L8fEoY.js} +3 -3
- package/dist/{StaffInfo-CIfnltyX.js → StaffInfo-DYRw6ZYJ.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DbLFwWfG.js → StaffInfo.vue_vue_type_script_setup_true_lang-xqEOQnMs.js} +1 -1
- package/dist/{StaffPanel-BV2CHWac.js → StaffPanel-DkrNH6Px.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-CvT-Vp2G.js → StaffPanel.vue_vue_type_script_setup_true_lang-BPBMnliy.js} +8 -9
- package/dist/{SysUser-DPfNvthk.js → SysUser-Bl1-cIpJ.js} +2 -2
- package/dist/{SysUserPanel-CoLKYlQE.js → SysUserPanel-yxNLaBwt.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-lcO3Cjbq.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BDcsgSl5.js} +11 -12
- package/dist/{SystemMenu-sdj1dRDA.js → SystemMenu-C4_Arn12.js} +9 -10
- package/dist/{UserInfo-CTX4hhFl.js → UserInfo-QcNwJCUR.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-ClhCd_8z.js → UserInfo.vue_vue_type_style_index_0_lang-DLIeUphX.js} +5 -6
- package/dist/{childView-BDmWwJO5.js → childView-B23DEO2u.js} +1 -1
- package/dist/{childView-Dx3ACtHa.js → childView-saDZQv9x.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-CfKq_0FN.js → childView.vue_vue_type_style_index_0_lang-RsKR6CAC.js} +14 -15
- package/dist/{childView.vue_vue_type_style_index_0_lang-DxZNtkhd.js → childView.vue_vue_type_style_index_0_lang-ZFEfavUY.js} +11 -12
- package/dist/{code-rule-cvN4gYC_.js → code-rule-2_Ihx_by.js} +12 -13
- package/dist/core.es.js +21 -19
- package/dist/{cron-task-B0TkxFdp.js → cron-task-BFOPJQIk.js} +3 -4
- package/dist/{frameView-5cy5BSgS.js → frameView-f7Ya0Knj.js} +1 -1
- package/dist/img/minicolors.png +0 -0
- package/dist/{index-C5WRTwvI.js → index-BpdTDaTk.js} +811 -604
- package/dist/{layout-home-DrARg-3o.js → layout-home-v3DPJ7rB.js} +12 -13
- package/dist/{layoutView-25v_ngk5.js → layoutView-DZHoQDH1.js} +186 -187
- package/dist/{log-in-Bmz5Uhbt.js → log-in-BPAMJTwH.js} +4 -5
- package/dist/{log-out-B-8m3oNj.js → log-out-DZACF0jg.js} +8 -9
- package/dist/{login-Cmp2RvvW.js → login-B8cwozax.js} +22 -23
- package/dist/{lov-view-BATtzw2X.js → lov-view-Ba7Y7xy0.js} +4 -5
- package/dist/{menuInfo-BIvrE7nm.js → menuInfo-BpRKFYK8.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-B6USomit.js → menuInfo.vue_vue_type_style_index_0_lang-DJ5sUC6m.js} +17 -18
- package/dist/{pda-app-CzHVyeEa.js → pda-app-C0jJecrL.js} +7 -8
- package/dist/{resource-Y5lGB38n.js → resource-BG22Cw4P.js} +4 -4
- package/dist/su-welcome-DaxhbrC6.js +879 -0
- package/dist/{sys-config-CqO03LeC.js → sys-config-CG2fMtak.js} +22 -23
- package/dist/udp-core.css +1 -1
- package/dist/{useNav-C-rCgubt.js → useNav-_u2UAQWk.js} +24 -24
- package/index.ts +54 -51
- package/package.json +21 -21
- package/src/api/http.ts +10 -4
- package/src/api/index.ts +51 -51
- package/src/api/user.ts +64 -64
- package/src/components/udp/content/index.vue +93 -93
- package/src/components/udp/form-upload/form-upload.vue +496 -496
- package/src/components/udp/grid/index.vue +643 -544
- package/src/components/udp/index.ts +2 -1
- package/src/components/udp/modal-form/index.vue +326 -0
- package/src/components/udp/utils.ts +420 -420
- package/src/layout/components/lay-navbar/index.vue +240 -240
- package/src/layout/components/lay-search/components/SearchModal.vue +185 -185
- package/src/layout/components/lay-sidebar/mixNav.vue +261 -261
- package/src/layout/components/lay-sidebar/sidebarItem.vue +199 -195
- package/src/layout/components/lay-sidebar/vertical.vue +92 -92
- package/src/layout/layoutView.vue +1 -0
- package/src/main.ts +111 -111
- package/src/plugins/i18n/zh.ts +5 -1
- package/src/plugins/vxe-table/index.ts +116 -116
- package/src/router/index.ts +158 -156
- package/src/router/utils.ts +434 -430
- package/src/store/modules/permission.ts +1 -1
- package/src/store/modules/system.ts +193 -193
- package/src/style/print-lock.css +380 -375
- package/src/style/suprint.css +990 -985
- package/src/utils/authority/index.ts +46 -46
- package/src/utils/dataFormat/index.ts +309 -222
- package/src/utils/udp/http/index.ts +19 -11
- package/src/views/uhome/components/home-todo.vue +15 -3
- package/src/views/uhome/dynamic-card.vue +31 -31
- package/src/views/uhome/su-welcome.vue +310 -310
- package/src/views/ulogin/login.vue +292 -292
- package/src/views/urpt/design/DesignPanel.vue +538 -507
- package/src/views/urpt/design/print-data.ts +39 -59
- package/dist/await-to-js.es5-Bv3Eu4mi.js +0 -10
- package/dist/su-welcome-CXA6OzBw.js +0 -878
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { computed as t } from "vue";
|
|
2
|
-
import { storeToRefs as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { useGlobal as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
2
|
+
import { storeToRefs as A } from "pinia";
|
|
3
|
+
import { useRouter as L } from "vue-router";
|
|
4
|
+
import { useGlobal as N, storageLocal as O, cookies as u } from "@utogether/utils";
|
|
5
|
+
import { q as x, e as a, u as B, h as G, k as M, n as m, A as z, B as d, c as i, m as K, C as U, y as $, z as j, D as F, E as W, G as Y, H as J } from "./index-BpdTDaTk.js";
|
|
6
|
+
const Q = "当前路由配置不正确,请检查配置";
|
|
7
7
|
function te() {
|
|
8
|
-
const r = x(), g =
|
|
8
|
+
const r = x(), g = L().options.routes, { wholeMenus: f } = A(a()), p = t(() => ({
|
|
9
9
|
width: "100%",
|
|
10
10
|
display: "flex",
|
|
11
11
|
alignItems: "center",
|
|
12
12
|
justifyContent: "space-between",
|
|
13
13
|
overflow: "hidden"
|
|
14
14
|
})), h = t(() => (e, o) => ({
|
|
15
|
-
background: e === o ?
|
|
15
|
+
background: e === o ? B().epThemeColor : "",
|
|
16
16
|
color: e === o ? "#f4f4f5" : "#000"
|
|
17
|
-
})),
|
|
17
|
+
})), v = t(() => (e, o) => e === o ? "" : "dark:hover:text-primary!"), l = t(() => G().getUserInfo || {}), w = t(() => l.value ? { marginRight: "10px" } : ""), y = t(() => !r.getSidebarStatus), S = t(() => r.getDevice), { $storage: c } = N(), k = t(() => c?.layout?.layout), n = t(() => (O.getItem(M) || {})?.title || "U-DP");
|
|
18
18
|
function P() {
|
|
19
19
|
document.title = z().MODE !== "staging" ? n.value : `${n.value}•测试`;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
21
|
+
function C() {
|
|
22
|
+
Y(), i().handleTags("equal", [...K]), u.remove(U), u.remove($), u.remove(j), a().setWholeMenus([]), i().handleTags("splice", "", {
|
|
23
23
|
startIndex: 1,
|
|
24
24
|
length: i()?.multiTags?.length
|
|
25
|
-
}), a().clearAllCachePage(),
|
|
25
|
+
}), a().clearAllCachePage(), F(), J(), d.push("/login");
|
|
26
26
|
}
|
|
27
27
|
function I() {
|
|
28
28
|
d.push("/welcome");
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function R() {
|
|
31
31
|
m.emit("openPanel");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function T() {
|
|
34
34
|
r.toggleSideBar();
|
|
35
35
|
}
|
|
36
36
|
function D(e) {
|
|
37
37
|
e?.handleResize();
|
|
38
38
|
}
|
|
39
39
|
function H(e) {
|
|
40
|
-
if (!e.children) return console.error(
|
|
40
|
+
if (!e.children) return console.error(Q);
|
|
41
41
|
const o = /^http(s?):\/\//, s = e.children[0]?.path;
|
|
42
42
|
return o.test(s) ? e.path + "/" + s : s;
|
|
43
43
|
}
|
|
44
44
|
function E(e) {
|
|
45
|
-
f.value.length === 0 ||
|
|
45
|
+
f.value.length === 0 || b(e) || m.emit("changLayoutRoute", e);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
47
|
+
function b(e) {
|
|
48
|
+
return W.includes(e);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function q() {
|
|
51
51
|
const e = { name: "$input", props: { type: "password" } };
|
|
52
52
|
return [
|
|
53
53
|
{ field: "oldUserPwd", title: "message.udp.oldPwd", required: !0, itemRender: e },
|
|
@@ -59,24 +59,24 @@ function te() {
|
|
|
59
59
|
title: n,
|
|
60
60
|
device: S,
|
|
61
61
|
layout: k,
|
|
62
|
-
logout:
|
|
62
|
+
logout: C,
|
|
63
63
|
routers: g,
|
|
64
64
|
$storage: c,
|
|
65
65
|
backHome: I,
|
|
66
|
-
onPanel:
|
|
66
|
+
onPanel: R,
|
|
67
67
|
getDivStyle: p,
|
|
68
68
|
setDocumentTitle: P,
|
|
69
|
-
toggleSideBar:
|
|
69
|
+
toggleSideBar: T,
|
|
70
70
|
menuSelect: E,
|
|
71
71
|
handleResize: D,
|
|
72
72
|
resolvePath: H,
|
|
73
73
|
isCollapse: y,
|
|
74
74
|
appHook: r,
|
|
75
75
|
userInfo: l,
|
|
76
|
-
avatarsStyle:
|
|
76
|
+
avatarsStyle: w,
|
|
77
77
|
getDropdownItemStyle: h,
|
|
78
|
-
getDropdownItemClass:
|
|
79
|
-
passwordItems:
|
|
78
|
+
getDropdownItemClass: v,
|
|
79
|
+
passwordItems: q
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
export {
|
package/index.ts
CHANGED
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: levi7754 levi7754@163.com
|
|
3
|
-
* @Date: 2024-04-14 19:10:28
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2026-
|
|
6
|
-
* @FilePath: /udp-front/packages/udp-core/index.ts
|
|
7
|
-
* @Description:
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import UInit from './src/main';
|
|
11
|
-
export default UInit;
|
|
12
|
-
|
|
13
|
-
import { store } from './src/store';
|
|
14
|
-
import { hasAuthority, isViewonly } from './src/utils/authority';
|
|
15
|
-
|
|
16
|
-
import { useSystemStoreHook as useSystemStore } from './src/store/modules/system';
|
|
17
|
-
import { useMultiTagsStoreHook as useMultiTagsStore } from './src/store/modules/multiTags';
|
|
18
|
-
import { usePermissionStoreHook as usePermissionStore } from './src/store/modules/permission';
|
|
19
|
-
|
|
20
|
-
import { handleAliveRoute, delCurrentRoute, getProcessMenu } from './src/router/utils';
|
|
21
|
-
import { useLayout } from './src/layout/hooks/useLayout';
|
|
22
|
-
import { useDataThemeChange } from './src/layout/hooks/useDataThemeChange';
|
|
23
|
-
import { constantRoutes, remainingRouters, routerBefore } from './src/router';
|
|
24
|
-
|
|
25
|
-
import { getServiceApi } from './src/api';
|
|
26
|
-
import { initDict, userMonitor } from './src/api/user';
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: levi7754 levi7754@163.com
|
|
3
|
+
* @Date: 2024-04-14 19:10:28
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2026-09-09 11:49:02
|
|
6
|
+
* @FilePath: /udp-front/packages/udp-core/index.ts
|
|
7
|
+
* @Description:
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import UInit from './src/main';
|
|
11
|
+
export default UInit;
|
|
12
|
+
|
|
13
|
+
import { store } from './src/store';
|
|
14
|
+
import { hasAuthority, isViewonly } from './src/utils/authority';
|
|
15
|
+
|
|
16
|
+
import { useSystemStoreHook as useSystemStore } from './src/store/modules/system';
|
|
17
|
+
import { useMultiTagsStoreHook as useMultiTagsStore } from './src/store/modules/multiTags';
|
|
18
|
+
import { usePermissionStoreHook as usePermissionStore } from './src/store/modules/permission';
|
|
19
|
+
|
|
20
|
+
import { handleAliveRoute, delCurrentRoute, getProcessMenu } from './src/router/utils';
|
|
21
|
+
import { useLayout } from './src/layout/hooks/useLayout';
|
|
22
|
+
import { useDataThemeChange } from './src/layout/hooks/useDataThemeChange';
|
|
23
|
+
import { constantRoutes, remainingRouters, routerBefore } from './src/router';
|
|
24
|
+
|
|
25
|
+
import { getServiceApi } from './src/api';
|
|
26
|
+
import { initDict, userMonitor } from './src/api/user';
|
|
27
|
+
import { getDesignTemplate, getPrintTemp } from './src/api/http';
|
|
28
|
+
|
|
29
|
+
import { lifeCycleEvent, getPlatform, getBrower } from './src/utils';
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
store,
|
|
33
|
+
hasAuthority,
|
|
34
|
+
isViewonly,
|
|
35
|
+
useSystemStore,
|
|
36
|
+
useMultiTagsStore,
|
|
37
|
+
usePermissionStore,
|
|
38
|
+
delCurrentRoute,
|
|
39
|
+
handleAliveRoute,
|
|
40
|
+
getServiceApi,
|
|
41
|
+
lifeCycleEvent,
|
|
42
|
+
routerBefore,
|
|
43
|
+
constantRoutes,
|
|
44
|
+
remainingRouters,
|
|
45
|
+
useDataThemeChange,
|
|
46
|
+
useLayout,
|
|
47
|
+
initDict,
|
|
48
|
+
userMonitor,
|
|
49
|
+
getPlatform,
|
|
50
|
+
getBrower,
|
|
51
|
+
getProcessMenu,
|
|
52
|
+
getDesignTemplate,
|
|
53
|
+
getPrintTemp
|
|
54
|
+
};
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@utogether/udp-core",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "2.0.0-beta.
|
|
5
|
-
"description": "",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main1": "index.ts",
|
|
8
|
-
"main": "dist/core.es.js",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"dev": "vite",
|
|
11
|
-
"build": "vite build",
|
|
12
|
-
"preview:build": "pnpm build && vite preview",
|
|
13
|
-
"report": "rimraf dist && vite build"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [],
|
|
16
|
-
"author": "",
|
|
17
|
-
"license": "ISC",
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"vue3-sfc-loader": "^0.9.5"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@utogether/udp-core",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "2.0.0-beta.28",
|
|
5
|
+
"description": "",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main1": "index.ts",
|
|
8
|
+
"main": "dist/core.es.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vite",
|
|
11
|
+
"build": "vite build",
|
|
12
|
+
"preview:build": "pnpm build && vite preview",
|
|
13
|
+
"report": "rimraf dist && vite build"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"vue3-sfc-loader": "^0.9.5"
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/api/http.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2021-11-17 16:24:43
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime:
|
|
5
|
+
* @LastEditTime: 2026-09-09 11:14:19
|
|
6
6
|
* @Description: API封装
|
|
7
7
|
*/
|
|
8
8
|
import { http } from '@utogether/utils';
|
|
@@ -10,8 +10,14 @@ import to from 'await-to-js';
|
|
|
10
10
|
import { useSystemStoreHook } from '../store/modules/system';
|
|
11
11
|
import { getBaseURL } from './';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @description: 获取打印模板
|
|
16
|
+
* @param templateCode 模板编码
|
|
17
|
+
* @param multi 是否多个模板Y:是,N:否
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export const getDesignTemplate = (templateCode, multi = 'N') => {
|
|
15
21
|
const uri = multi === 'Y' ? 'selectByMultiTemplateCode' : 'selectByTemplateCode';
|
|
16
22
|
const url = '/urpt/v1/printTemplate/' + uri;
|
|
17
23
|
return http.get(`${getBaseURL()}${url}`, { templateCode });
|
|
@@ -36,7 +42,7 @@ export const getPrintTemp = (printPosition, query?) => {
|
|
|
36
42
|
})
|
|
37
43
|
.join(',');
|
|
38
44
|
if (templateCode) {
|
|
39
|
-
const [err, data] = await to(
|
|
45
|
+
const [err, data] = await to(getDesignTemplate(templateCode, 'Y'));
|
|
40
46
|
if (!err) {
|
|
41
47
|
config.printContentList = data;
|
|
42
48
|
}
|
package/src/api/index.ts
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-11-17 16:24:43
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2026-
|
|
6
|
-
* @Description: API封装
|
|
7
|
-
*/
|
|
8
|
-
import { http } from '@utogether/utils';
|
|
9
|
-
|
|
10
|
-
import { getEnv } from '../config';
|
|
11
|
-
|
|
12
|
-
// 路由相关服务
|
|
13
|
-
export const getServiceApi = () => {
|
|
14
|
-
return {
|
|
15
|
-
post: (url: string, data: object, config?) => http.post(`${getBaseURL(url)}${url}`, data, config),
|
|
16
|
-
get: (url: string, params: object, config?) => http.get(`${getBaseURL(url)}${url}`, params, config),
|
|
17
|
-
put: (url: string, params: object) => http.put(`${getBaseURL(url)}${url}`, params),
|
|
18
|
-
delete: (url: string, params: object) => http.delete(`${getBaseURL(url)}${url}`, params)
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const setRouter = router => {
|
|
23
|
-
http.setRouter(router);
|
|
24
|
-
};
|
|
25
|
-
export const setBaseUrl = router => {
|
|
26
|
-
http.setBaseUrl(router);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const origin = window.location.origin + '/gateway';
|
|
30
|
-
|
|
31
|
-
export const getBaseURL = (url?) => {
|
|
32
|
-
const whiteList = ['/uath/', '/uwfl/', '/uums/', '/upfm/', '/urpt/', '/usch/'];
|
|
33
|
-
if (url && getEnv().VITE_DEBUG === 'true' && !whiteList.some(item => url.includes(item))) {
|
|
34
|
-
return getEnv().VITE_DEBUG_URL;
|
|
35
|
-
}
|
|
36
|
-
return getEnv().VITE_BASE_URL === 'origin' ? origin : getEnv().VITE_BASE_URL;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const getDebugBaseURL = () => {
|
|
40
|
-
console.log('getDebugBaseURL', getDebugURL());
|
|
41
|
-
return {
|
|
42
|
-
post: (url: string, data: object, config?) => http.post(`${getDebugURL()}${url}`, data, config),
|
|
43
|
-
get: (url: string, params: object, config?) => http.get(`${getDebugURL()}${url}`, params, config),
|
|
44
|
-
put: (url: string, params: object) => http.put(`${getDebugURL()}${url}`, params),
|
|
45
|
-
delete: (url: string, params: object) => http.delete(`${getDebugURL()}${url}`, params)
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const getDebugURL = () => {
|
|
50
|
-
return getEnv().VITE_DEBUG_URL;
|
|
51
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-17 16:24:43
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2026-08-03 15:59:29
|
|
6
|
+
* @Description: API封装
|
|
7
|
+
*/
|
|
8
|
+
// import { http } from '@utogether/utils';
|
|
9
|
+
import { http } from '../utils/udp/http';
|
|
10
|
+
import { getEnv } from '../config';
|
|
11
|
+
|
|
12
|
+
// 路由相关服务
|
|
13
|
+
export const getServiceApi = () => {
|
|
14
|
+
return {
|
|
15
|
+
post: (url: string, data: object, config?) => http.post(`${getBaseURL(url)}${url}`, data, config),
|
|
16
|
+
get: (url: string, params: object, config?) => http.get(`${getBaseURL(url)}${url}`, params, config),
|
|
17
|
+
put: (url: string, params: object) => http.put(`${getBaseURL(url)}${url}`, params),
|
|
18
|
+
delete: (url: string, params: object) => http.delete(`${getBaseURL(url)}${url}`, params)
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const setRouter = router => {
|
|
23
|
+
http.setRouter(router);
|
|
24
|
+
};
|
|
25
|
+
export const setBaseUrl = router => {
|
|
26
|
+
http.setBaseUrl(router);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const origin = window.location.origin + '/gateway';
|
|
30
|
+
|
|
31
|
+
export const getBaseURL = (url?) => {
|
|
32
|
+
const whiteList = ['/uath/', '/uwfl/', '/uums/', '/upfm/', '/urpt/', '/usch/'];
|
|
33
|
+
if (url && getEnv().VITE_DEBUG === 'true' && !whiteList.some(item => url.includes(item))) {
|
|
34
|
+
return getEnv().VITE_DEBUG_URL;
|
|
35
|
+
}
|
|
36
|
+
return getEnv().VITE_BASE_URL === 'origin' ? origin : getEnv().VITE_BASE_URL;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const getDebugBaseURL = () => {
|
|
40
|
+
console.log('getDebugBaseURL', getDebugURL());
|
|
41
|
+
return {
|
|
42
|
+
post: (url: string, data: object, config?) => http.post(`${getDebugURL()}${url}`, data, config),
|
|
43
|
+
get: (url: string, params: object, config?) => http.get(`${getDebugURL()}${url}`, params, config),
|
|
44
|
+
put: (url: string, params: object) => http.put(`${getDebugURL()}${url}`, params),
|
|
45
|
+
delete: (url: string, params: object) => http.delete(`${getDebugURL()}${url}`, params)
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const getDebugURL = () => {
|
|
50
|
+
return getEnv().VITE_DEBUG_URL;
|
|
51
|
+
};
|
package/src/api/user.ts
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-11-17 16:02:30
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2026-01-23 18:21:36
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
import { http } from '@utogether/utils';
|
|
9
|
-
import { toDateString } from 'xe-utils';
|
|
10
|
-
// import { http } from '../utils/udp/http';
|
|
11
|
-
import { getBaseURL } from './';
|
|
12
|
-
|
|
13
|
-
import { getPlatform, getBrower } from '../utils/browers';
|
|
14
|
-
|
|
15
|
-
// 私钥
|
|
16
|
-
export const getPublicKey = () => http.get(`${getBaseURL()}/public/request`);
|
|
17
|
-
// 获取验证码
|
|
18
|
-
export const getVerify = () => http.request('get', '/captcha');
|
|
19
|
-
/**
|
|
20
|
-
* @description: 登录系统
|
|
21
|
-
* @param {*} 用户和秘钥
|
|
22
|
-
*/
|
|
23
|
-
export const getLogin = (data: object) => http.post(`${getBaseURL()}/uath/login`, data);
|
|
24
|
-
// 系统初始化
|
|
25
|
-
export const initSystemInfo = () => http.get(`${getBaseURL()}/uums/roleMenu`);
|
|
26
|
-
// 查询值集
|
|
27
|
-
export const initDict = () => http.get(`${getBaseURL()}/upfm/v1/lov/selectAll`);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @description: 登出系统
|
|
31
|
-
* @param {*} 用户
|
|
32
|
-
*/
|
|
33
|
-
export const loginoutVms = (data?: object) => http.post(`${getBaseURL()}/public/logout`, data);
|
|
34
|
-
/**
|
|
35
|
-
* @description: 获取异步菜单
|
|
36
|
-
* @param {*} 用户名
|
|
37
|
-
*/
|
|
38
|
-
export const getAsyncRoutes = (data: object) => http.get(`${getBaseURL()}/uums/roleMenu/userMenu`, data);
|
|
39
|
-
/**
|
|
40
|
-
* @description: 刷新token
|
|
41
|
-
* @param {object} data
|
|
42
|
-
* @return {*}
|
|
43
|
-
*/
|
|
44
|
-
export const refreshToken = (data: object) => {
|
|
45
|
-
return http.request('post', '/refreshToken', { data });
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 用户监控
|
|
50
|
-
* @param username 用户名
|
|
51
|
-
* @returns
|
|
52
|
-
*/
|
|
53
|
-
export const userMonitor = username => {
|
|
54
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
55
|
-
const { browser, browserVersion } = getBrower(userAgent);
|
|
56
|
-
const data = {
|
|
57
|
-
userName: username,
|
|
58
|
-
loginTime: toDateString(new Date()),
|
|
59
|
-
browser,
|
|
60
|
-
browserVersion,
|
|
61
|
-
operatingSystem: getPlatform(userAgent)
|
|
62
|
-
};
|
|
63
|
-
return http.request('post', `${getBaseURL()}/upfm/v1/userMonitor`, data);
|
|
64
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-17 16:02:30
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2026-01-23 18:21:36
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
import { http } from '@utogether/utils';
|
|
9
|
+
import { toDateString } from 'xe-utils';
|
|
10
|
+
// import { http } from '../utils/udp/http';
|
|
11
|
+
import { getBaseURL } from './';
|
|
12
|
+
|
|
13
|
+
import { getPlatform, getBrower } from '../utils/browers';
|
|
14
|
+
|
|
15
|
+
// 私钥
|
|
16
|
+
export const getPublicKey = () => http.get(`${getBaseURL()}/public/request`);
|
|
17
|
+
// 获取验证码
|
|
18
|
+
export const getVerify = () => http.request('get', '/captcha');
|
|
19
|
+
/**
|
|
20
|
+
* @description: 登录系统
|
|
21
|
+
* @param {*} 用户和秘钥
|
|
22
|
+
*/
|
|
23
|
+
export const getLogin = (data: object) => http.post(`${getBaseURL()}/uath/login`, data);
|
|
24
|
+
// 系统初始化
|
|
25
|
+
export const initSystemInfo = () => http.get(`${getBaseURL()}/uums/roleMenu`);
|
|
26
|
+
// 查询值集
|
|
27
|
+
export const initDict = () => http.get(`${getBaseURL()}/upfm/v1/lov/selectAll`);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @description: 登出系统
|
|
31
|
+
* @param {*} 用户
|
|
32
|
+
*/
|
|
33
|
+
export const loginoutVms = (data?: object) => http.post(`${getBaseURL()}/public/logout`, data);
|
|
34
|
+
/**
|
|
35
|
+
* @description: 获取异步菜单
|
|
36
|
+
* @param {*} 用户名
|
|
37
|
+
*/
|
|
38
|
+
export const getAsyncRoutes = (data: object) => http.get(`${getBaseURL()}/uums/roleMenu/userMenu`, data);
|
|
39
|
+
/**
|
|
40
|
+
* @description: 刷新token
|
|
41
|
+
* @param {object} data
|
|
42
|
+
* @return {*}
|
|
43
|
+
*/
|
|
44
|
+
export const refreshToken = (data: object) => {
|
|
45
|
+
return http.request('post', '/refreshToken', { data });
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 用户监控
|
|
50
|
+
* @param username 用户名
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
export const userMonitor = username => {
|
|
54
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
55
|
+
const { browser, browserVersion } = getBrower(userAgent);
|
|
56
|
+
const data = {
|
|
57
|
+
userName: username,
|
|
58
|
+
loginTime: toDateString(new Date()),
|
|
59
|
+
browser,
|
|
60
|
+
browserVersion,
|
|
61
|
+
operatingSystem: getPlatform(userAgent)
|
|
62
|
+
};
|
|
63
|
+
return http.request('post', `${getBaseURL()}/upfm/v1/userMonitor`, data);
|
|
64
|
+
};
|