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

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