@since2006/pages 2025.8.6 → 2025.11.0

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 (135) hide show
  1. package/dist/es/src/app/attachment/AttachmentEdit.vue.js +43 -40
  2. package/dist/es/src/app/attachment/{AttachmentList.vue.js → AttachmentIndex.vue.js} +21 -21
  3. package/dist/es/src/app/attachment/AttachmentIndex.vue2.js +4 -0
  4. package/dist/es/src/app/attachment/api.js +6 -6
  5. package/dist/es/src/app/attachment/index.js +1 -1
  6. package/dist/es/src/app/dict/DictEdit.vue.js +46 -46
  7. package/dist/es/src/app/dict/DictIndex.vue.js +2 -2
  8. package/dist/es/src/app/dict/DictItemEdit.vue.js +1 -1
  9. package/dist/es/src/app/dict/DictItemEdit.vue2.js +39 -38
  10. package/dist/es/src/app/dict/DictPanel.vue.js +2 -2
  11. package/dist/es/src/app/dict/DictPanel.vue2.js +80 -80
  12. package/dist/es/src/app/dict/api.js +22 -20
  13. package/dist/es/src/app/log/LogIndex.vue.js +5 -236
  14. package/dist/es/src/app/log/LogIndex.vue2.js +174 -2
  15. package/dist/es/src/app/log/api.js +39 -7
  16. package/dist/es/src/app/log/components/AccessLogDetail.vue.js +7 -0
  17. package/dist/es/src/app/log/components/AccessLogDetail.vue2.js +240 -0
  18. package/dist/es/src/app/log/components/AccessLogList.vue.js +7 -0
  19. package/dist/es/src/app/log/components/AccessLogList.vue2.js +452 -0
  20. package/dist/es/src/app/log/components/AuditLogDetail.vue.js +7 -0
  21. package/dist/es/src/app/log/components/AuditLogDetail.vue2.js +163 -0
  22. package/dist/es/src/app/log/components/AuditLogList.vue.js +7 -0
  23. package/dist/es/src/app/log/components/AuditLogList.vue2.js +325 -0
  24. package/dist/es/src/app/log/components/ErrorLogDetail.vue.js +7 -0
  25. package/dist/es/src/app/log/components/ErrorLogDetail.vue2.js +187 -0
  26. package/dist/es/src/app/log/components/ErrorLogList.vue.js +7 -0
  27. package/dist/es/src/app/log/components/ErrorLogList.vue2.js +310 -0
  28. package/dist/es/src/app/log/components/LoginLogDetail.vue.js +7 -0
  29. package/dist/es/src/app/log/components/LoginLogDetail.vue2.js +182 -0
  30. package/dist/es/src/app/log/components/LoginLogList.vue.js +7 -0
  31. package/dist/es/src/app/log/components/LoginLogList.vue2.js +303 -0
  32. package/dist/es/src/app/log/components/OperationLogDetail.vue.js +7 -0
  33. package/dist/es/src/app/log/components/OperationLogDetail.vue2.js +229 -0
  34. package/dist/es/src/app/log/components/OperationLogList.vue.js +7 -0
  35. package/dist/es/src/app/log/components/OperationLogList.vue2.js +333 -0
  36. package/dist/es/src/app/log/index.js +3 -3
  37. package/dist/es/src/app/log/ua-icons.vue.js +2 -2
  38. package/dist/es/src/app/log/ua-icons.vue2.js +58 -26
  39. package/dist/es/src/app/metadata/MetadataIndex.vue.js +1 -1
  40. package/dist/es/src/app/metadata/MetadataUpdate.vue.js +1 -1
  41. package/dist/es/src/app/metadata/api.js +5 -5
  42. package/dist/es/src/app/module/ModuleAdd.vue.js +1 -1
  43. package/dist/es/src/app/module/ModuleAdd.vue2.js +70 -66
  44. package/dist/es/src/app/module/ModuleDetail.vue.js +10 -10
  45. package/dist/es/src/app/module/ModuleEdit.vue.js +2 -2
  46. package/dist/es/src/app/module/ModuleEdit.vue2.js +74 -70
  47. package/dist/es/src/app/module/ModuleIndex.vue.js +2 -2
  48. package/dist/es/src/app/module/ModuleIndex.vue2.js +35 -35
  49. package/dist/es/src/app/module/api.js +10 -6
  50. package/dist/es/src/app/module/icon/IconSelectorModal.vue.js +2 -2
  51. package/dist/es/src/app/schedule/CronTypeSelect.vue.js +32 -32
  52. package/dist/es/src/app/schedule/ScheduleAdd.vue.js +3 -3
  53. package/dist/es/src/app/schedule/ScheduleAdd.vue2.js +38 -38
  54. package/dist/es/src/app/schedule/ScheduleEdit.vue.js +1 -1
  55. package/dist/es/src/app/schedule/ScheduleEdit.vue2.js +56 -56
  56. package/dist/es/src/app/schedule/ScheduleIndex.vue.js +18 -18
  57. package/dist/es/src/app/schedule/ScheduleLogList.vue.js +26 -26
  58. package/dist/es/src/app/schedule/ScheduleLogView.vue.js +3 -3
  59. package/dist/es/src/app/schedule/ScheduleLogView.vue2.js +7 -7
  60. package/dist/es/src/app/schedule/api.js +14 -14
  61. package/dist/es/src/app/system/StatusIndex.vue.js +1 -1
  62. package/dist/es/src/app/system/StatusIndex.vue2.js +109 -111
  63. package/dist/es/src/app/system/api.js +2 -3
  64. package/dist/es/style.css +1 -1
  65. package/dist/lib/src/app/attachment/AttachmentEdit.vue.js +1 -1
  66. package/dist/lib/src/app/attachment/AttachmentIndex.vue.js +1 -0
  67. package/dist/lib/src/app/attachment/{AttachmentList.vue2.js → AttachmentIndex.vue2.js} +1 -1
  68. package/dist/lib/src/app/attachment/api.js +1 -1
  69. package/dist/lib/src/app/attachment/index.js +1 -1
  70. package/dist/lib/src/app/dict/DictEdit.vue.js +1 -1
  71. package/dist/lib/src/app/dict/DictIndex.vue.js +1 -1
  72. package/dist/lib/src/app/dict/DictItemEdit.vue.js +1 -1
  73. package/dist/lib/src/app/dict/DictItemEdit.vue2.js +1 -1
  74. package/dist/lib/src/app/dict/DictPanel.vue.js +1 -1
  75. package/dist/lib/src/app/dict/DictPanel.vue2.js +1 -1
  76. package/dist/lib/src/app/dict/api.js +1 -1
  77. package/dist/lib/src/app/log/LogIndex.vue.js +1 -1
  78. package/dist/lib/src/app/log/LogIndex.vue2.js +1 -1
  79. package/dist/lib/src/app/log/api.js +1 -1
  80. package/dist/lib/src/app/log/components/AccessLogDetail.vue.js +1 -0
  81. package/dist/lib/src/app/log/components/AccessLogDetail.vue2.js +1 -0
  82. package/dist/lib/src/app/log/components/AccessLogList.vue.js +1 -0
  83. package/dist/lib/src/app/log/components/AccessLogList.vue2.js +1 -0
  84. package/dist/lib/src/app/log/components/AuditLogDetail.vue.js +1 -0
  85. package/dist/lib/src/app/log/components/AuditLogDetail.vue2.js +1 -0
  86. package/dist/lib/src/app/log/components/AuditLogList.vue.js +1 -0
  87. package/dist/lib/src/app/log/components/AuditLogList.vue2.js +1 -0
  88. package/dist/lib/src/app/log/components/ErrorLogDetail.vue.js +1 -0
  89. package/dist/lib/src/app/log/components/ErrorLogDetail.vue2.js +1 -0
  90. package/dist/lib/src/app/log/components/ErrorLogList.vue.js +1 -0
  91. package/dist/lib/src/app/log/components/ErrorLogList.vue2.js +1 -0
  92. package/dist/lib/src/app/log/components/LoginLogDetail.vue.js +1 -0
  93. package/dist/lib/src/app/log/components/LoginLogDetail.vue2.js +1 -0
  94. package/dist/lib/src/app/log/components/LoginLogList.vue.js +1 -0
  95. package/dist/lib/src/app/log/components/LoginLogList.vue2.js +1 -0
  96. package/dist/lib/src/app/log/components/OperationLogDetail.vue.js +1 -0
  97. package/dist/lib/src/app/log/components/OperationLogDetail.vue2.js +1 -0
  98. package/dist/lib/src/app/log/components/OperationLogList.vue.js +1 -0
  99. package/dist/lib/src/app/log/components/OperationLogList.vue2.js +1 -0
  100. package/dist/lib/src/app/log/index.js +1 -1
  101. package/dist/lib/src/app/log/ua-icons.vue.js +1 -1
  102. package/dist/lib/src/app/log/ua-icons.vue2.js +1 -1
  103. package/dist/lib/src/app/metadata/MetadataIndex.vue.js +1 -1
  104. package/dist/lib/src/app/metadata/MetadataUpdate.vue.js +1 -1
  105. package/dist/lib/src/app/metadata/api.js +1 -1
  106. package/dist/lib/src/app/module/ModuleAdd.vue.js +1 -1
  107. package/dist/lib/src/app/module/ModuleAdd.vue2.js +1 -1
  108. package/dist/lib/src/app/module/ModuleDetail.vue.js +1 -1
  109. package/dist/lib/src/app/module/ModuleEdit.vue.js +1 -1
  110. package/dist/lib/src/app/module/ModuleEdit.vue2.js +1 -1
  111. package/dist/lib/src/app/module/ModuleIndex.vue.js +1 -1
  112. package/dist/lib/src/app/module/ModuleIndex.vue2.js +1 -1
  113. package/dist/lib/src/app/module/api.js +1 -1
  114. package/dist/lib/src/app/module/icon/IconSelectorModal.vue.js +1 -1
  115. package/dist/lib/src/app/schedule/CronTypeSelect.vue.js +1 -1
  116. package/dist/lib/src/app/schedule/ScheduleAdd.vue.js +1 -1
  117. package/dist/lib/src/app/schedule/ScheduleAdd.vue2.js +1 -1
  118. package/dist/lib/src/app/schedule/ScheduleEdit.vue.js +1 -1
  119. package/dist/lib/src/app/schedule/ScheduleEdit.vue2.js +1 -1
  120. package/dist/lib/src/app/schedule/ScheduleIndex.vue.js +1 -1
  121. package/dist/lib/src/app/schedule/ScheduleLogList.vue.js +1 -1
  122. package/dist/lib/src/app/schedule/ScheduleLogView.vue.js +1 -1
  123. package/dist/lib/src/app/schedule/ScheduleLogView.vue2.js +1 -1
  124. package/dist/lib/src/app/schedule/api.js +1 -1
  125. package/dist/lib/src/app/system/StatusIndex.vue.js +1 -1
  126. package/dist/lib/src/app/system/StatusIndex.vue2.js +1 -1
  127. package/dist/lib/src/app/system/api.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/LogView.vue.js +0 -7
  132. package/dist/es/src/app/log/LogView.vue2.js +0 -164
  133. package/dist/lib/src/app/attachment/AttachmentList.vue.js +0 -1
  134. package/dist/lib/src/app/log/LogView.vue.js +0 -1
  135. package/dist/lib/src/app/log/LogView.vue2.js +0 -1
