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