@since2006/pages 2025.8.7 → 2025.11.1

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 (139) hide show
  1. package/dist/es/index.js +18 -14
  2. package/dist/es/src/app/attachment/AttachmentEdit.vue.js +43 -40
  3. package/dist/es/src/app/attachment/{AttachmentList.vue.js → AttachmentIndex.vue.js} +21 -21
  4. package/dist/es/src/app/attachment/AttachmentIndex.vue2.js +4 -0
  5. package/dist/es/src/app/attachment/api.js +6 -6
  6. package/dist/es/src/app/attachment/index.js +1 -1
  7. package/dist/es/src/app/dict/DictEdit.vue.js +46 -46
  8. package/dist/es/src/app/dict/DictIndex.vue.js +2 -2
  9. package/dist/es/src/app/dict/DictItemEdit.vue.js +1 -1
  10. package/dist/es/src/app/dict/DictItemEdit.vue2.js +39 -38
  11. package/dist/es/src/app/dict/DictPanel.vue.js +2 -2
  12. package/dist/es/src/app/dict/DictPanel.vue2.js +80 -80
  13. package/dist/es/src/app/dict/api.js +22 -20
  14. package/dist/es/src/app/log/api.js +39 -7
  15. package/dist/es/src/app/log/components/AccessLogDetail.vue.js +7 -0
  16. package/dist/es/src/app/log/components/AccessLogDetail.vue2.js +240 -0
  17. package/dist/es/src/app/log/components/AccessLogList.vue.js +7 -0
  18. package/dist/es/src/app/log/components/AccessLogList.vue2.js +452 -0
  19. package/dist/es/src/app/log/components/AuditLogDetail.vue.js +7 -0
  20. package/dist/es/src/app/log/components/AuditLogDetail.vue2.js +163 -0
  21. package/dist/es/src/app/log/components/AuditLogList.vue.js +7 -0
  22. package/dist/es/src/app/log/components/AuditLogList.vue2.js +325 -0
  23. package/dist/es/src/app/log/components/ErrorLogDetail.vue.js +7 -0
  24. package/dist/es/src/app/log/components/ErrorLogDetail.vue2.js +187 -0
  25. package/dist/es/src/app/log/components/ErrorLogList.vue.js +7 -0
  26. package/dist/es/src/app/log/components/ErrorLogList.vue2.js +310 -0
  27. package/dist/es/src/app/log/components/LoginLogDetail.vue.js +7 -0
  28. package/dist/es/src/app/log/components/LoginLogDetail.vue2.js +182 -0
  29. package/dist/es/src/app/log/components/LoginLogList.vue.js +7 -0
  30. package/dist/es/src/app/log/components/LoginLogList.vue2.js +303 -0
  31. package/dist/es/src/app/log/components/OperationLogDetail.vue.js +7 -0
  32. package/dist/es/src/app/log/components/OperationLogDetail.vue2.js +229 -0
  33. package/dist/es/src/app/log/components/OperationLogList.vue.js +7 -0
  34. package/dist/es/src/app/log/components/OperationLogList.vue2.js +333 -0
  35. package/dist/es/src/app/log/index.js +12 -5
  36. package/dist/es/src/app/log/ua-icons.vue.js +2 -2
  37. package/dist/es/src/app/log/ua-icons.vue2.js +58 -26
  38. package/dist/es/src/app/metadata/MetadataIndex.vue.js +1 -1
  39. package/dist/es/src/app/metadata/MetadataUpdate.vue.js +1 -1
  40. package/dist/es/src/app/metadata/api.js +5 -5
  41. package/dist/es/src/app/module/ModuleAdd.vue.js +1 -1
  42. package/dist/es/src/app/module/ModuleAdd.vue2.js +70 -66
  43. package/dist/es/src/app/module/ModuleDetail.vue.js +10 -10
  44. package/dist/es/src/app/module/ModuleEdit.vue.js +2 -2
  45. package/dist/es/src/app/module/ModuleEdit.vue2.js +74 -70
  46. package/dist/es/src/app/module/ModuleIndex.vue.js +2 -2
  47. package/dist/es/src/app/module/ModuleIndex.vue2.js +35 -35
  48. package/dist/es/src/app/module/api.js +10 -6
  49. package/dist/es/src/app/module/icon/IconSelectorModal.vue.js +2 -2
  50. package/dist/es/src/app/schedule/CronTypeSelect.vue.js +32 -32
  51. package/dist/es/src/app/schedule/ScheduleAdd.vue.js +3 -3
  52. package/dist/es/src/app/schedule/ScheduleAdd.vue2.js +38 -38
  53. package/dist/es/src/app/schedule/ScheduleEdit.vue.js +1 -1
  54. package/dist/es/src/app/schedule/ScheduleEdit.vue2.js +56 -56
  55. package/dist/es/src/app/schedule/ScheduleIndex.vue.js +18 -18
  56. package/dist/es/src/app/schedule/ScheduleLogList.vue.js +26 -26
  57. package/dist/es/src/app/schedule/ScheduleLogView.vue.js +3 -3
  58. package/dist/es/src/app/schedule/ScheduleLogView.vue2.js +7 -7
  59. package/dist/es/src/app/schedule/api.js +14 -14
  60. package/dist/es/src/app/system/StatusIndex.vue.js +1 -1
  61. package/dist/es/src/app/system/StatusIndex.vue2.js +109 -111
  62. package/dist/es/src/app/system/api.js +2 -3
  63. package/dist/es/src/index.js +17 -13
  64. package/dist/es/style.css +1 -1
  65. package/dist/lib/index.js +1 -1
  66. package/dist/lib/src/app/attachment/AttachmentEdit.vue.js +1 -1
  67. package/dist/lib/src/app/attachment/AttachmentIndex.vue.js +1 -0
  68. package/dist/lib/src/app/attachment/{AttachmentList.vue2.js → AttachmentIndex.vue2.js} +1 -1
  69. package/dist/lib/src/app/attachment/api.js +1 -1
  70. package/dist/lib/src/app/attachment/index.js +1 -1
  71. package/dist/lib/src/app/dict/DictEdit.vue.js +1 -1
  72. package/dist/lib/src/app/dict/DictIndex.vue.js +1 -1
  73. package/dist/lib/src/app/dict/DictItemEdit.vue.js +1 -1
  74. package/dist/lib/src/app/dict/DictItemEdit.vue2.js +1 -1
  75. package/dist/lib/src/app/dict/DictPanel.vue.js +1 -1
  76. package/dist/lib/src/app/dict/DictPanel.vue2.js +1 -1
  77. package/dist/lib/src/app/dict/api.js +1 -1
  78. package/dist/lib/src/app/log/api.js +1 -1
  79. package/dist/lib/src/app/log/components/AccessLogDetail.vue.js +1 -0
  80. package/dist/lib/src/app/log/components/AccessLogDetail.vue2.js +1 -0
  81. package/dist/lib/src/app/log/components/AccessLogList.vue.js +1 -0
  82. package/dist/lib/src/app/log/components/AccessLogList.vue2.js +1 -0
  83. package/dist/lib/src/app/log/components/AuditLogDetail.vue.js +1 -0
  84. package/dist/lib/src/app/log/components/AuditLogDetail.vue2.js +1 -0
  85. package/dist/lib/src/app/log/components/AuditLogList.vue.js +1 -0
  86. package/dist/lib/src/app/log/components/AuditLogList.vue2.js +1 -0
  87. package/dist/lib/src/app/log/components/ErrorLogDetail.vue.js +1 -0
  88. package/dist/lib/src/app/log/components/ErrorLogDetail.vue2.js +1 -0
  89. package/dist/lib/src/app/log/components/ErrorLogList.vue.js +1 -0
  90. package/dist/lib/src/app/log/components/ErrorLogList.vue2.js +1 -0
  91. package/dist/lib/src/app/log/components/LoginLogDetail.vue.js +1 -0
  92. package/dist/lib/src/app/log/components/LoginLogDetail.vue2.js +1 -0
  93. package/dist/lib/src/app/log/components/LoginLogList.vue.js +1 -0
  94. package/dist/lib/src/app/log/components/LoginLogList.vue2.js +1 -0
  95. package/dist/lib/src/app/log/components/OperationLogDetail.vue.js +1 -0
  96. package/dist/lib/src/app/log/components/OperationLogDetail.vue2.js +1 -0
  97. package/dist/lib/src/app/log/components/OperationLogList.vue.js +1 -0
  98. package/dist/lib/src/app/log/components/OperationLogList.vue2.js +1 -0
  99. package/dist/lib/src/app/log/index.js +1 -1
  100. package/dist/lib/src/app/log/ua-icons.vue.js +1 -1
  101. package/dist/lib/src/app/log/ua-icons.vue2.js +1 -1
  102. package/dist/lib/src/app/metadata/MetadataIndex.vue.js +1 -1
  103. package/dist/lib/src/app/metadata/MetadataUpdate.vue.js +1 -1
  104. package/dist/lib/src/app/metadata/api.js +1 -1
  105. package/dist/lib/src/app/module/ModuleAdd.vue.js +1 -1
  106. package/dist/lib/src/app/module/ModuleAdd.vue2.js +1 -1
  107. package/dist/lib/src/app/module/ModuleDetail.vue.js +1 -1
  108. package/dist/lib/src/app/module/ModuleEdit.vue.js +1 -1
  109. package/dist/lib/src/app/module/ModuleEdit.vue2.js +1 -1
  110. package/dist/lib/src/app/module/ModuleIndex.vue.js +1 -1
  111. package/dist/lib/src/app/module/ModuleIndex.vue2.js +1 -1
  112. package/dist/lib/src/app/module/api.js +1 -1
  113. package/dist/lib/src/app/module/icon/IconSelectorModal.vue.js +1 -1
  114. package/dist/lib/src/app/schedule/CronTypeSelect.vue.js +1 -1
  115. package/dist/lib/src/app/schedule/ScheduleAdd.vue.js +1 -1
  116. package/dist/lib/src/app/schedule/ScheduleAdd.vue2.js +1 -1
  117. package/dist/lib/src/app/schedule/ScheduleEdit.vue.js +1 -1
  118. package/dist/lib/src/app/schedule/ScheduleEdit.vue2.js +1 -1
  119. package/dist/lib/src/app/schedule/ScheduleIndex.vue.js +1 -1
  120. package/dist/lib/src/app/schedule/ScheduleLogList.vue.js +1 -1
  121. package/dist/lib/src/app/schedule/ScheduleLogView.vue.js +1 -1
  122. package/dist/lib/src/app/schedule/ScheduleLogView.vue2.js +1 -1
  123. package/dist/lib/src/app/schedule/api.js +1 -1
  124. package/dist/lib/src/app/system/StatusIndex.vue.js +1 -1
  125. package/dist/lib/src/app/system/StatusIndex.vue2.js +1 -1
  126. package/dist/lib/src/app/system/api.js +1 -1
  127. package/dist/lib/src/index.js +1 -1
  128. package/dist/lib/style.css +1 -1
  129. package/package.json +4 -1
  130. package/dist/es/src/app/attachment/AttachmentList.vue2.js +0 -4
  131. package/dist/es/src/app/log/LogIndex.vue.js +0 -238
  132. package/dist/es/src/app/log/LogIndex.vue2.js +0 -4
  133. package/dist/es/src/app/log/LogView.vue.js +0 -7
  134. package/dist/es/src/app/log/LogView.vue2.js +0 -164
  135. package/dist/lib/src/app/attachment/AttachmentList.vue.js +0 -1
  136. package/dist/lib/src/app/log/LogIndex.vue.js +0 -1
  137. package/dist/lib/src/app/log/LogIndex.vue2.js +0 -1
  138. package/dist/lib/src/app/log/LogView.vue.js +0 -1
  139. package/dist/lib/src/app/log/LogView.vue2.js +0 -1
