@chase-shao/vue-component-lib 1.2.72 → 1.2.74

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