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