@@ -0,0 +1,7 @@
1
+ import o from "./AuditLogDetail.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bdeeb034"]]);
5
+ export {
6
+ i as default
7
+ };
@@ -0,0 +1,163 @@
1
+ import { defineComponent as A, ref as g, reactive as S, watch as V, resolveComponent as r, openBlock as f, createBlock as u, withCtx as o, createVNode as a, createTextVNode as s, toDisplayString as l, createElementVNode as j, createCommentVNode as b, unref as B } from "vue";
2
+ import { message as y } from "ant-design-vue";
3
+ import { getAuditLog as J } from "../api.js";
4
+ import { CodeDiff as L } from "v-code-diff";
5
+ const F = /* @__PURE__ */ A({
6
+ __name: "AuditLogDetail",
7
+ props: {
8
+ open: {
9
+ type: Boolean,
10
+ default: !1
11
+ },
12
+ logId: {
13
+ type: String,
14
+ default: ""
15
+ }
16
+ },
17
+ emits: ["update:open", "refresh"],
18
+ setup(p, { emit: h }) {
19
+ const i = p, D = h, c = g(!1), w = g(!1), e = S({});
20
+ V(
21
+ () => i.open,
22
+ (t) => {
23
+ t && i.logId ? I() : (Object.assign(e, {}), w.value = !1);
24
+ }
25
+ );
26
+ const I = async () => {
27
+ if (i.logId) {
28
+ c.value = !0;
29
+ try {
30
+ const t = await J({ id: i.logId });
31
+ t.code === 200 ? Object.assign(e, t.data) : y.error(t.message || "获取日志详情失败");
32
+ } catch (t) {
33
+ y.error("获取日志详情失败"), console.error("Error loading audit log detail:", t);
34
+ } finally {
35
+ c.value = !1;
36
+ }
37
+ }
38
+ }, C = () => {
39
+ D("update:open", !1);
40
+ }, N = (t) => ({
41
+ 创建: "green",
42
+ 更新: "blue",
43
+ 删除: "red",
44
+ 查看: "default"
45
+ })[t] || "default", m = (t) => {
46
+ try {
47
+ const d = JSON.parse(t);
48
+ return JSON.stringify(d, null, 2);
49
+ } catch {
50
+ return t;
51
+ }
52
+ };
53
+ return (t, d) => {
54
+ const n = r("a-descriptions-item"), _ = r("a-tag"), v = r("a-alert"), O = r("a-descriptions"), k = r("a-spin"), x = r("a-modal");
55
+ return f(), u(x, {
56
+ title: "审计日志详情",
57
+ width: 1e3,
58
+ footer: null,
59
+ open: p.open,
60
+ onCancel: C,
61
+ destroyOnClose: !0
62
+ }, {
63
+ default: o(() => [
64
+ a(k, { spinning: c.value }, {
65
+ default: o(() => [
66
+ Object.keys(e).length > 0 ? (f(), u(O, {
67
+ key: 0,
68
+ column: 1,
69
+ bordered: "",
70
+ size: "small"
71
+ }, {
72
+ default: o(() => [
73
+ a(n, { label: "操作者" }, {
74
+ default: o(() => [
75
+ s(l(e.operatorName || "-"), 1)
76
+ ]),
77
+ _: 1
78
+ }),
79
+ a(n, { label: "操作者ID" }, {
80
+ default: o(() => [
81
+ s(l(e.operatorId || "-"), 1)
82
+ ]),
83
+ _: 1
84
+ }),
85
+ a(n, { label: "目标类型" }, {
86
+ default: o(() => [
87
+ a(_, { color: "blue" }, {
88
+ default: o(() => [
89
+ s(l(e.targetType || "-"), 1)
90
+ ]),
91
+ _: 1
92
+ })
93
+ ]),
94
+ _: 1
95
+ }),
96
+ a(n, { label: "目标ID" }, {
97
+ default: o(() => [
98
+ j("code", null, l(e.targetId || "-"), 1)
99
+ ]),
100
+ _: 1
101
+ }),
102
+ a(n, { label: "执行动作" }, {
103
+ default: o(() => [
104
+ a(_, {
105
+ color: N(e.action)
106
+ }, {
107
+ default: o(() => [
108
+ s(l(e.action), 1)
109
+ ]),
110
+ _: 1
111
+ }, 8, ["color"])
112
+ ]),
113
+ _: 1
114
+ }),
115
+ a(n, { label: "IP地址" }, {
116
+ default: o(() => [
117
+ s(l(e.ipAddress || "-"), 1)
118
+ ]),
119
+ _: 1
120
+ }),
121
+ e.comment ? (f(), u(n, {
122
+ key: 0,
123
+ label: "操作备注"
124
+ }, {
125
+ default: o(() => [
126
+ a(v, {
127
+ message: e.comment,
128
+ type: "info",
129
+ "show-icon": ""
130
+ }, null, 8, ["message"])
131
+ ]),
132
+ _: 1
133
+ })) : b("", !0),
134
+ a(n, { label: "记录时间" }, {
135
+ default: o(() => [
136
+ s(l(e.auditTime), 1)
137
+ ]),
138
+ _: 1
139
+ })
140
+ ]),
141
+ _: 1
142
+ })) : b("", !0),
143
+ a(B(L), {
144
+ "old-string": e.beforeData ? m(e.beforeData) : "",
145
+ "new-string": e.afterData ? m(e.afterData) : "",
146
+ language: "json",
147
+ "output-format": "side-by-side",
148
+ filename: "操作前数据",
149
+ newFilename: "操作后数据",
150
+ hideStat: ""
151
+ }, null, 8, ["old-string", "new-string"])
152
+ ]),
153
+ _: 1
154
+ }, 8, ["spinning"])
155
+ ]),
156
+ _: 1
157
+ }, 8, ["open"]);
158
+ };
159
+ }
160
+ });
161
+ export {
162
+ F as default
163
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./AuditLogList.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-13310236"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,325 @@
1
+ import { defineComponent as j, ref as C, reactive as h, computed as $, resolveComponent as d, openBlock as s, createElementBlock as I, createElementVNode as x, createVNode as t, withCtx as a, createTextVNode as r, unref as v, createBlock as y, toDisplayString as m, Fragment as G, createCommentVNode as K, nextTick as A } from "vue";
2
+ import { message as M } from "ant-design-vue";
3
+ import { SafetyCertificateTwoTone as Q, DownloadOutlined as W } from "@ant-design/icons-vue";
4
+ import { queryAuditLogs as X } from "../api.js";
5
+ import Z from "./AuditLogDetail.vue.js";
6
+ import { FxCardTable as ee } from "@since2006/components";
7
+ const te = { class: "audit-log-list" }, ae = { class: "ant-pro-table" }, oe = { class: "ant-pro-table-search" }, ne = { class: "text-ellipsis" }, le = { class: "text-ellipsis" }, de = ["onClick"], ce = /* @__PURE__ */ j({
8
+ __name: "AuditLogList",
9
+ setup(re) {
10
+ const w = C(), T = C(!1), k = C(!1), q = [
11
+ {
12
+ title: "操作者",
13
+ dataIndex: "operatorName",
14
+ width: "120px",
15
+ fixed: "left"
16
+ },
17
+ {
18
+ title: "目标类型",
19
+ dataIndex: "targetType",
20
+ width: "140px"
21
+ },
22
+ {
23
+ title: "操作动作",
24
+ dataIndex: "action",
25
+ width: "140px"
26
+ },
27
+ {
28
+ title: "操作备注",
29
+ dataIndex: "comment",
30
+ width: "300px",
31
+ ellipsis: !0
32
+ },
33
+ {
34
+ title: "IP地址",
35
+ dataIndex: "ipAddress",
36
+ width: "140px"
37
+ },
38
+ {
39
+ title: "记录时间",
40
+ dataIndex: "auditTime",
41
+ width: "180px",
42
+ sorter: !0
43
+ },
44
+ {
45
+ title: "操作",
46
+ dataIndex: "op",
47
+ width: "80px",
48
+ fixed: "right"
49
+ }
50
+ ], D = {
51
+ operatorName: void 0,
52
+ action: void 0,
53
+ ipAddress: void 0,
54
+ dateRange: void 0,
55
+ query: void 0
56
+ }, o = h({ ...D }), P = $(() => ({
57
+ page: 1,
58
+ pageSize: 20,
59
+ operatorName: o.operatorName,
60
+ action: o.action,
61
+ ipAddress: o.ipAddress,
62
+ startDate: o.dateRange ? o.dateRange[0].format("YYYY-MM-DD HH:mm") + ":00" : void 0,
63
+ endDate: o.dateRange ? o.dateRange[1].format("YYYY-MM-DD HH:mm") + ":59" : void 0,
64
+ query: o.query,
65
+ sorting: void 0
66
+ })), p = h({
67
+ open: !1,
68
+ logId: ""
69
+ }), u = () => {
70
+ var n;
71
+ (n = w.value) == null || n.refresh();
72
+ }, H = async (n) => {
73
+ o.action = n, await A(), u();
74
+ }, E = async () => {
75
+ Object.assign(o, D), await A(), u();
76
+ }, L = () => {
77
+ var n;
78
+ (n = w.value) == null || n.refresh();
79
+ }, S = async () => {
80
+ k.value = !0;
81
+ try {
82
+ M.success("导出成功");
83
+ } catch {
84
+ M.error("导出失败");
85
+ } finally {
86
+ k.value = !1;
87
+ }
88
+ }, U = (n) => ({
89
+ 创建: "green",
90
+ 更新: "blue",
91
+ 删除: "red",
92
+ 查看: "default"
93
+ })[n] || "default", _ = (n) => {
94
+ try {
95
+ const e = JSON.parse(n);
96
+ return JSON.stringify(e, null, 2);
97
+ } catch {
98
+ return n;
99
+ }
100
+ }, V = (n) => {
101
+ p.open = !0, p.logId = n.id;
102
+ };
103
+ return (n, e) => {
104
+ const N = d("a-input"), c = d("a-form-item"), f = d("a-col"), g = d("a-select-option"), O = d("a-select"), B = d("a-range-picker"), b = d("a-button"), F = d("a-row"), J = d("a-form"), z = d("a-space"), R = d("a-tag"), Y = d("a-tooltip");
105
+ return s(), I("div", te, [
106
+ x("div", ae, [
107
+ x("div", oe, [
108
+ t(J, { layout: "horizontal" }, {
109
+ default: a(() => [
110
+ t(F, {
111
+ gutter: 16,
112
+ type: "flex",
113
+ justify: "start"
114
+ }, {
115
+ default: a(() => [
116
+ t(f, { flex: "240px" }, {
117
+ default: a(() => [
118
+ t(c, { label: "搜索" }, {
119
+ default: a(() => [
120
+ t(N, {
121
+ value: o.query,
122
+ "onUpdate:value": e[0] || (e[0] = (l) => o.query = l),
123
+ placeholder: "目标类型、备注、IP等",
124
+ onPressEnter: u,
125
+ allowClear: ""
126
+ }, null, 8, ["value"])
127
+ ]),
128
+ _: 1
129
+ })
130
+ ]),
131
+ _: 1
132
+ }),
133
+ t(f, { flex: "200px" }, {
134
+ default: a(() => [
135
+ t(c, { label: "操作者" }, {
136
+ default: a(() => [
137
+ t(N, {
138
+ value: o.operatorName,
139
+ "onUpdate:value": e[1] || (e[1] = (l) => o.operatorName = l),
140
+ onPressEnter: u,
141
+ allowClear: ""
142
+ }, null, 8, ["value"])
143
+ ]),
144
+ _: 1
145
+ })
146
+ ]),
147
+ _: 1
148
+ }),
149
+ t(f, { flex: "200px" }, {
150
+ default: a(() => [
151
+ t(c, { label: "操作动作" }, {
152
+ default: a(() => [
153
+ t(O, {
154
+ value: o.action,
155
+ "onUpdate:value": e[2] || (e[2] = (l) => o.action = l),
156
+ placeholder: "选择或输入",
157
+ allowClear: "",
158
+ onChange: H
159
+ }, {
160
+ default: a(() => [
161
+ t(g, { value: "创建" }, {
162
+ default: a(() => e[5] || (e[5] = [
163
+ r("创建")
164
+ ])),
165
+ _: 1
166
+ }),
167
+ t(g, { value: "更新" }, {
168
+ default: a(() => e[6] || (e[6] = [
169
+ r("更新")
170
+ ])),
171
+ _: 1
172
+ }),
173
+ t(g, { value: "删除" }, {
174
+ default: a(() => e[7] || (e[7] = [
175
+ r("删除")
176
+ ])),
177
+ _: 1
178
+ }),
179
+ t(g, { value: "查看" }, {
180
+ default: a(() => e[8] || (e[8] = [
181
+ r("查看")
182
+ ])),
183
+ _: 1
184
+ })
185
+ ]),
186
+ _: 1
187
+ }, 8, ["value"])
188
+ ]),
189
+ _: 1
190
+ })
191
+ ]),
192
+ _: 1
193
+ }),
194
+ t(f, { flex: "400px" }, {
195
+ default: a(() => [
196
+ t(c, { label: "时间范围" }, {
197
+ default: a(() => [
198
+ t(B, {
199
+ value: o.dateRange,
200
+ "onUpdate:value": e[3] || (e[3] = (l) => o.dateRange = l),
201
+ "show-time": "",
202
+ format: "YYYY-MM-DD HH:mm"
203
+ }, null, 8, ["value"])
204
+ ]),
205
+ _: 1
206
+ })
207
+ ]),
208
+ _: 1
209
+ }),
210
+ t(f, null, {
211
+ default: a(() => [
212
+ t(b, {
213
+ onClick: u,
214
+ type: "primary",
215
+ loading: T.value
216
+ }, {
217
+ default: a(() => e[9] || (e[9] = [
218
+ r("搜索")
219
+ ])),
220
+ _: 1
221
+ }, 8, ["loading"]),
222
+ t(b, {
223
+ onClick: E,
224
+ style: { "margin-left": "8px" }
225
+ }, {
226
+ default: a(() => e[10] || (e[10] = [
227
+ r("重置")
228
+ ])),
229
+ _: 1
230
+ })
231
+ ]),
232
+ _: 1
233
+ })
234
+ ]),
235
+ _: 1
236
+ })
237
+ ]),
238
+ _: 1
239
+ })
240
+ ]),
241
+ t(v(ee), {
242
+ columns: q,
243
+ "load-data": v(X),
244
+ params: P.value,
245
+ ref_key: "tableRef",
246
+ ref: w,
247
+ "row-key": "id"
248
+ }, {
249
+ title: a(() => [
250
+ t(v(Q)),
251
+ e[11] || (e[11] = r(" 审计日志 "))
252
+ ]),
253
+ extra: a(() => [
254
+ t(z, null, {
255
+ default: a(() => [
256
+ t(b, {
257
+ onClick: S,
258
+ loading: k.value
259
+ }, {
260
+ default: a(() => [
261
+ t(v(W)),
262
+ e[12] || (e[12] = r(" 导出 "))
263
+ ]),
264
+ _: 1
265
+ }, 8, ["loading"])
266
+ ]),
267
+ _: 1
268
+ })
269
+ ]),
270
+ bodyCell: a(({ column: l, record: i }) => [
271
+ l.dataIndex === "action" ? (s(), y(R, {
272
+ key: 0,
273
+ color: U(i.action)
274
+ }, {
275
+ default: a(() => [
276
+ r(m(i.action), 1)
277
+ ]),
278
+ _: 2
279
+ }, 1032, ["color"])) : l.dataIndex === "targetType" ? (s(), y(R, {
280
+ key: 1,
281
+ color: "blue"
282
+ }, {
283
+ default: a(() => [
284
+ r(m(i.targetType), 1)
285
+ ]),
286
+ _: 2
287
+ }, 1024)) : l.dataIndex === "beforeData" ? (s(), y(Y, {
288
+ key: 2,
289
+ title: _(i.beforeData)
290
+ }, {
291
+ default: a(() => [
292
+ x("span", ne, m(_(i.beforeData)), 1)
293
+ ]),
294
+ _: 2
295
+ }, 1032, ["title"])) : l.dataIndex === "afterData" ? (s(), y(Y, {
296
+ key: 3,
297
+ title: _(i.afterData)
298
+ }, {
299
+ default: a(() => [
300
+ x("span", le, m(_(i.afterData)), 1)
301
+ ]),
302
+ _: 2
303
+ }, 1032, ["title"])) : l.dataIndex === "comment" ? (s(), I(G, { key: 4 }, [
304
+ r(m(i.comment), 1)
305
+ ], 64)) : l.dataIndex === "op" ? (s(), I("a", {
306
+ key: 5,
307
+ onClick: (ie) => V(i)
308
+ }, "详情", 8, de)) : K("", !0)
309
+ ]),
310
+ _: 1
311
+ }, 8, ["load-data", "params"])
312
+ ]),
313
+ t(Z, {
314
+ open: p.open,
315
+ "onUpdate:open": e[4] || (e[4] = (l) => p.open = l),
316
+ "log-id": p.logId,
317
+ onRefresh: L
318
+ }, null, 8, ["open", "log-id"])
319
+ ]);
320
+ };
321
+ }
322
+ });
323
+ export {
324
+ ce as default
325
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./ErrorLogDetail.vue2.js";
2
+ /* empty css */
3
+ import r from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-793d348e"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,187 @@
1
+ import { defineComponent as L, ref as R, reactive as T, watch as V, resolveComponent as s, openBlock as p, createBlock as u, withCtx as t, createVNode as a, createTextVNode as d, toDisplayString as n, createElementVNode as r, createCommentVNode as f } from "vue";
2
+ import { message as b } from "ant-design-vue";
3
+ import { getErrorLog as j } from "../api.js";
4
+ const B = { class: "json-container" }, D = { class: "stack-container" }, z = /* @__PURE__ */ L({
5
+ __name: "ErrorLogDetail",
6
+ props: {
7
+ open: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ logId: {
12
+ type: String,
13
+ default: ""
14
+ }
15
+ },
16
+ emits: ["update:open", "refresh"],
17
+ setup(g, { emit: v }) {
18
+ const i = g, y = v, _ = R(!1), o = T({});
19
+ V(
20
+ () => i.open,
21
+ (e) => {
22
+ e && i.logId ? h() : Object.assign(o, {});
23
+ }
24
+ );
25
+ const h = async () => {
26
+ if (i.logId) {
27
+ _.value = !0;
28
+ try {
29
+ const e = await j({ id: i.logId });
30
+ e.code === 200 ? Object.assign(o, e.data) : b.error(e.message || "获取日志详情失败");
31
+ } catch (e) {
32
+ b.error("获取日志详情失败"), console.error("Error loading error log detail:", e);
33
+ } finally {
34
+ _.value = !1;
35
+ }
36
+ }
37
+ }, k = () => {
38
+ y("update:open", !1);
39
+ }, N = (e) => ({
40
+ ERROR: "red",
41
+ WARN: "orange",
42
+ INFO: "blue"
43
+ })[e] || "default", C = (e) => ({
44
+ dev: "green",
45
+ test: "blue",
46
+ staging: "orange",
47
+ prod: "red"
48
+ })[e] || "default", O = (e) => ({
49
+ dev: "开发",
50
+ test: "测试",
51
+ staging: "预发布",
52
+ prod: "生产"
53
+ })[e] || e || "-", E = (e) => {
54
+ try {
55
+ const c = JSON.parse(e);
56
+ return JSON.stringify(c, null, 2);
57
+ } catch {
58
+ return e;
59
+ }
60
+ };
61
+ return (e, c) => {
62
+ const m = s("a-tag"), l = s("a-descriptions-item"), I = s("a-alert"), M = s("a-descriptions"), w = s("a-spin"), x = s("a-modal");
63
+ return p(), u(x, {
64
+ title: "错误日志详情",
65
+ width: 1e3,
66
+ footer: null,
67
+ open: g.open,
68
+ onCancel: k,
69
+ destroyOnClose: !0
70
+ }, {
71
+ default: t(() => [
72
+ a(w, { spinning: _.value }, {
73
+ default: t(() => [
74
+ Object.keys(o).length > 0 ? (p(), u(M, {
75
+ key: 0,
76
+ column: 1,
77
+ bordered: "",
78
+ size: "small"
79
+ }, {
80
+ default: t(() => [
81
+ a(l, { label: "应用名称" }, {
82
+ default: t(() => [
83
+ a(m, { color: "blue" }, {
84
+ default: t(() => [
85
+ d(n(o.appName || "-"), 1)
86
+ ]),
87
+ _: 1
88
+ })
89
+ ]),
90
+ _: 1
91
+ }),
92
+ a(l, { label: "运行环境" }, {
93
+ default: t(() => [
94
+ a(m, {
95
+ color: C(o.env)
96
+ }, {
97
+ default: t(() => [
98
+ d(n(O(o.env)), 1)
99
+ ]),
100
+ _: 1
101
+ }, 8, ["color"])
102
+ ]),
103
+ _: 1
104
+ }),
105
+ a(l, { label: "日志级别" }, {
106
+ default: t(() => [
107
+ a(m, {
108
+ color: N(o.level)
109
+ }, {
110
+ default: t(() => [
111
+ d(n(o.level), 1)
112
+ ]),
113
+ _: 1
114
+ }, 8, ["color"])
115
+ ]),
116
+ _: 1
117
+ }),
118
+ a(l, { label: "IP地址" }, {
119
+ default: t(() => [
120
+ d(n(o.ipAddress || "-"), 1)
121
+ ]),
122
+ _: 1
123
+ }),
124
+ a(l, { label: "请求路径" }, {
125
+ default: t(() => [
126
+ r("code", null, n(o.path || "-"), 1)
127
+ ]),
128
+ _: 1
129
+ }),
130
+ a(l, { label: "发生时间" }, {
131
+ default: t(() => [
132
+ d(n(o.occurTime), 1)
133
+ ]),
134
+ _: 1
135
+ }),
136
+ a(l, { label: "错误消息" }, {
137
+ default: t(() => [
138
+ a(I, {
139
+ message: o.message,
140
+ type: "error",
141
+ "show-icon": "",
142
+ style: { "margin-bottom": "8px" }
143
+ }, null, 8, ["message"])
144
+ ]),
145
+ _: 1
146
+ }),
147
+ o.params ? (p(), u(l, {
148
+ key: 0,
149
+ label: "请求参数"
150
+ }, {
151
+ default: t(() => [
152
+ r("div", B, [
153
+ r("pre", null, [
154
+ r("code", null, n(E(o.params)), 1)
155
+ ])
156
+ ])
157
+ ]),
158
+ _: 1
159
+ })) : f("", !0),
160
+ o.stackTrace ? (p(), u(l, {
161
+ key: 1,
162
+ label: "堆栈信息"
163
+ }, {
164
+ default: t(() => [
165
+ r("div", D, [
166
+ r("pre", null, [
167
+ r("code", null, n(o.stackTrace), 1)
168
+ ])
169
+ ])
170
+ ]),
171
+ _: 1
172
+ })) : f("", !0)
173
+ ]),
174
+ _: 1
175
+ })) : f("", !0)
176
+ ]),
177
+ _: 1
178
+ }, 8, ["spinning"])
179
+ ]),
180
+ _: 1
181
+ }, 8, ["open"]);
182
+ };
183
+ }
184
+ });
185
+ export {
186
+ z as default
187
+ };