@ximatai/muyun-web-app 0.26.16 → 0.26.17

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/{BusinessActivityLogView-DVM_GB5y.js → BusinessActivityLogView-9RrW-RKb.js} +2 -2
  2. package/dist/BusinessLogListDrawer-DYVx9tiQ.js +864 -0
  3. package/dist/{ConfigurationTranslationView-B0FosDyz.js → ConfigurationTranslationView-Bh_ekuMP.js} +40 -40
  4. package/dist/{LoginAuditLogView-3tAozKlC.js → LoginAuditLogView-DG6iBXEn.js} +2 -2
  5. package/dist/ModuleActionManagementView-DgHqhoMN.js +755 -0
  6. package/dist/{ModuleGovernanceView-DsqR_Sj7.js → ModuleGovernanceView-C53RnUzc.js} +2994 -2994
  7. package/dist/{RequestErrorLogView-C4yH-TSX.js → RequestErrorLogView-Ba5p0hLE.js} +2 -2
  8. package/dist/{RoleDetailWorkspaceView-BpOoGUwS.js → RoleDetailWorkspaceView-C3TBqksY.js} +157 -157
  9. package/dist/{RuntimeLogView-CoKKpJ39.js → RuntimeLogView-BFEABm8G.js} +66 -66
  10. package/dist/WorkflowAdministrationView-BOHG2e-I.js +650 -0
  11. package/dist/WorkflowConfigurationView-A0m5tBX9.js +1097 -0
  12. package/dist/WorkflowWorkbenchView-DGpNDt5V.js +759 -0
  13. package/dist/index.css +1 -1
  14. package/dist/index.js +606 -590
  15. package/dist/moduleGovernanceWorkspaceView-DNKzYX0x.js +667 -0
  16. package/dist/{platform-components-Cl5ZZiuU.js → platform-components-BBfyINHa.js} +8858 -6085
  17. package/dist/{platform-workbench-CAHoriIf.js → platform-workbench-C1hmkOUD.js} +6546 -6637
  18. package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +1 -1
  19. package/dist/types/app/useAssistantAvailability.d.ts +8 -0
  20. package/dist/types/app/useCurrentUserProfile.d.ts +12 -0
  21. package/dist/types/app/workbenchRouteSync.d.ts +2 -0
  22. package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -2
  23. package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +8 -8
  24. package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +208 -92
  25. package/dist/types/dynamic-page-runtime/assistantQueryCapabilities.d.ts +1 -0
  26. package/dist/types/dynamic-page-runtime/composables/useManagedDetailRelationRuntime.d.ts +2 -2
  27. package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +2 -2
  28. package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +4 -4
  29. package/dist/types/dynamic-page-runtime/useModuleRecordDataChanges.d.ts +4 -0
  30. package/dist/types/main.d.ts +0 -1
  31. package/dist/types/platform-components/BusinessContentGenerationPanel.vue.d.ts +22 -0
  32. package/dist/types/platform-components/BusinessContentQueryNotice.vue.d.ts +17 -0
  33. package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +2 -2
  34. package/dist/types/platform-components/DictionaryOptionDialog.vue.d.ts +4 -4
  35. package/dist/types/platform-components/DictionaryOptionDialogChoiceList.vue.d.ts +1 -1
  36. package/dist/types/platform-components/DictionaryPicker.vue.d.ts +4 -4
  37. package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +2 -2
  38. package/dist/types/platform-components/QueryCriteriaGroupEditor.vue.d.ts +2 -2
  39. package/dist/types/platform-components/RecordContentSourceField.vue.d.ts +22 -0
  40. package/dist/types/platform-components/RecordContentTranslationField.vue.d.ts +26 -0
  41. package/dist/types/platform-components/RecordDataExchangeSurface.vue.d.ts +26 -0
  42. package/dist/types/platform-components/RecordDetailFields.vue.d.ts +3 -2
  43. package/dist/types/platform-components/RecordFormFields.vue.d.ts +3 -2
  44. package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +1 -1
  45. package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +1 -0
  46. package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +1 -1
  47. package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +1 -1
  48. package/dist/types/{dynamic-page-runtime/ModuleDataExchangeSurface.vue.d.ts → platform-components/RecordQuerySortSelector.vue.d.ts} +5 -9
  49. package/dist/types/platform-components/RecordRelationValue.vue.d.ts +2 -0
  50. package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +7 -2
  51. package/dist/types/platform-components/WorkflowRecordPanel.vue.d.ts +2 -0
  52. package/dist/types/platform-components/WorkflowTimeline.vue.d.ts +4 -0
  53. package/dist/types/platform-components/crudRecordListModel.d.ts +1 -0
  54. package/dist/types/platform-components/index.d.ts +1 -0
  55. package/dist/types/platform-components/loadExplorerRecords.d.ts +3 -0
  56. package/dist/types/platform-components/recordDetailFieldModel.d.ts +2 -0
  57. package/dist/types/platform-components/recordFormFieldModel.d.ts +2 -0
  58. package/dist/types/platform-components/recordQueryListQueryController.d.ts +2 -0
  59. package/dist/types/platform-components/recordSurfaceActivity.d.ts +3 -0
  60. package/dist/types/platform-components/recycleBinState.d.ts +1 -0
  61. package/dist/types/platform-components/referencePickerModel.d.ts +6 -2
  62. package/dist/types/platform-components/scopedTreePickerModel.d.ts +4 -0
  63. package/dist/types/platform-workbench/Workbench.vue.d.ts +9 -4
  64. package/dist/types/platform-workbench/WorkbenchGlobalTools.vue.d.ts +16 -0
  65. package/dist/types/platform-workbench/WorkbenchLanguageSettings.vue.d.ts +11 -0
  66. package/dist/types/platform-workbench/WorkbenchPageTitle.vue.d.ts +10 -0
  67. package/dist/types/platform-workbench/menuGroupLayout.d.ts +5 -0
  68. package/dist/types/platform-workbench/menuTreeModel.d.ts +1 -2
  69. package/dist/types/platform-workbench/useAssistantConversation.d.ts +1 -1
  70. package/dist/types/platform-workbench/useAssistantConversationArchive.d.ts +1 -1
  71. package/dist/types/platform-workbench/useLanguagePreferenceSelection.d.ts +7 -0
  72. package/dist/types/views/PageQuerySummaryEditor.vue.d.ts +4 -4
  73. package/dist/types/views/WorkflowSelectionFields.vue.d.ts +28 -0
  74. package/dist/types/views/metadataEditorSession.d.ts +4 -0
  75. package/dist/types/views/metadataOrchestrationState.d.ts +3 -0
  76. package/dist/types/views/metadataWorkspace.d.ts +8 -0
  77. package/dist/types/vue-ui-antdv/components/UiDropdown.vue.d.ts +1 -0
  78. package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
  79. package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +9 -6
  80. package/dist/types/vue-ui-antdv/types.d.ts +2 -0
  81. package/dist/types/vue-ui-antdv/typography.d.ts +25 -0
  82. package/dist/types/web-contracts/index.d.ts +132 -1
  83. package/dist/types/web-contracts/workflow.d.ts +10 -0
  84. package/dist/types/web-core/assistantTurnClient.d.ts +2 -0
  85. package/dist/types/web-core/businessContent.d.ts +38 -0
  86. package/dist/types/web-core/businessContentLanguage.d.ts +18 -0
  87. package/dist/types/web-core/index.d.ts +5 -0
  88. package/dist/types/web-core/languagePreference.d.ts +2 -2
  89. package/dist/types/web-core/module/dataExchangeClient.d.ts +83 -1
  90. package/dist/types/web-core/module/staticModuleClient.d.ts +9 -3
  91. package/dist/types/web-core/presentationTexts.d.ts +5 -0
  92. package/dist/types/web-core/recordReadRefreshGuard.d.ts +7 -0
  93. package/dist/types/web-core/useBusinessContentGenerationBatch.d.ts +36 -0
  94. package/dist/types/web-core/useBusinessContentReading.d.ts +30 -0
  95. package/dist/types/web-core/workflow.d.ts +2 -1
  96. package/dist/{workspaceViews-BIYGPUAO.js → workspaceViews-BpH71LKQ.js} +542 -542
  97. package/package.json +1 -1
  98. package/dist/BusinessLogListDrawer-BciMLY9z.js +0 -864
  99. package/dist/ModuleActionManagementView-CJRNShGg.js +0 -755
  100. package/dist/WorkflowAdministrationView-DmUV6vWS.js +0 -650
  101. package/dist/WorkflowConfigurationView-pghDbWEh.js +0 -975
  102. package/dist/WorkflowWorkbenchView-BwWxyDen.js +0 -747
  103. package/dist/moduleGovernanceWorkspaceView-DGEV3ZyT.js +0 -667
