@ximatai/muyun-web-app 0.26.13 → 0.26.15
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-UC4rH4Fn.js → BusinessActivityLogView-DVzrZW1X.js} +1 -1
- package/dist/BusinessLogListDrawer-D-R3wnWr.js +825 -0
- package/dist/{LoginAuditLogView-Cjrp8MKX.js → LoginAuditLogView-BP1eaEPw.js} +1 -1
- package/dist/{ModuleActionManagementView-Dkb35QXc.js → ModuleActionManagementView-D17iKVQv.js} +214 -196
- package/dist/{ModuleGovernanceView-Dx43QvGf.js → ModuleGovernanceView-LkWCtops.js} +13509 -8472
- package/dist/{RequestErrorLogView-WnGvMWiF.js → RequestErrorLogView-LzN94-Tk.js} +1 -1
- package/dist/{RoleDetailWorkspaceView-DPDb_QOn.js → RoleDetailWorkspaceView-BXA-bzFu.js} +173 -164
- package/dist/{RuntimeLogView-BRl4ZDkU.js → RuntimeLogView-DUpu2q2w.js} +48 -81
- package/dist/index.css +1 -1
- package/dist/index.js +562 -497
- package/dist/moduleGovernanceWorkspaceView-COjWtJMr.js +639 -0
- package/dist/{platform-components-1cvOeHmo.js → platform-components-Hs3DrTqE.js} +5260 -3344
- package/dist/platform-workbench-C-kE-Yqq.js +19755 -0
- package/dist/{http-B0TC0pJB.js → sse-Q1wa3p_k.js} +34 -4
- package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +1 -1
- package/dist/types/app/useWorkbenchMenuRefresh.d.ts +4 -0
- package/dist/types/app/workbenchMenuRefresh.d.ts +14 -0
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -2
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +3 -3
- package/dist/types/dynamic-page-runtime/ModuleDataExchangeSurface.vue.d.ts +17 -0
- package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +712 -22
- package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +3 -2
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +782 -60
- package/dist/types/dynamic-page-runtime/ModulePageListExpansionSurface.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansion.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansions.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +5 -2
- package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +9 -7
- package/dist/types/dynamic-page-runtime/RecordFormSurface.vue.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/assistantBusinessScope.d.ts +3 -0
- package/dist/types/dynamic-page-runtime/assistantQueryCapabilities.d.ts +34 -0
- package/dist/types/dynamic-page-runtime/assistantRecordEditorPolicy.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageFormContributionRuntime.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageListSession.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +94 -4
- package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/formComputeCoordinator.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/modulePageAssistantScope.d.ts +20 -0
- package/dist/types/dynamic-page-runtime/modulePageAssistantSurface.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/recordCreationReadiness.d.ts +17 -0
- package/dist/types/dynamic-page-runtime/recordDisplayProjection.d.ts +59 -0
- package/dist/types/dynamic-page-runtime/recordFormAssistantCapabilities.d.ts +59 -0
- package/dist/types/dynamic-page-runtime/recordFormDraftAccess.d.ts +33 -0
- package/dist/types/dynamic-page-runtime/recordMutationPayload.d.ts +2 -2
- package/dist/types/dynamic-page-runtime/recordReferenceDisplay.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/recordSaveRecovery.d.ts +12 -0
- package/dist/types/dynamic-page-runtime/relationDraftAssistantCapabilities.d.ts +9 -0
- package/dist/types/dynamic-page-runtime/relationDraftController.d.ts +23 -0
- package/dist/types/dynamic-page-runtime/relationFormComputeCoordinator.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +404 -12
- package/dist/types/dynamic-page-runtime/useTenantScopeController.d.ts +1 -0
- package/dist/types/formula/FormulaRuntime.d.ts +3 -1
- package/dist/types/platform-admin-runtime/backendHttp.d.ts +5 -1
- package/dist/types/platform-admin-runtime/module-menu/ModuleMenuEditor.vue.d.ts +17 -0
- package/dist/types/platform-admin-runtime/module-menu/ModuleMenuGovernanceSurface.vue.d.ts +6 -0
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuClient.d.ts +6 -2
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuReceiptStore.d.ts +5 -0
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuSession.d.ts +61 -0
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuWorkspace.d.ts +180 -0
- package/dist/types/platform-admin-runtime/workspaceViewSessions.d.ts +1 -1
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +11 -7
- package/dist/types/platform-components/DictionaryPicker.vue.d.ts +2 -0
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +1 -1
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +6 -4
- package/dist/types/platform-components/ManagementTabs.vue.d.ts +20 -0
- package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +2 -0
- package/dist/types/platform-components/QueryValueEditor.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +15 -9
- package/dist/types/platform-components/RecordExplorerTools.vue.d.ts +27 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +5 -1
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +9 -1
- package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordRelationTabs.vue.d.ts +1 -0
- package/dist/types/platform-components/ReferencePicker.vue.d.ts +2 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +2 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +5 -2
- package/dist/types/platform-components/index.d.ts +9 -1
- package/dist/types/platform-components/optionFieldOptionCache.d.ts +1 -1
- package/dist/types/platform-components/queryNumericValue.d.ts +3 -0
- package/dist/types/platform-components/querySettlementController.d.ts +5 -0
- package/dist/types/platform-components/recordDetailFieldModel.d.ts +2 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +22 -0
- package/dist/types/platform-components/recordQueryListColumnModel.d.ts +8 -0
- package/dist/types/platform-components/recordQueryListQueryController.d.ts +53 -0
- package/dist/types/platform-components/recordQueryListStandardQuery.d.ts +3 -0
- package/dist/types/platform-components/recordTreeQueryController.d.ts +18 -0
- package/dist/types/platform-components/recycleBinState.d.ts +17 -0
- package/dist/types/platform-components/referencePickerModel.d.ts +3 -0
- package/dist/types/platform-workbench/AssistantMarkdownContent.vue.d.ts +6 -0
- package/dist/types/platform-workbench/AssistantSelectionCard.vue.d.ts +15 -0
- package/dist/types/platform-workbench/ConstructionPlanCard.vue.d.ts +8 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +12 -2
- package/dist/types/platform-workbench/WorkbenchAssistantPanel.vue.d.ts +18 -0
- package/dist/types/platform-workbench/assistantMarkdown.d.ts +1 -0
- package/dist/types/platform-workbench/configurationCollaboration.d.ts +23 -0
- package/dist/types/platform-workbench/constructionDelivery.d.ts +3 -0
- package/dist/types/platform-workbench/constructionFields.d.ts +5 -0
- package/dist/types/platform-workbench/constructionInitialization.d.ts +4 -0
- package/dist/types/platform-workbench/constructionPlanGuard.d.ts +21 -0
- package/dist/types/platform-workbench/constructionPlanSession.d.ts +95 -0
- package/dist/types/platform-workbench/constructionReferenceDiscovery.d.ts +3 -0
- package/dist/types/platform-workbench/index.d.ts +1 -0
- package/dist/types/platform-workbench/useAssistantConversation.d.ts +360 -0
- package/dist/types/platform-workbench/useAssistantConversationArchive.d.ts +47 -0
- package/dist/types/platform-workbench/workbenchAssistantCapabilities.d.ts +22 -0
- package/dist/types/views/BusinessLogRetentionControl.vue.d.ts +7 -0
- package/dist/types/views/MetadataSourceTree.vue.d.ts +7 -3
- package/dist/types/views/ModuleRuntimeActivationStatus.vue.d.ts +11 -0
- package/dist/types/views/PageCompositionDescriptorPreview.vue.d.ts +8 -8
- package/dist/types/views/PageCompositionEditor.vue.d.ts +10 -0
- package/dist/types/views/PageCompositionTree.vue.d.ts +19 -13
- package/dist/types/views/businessLogClient.d.ts +3 -0
- package/dist/types/views/businessLogRetentionClient.d.ts +25 -0
- package/dist/types/views/businessRuleAssistantSurface.d.ts +7 -0
- package/dist/types/views/businessRuleEditor.d.ts +22 -0
- package/dist/types/views/businessRuleGovernance.d.ts +7 -1
- package/dist/types/views/businessRuleSession.d.ts +63 -0
- package/dist/types/views/businessRuleWorkspace.d.ts +144 -0
- package/dist/types/views/configurationEditorNavigation.d.ts +2 -0
- package/dist/types/views/metadataChangeSetSubmission.d.ts +10 -0
- package/dist/types/views/metadataEditorSession.d.ts +652 -0
- package/dist/types/views/metadataGovernanceAssistantSurface.d.ts +4 -0
- package/dist/types/views/metadataGovernanceEditor.d.ts +220 -0
- package/dist/types/views/metadataModelChangeSetClient.d.ts +36 -0
- package/dist/types/views/metadataModelEditSession.d.ts +26 -1
- package/dist/types/views/metadataNaming.d.ts +11 -1
- package/dist/types/views/metadataOrchestrationState.d.ts +22 -0
- package/dist/types/views/metadataWorkspace.d.ts +1316 -0
- package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +1 -1
- package/dist/types/views/moduleRuntimeActivation.d.ts +11 -0
- package/dist/types/views/pageCompositionAssistantSurface.d.ts +27 -0
- package/dist/types/views/pageCompositionCandidate.d.ts +47 -0
- package/dist/types/views/pageCompositionComponents.d.ts +42 -0
- package/dist/types/views/pageCompositionDraftState.d.ts +277 -8
- package/dist/types/views/pageCompositionDragPayload.d.ts +7 -1
- package/dist/types/views/pageCompositionMode.d.ts +1 -1
- package/dist/types/views/pageCompositionPlacement.d.ts +6 -1
- package/dist/types/views/pageCompositionPublication.d.ts +37 -0
- package/dist/types/views/pageCompositionSession.d.ts +1341 -0
- package/dist/types/views/pageCompositionWorkspace.d.ts +2555 -0
- package/dist/types/views/roleAuthorizationWorkspaceSession.d.ts +1 -1
- package/dist/types/views/roleDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/views/runtimeLogSse.d.ts +3 -13
- package/dist/types/views/usePageCompositionComponents.d.ts +68 -0
- package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +1 -0
- package/dist/types/vue-ui-antdv/components/UiSearchInput.vue.d.ts +2 -0
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +2 -0
- package/dist/types/vue-ui-antdv/components/UiTextArea.vue.d.ts +4 -0
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +2 -0
- package/dist/types/vue-ui-antdv/types.d.ts +4 -0
- package/dist/types/web-contracts/assistant.d.ts +87 -0
- package/dist/types/web-contracts/constructionPlan.d.ts +212 -0
- package/dist/types/web-contracts/index.d.ts +33 -0
- package/dist/types/web-contracts/operation.d.ts +33 -0
- package/dist/types/web-contracts/referenceTarget.d.ts +13 -0
- package/dist/types/web-core/assistantCapabilityCatalog.d.ts +22 -0
- package/dist/types/web-core/assistantCatalogPage.d.ts +12 -0
- package/dist/types/web-core/assistantConfirmation.d.ts +23 -0
- package/dist/types/web-core/assistantConversationClient.d.ts +42 -0
- package/dist/types/web-core/assistantRuntime.d.ts +123 -0
- package/dist/types/web-core/assistantSurface.d.ts +162 -0
- package/dist/types/web-core/assistantTurnClient.d.ts +16 -0
- package/dist/types/web-core/constructionPlanClient.d.ts +55 -0
- package/dist/types/web-core/errors.d.ts +2 -0
- package/dist/types/web-core/http.d.ts +1 -0
- package/dist/types/web-core/index.d.ts +12 -0
- package/dist/types/web-core/module/dataExchangeClient.d.ts +53 -0
- package/dist/types/web-core/module/index.d.ts +1 -0
- package/dist/types/web-core/module/staticModuleClient.d.ts +12 -2
- package/dist/types/web-core/operationConfirmation.d.ts +28 -0
- package/dist/types/web-core/operationErrors.d.ts +9 -0
- package/dist/types/web-core/operationReceipt.d.ts +10 -0
- package/dist/types/web-core/sse.d.ts +9 -0
- package/dist/types/web-core/uuid.d.ts +2 -0
- package/dist/{workspaceViews-CCg6V0pr.js → workspaceViews-CHsgLFwY.js} +783 -1189
- package/package.json +1 -1
- package/dist/BusinessLogListDrawer-BtaXVJKz.js +0 -564
- package/dist/moduleGovernanceWorkspaceView-4V_UW-Bt.js +0 -40
- package/dist/platform-workbench-Cu14Xd9d.js +0 -10299
|
@@ -0,0 +1,825 @@
|
|
|
1
|
+
import { $t as e, A as t, Dn as n, Jt as r, Kt as i, Pn as a, Qt as o, Vt as s, Xt as c, Yt as l, bn as ee, cn as u, ht as d, m as f, p, rn as m, wn as h } from "./platform-components-Hs3DrTqE.js";
|
|
2
|
+
import { Fragment as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as w, normalizeClass as T, openBlock as E, ref as D, renderList as O, toDisplayString as k, unref as A, withCtx as j } from "vue";
|
|
3
|
+
//#region src/views/businessLogClient.ts
|
|
4
|
+
var M = {
|
|
5
|
+
activity: "/platform.business_activity_log",
|
|
6
|
+
"request-error": "/platform.request_error_log",
|
|
7
|
+
login: "/iam.login_audit_log"
|
|
8
|
+
};
|
|
9
|
+
function N(e, t) {
|
|
10
|
+
let n = M[t];
|
|
11
|
+
return {
|
|
12
|
+
async detail(t) {
|
|
13
|
+
return R(await e.request({ path: `${n}/${encodeURIComponent(t)}` }));
|
|
14
|
+
},
|
|
15
|
+
async operatorCandidates(t) {
|
|
16
|
+
return P(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) => B(await e.request({
|
|
34
|
+
method: "POST",
|
|
35
|
+
path: `${n}/statistics/actions`,
|
|
36
|
+
body: t
|
|
37
|
+
})),
|
|
38
|
+
pageAccessStatistics: async (t) => B(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 W(W(r).diagnostic ?? r);
|
|
47
|
+
} } : {}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function P(e) {
|
|
51
|
+
let t = W(e);
|
|
52
|
+
return {
|
|
53
|
+
records: L(t.records),
|
|
54
|
+
selectedRecords: L(t.selectedRecords),
|
|
55
|
+
total: q(t.total),
|
|
56
|
+
navigation: F(t.navigation)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function F(e) {
|
|
60
|
+
let t = W(e);
|
|
61
|
+
if (Object.keys(t).length) return {
|
|
62
|
+
showTenantNavigation: J(t.showTenantNavigation) === !0,
|
|
63
|
+
tenants: I(t.tenants),
|
|
64
|
+
organizations: I(t.organizations),
|
|
65
|
+
departments: I(t.departments)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function I(e) {
|
|
69
|
+
return Array.isArray(e) ? e.flatMap((e) => {
|
|
70
|
+
let t = W(e), n = K(t.id);
|
|
71
|
+
return n ? [{
|
|
72
|
+
id: n,
|
|
73
|
+
title: K(t.title) ?? n,
|
|
74
|
+
tenantId: K(t.tenantId),
|
|
75
|
+
organizationId: K(t.organizationId)
|
|
76
|
+
}] : [];
|
|
77
|
+
}) : [];
|
|
78
|
+
}
|
|
79
|
+
function L(e) {
|
|
80
|
+
if (!Array.isArray(e)) return [];
|
|
81
|
+
let t = [];
|
|
82
|
+
for (let n of e) {
|
|
83
|
+
let e = W(n), r = K(e.id);
|
|
84
|
+
if (!r) continue;
|
|
85
|
+
let i = {
|
|
86
|
+
id: r,
|
|
87
|
+
title: K(e.title) ?? r
|
|
88
|
+
};
|
|
89
|
+
[
|
|
90
|
+
"account",
|
|
91
|
+
"employeeName",
|
|
92
|
+
"organizationId",
|
|
93
|
+
"organizationName",
|
|
94
|
+
"departmentId",
|
|
95
|
+
"departmentName"
|
|
96
|
+
].forEach((t) => {
|
|
97
|
+
let n = K(e[t]);
|
|
98
|
+
n && (i[t] = n);
|
|
99
|
+
}), t.push(i);
|
|
100
|
+
}
|
|
101
|
+
return t;
|
|
102
|
+
}
|
|
103
|
+
function R(e) {
|
|
104
|
+
let t = W(e), n = W(t.event ?? t.record ?? e);
|
|
105
|
+
return {
|
|
106
|
+
...n,
|
|
107
|
+
eventId: K(n.eventId ?? n.id) ?? "",
|
|
108
|
+
eventType: K(n.eventType ?? n.type) ?? "",
|
|
109
|
+
occurredAt: K(n.occurredAt),
|
|
110
|
+
capturedAt: K(n.capturedAt),
|
|
111
|
+
traceId: K(n.traceId),
|
|
112
|
+
tenantId: K(n.tenantId),
|
|
113
|
+
operatorId: K(n.operatorId),
|
|
114
|
+
operatorOrganizationId: K(n.operatorOrganizationId),
|
|
115
|
+
operatorIdentity: U(n),
|
|
116
|
+
moduleAlias: K(n.moduleAlias),
|
|
117
|
+
actionCode: K(n.actionCode),
|
|
118
|
+
entityAlias: K(n.entityAlias ?? W(n.details).entityAlias),
|
|
119
|
+
recordId: K(n.recordId ?? W(n.details).recordId),
|
|
120
|
+
mutationSource: K(n.mutationSource ?? W(n.details).mutationSource),
|
|
121
|
+
outcome: K(n.outcome ?? n.result ?? W(n.details).outcome),
|
|
122
|
+
loginAccount: z(n, W(n.details)),
|
|
123
|
+
summary: V(n, W(n.details)),
|
|
124
|
+
details: G(n.details)
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function z(e, t) {
|
|
128
|
+
return K(e.loginAccount) ?? K(t.confirmedAccount) ?? K(t.claimedAccount);
|
|
129
|
+
}
|
|
130
|
+
function B(e) {
|
|
131
|
+
let t = W(e);
|
|
132
|
+
return Array.isArray(t.pages) ? {
|
|
133
|
+
items: t.pages.map((e) => {
|
|
134
|
+
let t = W(e);
|
|
135
|
+
return {
|
|
136
|
+
key: K(t.pageKey) ?? "unknown-page",
|
|
137
|
+
title: K(t.pageKey) ?? "未知页面",
|
|
138
|
+
count: q(t.accessCount)
|
|
139
|
+
};
|
|
140
|
+
}),
|
|
141
|
+
complete: J(t.complete)
|
|
142
|
+
} : {
|
|
143
|
+
items: [
|
|
144
|
+
["executionCount", "执行次数"],
|
|
145
|
+
["successCount", "成功次数"],
|
|
146
|
+
["failureCount", "失败次数"],
|
|
147
|
+
["rejectedCount", "拒绝次数"],
|
|
148
|
+
["knownDurationCount", "含耗时记录数"],
|
|
149
|
+
["totalDurationMillis", "累计耗时(毫秒)"],
|
|
150
|
+
["knownAffectedRecordCount", "含影响数记录数"],
|
|
151
|
+
["totalAffectedRecordCount", "累计影响记录数"]
|
|
152
|
+
].map(([e, n]) => ({
|
|
153
|
+
key: e,
|
|
154
|
+
title: n,
|
|
155
|
+
count: q(t[e])
|
|
156
|
+
})),
|
|
157
|
+
complete: J(t.complete)
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function V(e, t) {
|
|
161
|
+
return K(e.summary ?? e.message ?? e.description) ?? H(t.message) ?? H(t.responseSummary) ?? K(t.reasonCode) ?? K(t.failureStage) ?? K(t.pageKey) ?? K(t.errorCode) ?? K(t.authenticationMethod);
|
|
162
|
+
}
|
|
163
|
+
function H(e) {
|
|
164
|
+
return K(e) ?? K(W(e).value);
|
|
165
|
+
}
|
|
166
|
+
function U(e) {
|
|
167
|
+
let t = W(e.operatorIdentity), n = K(t.employeeName), r = K(t.username), i = K(t.organizationId), a = K(t.organizationName), o = K(t.departmentId), s = K(t.departmentName);
|
|
168
|
+
return n || r || i || a || o || s ? {
|
|
169
|
+
employeeName: n,
|
|
170
|
+
username: r,
|
|
171
|
+
organizationId: i,
|
|
172
|
+
organizationName: a,
|
|
173
|
+
departmentId: o,
|
|
174
|
+
departmentName: s
|
|
175
|
+
} : void 0;
|
|
176
|
+
}
|
|
177
|
+
function W(e) {
|
|
178
|
+
return typeof e == "object" && e && !Array.isArray(e) ? e : {};
|
|
179
|
+
}
|
|
180
|
+
function G(e) {
|
|
181
|
+
let t = W(e);
|
|
182
|
+
return Object.keys(t).length > 0 ? t : void 0;
|
|
183
|
+
}
|
|
184
|
+
function K(e) {
|
|
185
|
+
return typeof e == "string" && e.length > 0 ? e : void 0;
|
|
186
|
+
}
|
|
187
|
+
function q(e) {
|
|
188
|
+
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
189
|
+
}
|
|
190
|
+
function J(e) {
|
|
191
|
+
return typeof e == "boolean" ? e : void 0;
|
|
192
|
+
}
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/views/businessLogRetentionClient.ts
|
|
195
|
+
function te(e) {
|
|
196
|
+
let t = "/platform.business_log_retention";
|
|
197
|
+
return {
|
|
198
|
+
async policies() {
|
|
199
|
+
let n = await e.request({ path: `${t}/policies` });
|
|
200
|
+
return Array.isArray(n) ? n : [];
|
|
201
|
+
},
|
|
202
|
+
async update(n) {
|
|
203
|
+
return await e.request({
|
|
204
|
+
method: "POST",
|
|
205
|
+
path: `${t}/policies/${n.eventType}`,
|
|
206
|
+
body: {
|
|
207
|
+
automaticCleanupEnabled: n.automaticCleanupEnabled,
|
|
208
|
+
retentionDays: n.retentionDays,
|
|
209
|
+
version: n.version
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
async purge(n, r) {
|
|
214
|
+
return await e.request({
|
|
215
|
+
method: "POST",
|
|
216
|
+
path: `${t}/policies/${n}/purge`,
|
|
217
|
+
body: { retentionDays: r }
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/views/BusinessLogRetentionControl.vue?vue&type=script&setup=true&lang.ts
|
|
224
|
+
var ne = {
|
|
225
|
+
key: 3,
|
|
226
|
+
class: "business-log-retention-control__policies"
|
|
227
|
+
}, Y = { key: 0 }, re = { class: "business-log-retention-control__automatic-cleanup" }, X = { class: "business-log-retention-control__content" }, ie = { class: "business-log-retention-control__retention-days" }, ae = { class: "business-log-retention-control__retention-row" }, oe = {
|
|
228
|
+
key: 0,
|
|
229
|
+
class: "business-log-retention-control__validation"
|
|
230
|
+
}, se = /*#__PURE__*/ n(/* @__PURE__ */ w({
|
|
231
|
+
name: "BusinessLogRetentionControl",
|
|
232
|
+
__name: "BusinessLogRetentionControl",
|
|
233
|
+
props: { eventTypes: {} },
|
|
234
|
+
setup(t) {
|
|
235
|
+
let n = t, i = a({
|
|
236
|
+
moduleAlias: "platform.business_log_retention",
|
|
237
|
+
runtimeAccess: "VIEW"
|
|
238
|
+
}), f = te(i.http), p = D(!1), w = D([]), T = D({}), M = D(!1), N = D(), P = D(), F = D(), I = _(() => i.can("viewRetentionPolicies") === !0), L = _(() => i.can("configureRetentionPolicy") === !0), R = _(() => i.can("purgeExpiredLogs") === !0), z = _(() => P.value !== void 0 || F.value !== void 0), B = _(() => {
|
|
239
|
+
let e = new Set(n.eventTypes);
|
|
240
|
+
return w.value.filter((t) => e.has(t.eventType));
|
|
241
|
+
}), V = _(() => B.value.some(J));
|
|
242
|
+
async function H() {
|
|
243
|
+
I.value && (p.value = !0, await U());
|
|
244
|
+
}
|
|
245
|
+
async function U() {
|
|
246
|
+
M.value = !0, N.value = void 0;
|
|
247
|
+
try {
|
|
248
|
+
let e = await f.policies(), t = new Set(n.eventTypes), r = e.filter((e) => t.has(e.eventType));
|
|
249
|
+
w.value = r.map((e) => ({ ...e })), T.value = Object.fromEntries(r.map((e) => [e.eventType, { ...e }]));
|
|
250
|
+
} catch (e) {
|
|
251
|
+
N.value = ce(e), s(e, {
|
|
252
|
+
source: "business-log-retention",
|
|
253
|
+
phase: "load"
|
|
254
|
+
});
|
|
255
|
+
} finally {
|
|
256
|
+
M.value = !1;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
async function W() {
|
|
260
|
+
return z.value ? (r("自动清理操作正在执行,请稍候。"), !1) : !V.value || c({
|
|
261
|
+
title: "放弃未保存的自动清理设置?",
|
|
262
|
+
content: "关闭后,本次未保存的自动清理和保留天数修改将丢失。"
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
async function G(e) {
|
|
266
|
+
if (Z(e.retentionDays) && J(e) && !z.value) {
|
|
267
|
+
P.value = e.eventType;
|
|
268
|
+
try {
|
|
269
|
+
q(await f.update(e)), l(`${Q(e.eventType)}自动清理设置已保存`);
|
|
270
|
+
} catch (e) {
|
|
271
|
+
s(e, {
|
|
272
|
+
source: "business-log-retention",
|
|
273
|
+
phase: "action"
|
|
274
|
+
});
|
|
275
|
+
} finally {
|
|
276
|
+
P.value = void 0;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
async function K(e) {
|
|
281
|
+
if (Z(e.retentionDays) && !z.value && await c({
|
|
282
|
+
title: `立即清理${Q(e.eventType)}`,
|
|
283
|
+
content: `将删除严格早于 ${e.retentionDays} 天的日志。本次清理不会保存对保留天数的修改,且操作不可恢复。`,
|
|
284
|
+
requiredText: `清理${Q(e.eventType)}`,
|
|
285
|
+
danger: !0
|
|
286
|
+
})) {
|
|
287
|
+
F.value = e.eventType;
|
|
288
|
+
try {
|
|
289
|
+
let t = await f.purge(e.eventType, e.retentionDays);
|
|
290
|
+
if (t.result.status === "ALREADY_RUNNING") {
|
|
291
|
+
r("已有日志清理任务正在运行,本次未执行。");
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
l(t.result.status === "BATCH_LIMIT_REACHED" ? `本轮已清理 ${t.result.deletedCount} 条,剩余数据将在后续批次继续处理` : `已清理 ${t.result.deletedCount} 条${Q(e.eventType)}`);
|
|
295
|
+
} catch (e) {
|
|
296
|
+
s(e, {
|
|
297
|
+
source: "business-log-retention",
|
|
298
|
+
phase: "action"
|
|
299
|
+
});
|
|
300
|
+
} finally {
|
|
301
|
+
F.value = void 0;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
function q(e) {
|
|
306
|
+
T.value = {
|
|
307
|
+
...T.value,
|
|
308
|
+
[e.eventType]: { ...e }
|
|
309
|
+
}, w.value = w.value.map((t) => t.eventType === e.eventType ? { ...e } : t);
|
|
310
|
+
}
|
|
311
|
+
function J(e) {
|
|
312
|
+
let t = T.value[e.eventType];
|
|
313
|
+
return !t || t.retentionDays !== e.retentionDays || t.automaticCleanupEnabled !== e.automaticCleanupEnabled;
|
|
314
|
+
}
|
|
315
|
+
function se(e, t) {
|
|
316
|
+
e.retentionDays = Number(t);
|
|
317
|
+
}
|
|
318
|
+
function Z(e) {
|
|
319
|
+
return Number.isInteger(e) && e >= 1 && e <= 36500;
|
|
320
|
+
}
|
|
321
|
+
function Q(e) {
|
|
322
|
+
return {
|
|
323
|
+
LOGIN: "登录日志",
|
|
324
|
+
ACTION: "动作日志",
|
|
325
|
+
REQUEST_ERROR: "异常日志",
|
|
326
|
+
PAGE_ACCESS: "页面访问日志"
|
|
327
|
+
}[e];
|
|
328
|
+
}
|
|
329
|
+
function ce(e) {
|
|
330
|
+
return e instanceof Error ? e.message : "自动清理设置加载失败。";
|
|
331
|
+
}
|
|
332
|
+
return (t, n) => (E(), b(g, null, [I.value ? (E(), v(A(h), {
|
|
333
|
+
key: 0,
|
|
334
|
+
onClick: H
|
|
335
|
+
}, {
|
|
336
|
+
default: j(() => [...n[1] ||= [S("自动清理", -1)]]),
|
|
337
|
+
_: 1
|
|
338
|
+
})) : y("v-if", !0), C(A(d), {
|
|
339
|
+
open: p.value,
|
|
340
|
+
title: "自动清理",
|
|
341
|
+
subtitle: "配置当前日志类型的自动清理和保留期限。",
|
|
342
|
+
width: "standard",
|
|
343
|
+
scope: "viewport",
|
|
344
|
+
"before-close": W,
|
|
345
|
+
onClose: n[0] ||= (e) => p.value = !1
|
|
346
|
+
}, {
|
|
347
|
+
default: j(() => [M.value ? (E(), v(A(e), {
|
|
348
|
+
key: 0,
|
|
349
|
+
tip: "加载自动清理设置"
|
|
350
|
+
})) : N.value ? (E(), v(A(o), {
|
|
351
|
+
key: 1,
|
|
352
|
+
title: "自动清理设置不可用",
|
|
353
|
+
message: N.value
|
|
354
|
+
}, null, 8, ["message"])) : B.value.length === 0 ? (E(), v(A(m), {
|
|
355
|
+
key: 2,
|
|
356
|
+
description: "暂无可管理的自动清理设置"
|
|
357
|
+
})) : (E(), b("section", ne, [(E(!0), b(g, null, O(B.value, (e) => (E(), b("article", { key: e.eventType }, [
|
|
358
|
+
x("header", null, [x("div", null, [x("h3", null, k(Q(e.eventType)), 1), e.updatedAt ? (E(), b("small", Y, [S(" 最近更新:" + k(e.updatedAt), 1), e.updatedBy ? (E(), b(g, { key: 0 }, [S(" · " + k(e.updatedBy), 1)], 64)) : y("v-if", !0)])) : y("v-if", !0)]), x("label", re, [n[2] ||= x("span", null, "自动清理", -1), C(A(u), {
|
|
359
|
+
checked: e.automaticCleanupEnabled,
|
|
360
|
+
"onUpdate:checked": (t) => e.automaticCleanupEnabled = t,
|
|
361
|
+
disabled: !L.value || z.value,
|
|
362
|
+
"checked-text": "启用",
|
|
363
|
+
"unchecked-text": "停用"
|
|
364
|
+
}, null, 8, [
|
|
365
|
+
"checked",
|
|
366
|
+
"onUpdate:checked",
|
|
367
|
+
"disabled"
|
|
368
|
+
])])]),
|
|
369
|
+
x("div", X, [x("label", ie, [
|
|
370
|
+
n[4] ||= x("span", null, "保留天数", -1),
|
|
371
|
+
x("span", ae, [C(A(ee), {
|
|
372
|
+
value: e.retentionDays,
|
|
373
|
+
type: "number",
|
|
374
|
+
disabled: !L.value || z.value,
|
|
375
|
+
"aria-label": `${Q(e.eventType)}保留天数`,
|
|
376
|
+
"onUpdate:value": (t) => se(e, t)
|
|
377
|
+
}, null, 8, [
|
|
378
|
+
"value",
|
|
379
|
+
"disabled",
|
|
380
|
+
"aria-label",
|
|
381
|
+
"onUpdate:value"
|
|
382
|
+
]), R.value ? (E(), v(A(h), {
|
|
383
|
+
key: 0,
|
|
384
|
+
intent: "danger",
|
|
385
|
+
disabled: z.value || !Z(e.retentionDays),
|
|
386
|
+
loading: F.value === e.eventType,
|
|
387
|
+
onClick: (t) => K(e)
|
|
388
|
+
}, {
|
|
389
|
+
default: j(() => [...n[3] ||= [S(" 立即清理 ", -1)]]),
|
|
390
|
+
_: 1
|
|
391
|
+
}, 8, [
|
|
392
|
+
"disabled",
|
|
393
|
+
"loading",
|
|
394
|
+
"onClick"
|
|
395
|
+
])) : y("v-if", !0)]),
|
|
396
|
+
Z(e.retentionDays) ? y("v-if", !0) : (E(), b("small", oe, " 请输入 1 至 36500 之间的整数。 "))
|
|
397
|
+
])]),
|
|
398
|
+
x("footer", null, [L.value ? (E(), v(A(h), {
|
|
399
|
+
key: 0,
|
|
400
|
+
emphasis: "primary",
|
|
401
|
+
disabled: z.value || !Z(e.retentionDays) || !J(e),
|
|
402
|
+
loading: P.value === e.eventType,
|
|
403
|
+
onClick: (t) => G(e)
|
|
404
|
+
}, {
|
|
405
|
+
default: j(() => [...n[5] ||= [S(" 保存 ", -1)]]),
|
|
406
|
+
_: 1
|
|
407
|
+
}, 8, [
|
|
408
|
+
"disabled",
|
|
409
|
+
"loading",
|
|
410
|
+
"onClick"
|
|
411
|
+
])) : y("v-if", !0)])
|
|
412
|
+
]))), 128))]))]),
|
|
413
|
+
_: 1
|
|
414
|
+
}, 8, ["open"])], 64));
|
|
415
|
+
}
|
|
416
|
+
}), [["__scopeId", "data-v-f75c1238"]]), Z = {
|
|
417
|
+
key: 2,
|
|
418
|
+
class: "business-log-list__detail"
|
|
419
|
+
}, Q = {
|
|
420
|
+
key: 4,
|
|
421
|
+
class: "business-log-list__diagnostic"
|
|
422
|
+
}, ce = {
|
|
423
|
+
key: 1,
|
|
424
|
+
class: "business-log-list__detail"
|
|
425
|
+
}, le = {
|
|
426
|
+
key: 0,
|
|
427
|
+
class: "business-log-list__hint"
|
|
428
|
+
}, ue = {
|
|
429
|
+
key: 1,
|
|
430
|
+
class: "business-log-list__detail"
|
|
431
|
+
}, de = /*#__PURE__*/ n(/* @__PURE__ */ w({
|
|
432
|
+
name: "BusinessLogListDrawer",
|
|
433
|
+
__name: "BusinessLogListDrawer",
|
|
434
|
+
props: {
|
|
435
|
+
surface: {},
|
|
436
|
+
moduleAlias: {},
|
|
437
|
+
title: {}
|
|
438
|
+
},
|
|
439
|
+
setup(n) {
|
|
440
|
+
let r = n, c = a({ moduleAlias: r.moduleAlias }), l = N(c.http, r.surface), ee = {
|
|
441
|
+
title: "选择操作用户",
|
|
442
|
+
placeholder: "按账号或用户 ID 搜索",
|
|
443
|
+
searchPlaceholder: "按账号或用户 ID 搜索",
|
|
444
|
+
mode: "dialog",
|
|
445
|
+
columns: f,
|
|
446
|
+
provider: p({
|
|
447
|
+
sourceIdentity: {
|
|
448
|
+
targetModuleAlias: "iam.user",
|
|
449
|
+
source: {
|
|
450
|
+
kind: "businessPurpose",
|
|
451
|
+
id: `${r.moduleAlias}:operators`
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
searchPage: async ({ keyword: e, pageNum: t, pageSize: n, scope: r }) => {
|
|
455
|
+
let i = await l.operatorCandidates({
|
|
456
|
+
keyword: e,
|
|
457
|
+
pageNum: t,
|
|
458
|
+
pageSize: n,
|
|
459
|
+
...r
|
|
460
|
+
});
|
|
461
|
+
return {
|
|
462
|
+
records: i.records,
|
|
463
|
+
total: i.total,
|
|
464
|
+
navigation: i.navigation
|
|
465
|
+
};
|
|
466
|
+
},
|
|
467
|
+
resolveUsers: async (e) => (await l.operatorCandidates({ selectedIds: e })).selectedRecords
|
|
468
|
+
})
|
|
469
|
+
}, u = D(), w = D(!1), M = D(), P = D(), F = D(!1), I = D(), L = D(!1), R = D(), z = D(), B = D(!1), V = D(), H = D(), U = _(() => we[r.surface]), W = _(() => r.surface === "activity"), G = _(() => r.surface === "request-error"), K = _(() => ({
|
|
470
|
+
login: ["LOGIN"],
|
|
471
|
+
activity: ["ACTION", "PAGE_ACCESS"],
|
|
472
|
+
"request-error": ["REQUEST_ERROR"]
|
|
473
|
+
})[r.surface]), q = _(() => c.can("viewInternalDiagnostic") === !0), J = _(() => U.value.columns), te = _(() => u.value ? ge(u.value) : []), ne = _(() => xe(P.value)), Y = _(() => [..._e("业务动作", R.value), ..._e("页面访问", z.value)]), re = _(() => R.value?.complete === !1 || z.value?.complete === !1);
|
|
474
|
+
async function X(e) {
|
|
475
|
+
let t = e, n = t.eventId;
|
|
476
|
+
if (n) {
|
|
477
|
+
u.value = t, M.value = void 0, P.value = void 0, I.value = void 0, w.value = !0;
|
|
478
|
+
try {
|
|
479
|
+
u.value = await l.detail(n);
|
|
480
|
+
} catch (e) {
|
|
481
|
+
M.value = Ce(e), s(e, {
|
|
482
|
+
source: "business-log-detail",
|
|
483
|
+
phase: "load"
|
|
484
|
+
});
|
|
485
|
+
} finally {
|
|
486
|
+
w.value = !1;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
async function ie() {
|
|
491
|
+
if (W.value && !B.value) {
|
|
492
|
+
L.value = !0, B.value = !0, V.value = void 0;
|
|
493
|
+
try {
|
|
494
|
+
let e = H.value ?? de(), [t, n] = await Promise.all([l.actionStatistics?.(e), l.pageAccessStatistics?.(e)]);
|
|
495
|
+
R.value = t, z.value = n;
|
|
496
|
+
} catch (e) {
|
|
497
|
+
V.value = Ce(e), s(e, {
|
|
498
|
+
source: "business-log-statistics",
|
|
499
|
+
phase: "load"
|
|
500
|
+
});
|
|
501
|
+
} finally {
|
|
502
|
+
B.value = !1;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
async function ae() {
|
|
507
|
+
let e = u.value?.eventId;
|
|
508
|
+
if (l.diagnostic && e && !F.value) {
|
|
509
|
+
F.value = !0, I.value = void 0;
|
|
510
|
+
try {
|
|
511
|
+
P.value = await l.diagnostic(e);
|
|
512
|
+
} catch (e) {
|
|
513
|
+
I.value = Ce(e), s(e, {
|
|
514
|
+
source: "business-log-diagnostic",
|
|
515
|
+
phase: "load"
|
|
516
|
+
});
|
|
517
|
+
} finally {
|
|
518
|
+
F.value = !1;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
function oe(e) {
|
|
523
|
+
H.value = e, R.value = void 0, z.value = void 0;
|
|
524
|
+
}
|
|
525
|
+
function de() {
|
|
526
|
+
return {
|
|
527
|
+
page: {
|
|
528
|
+
pageNum: 1,
|
|
529
|
+
pageSize: 50
|
|
530
|
+
},
|
|
531
|
+
conditions: []
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
function fe(e) {
|
|
535
|
+
return e.name === "operatorId" ? ee : void 0;
|
|
536
|
+
}
|
|
537
|
+
function pe(e, t) {
|
|
538
|
+
switch (e) {
|
|
539
|
+
case "outcome": return he(t.outcome);
|
|
540
|
+
case "mutationSource": return me(t.mutationSource);
|
|
541
|
+
case "employeeName": return t.operatorIdentity?.employeeName ?? "—";
|
|
542
|
+
case "username": return t.operatorIdentity?.username ?? t.operatorId ?? "—";
|
|
543
|
+
case "loginAccount": return ve(t) ?? "—";
|
|
544
|
+
case "organizationName": return t.operatorIdentity?.organizationName ?? "—";
|
|
545
|
+
case "departmentName": return t.operatorIdentity?.departmentName ?? "—";
|
|
546
|
+
case "errorCode": return $(t.details?.errorCode) ?? "—";
|
|
547
|
+
case "httpStatus": return $(t.details?.httpStatus) ?? "—";
|
|
548
|
+
default: return Se(t[e]);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
function me(e) {
|
|
552
|
+
return {
|
|
553
|
+
BUSINESS: "业务写入",
|
|
554
|
+
ACTION: "业务动作",
|
|
555
|
+
SYSTEM: "系统处理",
|
|
556
|
+
WRITE_BACK: "平台回写"
|
|
557
|
+
}[e ?? ""] ?? e ?? "—";
|
|
558
|
+
}
|
|
559
|
+
function he(e) {
|
|
560
|
+
return {
|
|
561
|
+
SUCCESS: "成功",
|
|
562
|
+
FAILURE: "失败",
|
|
563
|
+
REJECTED: "拒绝"
|
|
564
|
+
}[e ?? ""] ?? e ?? "—";
|
|
565
|
+
}
|
|
566
|
+
function ge(e) {
|
|
567
|
+
return [
|
|
568
|
+
["发生时间", e.occurredAt],
|
|
569
|
+
["事件类型", e.eventType],
|
|
570
|
+
["结果", e.outcome],
|
|
571
|
+
["职员姓名", e.operatorIdentity?.employeeName],
|
|
572
|
+
["操作用户", e.operatorIdentity?.username ?? e.operatorId],
|
|
573
|
+
["登录账号", ve(e)],
|
|
574
|
+
["用户 ID", e.operatorId],
|
|
575
|
+
["机构", e.operatorIdentity?.organizationName],
|
|
576
|
+
["机构 ID", e.operatorIdentity?.organizationId ?? e.operatorOrganizationId],
|
|
577
|
+
["部门", e.operatorIdentity?.departmentName],
|
|
578
|
+
["部门 ID", e.operatorIdentity?.departmentId],
|
|
579
|
+
["业务模块", e.moduleAlias],
|
|
580
|
+
["动作", e.actionCode],
|
|
581
|
+
["实体", e.entityAlias],
|
|
582
|
+
["记录 ID", e.recordId],
|
|
583
|
+
["变更来源", me(e.mutationSource)],
|
|
584
|
+
["追踪 ID", e.traceId],
|
|
585
|
+
...xe(e.details, [
|
|
586
|
+
"outcome",
|
|
587
|
+
"entityAlias",
|
|
588
|
+
"recordId",
|
|
589
|
+
"mutationSource"
|
|
590
|
+
]).map((e) => [e.key, e.value])
|
|
591
|
+
].filter(([, e]) => e != null && e !== "").map(([e, t]) => ({
|
|
592
|
+
key: e,
|
|
593
|
+
value: Se(t)
|
|
594
|
+
}));
|
|
595
|
+
}
|
|
596
|
+
function _e(e, t) {
|
|
597
|
+
return (t?.items ?? []).map((t) => ({
|
|
598
|
+
key: `${e}:${t.key}`,
|
|
599
|
+
kind: e,
|
|
600
|
+
title: t.title,
|
|
601
|
+
count: t.count
|
|
602
|
+
}));
|
|
603
|
+
}
|
|
604
|
+
function ve(e) {
|
|
605
|
+
if (e.eventType === "LOGIN") return e.loginAccount ?? $(e.details?.confirmedAccount) ?? $(e.details?.claimedAccount);
|
|
606
|
+
}
|
|
607
|
+
function ye() {
|
|
608
|
+
return [{
|
|
609
|
+
key: "detail",
|
|
610
|
+
title: "详情",
|
|
611
|
+
primary: !0,
|
|
612
|
+
iconName: "eye"
|
|
613
|
+
}];
|
|
614
|
+
}
|
|
615
|
+
function be(e, t) {
|
|
616
|
+
e.key === "detail" && X(t);
|
|
617
|
+
}
|
|
618
|
+
function xe(e, t = []) {
|
|
619
|
+
let n = new Set(t);
|
|
620
|
+
return Object.entries(e ?? {}).filter(([e]) => !n.has(e)).map(([e, t]) => ({
|
|
621
|
+
key: e,
|
|
622
|
+
value: Se(t)
|
|
623
|
+
}));
|
|
624
|
+
}
|
|
625
|
+
function $(e) {
|
|
626
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : void 0;
|
|
627
|
+
}
|
|
628
|
+
function Se(e) {
|
|
629
|
+
return e == null || e === "" ? "—" : typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
630
|
+
}
|
|
631
|
+
function Ce(e) {
|
|
632
|
+
return e instanceof Error ? e.message : "请求未完成,请稍后重试。";
|
|
633
|
+
}
|
|
634
|
+
let we = {
|
|
635
|
+
login: { columns: [
|
|
636
|
+
{
|
|
637
|
+
key: "outcome",
|
|
638
|
+
title: "结果",
|
|
639
|
+
width: "96px"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
key: "occurredAt",
|
|
643
|
+
title: "发生时间",
|
|
644
|
+
width: "176px"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
key: "loginAccount",
|
|
648
|
+
title: "登录账号",
|
|
649
|
+
width: "200px"
|
|
650
|
+
}
|
|
651
|
+
] },
|
|
652
|
+
activity: { columns: [
|
|
653
|
+
{
|
|
654
|
+
key: "outcome",
|
|
655
|
+
title: "结果",
|
|
656
|
+
width: "96px"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
key: "occurredAt",
|
|
660
|
+
title: "发生时间",
|
|
661
|
+
width: "176px"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
key: "username",
|
|
665
|
+
title: "操作用户",
|
|
666
|
+
width: "160px"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
key: "moduleAlias",
|
|
670
|
+
title: "业务模块",
|
|
671
|
+
width: "190px"
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
key: "actionCode",
|
|
675
|
+
title: "动作",
|
|
676
|
+
width: "150px"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
key: "recordId",
|
|
680
|
+
title: "记录 ID",
|
|
681
|
+
width: "170px"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
key: "mutationSource",
|
|
685
|
+
title: "变更来源",
|
|
686
|
+
width: "120px"
|
|
687
|
+
}
|
|
688
|
+
] },
|
|
689
|
+
"request-error": { columns: [
|
|
690
|
+
{
|
|
691
|
+
key: "occurredAt",
|
|
692
|
+
title: "发生时间",
|
|
693
|
+
width: "176px"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
key: "moduleAlias",
|
|
697
|
+
title: "业务模块",
|
|
698
|
+
width: "190px"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
key: "errorCode",
|
|
702
|
+
title: "错误码",
|
|
703
|
+
width: "150px"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
key: "httpStatus",
|
|
707
|
+
title: "HTTP 状态",
|
|
708
|
+
width: "112px"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
key: "summary",
|
|
712
|
+
title: "错误摘要",
|
|
713
|
+
width: "260px"
|
|
714
|
+
}
|
|
715
|
+
] }
|
|
716
|
+
};
|
|
717
|
+
return (r, a) => (E(), b(g, null, [
|
|
718
|
+
C(A(t), {
|
|
719
|
+
class: "business-log-list",
|
|
720
|
+
context: A(c),
|
|
721
|
+
title: n.title,
|
|
722
|
+
columns: J.value,
|
|
723
|
+
"row-key": "eventId",
|
|
724
|
+
"show-recycle-bin": !1,
|
|
725
|
+
"page-size": 50,
|
|
726
|
+
"page-size-options": [
|
|
727
|
+
20,
|
|
728
|
+
50,
|
|
729
|
+
100
|
|
730
|
+
],
|
|
731
|
+
"reference-picker-of": fe,
|
|
732
|
+
"empty-description": "暂无符合条件的日志",
|
|
733
|
+
"row-actions-of": ye,
|
|
734
|
+
"row-actions-title": "操作",
|
|
735
|
+
"action-column-width": "88px",
|
|
736
|
+
onRecordActivate: X,
|
|
737
|
+
onRowAction: be,
|
|
738
|
+
onQueried: oe
|
|
739
|
+
}, {
|
|
740
|
+
operations: j(() => [W.value ? (E(), v(A(h), {
|
|
741
|
+
key: 0,
|
|
742
|
+
loading: B.value,
|
|
743
|
+
onClick: ie
|
|
744
|
+
}, {
|
|
745
|
+
default: j(() => [...a[2] ||= [S(" 使用统计 ", -1)]]),
|
|
746
|
+
_: 1
|
|
747
|
+
}, 8, ["loading"])) : y("v-if", !0), C(se, { "event-types": K.value }, null, 8, ["event-types"])]),
|
|
748
|
+
cell: j(({ column: e, record: t }) => [e.key === "occurredAt" ? (E(), v(A(i), {
|
|
749
|
+
key: 0,
|
|
750
|
+
value: t.occurredAt
|
|
751
|
+
}, null, 8, ["value"])) : (E(), b("span", {
|
|
752
|
+
key: 1,
|
|
753
|
+
class: T({ "business-log-list__summary": e.key === "summary" })
|
|
754
|
+
}, k(pe(e.key, t)), 3))]),
|
|
755
|
+
_: 1
|
|
756
|
+
}, 8, [
|
|
757
|
+
"context",
|
|
758
|
+
"title",
|
|
759
|
+
"columns"
|
|
760
|
+
]),
|
|
761
|
+
C(A(d), {
|
|
762
|
+
open: !!u.value,
|
|
763
|
+
title: `${n.title}详情`,
|
|
764
|
+
"render-mode": "inline",
|
|
765
|
+
subtitle: u.value ? u.value.operatorIdentity?.employeeName ?? u.value.operatorIdentity?.username ?? u.value.operatorId : void 0,
|
|
766
|
+
"close-on-outside": !0,
|
|
767
|
+
onClose: a[0] ||= (e) => u.value = void 0
|
|
768
|
+
}, {
|
|
769
|
+
default: j(() => [w.value ? (E(), v(A(e), {
|
|
770
|
+
key: 0,
|
|
771
|
+
tip: "加载详情"
|
|
772
|
+
})) : M.value ? (E(), v(A(o), {
|
|
773
|
+
key: 1,
|
|
774
|
+
title: "日志详情加载失败",
|
|
775
|
+
message: M.value
|
|
776
|
+
}, null, 8, ["message"])) : u.value ? (E(), b("dl", Z, [(E(!0), b(g, null, O(te.value, (e) => (E(), b(g, { key: e.key }, [x("dt", null, k(e.key), 1), x("dd", null, [x("pre", null, k(e.value), 1)])], 64))), 128))])) : (E(), v(A(m), {
|
|
777
|
+
key: 3,
|
|
778
|
+
description: "未选择日志"
|
|
779
|
+
})), G.value && u.value && q.value ? (E(), b("section", Q, [
|
|
780
|
+
C(A(h), {
|
|
781
|
+
loading: F.value,
|
|
782
|
+
onClick: ae
|
|
783
|
+
}, {
|
|
784
|
+
default: j(() => [...a[3] ||= [S("查看内部诊断", -1)]]),
|
|
785
|
+
_: 1
|
|
786
|
+
}, 8, ["loading"]),
|
|
787
|
+
a[4] ||= x("small", null, "仅具备平台范围的管理员可查看。", -1),
|
|
788
|
+
I.value ? (E(), v(A(o), {
|
|
789
|
+
key: 0,
|
|
790
|
+
title: "内部诊断不可用",
|
|
791
|
+
message: I.value
|
|
792
|
+
}, null, 8, ["message"])) : P.value ? (E(), b("dl", ce, [(E(!0), b(g, null, O(ne.value, (e) => (E(), b(g, { key: e.key }, [x("dt", null, k(e.key), 1), x("dd", null, [x("pre", null, k(e.value), 1)])], 64))), 128))])) : y("v-if", !0)
|
|
793
|
+
])) : y("v-if", !0)]),
|
|
794
|
+
_: 1
|
|
795
|
+
}, 8, [
|
|
796
|
+
"open",
|
|
797
|
+
"title",
|
|
798
|
+
"subtitle"
|
|
799
|
+
]),
|
|
800
|
+
C(A(d), {
|
|
801
|
+
open: L.value,
|
|
802
|
+
title: "业务活动使用统计",
|
|
803
|
+
"render-mode": "inline",
|
|
804
|
+
subtitle: "统计口径遵循当前标准查询条件与登录账号的数据范围。",
|
|
805
|
+
"close-on-outside": !0,
|
|
806
|
+
onClose: a[1] ||= (e) => L.value = !1
|
|
807
|
+
}, {
|
|
808
|
+
default: j(() => [B.value ? (E(), v(A(e), {
|
|
809
|
+
key: 0,
|
|
810
|
+
tip: "加载使用统计"
|
|
811
|
+
})) : V.value ? (E(), v(A(o), {
|
|
812
|
+
key: 1,
|
|
813
|
+
title: "使用统计加载失败",
|
|
814
|
+
message: V.value
|
|
815
|
+
}, null, 8, ["message"])) : (E(), b(g, { key: 2 }, [re.value ? (E(), b("p", le, "当前统计只覆盖可读取的最近日志。")) : y("v-if", !0), Y.value.length > 0 ? (E(), b("dl", ue, [(E(!0), b(g, null, O(Y.value, (e) => (E(), b(g, { key: e.key }, [x("dt", null, k(e.kind) + " · " + k(e.title), 1), x("dd", null, k(e.count), 1)], 64))), 128))])) : (E(), v(A(m), {
|
|
816
|
+
key: 2,
|
|
817
|
+
description: "暂无可统计的业务活动"
|
|
818
|
+
}))], 64))]),
|
|
819
|
+
_: 1
|
|
820
|
+
}, 8, ["open"])
|
|
821
|
+
], 64));
|
|
822
|
+
}
|
|
823
|
+
}), [["__scopeId", "data-v-dbe6e7b1"]]);
|
|
824
|
+
//#endregion
|
|
825
|
+
export { de as t };
|