@since2006/pages 2025.8.2 → 2025.8.3

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 (89) hide show
  1. package/dist/es/index.js +15 -8
  2. package/dist/es/src/app/attachment/AttachmentEdit.vue.js +181 -0
  3. package/dist/es/src/app/attachment/AttachmentEdit.vue2.js +4 -0
  4. package/dist/es/src/app/attachment/AttachmentList.vue.js +178 -0
  5. package/dist/es/src/app/attachment/AttachmentList.vue2.js +4 -0
  6. package/dist/es/src/app/attachment/api.js +28 -0
  7. package/dist/es/src/app/attachment/index.js +7 -0
  8. package/dist/es/src/app/log/LogIndex.vue.js +238 -0
  9. package/dist/es/src/app/log/LogIndex.vue2.js +4 -0
  10. package/dist/es/src/app/log/LogView.vue.js +7 -0
  11. package/dist/es/src/app/log/LogView.vue2.js +164 -0
  12. package/dist/es/src/app/log/api.js +11 -0
  13. package/dist/es/src/app/log/index.js +7 -0
  14. package/dist/es/src/app/log/ua-icons.vue.js +7 -0
  15. package/dist/es/src/app/log/ua-icons.vue2.js +61 -0
  16. package/dist/es/src/app/metadata/MetadataCreate.vue.js +115 -0
  17. package/dist/es/src/app/metadata/MetadataCreate.vue2.js +4 -0
  18. package/dist/es/src/app/metadata/MetadataIndex.vue.js +179 -0
  19. package/dist/es/src/app/metadata/MetadataIndex.vue2.js +4 -0
  20. package/dist/es/src/app/metadata/MetadataUpdate.vue.js +128 -0
  21. package/dist/es/src/app/metadata/MetadataUpdate.vue2.js +4 -0
  22. package/dist/es/src/app/metadata/api.js +23 -0
  23. package/dist/es/src/app/metadata/index.js +7 -0
  24. package/dist/es/src/app/module/ModuleIndex.vue.js +5 -216
  25. package/dist/es/src/app/module/ModuleIndex.vue2.js +219 -2
  26. package/dist/es/src/app/module/index.js +5 -7
  27. package/dist/es/src/app/schedule/CronTypeSelect.vue.js +513 -0
  28. package/dist/es/src/app/schedule/CronTypeSelect.vue2.js +4 -0
  29. package/dist/es/src/app/schedule/ScheduleAdd.vue.js +7 -0
  30. package/dist/es/src/app/schedule/ScheduleAdd.vue2.js +191 -0
  31. package/dist/es/src/app/schedule/ScheduleEdit.vue.js +7 -0
  32. package/dist/es/src/app/schedule/ScheduleEdit.vue2.js +203 -0
  33. package/dist/es/src/app/schedule/ScheduleIndex.vue.js +279 -0
  34. package/dist/es/src/app/schedule/ScheduleIndex.vue2.js +4 -0
  35. package/dist/es/src/app/schedule/ScheduleLogList.vue.js +153 -0
  36. package/dist/es/src/app/schedule/ScheduleLogList.vue2.js +4 -0
  37. package/dist/es/src/app/schedule/ScheduleLogView.vue.js +7 -0
  38. package/dist/es/src/app/schedule/ScheduleLogView.vue2.js +116 -0
  39. package/dist/es/src/app/schedule/api.js +38 -0
  40. package/dist/es/src/app/schedule/index.js +7 -0
  41. package/dist/es/src/app/schedule/schedule.js +58 -0
  42. package/dist/es/src/app/system/index.js +3 -5
  43. package/dist/es/src/index.js +10 -2
  44. package/dist/es/style.css +1 -1
  45. package/dist/lib/index.js +1 -1
  46. package/dist/lib/src/app/attachment/AttachmentEdit.vue.js +1 -0
  47. package/dist/lib/src/app/attachment/AttachmentEdit.vue2.js +1 -0
  48. package/dist/lib/src/app/attachment/AttachmentList.vue.js +1 -0
  49. package/dist/lib/src/app/attachment/AttachmentList.vue2.js +1 -0
  50. package/dist/lib/src/app/attachment/api.js +1 -0
  51. package/dist/lib/src/app/attachment/index.js +1 -0
  52. package/dist/lib/src/app/log/LogIndex.vue.js +1 -0
  53. package/dist/lib/src/app/log/LogIndex.vue2.js +1 -0
  54. package/dist/lib/src/app/log/LogView.vue.js +1 -0
  55. package/dist/lib/src/app/log/LogView.vue2.js +1 -0
  56. package/dist/lib/src/app/log/api.js +1 -0
  57. package/dist/lib/src/app/log/index.js +1 -0
  58. package/dist/lib/src/app/log/ua-icons.vue.js +1 -0
  59. package/dist/lib/src/app/log/ua-icons.vue2.js +1 -0
  60. package/dist/lib/src/app/metadata/MetadataCreate.vue.js +1 -0
  61. package/dist/lib/src/app/metadata/MetadataCreate.vue2.js +1 -0
  62. package/dist/lib/src/app/metadata/MetadataIndex.vue.js +1 -0
  63. package/dist/lib/src/app/metadata/MetadataIndex.vue2.js +1 -0
  64. package/dist/lib/src/app/metadata/MetadataUpdate.vue.js +1 -0
  65. package/dist/lib/src/app/metadata/MetadataUpdate.vue2.js +1 -0
  66. package/dist/lib/src/app/metadata/api.js +1 -0
  67. package/dist/lib/src/app/metadata/index.js +1 -0
  68. package/dist/lib/src/app/module/ModuleIndex.vue.js +1 -1
  69. package/dist/lib/src/app/module/ModuleIndex.vue2.js +1 -1
  70. package/dist/lib/src/app/module/index.js +1 -1
  71. package/dist/lib/src/app/schedule/CronTypeSelect.vue.js +1 -0
  72. package/dist/lib/src/app/schedule/CronTypeSelect.vue2.js +1 -0
  73. package/dist/lib/src/app/schedule/ScheduleAdd.vue.js +1 -0
  74. package/dist/lib/src/app/schedule/ScheduleAdd.vue2.js +1 -0
  75. package/dist/lib/src/app/schedule/ScheduleEdit.vue.js +1 -0
  76. package/dist/lib/src/app/schedule/ScheduleEdit.vue2.js +1 -0
  77. package/dist/lib/src/app/schedule/ScheduleIndex.vue.js +1 -0
  78. package/dist/lib/src/app/schedule/ScheduleIndex.vue2.js +1 -0
  79. package/dist/lib/src/app/schedule/ScheduleLogList.vue.js +1 -0
  80. package/dist/lib/src/app/schedule/ScheduleLogList.vue2.js +1 -0
  81. package/dist/lib/src/app/schedule/ScheduleLogView.vue.js +1 -0
  82. package/dist/lib/src/app/schedule/ScheduleLogView.vue2.js +1 -0
  83. package/dist/lib/src/app/schedule/api.js +1 -0
  84. package/dist/lib/src/app/schedule/index.js +1 -0
  85. package/dist/lib/src/app/schedule/schedule.js +1 -0
  86. package/dist/lib/src/app/system/index.js +1 -1
  87. package/dist/lib/src/index.js +1 -1
  88. package/dist/lib/style.css +1 -1
  89. package/package.json +1 -1
