@chase-shao/vue-component-lib 1.2.45 → 1.2.47

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