@utogether/udp-core 1.0.1-beta.4 → 1.0.1-beta.5

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 (86) hide show
  1. package/build/plugins.ts +39 -37
  2. package/dist/{403-CT4J-t-o.js → 403-CP2RkkAy.js} +10 -10
  3. package/dist/{404-BAudfnaK.js → 404-DwK-0wNQ.js} +4 -4
  4. package/dist/{500-BlOGtpEE.js → 500-CLbJDqnd.js} +1 -1
  5. package/dist/{AuthorityInfo-Bl03tEhF.js → AuthorityInfo-Bi1_uhMu.js} +1 -1
  6. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-CUwS2F3R.js → AuthorityInfo.vue_vue_type_style_index_0_lang-RUhvzu76.js} +8 -9
  7. package/dist/{Company-CIj9XgQn.js → Company-B--cokc6.js} +3 -3
  8. package/dist/{CompanyPanel-CublK5NN.js → CompanyPanel-B_gmcZ9L.js} +6 -6
  9. package/dist/{Department-BolPW-W3.js → Department-DbKdyNzK.js} +3 -3
  10. package/dist/{DepartmentPanel-BttxSHfM.js → DepartmentPanel-BmEttboJ.js} +23 -24
  11. package/dist/{DesignPanel-BwCbn92O.js → DesignPanel-LL68_36s.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-y2AnCTg6.js → DesignPanel.vue_vue_type_style_index_0_lang-DWPmFegv.js} +8 -9
  13. package/dist/{DictView-D85ziNV2.js → DictView-B8j-EWx5.js} +1 -1
  14. package/dist/{InvOrganization-CaAk_f7F.js → InvOrganization-DnGQlESM.js} +7 -8
  15. package/dist/Org-Dg9Xkd34.js +34 -0
  16. package/dist/{Preview-DMGbhV6q.js → Preview-yot4NBW5.js} +1 -1
  17. package/dist/{ReportDefine-DogZwa8T.js → ReportDefine-DHadqNYy.js} +1 -1
  18. package/dist/{ReportDesign-CdSsJJeA.js → ReportDesign-CBihGRth.js} +23 -24
  19. package/dist/{ReportQuery-DPvKqeUm.js → ReportQuery-CwHQ6LUU.js} +1 -1
  20. package/dist/{ReportQueryFrom-UokkfBx_.js → ReportQueryFrom-ie6lQcGL.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-BlOoThY7.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-B8LJNK0m.js} +1 -1
  22. package/dist/{ReportTemplate-DCnmllXW.js → ReportTemplate-B2Smwo-z.js} +18 -18
  23. package/dist/{Role-sfmwLiNM.js → Role-Cf7DB7uS.js} +3 -3
  24. package/dist/{RoleAssign-WRk90VO2.js → RoleAssign-upUnqs_i.js} +3 -3
  25. package/dist/{RolePanel-iWysS02n.js → RolePanel-BBGDGK8V.js} +1 -1
  26. package/dist/{RolePanel-DhP0_5ur.js → RolePanel-EXL_FLvM.js} +1 -1
  27. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CYXqW-d4.js → RolePanel.vue_vue_type_script_setup_true_lang-BwfL_JVZ.js} +8 -9
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-_hVY31HC.js → RolePanel.vue_vue_type_script_setup_true_lang-DF8qJKwW.js} +9 -9
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-BozDFES-.js → ScrollPanel.vue_vue_type_style_index_0_lang-DbBGg32H.js} +13 -13
  30. package/dist/{Staff-Bha-Ijax.js → Staff-DYu5ZEyR.js} +3 -3
  31. package/dist/{StaffInfo-CbfYI8UW.js → StaffInfo-CHvNGjtz.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-Ce-MUVYH.js → StaffInfo.vue_vue_type_script_setup_true_lang-XRJVEJ-s.js} +14 -14
  33. package/dist/{StaffPanel-B8094e97.js → StaffPanel-C-ygEY65.js} +1 -1
  34. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-_kJIBCtx.js → StaffPanel.vue_vue_type_script_setup_true_lang-BvLrF4Yw.js} +6 -6
  35. package/dist/{SysUser-D1J9vPnb.js → SysUser-BHk_szpK.js} +2 -2
  36. package/dist/{SysUserPanel-DGDPKKoY.js → SysUserPanel-DFvzA5d-.js} +1 -1
  37. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-D-5-zKn6.js → SysUserPanel.vue_vue_type_script_setup_true_lang-B9zUXXwa.js} +24 -25
  38. package/dist/{SystemMenu-Dz8Pllh5.js → SystemMenu-5TK9ZA11.js} +34 -35
  39. package/dist/{UserInfo-ecAJA2Yg.js → UserInfo-Bx3zQqHa.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-4_-I_sQN.js → UserInfo.vue_vue_type_style_index_0_lang-C2sqUQdg.js} +12 -13
  41. package/dist/{childView-4uI_RT2m.js → childView-BSUWnii7.js} +1 -1
  42. package/dist/{childView-OXXoMFg3.js → childView-CFC3gA_U.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-DC-yx4Kv.js → childView.vue_vue_type_style_index_0_lang-EcT-Dux7.js} +48 -49
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-e43PUsUO.js → childView.vue_vue_type_style_index_0_lang-WQVLSJR8.js} +9 -10
  45. package/dist/{code-rule-B667R66s.js → code-rule-DybjhotB.js} +6 -8
  46. package/dist/core.es.js +2 -2
  47. package/dist/{cron-task-DcmGSr2D.js → cron-task-DGdknqaF.js} +7 -8
  48. package/dist/{frameView-BzgaLYjQ.js → frameView-BOOZRv1S.js} +1 -1
  49. package/dist/index-BDE4-ZvN.js +5091 -0
  50. package/dist/{layoutView-BBQB8pDc.js → layoutView-BWeDLY9C.js} +11 -12
  51. package/dist/{login-DIG7pRU7.js → login-BcuCHhGE.js} +21 -21
  52. package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
  53. package/dist/{lov-view-CSIPKZSY.js → lov-view-DDgzqYSW.js} +8 -9
  54. package/dist/{menuInfo-CPHjl7id.js → menuInfo-B3MOxomU.js} +1 -1
  55. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BXNiinTg.js → menuInfo.vue_vue_type_style_index_0_lang-BXMrNMUs.js} +15 -16
  56. package/dist/{pda-app-BLjbMcdt.js → pda-app-Dy9WMHEG.js} +19 -20
  57. package/dist/{resource-MxqaSJqB.js → resource-BoCP7-dM.js} +8 -8
  58. package/dist/{su-welcome-C0flTYCx.js → su-welcome-DXpI1MHr.js} +97 -98
  59. package/dist/{sys-config-CXzGs3Nl.js → sys-config-BiUWzxGU.js} +19 -20
  60. package/dist/udp-core.css +2 -2
  61. package/dist/{utogether-CFdIDuAT.js → utogether-DXDcsKt7.js} +1 -1
  62. package/package.json +1 -1
  63. package/src/App.vue +1 -1
  64. package/src/api/index.ts +1 -1
  65. package/src/components/udp/count-down.vue +536 -0
  66. package/src/components/udp/form.vue +107 -0
  67. package/src/components/udp/index.ts +4 -1
  68. package/src/components/udp/modal-form.vue +9 -0
  69. package/src/components/udp/upload.vue +425 -0
  70. package/src/components/udp/utils.ts +72 -3
  71. package/src/layout/components/lay-panel/index.vue +3 -3
  72. package/src/main.ts +21 -20
  73. package/src/style/vxetable.scss +24 -2
  74. package/src/utils/{http → udp/http}/index.ts +8 -24
  75. package/src/utils/{http → udp/http}/types.d.ts +8 -5
  76. package/src/views/login/login-view.vue +1 -1
  77. package/src/views/system/menu/menuInfo.vue +1 -1
  78. package/src/views/system/sys/sys-config.vue +1 -1
  79. package/src/views/udev/dict/childView.vue +6 -1
  80. package/src/views/uhome/su-welcome.vue +1 -1
  81. package/src/views/ulogin/login.vue +3 -2
  82. package/src/views/upms/user/login-log.vue +1 -1
  83. package/src/views/urpt/design/ReportDesign.vue +3 -3
  84. package/dist/Org-CreIihFE.js +0 -35
  85. package/dist/await-to-js.es5-BtRbN2QH.js +0 -10
  86. package/dist/index-CLliRySq.js +0 -2606
