@utogether/udp-core 1.0.1-beta.1 → 1.0.1-beta.10

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.
Files changed (140) hide show
  1. package/build/plugins.ts +39 -32
  2. package/dist/{403-Dp617CWX.js → 403-Ctxjn4q8.js} +1 -1
  3. package/dist/{404-Cz_Axb6Y.js → 404-W5yzyiZ9.js} +1 -1
  4. package/dist/{500-BGCtRNse.js → 500-DXuGEOm4.js} +1 -1
  5. package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-C2tflCt8.js} +1 -1
  6. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-SVgy3HX7.js +100 -0
  7. package/dist/{Company-IV3GTnzY.js → Company-PLez5GoH.js} +3 -3
  8. package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-CIGaQooL.js} +16 -16
  9. package/dist/{Department-B3W-OxW8.js → Department-B9wLsXFm.js} +3 -3
  10. package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-DSM4lTaz.js} +1 -1
  11. package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-B6a9wW_A.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-DtHfoDQk.js} +24 -26
  13. package/dist/DictView-DhFbQxdJ.js +110 -0
  14. package/dist/InvOrganization-D90AbR3b.js +66 -0
  15. package/dist/Org-DxBkYabD.js +39 -0
  16. package/dist/{Preview-BlDMmpdR.js → Preview-BFtRpBxw.js} +1 -1
  17. package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-BIa2QryC.js} +1 -1
  18. package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-CnyjI-WD.js} +43 -43
  19. package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-BiK7yEhV.js} +1 -1
  20. package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-C2rqdFTm.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-Ba9HLnXQ.js} +1 -1
  22. package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-DdkLscP3.js} +28 -28
  23. package/dist/{Role-_q3lQ8CZ.js → Role-BrsxgK8D.js} +6 -6
  24. package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DiqwJqDa.js} +8 -8
  25. package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-BDusGyo7.js} +1 -1
  26. package/dist/{RolePanel-BQb1LlhD.js → RolePanel-Dqx5dI3f.js} +1 -1
  27. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-2Z1q_5uW.js +132 -0
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-B5lUnaMI.js} +44 -38
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-vSP23fEq.js} +21 -21
  30. package/dist/{Staff-BSf9Ypbk.js → Staff-Cwi9LQiZ.js} +3 -3
  31. package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-XjVtyaMv.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-wSrAuyet.js} +11 -11
  33. package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-C-wYcFdv.js} +1 -1
  34. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-BhiJ0Q-Q.js → StaffPanel.vue_vue_type_script_setup_true_lang-DZNArmnC.js} +2 -2
  35. package/dist/{SysUser-FAABuNti.js → SysUser-O4tvr-Ur.js} +2 -2
  36. package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-B853docZ.js} +1 -1
  37. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-DhiYYC97.js +294 -0
  38. package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-CXR6mrXr.js} +26 -26
  39. package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BkP8pE2a.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-D4r_umjV.js} +39 -37
  41. package/dist/{childView-C_HmDQNd.js → childView-D0HwbgDT.js} +1 -1
  42. package/dist/{childView-uUlBcTza.js → childView-TRqUkSDC.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-BzISq0Jf.js} +40 -40
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-DQRgNsJY.js} +1 -1
  45. package/dist/{code-rule-AgCVDKFy.js → code-rule-BV7PQWhK.js} +9 -10
  46. package/dist/core.es.js +14 -11
  47. package/dist/{cron-task-C6FgQxTi.js → cron-task-9ZS9bi7K.js} +1 -1
  48. package/dist/{frameView-BDgISK7N.js → frameView-DE83AN50.js} +1 -1
  49. package/dist/img/l_img.svg +1 -1
  50. package/dist/img/minicolors.png +0 -0
  51. package/dist/img/v_img.svg +1 -1
  52. package/dist/index-DVARtten.js +2623 -0
  53. package/dist/{layoutView-yb3DV2DQ.js → layoutView-D1U-c4By.js} +111 -110
  54. package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
  55. package/dist/{login-RRpljbkm.js → login-sPCEiTGT.js} +106 -113
  56. package/dist/{lov-view-C9-rjzZR.js → lov-view-76NcYTYl.js} +2 -2
  57. package/dist/{menuInfo-CzPQyFhp.js → menuInfo-CxjfjFpm.js} +1 -1
  58. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-C2qahH3r.js} +100 -97
  59. package/dist/{pda-app-Dvy3U-b6.js → pda-app-BUH16bLj.js} +211 -197
  60. package/dist/{resource-Fy0lFkSV.js → resource-CCuHzoA6.js} +15 -15
  61. package/dist/{su-welcome-DYvSCUST.js → su-welcome-mRArONsd.js} +109 -110
  62. package/dist/{sys-config-DJ1vNQTy.js → sys-config-Cvt05yF6.js} +7 -7
  63. package/dist/udp-core.css +2 -2
  64. package/dist/{utogether-CjmJiHoE.js → utogether-Dm_VBQHR.js} +1 -1
  65. package/index.ts +40 -36
  66. package/package.json +1 -1
  67. package/src/App.vue +65 -70
  68. package/src/api/index.ts +1 -1
  69. package/src/components/SuCharts/src/UserInfo.vue +78 -78
  70. package/src/components/SuScrollTree/ScrollPanel.vue +3 -3
  71. package/src/components/udp/count-down.vue +536 -0
  72. package/src/components/udp/flip-down/FlipCard/flip-card.vue +251 -0
  73. package/src/components/udp/flip-down/FlipCard/interfaces.ts +4 -0
  74. package/src/components/udp/flip-down/FlipClock/flip-clock.vue +113 -0
  75. package/src/components/udp/form-upload.vue +414 -64
  76. package/src/components/udp/form.vue +112 -0
  77. package/src/components/udp/grid.vue +495 -0
  78. package/src/components/udp/index.ts +10 -4
  79. package/src/components/udp/lov.vue +388 -0
  80. package/src/components/udp/modal-form.vue +11 -2
  81. package/src/components/udp/modal-grid.vue +288 -0
  82. package/src/components/udp/upload.vue +423 -0
  83. package/src/components/udp/utils.ts +447 -40
  84. package/src/directives/permission/index.ts +1 -1
  85. package/src/layout/components/lay-navbar/index.vue +1 -1
  86. package/src/layout/components/lay-panel/index.vue +150 -150
  87. package/src/layout/components/lay-search/index.vue +25 -25
  88. package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
  89. package/src/layout/components/lay-tag/index.vue +625 -625
  90. package/src/layout/layoutView.vue +215 -215
  91. package/src/main.ts +23 -13
  92. package/src/plugins/i18n/en.ts +302 -289
  93. package/src/plugins/i18n/zh.ts +348 -337
  94. package/src/plugins/vxe-table/index.ts +53 -46
  95. package/src/plugins/vxe-table/render.tsx +956 -817
  96. package/src/router/index.ts +187 -183
  97. package/src/router/modules/remaining.ts +58 -83
  98. package/src/style/button.scss +85 -78
  99. package/src/style/tailwind.css +1 -68
  100. package/src/style/vxetable.scss +44 -11
  101. package/src/utils/authority/index.ts +1 -1
  102. package/src/utils/{http → udp/http}/index.ts +8 -24
  103. package/src/utils/{http → udp/http}/types.d.ts +8 -5
  104. package/src/utils/udp/useRender.ts +17 -6
  105. package/src/views/login/login-view.vue +2 -2
  106. package/src/views/organization/company/CompanyPanel.vue +259 -259
  107. package/src/views/organization/inv-org/InvOrganization.vue +2 -3
  108. package/src/views/organization/org/Org.vue +9 -5
  109. package/src/views/system/menu/SystemMenu.vue +183 -197
  110. package/src/views/system/menu/menuInfo.vue +363 -371
  111. package/src/views/system/role/AuthorityInfo.vue +19 -15
  112. package/src/views/system/role/Role.vue +1 -5
  113. package/src/views/system/role/RolePanel.vue +11 -2
  114. package/src/views/system/role/UserInfo.vue +195 -193
  115. package/src/views/system/role-assign/RoleAssign.vue +57 -57
  116. package/src/views/system/role-assign/RolePanel.vue +139 -136
  117. package/src/views/system/sys/sys-config.vue +1 -1
  118. package/src/views/system/sysUser/SysUserPanel.vue +278 -278
  119. package/src/views/uapp/pda/pda-app.vue +208 -176
  120. package/src/views/udev/dict/DictView.vue +118 -106
  121. package/src/views/udev/dict/childView.vue +7 -7
  122. package/src/views/udev/lov/lov-view.vue +91 -91
  123. package/src/views/ufile/aggregation/File.vue +5 -5
  124. package/src/views/ufile/file/water-mark.vue +14 -14
  125. package/src/views/uhome/su-welcome.vue +3 -3
  126. package/src/views/ulogin/login.vue +14 -9
  127. package/src/views/upms/user/login-log.vue +1 -1
  128. package/src/views/urpt/design/DesignPanel.vue +507 -526
  129. package/src/views/urpt/design/ReportDesign.vue +15 -19
  130. package/src/views/urpt/static-resource/resource.vue +3 -3
  131. package/src/views/urpt/template/ReportTemplate.vue +7 -7
  132. package/types/global.d.ts +2 -1
  133. package/vite.config.ts +6 -2
  134. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js +0 -102
  135. package/dist/DictView-C-i7e4hZ.js +0 -95
  136. package/dist/InvOrganization-cfT6riGU.js +0 -260
  137. package/dist/Org-CA7vTDIF.js +0 -35
  138. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js +0 -126
  139. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js +0 -288
  140. package/dist/index-DzOzUkf6.js +0 -3388
