@chase-shao/vue-component-lib 1.2.38 → 1.2.39

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