@ximatai/muyun-web-app 0.26.17 → 0.26.18
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.
- package/dist/{BusinessActivityLogView-9RrW-RKb.js → BusinessActivityLogView-CNW817Sf.js} +2 -2
- package/dist/BusinessLogListDrawer-YiJxOlnD.js +864 -0
- package/dist/CodeConfigurationView-DU8tjPMt.js +1667 -0
- package/dist/{ConfigurationTranslationView-Bh_ekuMP.js → ConfigurationTranslationView-CbBt5s1q.js} +22 -22
- package/dist/{LoginAuditLogView-DG6iBXEn.js → LoginAuditLogView-CZF1Jfq_.js} +2 -2
- package/dist/ModuleActionManagementView-CaiXH1l_.js +755 -0
- package/dist/{ModuleGovernanceView-C53RnUzc.js → ModuleGovernanceView-CcwGyO3x.js} +3856 -4000
- package/dist/{RequestErrorLogView-Ba5p0hLE.js → RequestErrorLogView-DpudZrC2.js} +2 -2
- package/dist/RoleDetailWorkspaceView-DNMGsAJC.js +1435 -0
- package/dist/{RuntimeLogView-BFEABm8G.js → RuntimeLogView-444BL_xs.js} +60 -60
- package/dist/WorkflowAdministrationView-C-VIjvwB.js +650 -0
- package/dist/{WorkflowConfigurationView-A0m5tBX9.js → WorkflowConfigurationView-DLFY2x7V.js} +302 -289
- package/dist/WorkflowWorkbenchView-Gr02dbBc.js +759 -0
- package/dist/codeConfiguration-ChJ6ktRR.js +208 -0
- package/dist/index.css +1 -1
- package/dist/index.js +473 -463
- package/dist/{moduleGovernanceWorkspaceView-DNKzYX0x.js → moduleMenuWorkspace-B8DKwC3L.js} +224 -265
- package/dist/{platform-components-BBfyINHa.js → platform-components-5AE0j2_3.js} +4597 -4630
- package/dist/{platform-workbench-C1hmkOUD.js → platform-workbench-BhZPARiH.js} +4887 -4929
- package/dist/types/app/DevelopmentTopbarActions.vue.d.ts +9 -0
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +5 -1
- package/dist/types/consumer/index.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +2 -2
- package/dist/types/platform-admin-runtime/ModuleCodeConfigurationStatus.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/moduleCodeConfiguration.d.ts +15 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +4 -2
- package/dist/types/platform-components/RecordRelationActionButton.vue.d.ts +16 -0
- package/dist/types/{dynamic-page-runtime → platform-components}/TenantScopeExplorer.vue.d.ts +1 -1
- package/dist/types/platform-components/index.d.ts +2 -0
- package/dist/types/platform-components/managementWorkspaceLayout.d.ts +10 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +4 -0
- package/dist/types/platform-components/useBusinessCodeForm.d.ts +36 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +6 -2
- package/dist/types/platform-workbench/WorkbenchGlobalTools.vue.d.ts +13 -1
- package/dist/types/views/CodeConfigurationView.vue.d.ts +8 -0
- package/dist/types/views/CodeRuleFormatEditor.vue.d.ts +17 -0
- package/dist/types/views/codeConfiguration.d.ts +127 -0
- package/dist/types/views/codeConfigurationWorkspaceView.d.ts +5 -0
- package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiDatePicker.vue.d.ts +33 -0
- package/dist/types/vue-ui-antdv/components/UiHelp.vue.d.ts +16 -0
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiPopover.vue.d.ts +12 -4
- package/dist/types/vue-ui-antdv/datePickerCalendar.d.ts +472 -0
- package/dist/types/vue-ui-antdv/datePickerValue.d.ts +6 -0
- package/dist/types/vue-ui-antdv/index.d.ts +3 -0
- package/dist/types/vue-ui-antdv/languageLocales.d.ts +2 -0
- package/dist/types/web-contracts/index.d.ts +14 -0
- package/dist/{workspaceViews-BpH71LKQ.js → workspaceViews-DeBqozVb.js} +1046 -902
- package/package.json +4 -1
- package/dist/BusinessLogListDrawer-DYVx9tiQ.js +0 -864
- package/dist/ModuleActionManagementView-DgHqhoMN.js +0 -755
- package/dist/RoleDetailWorkspaceView-C3TBqksY.js +0 -1435
- package/dist/WorkflowAdministrationView-BOHG2e-I.js +0 -650
- package/dist/WorkflowWorkbenchView-DGpNDt5V.js +0 -759
|
@@ -0,0 +1,864 @@
|
|
|
1
|
+
import { $i as e, Cn as t, Fa as n, Fr as r, G as i, Ia as a, Kn as o, Ma as s, Nn as c, Nt as ee, O as l, On as te, Qi as ne, Qn as u, Sn as d, Zi as f, bn as p, k as m, pa as re, pn as h, sn as g, tr as _, ua as ie, vn as v, yn as y } from "./platform-components-5AE0j2_3.js";
|
|
2
|
+
import { Fragment as b, computed as x, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createTextVNode as E, createVNode as D, defineComponent as O, normalizeClass as k, openBlock as A, ref as j, renderList as M, shallowRef as N, toDisplayString as P, unref as F, withCtx as I } from "vue";
|
|
3
|
+
//#region src/views/businessLogClient.ts
|
|
4
|
+
var L = {
|
|
5
|
+
activity: "/platform.business_activity_log",
|
|
6
|
+
"request-error": "/platform.request_error_log",
|
|
7
|
+
login: "/iam.login_audit_log"
|
|
8
|
+
};
|
|
9
|
+
function ae(e, t) {
|
|
10
|
+
let n = L[t];
|
|
11
|
+
return {
|
|
12
|
+
async detail(t) {
|
|
13
|
+
return H(await e.request({ path: `${n}/${encodeURIComponent(t)}` }));
|
|
14
|
+
},
|
|
15
|
+
async operatorCandidates(t) {
|
|
16
|
+
return R(await e.request({
|
|
17
|
+
method: "POST",
|
|
18
|
+
path: `${n}/operator-candidates/query`,
|
|
19
|
+
body: {
|
|
20
|
+
keyword: t.keyword,
|
|
21
|
+
selectedIds: t.selectedIds,
|
|
22
|
+
tenantId: t.tenantId,
|
|
23
|
+
organizationId: t.organizationId,
|
|
24
|
+
departmentId: t.departmentId,
|
|
25
|
+
page: {
|
|
26
|
+
pageNum: t.pageNum ?? 1,
|
|
27
|
+
pageSize: t.pageSize ?? 20
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
},
|
|
32
|
+
...t === "activity" ? {
|
|
33
|
+
actionStatistics: async (t) => W(await e.request({
|
|
34
|
+
method: "POST",
|
|
35
|
+
path: `${n}/statistics/actions`,
|
|
36
|
+
body: t
|
|
37
|
+
})),
|
|
38
|
+
pageAccessStatistics: async (t) => W(await e.request({
|
|
39
|
+
method: "POST",
|
|
40
|
+
path: `${n}/statistics/page-access`,
|
|
41
|
+
body: t
|
|
42
|
+
}))
|
|
43
|
+
} : {},
|
|
44
|
+
...t === "request-error" ? { diagnostic: async (t) => {
|
|
45
|
+
let r = await e.request({ path: `${n}/${encodeURIComponent(t)}/diagnostic` });
|
|
46
|
+
return J(J(r).diagnostic ?? r);
|
|
47
|
+
} } : {}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function R(e) {
|
|
51
|
+
let t = J(e);
|
|
52
|
+
return {
|
|
53
|
+
records: V(t.records),
|
|
54
|
+
selectedRecords: V(t.selectedRecords),
|
|
55
|
+
total: X(t.total),
|
|
56
|
+
navigation: z(t.navigation)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function z(e) {
|
|
60
|
+
let t = J(e);
|
|
61
|
+
if (Object.keys(t).length) return {
|
|
62
|
+
showTenantNavigation: Z(t.showTenantNavigation) === !0,
|
|
63
|
+
tenants: B(t.tenants),
|
|
64
|
+
organizations: B(t.organizations),
|
|
65
|
+
departments: B(t.departments)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function B(e) {
|
|
69
|
+
return Array.isArray(e) ? e.flatMap((e) => {
|
|
70
|
+
let t = J(e), n = Y(t.id);
|
|
71
|
+
return n ? [{
|
|
72
|
+
id: n,
|
|
73
|
+
title: Y(t.title) ?? n,
|
|
74
|
+
tenantId: Y(t.tenantId),
|
|
75
|
+
organizationId: Y(t.organizationId)
|
|
76
|
+
}] : [];
|
|
77
|
+
}) : [];
|
|
78
|
+
}
|
|
79
|
+
function V(e) {
|
|
80
|
+
if (!Array.isArray(e)) return [];
|
|
81
|
+
let t = [];
|
|
82
|
+
for (let n of e) {
|
|
83
|
+
let e = J(n), r = Y(e.id);
|
|
84
|
+
if (!r) continue;
|
|
85
|
+
let i = {
|
|
86
|
+
id: r,
|
|
87
|
+
title: Y(e.title) ?? r
|
|
88
|
+
};
|
|
89
|
+
[
|
|
90
|
+
"account",
|
|
91
|
+
"employeeName",
|
|
92
|
+
"organizationId",
|
|
93
|
+
"organizationName",
|
|
94
|
+
"departmentId",
|
|
95
|
+
"departmentName"
|
|
96
|
+
].forEach((t) => {
|
|
97
|
+
let n = Y(e[t]);
|
|
98
|
+
n && (i[t] = n);
|
|
99
|
+
}), t.push(i);
|
|
100
|
+
}
|
|
101
|
+
return t;
|
|
102
|
+
}
|
|
103
|
+
function H(e) {
|
|
104
|
+
let t = J(e), n = J(t.event ?? t.record ?? e);
|
|
105
|
+
return {
|
|
106
|
+
...n,
|
|
107
|
+
eventId: Y(n.eventId ?? n.id) ?? "",
|
|
108
|
+
eventType: Y(n.eventType ?? n.type) ?? "",
|
|
109
|
+
occurredAt: Y(n.occurredAt),
|
|
110
|
+
capturedAt: Y(n.capturedAt),
|
|
111
|
+
traceId: Y(n.traceId),
|
|
112
|
+
tenantId: Y(n.tenantId),
|
|
113
|
+
operatorId: Y(n.operatorId),
|
|
114
|
+
operatorOrganizationId: Y(n.operatorOrganizationId),
|
|
115
|
+
operatorIdentity: q(n),
|
|
116
|
+
moduleAlias: Y(n.moduleAlias),
|
|
117
|
+
actionCode: Y(n.actionCode),
|
|
118
|
+
entityAlias: Y(n.entityAlias ?? J(n.details).entityAlias),
|
|
119
|
+
recordId: Y(n.recordId ?? J(n.details).recordId),
|
|
120
|
+
mutationSource: Y(n.mutationSource ?? J(n.details).mutationSource),
|
|
121
|
+
outcome: Y(n.outcome ?? n.result ?? J(n.details).outcome),
|
|
122
|
+
loginAccount: U(n, J(n.details)),
|
|
123
|
+
summary: G(n, J(n.details)),
|
|
124
|
+
details: se(n.details)
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function U(e, t) {
|
|
128
|
+
return Y(e.loginAccount) ?? Y(t.confirmedAccount) ?? Y(t.claimedAccount);
|
|
129
|
+
}
|
|
130
|
+
function W(e) {
|
|
131
|
+
let t = J(e);
|
|
132
|
+
return Array.isArray(t.pages) ? {
|
|
133
|
+
items: t.pages.map((e) => {
|
|
134
|
+
let t = J(e);
|
|
135
|
+
return {
|
|
136
|
+
key: Y(t.pageKey) ?? "unknown-page",
|
|
137
|
+
title: Y(t.pageKey) ?? "未知页面",
|
|
138
|
+
...Y(t.pageKey) ? {} : { titleSource: s("platform.log.statistic.unknown-page") },
|
|
139
|
+
count: X(t.accessCount)
|
|
140
|
+
};
|
|
141
|
+
}),
|
|
142
|
+
complete: Z(t.complete)
|
|
143
|
+
} : {
|
|
144
|
+
items: [
|
|
145
|
+
["executionCount", "执行次数"],
|
|
146
|
+
["successCount", "成功次数"],
|
|
147
|
+
["failureCount", "失败次数"],
|
|
148
|
+
["rejectedCount", "拒绝次数"],
|
|
149
|
+
["knownDurationCount", "含耗时记录数"],
|
|
150
|
+
["totalDurationMillis", "累计耗时(毫秒)"],
|
|
151
|
+
["knownAffectedRecordCount", "含影响数记录数"],
|
|
152
|
+
["totalAffectedRecordCount", "累计影响记录数"]
|
|
153
|
+
].map(([e, n]) => ({
|
|
154
|
+
key: e,
|
|
155
|
+
title: n,
|
|
156
|
+
titleSource: s(`platform.log.statistic.${e}`),
|
|
157
|
+
count: X(t[e])
|
|
158
|
+
})),
|
|
159
|
+
complete: Z(t.complete)
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function oe(e, t) {
|
|
163
|
+
let r = e.titleSource;
|
|
164
|
+
return r?.sourceKind === "CODE" && r.sourceId.startsWith("platform.log.statistic.") && n(r, e.title) ? t.t(r.sourceId, r.originalText) : e.title;
|
|
165
|
+
}
|
|
166
|
+
function G(e, t) {
|
|
167
|
+
return Y(e.summary ?? e.message ?? e.description) ?? K(t.message) ?? K(t.responseSummary) ?? Y(t.reasonCode) ?? Y(t.failureStage) ?? Y(t.pageKey) ?? Y(t.errorCode) ?? Y(t.authenticationMethod);
|
|
168
|
+
}
|
|
169
|
+
function K(e) {
|
|
170
|
+
return Y(e) ?? Y(J(e).value);
|
|
171
|
+
}
|
|
172
|
+
function q(e) {
|
|
173
|
+
let t = J(e.operatorIdentity), n = Y(t.employeeName), r = Y(t.username), i = Y(t.organizationId), a = Y(t.organizationName), o = Y(t.departmentId), s = Y(t.departmentName);
|
|
174
|
+
return n || r || i || a || o || s ? {
|
|
175
|
+
employeeName: n,
|
|
176
|
+
username: r,
|
|
177
|
+
organizationId: i,
|
|
178
|
+
organizationName: a,
|
|
179
|
+
departmentId: o,
|
|
180
|
+
departmentName: s
|
|
181
|
+
} : void 0;
|
|
182
|
+
}
|
|
183
|
+
function J(e) {
|
|
184
|
+
return typeof e == "object" && e && !Array.isArray(e) ? e : {};
|
|
185
|
+
}
|
|
186
|
+
function se(e) {
|
|
187
|
+
let t = J(e);
|
|
188
|
+
return Object.keys(t).length > 0 ? t : void 0;
|
|
189
|
+
}
|
|
190
|
+
function Y(e) {
|
|
191
|
+
return typeof e == "string" && e.length > 0 ? e : void 0;
|
|
192
|
+
}
|
|
193
|
+
function X(e) {
|
|
194
|
+
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
195
|
+
}
|
|
196
|
+
function Z(e) {
|
|
197
|
+
return typeof e == "boolean" ? e : void 0;
|
|
198
|
+
}
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/views/businessLogRetentionClient.ts
|
|
201
|
+
function ce(e) {
|
|
202
|
+
let t = "/platform.business_log_retention";
|
|
203
|
+
return {
|
|
204
|
+
async policies() {
|
|
205
|
+
let n = await e.request({ path: `${t}/policies` });
|
|
206
|
+
return Array.isArray(n) ? n : [];
|
|
207
|
+
},
|
|
208
|
+
async update(n) {
|
|
209
|
+
return await e.request({
|
|
210
|
+
method: "POST",
|
|
211
|
+
path: `${t}/policies/${n.eventType}`,
|
|
212
|
+
body: {
|
|
213
|
+
automaticCleanupEnabled: n.automaticCleanupEnabled,
|
|
214
|
+
retentionDays: n.retentionDays,
|
|
215
|
+
version: n.version
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
async purge(n, r) {
|
|
220
|
+
return await e.request({
|
|
221
|
+
method: "POST",
|
|
222
|
+
path: `${t}/policies/${n}/purge`,
|
|
223
|
+
body: { retentionDays: r }
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/views/BusinessLogRetentionControl.vue?vue&type=script&setup=true&lang.ts
|
|
230
|
+
var le = {
|
|
231
|
+
key: 3,
|
|
232
|
+
class: "business-log-retention-control__policies"
|
|
233
|
+
}, ue = { key: 0 }, de = { class: "business-log-retention-control__automatic-cleanup" }, fe = { class: "business-log-retention-control__content" }, pe = { class: "business-log-retention-control__retention-days" }, me = { class: "business-log-retention-control__retention-row" }, he = {
|
|
234
|
+
key: 0,
|
|
235
|
+
class: "business-log-retention-control__validation"
|
|
236
|
+
}, Q = /*#__PURE__*/ _(/* @__PURE__ */ O({
|
|
237
|
+
name: "BusinessLogRetentionControl",
|
|
238
|
+
__name: "BusinessLogRetentionControl",
|
|
239
|
+
props: { eventTypes: {} },
|
|
240
|
+
setup(n) {
|
|
241
|
+
let i = a(), s = n, l = r({
|
|
242
|
+
moduleAlias: "platform.business_log_retention",
|
|
243
|
+
runtimeAccess: "VIEW"
|
|
244
|
+
}), m = ce(l.http), h = j(!1), _ = j([]), O = j({}), k = j(!1), L = N(), ae = x(() => L.value ? _e(L.value) : void 0), R = j(), z = j(), B = x(() => l.can("viewRetentionPolicies") === !0), V = x(() => l.can("configureRetentionPolicy") === !0), H = x(() => l.can("purgeExpiredLogs") === !0), U = x(() => R.value !== void 0 || z.value !== void 0), W = x(() => {
|
|
245
|
+
let e = new Set(s.eventTypes);
|
|
246
|
+
return _.value.filter((t) => e.has(t.eventType));
|
|
247
|
+
}), oe = x(() => W.value.some(X));
|
|
248
|
+
async function G() {
|
|
249
|
+
B.value && (h.value = !0, await K());
|
|
250
|
+
}
|
|
251
|
+
async function K() {
|
|
252
|
+
k.value = !0, L.value = void 0;
|
|
253
|
+
try {
|
|
254
|
+
let e = await m.policies(), t = new Set(s.eventTypes), n = e.filter((e) => t.has(e.eventType));
|
|
255
|
+
_.value = n.map((e) => ({ ...e })), O.value = Object.fromEntries(n.map((e) => [e.eventType, { ...e }]));
|
|
256
|
+
} catch (e) {
|
|
257
|
+
L.value = ge(e), g(e, {
|
|
258
|
+
language: i,
|
|
259
|
+
source: "business-log-retention",
|
|
260
|
+
phase: "load"
|
|
261
|
+
});
|
|
262
|
+
} finally {
|
|
263
|
+
k.value = !1;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
async function q() {
|
|
267
|
+
return U.value ? (v(i.t("platform.screen.BusinessLogRetentionControl.a-cleanup-operation-is-in-progress-please-wait", "自动清理操作正在执行,请稍候。")), !1) : !oe.value || p({
|
|
268
|
+
title: i.t("platform.screen.BusinessLogRetentionControl.discard-unsaved-cleanup-settings", "放弃未保存的自动清理设置?"),
|
|
269
|
+
content: i.t("platform.screen.BusinessLogRetentionControl.unsaved-changes-to-automatic-cleanup-and-retention-days-will-be", "关闭后,本次未保存的自动清理和保留天数修改将丢失。")
|
|
270
|
+
}, i);
|
|
271
|
+
}
|
|
272
|
+
async function J(e) {
|
|
273
|
+
if (Q(e.retentionDays) && X(e) && !U.value) {
|
|
274
|
+
R.value = e.eventType;
|
|
275
|
+
try {
|
|
276
|
+
Y(await m.update(e)), y(i.t("platform.screen.BusinessLogRetentionControl.cleanup-settings-saved-for-value", "{value1}自动清理设置已保存", { value1: $(e.eventType) }));
|
|
277
|
+
} catch (e) {
|
|
278
|
+
g(e, {
|
|
279
|
+
language: i,
|
|
280
|
+
source: "business-log-retention",
|
|
281
|
+
phase: "action"
|
|
282
|
+
});
|
|
283
|
+
} finally {
|
|
284
|
+
R.value = void 0;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
async function se(e) {
|
|
289
|
+
if (Q(e.retentionDays) && !U.value && await p({
|
|
290
|
+
title: i.t("platform.screen.BusinessLogRetentionControl.clean-up-value-now", "立即清理{value1}", { value1: $(e.eventType) }),
|
|
291
|
+
content: i.t("platform.screen.BusinessLogRetentionControl.logs-strictly-older-than-value-days-will-be-deleted-this", "将删除严格早于 {value1} 天的日志。本次清理不会保存对保留天数的修改,且操作不可恢复。", { value1: e.retentionDays }),
|
|
292
|
+
requiredText: i.t("platform.screen.BusinessLogRetentionControl.clean-up-value", "清理{value1}", { value1: $(e.eventType) }),
|
|
293
|
+
danger: !0
|
|
294
|
+
}, i)) {
|
|
295
|
+
z.value = e.eventType;
|
|
296
|
+
try {
|
|
297
|
+
let t = await m.purge(e.eventType, e.retentionDays);
|
|
298
|
+
if (t.result.status === "ALREADY_RUNNING") {
|
|
299
|
+
v(i.t("platform.screen.BusinessLogRetentionControl.a-log-cleanup-task-is-already-running-this-request-was", "已有日志清理任务正在运行,本次未执行。"));
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
y(t.result.status === "BATCH_LIMIT_REACHED" ? i.t("platform.screen.BusinessLogRetentionControl.deleted-value-records-in-this-run-remaining-records-will-be", "本轮已清理 {value1} 条,剩余数据将在后续批次继续处理", { value1: t.result.deletedCount }) : i.t("platform.screen.BusinessLogRetentionControl.deleted-value-records-from-value", "已清理 {value1} 条{value2}", {
|
|
303
|
+
value1: t.result.deletedCount,
|
|
304
|
+
value2: $(e.eventType)
|
|
305
|
+
}));
|
|
306
|
+
} catch (e) {
|
|
307
|
+
g(e, {
|
|
308
|
+
language: i,
|
|
309
|
+
source: "business-log-retention",
|
|
310
|
+
phase: "action"
|
|
311
|
+
});
|
|
312
|
+
} finally {
|
|
313
|
+
z.value = void 0;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function Y(e) {
|
|
318
|
+
O.value = {
|
|
319
|
+
...O.value,
|
|
320
|
+
[e.eventType]: { ...e }
|
|
321
|
+
}, _.value = _.value.map((t) => t.eventType === e.eventType ? { ...e } : t);
|
|
322
|
+
}
|
|
323
|
+
function X(e) {
|
|
324
|
+
let t = O.value[e.eventType];
|
|
325
|
+
return !t || t.retentionDays !== e.retentionDays || t.automaticCleanupEnabled !== e.automaticCleanupEnabled;
|
|
326
|
+
}
|
|
327
|
+
function Z(e, t) {
|
|
328
|
+
e.retentionDays = Number(t);
|
|
329
|
+
}
|
|
330
|
+
function Q(e) {
|
|
331
|
+
return Number.isInteger(e) && e >= 1 && e <= 36500;
|
|
332
|
+
}
|
|
333
|
+
function $(e) {
|
|
334
|
+
return {
|
|
335
|
+
LOGIN: i.t("platform.screen.BusinessLogRetentionControl.login-audit-logs", "登录日志"),
|
|
336
|
+
ACTION: i.t("platform.screen.BusinessLogRetentionControl.action-logs", "动作日志"),
|
|
337
|
+
REQUEST_ERROR: i.t("platform.screen.BusinessLogRetentionControl.error-logs", "异常日志"),
|
|
338
|
+
PAGE_ACCESS: i.t("platform.screen.BusinessLogRetentionControl.page-access-logs", "页面访问日志")
|
|
339
|
+
}[e];
|
|
340
|
+
}
|
|
341
|
+
function ge(e) {
|
|
342
|
+
return e instanceof Error ? e : new f(ne(i, "platform.screen.BusinessLogRetentionControl.failed-to-load-automatic-cleanup-settings", "自动清理设置加载失败。"));
|
|
343
|
+
}
|
|
344
|
+
function _e(t) {
|
|
345
|
+
return t instanceof f ? e(t, i) : re(ie(t), i);
|
|
346
|
+
}
|
|
347
|
+
return (e, n) => (A(), w(b, null, [B.value ? (A(), S(F(u), {
|
|
348
|
+
key: 0,
|
|
349
|
+
onClick: G
|
|
350
|
+
}, {
|
|
351
|
+
default: I(() => [E(P(F(i).t("platform.screen.BusinessLogRetentionControl.automatic-cleanup", "自动清理")), 1)]),
|
|
352
|
+
_: 1
|
|
353
|
+
})) : C("v-if", !0), D(F(ee), {
|
|
354
|
+
open: h.value,
|
|
355
|
+
title: F(i).t("platform.screen.BusinessLogRetentionControl.automatic-cleanup", "自动清理"),
|
|
356
|
+
subtitle: F(i).t("platform.screen.BusinessLogRetentionControl.configure-automatic-cleanup-and-retention-for-the-current-log-type", "配置当前日志类型的自动清理和保留期限。"),
|
|
357
|
+
width: "standard",
|
|
358
|
+
scope: "viewport",
|
|
359
|
+
"before-close": q,
|
|
360
|
+
onClose: n[0] ||= (e) => h.value = !1
|
|
361
|
+
}, {
|
|
362
|
+
default: I(() => [k.value ? (A(), S(F(t), {
|
|
363
|
+
key: 0,
|
|
364
|
+
tip: F(i).t("platform.screen.BusinessLogRetentionControl.loading-automatic-cleanup-settings", "加载自动清理设置")
|
|
365
|
+
}, null, 8, ["tip"])) : ae.value ? (A(), S(F(d), {
|
|
366
|
+
key: 1,
|
|
367
|
+
title: F(i).t("platform.screen.BusinessLogRetentionControl.automatic-cleanup-settings-unavailable", "自动清理设置不可用"),
|
|
368
|
+
message: ae.value
|
|
369
|
+
}, null, 8, ["title", "message"])) : W.value.length === 0 ? (A(), S(F(te), {
|
|
370
|
+
key: 2,
|
|
371
|
+
description: F(i).t("platform.screen.BusinessLogRetentionControl.no-automatic-cleanup-settings-available", "暂无可管理的自动清理设置")
|
|
372
|
+
}, null, 8, ["description"])) : (A(), w("section", le, [(A(!0), w(b, null, M(W.value, (e) => (A(), w("article", { key: e.eventType }, [
|
|
373
|
+
T("header", null, [T("div", null, [T("h3", null, P($(e.eventType)), 1), e.updatedAt ? (A(), w("small", ue, [E(P(F(i).t("platform.screen.BusinessLogRetentionControl.last-updated", "最近更新:")) + P(e.updatedAt), 1), e.updatedBy ? (A(), w(b, { key: 0 }, [E(" · " + P(e.updatedBy), 1)], 64)) : C("v-if", !0)])) : C("v-if", !0)]), T("label", de, [T("span", null, P(F(i).t("platform.screen.BusinessLogRetentionControl.automatic-cleanup", "自动清理")), 1), D(F(c), {
|
|
374
|
+
checked: e.automaticCleanupEnabled,
|
|
375
|
+
"onUpdate:checked": (t) => e.automaticCleanupEnabled = t,
|
|
376
|
+
disabled: !V.value || U.value,
|
|
377
|
+
"checked-text": F(i).t("platform.screen.WorkflowWorkbenchView.enabled", "启用"),
|
|
378
|
+
"unchecked-text": F(i).t("platform.screen.WorkflowWorkbenchView.disabled", "停用")
|
|
379
|
+
}, null, 8, [
|
|
380
|
+
"checked",
|
|
381
|
+
"onUpdate:checked",
|
|
382
|
+
"disabled",
|
|
383
|
+
"checked-text",
|
|
384
|
+
"unchecked-text"
|
|
385
|
+
])])]),
|
|
386
|
+
T("div", fe, [T("label", pe, [
|
|
387
|
+
T("span", null, P(F(i).t("platform.screen.BusinessLogRetentionControl.retention-days", "保留天数")), 1),
|
|
388
|
+
T("span", me, [D(F(o), {
|
|
389
|
+
value: e.retentionDays,
|
|
390
|
+
type: "number",
|
|
391
|
+
disabled: !V.value || U.value,
|
|
392
|
+
"aria-label": F(i).t("platform.screen.BusinessLogRetentionControl.retention-days-for-value", "{value1}保留天数", { value1: $(e.eventType) }),
|
|
393
|
+
"onUpdate:value": (t) => Z(e, t)
|
|
394
|
+
}, null, 8, [
|
|
395
|
+
"value",
|
|
396
|
+
"disabled",
|
|
397
|
+
"aria-label",
|
|
398
|
+
"onUpdate:value"
|
|
399
|
+
]), H.value ? (A(), S(F(u), {
|
|
400
|
+
key: 0,
|
|
401
|
+
intent: "danger",
|
|
402
|
+
disabled: U.value || !Q(e.retentionDays),
|
|
403
|
+
loading: z.value === e.eventType,
|
|
404
|
+
onClick: (t) => se(e)
|
|
405
|
+
}, {
|
|
406
|
+
default: I(() => [E(P(F(i).t("platform.screen.BusinessLogRetentionControl.clean-up-now", "立即清理")), 1)]),
|
|
407
|
+
_: 1
|
|
408
|
+
}, 8, [
|
|
409
|
+
"disabled",
|
|
410
|
+
"loading",
|
|
411
|
+
"onClick"
|
|
412
|
+
])) : C("v-if", !0)]),
|
|
413
|
+
Q(e.retentionDays) ? C("v-if", !0) : (A(), w("small", he, P(F(i).t("platform.screen.BusinessLogRetentionControl.enter-an-integer-from-1-to-36500", "请输入 1 至 36500 之间的整数。")), 1))
|
|
414
|
+
])]),
|
|
415
|
+
T("footer", null, [V.value ? (A(), S(F(u), {
|
|
416
|
+
key: 0,
|
|
417
|
+
emphasis: "primary",
|
|
418
|
+
disabled: U.value || !Q(e.retentionDays) || !X(e),
|
|
419
|
+
loading: R.value === e.eventType,
|
|
420
|
+
onClick: (t) => J(e)
|
|
421
|
+
}, {
|
|
422
|
+
default: I(() => [E(P(F(i).t("platform.action.save", "保存")), 1)]),
|
|
423
|
+
_: 1
|
|
424
|
+
}, 8, [
|
|
425
|
+
"disabled",
|
|
426
|
+
"loading",
|
|
427
|
+
"onClick"
|
|
428
|
+
])) : C("v-if", !0)])
|
|
429
|
+
]))), 128))]))]),
|
|
430
|
+
_: 1
|
|
431
|
+
}, 8, [
|
|
432
|
+
"open",
|
|
433
|
+
"title",
|
|
434
|
+
"subtitle"
|
|
435
|
+
])], 64));
|
|
436
|
+
}
|
|
437
|
+
}), [["__scopeId", "data-v-88f9267c"]]), $ = {
|
|
438
|
+
key: 2,
|
|
439
|
+
class: "business-log-list__detail"
|
|
440
|
+
}, ge = {
|
|
441
|
+
key: 4,
|
|
442
|
+
class: "business-log-list__diagnostic"
|
|
443
|
+
}, _e = {
|
|
444
|
+
key: 1,
|
|
445
|
+
class: "business-log-list__detail"
|
|
446
|
+
}, ve = {
|
|
447
|
+
key: 0,
|
|
448
|
+
class: "business-log-list__hint"
|
|
449
|
+
}, ye = {
|
|
450
|
+
key: 1,
|
|
451
|
+
class: "business-log-list__detail"
|
|
452
|
+
}, be = /*#__PURE__*/ _(/* @__PURE__ */ O({
|
|
453
|
+
name: "BusinessLogListDrawer",
|
|
454
|
+
__name: "BusinessLogListDrawer",
|
|
455
|
+
props: {
|
|
456
|
+
surface: {},
|
|
457
|
+
moduleAlias: {},
|
|
458
|
+
title: {}
|
|
459
|
+
},
|
|
460
|
+
setup(n) {
|
|
461
|
+
let o = a(), s = n, c = r({ moduleAlias: s.moduleAlias }), p = ae(c.http, s.surface), _ = {
|
|
462
|
+
get title() {
|
|
463
|
+
return o.t("platform.screen.BusinessLogListDrawer.select-an-operator", "选择操作用户");
|
|
464
|
+
},
|
|
465
|
+
get placeholder() {
|
|
466
|
+
return o.t("platform.screen.UserPicker.searchPlaceholder", "按账号或用户 ID 搜索");
|
|
467
|
+
},
|
|
468
|
+
get searchPlaceholder() {
|
|
469
|
+
return o.t("platform.screen.UserPicker.searchPlaceholder", "按账号或用户 ID 搜索");
|
|
470
|
+
},
|
|
471
|
+
mode: "dialog",
|
|
472
|
+
columns: m,
|
|
473
|
+
provider: l({
|
|
474
|
+
sourceIdentity: {
|
|
475
|
+
targetModuleAlias: "iam.user",
|
|
476
|
+
source: {
|
|
477
|
+
kind: "businessPurpose",
|
|
478
|
+
id: `${s.moduleAlias}:operators`
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
searchPage: async ({ keyword: e, pageNum: t, pageSize: n, scope: r }) => {
|
|
482
|
+
let i = await p.operatorCandidates({
|
|
483
|
+
keyword: e,
|
|
484
|
+
pageNum: t,
|
|
485
|
+
pageSize: n,
|
|
486
|
+
...r
|
|
487
|
+
});
|
|
488
|
+
return {
|
|
489
|
+
records: i.records,
|
|
490
|
+
total: i.total,
|
|
491
|
+
navigation: i.navigation
|
|
492
|
+
};
|
|
493
|
+
},
|
|
494
|
+
resolveUsers: async (e) => (await p.operatorCandidates({ selectedIds: e })).selectedRecords
|
|
495
|
+
})
|
|
496
|
+
}, v = j(), y = j(!1), O = N(), L = x(() => O.value ? Le(O.value) : void 0), R = j(), z = j(!1), B = N(), V = x(() => B.value ? Le(B.value) : void 0), H = j(!1), U = j(), W = j(), G = j(!1), K = N(), q = x(() => K.value ? Le(K.value) : void 0), J = j(), se = x(() => Ie.value[s.surface]), Y = x(() => s.surface === "activity"), X = x(() => s.surface === "request-error"), Z = x(() => ({
|
|
497
|
+
login: ["LOGIN"],
|
|
498
|
+
activity: ["ACTION", "PAGE_ACCESS"],
|
|
499
|
+
"request-error": ["REQUEST_ERROR"]
|
|
500
|
+
})[s.surface]), ce = x(() => c.can("viewInternalDiagnostic") === !0), le = x(() => se.value.columns), ue = x(() => v.value ? De(v.value) : []), de = x(() => Me(R.value)), fe = x(() => [...Oe(o.t("platform.workflow-task-editor.business-action", "业务动作"), U.value), ...Oe(o.t("platform.screen.BusinessLogListDrawer.page-access", "页面访问"), W.value)]), pe = x(() => U.value?.complete === !1 || W.value?.complete === !1);
|
|
501
|
+
async function me(e) {
|
|
502
|
+
let t = e, n = t.eventId;
|
|
503
|
+
if (n) {
|
|
504
|
+
v.value = t, O.value = void 0, R.value = void 0, B.value = void 0, y.value = !0;
|
|
505
|
+
try {
|
|
506
|
+
v.value = await p.detail(n);
|
|
507
|
+
} catch (e) {
|
|
508
|
+
O.value = Fe(e), g(e, {
|
|
509
|
+
language: o,
|
|
510
|
+
source: "business-log-detail",
|
|
511
|
+
phase: "load"
|
|
512
|
+
});
|
|
513
|
+
} finally {
|
|
514
|
+
y.value = !1;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
async function he() {
|
|
519
|
+
if (Y.value && !G.value) {
|
|
520
|
+
H.value = !0, G.value = !0, K.value = void 0;
|
|
521
|
+
try {
|
|
522
|
+
let e = J.value ?? Se(), [t, n] = await Promise.all([p.actionStatistics?.(e), p.pageAccessStatistics?.(e)]);
|
|
523
|
+
U.value = t, W.value = n;
|
|
524
|
+
} catch (e) {
|
|
525
|
+
K.value = Fe(e), g(e, {
|
|
526
|
+
language: o,
|
|
527
|
+
source: "business-log-statistics",
|
|
528
|
+
phase: "load"
|
|
529
|
+
});
|
|
530
|
+
} finally {
|
|
531
|
+
G.value = !1;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
async function be() {
|
|
536
|
+
let e = v.value?.eventId;
|
|
537
|
+
if (p.diagnostic && e && !z.value) {
|
|
538
|
+
z.value = !0, B.value = void 0;
|
|
539
|
+
try {
|
|
540
|
+
R.value = await p.diagnostic(e);
|
|
541
|
+
} catch (e) {
|
|
542
|
+
B.value = Fe(e), g(e, {
|
|
543
|
+
language: o,
|
|
544
|
+
source: "business-log-diagnostic",
|
|
545
|
+
phase: "load"
|
|
546
|
+
});
|
|
547
|
+
} finally {
|
|
548
|
+
z.value = !1;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
function xe(e) {
|
|
553
|
+
J.value = e, U.value = void 0, W.value = void 0;
|
|
554
|
+
}
|
|
555
|
+
function Se() {
|
|
556
|
+
return {
|
|
557
|
+
page: {
|
|
558
|
+
pageNum: 1,
|
|
559
|
+
pageSize: 50
|
|
560
|
+
},
|
|
561
|
+
conditions: []
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
function Ce(e) {
|
|
565
|
+
return e.name === "operatorId" ? _ : void 0;
|
|
566
|
+
}
|
|
567
|
+
function we(e, t) {
|
|
568
|
+
switch (e) {
|
|
569
|
+
case "outcome": return Ee(t.outcome);
|
|
570
|
+
case "mutationSource": return Te(t.mutationSource);
|
|
571
|
+
case "employeeName": return t.operatorIdentity?.employeeName ?? "—";
|
|
572
|
+
case "username": return t.operatorIdentity?.username ?? t.operatorId ?? "—";
|
|
573
|
+
case "loginAccount": return ke(t) ?? "—";
|
|
574
|
+
case "organizationName": return t.operatorIdentity?.organizationName ?? "—";
|
|
575
|
+
case "departmentName": return t.operatorIdentity?.departmentName ?? "—";
|
|
576
|
+
case "errorCode": return Ne(t.details?.errorCode) ?? "—";
|
|
577
|
+
case "httpStatus": return Ne(t.details?.httpStatus) ?? "—";
|
|
578
|
+
default: return Pe(t[e]);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
function Te(e) {
|
|
582
|
+
return {
|
|
583
|
+
BUSINESS: o.t("platform.screen.BusinessLogListDrawer.business-data-write", "业务写入"),
|
|
584
|
+
ACTION: o.t("platform.workflow-task-editor.business-action", "业务动作"),
|
|
585
|
+
SYSTEM: o.t("platform.screen.BusinessLogListDrawer.system-processing", "系统处理"),
|
|
586
|
+
WRITE_BACK: o.t("platform.screen.BusinessLogListDrawer.platform-write-back", "平台回写")
|
|
587
|
+
}[e ?? ""] ?? e ?? "—";
|
|
588
|
+
}
|
|
589
|
+
function Ee(e) {
|
|
590
|
+
return {
|
|
591
|
+
SUCCESS: o.t("platform.screen.BusinessLogListDrawer.success", "成功"),
|
|
592
|
+
FAILURE: o.t("platform.screen.BusinessLogListDrawer.failure", "失败"),
|
|
593
|
+
REJECTED: o.t("platform.screen.BusinessLogListDrawer.rejected", "拒绝")
|
|
594
|
+
}[e ?? ""] ?? e ?? "—";
|
|
595
|
+
}
|
|
596
|
+
function De(e) {
|
|
597
|
+
return [
|
|
598
|
+
[o.t("platform.screen.BusinessLogListDrawer.occurred-at", "发生时间"), e.occurredAt],
|
|
599
|
+
[o.t("platform.screen.BusinessLogListDrawer.event-type", "事件类型"), e.eventType],
|
|
600
|
+
[o.t("platform.screen.BusinessLogListDrawer.outcome", "结果"), e.outcome],
|
|
601
|
+
[o.t("platform.user-picker.column.employee-name", "职员姓名"), e.operatorIdentity?.employeeName],
|
|
602
|
+
[o.t("platform.screen.BusinessLogListDrawer.operator", "操作用户"), e.operatorIdentity?.username ?? e.operatorId],
|
|
603
|
+
[o.t("platform.screen.CurrentUserProfileDialog.sign-in-account", "登录账号"), ke(e)],
|
|
604
|
+
[o.t("platform.screen.BusinessLogListDrawer.user-id", "用户 ID"), e.operatorId],
|
|
605
|
+
[o.t("platform.user-picker.axis.organization", "机构"), e.operatorIdentity?.organizationName],
|
|
606
|
+
[o.t("platform.screen.BusinessLogListDrawer.organization-id", "机构 ID"), e.operatorIdentity?.organizationId ?? e.operatorOrganizationId],
|
|
607
|
+
[o.t("platform.user-picker.axis.department", "部门"), e.operatorIdentity?.departmentName],
|
|
608
|
+
[o.t("platform.screen.BusinessLogListDrawer.department-id", "部门 ID"), e.operatorIdentity?.departmentId],
|
|
609
|
+
[o.t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块"), e.moduleAlias],
|
|
610
|
+
[o.t("platform.governance.tab.actions", "动作"), e.actionCode],
|
|
611
|
+
[o.t("platform.screen.BusinessLogListDrawer.entity", "实体"), e.entityAlias],
|
|
612
|
+
[o.t("platform.screen.BusinessLogListDrawer.record-id", "记录 ID"), e.recordId],
|
|
613
|
+
[o.t("platform.screen.BusinessLogListDrawer.change-source", "变更来源"), Te(e.mutationSource)],
|
|
614
|
+
[o.t("platform.screen.BusinessLogListDrawer.trace-id", "追踪 ID"), e.traceId],
|
|
615
|
+
...Me(e.details, [
|
|
616
|
+
"outcome",
|
|
617
|
+
"entityAlias",
|
|
618
|
+
"recordId",
|
|
619
|
+
"mutationSource"
|
|
620
|
+
]).map((e) => [e.key, e.value])
|
|
621
|
+
].filter(([, e]) => e != null && e !== "").map(([e, t]) => ({
|
|
622
|
+
key: e,
|
|
623
|
+
value: Pe(t)
|
|
624
|
+
}));
|
|
625
|
+
}
|
|
626
|
+
function Oe(e, t) {
|
|
627
|
+
return (t?.items ?? []).map((t) => ({
|
|
628
|
+
key: `${e}:${t.key}`,
|
|
629
|
+
kind: e,
|
|
630
|
+
title: oe(t, o),
|
|
631
|
+
count: t.count
|
|
632
|
+
}));
|
|
633
|
+
}
|
|
634
|
+
function ke(e) {
|
|
635
|
+
if (e.eventType === "LOGIN") return e.loginAccount ?? Ne(e.details?.confirmedAccount) ?? Ne(e.details?.claimedAccount);
|
|
636
|
+
}
|
|
637
|
+
function Ae() {
|
|
638
|
+
return [{
|
|
639
|
+
key: "detail",
|
|
640
|
+
title: o.t("platform.screen.PageCompositionEditor.details", "详情"),
|
|
641
|
+
primary: !0,
|
|
642
|
+
iconName: "eye"
|
|
643
|
+
}];
|
|
644
|
+
}
|
|
645
|
+
function je(e, t) {
|
|
646
|
+
e.key === "detail" && me(t);
|
|
647
|
+
}
|
|
648
|
+
function Me(e, t = []) {
|
|
649
|
+
let n = new Set(t);
|
|
650
|
+
return Object.entries(e ?? {}).filter(([e]) => !n.has(e)).map(([e, t]) => ({
|
|
651
|
+
key: e,
|
|
652
|
+
value: Pe(t)
|
|
653
|
+
}));
|
|
654
|
+
}
|
|
655
|
+
function Ne(e) {
|
|
656
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : void 0;
|
|
657
|
+
}
|
|
658
|
+
function Pe(e) {
|
|
659
|
+
return e == null || e === "" ? "—" : typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
660
|
+
}
|
|
661
|
+
function Fe(e) {
|
|
662
|
+
return e instanceof Error ? e : new f(ne(o, "platform.screen.BusinessLogListDrawer.the-request-did-not-complete-try-again-later", "请求未完成,请稍后重试。"));
|
|
663
|
+
}
|
|
664
|
+
let Ie = x(() => ({
|
|
665
|
+
login: { columns: [
|
|
666
|
+
{
|
|
667
|
+
key: "outcome",
|
|
668
|
+
title: o.t("platform.screen.BusinessLogListDrawer.outcome", "结果"),
|
|
669
|
+
width: "96px"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
key: "occurredAt",
|
|
673
|
+
title: o.t("platform.screen.BusinessLogListDrawer.occurred-at", "发生时间"),
|
|
674
|
+
width: "176px"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
key: "loginAccount",
|
|
678
|
+
title: o.t("platform.screen.CurrentUserProfileDialog.sign-in-account", "登录账号"),
|
|
679
|
+
width: "200px"
|
|
680
|
+
}
|
|
681
|
+
] },
|
|
682
|
+
activity: { columns: [
|
|
683
|
+
{
|
|
684
|
+
key: "outcome",
|
|
685
|
+
title: o.t("platform.screen.BusinessLogListDrawer.outcome", "结果"),
|
|
686
|
+
width: "96px"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
key: "occurredAt",
|
|
690
|
+
title: o.t("platform.screen.BusinessLogListDrawer.occurred-at", "发生时间"),
|
|
691
|
+
width: "176px"
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
key: "username",
|
|
695
|
+
title: o.t("platform.screen.BusinessLogListDrawer.operator", "操作用户"),
|
|
696
|
+
width: "160px"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
key: "moduleAlias",
|
|
700
|
+
title: o.t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块"),
|
|
701
|
+
width: "190px"
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
key: "actionCode",
|
|
705
|
+
title: o.t("platform.governance.tab.actions", "动作"),
|
|
706
|
+
width: "150px"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
key: "recordId",
|
|
710
|
+
title: o.t("platform.screen.BusinessLogListDrawer.record-id", "记录 ID"),
|
|
711
|
+
width: "170px"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
key: "mutationSource",
|
|
715
|
+
title: o.t("platform.screen.BusinessLogListDrawer.change-source", "变更来源"),
|
|
716
|
+
width: "120px"
|
|
717
|
+
}
|
|
718
|
+
] },
|
|
719
|
+
"request-error": { columns: [
|
|
720
|
+
{
|
|
721
|
+
key: "occurredAt",
|
|
722
|
+
title: o.t("platform.screen.BusinessLogListDrawer.occurred-at", "发生时间"),
|
|
723
|
+
width: "176px"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
key: "moduleAlias",
|
|
727
|
+
title: o.t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块"),
|
|
728
|
+
width: "190px"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
key: "errorCode",
|
|
732
|
+
title: o.t("platform.screen.BusinessLogListDrawer.error-code", "错误码"),
|
|
733
|
+
width: "150px"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
key: "httpStatus",
|
|
737
|
+
title: o.t("platform.screen.BusinessLogListDrawer.http-status", "HTTP 状态"),
|
|
738
|
+
width: "112px"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
key: "summary",
|
|
742
|
+
title: o.t("platform.screen.BusinessLogListDrawer.error-summary", "错误摘要"),
|
|
743
|
+
width: "260px"
|
|
744
|
+
}
|
|
745
|
+
] }
|
|
746
|
+
}));
|
|
747
|
+
function Le(t) {
|
|
748
|
+
return t instanceof f ? e(t, o) : re(ie(t), o);
|
|
749
|
+
}
|
|
750
|
+
return (e, r) => (A(), w(b, null, [
|
|
751
|
+
D(F(i), {
|
|
752
|
+
class: "business-log-list",
|
|
753
|
+
context: F(c),
|
|
754
|
+
title: n.title,
|
|
755
|
+
columns: le.value,
|
|
756
|
+
"row-key": "eventId",
|
|
757
|
+
"show-recycle-bin": !1,
|
|
758
|
+
"page-size": 50,
|
|
759
|
+
"page-size-options": [
|
|
760
|
+
20,
|
|
761
|
+
50,
|
|
762
|
+
100
|
|
763
|
+
],
|
|
764
|
+
"reference-picker-of": Ce,
|
|
765
|
+
"empty-description": F(o).t("platform.screen.BusinessLogListDrawer.no-logs-match-the-criteria", "暂无符合条件的日志"),
|
|
766
|
+
"row-actions-of": Ae,
|
|
767
|
+
"row-actions-title": F(o).t("platform.screen.RecordPermissionDialog.operation", "操作"),
|
|
768
|
+
"action-column-width": "88px",
|
|
769
|
+
onRecordActivate: me,
|
|
770
|
+
onRowAction: je,
|
|
771
|
+
onQueried: xe
|
|
772
|
+
}, {
|
|
773
|
+
operations: I(() => [Y.value ? (A(), S(F(u), {
|
|
774
|
+
key: 0,
|
|
775
|
+
loading: G.value,
|
|
776
|
+
onClick: he
|
|
777
|
+
}, {
|
|
778
|
+
default: I(() => [E(P(F(o).t("platform.screen.BusinessLogListDrawer.usage-statistics", "使用统计")), 1)]),
|
|
779
|
+
_: 1
|
|
780
|
+
}, 8, ["loading"])) : C("v-if", !0), D(Q, { "event-types": Z.value }, null, 8, ["event-types"])]),
|
|
781
|
+
cell: I(({ column: e, record: t }) => [e.key === "occurredAt" ? (A(), S(F(h), {
|
|
782
|
+
key: 0,
|
|
783
|
+
value: t.occurredAt
|
|
784
|
+
}, null, 8, ["value"])) : (A(), w("span", {
|
|
785
|
+
key: 1,
|
|
786
|
+
class: k({ "business-log-list__summary": e.key === "summary" })
|
|
787
|
+
}, P(we(e.key, t)), 3))]),
|
|
788
|
+
_: 1
|
|
789
|
+
}, 8, [
|
|
790
|
+
"context",
|
|
791
|
+
"title",
|
|
792
|
+
"columns",
|
|
793
|
+
"empty-description",
|
|
794
|
+
"row-actions-title"
|
|
795
|
+
]),
|
|
796
|
+
D(F(ee), {
|
|
797
|
+
open: !!v.value,
|
|
798
|
+
title: F(o).t("platform.screen.BusinessLogListDrawer.value-details", "{value1}详情", { value1: n.title }),
|
|
799
|
+
"render-mode": "inline",
|
|
800
|
+
subtitle: v.value ? v.value.operatorIdentity?.employeeName ?? v.value.operatorIdentity?.username ?? v.value.operatorId : void 0,
|
|
801
|
+
"close-on-outside": !0,
|
|
802
|
+
onClose: r[0] ||= (e) => v.value = void 0
|
|
803
|
+
}, {
|
|
804
|
+
default: I(() => [y.value ? (A(), S(F(t), {
|
|
805
|
+
key: 0,
|
|
806
|
+
tip: F(o).t("platform.screen.BusinessLogListDrawer.loading-details", "加载详情")
|
|
807
|
+
}, null, 8, ["tip"])) : L.value ? (A(), S(F(d), {
|
|
808
|
+
key: 1,
|
|
809
|
+
title: F(o).t("platform.screen.BusinessLogListDrawer.failed-to-load-log-details", "日志详情加载失败"),
|
|
810
|
+
message: L.value
|
|
811
|
+
}, null, 8, ["title", "message"])) : v.value ? (A(), w("dl", $, [(A(!0), w(b, null, M(ue.value, (e) => (A(), w(b, { key: e.key }, [T("dt", null, P(e.key), 1), T("dd", null, [T("pre", null, P(e.value), 1)])], 64))), 128))])) : (A(), S(F(te), {
|
|
812
|
+
key: 3,
|
|
813
|
+
description: F(o).t("platform.screen.BusinessLogListDrawer.no-log-selected", "未选择日志")
|
|
814
|
+
}, null, 8, ["description"])), X.value && v.value && ce.value ? (A(), w("section", ge, [
|
|
815
|
+
D(F(u), {
|
|
816
|
+
loading: z.value,
|
|
817
|
+
onClick: be
|
|
818
|
+
}, {
|
|
819
|
+
default: I(() => [E(P(F(o).t("platform.screen.BusinessLogListDrawer.view-internal-diagnostics", "查看内部诊断")), 1)]),
|
|
820
|
+
_: 1
|
|
821
|
+
}, 8, ["loading"]),
|
|
822
|
+
T("small", null, P(F(o).t("platform.screen.BusinessLogListDrawer.only-administrators-with-platform-wide-scope-can-view-this-information", "仅具备平台范围的管理员可查看。")), 1),
|
|
823
|
+
V.value ? (A(), S(F(d), {
|
|
824
|
+
key: 0,
|
|
825
|
+
title: F(o).t("platform.screen.BusinessLogListDrawer.internal-diagnostics-unavailable", "内部诊断不可用"),
|
|
826
|
+
message: V.value
|
|
827
|
+
}, null, 8, ["title", "message"])) : R.value ? (A(), w("dl", _e, [(A(!0), w(b, null, M(de.value, (e) => (A(), w(b, { key: e.key }, [T("dt", null, P(e.key), 1), T("dd", null, [T("pre", null, P(e.value), 1)])], 64))), 128))])) : C("v-if", !0)
|
|
828
|
+
])) : C("v-if", !0)]),
|
|
829
|
+
_: 1
|
|
830
|
+
}, 8, [
|
|
831
|
+
"open",
|
|
832
|
+
"title",
|
|
833
|
+
"subtitle"
|
|
834
|
+
]),
|
|
835
|
+
D(F(ee), {
|
|
836
|
+
open: H.value,
|
|
837
|
+
title: F(o).t("platform.screen.BusinessLogListDrawer.business-activity-usage-statistics", "业务活动使用统计"),
|
|
838
|
+
"render-mode": "inline",
|
|
839
|
+
subtitle: F(o).t("platform.screen.BusinessLogListDrawer.statistics-follow-the-current-query-criteria-and-the-signed-in", "统计口径遵循当前标准查询条件与登录账号的数据范围。"),
|
|
840
|
+
"close-on-outside": !0,
|
|
841
|
+
onClose: r[1] ||= (e) => H.value = !1
|
|
842
|
+
}, {
|
|
843
|
+
default: I(() => [G.value ? (A(), S(F(t), {
|
|
844
|
+
key: 0,
|
|
845
|
+
tip: F(o).t("platform.screen.BusinessLogListDrawer.loading-usage-statistics", "加载使用统计")
|
|
846
|
+
}, null, 8, ["tip"])) : q.value ? (A(), S(F(d), {
|
|
847
|
+
key: 1,
|
|
848
|
+
title: F(o).t("platform.screen.BusinessLogListDrawer.failed-to-load-usage-statistics", "使用统计加载失败"),
|
|
849
|
+
message: q.value
|
|
850
|
+
}, null, 8, ["title", "message"])) : (A(), w(b, { key: 2 }, [pe.value ? (A(), w("p", ve, P(F(o).t("platform.screen.BusinessLogListDrawer.these-statistics-cover-only-the-most-recent-accessible-logs", "当前统计只覆盖可读取的最近日志。")), 1)) : C("v-if", !0), fe.value.length > 0 ? (A(), w("dl", ye, [(A(!0), w(b, null, M(fe.value, (e) => (A(), w(b, { key: e.key }, [T("dt", null, P(e.kind) + " · " + P(e.title), 1), T("dd", null, P(e.count), 1)], 64))), 128))])) : (A(), S(F(te), {
|
|
851
|
+
key: 2,
|
|
852
|
+
description: F(o).t("platform.screen.BusinessLogListDrawer.no-business-activity-available-for-statistics", "暂无可统计的业务活动")
|
|
853
|
+
}, null, 8, ["description"]))], 64))]),
|
|
854
|
+
_: 1
|
|
855
|
+
}, 8, [
|
|
856
|
+
"open",
|
|
857
|
+
"title",
|
|
858
|
+
"subtitle"
|
|
859
|
+
])
|
|
860
|
+
], 64));
|
|
861
|
+
}
|
|
862
|
+
}), [["__scopeId", "data-v-daa601a0"]]);
|
|
863
|
+
//#endregion
|
|
864
|
+
export { be as t };
|