@skyfox2000/webui 1.5.4 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/lib/assets/modules/{baseLayout-BEy-FjcZ.js → baseLayout-DfTxHOFc.js} +7 -7
  2. package/lib/assets/modules/file-upload-DTOdV5vM.js +211 -0
  3. package/lib/assets/modules/index-BDoBUrYA.js +114 -0
  4. package/lib/assets/modules/{index-BTD6d1d_.js → index-BwMaOrJT.js} +1 -1
  5. package/lib/assets/modules/{index-BFxnKhwl.js → index-M1qERbea.js} +99 -99
  6. package/lib/assets/modules/{menuTabs-DUBWuf7t.js → menuTabs-DWaBSRNr.js} +42 -42
  7. package/lib/assets/modules/{toolIcon-DQLIuud3.js → toolIcon-BYnHhAy-.js} +1 -1
  8. package/lib/assets/modules/upload-template-BKm9mFq8.js +6764 -0
  9. package/lib/assets/modules/uploadList-CHvr6Hp1.js +472 -0
  10. package/lib/es/AceEditor/index.js +3 -3
  11. package/lib/es/BasicLayout/index.js +2 -2
  12. package/lib/es/Error403/index.js +14 -15
  13. package/lib/es/Error404/index.js +16 -17
  14. package/lib/es/ExcelForm/index.js +244 -244
  15. package/lib/es/MenuLayout/index.js +5 -5
  16. package/lib/es/TemplateFile/index.js +53 -54
  17. package/lib/es/UploadForm/index.js +61 -63
  18. package/lib/locales/default.d.ts +287 -103
  19. package/lib/webui.css +1 -1
  20. package/lib/webui.es.js +1440 -1586
  21. package/package.json +1 -1
  22. package/src/components/common/icon/fullscreen.vue +1 -1
  23. package/src/components/content/dialog/excelForm.vue +32 -28
  24. package/src/components/content/dialog/index.vue +3 -3
  25. package/src/components/content/dialog/templateFile.vue +3 -2
  26. package/src/components/content/dialog/uploadForm.vue +5 -4
  27. package/src/components/content/drawer/index.vue +5 -3
  28. package/src/components/content/list/index.vue +2 -1
  29. package/src/components/content/list/listOperate.vue +6 -7
  30. package/src/components/content/search/index.vue +2 -2
  31. package/src/components/content/table/index.vue +2 -1
  32. package/src/components/content/table/tableOperate.vue +8 -9
  33. package/src/components/content/toolbar/icontool.vue +1 -5
  34. package/src/components/content/toolbar/index.vue +4 -5
  35. package/src/components/content/toolpanel/index.vue +20 -20
  36. package/src/components/error/error403.vue +2 -2
  37. package/src/components/error/error404.vue +2 -2
  38. package/src/components/form/input/index.vue +3 -1
  39. package/src/components/form/select/index.vue +3 -2
  40. package/src/components/form/textarea/index.vue +3 -1
  41. package/src/components/form/transfer/index.vue +2 -1
  42. package/src/components/form/upload/uploadList.vue +23 -19
  43. package/src/components/layout/header/headerExits.vue +5 -5
  44. package/src/components/layout/menu/menuTabs.vue +1 -1
  45. package/src/const/options.ts +17 -16
  46. package/src/locales/default.ts +297 -176
  47. package/src/stores/appInfo.ts +2 -1
  48. package/src/stores/userInfo.ts +6 -5
  49. package/src/utils/data.ts +9 -8
  50. package/src/utils/download.ts +5 -4
  51. package/src/utils/excel-preview.ts +4 -3
  52. package/src/utils/export-table.ts +7 -6
  53. package/src/utils/file-upload.ts +15 -14
  54. package/src/utils/form-csv.ts +4 -3
  55. package/src/utils/form-excel.ts +14 -13
  56. package/src/utils/form-validate.ts +18 -17
  57. package/src/utils/form.ts +6 -5
  58. package/src/utils/icon-loader.ts +3 -2
  59. package/src/utils/options.ts +2 -1
  60. package/src/utils/tools.ts +18 -17
  61. package/lib/assets/modules/file-upload-_mcZy7EK.js +0 -211
  62. package/lib/assets/modules/index-DyE2ppxB.js +0 -114
  63. package/lib/assets/modules/upload-template-DZuy1BOF.js +0 -6465
  64. package/lib/assets/modules/uploadList-CCquj3c_.js +0 -466
