@since2006/pages 2026.3.2 → 2026.4.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 (103) hide show
  1. package/dist/es/index.js +25 -22
  2. package/dist/es/src/app/attachment/AttachmentIndex.vue.js +15 -15
  3. package/dist/es/src/app/attachment/index.js +2 -3
  4. package/dist/es/src/app/dict/DictEdit.vue.js +6 -6
  5. package/dist/es/src/app/dict/DictIndex.vue2.js +17 -17
  6. package/dist/es/src/app/dict/DictPanel.vue2.js +15 -15
  7. package/dist/es/src/app/dict/index.js +3 -4
  8. package/dist/es/src/app/log/components/AccessLogList.vue2.js +43 -43
  9. package/dist/es/src/app/log/components/AuditLogList.vue2.js +23 -23
  10. package/dist/es/src/app/log/components/ErrorLogList.vue2.js +16 -16
  11. package/dist/es/src/app/log/components/LoginLogDetail.vue2.js +2 -2
  12. package/dist/es/src/app/log/components/LoginLogList.vue2.js +21 -21
  13. package/dist/es/src/app/log/components/OperationLogDetail.vue2.js +2 -2
  14. package/dist/es/src/app/log/components/OperationLogList.vue2.js +21 -21
  15. package/dist/es/src/app/metadata/MetadataIndex.vue.js +15 -15
  16. package/dist/es/src/app/metadata/index.js +3 -4
  17. package/dist/es/src/app/module/ModuleAdd.vue.js +1 -1
  18. package/dist/es/src/app/module/ModuleAdd.vue2.js +81 -81
  19. package/dist/es/src/app/module/ModuleDetail.vue.js +53 -53
  20. package/dist/es/src/app/module/ModuleEdit.vue.js +2 -2
  21. package/dist/es/src/app/module/ModuleEdit.vue2.js +92 -92
  22. package/dist/es/src/app/module/ModuleIndex.vue2.js +5 -5
  23. package/dist/es/src/app/module/index.js +2 -3
  24. package/dist/es/src/app/openapi/OpenApiAppEdit.vue.js +320 -0
  25. package/dist/es/src/app/openapi/OpenApiAppEdit.vue2.js +4 -0
  26. package/dist/es/src/app/openapi/OpenApiAppIndex.vue.js +7 -0
  27. package/dist/es/src/app/openapi/OpenApiAppIndex.vue2.js +398 -0
  28. package/dist/es/src/app/openapi/OpenApiCredentialModal.vue.js +105 -0
  29. package/dist/es/src/app/openapi/OpenApiCredentialModal.vue2.js +4 -0
  30. package/dist/es/src/app/openapi/OpenApiLogDetail.vue.js +224 -0
  31. package/dist/es/src/app/openapi/OpenApiLogDetail.vue2.js +4 -0
  32. package/dist/es/src/app/openapi/OpenApiLogIndex.vue.js +266 -0
  33. package/dist/es/src/app/openapi/OpenApiLogIndex.vue2.js +4 -0
  34. package/dist/es/src/app/openapi/OpenApiPermissionEdit.vue.js +169 -0
  35. package/dist/es/src/app/openapi/OpenApiPermissionEdit.vue2.js +4 -0
  36. package/dist/es/src/app/openapi/OpenApiPermissionList.vue.js +156 -0
  37. package/dist/es/src/app/openapi/OpenApiPermissionList.vue2.js +4 -0
  38. package/dist/es/src/app/openapi/api.js +52 -0
  39. package/dist/es/src/app/openapi/index.js +8 -0
  40. package/dist/es/src/app/schedule/CronTypeSelect.vue.js +92 -92
  41. package/dist/es/src/app/schedule/ScheduleAdd.vue2.js +7 -7
  42. package/dist/es/src/app/schedule/ScheduleEdit.vue2.js +7 -7
  43. package/dist/es/src/app/schedule/ScheduleIndex.vue.js +35 -35
  44. package/dist/es/src/app/schedule/ScheduleLogList.vue.js +7 -7
  45. package/dist/es/src/app/schedule/ScheduleLogView.vue2.js +9 -9
  46. package/dist/es/src/app/schedule/index.js +4 -5
  47. package/dist/es/src/app/system/StatusIndex.vue.js +2 -2
  48. package/dist/es/src/app/system/StatusIndex.vue2.js +239 -291
  49. package/dist/es/src/app/system/index.js +2 -3
  50. package/dist/es/src/index.js +19 -16
  51. package/dist/es/style.css +1 -1
  52. package/dist/lib/index.js +1 -1
  53. package/dist/lib/src/app/attachment/AttachmentIndex.vue.js +1 -1
  54. package/dist/lib/src/app/attachment/index.js +1 -1
  55. package/dist/lib/src/app/dict/DictEdit.vue.js +1 -1
  56. package/dist/lib/src/app/dict/DictIndex.vue2.js +1 -1
  57. package/dist/lib/src/app/dict/DictPanel.vue2.js +1 -1
  58. package/dist/lib/src/app/dict/index.js +1 -1
  59. package/dist/lib/src/app/log/components/AccessLogList.vue2.js +1 -1
  60. package/dist/lib/src/app/log/components/AuditLogList.vue2.js +1 -1
  61. package/dist/lib/src/app/log/components/ErrorLogList.vue2.js +1 -1
  62. package/dist/lib/src/app/log/components/LoginLogDetail.vue2.js +1 -1
  63. package/dist/lib/src/app/log/components/LoginLogList.vue2.js +1 -1
  64. package/dist/lib/src/app/log/components/OperationLogDetail.vue2.js +1 -1
  65. package/dist/lib/src/app/log/components/OperationLogList.vue2.js +1 -1
  66. package/dist/lib/src/app/metadata/MetadataIndex.vue.js +1 -1
  67. package/dist/lib/src/app/metadata/index.js +1 -1
  68. package/dist/lib/src/app/module/ModuleAdd.vue.js +1 -1
  69. package/dist/lib/src/app/module/ModuleAdd.vue2.js +1 -1
  70. package/dist/lib/src/app/module/ModuleDetail.vue.js +1 -1
  71. package/dist/lib/src/app/module/ModuleEdit.vue.js +1 -1
  72. package/dist/lib/src/app/module/ModuleEdit.vue2.js +1 -1
  73. package/dist/lib/src/app/module/ModuleIndex.vue2.js +1 -1
  74. package/dist/lib/src/app/module/index.js +1 -1
  75. package/dist/lib/src/app/openapi/OpenApiAppEdit.vue.js +1 -0
  76. package/dist/lib/src/app/openapi/OpenApiAppEdit.vue2.js +1 -0
  77. package/dist/lib/src/app/openapi/OpenApiAppIndex.vue.js +1 -0
  78. package/dist/lib/src/app/openapi/OpenApiAppIndex.vue2.js +19 -0
  79. package/dist/lib/src/app/openapi/OpenApiCredentialModal.vue.js +1 -0
  80. package/dist/lib/src/app/openapi/OpenApiCredentialModal.vue2.js +1 -0
  81. package/dist/lib/src/app/openapi/OpenApiLogDetail.vue.js +1 -0
  82. package/dist/lib/src/app/openapi/OpenApiLogDetail.vue2.js +1 -0
  83. package/dist/lib/src/app/openapi/OpenApiLogIndex.vue.js +1 -0
  84. package/dist/lib/src/app/openapi/OpenApiLogIndex.vue2.js +1 -0
  85. package/dist/lib/src/app/openapi/OpenApiPermissionEdit.vue.js +1 -0
  86. package/dist/lib/src/app/openapi/OpenApiPermissionEdit.vue2.js +1 -0
  87. package/dist/lib/src/app/openapi/OpenApiPermissionList.vue.js +1 -0
  88. package/dist/lib/src/app/openapi/OpenApiPermissionList.vue2.js +1 -0
  89. package/dist/lib/src/app/openapi/api.js +1 -0
  90. package/dist/lib/src/app/openapi/index.js +1 -0
  91. package/dist/lib/src/app/schedule/CronTypeSelect.vue.js +1 -1
  92. package/dist/lib/src/app/schedule/ScheduleAdd.vue2.js +1 -1
  93. package/dist/lib/src/app/schedule/ScheduleEdit.vue2.js +1 -1
  94. package/dist/lib/src/app/schedule/ScheduleIndex.vue.js +1 -1
  95. package/dist/lib/src/app/schedule/ScheduleLogList.vue.js +1 -1
  96. package/dist/lib/src/app/schedule/ScheduleLogView.vue2.js +1 -1
  97. package/dist/lib/src/app/schedule/index.js +1 -1
  98. package/dist/lib/src/app/system/StatusIndex.vue.js +1 -1
  99. package/dist/lib/src/app/system/StatusIndex.vue2.js +1 -1
  100. package/dist/lib/src/app/system/index.js +1 -1
  101. package/dist/lib/src/index.js +1 -1
  102. package/dist/lib/style.css +1 -1
  103. package/package.json +1 -1
