@chase-shao/vue-component-lib 1.2.57 → 1.2.58

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