@chase-shao/vue-component-lib 1.2.44 → 1.2.46

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/index.es.js CHANGED
@@ -1,10 +1,11 @@
1
- import { ref as y, defineComponent as F, mergeModels as O, useModel as ce, resolveComponent as x, createBlock as L, openBlock as v, onMounted as Y, computed as P, withCtx as N, createElementBlock as S, Fragment as H, renderList as z, createVNode as T, nextTick as qe, createTextVNode as Z, useTemplateRef as he, createElementVNode as h, createCommentVNode as ee, toDisplayString as j, resolveDynamicComponent as ke, renderSlot as q, inject as ne, getCurrentInstance as ue, reactive as Se, normalizeStyle as Ye, normalizeClass as Je, unref as Ie, onActivated as Xe } from "vue";
2
- import Qe from "axios";
3
- import { defineStore as Ze } from "pinia";
4
- import { useRouter as et } from "vue-router";
5
- const tt = Ze("main", () => ({
6
- token: y(void 0)
7
- })), nt = async (e) => new Promise((t) => setTimeout(t, e)), at = async (e, t, s, n = void 0) => {
1
+ import { ref as V, defineComponent as R, mergeModels as q, useModel as ce, resolveComponent as I, createBlock as A, openBlock as f, onMounted as Q, computed as P, withCtx as N, createElementBlock as k, Fragment as M, renderList as B, createVNode as U, nextTick as Ye, createTextVNode as ee, useTemplateRef as he, createElementVNode as b, createCommentVNode as te, toDisplayString as W, resolveDynamicComponent as ke, renderSlot as X, inject as ae, getCurrentInstance as ue, reactive as Se, normalizeStyle as Je, normalizeClass as Xe, unref as Ne, onActivated as Qe } from "vue";
2
+ import Ze from "axios";
3
+ import { defineStore as et } from "pinia";
4
+ import { Modal as tt } from "@arco-design/web-vue";
5
+ import { useRouter as nt } from "vue-router";
6
+ const at = et("main", () => ({
7
+ token: V(void 0)
8
+ })), ot = async (e) => new Promise((t) => setTimeout(t, e)), st = async (e, t, s, n = void 0) => {
8
9
  if (e[t] === void 0)
9
10
  try {
10
11
  e[t] = null, e[t] = await s() || n;
@@ -12,19 +13,26 @@ const tt = Ze("main", () => ({
12
13
  console.error(a), e[t] = void 0;
13
14
  }
14
15
  for (; e[t] === null; )
15
- await nt(100);
16
+ await ot(100);
16
17
  return e[t];
17
18
  };
18
- function Ue() {
19
- const e = Ee();
19
+ let be = {};
20
+ function rt(e) {
21
+ be = { ...be, ...e };
22
+ }
23
+ function Ce() {
24
+ return be;
25
+ }
26
+ function Le() {
27
+ const e = Ce();
20
28
  return {
21
29
  apiBase: e.apiBase || void 0 || "",
22
30
  appSecret: e.appSecret || void 0 || ""
23
31
  };
24
32
  }
25
- function Ae() {
26
- const { apiBase: e } = Ue();
27
- return Qe.create({
33
+ function Fe() {
34
+ const { apiBase: e } = Le();
35
+ return Ze.create({
28
36
  baseURL: e,
29
37
  timeout: 1e4,
30
38
  // 10s
@@ -32,16 +40,16 @@ function Ae() {
32
40
  withCredentials: !0
33
41
  });
34
42
  }
35
- const Le = async () => {
36
- const { apiBase: e, appSecret: t } = Ue(), s = Ae(), n = tt();
37
- return await at(n, "token", async () => (await s.get(`${e}/GenerateToken`, {
43
+ const Me = async () => {
44
+ const { apiBase: e, appSecret: t } = Le(), s = Fe(), n = at();
45
+ return await st(n, "token", async () => (await s.get(`${e}/GenerateToken`, {
38
46
  params: {
39
47
  appid: "bpm",
40
48
  appsecret: t
41
49
  }
42
50
  }))?.data?.token);
43
- }, W = async () => {
44
- const e = await Le(), t = Ae();
51
+ }, O = async () => {
52
+ const e = await Me(), t = Fe();
45
53
  return t.defaults.headers.common.Authorization = `Bearer ${e}`, t;
46
54
  }, _e = {
47
55
  CurrentUserEmail: (e) => e.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
@@ -50,34 +58,34 @@ const Le = async () => {
50
58
  ApproverEmail: (e) => e.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
51
59
  ApproverPositionCode: (e) => e.bpmStore()?.positionCode ?? 999,
52
60
  RejectReason: () => "Test Reject Reason"
53
- }, M = [];
61
+ }, F = [];
54
62
  for (let e = 0; e < 256; ++e)
55
- M.push((e + 256).toString(16).slice(1));
56
- function ot(e, t = 0) {
57
- return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
63
+ F.push((e + 256).toString(16).slice(1));
64
+ function it(e, t = 0) {
65
+ return (F[e[t + 0]] + F[e[t + 1]] + F[e[t + 2]] + F[e[t + 3]] + "-" + F[e[t + 4]] + F[e[t + 5]] + "-" + F[e[t + 6]] + F[e[t + 7]] + "-" + F[e[t + 8]] + F[e[t + 9]] + "-" + F[e[t + 10]] + F[e[t + 11]] + F[e[t + 12]] + F[e[t + 13]] + F[e[t + 14]] + F[e[t + 15]]).toLowerCase();
58
66
  }
59
67
  let we;
60
- const st = new Uint8Array(16);
61
- function rt() {
68
+ const lt = new Uint8Array(16);
69
+ function ct() {
62
70
  if (!we) {
63
71
  if (typeof crypto > "u" || !crypto.getRandomValues)
64
72
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
65
73
  we = crypto.getRandomValues.bind(crypto);
66
74
  }
67
- return we(st);
75
+ return we(lt);
68
76
  }
69
- const it = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), xe = { randomUUID: it };
70
- function Me(e, t, s) {
71
- if (xe.randomUUID && !e)
72
- return xe.randomUUID();
77
+ const ut = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Te = { randomUUID: ut };
78
+ function Re(e, t, s) {
79
+ if (Te.randomUUID && !e)
80
+ return Te.randomUUID();
73
81
  e = e || {};
74
- const n = e.random ?? e.rng?.() ?? rt();
82
+ const n = e.random ?? e.rng?.() ?? ct();
75
83
  if (n.length < 16)
76
84
  throw new Error("Random bytes length must be >= 16");
77
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, ot(n);
85
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, it(n);
78
86
  }
79
- var B = /* @__PURE__ */ ((e) => (e[e.Submit = 0] = "Submit", e[e.Link = 1] = "Link", e))(B || {}), te = /* @__PURE__ */ ((e) => (e[e.Create = 0] = "Create", e[e.Update = 1] = "Update", e[e.Details = 2] = "Details", e[e.List = 3] = "List", e))(te || {});
80
- function lt(e, t, s) {
87
+ var E = /* @__PURE__ */ ((e) => (e[e.Submit = 0] = "Submit", e[e.Link = 1] = "Link", e))(E || {}), ne = /* @__PURE__ */ ((e) => (e[e.Create = 0] = "Create", e[e.Update = 1] = "Update", e[e.Details = 2] = "Details", e[e.List = 3] = "List", e))(ne || {});
88
+ function dt(e, t, s) {
81
89
  const n = {
82
90
  pageType: "",
83
91
  fields: {},
@@ -100,7 +108,7 @@ function lt(e, t, s) {
100
108
  else if (a.attributeType === "UIControl") {
101
109
  if (a.widget === "Tab") {
102
110
  n.tabs || (n.tabs = []), n.tabs.push({
103
- key: Me(),
111
+ key: Re(),
104
112
  title: a.title,
105
113
  filters: a.filters ? JSON.parse(a.filters) : [],
106
114
  order: a.order
@@ -113,52 +121,52 @@ function lt(e, t, s) {
113
121
  redirectUrl: a.redirectUrl,
114
122
  redirectType: a.redirectType,
115
123
  title: a.title,
116
- widget: a.widget === "Link" ? B.Link : B.Submit,
124
+ widget: a.widget === "Link" ? E.Link : E.Submit,
117
125
  location: a.location,
118
126
  attributeType: a.attributeType,
119
127
  readonly: a.readonly
120
128
  });
121
- } else a.attributeType === "Banner" && (n.banner.title = a.title, n.banner.subTitle = t === 0 ? a.subTitle : Ce(a.subTitle, e.workflowId.propertyValue));
122
- }), n.tabs && (n.tabs = n.tabs.sort((a, c) => a.order - c.order)), Object.entries(e).forEach(([a, c]) => {
129
+ } else a.attributeType === "Banner" && (n.banner.title = a.title, n.banner.subTitle = t === 0 ? a.subTitle : Ve(a.subTitle, e.workflowId.propertyValue));
130
+ }), n.tabs && (n.tabs = n.tabs.sort((a, l) => a.order - l.order)), Object.entries(e).forEach(([a, l]) => {
123
131
  if (a === "__ClassAttributes" || a === "className" || a === "id" || a === "deleteFlag" || a === "status" || a === "workFlowReason" || t !== 3 && a === "workflowId")
124
132
  return;
125
- const l = {
133
+ const c = {
126
134
  validations: [],
127
135
  triggers: [],
128
136
  isFiltered: !1,
129
137
  dependent: ""
130
- }, { attributes: d, propertyValue: o } = c;
138
+ }, { attributes: d, propertyValue: o } = l;
131
139
  switch (o) {
132
140
  case null:
133
- l.modelValue = "";
141
+ c.modelValue = "";
134
142
  break;
135
143
  case void 0:
136
- l.modelValue = "";
144
+ c.modelValue = "";
137
145
  break;
138
146
  default:
139
- l.modelValue = o;
147
+ c.modelValue = o;
140
148
  break;
141
149
  }
142
- a === "onBehalf" && t === 0 && (l.modelValue = _e.CurrentUserEmail(s)), d?.forEach((r) => {
143
- r.order || r.Order ? l.order = r.order ?? r.Order : r.attributeType === "UIControl" ? l.widget = {
150
+ a === "onBehalf" && t === 0 && (c.modelValue = _e.CurrentUserEmail(s)), d?.forEach((r) => {
151
+ r.order || r.Order ? c.order = r.order ?? r.Order : r.attributeType === "UIControl" ? c.widget = {
144
152
  ...r,
145
153
  column: !0
146
- } : r.attributeType === "UIValidationControl" && t !== 3 ? l.widget?.widget !== "CheckBox" && l.validations.push(r) : r.attributeType === "UIListed" ? l.widget = {
154
+ } : r.attributeType === "UIValidationControl" && t !== 3 ? c.widget?.widget !== "CheckBox" && c.validations.push(r) : r.attributeType === "UIListed" ? c.widget = {
147
155
  ...r,
148
156
  column: !0
149
- } : r.attributeType === "UIFiltered" ? l.isFiltered = !0 : r.dependentType ? l.dependent = _e[r.dependentType] ? _e[r.dependentType](s) : "" : r.eventType === "Change" && l.triggers?.push({
157
+ } : r.attributeType === "UIFiltered" ? c.isFiltered = !0 : r.dependentType ? c.dependent = _e[r.dependentType] ? _e[r.dependentType](s) : "" : r.eventType === "Change" && c.triggers?.push({
150
158
  event: "change",
151
159
  handlerName: r.eventName
152
160
  });
153
- }), n.fields[a] = l;
161
+ }), n.fields[a] = c;
154
162
  }), n;
155
163
  }
156
164
  const de = async (e, t, s, n) => {
157
- const c = await (await W()).get(`/General/${t}/${e}/page`, { params: n });
158
- return lt(c?.data, e, s);
159
- }, Fe = async (e, t, s) => (await (await W()).post(`/General/${t}/${e}/button/List`, null, { params: s }))?.data;
160
- async function ct(e, t) {
161
- const n = await (await W()).post(`/General/${e}/list`, t);
165
+ const l = await (await O()).get(`/General/${t}/${e}/page`, { params: n });
166
+ return dt(l?.data, e, s);
167
+ }, De = async (e, t, s) => (await (await O()).post(`/General/${t}/${e}/button/List`, null, { params: s }))?.data;
168
+ async function ft(e, t) {
169
+ const n = await (await O()).post(`/General/${e}/list`, t);
162
170
  return {
163
171
  data: n.data.data,
164
172
  totalCount: n.data.totalCount
@@ -177,79 +185,82 @@ async function ct(e, t) {
177
185
  // ),
178
186
  };
179
187
  }
180
- async function ut(e, t, s) {
181
- const a = await (await W()).post(s, t, {
188
+ async function pt(e, t, s) {
189
+ const a = await (await O()).post(s, t, {
182
190
  params: {
183
191
  className: e
184
192
  }
185
193
  });
186
194
  return a.data.length > 0 ? a.data[0] : 0;
187
195
  }
188
- async function dt(e, t, s, n) {
189
- const a = await W(), c = Ce(n, t);
190
- return (await a.put(c, s))?.data;
196
+ async function mt(e, t, s, n) {
197
+ const a = await O(), l = Ve(n, t);
198
+ return (await a.put(l, s))?.data;
191
199
  }
192
- function Ce(e, t) {
200
+ function Ve(e, t) {
193
201
  return e.replace(/{WorkflowId}/g, t);
194
202
  }
195
- function ft(e, t) {
203
+ function gt(e, t) {
196
204
  return e.replace(/{ApproverEmail}/g, encodeURIComponent(t));
197
205
  }
198
- function pt(e, t) {
206
+ function vt(e, t) {
199
207
  return e.replace(/{WorkFlowReason}/g, encodeURIComponent(t));
200
208
  }
201
- function mt(e, t) {
209
+ function _t(e, t) {
202
210
  return e.replace(/{Status}/g, t);
203
211
  }
204
- function gt(e, t) {
212
+ function wt(e, t) {
205
213
  return e.replace(/{IfTriggerGlobal_RandP_Approval}/g, t);
206
214
  }
207
- function vt(e, t) {
215
+ function yt(e, t) {
208
216
  return e.replace(/{ClassName}/g, encodeURIComponent(t));
209
217
  }
210
- async function _t(e, t, s, n, a, c, l, d) {
211
- const o = await W();
212
- let r = Ce(c, t);
213
- return r = ft(r, s), r = pt(r, n), r = mt(r, l), r = gt(r, d), r = vt(r, e), (await o.put(r, a))?.data;
218
+ async function bt(e, t, s, n, a, l, c, d) {
219
+ const o = await O();
220
+ let r = Ve(l, t);
221
+ return r = gt(r, s), r = vt(r, n), r = _t(r, c), r = wt(r, d), r = yt(r, e), (await o.put(r, a))?.data;
214
222
  }
215
- async function wt(e, t) {
216
- const a = (await (await W()).get(e, { params: { value: t } }))?.data;
217
- return Object.entries(a).map(([c, l]) => ({
218
- value: c,
219
- label: l
223
+ async function ht(e, t) {
224
+ const a = (await (await O()).get(e, { params: { value: t } }))?.data;
225
+ return Object.entries(a).map(([l, c]) => ({
226
+ value: l,
227
+ label: c
220
228
  }));
221
229
  }
222
- async function bt(e, t) {
223
- return (await (await W()).get(`/General/${e}/${t}/process`))?.data;
230
+ async function kt(e, t) {
231
+ return (await (await O()).get(`/General/${e}/${t}/process`))?.data;
224
232
  }
225
- function yt(e) {
233
+ function St(e) {
226
234
  return {
227
- uid: e.id ?? Me(),
235
+ uid: e.id ?? Re(),
228
236
  name: e.attachmentName ?? "unknown",
229
237
  url: e.attachmentKey ?? ""
230
238
  };
231
239
  }
232
- async function De(e, t) {
233
- return (await (await W()).get(`/General/${e}/${t}/upload/get`))?.data.reduce((c, l) => {
234
- const { category: d } = l;
235
- return c[d] || (c[d] = []), c[d].push(yt(l)), c;
240
+ async function He(e, t) {
241
+ return (await (await O()).get(`/General/${e}/${t}/upload/get`))?.data.reduce((l, c) => {
242
+ const { category: d } = c;
243
+ return l[d] || (l[d] = []), l[d].push(St(c)), l;
236
244
  }, {});
237
245
  }
238
- const ae = (e, t) => {
246
+ async function Ct(e, t) {
247
+ return (await O()).post(`/General/${e}/${t}/delete/attachment`);
248
+ }
249
+ const oe = (e, t) => {
239
250
  let s = "";
240
251
  return { res: e.every((a) => {
241
- const c = ht(a, t);
242
- return c || (s = a.errorMessage), c;
252
+ const l = Vt(a, t);
253
+ return l || (s = a.errorMessage), l;
243
254
  }), errorMessages: s };
244
- }, ht = (e, t) => {
255
+ }, Vt = (e, t) => {
245
256
  const { ruleName: s, ruleParameter: n } = e;
246
- return kt[s](n, t);
247
- }, kt = {
257
+ return $t[s](n, t);
258
+ }, $t = {
248
259
  Regex: (e, t) => new RegExp(e).test(t),
249
260
  Required: (e, t) => !!t
250
- }, Te = /* @__PURE__ */ F({
261
+ }, Ue = /* @__PURE__ */ R({
251
262
  __name: "InputText",
252
- props: /* @__PURE__ */ O({
263
+ props: /* @__PURE__ */ q({
253
264
  fieldKey: {},
254
265
  modelValue: {},
255
266
  config: {},
@@ -260,26 +271,26 @@ const ae = (e, t) => {
260
271
  modelValue: {},
261
272
  modelModifiers: {}
262
273
  }),
263
- emits: /* @__PURE__ */ O(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
274
+ emits: /* @__PURE__ */ q(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
264
275
  setup(e, { expose: t, emit: s }) {
265
- const n = e, a = s, c = ce(e, "modelValue"), l = (r) => ae(n.validations, r), d = (r) => {
276
+ const n = e, a = s, l = ce(e, "modelValue"), c = (r) => oe(n.validations, r), d = (r) => {
266
277
  a("input", r);
267
278
  }, o = (r) => {
268
- const w = l(r);
279
+ const w = c(r);
269
280
  a("error", w.res ? "" : w.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((p) => {
270
281
  p.event === "change" && a(p.event, p.handlerName, r);
271
282
  });
272
283
  };
273
284
  return t({
274
285
  validate() {
275
- const r = l(n.modelValue);
286
+ const r = c(n.modelValue);
276
287
  return a("error", r.res ? "" : r.errorMessages), r.res;
277
288
  }
278
289
  }), (r, w) => {
279
- const p = x("AInput");
280
- return v(), L(p, {
281
- modelValue: c.value,
282
- "onUpdate:modelValue": w[0] || (w[0] = (b) => c.value = b),
290
+ const p = I("AInput");
291
+ return f(), A(p, {
292
+ modelValue: l.value,
293
+ "onUpdate:modelValue": w[0] || (w[0] = (h) => l.value = h),
283
294
  "allow-clear": "",
284
295
  disabled: n.readonly || n.config.Readonly,
285
296
  onInput: d,
@@ -287,9 +298,9 @@ const ae = (e, t) => {
287
298
  }, null, 8, ["modelValue", "disabled"]);
288
299
  };
289
300
  }
290
- }), St = /* @__PURE__ */ F({
301
+ }), xt = /* @__PURE__ */ R({
291
302
  __name: "InputNumber",
292
- props: /* @__PURE__ */ O({
303
+ props: /* @__PURE__ */ q({
293
304
  fieldKey: {},
294
305
  modelValue: {},
295
306
  config: {},
@@ -300,20 +311,20 @@ const ae = (e, t) => {
300
311
  modelValue: {},
301
312
  modelModifiers: {}
302
313
  }),
303
- emits: /* @__PURE__ */ O(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
314
+ emits: /* @__PURE__ */ q(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
304
315
  setup(e, { expose: t, emit: s }) {
305
- const n = e, a = s, c = ce(e, "modelValue"), l = y(100), d = y(0);
306
- Y(() => {
316
+ const n = e, a = s, l = ce(e, "modelValue"), c = V(100), d = V(0);
317
+ Q(() => {
307
318
  n.validations && n.validations.forEach((p) => {
308
- p.ruleName === "Max" && (l.value = p.ruleParameter), p.ruleName === "Min" && (d.value = p.ruleParameter);
319
+ p.ruleName === "Max" && (c.value = p.ruleParameter), p.ruleName === "Min" && (d.value = p.ruleParameter);
309
320
  });
310
321
  });
311
- const o = (p) => ae(n.validations, p), r = (p) => {
322
+ const o = (p) => oe(n.validations, p), r = (p) => {
312
323
  a("input", p);
313
324
  }, w = (p) => {
314
- const b = o(p);
315
- a("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((_) => {
316
- _.event === "change" && a(_.event, _.handlerName, p);
325
+ const h = o(p);
326
+ a("error", h.res ? "" : h.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((S) => {
327
+ S.event === "change" && a(S.event, S.handlerName, p);
317
328
  });
318
329
  };
319
330
  return t({
@@ -321,23 +332,23 @@ const ae = (e, t) => {
321
332
  const p = o(n.modelValue);
322
333
  return a("error", p.res ? "" : p.errorMessages), p.res;
323
334
  }
324
- }), (p, b) => {
325
- const _ = x("AInputNumber");
326
- return v(), L(_, {
327
- modelValue: c.value,
328
- "onUpdate:modelValue": b[0] || (b[0] = (C) => c.value = C),
335
+ }), (p, h) => {
336
+ const S = I("AInputNumber");
337
+ return f(), A(S, {
338
+ modelValue: l.value,
339
+ "onUpdate:modelValue": h[0] || (h[0] = (_) => l.value = _),
329
340
  clearable: "",
330
341
  disabled: n.readonly,
331
342
  min: d.value,
332
- max: l.value,
343
+ max: c.value,
333
344
  onInput: r,
334
345
  onChange: w
335
346
  }, null, 8, ["modelValue", "disabled", "min", "max"]);
336
347
  };
337
348
  }
338
- }), Ne = /* @__PURE__ */ F({
349
+ }), Ae = /* @__PURE__ */ R({
339
350
  __name: "SelectList",
340
- props: /* @__PURE__ */ O({
351
+ props: /* @__PURE__ */ q({
341
352
  fieldKey: {},
342
353
  modelValue: {},
343
354
  config: {},
@@ -348,26 +359,26 @@ const ae = (e, t) => {
348
359
  modelValue: {},
349
360
  modelModifiers: {}
350
361
  }),
351
- emits: /* @__PURE__ */ O(["update:modelValue", "change"], ["update:modelValue"]),
362
+ emits: /* @__PURE__ */ q(["update:modelValue", "change"], ["update:modelValue"]),
352
363
  setup(e, { expose: t, emit: s }) {
353
- const n = e, a = s, c = y(!1), l = y(n.config.options ?? []), d = ce(e, "modelValue"), o = (p) => ae(n.validations, p);
364
+ const n = e, a = s, l = V(!1), c = V(n.config.options ?? []), d = ce(e, "modelValue"), o = (p) => oe(n.validations, p);
354
365
  P(() => {
355
366
  const p = {};
356
- return n.triggers && n.triggers.length > 0 && n.triggers.forEach((b) => {
357
- p[b.event] = (_) => {
358
- a(b.event, b.handlerName, _);
359
- const C = o(_);
360
- a("error", C.res ? "" : C.errorMessages);
367
+ return n.triggers && n.triggers.length > 0 && n.triggers.forEach((h) => {
368
+ p[h.event] = (S) => {
369
+ a(h.event, h.handlerName, S);
370
+ const _ = o(S);
371
+ a("error", _.res ? "" : _.errorMessages);
361
372
  };
362
373
  }), p;
363
- }), Y(async () => {
364
- n.config.dataSourceProvider && (l.value = await wt(n.config.dataSourceProvider));
374
+ }), Q(async () => {
375
+ n.config.dataSourceProvider && (c.value = await ht(n.config.dataSourceProvider));
365
376
  });
366
377
  const w = (p) => {
367
378
  a("update:modelValue", p);
368
- const b = o(p);
369
- a("error", b.res ? "" : b.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((_) => {
370
- _.event === "change" && a(_.event, _.handlerName, p);
379
+ const h = o(p);
380
+ a("error", h.res ? "" : h.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((S) => {
381
+ S.event === "change" && a(S.event, S.handlerName, p);
371
382
  });
372
383
  };
373
384
  return t({
@@ -375,29 +386,29 @@ const ae = (e, t) => {
375
386
  const p = o(n.modelValue);
376
387
  return a("error", p.res ? "" : p.errorMessages), p.res;
377
388
  }
378
- }), (p, b) => {
379
- const _ = x("AOption"), C = x("ASelect");
380
- return v(), L(C, {
389
+ }), (p, h) => {
390
+ const S = I("AOption"), _ = I("ASelect");
391
+ return f(), A(_, {
381
392
  "allow-clear": "",
382
393
  modelValue: d.value,
383
- "onUpdate:modelValue": b[0] || (b[0] = ($) => d.value = $),
384
- loading: c.value,
394
+ "onUpdate:modelValue": h[0] || (h[0] = (x) => d.value = x),
395
+ loading: l.value,
385
396
  "filter-option": !0,
386
397
  "allow-search": !0,
387
398
  onChange: w
388
399
  }, {
389
400
  default: N(() => [
390
- (v(!0), S(H, null, z(l.value, ($) => (v(), L(_, {
391
- key: $.value,
392
- value: $.value,
393
- label: $.label
401
+ (f(!0), k(M, null, B(c.value, (x) => (f(), A(S, {
402
+ key: x.value,
403
+ value: x.value,
404
+ label: x.label
394
405
  }, null, 8, ["value", "label"]))), 128))
395
406
  ]),
396
407
  _: 1
397
408
  }, 8, ["modelValue", "loading"]);
398
409
  };
399
410
  }
400
- }), Ct = /* @__PURE__ */ F({
411
+ }), It = /* @__PURE__ */ R({
401
412
  __name: "Cascader",
402
413
  props: {
403
414
  modelValue: {},
@@ -405,15 +416,15 @@ const ae = (e, t) => {
405
416
  },
406
417
  emits: ["update:modelValue", "change"],
407
418
  setup(e, { expose: t, emit: s }) {
408
- const n = e, a = s, c = y(n.config.options ?? []), l = (o) => {
419
+ const n = e, a = s, l = V(n.config.options ?? []), c = (o) => {
409
420
  a("update:modelValue", o), a("change", o);
410
421
  };
411
- Y(async () => {
422
+ Q(async () => {
412
423
  if (n.config) {
413
424
  const o = n.config.dataSourceProvider;
414
425
  if (o) {
415
- const w = await (await W()).get(o);
416
- c.value = w.data;
426
+ const w = await (await O()).get(o);
427
+ l.value = w.data;
417
428
  }
418
429
  }
419
430
  });
@@ -423,26 +434,26 @@ const ae = (e, t) => {
423
434
  return !0;
424
435
  }
425
436
  }), (o, r) => {
426
- const w = x("ACascader"), p = x("ASpace");
427
- return v(), L(p, {
437
+ const w = I("ACascader"), p = I("ASpace");
438
+ return f(), A(p, {
428
439
  direction: "vertical",
429
440
  size: "large"
430
441
  }, {
431
442
  default: N(() => [
432
- T(w, {
443
+ U(w, {
433
444
  "field-names": d,
434
445
  "model-value": o.modelValue,
435
- options: c.value,
446
+ options: l.value,
436
447
  style: { width: "320px" },
437
448
  placeholder: "Please select ...",
438
- onChange: l
449
+ onChange: c
439
450
  }, null, 8, ["model-value", "options"])
440
451
  ]),
441
452
  _: 1
442
453
  });
443
454
  };
444
455
  }
445
- }), Vt = /* @__PURE__ */ F({
456
+ }), Nt = /* @__PURE__ */ R({
446
457
  __name: "FileUpload",
447
458
  props: {
448
459
  className: {},
@@ -455,52 +466,68 @@ const ae = (e, t) => {
455
466
  },
456
467
  emits: ["update:modelValue", "change", "error", "input"],
457
468
  setup(e, { expose: t, emit: s }) {
458
- const n = e, a = s, c = y({});
459
- Y(async () => {
460
- const _ = await Le();
461
- c.value = {
469
+ const n = e, a = s, l = V({});
470
+ Q(async () => {
471
+ const _ = await Me();
472
+ l.value = {
462
473
  Authorization: `Bearer ${_}`
463
474
  };
464
475
  });
465
- const l = (_) => ae(n.validations, _), o = Ee().apiBase, r = y(null), w = y("");
466
- function p(_, C, $) {
467
- return _.replace(/{WorkflowId}/g, C).replace(/{ClassName}/g, $);
476
+ const c = (_) => oe(n.validations, _), o = Ce().apiBase, r = V(null), w = V("");
477
+ function p(_, x, D) {
478
+ return _.replace(/{WorkflowId}/g, x).replace(/{ClassName}/g, D);
468
479
  }
469
- const b = P(() => {
480
+ const h = P(() => {
470
481
  if (n.config.uploadURL) {
471
482
  const _ = o + n.config.uploadURL;
472
483
  return p(_, w.value, n.className);
473
484
  }
474
485
  return "";
475
486
  });
487
+ function S(_) {
488
+ const { file: x, name: D } = _, j = D ?? x.name;
489
+ return new Promise((J, z) => {
490
+ tt.confirm({
491
+ title: "确认删除",
492
+ content: `确认删除 ${j}吗?`,
493
+ async onOk() {
494
+ if (_.status !== "init" && n.config.removeFile)
495
+ return await n.config.removeFile(_.uid), J(!0);
496
+ J(!0);
497
+ },
498
+ onCancel: () => z("cancel")
499
+ });
500
+ });
501
+ }
476
502
  return t({
477
503
  submit(_) {
478
- r.value && (n.config.uploadURL && (w.value = _), qe(() => {
504
+ r.value && (n.config.uploadURL && (w.value = _), Ye(() => {
479
505
  r.value.submit();
480
506
  }));
481
507
  },
482
508
  validate() {
483
- const _ = l(n.modelValue);
509
+ const _ = c(n.modelValue);
484
510
  return a("error", _.res ? "" : _.errorMessages), _.res;
485
511
  }
486
- }), (_, C) => {
487
- const $ = x("a-upload");
488
- return v(), L($, {
512
+ }), (_, x) => {
513
+ const D = I("a-upload");
514
+ return f(), A(D, {
489
515
  ref_key: "uploadRef",
490
516
  ref: r,
491
517
  "default-file-list": n.config.files,
492
- action: b.value,
518
+ action: h.value,
493
519
  limit: n.config.allowedNumber,
494
520
  "auto-upload": !1,
495
521
  name: "files",
496
- headers: c.value
522
+ headers: l.value,
523
+ onBeforeRemove: S
497
524
  }, {
498
- "start-icon": N(() => C[0] || (C[0] = [])),
525
+ "start-icon": N(() => x[0] || (x[0] = [])),
499
526
  _: 1
500
527
  }, 8, ["default-file-list", "action", "limit", "headers"]);
501
528
  };
502
529
  }
503
- }), $t = /* @__PURE__ */ F({
530
+ }), Tt = /* @__PURE__ */ R({
504
531
  __name: "TextArea",
505
532
  props: {
506
533
  fieldKey: {},
@@ -512,35 +539,35 @@ const ae = (e, t) => {
512
539
  },
513
540
  emits: ["update:modelValue", "change", "error", "input"],
514
541
  setup(e, { expose: t, emit: s }) {
515
- const n = e, a = s, c = (o) => ae(n.validations, o), l = (o) => {
542
+ const n = e, a = s, l = (o) => oe(n.validations, o), c = (o) => {
516
543
  a("update:modelValue", o), a("input", o);
517
544
  }, d = (o) => {
518
545
  a("update:modelValue", o);
519
- const r = c(o);
546
+ const r = l(o);
520
547
  a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((w) => {
521
548
  w.event === "change" && a(w.event, w.handlerName, o);
522
549
  });
523
550
  };
524
551
  return t({
525
552
  validate() {
526
- const o = c(n.modelValue);
553
+ const o = l(n.modelValue);
527
554
  return a("error", o.res ? "" : o.errorMessages), o.res;
528
555
  }
529
556
  }), (o, r) => {
530
- const w = x("ATextarea");
531
- return v(), L(w, {
557
+ const w = I("ATextarea");
558
+ return f(), A(w, {
532
559
  "model-value": n.modelValue,
533
560
  placeholder: "Please enter something",
534
561
  "allow-clear": "",
535
562
  disabled: n.readonly,
536
- onInput: l,
563
+ onInput: c,
537
564
  onChange: d
538
565
  }, null, 8, ["model-value", "disabled"]);
539
566
  };
540
567
  }
541
- }), It = /* @__PURE__ */ F({
568
+ }), Ut = /* @__PURE__ */ R({
542
569
  __name: "CheckBox",
543
- props: /* @__PURE__ */ O({
570
+ props: /* @__PURE__ */ q({
544
571
  fieldKey: {},
545
572
  modelValue: {},
546
573
  config: {},
@@ -551,45 +578,45 @@ const ae = (e, t) => {
551
578
  modelValue: {},
552
579
  modelModifiers: {}
553
580
  }),
554
- emits: /* @__PURE__ */ O(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
581
+ emits: /* @__PURE__ */ q(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
555
582
  setup(e, { expose: t, emit: s }) {
556
- const n = e, a = s, c = ce(e, "modelValue"), l = (o) => ae(n.validations, o), d = (o) => {
557
- const r = l(o);
583
+ const n = e, a = s, l = ce(e, "modelValue"), c = (o) => oe(n.validations, o), d = (o) => {
584
+ const r = c(o);
558
585
  a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((w) => {
559
586
  w.event === "change" && a(w.event, w.handlerName, o);
560
587
  });
561
588
  };
562
589
  return t({
563
590
  validate() {
564
- const o = l(n.modelValue);
591
+ const o = c(n.modelValue);
565
592
  return a("error", o.res ? "" : o.errorMessages), o.res;
566
593
  }
567
594
  }), (o, r) => {
568
- const w = x("ACheckbox");
569
- return v(), L(w, {
570
- modelValue: c.value,
571
- "onUpdate:modelValue": r[0] || (r[0] = (p) => c.value = p),
595
+ const w = I("ACheckbox");
596
+ return f(), A(w, {
597
+ modelValue: l.value,
598
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => l.value = p),
572
599
  clearable: "",
573
600
  disabled: n.readonly || n.config.Readonly,
574
601
  onChange: d
575
602
  }, {
576
603
  default: N(() => r[1] || (r[1] = [
577
- Z("Yes", -1)
604
+ ee("Yes", -1)
578
605
  ])),
579
606
  _: 1,
580
607
  __: [1]
581
608
  }, 8, ["modelValue", "disabled"]);
582
609
  };
583
610
  }
584
- }), xt = { class: "widget-wrapper" }, Tt = { class: "title mb-1.5" }, Nt = {
611
+ }), At = { class: "widget-wrapper" }, Lt = { class: "title mb-1.5" }, Ft = {
585
612
  key: 0,
586
613
  class: "required"
587
- }, Ut = { class: "form-widget" }, At = { class: "widget" }, Lt = {
614
+ }, Mt = { class: "form-widget" }, Rt = { class: "widget" }, Dt = {
588
615
  key: 0,
589
616
  class: "err-msg"
590
- }, Mt = /* @__PURE__ */ F({
617
+ }, Ht = /* @__PURE__ */ R({
591
618
  __name: "index",
592
- props: /* @__PURE__ */ O({
619
+ props: /* @__PURE__ */ q({
593
620
  config: {},
594
621
  className: {},
595
622
  fieldKey: {},
@@ -601,33 +628,33 @@ const ae = (e, t) => {
601
628
  modelValue: {},
602
629
  modelModifiers: {}
603
630
  }),
604
- emits: /* @__PURE__ */ O(["update:modelValue", "change", "error"], ["update:modelValue"]),
631
+ emits: /* @__PURE__ */ q(["update:modelValue", "change", "error"], ["update:modelValue"]),
605
632
  setup(e, { expose: t, emit: s }) {
606
- const n = e, a = s, c = ce(e, "modelValue"), l = he("widgetRef"), d = P(() => {
633
+ const n = e, a = s, l = ce(e, "modelValue"), c = he("widgetRef"), d = P(() => {
607
634
  switch (n.config?.widget?.widget) {
608
635
  case "TextBox":
609
- return Te;
636
+ return Ue;
610
637
  case "Number":
611
- return St;
638
+ return xt;
612
639
  case "SelectList":
613
- return Ne;
640
+ return Ae;
614
641
  case "Cascade":
615
- return Ct;
642
+ return It;
616
643
  case "File":
617
- return Vt;
644
+ return Nt;
618
645
  case "TextArea":
619
- return $t;
646
+ return Tt;
620
647
  case "DropDown":
621
- return Ne;
648
+ return Ae;
622
649
  case "CheckBox":
623
- return It;
650
+ return Ut;
624
651
  default:
625
- return Te;
652
+ return Ue;
626
653
  }
627
- }), o = y(""), r = (b) => {
628
- o.value = b;
629
- }, w = (b, _) => {
630
- a("change", b, _);
654
+ }), o = V(""), r = (h) => {
655
+ o.value = h;
656
+ }, w = (h, S) => {
657
+ a("change", h, S);
631
658
  };
632
659
  function p() {
633
660
  return n.config?.widget?.widget === "File";
@@ -636,27 +663,27 @@ const ae = (e, t) => {
636
663
  isFileUpload() {
637
664
  return n.config?.widget?.widget === "File";
638
665
  },
639
- submit(b) {
640
- p() && l.value.submit(b);
666
+ submit(h) {
667
+ p() && c.value.submit(h);
641
668
  },
642
669
  validate() {
643
- return l.value?.validate();
670
+ return c.value?.validate();
644
671
  },
645
672
  getCompName() {
646
673
  return n?.config?.widget?.title;
647
674
  }
648
- }), (b, _) => (v(), S("div", xt, [
649
- h("div", Tt, [
650
- Z(j(n?.config?.widget?.title), 1),
651
- n.config.validations.length ? (v(), S("span", Nt, "*")) : ee("", !0)
675
+ }), (h, S) => (f(), k("div", At, [
676
+ b("div", Lt, [
677
+ ee(W(n?.config?.widget?.title), 1),
678
+ n.config.validations.length ? (f(), k("span", Ft, "*")) : te("", !0)
652
679
  ]),
653
- h("div", Ut, [
654
- h("div", At, [
655
- (v(), L(ke(d.value), {
680
+ b("div", Mt, [
681
+ b("div", Rt, [
682
+ (f(), A(ke(d.value), {
656
683
  ref_key: "widgetRef",
657
- ref: l,
658
- modelValue: c.value,
659
- "onUpdate:modelValue": _[0] || (_[0] = (C) => c.value = C),
684
+ ref: c,
685
+ modelValue: l.value,
686
+ "onUpdate:modelValue": S[0] || (S[0] = (_) => l.value = _),
660
687
  "field-key": n.fieldKey,
661
688
  config: n.config.widget,
662
689
  validations: n.config.validations,
@@ -666,16 +693,16 @@ const ae = (e, t) => {
666
693
  onChange: w
667
694
  }, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"]))
668
695
  ]),
669
- o.value.length > 0 ? (v(), S("div", Lt, j(o.value), 1)) : ee("", !0)
696
+ o.value.length > 0 ? (f(), k("div", Dt, W(o.value), 1)) : te("", !0)
670
697
  ])
671
698
  ]));
672
699
  }
673
- }), oe = (e, t) => {
700
+ }), se = (e, t) => {
674
701
  const s = e.__vccOpts || e;
675
702
  for (const [n, a] of t)
676
703
  s[n] = a;
677
704
  return s;
678
- }, Ve = /* @__PURE__ */ oe(Mt, [["__scopeId", "data-v-9d7c1669"]]), Ft = /* @__PURE__ */ F({
705
+ }, $e = /* @__PURE__ */ se(Ht, [["__scopeId", "data-v-9d7c1669"]]), Pt = /* @__PURE__ */ R({
679
706
  __name: "SubmitButton",
680
707
  props: {
681
708
  url: {},
@@ -687,20 +714,20 @@ const ae = (e, t) => {
687
714
  function a() {
688
715
  n("click", s.url, s.redirectType);
689
716
  }
690
- return (c, l) => {
691
- const d = x("AButton");
692
- return v(), L(d, {
717
+ return (l, c) => {
718
+ const d = I("AButton");
719
+ return f(), A(d, {
693
720
  type: "primary",
694
721
  onClick: a
695
722
  }, {
696
723
  default: N(() => [
697
- q(c.$slots, "default")
724
+ X(l.$slots, "default")
698
725
  ]),
699
726
  _: 3
700
727
  });
701
728
  };
702
729
  }
703
- }), Dt = /* @__PURE__ */ F({
730
+ }), Bt = /* @__PURE__ */ R({
704
731
  __name: "DetailLink",
705
732
  props: {
706
733
  url: {},
@@ -712,17 +739,17 @@ const ae = (e, t) => {
712
739
  function a() {
713
740
  n("click", s.url, s.redirectType);
714
741
  }
715
- return (c, l) => {
716
- const d = x("ALink");
717
- return v(), L(d, { onClick: a }, {
742
+ return (l, c) => {
743
+ const d = I("ALink");
744
+ return f(), A(d, { onClick: a }, {
718
745
  default: N(() => [
719
- q(c.$slots, "default")
746
+ X(l.$slots, "default")
720
747
  ]),
721
748
  _: 3
722
749
  });
723
750
  };
724
751
  }
725
- }), le = /* @__PURE__ */ F({
752
+ }), le = /* @__PURE__ */ R({
726
753
  __name: "index",
727
754
  props: {
728
755
  config: {}
@@ -733,44 +760,44 @@ const ae = (e, t) => {
733
760
  function a(o, r) {
734
761
  n("click", s.config.widget, o, r, s.config.title);
735
762
  }
736
- const c = P(() => {
763
+ const l = P(() => {
737
764
  switch (s.config.location) {
738
765
  case "InOperation":
739
- return Ft;
766
+ return Pt;
740
767
  case "InTable":
741
768
  default:
742
- return Dt;
769
+ return Bt;
743
770
  }
744
- }), l = P(() => s.config.widget === B.Submit ? s.config.requestUrl ?? "" : s.config.widget === B.Link ? s.config.redirectUrl ?? "" : ""), d = P(() => s.config.redirectType ?? "Details");
745
- return (o, r) => (v(), L(ke(c.value), {
746
- url: l.value,
771
+ }), c = P(() => s.config.widget === E.Submit ? s.config.requestUrl ?? "" : s.config.widget === E.Link ? s.config.redirectUrl ?? "" : ""), d = P(() => s.config.redirectType ?? "Details");
772
+ return (o, r) => (f(), A(ke(l.value), {
773
+ url: c.value,
747
774
  "redirect-type": d.value,
748
775
  onClick: a
749
776
  }, {
750
777
  default: N(() => [
751
- Z(j(s.config.title), 1)
778
+ ee(W(s.config.title), 1)
752
779
  ]),
753
780
  _: 1
754
781
  }, 8, ["url", "redirect-type"]));
755
782
  }
756
- }), He = Symbol("library-router");
783
+ }), Pe = Symbol("library-router");
757
784
  function fe() {
758
- const e = ne(He, null);
759
- return e || et();
785
+ const e = ae(Pe, null);
786
+ return e || nt();
760
787
  }
761
- const Re = Symbol("library-triggers");
762
- function $e() {
763
- const e = ne(Re, null);
788
+ const Be = Symbol("library-triggers");
789
+ function xe() {
790
+ const e = ae(Be, null);
764
791
  return e || {};
765
792
  }
766
- const Ht = Symbol("library-pinia"), Pe = Symbol("library-bpmStore"), Be = Symbol("library-svrStore");
793
+ const Kt = Symbol("library-pinia"), Ke = Symbol("library-bpmStore"), ze = Symbol("library-svrStore");
767
794
  function pe() {
768
- return ne(Pe, null);
795
+ return ae(Ke, null);
769
796
  }
770
797
  function me() {
771
- return ne(Be, null);
798
+ return ae(ze, null);
772
799
  }
773
- const Rt = { class: "top-bar" }, Pt = { class: "banner-info" }, Bt = { class: "page-title" }, zt = { class: "page-subtitle" }, Et = { class: "avatar-wrapper" }, Kt = { class: "user-email" }, jt = /* @__PURE__ */ F({
800
+ const zt = { class: "top-bar" }, Et = { class: "banner-info" }, Ot = { class: "page-title" }, jt = { class: "page-subtitle" }, Gt = { class: "avatar-wrapper" }, Wt = { class: "user-email" }, qt = /* @__PURE__ */ R({
774
801
  __name: "TopBar",
775
802
  props: {
776
803
  title: {},
@@ -779,25 +806,25 @@ const Rt = { class: "top-bar" }, Pt = { class: "banner-info" }, Bt = { class: "p
779
806
  },
780
807
  setup(e) {
781
808
  return (t, s) => {
782
- const n = x("a-avatar"), a = x("a-popover");
783
- return v(), S("div", Rt, [
784
- h("div", Pt, [
785
- h("div", Bt, j(t.title), 1),
786
- h("div", zt, j(t.subTitle), 1)
809
+ const n = I("a-avatar"), a = I("a-popover");
810
+ return f(), k("div", zt, [
811
+ b("div", Et, [
812
+ b("div", Ot, W(t.title), 1),
813
+ b("div", jt, W(t.subTitle), 1)
787
814
  ]),
788
- h("div", Et, [
789
- T(a, { trigger: "click" }, {
815
+ b("div", Gt, [
816
+ U(a, { trigger: "click" }, {
790
817
  content: N(() => [
791
- h("div", Kt, j(t.email), 1)
818
+ b("div", Wt, W(t.email), 1)
792
819
  ]),
793
820
  default: N(() => [
794
- T(n, {
821
+ U(n, {
795
822
  size: 48,
796
823
  autoFixFontSize: "",
797
824
  style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
798
825
  }, {
799
826
  default: N(() => [
800
- Z(j(t.email.charAt(0).toUpperCase()), 1)
827
+ ee(W(t.email.charAt(0).toUpperCase()), 1)
801
828
  ]),
802
829
  _: 1
803
830
  })
@@ -808,16 +835,28 @@ const Rt = { class: "top-bar" }, Pt = { class: "banner-info" }, Bt = { class: "p
808
835
  ]);
809
836
  };
810
837
  }
811
- }), ge = /* @__PURE__ */ oe(jt, [["__scopeId", "data-v-c0457235"]]), Ot = { class: "page-container" }, Wt = { class: "page-body" }, Gt = { class: "form-card" }, qt = { class: "form-fields" }, Yt = {
838
+ }), ge = /* @__PURE__ */ se(qt, [["__scopeId", "data-v-c0457235"]]);
839
+ function Ie(e) {
840
+ const t = Ce(), s = [];
841
+ if (t.fieldsGroup) {
842
+ t.fieldsGroup.forEach((l) => {
843
+ const c = l.keys.map((d) => e.find((o) => o.fieldKey === d)).filter(Boolean);
844
+ c.length && s.push({ name: l.name, fields: c });
845
+ });
846
+ const n = t.fieldsGroup.flatMap((l) => l.keys), a = e.filter((l) => !n.includes(l.fieldKey));
847
+ return a.length && s.push({ name: "未分组字段", fields: a }), s;
848
+ }
849
+ }
850
+ const Yt = { class: "page-container" }, Jt = { class: "page-body" }, Xt = { class: "form-card" }, Qt = { class: "form-fields-vertical" }, Zt = { class: "form-fields" }, en = {
812
851
  key: 0,
813
852
  class: "form-content"
814
- }, Jt = { class: "page-footer" }, Xt = { class: "action-container" }, Qt = { class: "action-buttons" }, Zt = /* @__PURE__ */ F({
853
+ }, tn = { class: "page-footer" }, nn = { class: "action-container" }, an = { class: "action-buttons" }, on = /* @__PURE__ */ R({
815
854
  __name: "CreateView",
816
855
  props: {
817
856
  className: {}
818
857
  },
819
858
  setup(e) {
820
- const t = pe(), s = me(), n = fe(), a = $e(), c = he("dataWidgets"), l = ue(), d = e, o = y({
859
+ const t = pe(), s = me(), n = fe(), a = xe(), l = he("dataWidgets"), c = ue(), d = e, o = V({
821
860
  pageType: "",
822
861
  fields: {},
823
862
  globalValidations: [],
@@ -825,116 +864,128 @@ const Rt = { class: "top-bar" }, Pt = { class: "banner-info" }, Bt = { class: "p
825
864
  title: "",
826
865
  subTitle: ""
827
866
  }
828
- }), r = y([]), w = y({});
867
+ }), r = V([]), w = V({});
829
868
  function p(m) {
830
- return m ? Object.entries(m).map(([i, u]) => ({
869
+ return m ? Object.entries(m).map(([i, v]) => ({
831
870
  fieldKey: i,
832
- ...u
833
- })).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !G.value.includes(i.fieldKey)) : [];
871
+ ...v
872
+ })).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !z.value.includes(i.fieldKey)) : [];
834
873
  }
835
- function b(m) {
836
- return m ? Object.entries(m).filter(([i, u]) => u.dependent).reduce((i, [u, f]) => (i[u] = f.dependent, i), {}) : [];
874
+ function h(m) {
875
+ return m ? Object.entries(m).filter(([i, v]) => v.dependent).reduce((i, [v, u]) => (i[v] = u.dependent, i), {}) : [];
837
876
  }
838
- const _ = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), C = Se({}), $ = y(!1);
839
- Y(async () => {
840
- $.value = !0, o.value = await de(te.Create, d.className, {
877
+ const S = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), _ = Se({}), x = V(!1);
878
+ Q(async () => {
879
+ x.value = !0, o.value = await de(ne.Create, d.className, {
841
880
  svrStore: s,
842
881
  bpmStore: t
843
- }), r.value = p(o.value.fields), w.value = b(o.value.fields);
882
+ }), r.value = p(o.value.fields), w.value = h(o.value.fields), console.log("🚀 ~ _dependent.value:", w.value);
844
883
  for (const m in o.value.fields) {
845
884
  if (o.value.fields[m].widget?.widget === "File") {
846
885
  const g = r.value.find((i) => i.fieldKey === m);
847
886
  g && g.widget && (g.widget.files = []);
848
887
  }
849
- C[m] = o.value.fields[m].modelValue;
888
+ _[m] = o.value.fields[m].modelValue;
850
889
  }
851
- $.value = !1;
890
+ x.value = !1;
852
891
  });
853
- function E() {
892
+ function D() {
854
893
  return s()?.userInfo?.email_address ?? "";
855
894
  }
856
- async function J(m, g, i) {
895
+ async function j(m, g, i) {
857
896
  switch (m) {
858
- case B.Submit:
859
- let u = !0;
860
- if (c.value?.forEach((U) => {
861
- U?.validate && (U.validate() || (u = !1));
862
- }), !u) {
863
- l?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
897
+ case E.Submit:
898
+ let v = !0;
899
+ if (l.value?.forEach((C) => {
900
+ C?.validate && (C.validate() || (v = !1));
901
+ }), !v) {
902
+ c?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
864
903
  return;
865
904
  }
866
- const f = await ut(d.className, { ...C, ...w.value }, g);
867
- c.value?.forEach((U) => {
868
- U?.submit && U.submit(f.toString());
869
- }), l?.appContext.config.globalProperties.$notification.success("创建成功!"), n.push({ name: "List", params: { className: d.className } });
905
+ const u = await pt(d.className, { ..._, ...w.value }, g);
906
+ l.value?.forEach((C) => {
907
+ C?.submit && C.submit(u.toString());
908
+ }), c?.appContext.config.globalProperties.$notification.success("创建成功!"), n.push({ name: "List", params: { className: d.className } });
870
909
  break;
871
- case B.Link:
910
+ case E.Link:
872
911
  i === "List" && n.push({ name: "List", params: { className: d.className } });
873
912
  break;
874
913
  default:
875
914
  console.warn("Unknown action type:", m);
876
915
  }
877
916
  }
878
- const G = y([
917
+ const z = V([
879
918
  "jobScpope",
880
919
  "currentWorkdayId",
881
920
  "originalGrade",
882
921
  "jobTitlePrevious",
883
922
  "positionId"
884
923
  ]);
885
- function I(m, g) {
886
- a[m]?.(g, G), o.value && (r.value = p(o.value.fields));
924
+ function Z(m, g) {
925
+ a[m]?.(g, z), o.value && (r.value = p(o.value.fields));
887
926
  }
927
+ const T = P(() => (console.log("🚀 ~ _fields.value:", r.value), Ie(r.value)));
888
928
  return (m, g) => {
889
- const i = x("a-spin");
890
- return v(), S("div", Ot, [
891
- T(ge, {
929
+ const i = I("a-card"), v = I("a-spin");
930
+ return f(), k("div", Yt, [
931
+ U(ge, {
892
932
  title: o.value.banner.title,
893
933
  subTitle: o.value.banner.subTitle,
894
- email: E()
934
+ email: D()
895
935
  }, null, 8, ["title", "subTitle", "email"]),
896
- h("div", Wt, [
897
- T(i, {
898
- loading: $.value,
936
+ b("div", Jt, [
937
+ U(v, {
938
+ loading: x.value,
899
939
  class: "form-container"
900
940
  }, {
901
941
  default: N(() => [
902
- h("div", Gt, [
903
- h("div", qt, [
904
- (v(!0), S(H, null, z(r.value, (u, f) => (v(), S("div", {
905
- key: u.fieldKey,
906
- class: "form-field-wrapper"
907
- }, [
908
- T(Ve, {
909
- ref_for: !0,
910
- ref: "dataWidgets",
911
- "field-key": u.fieldKey,
912
- config: u,
913
- "class-name": m.className,
914
- modelValue: C[u.fieldKey],
915
- "onUpdate:modelValue": (U) => C[u.fieldKey] = U,
916
- class: "form-field",
917
- onChange: I
918
- }, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"])
919
- ]))), 128))
942
+ b("div", Xt, [
943
+ b("div", Qt, [
944
+ (f(!0), k(M, null, B(T.value, (u) => (f(), A(i, {
945
+ key: u.name,
946
+ title: u.name,
947
+ style: { "margin-bottom": "24px" }
948
+ }, {
949
+ default: N(() => [
950
+ b("div", Zt, [
951
+ (f(!0), k(M, null, B(u.fields, (C) => (f(), k("div", {
952
+ key: C.fieldKey,
953
+ class: "form-field-wrapper"
954
+ }, [
955
+ U($e, {
956
+ ref_for: !0,
957
+ ref: "dataWidgets",
958
+ "field-key": C.fieldKey,
959
+ config: C,
960
+ "class-name": m.className,
961
+ modelValue: _[C.fieldKey],
962
+ "onUpdate:modelValue": (H) => _[C.fieldKey] = H,
963
+ class: "form-field",
964
+ onChange: Z
965
+ }, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"])
966
+ ]))), 128))
967
+ ])
968
+ ]),
969
+ _: 2
970
+ }, 1032, ["title"]))), 128))
920
971
  ]),
921
- m.$slots.content ? (v(), S("div", Yt, [
922
- q(m.$slots, "content", {}, void 0, !0)
923
- ])) : ee("", !0)
972
+ m.$slots.content ? (f(), k("div", en, [
973
+ X(m.$slots, "content", {}, void 0, !0)
974
+ ])) : te("", !0)
924
975
  ])
925
976
  ]),
926
977
  _: 3
927
978
  }, 8, ["loading"])
928
979
  ]),
929
- h("div", Jt, [
930
- h("div", Xt, [
931
- q(m.$slots, "action", {}, void 0, !0),
932
- h("div", Qt, [
933
- (v(!0), S(H, null, z(_.value, (u) => (v(), L(le, {
980
+ b("div", tn, [
981
+ b("div", nn, [
982
+ X(m.$slots, "action", {}, void 0, !0),
983
+ b("div", an, [
984
+ (f(!0), k(M, null, B(S.value, (u) => (f(), A(le, {
934
985
  key: u.Title,
935
986
  config: u,
936
987
  class: "action-button",
937
- onClick: J
988
+ onClick: j
938
989
  }, null, 8, ["config"]))), 128))
939
990
  ])
940
991
  ])
@@ -942,17 +993,17 @@ const Rt = { class: "top-bar" }, Pt = { class: "banner-info" }, Bt = { class: "p
942
993
  ]);
943
994
  };
944
995
  }
945
- }), en = /* @__PURE__ */ oe(Zt, [["__scopeId", "data-v-f1623a65"]]), tn = { class: "page-container" }, nn = { class: "page-body" }, an = { class: "form-card" }, on = { class: "form-fields" }, sn = {
996
+ }), sn = /* @__PURE__ */ se(on, [["__scopeId", "data-v-d779a8dd"]]), rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { class: "form-card" }, un = { class: "form-fields-vertical" }, dn = { class: "form-fields" }, fn = {
946
997
  key: 0,
947
998
  class: "form-content"
948
- }, rn = { class: "page-footer" }, ln = { class: "action-container" }, cn = { class: "action-buttons" }, un = /* @__PURE__ */ F({
999
+ }, pn = { class: "page-footer" }, mn = { class: "action-container" }, gn = { class: "action-buttons" }, vn = /* @__PURE__ */ R({
949
1000
  __name: "UpdateView",
950
1001
  props: {
951
1002
  className: {},
952
1003
  workflowId: {}
953
1004
  },
954
1005
  setup(e) {
955
- const t = fe(), s = $e(), n = me(), a = pe(), c = he("dataWidgets"), l = ue(), d = e, o = y({
1006
+ const t = fe(), s = xe(), n = me(), a = pe(), l = he("dataWidgets"), c = ue(), d = e, o = V({
956
1007
  pageType: "",
957
1008
  fields: {},
958
1009
  globalValidations: [],
@@ -960,123 +1011,134 @@ const Rt = { class: "top-bar" }, Pt = { class: "banner-info" }, Bt = { class: "p
960
1011
  title: "",
961
1012
  subTitle: ""
962
1013
  }
963
- }), r = y([]), w = y({});
1014
+ }), r = V([]), w = V({});
964
1015
  function p(m) {
965
- return m ? Object.entries(m).map(([i, u]) => ({
1016
+ return m ? Object.entries(m).map(([i, v]) => ({
966
1017
  fieldKey: i,
967
- ...u
968
- })).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !G.value.includes(i.fieldKey)) : [];
1018
+ ...v
1019
+ })).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !z.value.includes(i.fieldKey)) : [];
969
1020
  }
970
- function b(m) {
971
- return m ? Object.entries(m).filter(([i, u]) => u.dependent).reduce((i, [u, f]) => (i[u] = f.dependent, i), {}) : [];
1021
+ function h(m) {
1022
+ return m ? Object.entries(m).filter(([i, v]) => v.dependent).reduce((i, [v, u]) => (i[v] = u.dependent, i), {}) : [];
972
1023
  }
973
- const _ = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), C = Se({}), $ = y(!1);
974
- Y(async () => {
975
- $.value = !0, o.value = await de(te.Update, d.className, {
1024
+ const S = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), _ = Se({}), x = V(!1);
1025
+ Q(async () => {
1026
+ x.value = !0, o.value = await de(ne.Update, d.className, {
976
1027
  svrStore: n,
977
1028
  bpmStore: a
978
1029
  }, {
979
1030
  workflowId: d.workflowId
980
1031
  });
981
- const m = await Fe(te.Update, d.className, { workflowId: d.workflowId, email: E() }), g = await De(d.className, d.workflowId);
1032
+ const m = await De(ne.Update, d.className, { workflowId: d.workflowId, email: D() }), g = await He(d.className, d.workflowId);
982
1033
  o.value.actions = o.value.actions?.filter((i) => {
983
- const u = m.find((f) => f.button === i.title);
984
- return u ? u.isShow : !0;
985
- }), r.value = p(o.value.fields), w.value = b(o.value.fields);
1034
+ const v = m.find((u) => u.button === i.title);
1035
+ return v ? v.isShow : !0;
1036
+ }), r.value = p(o.value.fields), w.value = h(o.value.fields);
986
1037
  for (const i in o.value.fields) {
987
1038
  if (o.value.fields[i].widget?.widget === "File") {
988
- const u = r.value.find((f) => f.fieldKey === i);
989
- u && u.widget && (u.widget.files = g[i] ?? []);
1039
+ const v = r.value.find((u) => u.fieldKey === i);
1040
+ v && v.widget && (v.widget.files = g[i] ?? [], v.widget.removeFile = (u) => Ct(d.className, u));
990
1041
  }
991
- C[i] = o.value.fields[i].modelValue;
1042
+ _[i] = o.value.fields[i].modelValue;
992
1043
  }
993
- $.value = !1;
1044
+ x.value = !1;
994
1045
  });
995
- function E() {
1046
+ function D() {
996
1047
  return n()?.userInfo?.email_address ?? "";
997
1048
  }
998
- async function J(m, g, i) {
1049
+ async function j(m, g, i) {
999
1050
  switch (m) {
1000
- case B.Submit:
1001
- let u = !0;
1002
- if (c.value?.forEach((f) => {
1003
- f?.validate && (f.validate() || (u = !1));
1004
- }), !u) {
1005
- l?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
1051
+ case E.Submit:
1052
+ let v = !0;
1053
+ if (l.value?.forEach((u) => {
1054
+ u?.validate && (u.validate() || (v = !1));
1055
+ }), !v) {
1056
+ c?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
1006
1057
  return;
1007
1058
  }
1008
- await dt(d.className, d.workflowId, { ...C, ...w.value }, g), c.value?.forEach((f) => {
1009
- f?.submit && f.submit(d.workflowId);
1010
- }), l?.appContext.config.globalProperties.$notification.success("修改成功!"), t.push({ name: "List", params: { className: d.className } });
1059
+ await mt(d.className, d.workflowId, { ..._, ...w.value }, g), l.value?.forEach((u) => {
1060
+ u?.submit && u.submit(d.workflowId);
1061
+ }), c?.appContext.config.globalProperties.$notification.success("修改成功!"), t.push({ name: "List", params: { className: d.className } });
1011
1062
  break;
1012
- case B.Link:
1063
+ case E.Link:
1013
1064
  t.push({ name: i, params: { className: d.className } });
1014
1065
  break;
1015
1066
  default:
1016
1067
  console.warn("Unknown action type:", m);
1017
1068
  }
1018
1069
  }
1019
- const G = y([
1070
+ const z = V([
1020
1071
  "jobScpope",
1021
1072
  "currentWorkdayId",
1022
1073
  "originalGrade",
1023
1074
  "jobTitlePrevious",
1024
1075
  "positionId"
1025
1076
  ]);
1026
- function I(m, g) {
1027
- s[m]?.(g, G), o.value && (r.value = p(o.value.fields));
1077
+ function Z(m, g) {
1078
+ s[m]?.(g, z), o.value && (r.value = p(o.value.fields));
1028
1079
  }
1080
+ const T = P(() => Ie(r.value));
1029
1081
  return (m, g) => {
1030
- const i = x("a-spin");
1031
- return v(), S("div", tn, [
1032
- T(ge, {
1082
+ const i = I("a-card"), v = I("a-spin");
1083
+ return f(), k("div", rn, [
1084
+ U(ge, {
1033
1085
  title: o.value.banner.title,
1034
1086
  subTitle: o.value.banner.subTitle,
1035
- email: E()
1087
+ email: D()
1036
1088
  }, null, 8, ["title", "subTitle", "email"]),
1037
- h("div", nn, [
1038
- T(i, {
1039
- loading: $.value,
1089
+ b("div", ln, [
1090
+ U(v, {
1091
+ loading: x.value,
1040
1092
  class: "form-container"
1041
1093
  }, {
1042
1094
  default: N(() => [
1043
- h("div", an, [
1044
- h("div", on, [
1045
- (v(!0), S(H, null, z(r.value, (u, f) => (v(), S("div", {
1046
- key: u.fieldKey,
1047
- class: "form-field-wrapper"
1048
- }, [
1049
- T(Ve, {
1050
- ref_for: !0,
1051
- ref: "dataWidgets",
1052
- "field-key": u.fieldKey,
1053
- name: f,
1054
- config: u,
1055
- "class-name": m.className,
1056
- modelValue: C[u.fieldKey],
1057
- "onUpdate:modelValue": (U) => C[u.fieldKey] = U,
1058
- class: "form-field",
1059
- onChange: I
1060
- }, null, 8, ["field-key", "name", "config", "class-name", "modelValue", "onUpdate:modelValue"])
1061
- ]))), 128))
1095
+ b("div", cn, [
1096
+ b("div", un, [
1097
+ (f(!0), k(M, null, B(T.value, (u) => (f(), A(i, {
1098
+ key: u.name,
1099
+ title: u.name,
1100
+ style: { "margin-bottom": "24px" }
1101
+ }, {
1102
+ default: N(() => [
1103
+ b("div", dn, [
1104
+ (f(!0), k(M, null, B(u.fields, (C) => (f(), k("div", {
1105
+ key: C.fieldKey,
1106
+ class: "form-field-wrapper"
1107
+ }, [
1108
+ U($e, {
1109
+ ref_for: !0,
1110
+ ref: "dataWidgets",
1111
+ "field-key": C.fieldKey,
1112
+ config: C,
1113
+ "class-name": m.className,
1114
+ modelValue: _[C.fieldKey],
1115
+ "onUpdate:modelValue": (H) => _[C.fieldKey] = H,
1116
+ class: "form-field",
1117
+ onChange: Z
1118
+ }, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"])
1119
+ ]))), 128))
1120
+ ])
1121
+ ]),
1122
+ _: 2
1123
+ }, 1032, ["title"]))), 128))
1062
1124
  ]),
1063
- m.$slots.content ? (v(), S("div", sn, [
1064
- q(m.$slots, "content", {}, void 0, !0)
1065
- ])) : ee("", !0)
1125
+ m.$slots.content ? (f(), k("div", fn, [
1126
+ X(m.$slots, "content", {}, void 0, !0)
1127
+ ])) : te("", !0)
1066
1128
  ])
1067
1129
  ]),
1068
1130
  _: 3
1069
1131
  }, 8, ["loading"])
1070
1132
  ]),
1071
- h("div", rn, [
1072
- h("div", ln, [
1073
- q(m.$slots, "action", {}, void 0, !0),
1074
- h("div", cn, [
1075
- (v(!0), S(H, null, z(_.value, (u) => (v(), L(le, {
1133
+ b("div", pn, [
1134
+ b("div", mn, [
1135
+ X(m.$slots, "action", {}, void 0, !0),
1136
+ b("div", gn, [
1137
+ (f(!0), k(M, null, B(S.value, (u) => (f(), A(le, {
1076
1138
  key: u.Title,
1077
1139
  config: u,
1078
1140
  class: "action-button",
1079
- onClick: J
1141
+ onClick: j
1080
1142
  }, null, 8, ["config"]))), 128))
1081
1143
  ])
1082
1144
  ])
@@ -1084,24 +1146,24 @@ const Rt = { class: "top-bar" }, Pt = { class: "banner-info" }, Bt = { class: "p
1084
1146
  ]);
1085
1147
  };
1086
1148
  }
1087
- }), dn = /* @__PURE__ */ oe(un, [["__scopeId", "data-v-62e39bd4"]]), ze = Symbol("library-custom-comp");
1088
- function fn() {
1089
- return ne(ze, null);
1149
+ }), _n = /* @__PURE__ */ se(vn, [["__scopeId", "data-v-9691be85"]]), Ee = Symbol("library-custom-comp");
1150
+ function wn() {
1151
+ return ae(Ee, null);
1090
1152
  }
1091
- const pn = Symbol("ArcoConfigProvider"), mn = "arco", gn = "$arco", vn = (e) => {
1153
+ const yn = Symbol("ArcoConfigProvider"), bn = "arco", hn = "$arco", kn = (e) => {
1092
1154
  var t, s, n;
1093
- const a = ue(), c = ne(pn, void 0);
1094
- return `${(n = (s = c?.prefixCls) != null ? s : (t = a?.appContext.config.globalProperties[gn]) == null ? void 0 : t.classPrefix) != null ? n : mn}-${e}`;
1095
- }, _n = Object.prototype.toString;
1096
- function wn(e) {
1097
- return _n.call(e) === "[object Number]" && e === e;
1155
+ const a = ue(), l = ae(yn, void 0);
1156
+ return `${(n = (s = l?.prefixCls) != null ? s : (t = a?.appContext.config.globalProperties[hn]) == null ? void 0 : t.classPrefix) != null ? n : bn}-${e}`;
1157
+ }, Sn = Object.prototype.toString;
1158
+ function Cn(e) {
1159
+ return Sn.call(e) === "[object Number]" && e === e;
1098
1160
  }
1099
- var bn = (e, t) => {
1161
+ var Vn = (e, t) => {
1100
1162
  for (const [s, n] of t)
1101
1163
  e[s] = n;
1102
1164
  return e;
1103
1165
  };
1104
- const yn = F({
1166
+ const $n = R({
1105
1167
  name: "IconDownload",
1106
1168
  props: {
1107
1169
  size: {
@@ -1128,56 +1190,56 @@ const yn = F({
1128
1190
  click: (e) => !0
1129
1191
  },
1130
1192
  setup(e, { emit: t }) {
1131
- const s = vn("icon"), n = P(() => [s, `${s}-download`, { [`${s}-spin`]: e.spin }]), a = P(() => {
1132
- const l = {};
1133
- return e.size && (l.fontSize = wn(e.size) ? `${e.size}px` : e.size), e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
1193
+ const s = kn("icon"), n = P(() => [s, `${s}-download`, { [`${s}-spin`]: e.spin }]), a = P(() => {
1194
+ const c = {};
1195
+ return e.size && (c.fontSize = Cn(e.size) ? `${e.size}px` : e.size), e.rotate && (c.transform = `rotate(${e.rotate}deg)`), c;
1134
1196
  });
1135
1197
  return {
1136
1198
  cls: n,
1137
1199
  innerStyle: a,
1138
- onClick: (l) => {
1139
- t("click", l);
1200
+ onClick: (c) => {
1201
+ t("click", c);
1140
1202
  }
1141
1203
  };
1142
1204
  }
1143
- }), hn = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1144
- function kn(e, t, s, n, a, c) {
1145
- return v(), S("svg", {
1205
+ }), xn = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1206
+ function In(e, t, s, n, a, l) {
1207
+ return f(), k("svg", {
1146
1208
  viewBox: "0 0 48 48",
1147
1209
  fill: "none",
1148
1210
  xmlns: "http://www.w3.org/2000/svg",
1149
1211
  stroke: "currentColor",
1150
- class: Je(e.cls),
1151
- style: Ye(e.innerStyle),
1212
+ class: Xe(e.cls),
1213
+ style: Je(e.innerStyle),
1152
1214
  "stroke-width": e.strokeWidth,
1153
1215
  "stroke-linecap": e.strokeLinecap,
1154
1216
  "stroke-linejoin": e.strokeLinejoin,
1155
- onClick: t[0] || (t[0] = (...l) => e.onClick && e.onClick(...l))
1217
+ onClick: t[0] || (t[0] = (...c) => e.onClick && e.onClick(...c))
1156
1218
  }, t[1] || (t[1] = [
1157
- h("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
1158
- ]), 14, hn);
1219
+ b("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
1220
+ ]), 14, xn);
1159
1221
  }
1160
- var be = /* @__PURE__ */ bn(yn, [["render", kn]]);
1161
- const Sn = Object.assign(be, {
1222
+ var ye = /* @__PURE__ */ Vn($n, [["render", In]]);
1223
+ const Nn = Object.assign(ye, {
1162
1224
  install: (e, t) => {
1163
1225
  var s;
1164
1226
  const n = (s = t?.iconPrefix) != null ? s : "";
1165
- e.component(n + be.name, be);
1227
+ e.component(n + ye.name, ye);
1166
1228
  }
1167
- }), Cn = { class: "page-container" }, Vn = { class: "page-body" }, $n = { class: "detail-card" }, In = { class: "detail-fields" }, xn = { class: "detail-field" }, Tn = { class: "field-label" }, Nn = {
1229
+ }), Tn = { class: "page-container" }, Un = { class: "page-body" }, An = { class: "detail-card" }, Ln = { class: "form-fields-vertical" }, Fn = { class: "detail-fields" }, Mn = { class: "detail-field" }, Rn = { class: "field-label" }, Dn = {
1168
1230
  key: 1,
1169
1231
  class: "field-value"
1170
- }, Un = {
1232
+ }, Hn = {
1171
1233
  key: 0,
1172
1234
  class: "detail-content"
1173
- }, An = { class: "page-footer" }, Ln = { class: "action-container" }, Mn = { class: "action-buttons" }, Fn = /* @__PURE__ */ F({
1235
+ }, Pn = { class: "page-footer" }, Bn = { class: "action-container" }, Kn = { class: "action-buttons" }, zn = /* @__PURE__ */ R({
1174
1236
  __name: "DetailView",
1175
1237
  props: {
1176
1238
  className: {},
1177
1239
  workflowId: {}
1178
1240
  },
1179
1241
  setup(e) {
1180
- const t = me(), s = pe(), n = $e(), a = fe(), c = fn(), l = ue(), d = e, o = y({
1242
+ const t = me(), s = pe(), n = xe(), a = fe(), l = wn(), c = ue(), d = e, o = V({
1181
1243
  pageType: "",
1182
1244
  fields: {},
1183
1245
  globalValidations: [],
@@ -1185,17 +1247,17 @@ const Sn = Object.assign(be, {
1185
1247
  title: "",
1186
1248
  subTitle: ""
1187
1249
  }
1188
- }), r = y([]);
1189
- function w(I) {
1190
- return I ? Object.entries(I).map(([g, i]) => (typeof i.modelValue == "boolean" ? i.fieldValue = i.modelValue ? "Yes" : "No" : i.fieldValue = i.modelValue, {
1250
+ }), r = V([]);
1251
+ function w(T) {
1252
+ return T ? Object.entries(T).map(([g, i]) => (typeof i.modelValue == "boolean" ? i.fieldValue = i.modelValue ? "Yes" : "No" : i.fieldValue = i.modelValue, {
1191
1253
  fieldKey: g,
1192
1254
  ...i
1193
1255
  })).filter((g) => g.widget && g.widget.widget !== "Hidden") : [];
1194
1256
  }
1195
- const p = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), b = y(!0), _ = (I, m = "yyyy-MM-dd hh:mm:ss.fff") => {
1196
- const g = new Date(I);
1257
+ const p = P(() => Ie(r.value)), h = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), S = V(!0), _ = (T, m = "yyyy-MM-dd hh:mm:ss.fff") => {
1258
+ const g = new Date(T);
1197
1259
  if (isNaN(g.getTime()))
1198
- return I;
1260
+ return T;
1199
1261
  const i = {
1200
1262
  yyyy: g.getFullYear(),
1201
1263
  yy: g.getFullYear().toString().substring(2),
@@ -1212,14 +1274,14 @@ const Sn = Object.assign(be, {
1212
1274
  fff: g.getMilliseconds().toString().padStart(3, "0"),
1213
1275
  f: g.getMilliseconds()
1214
1276
  };
1215
- let u = m;
1216
- for (const f of Object.keys(i))
1217
- u = u.replace(f, i[f]);
1218
- return u;
1219
- }, C = (I, m) => {
1220
- const g = I.findIndex((i) => i.isCurrent);
1221
- return I.map((i, u) => {
1222
- const f = {
1277
+ let v = m;
1278
+ for (const u of Object.keys(i))
1279
+ v = v.replace(u, i[u]);
1280
+ return v;
1281
+ }, x = (T, m) => {
1282
+ const g = T.findIndex((i) => i.isCurrent);
1283
+ return T.map((i, v) => {
1284
+ const u = {
1223
1285
  id: i.id,
1224
1286
  title: "",
1225
1287
  proxy: "",
@@ -1228,136 +1290,147 @@ const Sn = Object.assign(be, {
1228
1290
  status: 1,
1229
1291
  time: ""
1230
1292
  };
1231
- f.title = i.workflowProcessApprovers[0]?.name;
1232
- const U = i.workflowProcessApprovers[i.workflowProcessApprovers.length - 1], Q = i.workflowHistorys[i.workflowHistorys.length - 1], se = Q?.workflowHistoryApprovers[Q?.workflowHistoryApprovers?.length - 1];
1233
- if (U && se && U?.email?.toLowerCase() !== se?.approverEmail?.toLowerCase() && (f.title = `${se.name}`, f.proxy = `代理: ${U.name}`), i.sort > 1 ? f.sub = "审批角色:" + i.nodeName.replace("Submit", "").replace("Approve", "") : f.sub = "提交申请", i.isCurrent && m !== -1)
1234
- f.desc = "审批中", f.status = 1;
1293
+ u.title = i.workflowProcessApprovers[0]?.name;
1294
+ const C = i.workflowProcessApprovers[i.workflowProcessApprovers.length - 1], H = i.workflowHistorys[i.workflowHistorys.length - 1], Y = H?.workflowHistoryApprovers[H?.workflowHistoryApprovers?.length - 1];
1295
+ if (C && Y && C?.email?.toLowerCase() !== Y?.approverEmail?.toLowerCase() && (u.title = `${Y.name}`, u.proxy = `代理: ${C.name}`), i.sort > 1 ? u.sub = "审批角色:" + i.nodeName.replace("Submit", "").replace("Approve", "") : u.sub = "提交申请", i.isCurrent && m !== -1)
1296
+ u.desc = "审批中", u.status = 1;
1235
1297
  else {
1236
- const R = i.workflowHistorys[i.workflowHistorys.length - 1];
1237
- if (R && R.status === 100)
1238
- f.time = _(R.takeActionAt, "yyyy-MM-dd hh:mm:ss"), f.status = 2, f.desc = "已审批";
1239
- else if (R && R.status === 999)
1240
- f.time = _(R.takeActionAt, "yyyy-MM-dd hh:mm:ss"), f.status = 0, f.desc = "已跳过";
1241
- else if (R)
1242
- if (f.time = _(R.takeActionAt, "yyyy-MM-dd hh:mm:ss"), i.sort === 1)
1243
- f.status = 2, f.desc = "";
1298
+ const y = i.workflowHistorys[i.workflowHistorys.length - 1];
1299
+ if (y && y.status === 100)
1300
+ u.time = _(y.takeActionAt, "yyyy-MM-dd hh:mm:ss"), u.status = 2, u.desc = "已审批";
1301
+ else if (y && y.status === 999)
1302
+ u.time = _(y.takeActionAt, "yyyy-MM-dd hh:mm:ss"), u.status = 0, u.desc = "已跳过";
1303
+ else if (y)
1304
+ if (u.time = _(y.takeActionAt, "yyyy-MM-dd hh:mm:ss"), i.sort === 1)
1305
+ u.status = 2, u.desc = "";
1244
1306
  else {
1245
- const k = R.workflowHistoryApprovers[0];
1246
- f.status = 3, f.desc = k?.reason ? `拒绝原因:${k.reason}` : "已拒绝";
1307
+ const $ = y.workflowHistoryApprovers[0];
1308
+ u.status = 3, u.desc = $?.reason ? `拒绝原因:${$.reason}` : "已拒绝";
1247
1309
  }
1248
- else u < g || g === -1 ? (f.status = 0, f.desc = "已跳过") : (f.status = 0, f.desc = "待审批");
1249
- R && R.status;
1310
+ else v < g || g === -1 ? (u.status = 0, u.desc = "已跳过") : (u.status = 0, u.desc = "待审批");
1311
+ y && y.status;
1250
1312
  }
1251
- return f;
1313
+ return u;
1252
1314
  });
1253
- }, $ = y([]), E = y(!1);
1254
- Y(async () => {
1255
- b.value = !0, o.value = await de(te.Details, d.className, {
1315
+ }, D = V([]), j = V(!1);
1316
+ Q(async () => {
1317
+ S.value = !0, o.value = await de(ne.Details, d.className, {
1256
1318
  svrStore: t,
1257
1319
  bpmStore: s
1258
1320
  }, {
1259
1321
  workflowId: d.workflowId
1260
1322
  });
1261
- const I = await Fe(te.Details, d.className, { workflowId: d.workflowId, email: X() }), m = await De(d.className, d.workflowId);
1323
+ const T = await De(ne.Details, d.className, { workflowId: d.workflowId, email: z() }), m = await He(d.className, d.workflowId);
1262
1324
  o.value.actions = o.value.actions?.filter((i) => {
1263
- const u = I.find((f) => f.button === i.title);
1264
- return u ? u.isShow : !0;
1265
- }), E.value = I.find((i) => i.button === "IsGlobal")?.isShow ?? !1, r.value = w(o.value.fields);
1325
+ const v = T.find((u) => u.button === i.title);
1326
+ return v ? v.isShow : !0;
1327
+ }), j.value = T.find((i) => i.button === "IsGlobal")?.isShow ?? !1, r.value = w(o.value.fields);
1266
1328
  for (const i in o.value.fields)
1267
1329
  if (o.value.fields[i].widget?.widget === "File") {
1268
- const u = r.value.find((f) => f.fieldKey === i);
1269
- u && u.widget && (u.widget.files = m[i] ?? []);
1330
+ const v = r.value.find((u) => u.fieldKey === i);
1331
+ v && v.widget && (v.widget.files = m[i] ?? []);
1270
1332
  }
1271
- const g = await bt(d.className, d.workflowId);
1272
- $.value = C(g, 0), b.value = !1;
1333
+ const g = await kt(d.className, d.workflowId);
1334
+ D.value = x(g, 0), S.value = !1;
1273
1335
  });
1274
- async function J(I, m) {
1275
- return n[I]?.(m);
1336
+ async function J(T, m) {
1337
+ return n[T]?.(m);
1276
1338
  }
1277
- function X() {
1339
+ function z() {
1278
1340
  return t()?.userInfo?.email_address ?? "";
1279
1341
  }
1280
- async function G(I, m, g, i) {
1342
+ async function Z(T, m, g, i) {
1281
1343
  try {
1282
- switch (I) {
1283
- case B.Submit:
1284
- const { reason: u, ifGlobal: f } = await J(i, { isGlobal: E.value }), U = i === "Approve" ? "100" : "-1";
1285
- await _t(d.className, d.workflowId, X(), u, [Number(d.workflowId)], m, U, f);
1286
- const Q = i === "Approve" ? "审批已通过!" : "审批已拒绝!";
1287
- l?.appContext.config.globalProperties.$notification.success(Q), a.push({ name: "List", params: { className: d.className } });
1344
+ switch (T) {
1345
+ case E.Submit:
1346
+ const { reason: v, ifGlobal: u } = await J(i, { isGlobal: j.value }), C = i === "Approve" ? "100" : "-1";
1347
+ await bt(d.className, d.workflowId, z(), v, [Number(d.workflowId)], m, C, u);
1348
+ const H = i === "Approve" ? "审批已通过!" : "审批已拒绝!";
1349
+ c?.appContext.config.globalProperties.$notification.success(H), a.push({ name: "List", params: { className: d.className } });
1288
1350
  break;
1289
- case B.Link:
1351
+ case E.Link:
1290
1352
  g === "List" && a.push({ name: "List", params: { className: d.className } });
1291
1353
  break;
1292
1354
  default:
1293
- console.warn("Unknown action type:", I);
1355
+ console.warn("Unknown action type:", T);
1294
1356
  }
1295
1357
  } catch {
1296
1358
  }
1297
1359
  }
1298
- return (I, m) => {
1299
- const g = x("a-link"), i = x("a-space"), u = x("a-spin");
1300
- return v(), S("div", Cn, [
1301
- T(ge, {
1360
+ return (T, m) => {
1361
+ const g = I("a-link"), i = I("a-space"), v = I("a-card"), u = I("a-spin");
1362
+ return f(), k("div", Tn, [
1363
+ U(ge, {
1302
1364
  title: o.value.banner.title,
1303
1365
  subTitle: o.value.banner.subTitle,
1304
- email: X()
1366
+ email: z()
1305
1367
  }, null, 8, ["title", "subTitle", "email"]),
1306
- h("div", Vn, [
1307
- T(u, {
1308
- loading: b.value,
1368
+ b("div", Un, [
1369
+ U(u, {
1370
+ loading: S.value,
1309
1371
  class: "detail-container"
1310
1372
  }, {
1311
1373
  default: N(() => [
1312
- h("div", $n, [
1313
- (v(), L(ke(Ie(c).Steps), { steps: $.value }, null, 8, ["steps"])),
1314
- h("div", In, [
1315
- (v(!0), S(H, null, z(r.value, (f) => (v(), S("div", {
1316
- key: f.fieldKey,
1317
- class: "detail-field-wrapper"
1318
- }, [
1319
- h("div", xn, [
1320
- h("div", Tn, j(f.widget?.title), 1),
1321
- f.widget?.widget === "File" ? (v(!0), S(H, { key: 0 }, z(f.widget.files, (U) => (v(), S("div", {
1322
- class: "field-value",
1323
- key: U.id
1324
- }, [
1325
- T(i, null, {
1326
- default: N(() => [
1327
- Z(j(U.name), 1),
1328
- T(g, {
1329
- href: U.url,
1330
- target: "_blank"
1331
- }, {
1332
- default: N(() => [
1333
- T(Ie(Sn), { style: { color: "#7A00E6" } })
1334
- ]),
1335
- _: 2
1336
- }, 1032, ["href"])
1337
- ]),
1338
- _: 2
1339
- }, 1024)
1340
- ]))), 128)) : (v(), S("div", Nn, j(f.fieldValue), 1))
1341
- ])
1342
- ]))), 128))
1374
+ b("div", An, [
1375
+ (f(), A(ke(Ne(l).Steps), { steps: D.value }, null, 8, ["steps"])),
1376
+ b("div", Ln, [
1377
+ (f(!0), k(M, null, B(p.value, (C) => (f(), A(v, {
1378
+ key: C.name,
1379
+ title: C.name,
1380
+ style: { "margin-bottom": "24px" }
1381
+ }, {
1382
+ default: N(() => [
1383
+ b("div", Fn, [
1384
+ (f(!0), k(M, null, B(C.fields, (H) => (f(), k("div", {
1385
+ key: H.fieldKey,
1386
+ class: "detail-field-wrapper"
1387
+ }, [
1388
+ b("div", Mn, [
1389
+ b("div", Rn, W(H.widget?.title), 1),
1390
+ H.widget?.widget === "File" ? (f(!0), k(M, { key: 0 }, B(H.widget.files, (Y) => (f(), k("div", {
1391
+ class: "field-value",
1392
+ key: Y.id
1393
+ }, [
1394
+ U(i, null, {
1395
+ default: N(() => [
1396
+ ee(W(Y.name) + " ", 1),
1397
+ U(g, {
1398
+ href: Y.url,
1399
+ target: "_blank"
1400
+ }, {
1401
+ default: N(() => [
1402
+ U(Ne(Nn), { style: { color: "#7A00E6" } })
1403
+ ]),
1404
+ _: 2
1405
+ }, 1032, ["href"])
1406
+ ]),
1407
+ _: 2
1408
+ }, 1024)
1409
+ ]))), 128)) : (f(), k("div", Dn, W(H.fieldValue), 1))
1410
+ ])
1411
+ ]))), 128))
1412
+ ])
1413
+ ]),
1414
+ _: 2
1415
+ }, 1032, ["title"]))), 128))
1343
1416
  ]),
1344
- I.$slots.content ? (v(), S("div", Un, [
1345
- q(I.$slots, "content", {}, void 0, !0)
1346
- ])) : ee("", !0)
1417
+ T.$slots.content ? (f(), k("div", Hn, [
1418
+ X(T.$slots, "content", {}, void 0, !0)
1419
+ ])) : te("", !0)
1347
1420
  ])
1348
1421
  ]),
1349
1422
  _: 3
1350
1423
  }, 8, ["loading"])
1351
1424
  ]),
1352
- h("div", An, [
1353
- h("div", Ln, [
1354
- q(I.$slots, "action", {}, void 0, !0),
1355
- h("div", Mn, [
1356
- (v(!0), S(H, null, z(p.value, (f) => (v(), L(le, {
1357
- key: f.Title,
1358
- config: f,
1425
+ b("div", Pn, [
1426
+ b("div", Bn, [
1427
+ X(T.$slots, "action", {}, void 0, !0),
1428
+ b("div", Kn, [
1429
+ (f(!0), k(M, null, B(h.value, (C) => (f(), A(le, {
1430
+ key: C.Title,
1431
+ config: C,
1359
1432
  class: "action-button",
1360
- onClick: G
1433
+ onClick: Z
1361
1434
  }, null, 8, ["config"]))), 128))
1362
1435
  ])
1363
1436
  ])
@@ -1365,14 +1438,14 @@ const Sn = Object.assign(be, {
1365
1438
  ]);
1366
1439
  };
1367
1440
  }
1368
- }), Dn = /* @__PURE__ */ oe(Fn, [["__scopeId", "data-v-7604f8d3"]]), Hn = { class: "list-container" }, Rn = { class: "query-title" }, Pn = { class: "field-wrapper" }, Bn = /* @__PURE__ */ F({
1441
+ }), En = /* @__PURE__ */ se(zn, [["__scopeId", "data-v-5a5b22de"]]), On = { class: "list-container" }, jn = { class: "query-title" }, Gn = { class: "field-wrapper" }, Wn = /* @__PURE__ */ R({
1369
1442
  name: "ListView",
1370
1443
  __name: "ListView",
1371
1444
  props: {
1372
1445
  className: {}
1373
1446
  },
1374
1447
  setup(e) {
1375
- const t = me(), s = pe(), n = fe(), a = e, c = y(), l = Se({
1448
+ const t = me(), s = pe(), n = fe(), a = e, l = V(), c = Se({
1376
1449
  current: 1,
1377
1450
  total: 0,
1378
1451
  pageSize: 10,
@@ -1382,15 +1455,15 @@ const Sn = Object.assign(be, {
1382
1455
  filters: []
1383
1456
  });
1384
1457
  function d() {
1385
- const k = Object.entries(u.value).filter(([, V]) => V && V !== "").map(([V, A]) => ({
1386
- key: V,
1387
- value: A
1458
+ const y = Object.entries(i.value).filter(([, $]) => $ && $ !== "").map(([$, L]) => ({
1459
+ key: $,
1460
+ value: L
1388
1461
  // operator: 'like' // 根据实际需要调整操作符
1389
1462
  }));
1390
1463
  return {
1391
- pageNumber: l.current,
1392
- pageSize: l.pageSize,
1393
- filters: [...l.filters, ...k],
1464
+ pageNumber: c.current,
1465
+ pageSize: c.pageSize,
1466
+ filters: [...c.filters, ...y],
1394
1467
  sorts: [{
1395
1468
  key: "status",
1396
1469
  type: 0
@@ -1401,11 +1474,11 @@ const Sn = Object.assign(be, {
1401
1474
  x: p.value.length * 150 + 250
1402
1475
  // 只设置横向滚动
1403
1476
  // 移除 y 属性,让表格高度自适应
1404
- })), r = (k) => {
1405
- const V = Object.entries(k).filter(([, A]) => A.widget?.column).map(([A, K], re) => ({
1406
- title: K.widget.title,
1407
- dataIndex: A.charAt(0).toLowerCase() + A.slice(1),
1408
- order: K.order,
1477
+ })), r = (y) => {
1478
+ const $ = Object.entries(y).filter(([, L]) => L.widget?.column).map(([L, G], re) => ({
1479
+ title: G.widget.title,
1480
+ dataIndex: L.charAt(0).toLowerCase() + L.slice(1),
1481
+ order: G.order,
1409
1482
  ellipsis: !0,
1410
1483
  tooltip: !0,
1411
1484
  width: 150,
@@ -1413,8 +1486,8 @@ const Sn = Object.assign(be, {
1413
1486
  // 启用最小宽度
1414
1487
  resizable: !0
1415
1488
  // 启用列宽调整
1416
- })).sort((A, K) => A.order - K.order);
1417
- V.push({
1489
+ })).sort((L, G) => L.order - G.order);
1490
+ $.push({
1418
1491
  title: "Actions",
1419
1492
  slotName: "optional",
1420
1493
  align: "center",
@@ -1422,139 +1495,139 @@ const Sn = Object.assign(be, {
1422
1495
  minWidth: 200,
1423
1496
  fixed: "right",
1424
1497
  resizable: !1
1425
- }), p.value = V;
1426
- }, w = y([]), p = y([]), b = y(!0), _ = y(!0), C = y(), $ = async () => {
1427
- _.value = !0;
1428
- const k = await ct(a.className, d());
1429
- w.value = k.data, l.total = k.totalCount, _.value = !1;
1430
- }, E = y(!1);
1431
- Y(async () => {
1432
- b.value = !0, c.value = await de(3, a.className, {
1498
+ }), p.value = $;
1499
+ }, w = V([]), p = V([]), h = V(!0), S = V(!0), _ = V(), x = async () => {
1500
+ S.value = !0;
1501
+ const y = await ft(a.className, d());
1502
+ w.value = y.data, c.total = y.totalCount, S.value = !1;
1503
+ }, D = V(!1);
1504
+ Q(async () => {
1505
+ h.value = !0, l.value = await de(3, a.className, {
1433
1506
  svrStore: t,
1434
1507
  bpmStore: s
1435
- }), r(c.value.fields), U(c.value.fields), i(c.value?.tabs?.[0]?.key || ""), C.value = c.value.actions, b.value = !1, E.value = !0;
1436
- }), Xe(() => {
1437
- E.value && $();
1508
+ }), r(l.value.fields), u(l.value.fields), g(l.value?.tabs?.[0]?.key || ""), _.value = l.value.actions, h.value = !1, D.value = !0;
1509
+ }), Qe(() => {
1510
+ D.value && x();
1438
1511
  });
1439
- const J = (k) => {
1440
- l.current = k, $();
1441
- }, X = (k) => {
1442
- l.pageSize = k, $();
1512
+ const j = (y) => {
1513
+ c.current = y, x();
1514
+ }, J = (y) => {
1515
+ c.pageSize = y, x();
1443
1516
  };
1444
- function G(k, V, A, K, re) {
1445
- switch (k) {
1446
- case B.Link:
1447
- n.push({ name: A, params: { workflowId: re } });
1517
+ function z(y, $, L, G, re) {
1518
+ switch (y) {
1519
+ case E.Link:
1520
+ n.push({ name: L, params: { workflowId: re } });
1448
1521
  break;
1449
1522
  default:
1450
- console.warn("Unknown action type:", k);
1523
+ console.warn("Unknown action type:", y);
1451
1524
  }
1452
1525
  }
1453
- function I(k, V, A) {
1454
- switch (k) {
1455
- case B.Link:
1456
- n.push({ name: A });
1526
+ function Z(y, $, L) {
1527
+ switch (y) {
1528
+ case E.Link:
1529
+ n.push({ name: L });
1457
1530
  break;
1458
1531
  default:
1459
- console.warn("Unknown action type:", k);
1532
+ console.warn("Unknown action type:", y);
1460
1533
  }
1461
1534
  }
1462
- function m() {
1535
+ function T() {
1463
1536
  return t()?.userInfo?.email_address ?? "";
1464
1537
  }
1465
- function g(k, V) {
1466
- return k.replace(/{currentUserEmail}/g, V);
1538
+ function m(y, $) {
1539
+ return y.replace(/{currentUserEmail}/g, $);
1467
1540
  }
1468
- function i(k) {
1469
- const V = c.value?.tabs?.find((A) => A.key === k)?.filters;
1470
- l.filters = V?.map((A) => ({
1471
- ...A,
1472
- value: g(A.value, m())
1473
- })) || [], $();
1541
+ function g(y) {
1542
+ const $ = l.value?.tabs?.find((L) => L.key === y)?.filters;
1543
+ c.filters = $?.map((L) => ({
1544
+ ...L,
1545
+ value: m(L.value, T())
1546
+ })) || [], x();
1474
1547
  }
1475
- const u = y({}), f = P(() => c.value?.fields ? Object.entries(c.value.fields).filter(([, k]) => k.isFiltered) : []), U = (k) => {
1476
- const V = {};
1477
- Object.entries(k).forEach(([A, K]) => {
1478
- V[A] = K.modelValue;
1479
- }), u.value = V;
1480
- }, Q = () => {
1481
- l.current = 1, $();
1482
- }, se = () => {
1483
- c.value && U(c.value.fields), Q();
1548
+ const i = V({}), v = P(() => l.value?.fields ? Object.entries(l.value.fields).filter(([, y]) => y.isFiltered) : []), u = (y) => {
1549
+ const $ = {};
1550
+ Object.entries(y).forEach(([L, G]) => {
1551
+ $[L] = G.modelValue;
1552
+ }), i.value = $;
1553
+ }, C = () => {
1554
+ c.current = 1, x();
1555
+ }, H = () => {
1556
+ l.value && u(l.value.fields), C();
1484
1557
  };
1485
- function R(k, V) {
1486
- return !(k.location !== "InTable" || k.title === "Update" && (V.status === 100 || V.status === -1));
1558
+ function Y(y, $) {
1559
+ return !(y.location !== "InTable" || y.title === "Update" && ($.status === 100 || $.status === -1));
1487
1560
  }
1488
- return (k, V) => {
1489
- const A = x("a-col"), K = x("a-button"), re = x("a-space"), Ke = x("a-row"), je = x("a-card"), Oe = x("a-tab-pane"), We = x("a-tabs"), Ge = x("a-table");
1490
- return v(), S("div", Hn, [
1491
- T(ge, {
1492
- title: c.value?.banner.title ?? "",
1493
- subTitle: c.value?.banner.subTitle ?? "",
1494
- email: m()
1561
+ return (y, $) => {
1562
+ const L = I("a-col"), G = I("a-button"), re = I("a-space"), Oe = I("a-row"), je = I("a-card"), Ge = I("a-tab-pane"), We = I("a-tabs"), qe = I("a-table");
1563
+ return f(), k("div", On, [
1564
+ U(ge, {
1565
+ title: l.value?.banner.title ?? "",
1566
+ subTitle: l.value?.banner.subTitle ?? "",
1567
+ email: T()
1495
1568
  }, null, 8, ["title", "subTitle", "email"]),
1496
- T(je, null, {
1569
+ U(je, null, {
1497
1570
  default: N(() => [
1498
- h("div", Rn, [
1499
- V[0] || (V[0] = h("h3", null, "查询条件", -1)),
1500
- h("div", null, [
1501
- (v(!0), S(H, null, z(C.value, (D) => (v(), S(H, {
1502
- key: D.title
1571
+ b("div", jn, [
1572
+ $[0] || ($[0] = b("h3", null, "查询条件", -1)),
1573
+ b("div", null, [
1574
+ (f(!0), k(M, null, B(_.value, (K) => (f(), k(M, {
1575
+ key: K.title
1503
1576
  }, [
1504
- D.location === "InOperation" ? (v(), L(le, {
1577
+ K.location === "InOperation" ? (f(), A(le, {
1505
1578
  key: 0,
1506
- config: D,
1507
- onClick: I
1508
- }, null, 8, ["config"])) : ee("", !0)
1579
+ config: K,
1580
+ onClick: Z
1581
+ }, null, 8, ["config"])) : te("", !0)
1509
1582
  ], 64))), 128))
1510
1583
  ])
1511
1584
  ]),
1512
- T(Ke, {
1585
+ U(Oe, {
1513
1586
  gutter: [24, 20],
1514
1587
  class: "search-row"
1515
1588
  }, {
1516
1589
  default: N(() => [
1517
- (v(!0), S(H, null, z(f.value, ([D, ie]) => (v(), L(A, {
1518
- key: D,
1590
+ (f(!0), k(M, null, B(v.value, ([K, ie]) => (f(), A(L, {
1591
+ key: K,
1519
1592
  span: 6,
1520
1593
  class: "search-col"
1521
1594
  }, {
1522
1595
  default: N(() => [
1523
- T(Ve, {
1524
- name: D,
1596
+ U($e, {
1597
+ name: K,
1525
1598
  config: ie,
1526
- modelValue: u.value[D],
1527
- "onUpdate:modelValue": (ve) => u.value[D] = ve,
1599
+ modelValue: i.value[K],
1600
+ "onUpdate:modelValue": (ve) => i.value[K] = ve,
1528
1601
  class: "form-field"
1529
1602
  }, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
1530
1603
  ]),
1531
1604
  _: 2
1532
1605
  }, 1024))), 128)),
1533
- T(A, {
1606
+ U(L, {
1534
1607
  span: 6,
1535
1608
  class: "search-col"
1536
1609
  }, {
1537
1610
  default: N(() => [
1538
- h("div", Pn, [
1539
- T(re, { size: "medium" }, {
1611
+ b("div", Gn, [
1612
+ U(re, { size: "medium" }, {
1540
1613
  default: N(() => [
1541
- T(K, {
1614
+ U(G, {
1542
1615
  type: "primary",
1543
1616
  size: "medium",
1544
- onClick: Q
1617
+ onClick: C
1545
1618
  }, {
1546
- default: N(() => V[1] || (V[1] = [
1547
- Z(" 查询 ", -1)
1619
+ default: N(() => $[1] || ($[1] = [
1620
+ ee(" 查询 ", -1)
1548
1621
  ])),
1549
1622
  _: 1,
1550
1623
  __: [1]
1551
1624
  }),
1552
- T(K, {
1625
+ U(G, {
1553
1626
  size: "medium",
1554
- onClick: se
1627
+ onClick: H
1555
1628
  }, {
1556
- default: N(() => V[2] || (V[2] = [
1557
- Z(" 重置 ", -1)
1629
+ default: N(() => $[2] || ($[2] = [
1630
+ ee(" 重置 ", -1)
1558
1631
  ])),
1559
1632
  _: 1,
1560
1633
  __: [2]
@@ -1572,50 +1645,50 @@ const Sn = Object.assign(be, {
1572
1645
  ]),
1573
1646
  _: 1
1574
1647
  }),
1575
- T(We, {
1648
+ U(We, {
1576
1649
  size: "large",
1577
- onTabClick: i
1650
+ onTabClick: g
1578
1651
  }, {
1579
1652
  default: N(() => [
1580
- (v(!0), S(H, null, z(c.value?.tabs, (D) => (v(), L(Oe, {
1581
- key: D.key,
1582
- title: D.title
1653
+ (f(!0), k(M, null, B(l.value?.tabs, (K) => (f(), A(Ge, {
1654
+ key: K.key,
1655
+ title: K.title
1583
1656
  }, null, 8, ["title"]))), 128))
1584
1657
  ]),
1585
1658
  _: 1
1586
1659
  }),
1587
- T(Ge, {
1660
+ U(qe, {
1588
1661
  columns: p.value,
1589
1662
  data: w.value,
1590
1663
  stripe: "",
1591
1664
  border: "",
1592
1665
  pagination: {
1593
- current: l.current,
1594
- total: l.total,
1595
- pageSize: l.pageSize,
1596
- showTotal: l.showTotal,
1597
- showPageSize: l.showPageSize,
1666
+ current: c.current,
1667
+ total: c.total,
1668
+ pageSize: c.pageSize,
1669
+ showTotal: c.showTotal,
1670
+ showPageSize: c.showPageSize,
1598
1671
  showJumper: !0,
1599
1672
  pageSizeOptions: [10, 20, 50, 100]
1600
1673
  },
1601
- loading: _.value,
1674
+ loading: S.value,
1602
1675
  size: "medium",
1603
1676
  scroll: o.value,
1604
- onPageChange: J,
1605
- onPageSizeChange: X
1677
+ onPageChange: j,
1678
+ onPageSizeChange: J
1606
1679
  }, {
1607
- optional: N(({ record: D }) => [
1608
- T(re, { size: "small" }, {
1680
+ optional: N(({ record: K }) => [
1681
+ U(re, { size: "small" }, {
1609
1682
  default: N(() => [
1610
- (v(!0), S(H, null, z(C.value, (ie) => (v(), S(H, {
1683
+ (f(!0), k(M, null, B(_.value, (ie) => (f(), k(M, {
1611
1684
  key: ie.title
1612
1685
  }, [
1613
- R(ie, D) ? (v(), L(le, {
1686
+ Y(ie, K) ? (f(), A(le, {
1614
1687
  key: 0,
1615
1688
  config: ie,
1616
1689
  size: "small",
1617
- onClick: (...ve) => G(...ve, D.workflowId)
1618
- }, null, 8, ["config", "onClick"])) : ee("", !0)
1690
+ onClick: (...ve) => z(...ve, K.workflowId)
1691
+ }, null, 8, ["config", "onClick"])) : te("", !0)
1619
1692
  ], 64))), 128))
1620
1693
  ]),
1621
1694
  _: 2
@@ -1626,28 +1699,18 @@ const Sn = Object.assign(be, {
1626
1699
  ]);
1627
1700
  };
1628
1701
  }
1629
- }), zn = /* @__PURE__ */ oe(Bn, [["__scopeId", "data-v-477f539f"]]);
1630
- let ye = {};
1631
- function En(e) {
1632
- ye = { ...ye, ...e };
1633
- }
1634
- function Ee() {
1635
- return ye;
1636
- }
1637
- const Gn = {
1702
+ }), qn = /* @__PURE__ */ se(Wn, [["__scopeId", "data-v-477f539f"]]), ea = {
1638
1703
  install(e, t = {}) {
1639
- t.config && En(t.config), t.router && e.provide(He, t.router), t.pinia && e.provide(Ht, t.pinia), t.useBpmStore && e.provide(Pe, t.useBpmStore), t.useSvrStore && e.provide(Be, t.useSvrStore), t.triggers && e.provide(Re, t.triggers), t.customComps && e.provide(ze, t.customComps), e.component("CreateView", en), e.component("UpdateView", dn), e.component("DetailView", Dn), e.component("ListView", zn);
1704
+ t.config && rt(t.config), t.router && e.provide(Pe, t.router), t.pinia && e.provide(Kt, t.pinia), t.useBpmStore && e.provide(Ke, t.useBpmStore), t.useSvrStore && e.provide(ze, t.useSvrStore), t.triggers && e.provide(Be, t.triggers), t.customComps && e.provide(Ee, t.customComps), e.component("CreateView", sn), e.component("UpdateView", _n), e.component("DetailView", En), e.component("ListView", qn);
1640
1705
  }
1641
1706
  };
1642
1707
  export {
1643
- en as CreateView,
1644
- Dn as DetailView,
1645
- zn as ListView,
1646
- Ht as PiniaKey,
1647
- He as RouterKey,
1648
- dn as UpdateView,
1649
- Gn as default,
1650
- Ee as getLibraryConfig,
1651
- En as setLibraryConfig
1708
+ sn as CreateView,
1709
+ En as DetailView,
1710
+ qn as ListView,
1711
+ Kt as PiniaKey,
1712
+ Pe as RouterKey,
1713
+ _n as UpdateView,
1714
+ ea as default
1652
1715
  };
1653
1716
  //# sourceMappingURL=index.es.js.map