@@ -1,6 +1,6 @@
1
1
  import { computed as W, ref as L } from "vue";
2
2
  import { useGlobal as g, storageLocal as u, deviceDetection as H, cookies as C, storageSession as M } from "@utogether/utils";
3
- import { y as P, j as E, s as j, g as h, v as d, z as J, l as K, m as R, n as V, u as S, r as G, o as O, A as x, B as Z } from "./index-CLliRySq.js";
3
+ import { z as P, j as E, s as j, g as h, w as d, A as J, l as K, m as R, n as V, u as S, r as G, o as O, B as x, C as Z } from "./index-BDE4-ZvN.js";
4
4
  import { useI18n as f } from "vue-i18n";
5
5
  import { defineStore as v } from "pinia";
6
6
  function I() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@utogether/udp-core",
3
3
  "private": false,
4
- "version": "1.0.1-beta.4",
4
+ "version": "1.0.1-beta.5",
5
5
  "description": "",
6
6
  "type": "module",
7
7
  "main1": "index.ts",
package/src/App.vue CHANGED
@@ -6,7 +6,7 @@
6
6
  * @Description: file content
7
7
  -->
8
8
  <template>
9
- <el-config-provider size="small" :z-index="12000" :locale="currentLocale">
9
+ <el-config-provider size="small" :z-index="5555" :locale="currentLocale">
10
10
  <router-view />