@@ -0,0 +1,224 @@
1
+ import { defineComponent as V, ref as w, reactive as A, watch as P, resolveComponent as r, openBlock as c, createBlock as p, withCtx as a, createVNode as e, createTextVNode as n, toDisplayString as o, createElementVNode as k, createCommentVNode as b, h as _ } from "vue";
2
+ import { Tag as f } from "ant-design-vue";
3
+ import { getLog as x } from "./api.js";
4
+ const B = { style: { margin: "0", "white-space": "pre-wrap", "word-break": "break-all" } }, O = /* @__PURE__ */ V({
5
+ __name: "OpenApiLogDetail",
6
+ props: {
7
+ open: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ logId: {
12
+ type: [String, Number],
13
+ default: ""
14
+ }
15
+ },
16
+ emits: ["update:open"],
17
+ setup(m, { emit: g }) {
18
+ const u = (s) => s.value === 1 ? _(f, { color: "success" }, () => "通过") : s.value === 0 ? _(f, { color: "error" }, () => "失败") : _(f, {}, () => "不适用"), d = m, I = g, i = w(!1), l = A({});
19
+ P(
20
+ () => d.open,
21
+ (s) => {
22
+ s && d.logId && v();
23
+ }
24
+ );
25
+ const v = () => {
26
+ i.value = !0, x(d.logId).then((s) => {
27
+ Object.assign(l, s.data);
28
+ }).finally(() => {
29
+ i.value = !1;
30
+ });
31
+ }, y = (s) => s === "OK" ? "success" : ["AUTH_FAILED", "IP_DENIED", "PERMISSION_DENIED"].includes(s) ? "error" : ["RATE_LIMITED", "APP_DISABLED"].includes(s) ? "warning" : "default", D = () => {
32
+ I("update:open", !1);
33
+ };
34
+ return (s, M) => {
35
+ const t = r("a-descriptions-item"), h = r("a-tag"), C = r("a-typography-text"), N = r("a-descriptions"), E = r("a-spin"), T = r("a-modal");
36
+ return c(), p(T, {
37
+ title: "调用日志详情",
38
+ width: 700,
39
+ open: m.open,
40
+ footer: null,
41
+ "destroy-on-close": "",
42
+ onCancel: D
43
+ }, {
44
+ default: a(() => [
45
+ e(E, { spinning: i.value }, {
46
+ default: a(() => [
47
+ e(N, {
48
+ column: 2,
49
+ bordered: "",
50
+ size: "small"
51
+ }, {
52
+ default: a(() => [
53
+ e(t, { label: "日志ID" }, {
54
+ default: a(() => [
55
+ n(o(l.id), 1)
56
+ ]),
57
+ _: 1
58
+ }),
59
+ e(t, { label: "Trace ID" }, {
60
+ default: a(() => [
61
+ n(o(l.traceId), 1)
62
+ ]),
63
+ _: 1
64
+ }),
65
+ e(t, { label: "应用名称" }, {
66
+ default: a(() => [
67
+ n(o(l.appName || "-"), 1)
68
+ ]),
69
+ _: 1
70
+ }),
71
+ e(t, { label: "Client ID" }, {
72
+ default: a(() => [
73
+ n(o(l.clientId || "-"), 1)
74
+ ]),
75
+ _: 1
76
+ }),
77
+ e(t, { label: "请求路径" }, {
78
+ default: a(() => [
79
+ n(o(l.requestUri), 1)
80
+ ]),
81
+ _: 1
82
+ }),
83
+ e(t, { label: "HTTP 方法" }, {
84
+ default: a(() => [
85
+ n(o(l.requestMethod), 1)
86
+ ]),
87
+ _: 1
88
+ }),
89
+ e(t, { label: "请求 IP" }, {
90
+ default: a(() => [
91
+ n(o(l.requestIp), 1)
92
+ ]),
93
+ _: 1
94
+ }),
95
+ e(t, { label: "认证模式" }, {
96
+ default: a(() => [
97
+ n(o(l.authMode), 1)
98
+ ]),
99
+ _: 1
100
+ }),
101
+ e(t, { label: "响应码" }, {
102
+ default: a(() => [
103
+ e(h, {
104
+ color: y(l.responseCode)
105
+ }, {
106
+ default: a(() => [
107
+ n(o(l.responseCode), 1)
108
+ ]),
109
+ _: 1
110
+ }, 8, ["color"])
111
+ ]),
112
+ _: 1
113
+ }),
114
+ e(t, { label: "耗时" }, {
115
+ default: a(() => [
116
+ n(o(l.costMs) + " ms", 1)
117
+ ]),
118
+ _: 1
119
+ }),
120
+ e(t, { label: "Nonce" }, {
121
+ default: a(() => [
122
+ n(o(l.nonce || "-"), 1)
123
+ ]),
124
+ _: 1
125
+ }),
126
+ e(t, { label: "创建时间" }, {
127
+ default: a(() => [
128
+ n(o(l.createdAt), 1)
129
+ ]),
130
+ _: 1
131
+ }),
132
+ e(t, {
133
+ label: "IP 校验",
134
+ span: 1
135
+ }, {
136
+ default: a(() => [
137
+ e(u, {
138
+ value: l.ipValid
139
+ }, null, 8, ["value"])
140
+ ]),
141
+ _: 1
142
+ }),
143
+ e(t, {
144
+ label: "签名校验",
145
+ span: 1
146
+ }, {
147
+ default: a(() => [
148
+ e(u, {
149
+ value: l.signValid
150
+ }, null, 8, ["value"])
151
+ ]),
152
+ _: 1
153
+ }),
154
+ e(t, {
155
+ label: "时间戳校验",
156
+ span: 1
157
+ }, {
158
+ default: a(() => [
159
+ e(u, {
160
+ value: l.timestampValid
161
+ }, null, 8, ["value"])
162
+ ]),
163
+ _: 1
164
+ }),
165
+ e(t, {
166
+ label: "Nonce 校验",
167
+ span: 1
168
+ }, {
169
+ default: a(() => [
170
+ e(u, {
171
+ value: l.nonceValid
172
+ }, null, 8, ["value"])
173
+ ]),
174
+ _: 1
175
+ }),
176
+ e(t, {
177
+ label: "响应消息",
178
+ span: 2
179
+ }, {
180
+ default: a(() => [
181
+ n(o(l.responseMsg || "-"), 1)
182
+ ]),
183
+ _: 1
184
+ }),
185
+ l.requestBody ? (c(), p(t, {
186
+ key: 0,
187
+ label: "请求体",
188
+ span: 2
189
+ }, {
190
+ default: a(() => [
191
+ k("pre", B, o(l.requestBody), 1)
192
+ ]),
193
+ _: 1
194
+ })) : b("", !0),
195
+ l.failReason ? (c(), p(t, {
196
+ key: 1,
197
+ label: "失败原因",
198
+ span: 2
199
+ }, {
200
+ default: a(() => [
201
+ e(C, { type: "danger" }, {
202
+ default: a(() => [
203
+ n(o(l.failReason), 1)
204
+ ]),
205
+ _: 1
206
+ })
207
+ ]),
208
+ _: 1
209
+ })) : b("", !0)
210
+ ]),
211
+ _: 1
212
+ })
213
+ ]),
214
+ _: 1
215
+ }, 8, ["spinning"])
216
+ ]),
217
+ _: 1
218
+ }, 8, ["open"]);
219
+ };
220
+ }
221
+ });
222
+ export {
223
+ O as default
224
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./OpenApiLogDetail.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,266 @@
1
+ import { defineComponent as q, ref as T, reactive as C, computed as H, resolveComponent as r, openBlock as i, createElementBlock as I, createElementVNode as N, createVNode as t, withCtx as a, createTextVNode as l, unref as D, Fragment as A, toDisplayString as v, createBlock as M, createCommentVNode as O } from "vue";
2
+ import { FileSearchOutlined as F } from "@ant-design/icons-vue";
3
+ import { FxCardTable as B } from "@since2006/components";
4
+ import { queryLogs as V } from "./api.js";
5
+ import h from "./OpenApiLogDetail.vue.js";
6
+ const K = { class: "ant-pro-table" }, $ = { class: "ant-pro-table-search" }, j = ["onClick"], ee = /* @__PURE__ */ q({
7
+ name: "OpenApiLogIndex",
8
+ __name: "OpenApiLogIndex",
9
+ setup(z) {
10
+ const g = T(), P = [
11
+ {
12
+ title: "时间",
13
+ dataIndex: "createdAt",
14
+ width: 170,
15
+ sorter: !0,
16
+ sortDirections: ["descend", "ascend"],
17
+ sortField: "created_at"
18
+ },
19
+ { title: "认证模式", dataIndex: "authMode", width: 100, align: "center" },
20
+ { title: "应用名称", dataIndex: "appName", width: 150 },
21
+ { title: "请求路径", dataIndex: "requestUri" },
22
+ { title: "方法", dataIndex: "requestMethod", width: 80, align: "center" },
23
+ { title: "IP", dataIndex: "requestIp", width: 130 },
24
+ { title: "响应码", dataIndex: "responseCode", width: 140, align: "center" },
25
+ { title: "耗时", dataIndex: "costMs", width: 90, align: "right" },
26
+ { title: "操作", dataIndex: "action", width: 80, align: "center" }
27
+ ], o = C({
28
+ appName: void 0,
29
+ requestUri: void 0,
30
+ responseCode: void 0,
31
+ dateRange: void 0
32
+ }), R = H(() => {
33
+ const d = {
34
+ appName: o.appName || void 0,
35
+ requestUri: o.requestUri || void 0,
36
+ responseCode: o.responseCode || void 0
37
+ };
38
+ return o.dateRange && o.dateRange.length === 2 && (d.startDate = o.dateRange[0].format("YYYY-MM-DD HH:mm:ss"), d.endDate = o.dateRange[1].format("YYYY-MM-DD HH:mm:ss")), d;
39
+ }), p = C({
40
+ open: !1,
41
+ logId: ""
42
+ }), _ = () => {
43
+ g.value.refresh();
44
+ }, w = () => {
45
+ o.appName = void 0, o.requestUri = void 0, o.responseCode = void 0, o.dateRange = void 0, g.value.refresh();
46
+ }, y = (d) => {
47
+ p.logId = d.id, p.open = !0;
48
+ }, k = (d) => d === "OK" ? "success" : ["AUTH_FAILED", "IP_DENIED", "PERMISSION_DENIED"].includes(d) ? "error" : ["RATE_LIMITED", "APP_DISABLED"].includes(d) ? "warning" : "default";
49
+ return (d, e) => {
50
+ const E = r("a-input"), f = r("a-form-item"), u = r("a-col"), s = r("a-select-option"), U = r("a-select"), b = r("a-range-picker"), c = r("a-button"), L = r("a-row"), S = r("a-form"), x = r("a-tag");
51
+ return i(), I("div", null, [
52
+ N("div", K, [
53
+ N("div", $, [
54
+ t(S, { layout: "horizontal" }, {
55
+ default: a(() => [
56
+ t(L, {
57
+ gutter: 16,
58
+ type: "flex",
59
+ justify: "start"
60
+ }, {
61
+ default: a(() => [
62
+ t(u, {
63
+ xs: 24,
64
+ sm: 24,
65
+ md: 12,
66
+ lg: 5
67
+ }, {
68
+ default: a(() => [
69
+ t(f, { label: "应用名称" }, {
70
+ default: a(() => [
71
+ t(E, {
72
+ value: o.appName,
73
+ "onUpdate:value": e[0] || (e[0] = (n) => o.appName = n),
74
+ placeholder: "应用名称",
75
+ onPressEnter: _
76
+ }, null, 8, ["value"])
77
+ ]),
78
+ _: 1
79
+ })
80
+ ]),
81
+ _: 1
82
+ }),
83
+ t(u, {
84
+ xs: 24,
85
+ sm: 24,
86
+ md: 12,
87
+ lg: 5
88
+ }, {
89
+ default: a(() => [
90
+ t(f, { label: "请求路径" }, {
91
+ default: a(() => [
92
+ t(E, {
93
+ value: o.requestUri,
94
+ "onUpdate:value": e[1] || (e[1] = (n) => o.requestUri = n),
95
+ placeholder: "模糊搜索",
96
+ onPressEnter: _
97
+ }, null, 8, ["value"])
98
+ ]),
99
+ _: 1
100
+ })
101
+ ]),
102
+ _: 1
103
+ }),
104
+ t(u, {
105
+ xs: 24,
106
+ sm: 24,
107
+ md: 12,
108
+ lg: 4
109
+ }, {
110
+ default: a(() => [
111
+ t(f, { label: "响应码" }, {
112
+ default: a(() => [
113
+ t(U, {
114
+ value: o.responseCode,
115
+ "onUpdate:value": e[2] || (e[2] = (n) => o.responseCode = n),
116
+ placeholder: "全部",
117
+ "allow-clear": "",
118
+ onChange: _
119
+ }, {
120
+ default: a(() => [
121
+ t(s, { value: "OK" }, {
122
+ default: a(() => [...e[5] || (e[5] = [
123
+ l("OK", -1)
124
+ ])]),
125
+ _: 1
126
+ }),
127
+ t(s, { value: "AUTH_FAILED" }, {
128
+ default: a(() => [...e[6] || (e[6] = [
129
+ l("AUTH_FAILED", -1)
130
+ ])]),
131
+ _: 1
132
+ }),
133
+ t(s, { value: "IP_DENIED" }, {
134
+ default: a(() => [...e[7] || (e[7] = [
135
+ l("IP_DENIED", -1)
136
+ ])]),
137
+ _: 1
138
+ }),
139
+ t(s, { value: "PERMISSION_DENIED" }, {
140
+ default: a(() => [...e[8] || (e[8] = [
141
+ l("PERMISSION_DENIED", -1)
142
+ ])]),
143
+ _: 1
144
+ }),
145
+ t(s, { value: "APP_DISABLED" }, {
146
+ default: a(() => [...e[9] || (e[9] = [
147
+ l("APP_DISABLED", -1)
148
+ ])]),
149
+ _: 1
150
+ }),
151
+ t(s, { value: "RATE_LIMITED" }, {
152
+ default: a(() => [...e[10] || (e[10] = [
153
+ l("RATE_LIMITED", -1)
154
+ ])]),
155
+ _: 1
156
+ })
157
+ ]),
158
+ _: 1
159
+ }, 8, ["value"])
160
+ ]),
161
+ _: 1
162
+ })
163
+ ]),
164
+ _: 1
165
+ }),
166
+ t(u, {
167
+ xs: 24,
168
+ sm: 24,
169
+ md: 12,
170
+ lg: 6
171
+ }, {
172
+ default: a(() => [
173
+ t(f, { label: "时间范围" }, {
174
+ default: a(() => [
175
+ t(b, {
176
+ value: o.dateRange,
177
+ "onUpdate:value": e[3] || (e[3] = (n) => o.dateRange = n),
178
+ "show-time": "",
179
+ format: "YYYY-MM-DD HH:mm",
180
+ style: { width: "100%" }
181
+ }, null, 8, ["value"])
182
+ ]),
183
+ _: 1
184
+ })
185
+ ]),
186
+ _: 1
187
+ }),
188
+ t(u, null, {
189
+ default: a(() => [
190
+ t(c, {
191
+ type: "primary",
192
+ onClick: _
193
+ }, {
194
+ default: a(() => [...e[11] || (e[11] = [
195
+ l("搜索", -1)
196
+ ])]),
197
+ _: 1
198
+ }),
199
+ t(c, {
200
+ style: { "margin-left": "16px" },
201
+ onClick: w
202
+ }, {
203
+ default: a(() => [...e[12] || (e[12] = [
204
+ l("重置", -1)
205
+ ])]),
206
+ _: 1
207
+ })
208
+ ]),
209
+ _: 1
210
+ })
211
+ ]),
212
+ _: 1
213
+ })
214
+ ]),
215
+ _: 1
216
+ })
217
+ ]),
218
+ t(D(B), {
219
+ columns: P,
220
+ "load-data": D(V),
221
+ params: R.value,
222
+ ref_key: "tableRef",
223
+ ref: g
224
+ }, {
225
+ title: a(() => [
226
+ t(D(F)),
227
+ e[13] || (e[13] = l(" 调用日志 ", -1))
228
+ ]),
229
+ bodyCell: a(({ column: n, record: Y, text: m }) => [
230
+ n.dataIndex === "appName" ? (i(), I(A, { key: 0 }, [
231
+ l(v(m || "-"), 1)
232
+ ], 64)) : n.dataIndex === "requestMethod" ? (i(), M(x, { key: 1 }, {
233
+ default: a(() => [
234
+ l(v(m), 1)
235
+ ]),
236
+ _: 2
237
+ }, 1024)) : n.dataIndex === "responseCode" ? (i(), M(x, {
238
+ key: 2,
239
+ color: k(m)
240
+ }, {
241
+ default: a(() => [
242
+ l(v(m), 1)
243
+ ]),
244
+ _: 2
245
+ }, 1032, ["color"])) : n.dataIndex === "costMs" ? (i(), I(A, { key: 3 }, [
246
+ l(v(m) + " ms ", 1)
247
+ ], 64)) : n.dataIndex === "action" ? (i(), I("a", {
248
+ key: 4,
249
+ onClick: (G) => y(Y)
250
+ }, "详情", 8, j)) : O("", !0)
251
+ ]),
252
+ _: 1
253
+ }, 8, ["load-data", "params"])
254
+ ]),
255
+ t(h, {
256
+ open: p.open,
257
+ "onUpdate:open": e[4] || (e[4] = (n) => p.open = n),
258
+ "log-id": p.logId
259
+ }, null, 8, ["open", "log-id"])
260
+ ]);
261
+ };
262
+ }
263
+ });
264
+ export {
265
+ ee as default
266
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./OpenApiLogIndex.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,169 @@
1
+ import { defineComponent as w, ref as v, reactive as x, watch as I, resolveComponent as l, openBlock as B, createBlock as N, withCtx as o, createVNode as t, createTextVNode as s } from "vue";
2
+ import { message as R } from "ant-design-vue";
3
+ import { savePermission as j } from "./api.js";
4
+ const G = /* @__PURE__ */ w({
5
+ __name: "OpenApiPermissionEdit",
6
+ props: {
7
+ open: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ appId: {
12
+ type: [String, Number],
13
+ default: ""
14
+ },
15
+ permission: {
16
+ type: Object,
17
+ default: null
18
+ }
19
+ },
20
+ emits: ["update:open", "success"],
21
+ setup(_, { emit: T }) {
22
+ const n = _, r = T, c = v(), m = v(!1), b = {
23
+ apiCode: "",
24
+ httpMethod: "*",
25
+ enabled: 1
26
+ }, a = x({ ...b }), g = {
27
+ apiCode: [{ required: !0, message: "请输入接口编码" }]
28
+ }, p = v(null), E = () => {
29
+ Object.assign(a, b), p.value = null;
30
+ };
31
+ I(
32
+ () => n.open,
33
+ (d) => {
34
+ d && (E(), n.permission && (p.value = n.permission.id, a.apiCode = n.permission.apiCode, a.httpMethod = n.permission.httpMethod || "*", a.enabled = n.permission.enabled));
35
+ }
36
+ );
37
+ const y = () => {
38
+ c.value.validateFields().then(() => {
39
+ const d = {
40
+ ...a,
41
+ appId: n.appId
42
+ };
43
+ p.value && (d.id = p.value), m.value = !0, j(d).then((e) => {
44
+ e.code === 200 && (R.success("保存成功"), r("success"), r("update:open", !1));
45
+ }).finally(() => {
46
+ m.value = !1;
47
+ });
48
+ });
49
+ }, P = () => {
50
+ r("update:open", !1);
51
+ };
52
+ return (d, e) => {
53
+ const M = l("a-input"), f = l("a-form-item"), i = l("a-select-option"), O = l("a-select"), C = l("a-radio"), S = l("a-radio-group"), k = l("a-form"), U = l("a-modal");
54
+ return B(), N(U, {
55
+ title: p.value ? "编辑权限" : "新增权限",
56
+ width: 560,
57
+ open: _.open,
58
+ "mask-closable": !1,
59
+ "confirm-loading": m.value,
60
+ "destroy-on-close": "",
61
+ onOk: y,
62
+ onCancel: P
63
+ }, {
64
+ default: o(() => [
65
+ t(k, {
66
+ ref_key: "formRef",
67
+ ref: c,
68
+ model: a,
69
+ rules: g,
70
+ "label-col": { span: 6 },
71
+ "wrapper-col": { span: 16 }
72
+ }, {
73
+ default: o(() => [
74
+ t(f, {
75
+ label: "接口编码",
76
+ name: "apiCode"
77
+ }, {
78
+ default: o(() => [
79
+ t(M, {
80
+ value: a.apiCode,
81
+ "onUpdate:value": e[0] || (e[0] = (u) => a.apiCode = u),
82
+ placeholder: "如 user.query"
83
+ }, null, 8, ["value"])
84
+ ]),
85
+ _: 1
86
+ }),
87
+ t(f, {
88
+ label: "HTTP 方法",
89
+ name: "httpMethod"
90
+ }, {
91
+ default: o(() => [
92
+ t(O, {
93
+ value: a.httpMethod,
94
+ "onUpdate:value": e[1] || (e[1] = (u) => a.httpMethod = u)
95
+ }, {
96
+ default: o(() => [
97
+ t(i, { value: "*" }, {
98
+ default: o(() => [...e[3] || (e[3] = [
99
+ s("*(全部)", -1)
100
+ ])]),
101
+ _: 1
102
+ }),
103
+ t(i, { value: "GET" }, {
104
+ default: o(() => [...e[4] || (e[4] = [
105
+ s("GET", -1)
106
+ ])]),
107
+ _: 1
108
+ }),
109
+ t(i, { value: "POST" }, {
110
+ default: o(() => [...e[5] || (e[5] = [
111
+ s("POST", -1)
112
+ ])]),
113
+ _: 1
114
+ }),
115
+ t(i, { value: "PUT" }, {
116
+ default: o(() => [...e[6] || (e[6] = [
117
+ s("PUT", -1)
118
+ ])]),
119
+ _: 1
120
+ }),
121
+ t(i, { value: "DELETE" }, {
122
+ default: o(() => [...e[7] || (e[7] = [
123
+ s("DELETE", -1)
124
+ ])]),
125
+ _: 1
126
+ })
127
+ ]),
128
+ _: 1
129
+ }, 8, ["value"])
130
+ ]),
131
+ _: 1
132
+ }),
133
+ t(f, { label: "状态" }, {
134
+ default: o(() => [
135
+ t(S, {
136
+ value: a.enabled,
137
+ "onUpdate:value": e[2] || (e[2] = (u) => a.enabled = u)
138
+ }, {
139
+ default: o(() => [
140
+ t(C, { value: 1 }, {
141
+ default: o(() => [...e[8] || (e[8] = [
142
+ s("启用", -1)
143
+ ])]),
144
+ _: 1
145
+ }),
146
+ t(C, { value: 0 }, {
147
+ default: o(() => [...e[9] || (e[9] = [
148
+ s("禁用", -1)
149
+ ])]),
150
+ _: 1
151
+ })
152
+ ]),
153
+ _: 1
154
+ }, 8, ["value"])
155
+ ]),
156
+ _: 1
157
+ })
158
+ ]),
159
+ _: 1
160
+ }, 8, ["model"])
161
+ ]),
162
+ _: 1
163
+ }, 8, ["title", "open", "confirm-loading"]);
164
+ };
165
+ }
166
+ });
167
+ export {
168
+ G as default
169
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./OpenApiPermissionEdit.vue.js";
2
+ export {
3
+ f as default
4
+ };