@@ -1,6 +1,6 @@
1
- import { defineComponent as f, ref as d, watch as _, onMounted as h, resolveComponent as v, createBlock as o, openBlock as t, withCtx as s, createElementVNode as C, normalizeClass as x, createVNode as w, KeepAlive as I, unref as n, resolveDynamicComponent as g } from "vue";
2
- import { _ as y } from "../../assets/modules/baseLayout-BEy-FjcZ.js";
3
- import { ah as A, a as S } from "../../assets/modules/upload-template-DZuy1BOF.js";
1
+ import { defineComponent as f, ref as d, watch as _, onMounted as v, resolveComponent as h, createBlock as o, openBlock as t, withCtx as s, createElementVNode as C, normalizeClass as x, createVNode as w, KeepAlive as I, unref as n, resolveDynamicComponent as g } from "vue";
2
+ import { _ as y } from "../../assets/modules/baseLayout-DfTxHOFc.js";
3
+ import { at as A, a as S } from "../../assets/modules/upload-template-BKm9mFq8.js";
4
4
  import "@skyfox2000/microbase";
5
5
  import "@skyfox2000/fapi";
6
6
  import k from "vue-m-message";
@@ -20,10 +20,10 @@ const j = /* @__PURE__ */ f({
20
20
  (c) => {
21
21
  r.value = c ? "h-[calc(100vh-40px)]" : "h-[calc(100vh-81px)]";
22
22
  }
23
- ), h(() => {
23
+ ), v(() => {
24
24
  k.closeAll();
25
25
  }), (c, B) => {
26
- const m = v("router-view");
26
+ const m = h("router-view");
27
27
  return t(), o(y, {
28
28
  routes: p.routes
29
29
  }, {
@@ -1,16 +1,16 @@
1
- import { defineComponent as x, ref as o, watch as S, onMounted as h, createBlock as C, openBlock as F, unref as m, withCtx as s, createVNode as f, createTextVNode as q } from "vue";
2
- import { _ as L } from "../../assets/modules/index-BTD6d1d_.js";
3
- import { Modal as z, Space as D } from "ant-design-vue";
1
+ import { defineComponent as T, ref as l, watch as x, onMounted as F, createBlock as C, openBlock as q, unref as u, withCtx as d, createVNode as f, createTextVNode as L, toDisplayString as b } from "vue";
2
+ import { _ as g } from "../../assets/modules/index-BwMaOrJT.js";
3
+ import { Modal as D, Space as z } from "ant-design-vue";
4
4
  import { httpPost as N, ResStatus as O } from "@skyfox2000/fapi";
5
- import { ak as d } from "../../assets/modules/upload-template-DZuy1BOF.js";
6
- import { U as b } from "../../assets/modules/file-upload-_mcZy7EK.js";
5
+ import { aw as n, $ as w } from "../../assets/modules/upload-template-BKm9mFq8.js";
6
+ import { U as M } from "../../assets/modules/file-upload-DTOdV5vM.js";
7
7
  import "@skyfox2000/microbase";
8
8
  import "vue-m-message";
9
9
  import "async-validator";
10
10
  import "dayjs";
11
11
  import "vue-draggable-next";
12
- import { U as g } from "../../assets/modules/uploadList-CCquj3c_.js";
13
- const _ = /* @__PURE__ */ x({
12
+ import { U as $ } from "../../assets/modules/uploadList-CHvr6Hp1.js";
13
+ const H = /* @__PURE__ */ T({
14
14
  __name: "templateFile",
15
15
  props: {
16
16
  /**
@@ -86,32 +86,32 @@ const _ = /* @__PURE__ */ x({
86
86
  required: !1
87
87
  }
88
88
  },
89
- setup(u) {
90
- const a = u, p = a.api ?? "FILE_API", w = o(a.fileListUrl || {
91
- api: p,
89
+ setup(p) {
90
+ const a = p, s = a.api ?? "FILE_API", U = l(a.fileListUrl || {
91
+ api: s,
92
92
  authorize: !0,
93
93
  url: "/api/TemplateFileSrv/list"
94
- }), c = o(a.uploadUrl || {
95
- api: p,
94
+ }), v = l(a.uploadUrl || {
95
+ api: s,
96
96
  authorize: !0,
97
97
  url: "/api/TemplateFileSrv/upload"
98
- }), v = o(a.downloadUrl || {
99
- api: p,
98
+ }), y = l(a.downloadUrl || {
99
+ api: s,
100
100
  authorize: !0,
101
101
  url: "/api/TemplateFileSrv/download"
102
- }), y = o(a.deleteUrl || {
103
- api: p,
102
+ }), h = l(a.deleteUrl || {
103
+ api: s,
104
104
  authorize: !0,
105
105
  url: "/api/TemplateFileSrv/delete"
106
- }), r = o(!1), n = o([]);
107
- S(
108
- () => d.value,
106
+ }), o = l(!1), m = l([]);
107
+ x(
108
+ () => n.value,
109
109
  () => {
110
- r.value = d.value;
110
+ o.value = n.value;
111
111
  }
112
112
  );
113
- const T = async () => {
114
- const e = await N(w.value, {
113
+ const S = async () => {
114
+ const e = await N(U.value, {
115
115
  Query: {
116
116
  PrefixPath: a.templateType
117
117
  }
@@ -121,60 +121,59 @@ const _ = /* @__PURE__ */ x({
121
121
  uid: t.Key,
122
122
  size: t.Size,
123
123
  name: t.FileName,
124
- status: b.Online,
124
+ status: M.Online,
125
125
  lastModified: t.UpdateTime ? new Date(t.UpdateTime).getTime() : 0,
126
126
  lastModifiedDate: t.UpdateTime ? new Date(t.UpdateTime) : /* @__PURE__ */ new Date(),
127
127
  params: {},
128
128
  minioFile: t
129
129
  }));
130
- n.value.push(...i);
130
+ m.value.push(...i);
131
131
  }
132
132
  };
133
- h(() => {
134
- T(), r.value = d.value;
133
+ F(() => {
134
+ S(), o.value = n.value;
135
135
  });
136
- const U = () => {
137
- r.value = !1, d.value = !1;
136
+ const c = () => {
137
+ o.value = !1, n.value = !1;
138
138
  };
139
- return (e, l) => (F(), C(m(z), {
140
- title: "模板文件管理",
141
- open: r.value,
142
- "onUpdate:open": l[1] || (l[1] = (i) => r.value = i),
139
+ return (e, r) => (q(), C(u(D), {
140
+ title: u(w)("webui.components.content.dialog.templateFileManager"),
141
+ open: o.value,
142
+ "onUpdate:open": r[1] || (r[1] = (i) => o.value = i),
143
143
  wrapClassName: "modal mx-auto " + (e.$attrs.width ? "w-[" + e.$attrs.width + "]" : "w-[500px]"),
144
- onClose: U
144
+ onClose: c
145
145
  }, {
146
- footer: s(() => [
147
- f(m(D), null, {
148
- default: s(() => [
149
- f(m(L), { onClick: U }, {
150
- default: s(() => l[2] || (l[2] = [
151
- q("关闭")
152
- ])),
153
- _: 1,
154
- __: [2]
146
+ footer: d(() => [
147
+ f(u(z), null, {
148
+ default: d(() => [
149
+ f(u(g), { onClick: c }, {
150
+ default: d(() => [
151
+ L(b(u(w)("webui.common.close")), 1)
152
+ ]),
153
+ _: 1
155
154
  })
156
155
  ]),
157
156
  _: 1
158
157
  })
159
158
  ]),
160
- default: s(() => [
161
- f(g, {
162
- "file-list": n.value,
163
- "onUpdate:fileList": l[0] || (l[0] = (i) => n.value = i),
159
+ default: d(() => [
160
+ f($, {
161
+ "file-list": m.value,
162
+ "onUpdate:fileList": r[0] || (r[0] = (i) => m.value = i),
164
163
  "auto-upload": "",
165
164
  "parent-path": a.templateType,
166
- "upload-url": c.value,
167
- "download-url": v.value,
168
- "delete-url": y.value,
169
- "max-count": u.maxCount,
170
- "file-ext": u.fileExt,
171
- "show-delete": u.showDelete
165
+ "upload-url": v.value,
166
+ "download-url": y.value,
167
+ "delete-url": h.value,
168
+ "max-count": p.maxCount,
169
+ "file-ext": p.fileExt,
170
+ "show-delete": p.showDelete
172
171
  }, null, 8, ["file-list", "parent-path", "upload-url", "download-url", "delete-url", "max-count", "file-ext", "show-delete"])
173
172
  ]),
174
173
  _: 1
175
- }, 8, ["open", "wrapClassName"]));
174
+ }, 8, ["title", "open", "wrapClassName"]));
176
175
  }
177
176
  });
178
177
  export {
179
- _ as default
178
+ H as default
180
179
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as S, ref as s, watch as b, onMounted as F, createBlock as z, openBlock as y, unref as p, withCtx as n, createVNode as v, mergeProps as D, createTextVNode as w } from "vue";
2
- import { _ as c } from "../../assets/modules/index-BTD6d1d_.js";
3
- import { Modal as _, Space as L } from "ant-design-vue";
4
- import { ResStatus as k } from "@skyfox2000/fapi";
5
- import { a7 as T } from "../../assets/modules/upload-template-DZuy1BOF.js";
1
+ import { defineComponent as F, ref as s, watch as y, onMounted as z, createBlock as D, openBlock as _, unref as u, withCtx as p, createVNode as m, mergeProps as L, createTextVNode as w, toDisplayString as C } from "vue";
2
+ import { _ as g } from "../../assets/modules/index-BwMaOrJT.js";
3
+ import { Modal as k, Space as N } from "ant-design-vue";
4
+ import { ResStatus as T } from "@skyfox2000/fapi";
5
+ import { $ as v, aj as $ } from "../../assets/modules/upload-template-BKm9mFq8.js";
6
6
  import "@skyfox2000/microbase";
7
- import E from "vue-m-message";
7
+ import A from "vue-m-message";
8
8
  import "async-validator";
9
9
  import "dayjs";
10
- import { A as N } from "../../assets/modules/file-upload-_mcZy7EK.js";
10
+ import { A as E } from "../../assets/modules/file-upload-DTOdV5vM.js";
11
11
  import "vue-draggable-next";
12
- import { U as A } from "../../assets/modules/uploadList-CCquj3c_.js";
13
- const K = /* @__PURE__ */ S({
12
+ import { U as B } from "../../assets/modules/uploadList-CHvr6Hp1.js";
13
+ const W = /* @__PURE__ */ F({
14
14
  __name: "uploadForm",
15
15
  props: {
16
16
  gridCtrl: {},
@@ -25,15 +25,15 @@ const K = /* @__PURE__ */ S({
25
25
  upload: {}
26
26
  },
27
27
  emits: ["before:file-list", "before:upload", "after:upload", "on:progress"],
28
- setup(C, { emit: g }) {
29
- const o = C, a = o.uploadForm, d = s(!1), U = o.maxConcurrent ?? 3, u = s(o.fileList ?? []), f = g;
30
- b(
31
- () => a.visible.value,
28
+ setup(U, { emit: h }) {
29
+ const e = U, o = e.uploadForm, d = s(!1), x = e.maxConcurrent ?? 3, n = s(e.fileList ?? []), f = h;
30
+ y(
31
+ () => o.visible.value,
32
32
  () => {
33
- d.value = a.visible.value;
33
+ d.value = o.visible.value;
34
34
  }
35
35
  );
36
- const r = s(o.uploadUrl), t = s(o.downloadUrl), x = s({
36
+ const r = s(e.uploadUrl), t = s(e.downloadUrl), b = s({
37
37
  autoUpload: !1,
38
38
  placeholder: "",
39
39
  maxFileSize: 20,
@@ -45,80 +45,78 @@ const K = /* @__PURE__ */ S({
45
45
  showOnlineSwitch: !1,
46
46
  showDelete: !0,
47
47
  showFolderUpload: !1,
48
- ...o.upload
49
- }), h = async () => {
50
- f("before:upload", u.value), await new N(r.value, U).doUpload(
51
- u.value,
52
- a.isFormLoading,
53
- o.continueOnError,
54
- async (e, i) => {
55
- f("after:upload", e, i), e && a.formData.value && (await T(o.gridCtrl, a.formData.value)).status === k.SUCCESS && (a.visible.value = !1);
48
+ ...e.upload
49
+ }), S = async () => {
50
+ f("before:upload", n.value), await new E(r.value, x).doUpload(
51
+ n.value,
52
+ o.isFormLoading,
53
+ e.continueOnError,
54
+ async (a, i) => {
55
+ f("after:upload", a, i), a && o.formData.value && (await $(e.gridCtrl, o.formData.value)).status === T.SUCCESS && (o.visible.value = !1);
56
56
  },
57
- (e) => {
58
- f("on:progress", e);
57
+ (a) => {
58
+ f("on:progress", a);
59
59
  }
60
60
  );
61
61
  };
62
- F(() => {
63
- const l = o.gridCtrl.page;
62
+ z(() => {
63
+ const l = e.gridCtrl.page;
64
64
  if (r.value = r.value ?? l.urls.upload, t.value = t.value ?? l.urls.download, !r.value) {
65
- E.error("未配置文件上传地址!");
65
+ A.error(v("webui.components.content.excelForm.uploadAddressNotConfigured"));
66
66
  return;
67
67
  }
68
68
  r.value.api || (r.value.api = l.api), r.value.authorize === void 0 && (r.value.authorize = l.authorize), t.value && (t.value.api || (t.value.api = l.api), t.value.authorize === void 0 && (t.value.authorize = l.authorize));
69
- for (const i in a.formData.value)
70
- o.gridCtrl.rowData.value && (a.formData.value[i] = o.gridCtrl.rowData.value[i]);
71
- const e = [];
72
- f("before:file-list", a, e), u.value.push(...e), d.value = a.visible.value;
69
+ for (const i in o.formData.value)
70
+ e.gridCtrl.rowData.value && (o.formData.value[i] = e.gridCtrl.rowData.value[i]);
71
+ const a = [];
72
+ f("before:file-list", o, a), n.value.push(...a), d.value = o.visible.value;
73
73
  });
74
- const m = () => {
75
- a.visible.value = !1;
74
+ const c = () => {
75
+ o.visible.value = !1;
76
76
  };
77
- return (l, e) => (y(), z(p(_), {
78
- title: "文件上传",
77
+ return (l, a) => (_(), D(u(k), {
78
+ title: u(v)("webui.components.content.dialog.fileUpload"),
79
79
  open: d.value,
80
- "onUpdate:open": e[1] || (e[1] = (i) => d.value = i),
80
+ "onUpdate:open": a[1] || (a[1] = (i) => d.value = i),
81
81
  wrapClassName: "modal mx-auto " + (l.$attrs.width ? "w-[" + l.$attrs.width + "]" : "w-[500px]"),
82
- onClose: m
82
+ onClose: c
83
83
  }, {
84
- footer: n(() => [
85
- v(p(L), null, {
86
- default: n(() => [
87
- v(p(c), { onClick: m }, {
88
- default: n(() => e[2] || (e[2] = [
89
- w("取消")
90
- ])),
91
- _: 1,
92
- __: [2]
84
+ footer: p(() => [
85
+ m(u(N), null, {
86
+ default: p(() => [
87
+ m(u(g), { onClick: c }, {
88
+ default: p(() => [
89
+ w(C(u(v)("webui.common.cancel")), 1)
90
+ ]),
91
+ _: 1
93
92
  }),
94
- v(p(c), {
95
- onClick: h,
93
+ m(u(g), {
94
+ onClick: S,
96
95
  type: "primary",
97
- loading: p(a).isFormSaving.value
96
+ loading: u(o).isFormSaving.value
98
97
  }, {
99
- default: n(() => e[3] || (e[3] = [
100
- w(" 上传保存 ")
101
- ])),
102
- _: 1,
103
- __: [3]
98
+ default: p(() => [
99
+ w(C(u(v)("webui.common.uploadSave")), 1)
100
+ ]),
101
+ _: 1
104
102
  }, 8, ["loading"])
105
103
  ]),
106
104
  _: 1
107
105
  })
108
106
  ]),
109
- default: n(() => [
110
- v(A, D({
111
- "file-list": u.value,
112
- "onUpdate:fileList": e[0] || (e[0] = (i) => u.value = i),
107
+ default: p(() => [
108
+ m(B, L({
109
+ "file-list": n.value,
110
+ "onUpdate:fileList": a[0] || (a[0] = (i) => n.value = i),
113
111
  "upload-url": r.value,
114
112
  "download-url": t.value,
115
- "preview-url": o.previewUrl
116
- }, x.value), null, 16, ["file-list", "upload-url", "download-url", "preview-url"])
113
+ "preview-url": e.previewUrl
114
+ }, b.value), null, 16, ["file-list", "upload-url", "download-url", "preview-url"])
117
115
  ]),
118
116
  _: 1
119
- }, 8, ["open", "wrapClassName"]));
117
+ }, 8, ["title", "open", "wrapClassName"]));
120
118
  }
121
119
  });
122
120
  export {
123
- K as default
121
+ W as default
124
122
  };