11
11
  </el-config-provider>
12
12
  </template>
package/src/api/index.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * @Description: API封装
7
7
  */
8
8
  import { http } from '@utogether/utils';
9
+ // import { http } from '../utils/udp/http';
9
10
  import { getEnv } from '../config';
10
11
 
11
12
  // 路由相关服务
@@ -20,7 +21,6 @@ export const getServiceApi = () => {
20
21
 
21
22
  export const setRouter = router => {
22
23
  http.setRouter(router);
23
- console.log('====url', getBaseURL());
24
24
  // http.setBaseUrl(getBaseURL());
25
25
  };
26
26
 
@@ -0,0 +1,536 @@
1
+ <template>
2
+ <div class="flip-clock">
3
+ <template v-for="data in timeData" :key="data.label">
4
+ <span v-show="data.show" :id="data.elementId" class="flip-clock__piece">
5
+ <div v-if="flipAnimation">
6
+ <span
7
+ class="flip-clock__card flip-card"
8
+ :style="countdownSize ? `font-size:${countdownSize}` : ''"
9
+ >
10
+ <b class="flip-card__top">{{ twoDigits(data.current) }}</b>
11
+ <b class="flip-card__bottom" :data-value="twoDigits(data.current)" />
12
+ <b class="flip-card__back" :data-value="twoDigits(data.previous)" />
13
+ <b class="flip-card__back-bottom" :data-value="twoDigits(data.previous)" />
14
+ </span>
15
+ </div>
16
+ <div v-else>
17
+ <span class="no-animation__card">{{ twoDigits(data.current) }}</span>
18
+ </div>
19
+ <span
20
+ v-if="showLabels"
21
+ class="flip-clock__slot"
22
+ :style="labelSize ? `font-size:${labelSize}` : ''"
23
+ >{{ data.label }}</span
24
+ >
25
+ </span>
26
+ </template>
27
+ </div>
28
+ </template>
29
+
30
+ <script lang="ts">
31
+ export default {
32
+ name: 'SuCountdown'
33
+ };
34
+ </script>
35
+
36
+ <script setup lang="ts">
37
+ import { computed, onBeforeMount, onMounted, onUnmounted, ref, watch } from 'vue';
38
+ import dayjs from 'dayjs';
39
+
40
+ const props = defineProps({
41
+ countdown: {
42
+ type: Boolean,
43
+ default: false
44
+ },
45
+ deadline: {
46
+ type: String,
47
+ required: false,
48
+ default: dayjs().add(5, 'days').format('YYYY-MM-DD HH:mm:ss')
49
+ },
50
+ deadlineISO: {
51
+ type: String,
52
+ required: false
53
+ },
54
+ deadlineDate: {
55
+ type: Date,
56
+ required: false
57
+ },
58
+ countdownSize: {
59
+ type: String,
60
+ required: false
61
+ // default:"2.2rem"
62
+ },
63
+
64
+ labelSize: {
65
+ type: String,
66
+ required: false
67
+ // default:"2.2rem"
68
+ },
69
+ stop: {
70
+ type: Boolean,
71
+ required: false
72
+ },
73
+ flipAnimation: {
74
+ type: Boolean,
75
+ required: false,
76
+ default: true
77
+ },
78
+ showDays: {
79
+ type: Boolean,
80
+ required: false,
81
+ default: true
82
+ },
83
+ showHours: {
84
+ type: Boolean,
85
+ required: false,
86
+ default: true
87
+ },
88
+ showMinutes: {
89
+ type: Boolean,
90
+ required: false,
91
+ default: true
92
+ },
93
+ showSeconds: {
94
+ type: Boolean,
95
+ required: false,
96
+ default: true
97
+ },
98
+ showLabels: {
99
+ type: Boolean,
100
+ required: false,
101
+ default: true
102
+ },
103
+ labels: {
104
+ type: Object,
105
+ required: false,
106
+ default: function () {
107
+ return {
108
+ days: 'Days',
109
+ hours: 'Hours',
110
+ minutes: 'Minutes',
111
+ seconds: 'Seconds'
112
+ };
113
+ }
114
+ },
115
+ mainColor: {
116
+ type: String,
117
+ default: '#EC685C'
118
+ },
119
+ secondFlipColor: {
120
+ type: String,
121
+ default: props => props.mainColor
122
+ },
123
+ mainFlipBackgroundColor: {
124
+ type: String,
125
+ default: '#222222'
126
+ },
127
+ secondFlipBackgroundColor: {
128
+ type: String,
129
+ default: '#393939'
130
+ },
131
+ labelColor: {
132
+ type: String,
133
+ default: '#222222'
134
+ }
135
+ });
136
+
137
+ const now = ref(Math.trunc(new Date().getTime() / 1000));
138
+ const date = ref<number>(0);
139
+ const interval = ref();
140
+ const diff = ref(0);
141
+ const show = ref(false);
142
+ const timeData = ref([
143
+ {
144
+ current: 0,
145
+ previous: 0,
146
+ label: props.labels.days,
147
+ elementId: 'flip-card-days-' + Date.now(),
148
+ show: props.showDays
149
+ },
150
+ {
151
+ current: 0,
152
+ previous: 0,
153
+ label: props.labels.hours,
154
+ elementId: 'flip-card-hours-' + Date.now(),
155
+ show: props.showHours
156
+ },
157
+ {
158
+ current: 0,
159
+ previous: 0,
160
+ label: props.labels.minutes,
161
+ elementId: 'flip-card-minutes-' + Date.now(),
162
+ show: props.showMinutes
163
+ },
164
+ {
165
+ current: 0,
166
+ previous: 0,
167
+ label: props.labels.seconds,
168
+ elementId: 'flip-card-seconds-' + Date.now(),
169
+ show: props.showSeconds
170
+ }
171
+ ]);
172
+
173
+ const updateAllCards = () => {
174
+ updateTime(0, days);
175
+ updateTime(1, hours);
176
+ updateTime(2, minutes);
177
+ updateTime(3, seconds);
178
+ };
179
+
180
+ const twoDigits = value => {
181
+ if (value != undefined) {
182
+ if (value.toString().length <= 1) {
183
+ return '0' + value.toString();
184
+ }
185
+ return value.toString();
186
+ } else {
187
+ return '00';
188
+ }
189
+ };
190
+
191
+ const updateTime = (idx, newValue) => {
192
+ if (idx >= timeData.value.length || newValue === undefined) {
193
+ return;
194
+ }
195
+
196
+ // if (window['requestAnimationFrame']) {
197
+ // frame = requestAnimationFrame(updateTime.bind(this));
198
+ // }
199
+
200
+ const d = timeData.value[idx];
201
+ const val = newValue.value < 0 ? 0 : newValue.value;
202
+ const el = document.querySelector(`#${d.elementId}`);
203
+
204
+ if (val !== d.current) {
205
+ d.previous = d.current;
206
+ d.current = val;
207
+
208
+ if (el) {
209
+ el.classList.remove('flip');
210
+ // @ts-ignore
211
+ void el.offsetWidth;
212
+ el.classList.add('flip');
213
+ }
214
+
215
+ if (idx === 0) {
216
+ const els = el!.querySelectorAll('span b');
217
+ if (els) {
218
+ //@ts-ignore
219
+ for (const e of els) {
220
+ const cls = e.classList[0];
221
+ if (newValue.value / 1000 >= 1) {
222
+ if (!cls.includes('-4digits')) {
223
+ const newCls = cls + '-4digits';
224
+ e.classList.add(newCls);
225
+ e.classList.remove(cls);
226
+ }
227
+ } else {
228
+ if (cls.includes('-4digits')) {
229
+ const newCls = cls.replace('-4digits', '');
230
+ e.classList.add(newCls);
231
+ e.classList.remove(cls);
232
+ }
233
+ }
234
+ }
235
+ } else {
236
+ console.log('....');
237
+ }
238
+ }
239
+ }
240
+ };
241
+
242
+ const seconds = computed(() => {
243
+ if (props.countdown) {
244
+ return Math.trunc(diff.value) % 60;
245
+ }
246
+ return Math.trunc(now.value) % 60;
247
+ });
248
+
249
+ const minutes = computed(() => {
250
+ if (props.countdown) {
251
+ return Math.trunc(diff.value / 60) % 60;
252
+ }
253
+ return Math.trunc(now.value / 60) % 60;
254
+ });
255
+ const hours = computed(() => {
256
+ if (props.countdown) {
257
+ return Math.trunc(diff.value / 60 / 60) % 24;
258
+ }
259
+ return new Date(now.value * 1000).getHours();
260
+ // return Math.trunc(now.value / 60 / 60) % 24;
261
+ });
262
+ const days = computed(() => {
263
+ if (props.countdown) {
264
+ return Math.trunc(diff.value / 60 / 60 / 24);
265
+ }
266
+ return Math.trunc(now.value / 60 / 60 / 24);
267
+ });
268
+
269
+ watch(
270
+ () => props.deadline,
271
+ newVal => {
272
+ const endTime = newVal as unknown as String;
273
+ date.value = Math.trunc(Date.parse(endTime.replace(/-/g, '/')) / 1000);
274
+ if (!date.value) {
275
+ throw new Error("Invalid props value, correct the 'deadline'");
276
+ }
277
+ }
278
+ );
279
+
280
+ watch(now, () => {
281
+ if (props.countdown) {
282
+ diff.value = date.value - now.value;
283
+ if (diff.value <= 0 || props.stop) {
284
+ diff.value = 0;
285
+ updateTime(3, 0);
286
+ } else {
287
+ updateAllCards();
288
+ }
289
+ } else {
290
+ updateAllCards();
291
+ }
292
+ });
293
+
294
+ watch(diff, newVal => {
295
+ if (newVal == 0) {
296
+ // emit('timeElapsed');
297
+ updateAllCards();
298
+ }
299
+ });
300
+
301
+ onMounted(() => {
302
+ if (diff.value !== 0) {
303
+ show.value = true;
304
+ }
305
+ });
306
+
307
+ onBeforeMount(() => {
308
+ if (props.countdown) {
309
+ if (!props.deadline) {
310
+ throw new Error("Missing props 'deadline'");
311
+ }
312
+ const endTime = props.deadline;
313
+ let epoch = Date.parse(endTime.replace(/-/g, '/'));
314
+ if (props.deadlineDate != null) {
315
+ epoch = Date.parse(props.deadlineDate.toDateString());
316
+ }
317
+ if (props.deadlineISO) {
318
+ epoch = Date.parse(props.deadlineISO);
319
+ }
320
+ date.value = Math.trunc(epoch / 1000);
321
+ if (!date.value) {
322
+ throw new Error("Invalid props value, correct the 'deadline'");
323
+ }
324
+ }
325
+ interval.value = setInterval(() => {
326
+ now.value = Math.trunc(new Date().getTime() / 1000);
327
+ }, 1000);
328
+ });
329
+
330
+ onUnmounted(() => {
331
+ // if (window['cancelAnimationFrame']) {
332
+ // cancelAnimationFrame(frame);
333
+ // }
334
+ clearInterval(interval.value);
335
+ });
336
+ </script>
337
+
338
+ <style lang="scss">
339
+ .no-animation__card {
340
+ font-weight: 500;
341
+ font-size: 2rem;
342
+ line-height: 1.5;
343
+ display: block;
344
+ color: v-bind(mainColor);
345
+ }
346
+
347
+ .flip-clock {
348
+ text-align: center;
349
+ perspective: 600px;
350
+ margin: 0 auto;
351
+
352
+ *,
353
+ *:before,
354
+ *:after {
355
+ box-sizing: border-box;
356
+ }
357
+ }
358
+
359
+ .flip-clock__piece {
360
+ display: inline-block;
361
+ margin: 0 0.2vw;
362
+
363
+ @media (min-width: 1000px) {
364
+ margin: 0 5px;
365
+ }
366
+ }
367
+
368
+ .flip-clock__slot {
369
+ font-size: 1rem;
370
+ line-height: 1.5;
371
+ display: block;
372
+ color: v-bind(labelColor);
373
+ }
374
+
375
+ $halfHeight: 0.72em;
376
+ $borderRadius: 0.15em;
377
+
378
+ .flip-card {
379
+ display: block;
380
+ position: relative;
381
+ padding-bottom: $halfHeight;
382
+ font-size: 2.25rem;
383
+ line-height: 0.95;
384
+ }
385
+
386
+ @media (min-width: 1000px) {
387
+ .flip-clock__slot {
388
+ font-size: 1.2rem;
389
+ }
390
+
391
+ .flip-card {
392
+ font-size: 3rem;
393
+ }
394
+ }
395
+
396
+ .flip-card__top,
397
+ .flip-card__bottom,
398
+ .flip-card__back-bottom,
399
+ .flip-card__back::before,
400
+ .flip-card__back::after {
401
+ display: block;
402
+ height: $halfHeight;
403
+ color: v-bind(mainColor);
404
+ background: v-bind(mainFlipBackgroundColor);
405
+ padding: 0.23em 0.15em 0.4em;
406
+ border-radius: $borderRadius $borderRadius 0 0;
407
+ backface-visibility: hidden;
408
+ -webkit-backface-visibility: hidden;
409
+ transform-style: preserve-3d;
410
+ width: 2.1em;
411
+ height: $halfHeight;
412
+ }
413
+
414
+ .flip-card__top-4digits,
415
+ .flip-card__bottom-4digits,
416
+ .flip-card__back-bottom-4digits,
417
+ .flip-card__back-4digits::before,
418
+ .flip-card__back-4digits::after {
419
+ display: block;
420
+ height: $halfHeight;
421
+ color: v-bind(mainColor);
422
+ background: v-bind(mainFlipBackgroundColor);
423
+ padding: 0.23em 0.15em 0.4em;
424
+ border-radius: $borderRadius $borderRadius 0 0;
425
+ backface-visibility: hidden;
426
+ -webkit-backface-visibility: hidden;
427
+ transform-style: preserve-3d;
428
+ width: 2.65em;
429
+ height: $halfHeight;
430
+ }
431
+
432
+ .flip-card__bottom,
433
+ .flip-card__back-bottom,
434
+ .flip-card__bottom-4digits,
435
+ .flip-card__back-bottom-4digits {
436
+ color: v-bind(secondFlipColor);
437
+ position: absolute;
438
+ top: 50%;
439
+ left: 0;
440
+ border-top: solid 1px #000;
441
+ background: v-bind(secondFlipBackgroundColor);
442
+ border-radius: 0 0 $borderRadius $borderRadius;
443
+ pointer-events: none;
444
+ overflow: hidden;
445
+ z-index: 2;
446
+ }
447
+
448
+ .flip-card__back-bottom,
449
+ .flip-card__back-bottom-4digits {
450
+ z-index: 1;
451
+ }
452
+
453
+ .flip-card__bottom::after,
454
+ .flip-card__back-bottom::after,
455
+ .flip-card__bottom-4digits::after,
456
+ .flip-card__back-bottom-4digits::after {
457
+ display: block;
458
+ margin-top: -$halfHeight;
459
+ }
460
+
461
+ .flip-card__back::before,
462
+ .flip-card__bottom::after,
463
+ .flip-card__back-bottom::after,
464
+ .flip-card__back-4digits::before,
465
+ .flip-card__bottom-4digits::after,
466
+ .flip-card__back-bottom-4digits::after {
467
+ content: attr(data-value);
468
+ }
469
+
470
+ .flip-card__back,
471
+ .flip-card__back-4digits {
472
+ position: absolute;
473
+ top: 0;
474
+ height: 100%;
475
+ left: 0%;
476
+ pointer-events: none;
477
+ }
478
+
479
+ .flip-card__back::before,
480
+ .flip-card__back-4digits::before {
481
+ position: relative;
482
+ overflow: hidden;
483
+ z-index: -1;
484
+ }
485
+
486
+ .flip .flip-card__back::before,
487
+ .flip .flip-card__back-4digits::before {
488
+ z-index: 1;
489
+ animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
490
+ animation-fill-mode: both;
491
+ transform-origin: center bottom;
492
+ }
493
+
494
+ .flip .flip-card__bottom,
495
+ .flip .flip-card__bottom-4digits {
496
+ transform-origin: center top;
497
+ animation-fill-mode: both;
498
+ animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
499
+ }
500
+
501
+ @keyframes flipTop {
502
+ 0% {
503
+ transform: rotateX(0deg);
504
+ z-index: 2;
505
+ }
506
+
507
+ 0%,
508
+ 99% {
509
+ opacity: 1;
510
+ }
511
+
512
+ 100% {
513
+ transform: rotateX(-90deg);
514
+ opacity: 0;
515
+ }
516
+ }
517
+
518
+ @keyframes flipBottom {
519
+ 0%,
520
+ 50% {
521
+ z-index: -1;
522
+ transform: rotateX(90deg);
523
+ opacity: 0;
524
+ }
525
+
526
+ 51% {
527
+ opacity: 1;
528
+ }
529
+
530
+ 100% {
531
+ opacity: 1;
532
+ transform: rotateX(0deg);
533
+ z-index: 5;
534
+ }
535
+ }
536
+ </style>
@@ -0,0 +1,107 @@
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2022-03-02 17:07:59
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-07-30 18:57:09
6
+ * @Description: SuForm
7
+ -->
8
+
9
+ <template>
10
+ <div class="width: 100%">
11
+ <vxe-form
12
+ ref="xForm"
13
+ v-model:collapse-status="collapseStatus"
14
+ :data="record"
15
+ :items="formItems"
16
+ :rules="rules"
17
+ :loading="loading"
18
+ :vertical="vertical"
19
+ title-align="right"
20
+ :title-width="titleWidth"
21
+ >
22
+ <template #dividerPrefix>
23
+ <div class="w-2 h-4 bg-amber-600">5555</div>
24
+ </template>
25
+ <template #collapseNode>
26
+ <div class="flex justify-start">
27
+ <vxe-checkbox
28
+ v-model="collapseStatus"
29
+ content="查看更多"
30
+ :checked-value="false"
31
+ :unchecked-value="true"
32
+ class="pl-10"
33
+ />
34
+ </div>
35
+ </template>
36
+ </vxe-form>
37
+ </div>
38
+ </template>
39
+
40
+ <script lang="ts">
41
+ export default {
42
+ name: 'UtForm'
43
+ };
44
+ </script>
45
+ <script setup lang="ts">
46
+ import { useI18n } from 'vue-i18n';
47
+ import { ref, computed } from 'vue';
48
+ // import { formatRules } from '@utogether/utils';
49
+ import { formatItems, formatRules } from './utils';
50
+ // import type { IRecord, IFormItemProps } from '../../types';
51
+
52
+ export interface IProps {
53
+ record: IRecord; // 数据对象
54
+ items: Array<IFormItemProps>; // form item
55
+ loading?: boolean;
56
+ vertical?: boolean;
57
+ titleWidth?: number;
58
+ span?: number;
59
+ dataStatus?: string;
60
+ }
61
+
62
+ const props = withDefaults(defineProps<IProps>(), {
63
+ record: (): IRecord => {
64
+ return {};
65
+ },
66
+ items: () => [],
67
+ loading: false,
68
+ vertical: false,
69
+ titleWidth: 100,
70
+ span: 6,
71
+ dataStatus: 'detail'
72
+ });
73
+ const xForm = ref(undefined);
74
+ const { t } = useI18n();
75
+ const collapseStatus = ref(true);
76
+ /**
77
+ * @description: 根据items 获取必填选
78
+ */
79
+ const rules = computed(() => {
80
+ if (!props.items.length) return {};
81
+ return formatRules(props.items, t);
82
+ });
83
+
84
+ const formItems = computed(() => {
85
+ if (!props.items.length) return props.items;
86
+ return formatItems(props.items, props.dataStatus, 6);
87
+ });
88
+
89
+ /**
90
+ * @deprecated
91
+ * @description 使用validate替换
92
+ * @param cb
93
+ */
94
+ const validateForm = (cb: Function) => {
95
+ (xForm as any).value.validate(cb);
96
+ };
97
+ const validate = (cb: Function) => {
98
+ (xForm as any).value.validate(cb);
99
+ setTimeout(() => {
100
+ xForm.value.clearValidate();
101
+ }, 1600);
102
+ };
103
+ defineExpose({
104
+ validateForm,
105
+ validate
106
+ });
107
+ </script>
@@ -3,5 +3,8 @@ import FormUpload2 from './form-upload.vue';
3
3
  import utLov2 from './lov.vue';
4
4
  import UtModalGrid2 from './modal-grid.vue';
5
5
  import UtGrid2 from './grid.vue';
6
+ import UtForm2 from './form.vue';
7
+ import UtUpload2 from './upload.vue';
8
+ import UtCountdown2 from './count-down.vue';
6
9
 
7
- export { UtGrid2, UtModalForm2, FormUpload2, utLov2, UtModalGrid2 };
10
+ export { UtGrid2, UtModalForm2, FormUpload2, utLov2, UtModalGrid2, UtForm2, UtCountdown2, UtUpload2 };
@@ -34,6 +34,14 @@
34
34
  />
35
35
  </template>
36
36
  <template #footer>
37
+ <vxe-checkbox
38
+ v-if="!url && dataStatus === 'add'"
39
+ v-model="continuous"
40
+ content="连续添加"
41
+ unchecked-value="0"
42
+ checked-value="1"
43
+ style="margin-right: 12px"
44
+ />
37
45
  <ut-button status="warning" content="cancel" icon="ri-close-line" @tap="onClose" />
38
46
  <ut-button status="u-cyan" content="confirm" icon="ri-save-3-line" @tap="onConfirm" />
39
47
  </template>
@@ -86,6 +94,7 @@ const props = withDefaults(defineProps<IProps>(), {
86
94
 
87
95
  const attrs: IRecord = getAttrs(useAttrs());
88
96
 
97
+ const continuous = ref('0');
89
98
  const loading = ref(false);
90
99
  const instance = getCurrentInstance()!;
91
100