@chase-shao/vue-component-lib 1.2.71 → 1.2.73

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