@@ -0,0 +1,240 @@
1
+ import { defineComponent as V, ref as j, reactive as U, watch as z, resolveComponent as l, openBlock as s, createBlock as c, withCtx as o, createVNode as r, createElementVNode as u, toDisplayString as a, createElementBlock as G, createTextVNode as i, normalizeStyle as H, createCommentVNode as g } from "vue";
2
+ import { message as S } from "ant-design-vue";
3
+ import { getAccessLog as q } from "../api.js";
4
+ const R = { key: 1 }, $ = { class: "text-ellipsis" }, F = { class: "performance-analysis" }, W = /* @__PURE__ */ V({
5
+ __name: "AccessLogDetail",
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(y, { emit: C }) {
18
+ const f = y, I = C, d = j(!1), t = U({});
19
+ z(
20
+ () => f.open,
21
+ (e) => {
22
+ e && f.logId ? M() : Object.assign(t, {});
23
+ }
24
+ );
25
+ const M = async () => {
26
+ if (f.logId) {
27
+ d.value = !0;
28
+ try {
29
+ const e = await q({ id: f.logId });
30
+ e.code === 200 ? Object.assign(t, e.data) : S.error(e.message || "获取日志详情失败");
31
+ } catch (e) {
32
+ S.error("获取日志详情失败"), console.error("Error loading access log detail:", e);
33
+ } finally {
34
+ d.value = !1;
35
+ }
36
+ }
37
+ }, T = () => {
38
+ I("update:open", !1);
39
+ }, k = (e) => ({
40
+ GET: "green",
41
+ POST: "blue",
42
+ PUT: "orange",
43
+ DELETE: "red",
44
+ PATCH: "purple"
45
+ })[e] || "default", v = (e) => e >= 200 && e < 300 ? "#52c41a" : e >= 300 && e < 400 ? "#1890ff" : e >= 400 && e < 500 ? "#fa8c16" : e >= 500 ? "#ff4d4f" : "#666", A = (e) => e >= 200 && e < 300 ? "success" : e >= 300 && e < 400 ? "info" : e >= 400 && e < 500 ? "warning" : e >= 500 ? "error" : "info", b = (e) => e ? e < 100 ? "#52c41a" : e < 500 ? "#fa8c16" : e < 1e3 ? "#ff7875" : "#ff4d4f" : "#666", w = (e) => e ? e < 100 ? "优秀" : e < 500 ? "良好" : e < 1e3 ? "一般" : "较差" : "未知", D = (e) => e ? e < 100 ? "#52c41a" : e < 500 ? "#1890ff" : e < 1e3 ? "#fa8c16" : "#ff4d4f" : "#666", E = (e) => ({
46
+ 200: "请求成功",
47
+ 201: "创建成功",
48
+ 204: "删除成功",
49
+ 301: "永久重定向",
50
+ 302: "临时重定向",
51
+ 304: "未修改",
52
+ 400: "请求参数错误",
53
+ 401: "未授权访问",
54
+ 403: "禁止访问",
55
+ 404: "资源不存在",
56
+ 405: "请求方法不允许",
57
+ 500: "服务器内部错误",
58
+ 502: "网关错误",
59
+ 503: "服务不可用",
60
+ 504: "网关超时"
61
+ })[e] || `HTTP ${e} 状态码`;
62
+ return (e, h) => {
63
+ const p = l("a-tag"), n = l("a-descriptions-item"), P = l("a-tooltip"), _ = l("a-statistic"), m = l("a-col"), x = l("a-row"), L = l("a-alert"), O = l("a-descriptions"), B = l("a-spin"), N = l("a-modal");
64
+ return s(), c(N, {
65
+ title: "访问日志详情",
66
+ width: 900,
67
+ footer: null,
68
+ open: y.open,
69
+ onCancel: T,
70
+ destroyOnClose: !0
71
+ }, {
72
+ default: o(() => [
73
+ r(B, { spinning: d.value }, {
74
+ default: o(() => [
75
+ Object.keys(t).length > 0 ? (s(), c(O, {
76
+ key: 0,
77
+ column: 1,
78
+ bordered: "",
79
+ size: "small"
80
+ }, {
81
+ default: o(() => [
82
+ r(n, { label: "追踪ID" }, {
83
+ default: o(() => [
84
+ t.traceId ? (s(), c(p, {
85
+ key: 0,
86
+ color: "purple"
87
+ }, {
88
+ default: o(() => [
89
+ u("code", null, a(t.traceId), 1)
90
+ ]),
91
+ _: 1
92
+ })) : (s(), G("span", R, "-"))
93
+ ]),
94
+ _: 1
95
+ }),
96
+ r(n, { label: "用户ID" }, {
97
+ default: o(() => [
98
+ i(a(t.userId || "-"), 1)
99
+ ]),
100
+ _: 1
101
+ }),
102
+ r(n, { label: "请求方法" }, {
103
+ default: o(() => [
104
+ r(p, {
105
+ color: k(t.method)
106
+ }, {
107
+ default: o(() => [
108
+ i(a(t.method), 1)
109
+ ]),
110
+ _: 1
111
+ }, 8, ["color"])
112
+ ]),
113
+ _: 1
114
+ }),
115
+ r(n, { label: "请求URI" }, {
116
+ default: o(() => [
117
+ u("code", null, a(t.uri || "-"), 1)
118
+ ]),
119
+ _: 1
120
+ }),
121
+ r(n, { label: "响应状态" }, {
122
+ default: o(() => [
123
+ r(p, {
124
+ color: v(t.responseStatus)
125
+ }, {
126
+ default: o(() => [
127
+ i(a(t.responseStatus), 1)
128
+ ]),
129
+ _: 1
130
+ }, 8, ["color"])
131
+ ]),
132
+ _: 1
133
+ }),
134
+ r(n, { label: "请求耗时" }, {
135
+ default: o(() => [
136
+ u("span", {
137
+ style: H({ color: b(t.latencyMs) })
138
+ }, a(t.latencyMs || 0) + "ms ", 5)
139
+ ]),
140
+ _: 1
141
+ }),
142
+ r(n, { label: "IP地址" }, {
143
+ default: o(() => [
144
+ i(a(t.ipAddress || "-"), 1)
145
+ ]),
146
+ _: 1
147
+ }),
148
+ t.userAgent ? (s(), c(n, {
149
+ key: 0,
150
+ label: "User-Agent"
151
+ }, {
152
+ default: o(() => [
153
+ r(P, {
154
+ title: t.userAgent
155
+ }, {
156
+ default: o(() => [
157
+ u("span", $, a(t.userAgent), 1)
158
+ ]),
159
+ _: 1
160
+ }, 8, ["title"])
161
+ ]),
162
+ _: 1
163
+ })) : g("", !0),
164
+ r(n, { label: "请求时间" }, {
165
+ default: o(() => [
166
+ i(a(t.requestTime), 1)
167
+ ]),
168
+ _: 1
169
+ }),
170
+ r(n, { label: "性能分析" }, {
171
+ default: o(() => [
172
+ u("div", F, [
173
+ r(x, { gutter: 16 }, {
174
+ default: o(() => [
175
+ r(m, { span: 8 }, {
176
+ default: o(() => [
177
+ r(_, {
178
+ title: "响应状态",
179
+ value: t.responseStatus,
180
+ "value-style": { color: v(t.responseStatus) }
181
+ }, null, 8, ["value", "value-style"])
182
+ ]),
183
+ _: 1
184
+ }),
185
+ r(m, { span: 8 }, {
186
+ default: o(() => [
187
+ r(_, {
188
+ title: "响应时间",
189
+ value: t.latencyMs || 0,
190
+ suffix: "ms",
191
+ "value-style": { color: b(t.latencyMs) }
192
+ }, null, 8, ["value", "value-style"])
193
+ ]),
194
+ _: 1
195
+ }),
196
+ r(m, { span: 8 }, {
197
+ default: o(() => [
198
+ r(_, {
199
+ title: "性能评级",
200
+ value: w(t.latencyMs),
201
+ "value-style": { color: D(t.latencyMs) }
202
+ }, null, 8, ["value", "value-style"])
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]),
207
+ _: 1
208
+ })
209
+ ])
210
+ ]),
211
+ _: 1
212
+ }),
213
+ t.responseStatus ? (s(), c(n, {
214
+ key: 1,
215
+ label: "状态码说明"
216
+ }, {
217
+ default: o(() => [
218
+ r(L, {
219
+ message: E(t.responseStatus),
220
+ type: A(t.responseStatus),
221
+ "show-icon": ""
222
+ }, null, 8, ["message", "type"])
223
+ ]),
224
+ _: 1
225
+ })) : g("", !0)
226
+ ]),
227
+ _: 1
228
+ })) : g("", !0)
229
+ ]),
230
+ _: 1
231
+ }, 8, ["spinning"])
232
+ ]),
233
+ _: 1
234
+ }, 8, ["open"]);
235
+ };
236
+ }
237
+ });
238
+ export {
239
+ W as default
240
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./AccessLogList.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-43cad169"]]);
5
+ export {
6
+ a as default
7
+ };
@@ -0,0 +1,452 @@
1
+ import { defineComponent as j, ref as D, reactive as S, computed as F, resolveComponent as u, openBlock as p, createElementBlock as E, createElementVNode as g, createVNode as t, withCtx as l, createTextVNode as d, unref as x, createBlock as I, toDisplayString as v, normalizeStyle as $, createCommentVNode as J, nextTick as K } from "vue";
2
+ import { message as R } from "ant-design-vue";
3
+ import { SearchOutlined as Q, RedoOutlined as W, GlobalOutlined as X, DownloadOutlined as Z } from "@ant-design/icons-vue";
4
+ import { queryAccessLogs as ee } from "../api.js";
5
+ import te from "./AccessLogDetail.vue.js";
6
+ import { FxCardTable as le } from "@since2006/components";
7
+ const ae = { class: "access-log-list" }, oe = { class: "ant-pro-table" }, ne = { class: "ant-pro-table-search" }, de = { class: "text-ellipsis" }, se = { class: "text-ellipsis" }, re = { class: "text-ellipsis" }, ue = ["onClick"], Ie = /* @__PURE__ */ j({
8
+ __name: "AccessLogList",
9
+ setup(ie) {
10
+ const w = D(), U = D(!1), C = D(!1), c = [
11
+ {
12
+ title: "追踪ID",
13
+ dataIndex: "traceId",
14
+ width: "200px",
15
+ fixed: "left"
16
+ },
17
+ {
18
+ title: "用户ID",
19
+ dataIndex: "userId",
20
+ width: "120px"
21
+ },
22
+ {
23
+ title: "请求方法",
24
+ dataIndex: "method",
25
+ width: "80px"
26
+ },
27
+ {
28
+ title: "请求URI",
29
+ dataIndex: "uri",
30
+ width: "250px",
31
+ ellipsis: !0
32
+ },
33
+ {
34
+ title: "状态码",
35
+ dataIndex: "responseStatus",
36
+ width: "80px",
37
+ sorter: !0
38
+ },
39
+ {
40
+ title: "耗时",
41
+ dataIndex: "latencyMs",
42
+ width: "80px",
43
+ sorter: !0
44
+ },
45
+ {
46
+ title: "IP地址",
47
+ dataIndex: "ipAddress",
48
+ width: "140px"
49
+ },
50
+ {
51
+ title: "User-Agent",
52
+ dataIndex: "userAgent",
53
+ width: "200px",
54
+ ellipsis: !0
55
+ },
56
+ {
57
+ title: "请求时间",
58
+ dataIndex: "requestTime",
59
+ width: "180px",
60
+ sorter: !0
61
+ },
62
+ {
63
+ title: "操作",
64
+ dataIndex: "action",
65
+ width: "80px",
66
+ fixed: "right"
67
+ }
68
+ ], P = {
69
+ userId: void 0,
70
+ method: void 0,
71
+ responseStatus: void 0,
72
+ uri: void 0,
73
+ ipAddress: void 0,
74
+ dateRange: void 0,
75
+ query: void 0
76
+ }, a = S({ ...P }), M = F(() => ({
77
+ page: 1,
78
+ pageSize: 20,
79
+ userId: a.userId,
80
+ method: a.method,
81
+ responseStatus: a.responseStatus,
82
+ uri: a.uri,
83
+ ipAddress: a.ipAddress,
84
+ startDate: a.dateRange ? a.dateRange[0].format("YYYY-MM-DD HH:mm:ss") : void 0,
85
+ endDate: a.dateRange ? a.dateRange[1].format("YYYY-MM-DD HH:mm:ss") : void 0,
86
+ query: a.query,
87
+ sorting: void 0
88
+ })), _ = S({
89
+ open: !1,
90
+ logId: ""
91
+ }), m = () => {
92
+ var o;
93
+ (o = w.value) == null || o.refresh();
94
+ }, Y = async () => {
95
+ Object.assign(a, P), await K(), m();
96
+ }, H = () => {
97
+ var o;
98
+ (o = w.value) == null || o.refresh();
99
+ }, L = async () => {
100
+ C.value = !0;
101
+ try {
102
+ R.success("导出成功");
103
+ } catch {
104
+ R.error("导出失败");
105
+ } finally {
106
+ C.value = !1;
107
+ }
108
+ }, q = (o) => ({
109
+ GET: "green",
110
+ POST: "blue",
111
+ PUT: "orange",
112
+ DELETE: "red",
113
+ PATCH: "purple"
114
+ })[o] || "default", O = (o) => o >= 200 && o < 300 ? "green" : o >= 300 && o < 400 ? "blue" : o >= 400 && o < 500 ? "orange" : o >= 500 ? "red" : "default", V = (o) => o < 100 ? "#52c41a" : o < 500 ? "#fa8c16" : o < 1e3 ? "#ff7875" : "#ff4d4f", G = (o) => {
115
+ _.open = !0, _.logId = o.id;
116
+ };
117
+ return (o, e) => {
118
+ const y = u("a-input"), f = u("a-form-item"), i = u("a-col"), r = u("a-select-option"), T = u("a-select"), N = u("a-range-picker"), k = u("a-button"), z = u("a-row"), B = u("a-form"), h = u("a-space"), A = u("a-tag"), b = u("a-tooltip");
119
+ return p(), E("div", ae, [
120
+ g("div", oe, [
121
+ g("div", ne, [
122
+ t(B, { layout: "horizontal" }, {
123
+ default: l(() => [
124
+ t(z, {
125
+ gutter: 16,
126
+ type: "flex",
127
+ justify: "start"
128
+ }, {
129
+ default: l(() => [
130
+ t(i, { flex: "200px" }, {
131
+ default: l(() => [
132
+ t(f, { label: "用户ID" }, {
133
+ default: l(() => [
134
+ t(y, {
135
+ value: a.userId,
136
+ "onUpdate:value": e[0] || (e[0] = (n) => a.userId = n),
137
+ placeholder: "请输入用户ID",
138
+ onPressEnter: m,
139
+ allowClear: ""
140
+ }, null, 8, ["value"])
141
+ ]),
142
+ _: 1
143
+ })
144
+ ]),
145
+ _: 1
146
+ }),
147
+ t(i, { flex: "150px" }, {
148
+ default: l(() => [
149
+ t(f, { label: "请求方法" }, {
150
+ default: l(() => [
151
+ t(T, {
152
+ value: a.method,
153
+ "onUpdate:value": e[1] || (e[1] = (n) => a.method = n),
154
+ placeholder: "选择方法",
155
+ allowClear: ""
156
+ }, {
157
+ default: l(() => [
158
+ t(r, { value: "GET" }, {
159
+ default: l(() => e[8] || (e[8] = [
160
+ d("GET")
161
+ ])),
162
+ _: 1
163
+ }),
164
+ t(r, { value: "POST" }, {
165
+ default: l(() => e[9] || (e[9] = [
166
+ d("POST")
167
+ ])),
168
+ _: 1
169
+ }),
170
+ t(r, { value: "PUT" }, {
171
+ default: l(() => e[10] || (e[10] = [
172
+ d("PUT")
173
+ ])),
174
+ _: 1
175
+ }),
176
+ t(r, { value: "DELETE" }, {
177
+ default: l(() => e[11] || (e[11] = [
178
+ d("DELETE")
179
+ ])),
180
+ _: 1
181
+ }),
182
+ t(r, { value: "PATCH" }, {
183
+ default: l(() => e[12] || (e[12] = [
184
+ d("PATCH")
185
+ ])),
186
+ _: 1
187
+ })
188
+ ]),
189
+ _: 1
190
+ }, 8, ["value"])
191
+ ]),
192
+ _: 1
193
+ })
194
+ ]),
195
+ _: 1
196
+ }),
197
+ t(i, { flex: "150px" }, {
198
+ default: l(() => [
199
+ t(f, { label: "状态码" }, {
200
+ default: l(() => [
201
+ t(T, {
202
+ value: a.responseStatus,
203
+ "onUpdate:value": e[2] || (e[2] = (n) => a.responseStatus = n),
204
+ placeholder: "选择状态码",
205
+ allowClear: ""
206
+ }, {
207
+ default: l(() => [
208
+ t(r, { value: 200 }, {
209
+ default: l(() => e[13] || (e[13] = [
210
+ d("200")
211
+ ])),
212
+ _: 1
213
+ }),
214
+ t(r, { value: 201 }, {
215
+ default: l(() => e[14] || (e[14] = [
216
+ d("201")
217
+ ])),
218
+ _: 1
219
+ }),
220
+ t(r, { value: 400 }, {
221
+ default: l(() => e[15] || (e[15] = [
222
+ d("400")
223
+ ])),
224
+ _: 1
225
+ }),
226
+ t(r, { value: 401 }, {
227
+ default: l(() => e[16] || (e[16] = [
228
+ d("401")
229
+ ])),
230
+ _: 1
231
+ }),
232
+ t(r, { value: 403 }, {
233
+ default: l(() => e[17] || (e[17] = [
234
+ d("403")
235
+ ])),
236
+ _: 1
237
+ }),
238
+ t(r, { value: 404 }, {
239
+ default: l(() => e[18] || (e[18] = [
240
+ d("404")
241
+ ])),
242
+ _: 1
243
+ }),
244
+ t(r, { value: 500 }, {
245
+ default: l(() => e[19] || (e[19] = [
246
+ d("500")
247
+ ])),
248
+ _: 1
249
+ })
250
+ ]),
251
+ _: 1
252
+ }, 8, ["value"])
253
+ ]),
254
+ _: 1
255
+ })
256
+ ]),
257
+ _: 1
258
+ }),
259
+ t(i, { flex: "200px" }, {
260
+ default: l(() => [
261
+ t(f, { label: "请求URI" }, {
262
+ default: l(() => [
263
+ t(y, {
264
+ value: a.uri,
265
+ "onUpdate:value": e[3] || (e[3] = (n) => a.uri = n),
266
+ placeholder: "请输入请求URI",
267
+ onPressEnter: m,
268
+ allowClear: ""
269
+ }, null, 8, ["value"])
270
+ ]),
271
+ _: 1
272
+ })
273
+ ]),
274
+ _: 1
275
+ }),
276
+ t(i, { flex: "200px" }, {
277
+ default: l(() => [
278
+ t(f, { label: "IP地址" }, {
279
+ default: l(() => [
280
+ t(y, {
281
+ value: a.ipAddress,
282
+ "onUpdate:value": e[4] || (e[4] = (n) => a.ipAddress = n),
283
+ placeholder: "请输入IP地址",
284
+ onPressEnter: m,
285
+ allowClear: ""
286
+ }, null, 8, ["value"])
287
+ ]),
288
+ _: 1
289
+ })
290
+ ]),
291
+ _: 1
292
+ }),
293
+ t(i, { flex: "300px" }, {
294
+ default: l(() => [
295
+ t(f, { label: "时间范围" }, {
296
+ default: l(() => [
297
+ t(N, {
298
+ value: a.dateRange,
299
+ "onUpdate:value": e[5] || (e[5] = (n) => a.dateRange = n),
300
+ "show-time": "",
301
+ format: "YYYY-MM-DD HH:mm:ss"
302
+ }, null, 8, ["value"])
303
+ ]),
304
+ _: 1
305
+ })
306
+ ]),
307
+ _: 1
308
+ }),
309
+ t(i, { flex: "240px" }, {
310
+ default: l(() => [
311
+ t(f, { label: "搜索" }, {
312
+ default: l(() => [
313
+ t(y, {
314
+ value: a.query,
315
+ "onUpdate:value": e[6] || (e[6] = (n) => a.query = n),
316
+ placeholder: "追踪ID、User-Agent等",
317
+ onPressEnter: m,
318
+ allowClear: ""
319
+ }, null, 8, ["value"])
320
+ ]),
321
+ _: 1
322
+ })
323
+ ]),
324
+ _: 1
325
+ }),
326
+ t(i, null, {
327
+ default: l(() => [
328
+ t(k, {
329
+ onClick: m,
330
+ type: "primary",
331
+ loading: U.value
332
+ }, {
333
+ default: l(() => [
334
+ t(x(Q)),
335
+ e[20] || (e[20] = d(" 搜索 "))
336
+ ]),
337
+ _: 1
338
+ }, 8, ["loading"]),
339
+ t(k, {
340
+ onClick: Y,
341
+ style: { "margin-left": "8px" }
342
+ }, {
343
+ default: l(() => [
344
+ t(x(W)),
345
+ e[21] || (e[21] = d(" 重置 "))
346
+ ]),
347
+ _: 1
348
+ })
349
+ ]),
350
+ _: 1
351
+ })
352
+ ]),
353
+ _: 1
354
+ })
355
+ ]),
356
+ _: 1
357
+ })
358
+ ]),
359
+ t(x(le), {
360
+ columns: c,
361
+ "load-data": x(ee),
362
+ params: M.value,
363
+ ref_key: "tableRef",
364
+ ref: w,
365
+ "row-key": "id"
366
+ }, {
367
+ title: l(() => [
368
+ t(x(X)),
369
+ e[22] || (e[22] = d(" 访问日志 "))
370
+ ]),
371
+ extra: l(() => [
372
+ t(h, null, {
373
+ default: l(() => [
374
+ t(k, {
375
+ onClick: L,
376
+ loading: C.value
377
+ }, {
378
+ default: l(() => [
379
+ t(x(Z)),
380
+ e[23] || (e[23] = d(" 导出 "))
381
+ ]),
382
+ _: 1
383
+ }, 8, ["loading"])
384
+ ]),
385
+ _: 1
386
+ })
387
+ ]),
388
+ bodyCell: l(({ column: n, record: s }) => [
389
+ n.dataIndex === "method" ? (p(), I(A, {
390
+ key: 0,
391
+ color: q(s.method)
392
+ }, {
393
+ default: l(() => [
394
+ d(v(s.method), 1)
395
+ ]),
396
+ _: 2
397
+ }, 1032, ["color"])) : n.dataIndex === "responseStatus" ? (p(), I(A, {
398
+ key: 1,
399
+ color: O(s.responseStatus)
400
+ }, {
401
+ default: l(() => [
402
+ d(v(s.responseStatus), 1)
403
+ ]),
404
+ _: 2
405
+ }, 1032, ["color"])) : n.dataIndex === "latencyMs" ? (p(), E("span", {
406
+ key: 2,
407
+ style: $({ color: V(s.latencyMs) })
408
+ }, v(s.latencyMs) + "ms ", 5)) : n.dataIndex === "uri" ? (p(), I(b, {
409
+ key: 3,
410
+ title: s.uri
411
+ }, {
412
+ default: l(() => [
413
+ g("span", de, v(s.uri), 1)
414
+ ]),
415
+ _: 2
416
+ }, 1032, ["title"])) : n.dataIndex === "userAgent" ? (p(), I(b, {
417
+ key: 4,
418
+ title: s.userAgent
419
+ }, {
420
+ default: l(() => [
421
+ g("span", se, v(s.userAgent), 1)
422
+ ]),
423
+ _: 2
424
+ }, 1032, ["title"])) : n.dataIndex === "traceId" ? (p(), I(b, {
425
+ key: 5,
426
+ title: s.traceId
427
+ }, {
428
+ default: l(() => [
429
+ g("span", re, v(s.traceId), 1)
430
+ ]),
431
+ _: 2
432
+ }, 1032, ["title"])) : n.dataIndex === "action" ? (p(), E("a", {
433
+ key: 6,
434
+ onClick: (pe) => G(s)
435
+ }, "详情", 8, ue)) : J("", !0)
436
+ ]),
437
+ _: 1
438
+ }, 8, ["load-data", "params"])
439
+ ]),
440
+ t(te, {
441
+ open: _.open,
442
+ "onUpdate:open": e[7] || (e[7] = (n) => _.open = n),
443
+ "log-id": _.logId,
444
+ onRefresh: H
445
+ }, null, 8, ["open", "log-id"])
446
+ ]);
447
+ };
448
+ }
449
+ });
450
+ export {
451
+ Ie as default
452
+ };