@@ -0,0 +1,164 @@
1
+ import { defineComponent as D, watch as k, reactive as v, resolveComponent as d, openBlock as c, createBlock as r, withCtx as t, createVNode as n, createTextVNode as l, toDisplayString as o, createCommentVNode as T } from "vue";
2
+ import { getLog as C } from "./api.js";
3
+ const x = /* @__PURE__ */ D({
4
+ __name: "LogView",
5
+ props: {
6
+ open: {
7
+ type: Boolean,
8
+ default: !1
9
+ },
10
+ logId: {
11
+ type: String,
12
+ default: ""
13
+ }
14
+ },
15
+ emits: ["update:open"],
16
+ setup(i, { emit: f }) {
17
+ const p = i, m = f;
18
+ k(
19
+ () => p.open,
20
+ (u) => {
21
+ u && C(p.logId).then((_) => {
22
+ Object.assign(e, _.result);
23
+ });
24
+ }
25
+ );
26
+ const e = v({}), y = () => {
27
+ m("update:open", !1);
28
+ };
29
+ return (u, _) => {
30
+ const s = d("a-tag"), a = d("a-descriptions-item"), g = d("a-descriptions"), b = d("a-modal");
31
+ return c(), r(b, {
32
+ title: "日志详情",
33
+ width: 800,
34
+ footer: null,
35
+ open: i.open,
36
+ onCancel: y
37
+ }, {
38
+ default: t(() => [
39
+ n(g, {
40
+ column: 1,
41
+ bordered: "",
42
+ size: "small"
43
+ }, {
44
+ default: t(() => [
45
+ n(a, {
46
+ label: "事件",
47
+ class: "qq"
48
+ }, {
49
+ default: t(() => [
50
+ e.actionType === "D" ? (c(), r(s, {
51
+ key: 0,
52
+ color: "red"
53
+ }, {
54
+ default: t(() => [
55
+ l(o(e.actionTypeDesc), 1)
56
+ ]),
57
+ _: 1
58
+ })) : e.actionType === "L" ? (c(), r(s, {
59
+ key: 1,
60
+ color: "green"
61
+ }, {
62
+ default: t(() => [
63
+ l(o(e.actionTypeDesc), 1)
64
+ ]),
65
+ _: 1
66
+ })) : (c(), r(s, { key: 2 }, {
67
+ default: t(() => [
68
+ l(o(e.actionTypeDesc), 1)
69
+ ]),
70
+ _: 1
71
+ }))
72
+ ]),
73
+ _: 1
74
+ }),
75
+ n(a, { label: "用户" }, {
76
+ default: t(() => [
77
+ l(o(e.userName), 1)
78
+ ]),
79
+ _: 1
80
+ }),
81
+ n(a, { label: "时间" }, {
82
+ default: t(() => [
83
+ l(o(e.createdAt), 1)
84
+ ]),
85
+ _: 1
86
+ }),
87
+ n(a, { label: "IP地址" }, {
88
+ default: t(() => [
89
+ l(o(e.ip), 1)
90
+ ]),
91
+ _: 1
92
+ }),
93
+ n(a, { label: "UserAgent" }, {
94
+ default: t(() => [
95
+ l(o(e.userAgent), 1)
96
+ ]),
97
+ _: 1
98
+ }),
99
+ n(a, { label: "操作系统" }, {
100
+ default: t(() => [
101
+ l(o(e.os) + " / " + o(e.browser), 1)
102
+ ]),
103
+ _: 1
104
+ }),
105
+ n(a, { label: "日志级别" }, {
106
+ default: t(() => [
107
+ e.level === "E" || e.level === "F" ? (c(), r(s, {
108
+ key: 0,
109
+ color: "red"
110
+ }, {
111
+ default: t(() => [
112
+ l(o(e.levelDesc), 1)
113
+ ]),
114
+ _: 1
115
+ })) : e.level === "W" ? (c(), r(s, {
116
+ key: 1,
117
+ color: "orange"
118
+ }, {
119
+ default: t(() => [
120
+ l(o(e.levelDesc), 1)
121
+ ]),
122
+ _: 1
123
+ })) : (c(), r(s, { key: 2 }, {
124
+ default: t(() => [
125
+ l(o(e.levelDesc), 1)
126
+ ]),
127
+ _: 1
128
+ }))
129
+ ]),
130
+ _: 1
131
+ }),
132
+ n(a, { label: "资源类型" }, {
133
+ default: t(() => [
134
+ l(o(e.resourceType), 1)
135
+ ]),
136
+ _: 1
137
+ }),
138
+ n(a, { label: "内容" }, {
139
+ default: t(() => [
140
+ l(o(e.resourceContent), 1)
141
+ ]),
142
+ _: 1
143
+ }),
144
+ e.resourceDetail ? (c(), r(a, {
145
+ key: 0,
146
+ label: "详情"
147
+ }, {
148
+ default: t(() => [
149
+ l(o(e.resourceDetail), 1)
150
+ ]),
151
+ _: 1
152
+ })) : T("", !0)
153
+ ]),
154
+ _: 1
155
+ })
156
+ ]),
157
+ _: 1
158
+ }, 8, ["open"]);
159
+ };
160
+ }
161
+ });
162
+ export {
163
+ x as default
164
+ };
@@ -0,0 +1,11 @@
1
+ import { http as o } from "@since2006/utils";
2
+ function r(t) {
3
+ return o.get("/api/v2/log/get_log", { params: { id: t } });
4
+ }
5
+ function e(t) {
6
+ return o.get("/api/v2/log/query_logs", { params: t });
7
+ }
8
+ export {
9
+ r as getLog,
10
+ e as queryLogs
11
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./LogIndex.vue.js";
2
+ import { withInstall as t } from "@since2006/utils";
3
+ const a = t(o);
4
+ export {
5
+ a as LogIndex,
6
+ a as default
7
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./ua-icons.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8b2a1553"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,61 @@
1
+ import { defineComponent as f, openBlock as e, createElementBlock as t, Fragment as x, createCommentVNode as d } from "vue";
2
+ const k = {
3
+ class: "ua-icon",
4
+ "aria-hidden": "true",
5
+ style: { "margin-right": "6px" }
6
+ }, l = {
7
+ key: 0,
8
+ "xlink:href": "#fx-windows-10"
9
+ }, W = {
10
+ key: 1,
11
+ "xlink:href": "#fx-windows-7"
12
+ }, _ = {
13
+ key: 2,
14
+ "xlink:href": "#fx-windows-xp"
15
+ }, w = {
16
+ key: 3,
17
+ "xlink:href": "#fx-windows-10"
18
+ }, m = {
19
+ key: 4,
20
+ "xlink:href": "#fx-os-macos"
21
+ }, y = {
22
+ class: "ua-icon",
23
+ "aria-hidden": "true"
24
+ }, b = {
25
+ key: 0,
26
+ "xlink:href": "#fx-browser-ie"
27
+ }, g = {
28
+ key: 1,
29
+ "xlink:href": "#fx-browser-chrome"
30
+ }, O = {
31
+ key: 2,
32
+ "xlink:href": "#fx-browser-firefox"
33
+ }, C = /* @__PURE__ */ f({
34
+ __name: "ua-icons",
35
+ props: {
36
+ os: {
37
+ type: String,
38
+ required: !0
39
+ },
40
+ browser: {
41
+ type: String,
42
+ required: !0
43
+ }
44
+ },
45
+ setup(s) {
46
+ return (S, I) => {
47
+ var r, o, i, n, h, a, c, u;
48
+ return e(), t(x, null, [
49
+ (e(), t("svg", k, [
50
+ (r = s.os) != null && r.startsWith("WINDOWS_10") ? (e(), t("use", l)) : (o = s.os) != null && o.startsWith("WINDOWS_7") ? (e(), t("use", W)) : (i = s.os) != null && i.startsWith("WINDOWS_XP") ? (e(), t("use", _)) : (n = s.os) != null && n.startsWith("WINDOWS") ? (e(), t("use", w)) : (h = s.os) != null && h.startsWith("MAC_OS") ? (e(), t("use", m)) : d("", !0)
51
+ ])),
52
+ (e(), t("svg", y, [
53
+ (a = s.browser) != null && a.startsWith("IE") ? (e(), t("use", b)) : (c = s.browser) != null && c.startsWith("CHROME") ? (e(), t("use", g)) : (u = s.browser) != null && u.startsWith("FIREFOX") ? (e(), t("use", O)) : d("", !0)
54
+ ]))
55
+ ], 64);
56
+ };
57
+ }
58
+ });
59
+ export {
60
+ C as default
61
+ };
@@ -0,0 +1,115 @@
1
+ import { defineComponent as j, ref as c, reactive as x, resolveComponent as n, openBlock as w, createBlock as R, withCtx as o, createVNode as t, toRaw as U } from "vue";
2
+ import { createMetadata as V } from "./api.js";
3
+ const q = /* @__PURE__ */ j({
4
+ __name: "MetadataCreate",
5
+ emits: ["success", "cancel"],
6
+ setup(D, { expose: v, emit: _ }) {
7
+ const r = c(!1);
8
+ v({ preCreate: () => {
9
+ r.value = !0, k();
10
+ } });
11
+ const d = _, f = c(), i = {
12
+ objectId: null,
13
+ metaKey: null,
14
+ metaValue: null,
15
+ remark: null
16
+ }, e = x({ ...i }), b = {
17
+ objectId: [{ required: !0, message: "请填写对象ID" }],
18
+ metaKey: [{ required: !0, message: "请填写对象KEY" }]
19
+ }, k = () => {
20
+ Object.assign(e, i);
21
+ }, m = c(!1), y = () => {
22
+ f.value.validateFields().then(() => {
23
+ m.value = !0;
24
+ const p = { ...U(e) };
25
+ V(p).then((a) => {
26
+ a.code === 200 && (r.value = !1, d("success"));
27
+ });
28
+ }).finally(() => {
29
+ m.value = !1;
30
+ });
31
+ }, I = () => {
32
+ r.value = !1, d("cancel");
33
+ };
34
+ return (p, a) => {
35
+ const u = n("a-input"), s = n("a-form-item"), K = n("a-textarea"), C = n("a-form"), g = n("a-modal");
36
+ return w(), R(g, {
37
+ title: "添加元数据",
38
+ width: 800,
39
+ open: r.value,
40
+ "mask-closable": !1,
41
+ "destroy-on-close": "",
42
+ "confirm-loading": m.value,
43
+ onOk: y,
44
+ onCancel: I
45
+ }, {
46
+ default: o(() => [
47
+ t(C, {
48
+ ref_key: "formRef",
49
+ ref: f,
50
+ model: e,
51
+ rules: b,
52
+ "label-col": { span: 5 },
53
+ "wrapper-col": { span: 12 }
54
+ }, {
55
+ default: o(() => [
56
+ t(s, {
57
+ label: "对象ID",
58
+ name: "objectId"
59
+ }, {
60
+ default: o(() => [
61
+ t(u, {
62
+ value: e.objectId,
63
+ "onUpdate:value": a[0] || (a[0] = (l) => e.objectId = l),
64
+ placeholder: "对象ID"
65
+ }, null, 8, ["value"])
66
+ ]),
67
+ _: 1
68
+ }),
69
+ t(s, {
70
+ label: "对象KEY",
71
+ name: "metaKey"
72
+ }, {
73
+ default: o(() => [
74
+ t(u, {
75
+ value: e.metaKey,
76
+ "onUpdate:value": a[1] || (a[1] = (l) => e.metaKey = l),
77
+ placeholder: "对象KEY"
78
+ }, null, 8, ["value"])
79
+ ]),
80
+ _: 1
81
+ }),
82
+ t(s, { label: "对象值" }, {
83
+ default: o(() => [
84
+ t(u, {
85
+ value: e.metaValue,
86
+ "onUpdate:value": a[2] || (a[2] = (l) => e.metaValue = l),
87
+ placeholder: "对象值"
88
+ }, null, 8, ["value"])
89
+ ]),
90
+ _: 1
91
+ }),
92
+ t(s, {
93
+ label: "描述",
94
+ name: "remark"
95
+ }, {
96
+ default: o(() => [
97
+ t(K, {
98
+ value: e.remark,
99
+ "onUpdate:value": a[3] || (a[3] = (l) => e.remark = l)
100
+ }, null, 8, ["value"])
101
+ ]),
102
+ _: 1
103
+ })
104
+ ]),
105
+ _: 1
106
+ }, 8, ["model"])
107
+ ]),
108
+ _: 1
109
+ }, 8, ["open", "confirm-loading"]);
110
+ };
111
+ }
112
+ });
113
+ export {
114
+ q as default
115
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./MetadataCreate.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,179 @@
1
+ import { defineComponent as M, ref as f, reactive as j, resolveComponent as o, openBlock as p, createElementBlock as _, createElementVNode as m, createVNode as e, withCtx as a, createTextVNode as l, unref as s, Fragment as b, toDisplayString as B, createCommentVNode as R } from "vue";
2
+ import { ProfileTwoTone as F, PlusOutlined as Y } from "@ant-design/icons-vue";
3
+ import { queryMetadatas as z, deleteMetadata as O } from "./api.js";
4
+ import { message as y } from "ant-design-vue";
5
+ import { FxCardTable as A, ClickCopy as G } from "@since2006/components";
6
+ import H from "./MetadataCreate.vue.js";
7
+ import J from "./MetadataUpdate.vue.js";
8
+ const L = { class: "ant-pro-table" }, Q = { class: "ant-pro-table-search" }, W = ["onClick"], le = /* @__PURE__ */ M({
9
+ __name: "MetadataIndex",
10
+ setup(X) {
11
+ const n = f(), g = [
12
+ {
13
+ title: "对象ID",
14
+ dataIndex: "objectId"
15
+ },
16
+ {
17
+ title: "对象KEY",
18
+ dataIndex: "metaKey"
19
+ },
20
+ {
21
+ title: "对象值",
22
+ dataIndex: "metaValue"
23
+ },
24
+ {
25
+ title: "描述",
26
+ dataIndex: "remark"
27
+ },
28
+ {
29
+ title: "操作",
30
+ dataIndex: "action",
31
+ width: 150
32
+ }
33
+ ], d = j({
34
+ query: void 0
35
+ }), u = () => {
36
+ n.value.refresh();
37
+ }, q = () => {
38
+ d.query = void 0, u();
39
+ }, S = (i) => {
40
+ O(i.id).then(() => {
41
+ y.success("删除元数据成功"), n.value.refresh();
42
+ });
43
+ }, v = f(), C = f(), U = () => {
44
+ v.value.preCreate();
45
+ }, V = (i) => {
46
+ C.value.preUpdate(i.id);
47
+ }, h = () => {
48
+ y.success("添加元数据成功"), n.value.refresh();
49
+ }, w = () => {
50
+ y.success("编辑元数据成功"), n.value.refresh();
51
+ };
52
+ return (i, t) => {
53
+ const E = o("a-input"), D = o("a-form-item"), x = o("a-col"), c = o("a-button"), K = o("a-row"), N = o("a-form"), P = o("a-divider"), T = o("a-popconfirm");
54
+ return p(), _("div", null, [
55
+ m("div", L, [
56
+ m("div", Q, [
57
+ e(N, { layout: "horizontal" }, {
58
+ default: a(() => [
59
+ e(K, {
60
+ gutter: 16,
61
+ type: "flex",
62
+ justify: "start"
63
+ }, {
64
+ default: a(() => [
65
+ e(x, {
66
+ xs: 24,
67
+ sm: 24,
68
+ md: 12,
69
+ lg: 7
70
+ }, {
71
+ default: a(() => [
72
+ e(D, { label: "搜索" }, {
73
+ default: a(() => [
74
+ e(E, {
75
+ value: d.query,
76
+ "onUpdate:value": t[0] || (t[0] = (r) => d.query = r),
77
+ placeholder: "对象ID、对象KEY、备注",
78
+ onPressEnter: u
79
+ }, null, 8, ["value"])
80
+ ]),
81
+ _: 1
82
+ })
83
+ ]),
84
+ _: 1
85
+ }),
86
+ e(x, null, {
87
+ default: a(() => [
88
+ e(c, {
89
+ onClick: u,
90
+ type: "primary"
91
+ }, {
92
+ default: a(() => t[1] || (t[1] = [
93
+ l("搜索")
94
+ ])),
95
+ _: 1
96
+ }),
97
+ e(c, {
98
+ onClick: q,
99
+ style: { "margin-left": "16px" }
100
+ }, {
101
+ default: a(() => t[2] || (t[2] = [
102
+ l("重置")
103
+ ])),
104
+ _: 1
105
+ })
106
+ ]),
107
+ _: 1
108
+ })
109
+ ]),
110
+ _: 1
111
+ })
112
+ ]),
113
+ _: 1
114
+ })
115
+ ]),
116
+ e(s(A), {
117
+ columns: g,
118
+ "load-data": s(z),
119
+ params: d,
120
+ ref_key: "tableRef",
121
+ ref: n
122
+ }, {
123
+ title: a(() => [
124
+ e(s(F)),
125
+ t[3] || (t[3] = l(" 元数据配置"))
126
+ ]),
127
+ toolbar: a(() => [
128
+ e(c, {
129
+ type: "primary",
130
+ onClick: U
131
+ }, {
132
+ default: a(() => [
133
+ e(s(Y)),
134
+ t[4] || (t[4] = l(" 新建 "))
135
+ ]),
136
+ _: 1
137
+ })
138
+ ]),
139
+ bodyCell: a(({ column: r, record: k, text: I }) => [
140
+ r.dataIndex === "metaKey" || r.dataIndex === "metaValue" ? (p(), _(b, { key: 0 }, [
141
+ l(B(I) + " ", 1),
142
+ e(s(G), { value: I }, null, 8, ["value"])
143
+ ], 64)) : R("", !0),
144
+ r.dataIndex === "action" ? (p(), _(b, { key: 1 }, [
145
+ m("a", {
146
+ onClick: ($) => V(k)
147
+ }, "编辑", 8, W),
148
+ e(P, { type: "vertical" }),
149
+ e(T, {
150
+ title: "确定要删除吗?",
151
+ onConfirm: ($) => S(k)
152
+ }, {
153
+ default: a(() => t[5] || (t[5] = [
154
+ m("a", null, "删除", -1)
155
+ ])),
156
+ _: 2
157
+ }, 1032, ["onConfirm"])
158
+ ], 64)) : R("", !0)
159
+ ]),
160
+ _: 1
161
+ }, 8, ["load-data", "params"])
162
+ ]),
163
+ e(H, {
164
+ ref_key: "modalCreateRef",
165
+ ref: v,
166
+ onSuccess: h
167
+ }, null, 512),
168
+ e(J, {
169
+ ref_key: "modalUpdateRef",
170
+ ref: C,
171
+ onSuccess: w
172
+ }, null, 512)
173
+ ]);
174
+ };
175
+ }
176
+ });
177
+ export {
178
+ le as default
179
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./MetadataIndex.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,128 @@
1
+ import { defineComponent as x, ref as p, reactive as w, resolveComponent as n, openBlock as C, createBlock as D, withCtx as o, createVNode as t, toRaw as E } from "vue";
2
+ import { getMetadata as R, updateMetadata as V } from "./api.js";
3
+ const q = /* @__PURE__ */ x({
4
+ __name: "MetadataUpdate",
5
+ emits: ["success", "cancel"],
6
+ setup(Y, { expose: v, emit: b }) {
7
+ const s = p(!1);
8
+ v({ preUpdate: (u) => {
9
+ s.value = !0, k(), R(u).then((a) => {
10
+ const c = a.result;
11
+ Object.assign(e, c);
12
+ });
13
+ } });
14
+ const f = b, i = p(), _ = {
15
+ id: null,
16
+ objectId: null,
17
+ metaKey: null,
18
+ metaValue: null,
19
+ remark: null
20
+ }, e = w({ ..._ }), g = {
21
+ objectId: [{ required: !0, message: "请填写对象ID" }],
22
+ metaKey: [{ required: !0, message: "请填写对象KEY" }]
23
+ }, k = () => {
24
+ Object.assign(e, _);
25
+ }, m = p(!1), I = () => {
26
+ i.value.validateFields().then(() => {
27
+ m.value = !0;
28
+ const u = { ...E(e) };
29
+ V(u).then((a) => {
30
+ a.code === 200 && (s.value = !1, f("success"));
31
+ });
32
+ }).finally(() => {
33
+ m.value = !1;
34
+ });
35
+ }, K = () => {
36
+ s.value = !1, f("cancel");
37
+ };
38
+ return (u, a) => {
39
+ const c = n("a-alert"), r = n("a-form-item"), d = n("a-input"), y = n("a-textarea"), j = n("a-form"), U = n("a-modal");
40
+ return C(), D(U, {
41
+ title: "编辑元数据",
42
+ width: 800,
43
+ open: s.value,
44
+ "mask-closable": !1,
45
+ "destroy-on-close": "",
46
+ "confirm-loading": m.value,
47
+ onOk: I,
48
+ onCancel: K
49
+ }, {
50
+ default: o(() => [
51
+ t(j, {
52
+ ref_key: "formRef",
53
+ ref: i,
54
+ model: e,
55
+ rules: g,
56
+ "label-col": { span: 5 },
57
+ "wrapper-col": { span: 12 }
58
+ }, {
59
+ default: o(() => [
60
+ t(r, { "wrapper-col": { span: 24 } }, {
61
+ default: o(() => [
62
+ t(c, {
63
+ message: "请谨慎修改“对象ID”和“对象KEY”的内容,实际使用中一般硬编码在代码中。",
64
+ banner: ""
65
+ })
66
+ ]),
67
+ _: 1
68
+ }),
69
+ t(r, {
70
+ label: "对象ID",
71
+ name: "objectId"
72
+ }, {
73
+ default: o(() => [
74
+ t(d, {
75
+ value: e.objectId,
76
+ "onUpdate:value": a[0] || (a[0] = (l) => e.objectId = l),
77
+ placeholder: "对象ID"
78
+ }, null, 8, ["value"])
79
+ ]),
80
+ _: 1
81
+ }),
82
+ t(r, {
83
+ label: "对象KEY",
84
+ name: "metaKey"
85
+ }, {
86
+ default: o(() => [
87
+ t(d, {
88
+ value: e.metaKey,
89
+ "onUpdate:value": a[1] || (a[1] = (l) => e.metaKey = l),
90
+ placeholder: "对象KEY"
91
+ }, null, 8, ["value"])
92
+ ]),
93
+ _: 1
94
+ }),
95
+ t(r, { label: "对象值" }, {
96
+ default: o(() => [
97
+ t(d, {
98
+ value: e.metaValue,
99
+ "onUpdate:value": a[2] || (a[2] = (l) => e.metaValue = l),
100
+ placeholder: "对象值"
101
+ }, null, 8, ["value"])
102
+ ]),
103
+ _: 1
104
+ }),
105
+ t(r, {
106
+ label: "描述",
107
+ name: "remark"
108
+ }, {
109
+ default: o(() => [
110
+ t(y, {
111
+ value: e.remark,
112
+ "onUpdate:value": a[3] || (a[3] = (l) => e.remark = l)
113
+ }, null, 8, ["value"])
114
+ ]),
115
+ _: 1
116
+ })
117
+ ]),
118
+ _: 1
119
+ }, 8, ["model"])
120
+ ]),
121
+ _: 1
122
+ }, 8, ["open", "confirm-loading"]);
123
+ };
124
+ }
125
+ });
126
+ export {
127
+ q as default
128
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./MetadataUpdate.vue.js";
2
+ export {
3
+ f as default
4
+ };