@@ -1,747 +0,0 @@
1
- import { E as e, g as t, i as n, v as r } from "./platform-workbench-CAHoriIf.js";
2
- import { Bn as i, Gn as a, Hn as ee, Kt as o, Mt as s, Ot as te, Qn as ne, Tt as c, Ui as l, Vn as re, Xn as ie, Y as ae, _n as oe, cr as se, d as ce, dr as le, hn as ue, l as de, mn as fe, mr as pe, na as me, nn as u, nt as he, o as ge, oa as _e, ot as ve, qn as ye, u as be } from "./platform-components-Cl5ZZiuU.js";
3
- import { Fragment as xe, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, normalizeClass as Se, openBlock as y, ref as b, renderList as Ce, toDisplayString as x, unref as S, watch as we, withCtx as C } from "vue";
4
- //#region src/views/WorkflowWorkbenchView.vue?vue&type=script&setup=true&lang.ts
5
- var Te = { class: "workflow-workbench" }, Ee = { class: "workflow-query-fields" }, De = {
6
- key: 0,
7
- class: "workflow-field"
8
- }, Oe = { class: "workflow-field" }, ke = {
9
- key: 1,
10
- class: "workflow-field"
11
- }, Ae = { class: "workflow-field" }, je = { class: "date-filters" }, Me = { class: "workflow-field" }, Ne = { class: "workflow-field" }, Pe = { class: "workflow-query-controls" }, Fe = { key: 0 }, Ie = { class: "policy-form" }, Le = { class: "workflow-field" }, Re = { class: "workflow-field" }, ze = { class: "workflow-field" }, Be = {
12
- key: 0,
13
- class: "workflow-field"
14
- }, w = /*#__PURE__*/ ye(/* @__PURE__ */ v({
15
- name: "WorkflowWorkbenchView",
16
- __name: "WorkflowWorkbenchView",
17
- setup(ye) {
18
- let v = me();
19
- function w(e) {
20
- return be(e, v);
21
- }
22
- let Ve = le(), T = r(), He = n(), E = b(T?.value?.system && typeof He.query.tenantId == "string" ? He.query.tenantId : void 0), D = d(() => E.value ? _e(Ve.http, { "X-MuYun-Tenant-Id": E.value }) : Ve.http), Ue = d(() => ce(D.value)), O = d(() => ne(D.value)), We = se({
23
- http: Ve.http,
24
- language: v,
25
- moduleAlias: "iam.tenant",
26
- runtimeAccess: "REFERENCE"
27
- }), Ge = d(() => !T?.value?.system || !!E.value), Ke = d(() => se({
28
- http: D.value,
29
- language: v,
30
- moduleAlias: "iam.user",
31
- runtimeAccess: "VIEW"
32
- })), k = b("todo"), A = b(1), j = b(30), qe = b(0), Je = b(0), M = b([]), N = b(), P = b(!1), F = b(""), I = b(""), L = b({}), R = b({}), Ye = b({}), Xe = d(() => ({
33
- ...Ye.value,
34
- ...Object.fromEntries(Object.entries(R.value).map(([e, t]) => [e, l(t.title, t.titleText, v)]))
35
- })), z = b({}), B = b(""), V = b(""), H = b(!1), Ze = b(), Qe = d(() => [
36
- {
37
- key: "todo",
38
- title: v.t("platform.screen.WorkflowWorkbenchView.my-pending-tasks", "待我办理")
39
- },
40
- {
41
- key: "done",
42
- title: v.t("platform.screen.WorkflowWorkbenchView.my-completed-tasks", "我已办理")
43
- },
44
- {
45
- key: "notice",
46
- title: v.t("platform.screen.WorkflowWorkbenchView.my-notices", "通知我的")
47
- },
48
- {
49
- key: "tracking",
50
- title: v.t("platform.screen.WorkflowWorkbenchView.my-submissions", "我发起的")
51
- },
52
- {
53
- key: "delegation",
54
- title: v.t("platform.screen.WorkflowWorkbenchView.delegated-tasks", "委托办理")
55
- }
56
- ].map((e) => ({
57
- ...e,
58
- title: e.title + (z.value[e.key] == null ? "" : ` (${z.value[e.key]})`)
59
- }))), $e = d(() => Object.entries(Xe.value).map(([e, t]) => ({
60
- value: e,
61
- label: t
62
- }))), et = d(() => M.value.map((e) => ({
63
- ...e,
64
- id: e.taskId ?? e.instanceId,
65
- nodeTitle: l(e.nodeTitle ?? "", e.nodeTitleText, v),
66
- title: e.business?.readable === !1 ? v.t("platform.screen.WorkflowWorkbenchView.restricted-business-record", "受限业务记录") : e.business?.title ?? v.t("platform.screen.WorkflowWorkbenchView.untitled-business-record", "未命名业务"),
67
- moduleTitle: e.business?.moduleTitle == null ? Xe.value[e.moduleAlias] ?? v.t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块") : l(e.business.moduleTitle, e.business.moduleTitleText, v),
68
- status: w(e.taskStatus ?? e.instanceStatus),
69
- received: at(e.receivedAt),
70
- completed: at(e.completedAt),
71
- assignees: e.currentAssigneeTitles.join("、"),
72
- urgency: w(e.overtimeStatus)
73
- }))), tt = d(() => [
74
- {
75
- key: "title",
76
- title: v.t("platform.screen.WorkflowWorkbenchView.business-item", "业务事项"),
77
- dataIndex: "title",
78
- width: 240
79
- },
80
- {
81
- key: "moduleTitle",
82
- title: v.t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块"),
83
- dataIndex: "moduleTitle",
84
- width: 140
85
- },
86
- {
87
- key: "nodeTitle",
88
- title: v.t("platform.screen.WorkflowWorkbenchView.task-node", "办理节点"),
89
- dataIndex: "nodeTitle",
90
- width: 160
91
- },
92
- {
93
- key: "submitterUserTitle",
94
- title: v.t("platform.screen.WorkflowWorkbenchView.submitter", "发起人"),
95
- dataIndex: "submitterUserTitle",
96
- width: 110
97
- },
98
- {
99
- key: "status",
100
- title: v.t("platform.screen.WorkflowWorkbenchView.status", "状态"),
101
- dataIndex: "status",
102
- width: 100
103
- },
104
- {
105
- key: "assignees",
106
- title: v.t("platform.screen.WorkflowWorkbenchView.processors", "办理人"),
107
- dataIndex: "assignees",
108
- width: 130
109
- },
110
- {
111
- key: "received",
112
- title: v.t("platform.screen.WorkflowWorkbenchView.received-at", "接收时间"),
113
- dataIndex: "received",
114
- width: 170
115
- },
116
- ...k.value === "done" ? [{
117
- key: "completed",
118
- title: v.t("platform.screen.WorkflowWorkbenchView.processed-at", "办理时间"),
119
- dataIndex: "completed",
120
- width: 170
121
- }] : [{
122
- key: "urgency",
123
- title: v.t("platform.screen.WorkflowWorkbenchView.timeliness", "时效"),
124
- dataIndex: "urgency",
125
- width: 90
126
- }]
127
- ]), U = d(() => N.value ? se({
128
- http: D.value,
129
- language: v,
130
- moduleAlias: N.value.moduleAlias,
131
- runtimeAccess: "VIEW"
132
- }) : void 0), W = b(), nt = b(/* @__PURE__ */ new Map()), rt = b(!1), G = b(""), it = d(() => {
133
- let e = U.value ? c(pe(U.value.runtime)?.uiDescriptor) : void 0;
134
- return new Map([...nt.value].map(([t, n]) => [t, e?.get(t) ?? n]));
135
- });
136
- function at(e) {
137
- return e ? new Date(e).toLocaleString("zh-CN", { hour12: !1 }) : "—";
138
- }
139
- function ot(e) {
140
- return e.title || e.username || e.id || "";
141
- }
142
- let K = 0, st = 0, ct = 0;
143
- e(async (e) => {
144
- let t = new Set(e.changes.filter((e) => e.type === "configuration-translations-changed").map((e) => e.moduleAlias)), n = M.value.some((e) => t.has(e.moduleAlias)), r = Object.keys(R.value).some((e) => t.has(e));
145
- if (!n && !r) return;
146
- let i = ++ct, a = K, ee = E.value, o = T?.value?.userId, s = U.value;
147
- try {
148
- let [e, r] = await Promise.all([
149
- n ? O.value.workbenchPage(k.value, A.value, L.value, I.value, j.value) : void 0,
150
- O.value.workbenchModules(),
151
- s && t.has(s.moduleAlias) ? s.runtime.refreshTexts?.() : void 0
152
- ]);
153
- if (i !== ct || K !== a || E.value !== ee || T?.value?.userId !== o) return;
154
- let te = (t) => e?.records.find((e) => e.instanceId === t.instanceId && e.taskId === t.taskId)?.nodeTitleText, ne = {
155
- ...r.modules,
156
- ...e?.navigation?.moduleTitles?.modules
157
- }, c = { ...R.value };
158
- for (let [e, t] of Object.entries(c)) {
159
- let n = ne[e]?.titleText;
160
- de(t.titleText, n) && (c[e] = {
161
- ...t,
162
- titleText: n
163
- });
164
- }
165
- R.value = c;
166
- let l = (t) => {
167
- let n = e?.records.find((e) => e.instanceId === t.instanceId && e.taskId === t.taskId), r = n?.business?.moduleTitleText ?? ne[t.moduleAlias]?.titleText;
168
- return {
169
- ...t,
170
- ...de(t.nodeTitleText, n?.nodeTitleText) ? { nodeTitleText: n?.nodeTitleText } : {},
171
- business: t.business && de(t.business.moduleTitleText, r) ? {
172
- ...t.business,
173
- moduleTitleText: r
174
- } : t.business
175
- };
176
- };
177
- if (M.value = M.value.map(l), N.value) {
178
- let e = te(N.value);
179
- de(N.value.nodeTitleText, e) && (N.value.nodeTitleText = e);
180
- let t = l(N.value);
181
- t.business && (N.value.business = t.business);
182
- }
183
- } catch (e) {
184
- u(e, {
185
- source: "workflow-text-resources",
186
- phase: "load"
187
- });
188
- }
189
- });
190
- async function lt() {
191
- let e = ++K;
192
- P.value = !0, F.value = "";
193
- try {
194
- let t = await O.value.workbenchPage(k.value, A.value, L.value, I.value, j.value);
195
- if (e !== K) return;
196
- M.value = t.records, qe.value = t.total, Je.value = t.pages, Ye.value = {
197
- ...Ye.value,
198
- ...t.navigation?.modules
199
- }, R.value = {
200
- ...R.value,
201
- ...t.navigation?.moduleTitles?.modules
202
- }, z.value[k.value] = t.total;
203
- } catch (t) {
204
- e === K && (M.value = [], qe.value = 0, Je.value = 0, delete z.value[k.value], F.value = v.t("platform.screen.WorkflowWorkbenchView.unable-to-load-tasks-retry", "任务加载失败,请重试。"), u(t, {
205
- source: "workflow-workbench",
206
- phase: "load"
207
- }));
208
- } finally {
209
- e === K && (P.value = !1);
210
- }
211
- }
212
- async function ut() {
213
- let e = ++st, t = N.value, n = U.value;
214
- if (W.value = void 0, G.value = "", rt.value = !1, t && n) {
215
- if (t.business?.readable === !1) {
216
- G.value = v.t("platform.screen.WorkflowWorkbenchView.you-can-view-the-task-status-but", "你可以查看任务状态,但尚无该业务记录的读取权限。请联系业务管理员。");
217
- return;
218
- }
219
- rt.value = !0;
220
- try {
221
- let r = await n.runtime.ready, i = await n.crud.view(t.recordId);
222
- if (e !== st) return;
223
- nt.value = c(r.uiDescriptor), W.value = i;
224
- } catch (t) {
225
- e === st && (G.value = v.t("platform.screen.WorkflowWorkbenchView.unable-to-load-business-details-retry-or", "业务详情加载失败,请重试或检查业务读取权限。"), u(t, {
226
- source: "workflow-workbench",
227
- phase: "load"
228
- }));
229
- } finally {
230
- e === st && (rt.value = !1);
231
- }
232
- }
233
- }
234
- we([N, E], () => void ut()), we([
235
- k,
236
- A,
237
- j,
238
- E
239
- ], () => void lt(), { immediate: !0 }), we(E, () => {
240
- N.value = void 0, L.value = {}, I.value = "", B.value = "", V.value = "", Ye.value = {}, R.value = {}, z.value = {}, A.value = 1, ++Z, q.value = !1, J.value = !1, gt.value = [], $();
241
- }, { flush: "sync" });
242
- async function dt() {
243
- return !H.value || await Ze.value?.mayLeave() === !0;
244
- }
245
- async function ft() {
246
- await dt() && (N.value = void 0);
247
- }
248
- function pt() {
249
- H.value || (L.value.receivedFrom = B.value ? (/* @__PURE__ */ new Date(`${B.value}T00:00:00`)).toISOString() : void 0, L.value.receivedTo = V.value ? new Date((/* @__PURE__ */ new Date(`${V.value}T00:00:00`)).setDate((/* @__PURE__ */ new Date(`${V.value}T00:00:00`)).getDate() + 1)).toISOString() : void 0, A.value === 1 ? lt() : A.value = 1);
250
- }
251
- function mt() {
252
- I.value = "", L.value = {}, B.value = "", V.value = "", pt();
253
- }
254
- async function ht() {
255
- H.value = !1, N.value && t(N.value.moduleAlias), await lt(), await ut();
256
- }
257
- let gt = b([]), q = b(!1), J = b(!1), Y = b(""), X = b({
258
- title: v.t("platform.workflow.delegation.default-title", "审批代办"),
259
- moduleScopeType: "all",
260
- moduleAliases: [],
261
- principalCanProcess: !1
262
- }), _t = b(""), vt = d(() => q.value && JSON.stringify(X.value) !== _t.value);
263
- ie(() => v.t("platform.unsaved-source.WorkflowWorkbenchView", "个人委托"), () => vt.value, () => J.value);
264
- let Z = 0;
265
- function Q(e, t) {
266
- return e === Z && t === E.value && q.value;
267
- }
268
- async function yt() {
269
- if (J.value || q.value || !Ge.value) return;
270
- let e = ++Z, t = E.value, n = O.value;
271
- q.value = !0, J.value = !0, gt.value = [], $();
272
- try {
273
- let r = await n.workbenchModules();
274
- if (!Q(e, t)) return;
275
- R.value = {
276
- ...R.value,
277
- ...r.modules
278
- }, await bt();
279
- } catch (n) {
280
- Q(e, t) && u(n, {
281
- source: "workflow-delegation",
282
- phase: "load"
283
- });
284
- } finally {
285
- Q(e, t) && (J.value = !1);
286
- }
287
- }
288
- function $() {
289
- X.value = {
290
- title: v.t("platform.workflow.delegation.default-title", "审批代办"),
291
- moduleScopeType: "all",
292
- moduleAliases: [],
293
- principalCanProcess: !1
294
- }, _t.value = JSON.stringify(X.value), Y.value = "";
295
- }
296
- async function bt() {
297
- let e = Z, t = E.value, n = D.value;
298
- try {
299
- let r = await n.request({
300
- method: "POST",
301
- path: "/workflow/delegation/query",
302
- body: { page: {
303
- pageNum: 1,
304
- pageSize: 200
305
- } }
306
- });
307
- Q(e, t) && (gt.value = r.records);
308
- } catch (n) {
309
- Q(e, t) && u(n, {
310
- source: "workflow-delegation",
311
- phase: "load"
312
- });
313
- }
314
- }
315
- async function xt() {
316
- await Ct() && $();
317
- }
318
- async function St(e) {
319
- await Ct() && (X.value = JSON.parse(JSON.stringify(e)), _t.value = JSON.stringify(X.value), Y.value = "");
320
- }
321
- async function Ct() {
322
- if (J.value || !q.value) return !1;
323
- let e = Z, t = E.value;
324
- return (!vt.value || await ue({
325
- title: v.t("platform.screen.WorkflowWorkbenchView.discard-delegation-changes", "放弃未保存的委托设置?"),
326
- okText: v.t("platform.screen.WorkflowWorkbenchView.discard-changes", "放弃修改"),
327
- danger: !0
328
- }, v)) && Q(e, t);
329
- }
330
- async function wt() {
331
- if (J.value || !q.value) return;
332
- let e = Z, t = E.value, n = D.value, r = X.value;
333
- if (!r.title?.trim() || !r.delegateUserId || r.moduleScopeType === "include" && !r.moduleAliases?.length) {
334
- Y.value = v.t("platform.screen.WorkflowWorkbenchView.delegation-fields-required", "请填写规则名称、代办人,并选择适用业务模块。");
335
- return;
336
- }
337
- J.value = !0;
338
- try {
339
- if (await n.request({
340
- method: "POST",
341
- path: r.id ? `/workflow/delegation/update/${r.id}` : "/workflow/delegation/insert",
342
- body: {
343
- ...r,
344
- enabled: r.enabled ?? !0,
345
- orgScopeType: r.orgScopeType ?? "all",
346
- moduleAliases: r.moduleScopeType === "all" ? [] : r.moduleAliases
347
- }
348
- }), !Q(e, t) || ($(), await bt(), !Q(e, t))) return;
349
- fe(v.t("platform.screen.WorkflowWorkbenchView.delegation-saved", "委托规则已保存,仅影响后续新任务"));
350
- } catch (n) {
351
- Q(e, t) && u(n, {
352
- source: "workflow-delegation",
353
- phase: "action"
354
- });
355
- } finally {
356
- Q(e, t) && (J.value = !1);
357
- }
358
- }
359
- async function Tt(e) {
360
- if (J.value || !q.value) return;
361
- let t = Z, n = E.value, r = D.value;
362
- J.value = !0;
363
- try {
364
- await r.request({
365
- method: "POST",
366
- path: `/workflow/delegation/${e.enabled ? "disable" : "enable"}/${e.id}`,
367
- body: { version: e.version }
368
- }), Q(t, n) && await bt();
369
- } catch (e) {
370
- Q(t, n) && u(e, {
371
- source: "workflow-delegation",
372
- phase: "action"
373
- });
374
- } finally {
375
- Q(t, n) && (J.value = !1);
376
- }
377
- }
378
- return (e, t) => (y(), m("section", Te, [
379
- _(S(he), {
380
- tabs: Qe.value,
381
- "active-key": k.value,
382
- label: S(v).t("platform.screen.WorkflowWorkbenchView.approval-workbench-groups", "审批工作台分组"),
383
- disabled: H.value,
384
- "onUpdate:activeKey": t[0] ||= (e) => {
385
- k.value = e, A.value = 1, N.value = void 0;
386
- }
387
- }, null, 8, [
388
- "tabs",
389
- "active-key",
390
- "label",
391
- "disabled"
392
- ]),
393
- F.value ? (y(), f(S(oe), {
394
- key: 0,
395
- title: S(v).t("platform.screen.WorkflowWorkbenchView.unable-to-load-tasks", "无法加载任务"),
396
- message: F.value
397
- }, null, 8, ["title", "message"])) : p("v-if", !0),
398
- _(S(s), {
399
- title: Qe.value.find((e) => e.key === k.value)?.title ?? S(v).t("platform.screen.WorkflowWorkbenchView.workflow-tasks", "审批任务"),
400
- columns: tt.value,
401
- rows: et.value,
402
- "row-key": "id",
403
- "clickable-rows": !0,
404
- "selected-row-key": N.value?.taskId ?? N.value?.instanceId,
405
- "quick-search-visible": !0,
406
- "quick-search-value": I.value,
407
- "quick-search-placeholder": S(v).t("platform.screen.WorkflowWorkbenchView.search-business-title", "搜索业务标题"),
408
- "quick-search-disabled": H.value || P.value,
409
- pageable: !0,
410
- total: qe.value,
411
- pages: Je.value,
412
- "page-num": A.value,
413
- "page-size": j.value,
414
- "page-size-options": [
415
- 10,
416
- 20,
417
- 30,
418
- 50
419
- ],
420
- "pagination-disabled": H.value || P.value,
421
- "onUpdate:quickSearchValue": t[7] ||= (e) => I.value = e,
422
- onQuickSearch: pt,
423
- onPageChange: t[8] ||= (e) => A.value = e,
424
- onPageSizeChange: t[9] ||= (e) => {
425
- j.value = e, A.value = 1;
426
- },
427
- onRowClick: t[10] ||= (e) => !H.value && (N.value = M.value.find((t) => (t.taskId ?? t.instanceId) === e.id))
428
- }, {
429
- operations: C(() => [_(S(a), {
430
- loading: P.value,
431
- disabled: H.value,
432
- onClick: lt
433
- }, {
434
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.refresh-tasks", "刷新任务")), 1)]),
435
- _: 1
436
- }, 8, ["loading", "disabled"]), _(S(a), {
437
- disabled: H.value || q.value || J.value || !Ge.value,
438
- onClick: yt
439
- }, {
440
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.personal-delegation-settings", "个人代办设置")), 1)]),
441
- _: 1
442
- }, 8, ["disabled"])]),
443
- conditions: C(() => [h("div", Ee, [
444
- S(T)?.system ? (y(), m("label", De, [_(S(o), null, {
445
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.business-tenant", "业务租户")), 1)]),
446
- _: 1
447
- }), _(S(ae), {
448
- value: E.value,
449
- "onUpdate:value": t[1] ||= (e) => E.value = e,
450
- disabled: H.value || q.value || J.value,
451
- context: S(We),
452
- mode: "list",
453
- "title-of": ot
454
- }, null, 8, [
455
- "value",
456
- "disabled",
457
- "context"
458
- ])])) : p("v-if", !0),
459
- h("label", Oe, [_(S(o), null, {
460
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块")), 1)]),
461
- _: 1
462
- }), _(S(re), {
463
- value: L.value.moduleAlias,
464
- "onUpdate:value": t[2] ||= (e) => L.value.moduleAlias = e,
465
- options: $e.value,
466
- disabled: H.value,
467
- "show-search": "",
468
- placeholder: S(v).t("platform.screen.WorkflowWorkbenchView.all-business-modules", "全部业务模块")
469
- }, null, 8, [
470
- "value",
471
- "options",
472
- "disabled",
473
- "placeholder"
474
- ])]),
475
- Ge.value ? (y(), m("label", ke, [_(S(o), null, {
476
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.submitter", "发起人")), 1)]),
477
- _: 1
478
- }), _(S(ae), {
479
- value: L.value.submitterUserId,
480
- "onUpdate:value": t[3] ||= (e) => L.value.submitterUserId = e,
481
- disabled: H.value,
482
- context: Ke.value,
483
- "load-options": Ue.value,
484
- mode: "list",
485
- "title-of": ot
486
- }, null, 8, [
487
- "value",
488
- "disabled",
489
- "context",
490
- "load-options"
491
- ])])) : p("v-if", !0),
492
- h("label", Ae, [_(S(o), null, {
493
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.timeliness", "时效")), 1)]),
494
- _: 1
495
- }), _(S(re), {
496
- value: L.value.overtimeStatus,
497
- "onUpdate:value": t[4] ||= (e) => L.value.overtimeStatus = e,
498
- disabled: H.value,
499
- options: [
500
- {
501
- value: "normal",
502
- label: w("normal")
503
- },
504
- {
505
- value: "warned",
506
- label: w("warned")
507
- },
508
- {
509
- value: "overdue",
510
- label: w("overdue")
511
- }
512
- ],
513
- placeholder: S(v).t("platform.screen.WorkflowWorkbenchView.all", "全部")
514
- }, null, 8, [
515
- "value",
516
- "disabled",
517
- "options",
518
- "placeholder"
519
- ])]),
520
- h("div", je, [h("label", Me, [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.received-from", "接收开始日期")), 1), _(S(i), {
521
- value: B.value,
522
- "onUpdate:value": t[5] ||= (e) => B.value = e,
523
- type: "date",
524
- disabled: H.value
525
- }, null, 8, ["value", "disabled"])]), h("label", Ne, [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.received-until", "接收结束日期")), 1), _(S(i), {
526
- value: V.value,
527
- "onUpdate:value": t[6] ||= (e) => V.value = e,
528
- type: "date",
529
- disabled: H.value
530
- }, null, 8, ["value", "disabled"])])]),
531
- h("div", Pe, [_(S(a), {
532
- disabled: H.value || P.value,
533
- onClick: pt
534
- }, {
535
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.search", "查询")), 1)]),
536
- _: 1
537
- }, 8, ["disabled"]), _(S(a), {
538
- disabled: H.value || P.value,
539
- onClick: mt
540
- }, {
541
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.reset", "重置")), 1)]),
542
- _: 1
543
- }, 8, ["disabled"])])
544
- ])]),
545
- cell: C(({ column: e, record: t, value: n }) => [h("span", { class: Se({ "workflow-urgency": e.key === "urgency" && t.overtimeStatus === "overdue" }) }, x(n ?? "—"), 3)]),
546
- _: 1
547
- }, 8, [
548
- "title",
549
- "columns",
550
- "rows",
551
- "selected-row-key",
552
- "quick-search-value",
553
- "quick-search-placeholder",
554
- "quick-search-disabled",
555
- "total",
556
- "pages",
557
- "page-num",
558
- "page-size",
559
- "pagination-disabled"
560
- ]),
561
- _(S(te), {
562
- open: !!N.value,
563
- title: W.value?.title ?? N.value?.business?.title ?? S(v).t("platform.screen.WorkflowWorkbenchView.business-processing-details", "业务办理详情"),
564
- width: "wide",
565
- "before-close": dt,
566
- onClose: t[12] ||= (e) => N.value = void 0
567
- }, {
568
- operation: C(() => [_(S(a), {
569
- disabled: H.value,
570
- onClick: ft
571
- }, {
572
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.close-details", "关闭详情")), 1)]),
573
- _: 1
574
- }, 8, ["disabled"])]),
575
- default: C(() => [
576
- rt.value ? (y(), m("p", Fe, x(S(v).t("platform.screen.WorkflowWorkbenchView.loading-business-details", "加载业务详情…")), 1)) : p("v-if", !0),
577
- G.value ? (y(), f(S(oe), {
578
- key: 1,
579
- title: S(v).t("platform.screen.WorkflowWorkbenchView.unable-to-read-business-details", "无法读取业务详情"),
580
- message: G.value
581
- }, null, 8, ["title", "message"])) : p("v-if", !0),
582
- G.value ? (y(), f(S(a), {
583
- key: 2,
584
- onClick: ut
585
- }, {
586
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
587
- _: 1
588
- })) : p("v-if", !0),
589
- W.value ? (y(), f(S(ve), {
590
- key: 3,
591
- record: W.value,
592
- fields: it.value,
593
- "option-context": U.value
594
- }, null, 8, [
595
- "record",
596
- "fields",
597
- "option-context"
598
- ])) : p("v-if", !0),
599
- N.value && U.value && !G.value ? (y(), f(S(ge), {
600
- ref_key: "panel",
601
- ref: Ze,
602
- key: N.value.instanceId,
603
- context: U.value,
604
- "record-id": N.value.recordId,
605
- "instance-id": N.value.instanceId,
606
- onEditingChange: t[11] ||= (e) => H.value = e,
607
- onChanged: ht
608
- }, null, 8, [
609
- "context",
610
- "record-id",
611
- "instance-id"
612
- ])) : p("v-if", !0)
613
- ]),
614
- _: 1
615
- }, 8, ["open", "title"]),
616
- _(S(te), {
617
- open: q.value,
618
- title: X.value.id ? S(v).t("platform.screen.WorkflowWorkbenchView.edit-personal-delegation", "编辑个人委托") : S(v).t("platform.screen.WorkflowWorkbenchView.personal-delegation-settings", "个人代办设置"),
619
- "before-close": Ct,
620
- onClose: t[18] ||= (e) => q.value = !1
621
- }, {
622
- operation: C(() => [_(S(a), {
623
- type: "primary",
624
- loading: J.value,
625
- onClick: wt
626
- }, {
627
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.save-delegation-rule", "保存委托规则")), 1)]),
628
- _: 1
629
- }, 8, ["loading"]), _(S(a), {
630
- disabled: J.value,
631
- onClick: xt
632
- }, {
633
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.new-rule", "新建规则")), 1)]),
634
- _: 1
635
- }, 8, ["disabled"])]),
636
- default: C(() => [
637
- Y.value ? (y(), f(S(oe), {
638
- key: 0,
639
- title: S(v).t("platform.screen.WorkflowWorkbenchView.complete-the-delegation-rule", "请完善委托规则"),
640
- message: Y.value
641
- }, null, 8, ["title", "message"])) : p("v-if", !0),
642
- h("div", Ie, [
643
- h("label", Le, [_(S(o), { required: "" }, {
644
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.rule-name", "规则名称")), 1)]),
645
- _: 1
646
- }), _(S(i), {
647
- value: X.value.title,
648
- "onUpdate:value": t[13] ||= (e) => X.value.title = e,
649
- disabled: J.value
650
- }, null, 8, ["value", "disabled"])]),
651
- h("label", Re, [_(S(o), { required: "" }, {
652
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.delegate", "代办人")), 1)]),
653
- _: 1
654
- }), _(S(ae), {
655
- value: X.value.delegateUserId,
656
- "onUpdate:value": t[14] ||= (e) => X.value.delegateUserId = e,
657
- context: Ke.value,
658
- "load-options": Ue.value,
659
- mode: "list",
660
- "title-of": ot,
661
- disabled: J.value
662
- }, null, 8, [
663
- "value",
664
- "context",
665
- "load-options",
666
- "disabled"
667
- ])]),
668
- h("label", ze, [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.applicable-scope", "适用范围")), 1), _(S(re), {
669
- value: X.value.moduleScopeType,
670
- "onUpdate:value": t[15] ||= (e) => X.value.moduleScopeType = e,
671
- disabled: J.value,
672
- "allow-clear": !1,
673
- options: [{
674
- value: "all",
675
- label: S(v).t("platform.screen.WorkflowWorkbenchView.all-business-modules", "全部业务模块")
676
- }, {
677
- value: "include",
678
- label: S(v).t("platform.screen.WorkflowWorkbenchView.specified-business-modules", "指定业务模块")
679
- }]
680
- }, null, 8, [
681
- "value",
682
- "disabled",
683
- "options"
684
- ])]),
685
- X.value.moduleScopeType === "include" ? (y(), m("label", Be, [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块")), 1), _(S(re), {
686
- value: X.value.moduleAliases,
687
- "onUpdate:value": t[16] ||= (e) => X.value.moduleAliases = e,
688
- disabled: J.value,
689
- options: $e.value,
690
- mode: "multiple",
691
- "show-search": ""
692
- }, null, 8, [
693
- "value",
694
- "disabled",
695
- "options"
696
- ])])) : p("v-if", !0),
697
- _(S(ee), {
698
- checked: X.value.principalCanProcess,
699
- "onUpdate:checked": t[17] ||= (e) => X.value.principalCanProcess = e,
700
- disabled: J.value
701
- }, {
702
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.retain-my-processing-permission", "保留本人办理权限")), 1)]),
703
- _: 1
704
- }, 8, ["checked", "disabled"])
705
- ]),
706
- h("p", null, x(S(v).t("platform.screen.WorkflowWorkbenchView.rules-affect-new-tasks-assigned-tasks-retain", "规则仅影响后续新任务,已分派任务保留原人员与权限快照。")), 1),
707
- h("h3", null, x(S(v).t("platform.screen.WorkflowWorkbenchView.existing-delegation-rules", "现有委托规则")), 1),
708
- (y(!0), m(xe, null, Ce(gt.value, (e) => (y(), m("div", {
709
- key: e.id,
710
- class: "policy-row"
711
- }, [
712
- h("strong", null, x(e.title) + " · " + x(e.enabled ? S(v).t("platform.screen.WorkflowWorkbenchView.enabled", "启用") : S(v).t("platform.screen.WorkflowWorkbenchView.disabled", "停用")), 1),
713
- _(S(ae), {
714
- value: e.delegateUserId,
715
- context: Ke.value,
716
- "load-options": Ue.value,
717
- mode: "list",
718
- "title-of": ot,
719
- disabled: ""
720
- }, null, 8, [
721
- "value",
722
- "context",
723
- "load-options"
724
- ]),
725
- h("span", null, x(e.moduleScopeType === "all" ? S(v).t("platform.screen.WorkflowWorkbenchView.all-business-modules", "全部业务模块") : e.moduleAliases?.map((e) => Xe.value[e] ?? e).join("、")), 1),
726
- h("div", null, [_(S(a), {
727
- disabled: J.value,
728
- onClick: (t) => St(e)
729
- }, {
730
- default: C(() => [g(x(S(v).t("platform.screen.WorkflowWorkbenchView.edit-rule", "编辑规则")), 1)]),
731
- _: 1
732
- }, 8, ["disabled", "onClick"]), _(S(a), {
733
- disabled: J.value,
734
- onClick: (t) => Tt(e)
735
- }, {
736
- default: C(() => [g(x(e.enabled ? S(v).t("platform.screen.WorkflowWorkbenchView.disable-rule", "停用规则") : S(v).t("platform.screen.WorkflowWorkbenchView.enable-rule", "启用规则")), 1)]),
737
- _: 2
738
- }, 1032, ["disabled", "onClick"])])
739
- ]))), 128))
740
- ]),
741
- _: 1
742
- }, 8, ["open", "title"])
743
- ]));
744
- }
745
- }), [["__scopeId", "data-v-6e45ff01"]]);
746
- //#endregion
747
- export { w as default };