@@ -1,78 +1,85 @@
1
- .vxe-button.size--mini.type--button {
2
- height: 25px;
3
- }
4
-
5
- .vxe-button.size--small.type--button {
6
- height: 25px;
7
- }
8
-
9
- .vxe-button.type--button.theme--u-cyan,
10
- .vxe-button.type--button.theme--u-cyan:hover {
11
- color: #fff;
12
- }
13
-
14
- .vxe-button.type--button.theme--u-cyan {
15
- background-color: #1cbbb4;
16
- }
17
-
18
- .vxe-button.type--button.theme--u-cyan:active {
19
- background-color: #39b54a;
20
- }
21
-
22
- // 禁用状态
23
- .vxe-button.type--button.theme--u-cyan.is--disabled {
24
- background-color: #69e4de;
25
- border-color: #69e4de;
26
- }
27
-
28
- .vxe-button.type--button.theme--u-color-shallow,
29
- .vxe-button.type--button.theme--u-color-shallow:hover {
30
- color: #fff;
31
- }
32
-
33
- .vxe-button.type--button.theme--u-color-shallow {
34
- background-color: #fbbd08;
35
- }
36
-
37
- .vxe-button.type--button.theme--u-color-shallow:active {
38
- background-color: #fff;
39
- }
40
-
41
- .layout-theme-default .vxe-button.type--button.theme--u-cyan:not(.is--disabled):hover {
42
- background-color: #40e0d0;
43
- border-color: #40e0d0;
44
- }
45
-
46
- .vxe-button.type--button:not(.is--disabled):hover {
47
- color: #fff !important;
48
-
49
- .vxe-button--icon {
50
- color: #4169e1;
51
- }
52
- }
53
-
54
- .u-color-royalBlue {
55
- color: #4169e1;
56
- }
57
-
58
- .u-color-turquoise {
59
- color: #40e0d0;
60
- }
61
-
62
- .el-dropdown {
63
- .el-dropdown__caret-button {
64
- margin-left: 0;
65
- border-top-left-radius: 0;
66
- border-bottom-left-radius: 0;
67
- }
68
-
69
- .el-button-group + .el-button {
70
- border-top-right-radius: 0 !important;
71
- border-bottom-right-radius: 0 !important;
72
- }
73
-
74
- .el-button:first-child {
75
- border-top-right-radius: 0 !important;
76
- border-bottom-right-radius: 0 !important;
77
- }
78
- }
1
+ .vxe-button.size--mini.type--button {
2
+ height: 25px;
3
+ }
4
+
5
+ .vxe-button.size--small.type--button {
6
+ height: 25px;
7
+ }
8
+
9
+ .vxe-button.type--button.theme--u-cyan,
10
+ .vxe-button.type--button.theme--u-cyan:hover {
11
+ color: #fff;
12
+ }
13
+
14
+ .vxe-button.type--button.theme--u-cyan {
15
+ background-color: #1cbbb4;
16
+ }
17
+
18
+ .vxe-button.type--button.theme--u-cyan:active {
19
+ background-color: #39b54a;
20
+ }
21
+
22
+ // 禁用状态
23
+ .vxe-button.type--button.theme--u-cyan.is--disabled {
24
+ background-color: #69e4de;
25
+ border-color: #69e4de;
26
+ }
27
+
28
+ .vxe-button.type--button.theme--u-color-shallow,
29
+ .vxe-button.type--button.theme--u-color-shallow:hover {
30
+ color: #fff;
31
+ }
32
+
33
+ .vxe-button.type--button.theme--u-color-shallow {
34
+ background-color: #fbbd08;
35
+ }
36
+
37
+ .vxe-button.type--button.theme--u-color-shallow:active {
38
+ background-color: #fff;
39
+ }
40
+
41
+ .layout-theme-default .vxe-button.type--button.theme--u-cyan:not(.is--disabled):hover {
42
+ background-color: #40e0d0;
43
+ border-color: #40e0d0;
44
+ }
45
+
46
+ .vxe-button.type--button:not(.is--disabled):hover {
47
+ color: #fff;
48
+
49
+ .vxe-button--icon,
50
+ .vxe-button--item {
51
+ color: inherit;
52
+ }
53
+ }
54
+
55
+ .vxe-button[name='favorite'].type--button:not(.is--disabled):hover {
56
+ .vxe-button--item {
57
+ color: var(--udp-theme-vxeColor);
58
+ }
59
+ }
60
+
61
+ .u-color-royalBlue {
62
+ color: #4169e1;
63
+ }
64
+
65
+ .u-color-turquoise {
66
+ color: #40e0d0;
67
+ }
68
+
69
+ .el-dropdown {
70
+ .el-dropdown__caret-button {
71
+ margin-left: 0;
72
+ border-top-left-radius: 0;
73
+ border-bottom-left-radius: 0;
74
+ }
75
+
76
+ .el-button-group + .el-button {
77
+ border-top-right-radius: 0 !important;
78
+ border-bottom-right-radius: 0 !important;
79
+ }
80
+
81
+ .el-button:first-child {
82
+ border-top-right-radius: 0 !important;
83
+ border-bottom-right-radius: 0 !important;
84
+ }
85
+ }
@@ -1,68 +1 @@
1
- /* @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- @layer components {
6
- .flex-c {
7
- @apply flex justify-center items-center;
8
- }
9
-
10
- .flex-ac {
11
- @apply flex justify-around items-center;
12
- }
13
-
14
- .flex-bc {
15
- @apply flex justify-between items-center;
16
- }
17
-
18
- .navbar-bg-hover {
19
- @apply dark:text-white dark:hover:!bg-[#242424];
20
- }
21
- } */
22
-
23
- @layer theme, base, components, utilities;
24
- @import 'tailwindcss/theme.css' layer(theme);
25
- @import 'tailwindcss/utilities.css' layer(utilities);
26
-
27
- @custom-variant dark (&:is(.dark *));
28
-
29
- @theme {
30
- --color-bg_color: var(--el-bg-color);
31
- --color-primary: var(--el-color-primary);
32
- --color-text_color_primary: var(--el-text-color-primary);
33
- --color-text_color_regular: var(--el-text-color-regular);
34
- }
35
-
36
- /*
37
- The default border color has changed to `currentColor` in Tailwind CSS v4,
38
- so we've added these compatibility styles to make sure everything still
39
- looks the same as it did with Tailwind CSS v3.
40
-
41
- If we ever want to remove these styles, we need to add an explicit border
42
- color utility to any element that depends on these defaults.
43
- */
44
- @layer base {
45
- *,
46
- ::after,
47
- ::before,
48
- ::backdrop,
49
- ::file-selector-button {
50
- border-color: var(--color-gray-200, currentColor);
51
- }
52
- }
53
-
54
- @utility flex-c {
55
- @apply flex justify-center items-center;
56
- }
57
-
58
- @utility flex-ac {
59
- @apply flex justify-around items-center;
60
- }
61
-
62
- @utility flex-bc {
63
- @apply flex justify-between items-center;
64
- }
65
-
66
- @utility navbar-bg-hover {
67
- @apply dark:text-white dark:hover:bg-[#242424]!;
68
- }
1
+ @import 'tailwindcss';
@@ -10,6 +10,7 @@ html[data-vxe-ui-theme='light'] {
10
10
  --vxe-ui-input-disabled-background-color: #fafafa;
11
11
  --el-disabled-bg-color: #fafafa;
12
12
  --vxe-ui-button-height-mini: 24px;
13
+ --vxe-ui-table-row-current-background-color: #00b789;
13
14
  }
14
15
 
15
16
  /** 重写table的背景 */
@@ -32,7 +33,21 @@ html[data-vxe-ui-theme='light'] {
32
33
 
33
34
  /** 必填录入框颜色 */
34
35
  .vxe-form--item.is--required {
35
- .vxe-input > .vxe-input--inner:not(:disabled) {
36
+ .vxe-input > .vxe-input--wrapper > .vxe-input--inner:not(:disabled) {
37
+ background-color: #fffbdf;
38
+ }
39
+
40
+ .vxe-input:not(.is--disabled) > .vxe-input--wrapper {
41
+ .vxe-input--control-icon {
42
+ background-color: #fffbdf;
43
+ }
44
+ }
45
+
46
+ .vxe-input--suffix {
47
+ background-color: #fffbdf;
48
+ }
49
+
50
+ .el-select__wrapper:not(:disabled) {
36
51
  background-color: #fffbdf;
37
52
  }
38
53
 
@@ -123,9 +138,9 @@ html[data-vxe-ui-theme='light'] {
123
138
 
124
139
  /************* button *******************/
125
140
 
126
- .vxe-button + .vxe-button:not(.type--text) {
127
- margin-left: 6px;
128
- }
141
+ // .vxe-button + .vxe-button:not(.type--text) {
142
+ // margin-left: 6px;
143
+ // }
129
144
 
130
145
  .vxe-button {
131
146
  padding: 0 0.5em !important;
@@ -148,6 +163,23 @@ html[data-vxe-ui-theme='light'] {
148
163
  .vxe-form--item-trigger-node {
149
164
  min-width: 60px;
150
165
  }
166
+
167
+ // 表单分组标题
168
+ .vxe-form--group-title {
169
+ border-bottom: 1px solid #eee;
170
+
171
+ .vxe-form--item-title-content {
172
+ font-size: 13px;
173
+ }
174
+ }
175
+
176
+ .vxe-form--group-title::before {
177
+ position: relative;
178
+ top: 2px;
179
+ padding-right: 5px;
180
+ color: var(--udp-theme-project-text);
181
+ content: '▉';
182
+ }
151
183
  }
152
184
 
153
185
  .vxe-form.size--mini .vxe-form--item-inner {
@@ -182,8 +214,6 @@ html[data-vxe-ui-theme='light'] {
182
214
  // 点击高亮
183
215
  .vxe-table--render-default {
184
216
  .vxe-body--row.row--current {
185
- background-color: #00b789;
186
-
187
217
  .vxe-cell--label {
188
218
  font-weight: bold;
189
219
  color: #fff;
@@ -197,6 +227,11 @@ html[data-vxe-ui-theme='light'] {
197
227
  .col--checkbox {
198
228
  background: #fff !important;
199
229
  }
230
+
231
+ .vxe-body--column {
232
+ font-weight: bold;
233
+ color: #fff;
234
+ }
200
235
  }
201
236
  }
202
237
 
@@ -218,11 +253,9 @@ html[data-vxe-ui-theme='light'] {
218
253
  }
219
254
 
220
255
  .vxe-table--header-wrapper {
221
- .vxe-checkbox--icon {
222
- color: #fff !important;
223
-
224
- // color: #8347d7 !important;
225
- }
256
+ // .vxe-checkbox--icon {
257
+ // // color: #fff !important;
258
+ // }
226
259
 
227
260
  .vxe-icon-checkbox-checked,
228
261
  .vxe-icon-checkbox-indeterminate {
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { usePermissionStoreHook } from '../../store/modules/permission';
9
9
  import { isArray } from 'xe-utils';
10
- import router from '../../router';
10
+ import { router } from '../../router';
11
11
  const hasAuthority = auth => {
12
12
  if (!auth) return true;
13
13
  const permissionCode = router.currentRoute.value.meta?.permissionCode;
@@ -1,8 +1,9 @@
1
1
  import Axios, { type AxiosInstance, type AxiosRequestConfig } from 'axios';
2
2
  import type { SuHttpError, RequestMethods, SuHttpResponse, SuHttpRequestConfig } from './types.d';
3
- import { has } from 'xe-utils';
4
- import { NProgress, cookies, errorMessage } from '@utogether/utils';
3
+
4
+ import { errorMessage, cookies, NProgress } from '@utogether/utils';
5
5
  import { isRef } from 'vue';
6
+ import { has } from 'xe-utils';
6
7
 
7
8
  const kTOKENKEY = 'authorized-token';
8
9
  const defaultConfig: AxiosRequestConfig = {
@@ -18,8 +19,8 @@ class SuHttp {
18
19
  this.httpInterceptorsRequest();
19
20
  this.httpInterceptorsResponse();
20
21
  }
22
+ router = undefined;
21
23
  baseUrl = null;
22
- router = null;
23
24
  /** token过期后,暂存待执行的请求 */
24
25
  private static requests = [];
25
26
 
@@ -81,8 +82,7 @@ class SuHttp {
81
82
  if (!SuHttp.isRefreshing) {
82
83
  SuHttp.isRefreshing = true;
83
84
  // requests.push(() => SuHttp.axiosInstance(config));
84
-
85
- this.get(this.baseUrl + '/uath/refreshToken', {
85
+ this.get((this.baseUrl || '') + '/uath/refreshToken', {
86
86
  refreshToken: data.refreshToken
87
87
  })
88
88
  .then((res: any) => {
@@ -153,12 +153,12 @@ class SuHttp {
153
153
  return response.data;
154
154
  },
155
155
  (error: SuHttpError) => {
156
+ const $error = error;
156
157
  // @ts-ignore
157
- if (has(error.config, 'loading') && isRef(error.config.loading)) {
158
+ if (has(error.config, 'loading') && isRef(error?.config?.loading)) {
158
159
  // @ts-ignore
159
160
  error.config.loading.value = false;
160
161
  }
161
- const $error = error;
162
162
  $error.isCancelRequest = Axios.isCancel($error);
163
163
  // 关闭进度条动画
164
164
  NProgress.done();
@@ -210,27 +210,11 @@ class SuHttp {
210
210
  } else {
211
211
  const msg = res?.msg || '服务异常';
212
212
  errorMessage(msg, { duration: 8000 });
213
- // const code = res.code;
214
- // if (
215
- // code === "000001" ||
216
- // (code === "-1" && msg.includes("请重新登陆"))
217
- // ) {
218
- // // session过期
219
- // cookies.remove("kCookies_token");
220
- // // @ts-ignore
221
- // this.router?.push({
222
- // path: "/login",
223
- // query: { tokenExpire: "Y" },
224
- // });
225
- // }
226
213
  reject(msg);
227
214
  }
228
215
  })
229
216
  .catch(e => {
230
- debugger;
231
- if (e?.response?.data?.path === '/refreshToken') {
232
- this.router?.push('/login');
233
- } else if (e?.code) {
217
+ if (e?.code) {
234
218
  if (e?.response?.status === 401) {
235
219
  // @ts-ignore
236
220
  return this.router?.push({ path: '/login' });
@@ -2,10 +2,10 @@
2
2
  * @Author: wei.li
3
3
  * @Date: 2022-03-08 15:17:39
4
4
  * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2023-12-01 11:59:12
5
+ * @LastEditTime: 2023-12-01 13:55:46
6
6
  * @Description: SuHttp Axios 类型定义文件
7
7
  */
8
- import type { Method, AxiosError, AxiosResponse, AxiosRequestConfig } from 'axios';
8
+ import { Method, AxiosError, AxiosResponse, AxiosRequestConfig } from "axios";
9
9
 
10
10
  export type resultType = {
11
11
  access_token: string;
@@ -15,12 +15,11 @@ export type resultType = {
15
15
 
16
16
  export type RequestMethods = Extract<
17
17
  Method,
18
- 'get' | 'post' | 'put' | 'delete' | 'patch' | 'option' | 'head'
18
+ "get" | "post" | "put" | "delete" | "patch" | "option" | "head"
19
19
  >;
20
20
 
21
21
  export interface SuHttpError extends AxiosError {
22
22
  isCancelRequest?: boolean;
23
- loading?: boolean;
24
23
  }
25
24
 
26
25
  export interface SuHttpResponse extends AxiosResponse {
@@ -41,6 +40,10 @@ export default class SuHttp {
41
40
  axiosConfig?: SuHttpRequestConfig
42
41
  ): Promise<T>;
43
42
  post<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
44
- postRouter<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
43
+ postRouter<T, P>(
44
+ url: string,
45
+ params?: T,
46
+ config?: SuHttpRequestConfig
47
+ ): Promise<P>;
45
48
  get<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
46
49
  }
@@ -2,7 +2,7 @@
2
2
  * @Author: wei.li
3
3
  * @Date: 2021-11-29 18:18:00
4
4
  * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-04-18 11:09:01
5
+ * @LastEditTime: 2025-08-16 18:28:08
6
6
  * @Description: file content
7
7
  */
8
8
 
@@ -243,10 +243,7 @@ export const useRender = () => {
243
243
  */
244
244
  const renderNumber = (attrs?, methods?) => {
245
245
  const events = getEvents(methods);
246
- const props = Object.assign(
247
- { type: 'number', clearable: true, min: 0, controls: false },
248
- attrs || {}
249
- );
246
+ const props = Object.assign({ type: 'number', clearable: true, min: 0, controls: false }, attrs || {});
250
247
 
251
248
  return {
252
249
  name: 'VxeInput',
@@ -375,6 +372,19 @@ export const useRender = () => {
375
372
  return { name: '#treeSelect', sourceData, props, events };
376
373
  };
377
374
 
375
+ const renderUpload = (props?, events?) => {
376
+ // 单个模式下,限制只能单个上传
377
+ props = props || {};
378
+ const { singleMode, mode } = props;
379
+ if (singleMode) {
380
+ Object.assign(props, { multiple: false, limitCount: 1, autoHiddenButton: true });
381
+ }
382
+ if (!mode || mode === 'image') {
383
+ props.imageTypes = ['jpg', 'jpeg', 'png', 'gif', 'apk'];
384
+ }
385
+ return { name: '#upload', props, events };
386
+ };
387
+
378
388
  const getEvents = (methods: IEvents | Fn) => {
379
389
  let events: any = {};
380
390
  if (isObject(methods) && !isFunction(methods)) {
@@ -415,6 +425,7 @@ export const useRender = () => {
415
425
  renderCellTag,
416
426
  renderEnabled,
417
427
  renderIconSelect,
418
- renderTreeSelect
428
+ renderTreeSelect,
429
+ renderUpload
419
430
  };
420
431
  };
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="select-none">
3
- <div class="absolute flex-c right-5 top-3">
3
+ <div class="absolute flex justify-center items-center right-5 top-3">
4
4
  <!-- 主题 -->
5
5
  <!-- <el-switch
6
6
  v-model="dataTheme"
@@ -229,7 +229,7 @@ const insertLoginInfo = username => {
229
229
  browserVersion,
230
230
  operatingSystem: getPlatform(userAgent)
231
231
  };
232
- serviceApi.post('/upms/v1/userMonitor', obj);
232
+ serviceApi.post('/upfm/v1/userMonitor', obj);
233
233
  };
234
234
 
235
235
  /** 使用公共函数,避免`removeEventListener`失效 */