@chase-shao/vue-component-lib 1.2.105 → 1.2.107
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 +12 -12
- package/dist/components/data-gen/views/DetailView.vue.d.ts +12 -12
- package/dist/components/data-gen/views/UpdateView.vue.d.ts +12 -12
- package/dist/components/data-gen/widgets/CheckBox.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/FileUpload.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/InputNumber.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/InputText.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/TextArea.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/index.vue.d.ts +5 -5
- package/dist/composables/useRouter.d.ts +1 -0
- 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 +562 -537
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/services/axios.d.ts +5 -0
- package/dist/stores/useLibraryMainStore.d.ts +4 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { ref as m, getCurrentInstance as
|
|
2
|
-
import
|
|
3
|
-
import { defineStore as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ref as m, getCurrentInstance as me, inject as ye, defineComponent as z, mergeModels as ce, useModel as Ce, resolveComponent as V, createBlock as D, openBlock as u, onMounted as ge, computed as K, withCtx as x, createElementBlock as _, Fragment as $, renderList as M, createVNode as R, nextTick as _t, createTextVNode as ae, normalizeStyle as Xe, normalizeClass as Ze, createElementVNode as y, createCommentVNode as re, toDisplayString as Q, useTemplateRef as Ae, resolveDynamicComponent as je, renderSlot as ue, reactive as vt, onActivated as bt } from "vue";
|
|
2
|
+
import yt from "axios";
|
|
3
|
+
import { defineStore as ht } from "pinia";
|
|
4
|
+
import { useRouter as wt } from "vue-router";
|
|
5
|
+
import { Modal as kt } from "@arco-design/web-vue";
|
|
6
|
+
const et = ht("main", () => {
|
|
7
|
+
const t = m(void 0), o = m(null);
|
|
8
|
+
return {
|
|
9
|
+
token: t,
|
|
10
|
+
error: o
|
|
11
|
+
};
|
|
12
|
+
}), Ct = async (t) => new Promise((o) => setTimeout(o, t)), St = async (t, o, n, e = void 0) => {
|
|
9
13
|
if (t[o] === void 0)
|
|
10
14
|
try {
|
|
11
15
|
t[o] = null, t[o] = await n() || e;
|
|
@@ -13,27 +17,27 @@ const wt = vt("main", () => ({
|
|
|
13
17
|
console.error(r), t[o] = void 0;
|
|
14
18
|
}
|
|
15
19
|
for (; t[o] === null; )
|
|
16
|
-
await
|
|
20
|
+
await Ct(100);
|
|
17
21
|
return t[o];
|
|
18
|
-
},
|
|
22
|
+
}, ke = (t) => {
|
|
19
23
|
const o = `0${t}`;
|
|
20
24
|
return o.substring(o.length - 2);
|
|
21
|
-
},
|
|
25
|
+
}, Ve = (t, o = "yyyy-MM-dd hh:mm:ss") => {
|
|
22
26
|
if (!t || typeof t == "string" && t.length === 0)
|
|
23
27
|
return "";
|
|
24
28
|
try {
|
|
25
29
|
const n = new Date(t), e = [
|
|
26
30
|
["yyyy", n.getFullYear()],
|
|
27
31
|
["yy", n.getFullYear().toString().substring(2)],
|
|
28
|
-
["MM",
|
|
32
|
+
["MM", ke(n.getMonth() + 1)],
|
|
29
33
|
["M", n.getMonth() + 1],
|
|
30
|
-
["dd",
|
|
34
|
+
["dd", ke(n.getDate())],
|
|
31
35
|
["d", n.getDate()],
|
|
32
|
-
["hh",
|
|
36
|
+
["hh", ke(n.getHours())],
|
|
33
37
|
["h", n.getHours()],
|
|
34
|
-
["mm",
|
|
38
|
+
["mm", ke(n.getMinutes())],
|
|
35
39
|
["m", n.getMinutes()],
|
|
36
|
-
["ss",
|
|
40
|
+
["ss", ke(n.getSeconds())],
|
|
37
41
|
["s", n.getSeconds()]
|
|
38
42
|
];
|
|
39
43
|
for (const [r, a] of e)
|
|
@@ -42,28 +46,42 @@ const wt = vt("main", () => ({
|
|
|
42
46
|
} catch {
|
|
43
47
|
return t.toLocaleString();
|
|
44
48
|
}
|
|
45
|
-
},
|
|
49
|
+
}, xt = (t, o) => {
|
|
46
50
|
let n;
|
|
47
51
|
t instanceof Blob ? n = t : n = new Blob([t]);
|
|
48
52
|
const e = document.createElement("a"), r = window.URL.createObjectURL(n);
|
|
49
53
|
e.href = r, e.download = o, e.click(), window.URL.revokeObjectURL(r);
|
|
50
54
|
};
|
|
51
55
|
let Oe = {};
|
|
52
|
-
function
|
|
56
|
+
function Vt(t) {
|
|
53
57
|
Oe = { ...Oe, ...t };
|
|
54
58
|
}
|
|
55
|
-
function
|
|
59
|
+
function Me() {
|
|
56
60
|
return Oe;
|
|
57
61
|
}
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
const tt = Symbol("library-router");
|
|
63
|
+
let $e = null;
|
|
64
|
+
function Tt(t) {
|
|
65
|
+
$e = t ?? null;
|
|
66
|
+
}
|
|
67
|
+
function ve() {
|
|
68
|
+
if (me()) {
|
|
69
|
+
const o = ye(tt, null);
|
|
70
|
+
return o || wt();
|
|
71
|
+
}
|
|
72
|
+
if ($e)
|
|
73
|
+
return $e;
|
|
74
|
+
throw new Error("Router is unavailable. Pass router when installing the plugin before using useLibraryRouter outside setup().");
|
|
75
|
+
}
|
|
76
|
+
const ot = me();
|
|
77
|
+
function nt() {
|
|
78
|
+
const t = Me();
|
|
61
79
|
return {
|
|
62
80
|
apiBase: t.apiBase || void 0 || "",
|
|
63
81
|
appSecret: t.appSecret || void 0 || ""
|
|
64
82
|
};
|
|
65
83
|
}
|
|
66
|
-
function
|
|
84
|
+
function At(t) {
|
|
67
85
|
if (!t?.data?.statusCode)
|
|
68
86
|
return t;
|
|
69
87
|
switch (t.data.statusCode) {
|
|
@@ -71,22 +89,35 @@ function Vt(t) {
|
|
|
71
89
|
return t.data.data = t.data.result, t.data;
|
|
72
90
|
case 0:
|
|
73
91
|
default:
|
|
74
|
-
return
|
|
92
|
+
return ot?.appContext.config.globalProperties.$notification.error(t.data.msg), null;
|
|
75
93
|
}
|
|
76
94
|
}
|
|
77
|
-
|
|
78
|
-
|
|
95
|
+
const It = (t) => {
|
|
96
|
+
if (t.response) {
|
|
97
|
+
if (t.response.status !== 400) {
|
|
98
|
+
if (t.response.status === 401)
|
|
99
|
+
ve().push("/error/401");
|
|
100
|
+
else if (t.response.status >= 500) {
|
|
101
|
+
const o = et();
|
|
102
|
+
o.error = t, ve().push("/error/500");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} else t.request ? console.error("error with request", t.request) : console.error("Error", t.message);
|
|
106
|
+
t.message.includes("timeout") && ot?.appContext.config.globalProperties.$notification.error("请求超时,请检查网络");
|
|
107
|
+
};
|
|
108
|
+
function at() {
|
|
109
|
+
const { apiBase: t } = nt(), o = yt.create({
|
|
79
110
|
baseURL: t,
|
|
80
111
|
timeout: 20 * 1e3,
|
|
81
112
|
// 20s
|
|
82
113
|
// headers: { 'Content-Type': 'application/json' },
|
|
83
114
|
withCredentials: !0
|
|
84
115
|
});
|
|
85
|
-
return o.interceptors.response.use(
|
|
116
|
+
return o.interceptors.response.use(At, It), o;
|
|
86
117
|
}
|
|
87
|
-
const
|
|
88
|
-
const { apiBase: t, appSecret: o } =
|
|
89
|
-
return await
|
|
118
|
+
const rt = async () => {
|
|
119
|
+
const { apiBase: t, appSecret: o } = nt(), n = at(), e = et();
|
|
120
|
+
return await St(e, "token", async () => {
|
|
90
121
|
const r = await n.post(`${t}/GenerateToken`, {
|
|
91
122
|
appid: "bpm",
|
|
92
123
|
appsecret: o
|
|
@@ -96,7 +127,7 @@ const tt = async () => {
|
|
|
96
127
|
}, (r.data?.expireSeconds ?? 3600) * 1e3), r?.data?.token;
|
|
97
128
|
});
|
|
98
129
|
}, q = async () => {
|
|
99
|
-
const t = await
|
|
130
|
+
const t = await rt(), o = at();
|
|
100
131
|
return o.defaults.headers.common.Authorization = `Bearer ${t}`, o;
|
|
101
132
|
}, De = {
|
|
102
133
|
CurrentUserEmail: (t) => t.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
|
|
@@ -108,31 +139,31 @@ const tt = async () => {
|
|
|
108
139
|
}, Y = [];
|
|
109
140
|
for (let t = 0; t < 256; ++t)
|
|
110
141
|
Y.push((t + 256).toString(16).slice(1));
|
|
111
|
-
function
|
|
142
|
+
function Pt(t, o = 0) {
|
|
112
143
|
return (Y[t[o + 0]] + Y[t[o + 1]] + Y[t[o + 2]] + Y[t[o + 3]] + "-" + Y[t[o + 4]] + Y[t[o + 5]] + "-" + Y[t[o + 6]] + Y[t[o + 7]] + "-" + Y[t[o + 8]] + Y[t[o + 9]] + "-" + Y[t[o + 10]] + Y[t[o + 11]] + Y[t[o + 12]] + Y[t[o + 13]] + Y[t[o + 14]] + Y[t[o + 15]]).toLowerCase();
|
|
113
144
|
}
|
|
114
145
|
let Be;
|
|
115
|
-
const
|
|
116
|
-
function
|
|
146
|
+
const Nt = new Uint8Array(16);
|
|
147
|
+
function Ft() {
|
|
117
148
|
if (!Be) {
|
|
118
149
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
119
150
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
120
151
|
Be = crypto.getRandomValues.bind(crypto);
|
|
121
152
|
}
|
|
122
|
-
return Be(
|
|
153
|
+
return Be(Nt);
|
|
123
154
|
}
|
|
124
|
-
const
|
|
125
|
-
function
|
|
126
|
-
if (
|
|
127
|
-
return
|
|
155
|
+
const Rt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ge = { randomUUID: Rt };
|
|
156
|
+
function st(t, o, n) {
|
|
157
|
+
if (Ge.randomUUID && !t)
|
|
158
|
+
return Ge.randomUUID();
|
|
128
159
|
t = t || {};
|
|
129
|
-
const e = t.random ?? t.rng?.() ??
|
|
160
|
+
const e = t.random ?? t.rng?.() ?? Ft();
|
|
130
161
|
if (e.length < 16)
|
|
131
162
|
throw new Error("Random bytes length must be >= 16");
|
|
132
|
-
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128,
|
|
163
|
+
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, Pt(e);
|
|
133
164
|
}
|
|
134
|
-
var X = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(X || {}),
|
|
135
|
-
function
|
|
165
|
+
var X = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(X || {}), be = /* @__PURE__ */ ((t) => (t[t.Create = 0] = "Create", t[t.Update = 1] = "Update", t[t.Details = 2] = "Details", t[t.List = 3] = "List", t[t.ReCreate = 5] = "ReCreate", t))(be || {});
|
|
166
|
+
function Ut(t, o, n) {
|
|
136
167
|
const e = {
|
|
137
168
|
pageType: "",
|
|
138
169
|
fields: {},
|
|
@@ -163,7 +194,7 @@ function Nt(t, o, n) {
|
|
|
163
194
|
const i = a.showToRoles.split(",").map((c) => c.trim()), l = n.bpmStore().employeeInfo.roleList.some((c) => i.includes(c.name)) || a.showToRoles === "";
|
|
164
195
|
if (a.widget === "Tab") {
|
|
165
196
|
e.tabs || (e.tabs = []), l && e.tabs.push({
|
|
166
|
-
key:
|
|
197
|
+
key: st(),
|
|
167
198
|
title: a.title,
|
|
168
199
|
filters: a.filters ? JSON.parse(a.filters) : [],
|
|
169
200
|
order: a.order
|
|
@@ -186,7 +217,7 @@ function Nt(t, o, n) {
|
|
|
186
217
|
eventName: a.eventName
|
|
187
218
|
});
|
|
188
219
|
}
|
|
189
|
-
} else a.attributeType === "Banner" && (e.banner.title = a.title, o === 0 || o === 5 ? e.banner.subTitle = a.subTitle : e.banner.subTitle =
|
|
220
|
+
} else a.attributeType === "Banner" && (e.banner.title = a.title, o === 0 || o === 5 ? e.banner.subTitle = a.subTitle : e.banner.subTitle = Ee(a.subTitle, t.workflowId.propertyValue));
|
|
190
221
|
}), e.tabs && (e.tabs = e.tabs.sort((a, i) => a.order - i.order));
|
|
191
222
|
const r = {
|
|
192
223
|
id: "",
|
|
@@ -235,11 +266,11 @@ function Nt(t, o, n) {
|
|
|
235
266
|
}), e.fields[a] = l;
|
|
236
267
|
}), e.pageFields = r, e;
|
|
237
268
|
}
|
|
238
|
-
const
|
|
269
|
+
const qe = async (t, o, n, e) => {
|
|
239
270
|
const a = await (await q()).get(`/General/${o}/${t}/page`, { params: e });
|
|
240
|
-
return
|
|
241
|
-
},
|
|
242
|
-
async function
|
|
271
|
+
return Ut(a?.data, t, n);
|
|
272
|
+
}, Dt = async (t, o, n) => (await (await q()).post(`/${o}/${t}/button/List`, null, { params: n }))?.data;
|
|
273
|
+
async function Bt(t, o) {
|
|
243
274
|
const e = await (await q()).post(`/General/${t}/list`, o);
|
|
244
275
|
return {
|
|
245
276
|
data: e.data.data,
|
|
@@ -259,109 +290,109 @@ async function Ut(t, o) {
|
|
|
259
290
|
// ),
|
|
260
291
|
};
|
|
261
292
|
}
|
|
262
|
-
async function
|
|
293
|
+
async function Lt(t, o, n) {
|
|
263
294
|
return (await (await q()).post(n, o, {
|
|
264
295
|
params: {
|
|
265
296
|
className: t
|
|
266
297
|
}
|
|
267
298
|
})).data;
|
|
268
299
|
}
|
|
269
|
-
async function
|
|
270
|
-
const r = await q(), a =
|
|
300
|
+
async function Ht(t, o, n, e) {
|
|
301
|
+
const r = await q(), a = Ee(e, o);
|
|
271
302
|
return (await r.put(a, n))?.data;
|
|
272
303
|
}
|
|
273
|
-
function
|
|
304
|
+
function Ee(t, o) {
|
|
274
305
|
return t.replace(/{WorkflowId}/g, encodeURIComponent(o));
|
|
275
306
|
}
|
|
276
|
-
function
|
|
307
|
+
function Ot(t, o) {
|
|
277
308
|
return t.replace(/{ApproverEmail}/g, encodeURIComponent(o));
|
|
278
309
|
}
|
|
279
|
-
function
|
|
310
|
+
function $t(t, o) {
|
|
280
311
|
return t.replace(/{WorkFlowReason}/g, encodeURIComponent(o));
|
|
281
312
|
}
|
|
282
|
-
function
|
|
313
|
+
function jt(t, o) {
|
|
283
314
|
return t.replace(/{Status}/g, o);
|
|
284
315
|
}
|
|
285
|
-
function
|
|
316
|
+
function Mt(t, o) {
|
|
286
317
|
return t.replace(/{IfTriggerGlobal_RandP_Approval}/g, o);
|
|
287
318
|
}
|
|
288
|
-
function
|
|
319
|
+
function Et(t, o) {
|
|
289
320
|
return t.replace(/{ClassName}/g, encodeURIComponent(o));
|
|
290
321
|
}
|
|
291
|
-
async function
|
|
322
|
+
async function Kt(t, o, n, e, r, a, i, l) {
|
|
292
323
|
const c = await q();
|
|
293
|
-
let s =
|
|
294
|
-
return s =
|
|
324
|
+
let s = Ee(r, o);
|
|
325
|
+
return s = Ot(s, n), s = $t(s, e), s = jt(s, a), s = Mt(s, i), s = Et(s, t), (await c.put(s, l))?.data;
|
|
295
326
|
}
|
|
296
|
-
async function
|
|
327
|
+
async function zt(t, o) {
|
|
297
328
|
const r = (await (await q()).get(t, { params: { value: o } }))?.data;
|
|
298
329
|
return Object.entries(r).map(([a, i]) => ({
|
|
299
330
|
value: a,
|
|
300
331
|
label: i
|
|
301
332
|
}));
|
|
302
333
|
}
|
|
303
|
-
async function
|
|
334
|
+
async function Wt(t, o) {
|
|
304
335
|
return (await (await q()).get(`/General/${t}/${o}/process`))?.data;
|
|
305
336
|
}
|
|
306
|
-
function
|
|
337
|
+
function Gt(t) {
|
|
307
338
|
return {
|
|
308
|
-
uid: t.id ??
|
|
339
|
+
uid: t.id ?? st(),
|
|
309
340
|
name: t.attachmentName ?? "unknown",
|
|
310
341
|
url: t.attachmentKey ?? ""
|
|
311
342
|
};
|
|
312
343
|
}
|
|
313
|
-
async function
|
|
344
|
+
async function qt(t, o) {
|
|
314
345
|
return (await (await q()).get(`/General/${t}/${o}/upload/get`))?.data.reduce((a, i) => {
|
|
315
346
|
const { category: l } = i;
|
|
316
|
-
return a[l] || (a[l] = []), a[l].push(
|
|
347
|
+
return a[l] || (a[l] = []), a[l].push(Gt(i)), a;
|
|
317
348
|
}, {});
|
|
318
349
|
}
|
|
319
|
-
async function
|
|
350
|
+
async function Yt(t, o) {
|
|
320
351
|
return (await q()).post(`/General/${t}/${o}/delete/attachment`);
|
|
321
352
|
}
|
|
322
|
-
async function
|
|
353
|
+
async function Qt() {
|
|
323
354
|
const o = await (await q()).get("/Grading/dropdown/approvers");
|
|
324
355
|
return Object.entries(o?.data).map(([n, e]) => ({
|
|
325
356
|
label: n,
|
|
326
357
|
value: e
|
|
327
358
|
}));
|
|
328
359
|
}
|
|
329
|
-
async function
|
|
360
|
+
async function Jt(t, o) {
|
|
330
361
|
return await (await q()).post(`Grading/AssignComments/${t}/${encodeURIComponent(o)}`);
|
|
331
362
|
}
|
|
332
|
-
async function
|
|
363
|
+
async function Xt(t, o, n) {
|
|
333
364
|
return await (await q()).post(`Grading/AddComments/${t}/${encodeURIComponent(o)}`, n, {
|
|
334
365
|
headers: { "Content-Type": "application/json;charset=UTF-8" }
|
|
335
366
|
});
|
|
336
367
|
}
|
|
337
|
-
async function
|
|
368
|
+
async function Zt(t) {
|
|
338
369
|
return (await (await q()).get(`Grading/GetComments/${t}`))?.data;
|
|
339
370
|
}
|
|
340
|
-
async function
|
|
371
|
+
async function eo(t) {
|
|
341
372
|
return (await (await q()).get(`Grading/GetAssociator/${t}`))?.data;
|
|
342
373
|
}
|
|
343
|
-
async function
|
|
374
|
+
async function to(t) {
|
|
344
375
|
return await (await q()).delete(`Grading/DeleteAssociator/${t}`);
|
|
345
376
|
}
|
|
346
|
-
async function
|
|
377
|
+
async function oo(t, o = null) {
|
|
347
378
|
const e = await (await q()).post(t, o, {
|
|
348
379
|
responseType: "blob"
|
|
349
380
|
});
|
|
350
|
-
|
|
381
|
+
xt(e?.data, "WorkflowData.xlsx");
|
|
351
382
|
}
|
|
352
|
-
const
|
|
383
|
+
const he = (t, o) => {
|
|
353
384
|
let n = "";
|
|
354
385
|
return { res: t.every((r) => {
|
|
355
|
-
const a =
|
|
386
|
+
const a = no(r, o);
|
|
356
387
|
return a || (n = r.errorMessage), a;
|
|
357
388
|
}), errorMessages: n };
|
|
358
|
-
},
|
|
389
|
+
}, no = (t, o) => {
|
|
359
390
|
const { ruleName: n, ruleParameter: e } = t;
|
|
360
|
-
return
|
|
361
|
-
},
|
|
391
|
+
return ao[n](e, o);
|
|
392
|
+
}, ao = {
|
|
362
393
|
Regex: (t, o) => new RegExp(t).test(o),
|
|
363
394
|
Required: (t, o) => !!o
|
|
364
|
-
},
|
|
395
|
+
}, ro = /* @__PURE__ */ z({
|
|
365
396
|
__name: "InputText",
|
|
366
397
|
props: /* @__PURE__ */ ce({
|
|
367
398
|
fieldKey: {},
|
|
@@ -376,7 +407,7 @@ const ye = (t, o) => {
|
|
|
376
407
|
}),
|
|
377
408
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
378
409
|
setup(t, { expose: o, emit: n }) {
|
|
379
|
-
const e = t, r = n, a =
|
|
410
|
+
const e = t, r = n, a = Ce(t, "modelValue"), i = (d) => he(e.validations, d), l = (d) => {
|
|
380
411
|
r("input", d);
|
|
381
412
|
}, c = (d) => {
|
|
382
413
|
const g = i(d);
|
|
@@ -399,7 +430,7 @@ const ye = (t, o) => {
|
|
|
399
430
|
n[e] = r;
|
|
400
431
|
return n;
|
|
401
432
|
};
|
|
402
|
-
function
|
|
433
|
+
function so(t, o, n, e, r, a) {
|
|
403
434
|
const i = V("AInput");
|
|
404
435
|
return u(), D(i, {
|
|
405
436
|
modelValue: e.model,
|
|
@@ -410,7 +441,7 @@ function no(t, o, n, e, r, a) {
|
|
|
410
441
|
onChange: e.changeHandler
|
|
411
442
|
}, null, 8, ["modelValue", "disabled"]);
|
|
412
443
|
}
|
|
413
|
-
const
|
|
444
|
+
const Ye = /* @__PURE__ */ J(ro, [["render", so], ["__file", "InputText.vue"]]), io = /* @__PURE__ */ z({
|
|
414
445
|
__name: "InputNumber",
|
|
415
446
|
props: /* @__PURE__ */ ce({
|
|
416
447
|
fieldKey: {},
|
|
@@ -425,13 +456,13 @@ const qe = /* @__PURE__ */ J(oo, [["render", no], ["__file", "InputText.vue"]]),
|
|
|
425
456
|
}),
|
|
426
457
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
427
458
|
setup(t, { expose: o, emit: n }) {
|
|
428
|
-
const e = t, r = n, a =
|
|
429
|
-
|
|
459
|
+
const e = t, r = n, a = Ce(t, "modelValue"), i = m(100), l = m(1);
|
|
460
|
+
ge(() => {
|
|
430
461
|
e.validations && e.validations.forEach((v) => {
|
|
431
462
|
v.ruleName === "Max" && (i.value = v.ruleParameter), v.ruleName === "Min" && (l.value = v.ruleParameter);
|
|
432
463
|
});
|
|
433
464
|
});
|
|
434
|
-
const c = (v) =>
|
|
465
|
+
const c = (v) => he(e.validations, v), s = (v) => {
|
|
435
466
|
r("input", v);
|
|
436
467
|
}, d = (v) => {
|
|
437
468
|
const b = c(v);
|
|
@@ -449,7 +480,7 @@ const qe = /* @__PURE__ */ J(oo, [["render", no], ["__file", "InputText.vue"]]),
|
|
|
449
480
|
return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
|
|
450
481
|
}
|
|
451
482
|
});
|
|
452
|
-
function
|
|
483
|
+
function lo(t, o, n, e, r, a) {
|
|
453
484
|
const i = V("AInputNumber");
|
|
454
485
|
return u(), D(i, {
|
|
455
486
|
modelValue: e.model,
|
|
@@ -461,7 +492,7 @@ function ro(t, o, n, e, r, a) {
|
|
|
461
492
|
onChange: e.changeHandler
|
|
462
493
|
}, null, 8, ["modelValue", "disabled", "min"]);
|
|
463
494
|
}
|
|
464
|
-
const
|
|
495
|
+
const co = /* @__PURE__ */ J(io, [["render", lo], ["__file", "InputNumber.vue"]]), uo = /* @__PURE__ */ z({
|
|
465
496
|
__name: "SelectList",
|
|
466
497
|
props: /* @__PURE__ */ ce({
|
|
467
498
|
fieldKey: {},
|
|
@@ -476,23 +507,23 @@ const so = /* @__PURE__ */ J(ao, [["render", ro], ["__file", "InputNumber.vue"]]
|
|
|
476
507
|
}),
|
|
477
508
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change"], ["update:modelValue"]),
|
|
478
509
|
setup(t, { expose: o, emit: n }) {
|
|
479
|
-
const e = t, r = n, a = m(!1), i = m(e.config.options ?? []), l =
|
|
510
|
+
const e = t, r = n, a = m(!1), i = m(e.config.options ?? []), l = Ce(t, "modelValue"), c = (b) => he(e.validations, b), s = K(() => {
|
|
480
511
|
const b = {};
|
|
481
512
|
return e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
|
|
482
513
|
b[f.event] = (p) => {
|
|
483
514
|
r(f.event, f.handlerName, p);
|
|
484
|
-
const
|
|
485
|
-
r("error",
|
|
515
|
+
const w = c(p);
|
|
516
|
+
r("error", w.res ? "" : w.errorMessages);
|
|
486
517
|
};
|
|
487
518
|
}), b;
|
|
488
519
|
}), d = async () => {
|
|
489
520
|
if (e.config.dataSourceProvider) {
|
|
490
|
-
i.value = await
|
|
521
|
+
i.value = await zt(e.config.dataSourceProvider);
|
|
491
522
|
const b = e.modelValue;
|
|
492
523
|
b != null && b !== "" && (i.value.some((p) => p.value === b) || r("update:modelValue", ""));
|
|
493
524
|
}
|
|
494
525
|
};
|
|
495
|
-
|
|
526
|
+
ge(d);
|
|
496
527
|
const g = (b) => {
|
|
497
528
|
r("update:modelValue", b);
|
|
498
529
|
const f = c(b);
|
|
@@ -510,7 +541,7 @@ const so = /* @__PURE__ */ J(ao, [["render", ro], ["__file", "InputNumber.vue"]]
|
|
|
510
541
|
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
511
542
|
}
|
|
512
543
|
});
|
|
513
|
-
function
|
|
544
|
+
function fo(t, o, n, e, r, a) {
|
|
514
545
|
const i = V("AOption"), l = V("ASelect");
|
|
515
546
|
return u(), D(l, {
|
|
516
547
|
"allow-clear": "",
|
|
@@ -523,7 +554,7 @@ function lo(t, o, n, e, r, a) {
|
|
|
523
554
|
onChange: e.changeHandler
|
|
524
555
|
}, {
|
|
525
556
|
default: x(() => [
|
|
526
|
-
(u(!0), _(
|
|
557
|
+
(u(!0), _($, null, M(e._options, (c) => (u(), D(i, {
|
|
527
558
|
key: c.value,
|
|
528
559
|
value: c.value,
|
|
529
560
|
label: c.label
|
|
@@ -532,7 +563,7 @@ function lo(t, o, n, e, r, a) {
|
|
|
532
563
|
_: 1
|
|
533
564
|
}, 8, ["modelValue", "loading", "disabled"]);
|
|
534
565
|
}
|
|
535
|
-
const
|
|
566
|
+
const Qe = /* @__PURE__ */ J(uo, [["render", fo], ["__file", "SelectList.vue"]]), po = /* @__PURE__ */ z({
|
|
536
567
|
__name: "Cascader",
|
|
537
568
|
props: {
|
|
538
569
|
modelValue: {},
|
|
@@ -543,7 +574,7 @@ const Ye = /* @__PURE__ */ J(io, [["render", lo], ["__file", "SelectList.vue"]])
|
|
|
543
574
|
const e = t, r = n, a = m(e.config.options ?? []), i = (s) => {
|
|
544
575
|
r("update:modelValue", s), r("change", s);
|
|
545
576
|
};
|
|
546
|
-
|
|
577
|
+
ge(async () => {
|
|
547
578
|
if (e.config) {
|
|
548
579
|
const s = e.config.dataSourceProvider;
|
|
549
580
|
if (s) {
|
|
@@ -562,14 +593,14 @@ const Ye = /* @__PURE__ */ J(io, [["render", lo], ["__file", "SelectList.vue"]])
|
|
|
562
593
|
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
563
594
|
}
|
|
564
595
|
});
|
|
565
|
-
function
|
|
596
|
+
function mo(t, o, n, e, r, a) {
|
|
566
597
|
const i = V("ACascader"), l = V("ASpace");
|
|
567
598
|
return u(), D(l, {
|
|
568
599
|
direction: "vertical",
|
|
569
600
|
size: "large"
|
|
570
601
|
}, {
|
|
571
602
|
default: x(() => [
|
|
572
|
-
|
|
603
|
+
R(i, {
|
|
573
604
|
"field-names": e.fieldNames,
|
|
574
605
|
"model-value": n.modelValue,
|
|
575
606
|
options: e._options,
|
|
@@ -581,7 +612,7 @@ function uo(t, o, n, e, r, a) {
|
|
|
581
612
|
_: 1
|
|
582
613
|
});
|
|
583
614
|
}
|
|
584
|
-
const
|
|
615
|
+
const go = /* @__PURE__ */ J(po, [["render", mo], ["__file", "Cascader.vue"]]), _o = /* @__PURE__ */ z({
|
|
585
616
|
__name: "FileUpload",
|
|
586
617
|
props: {
|
|
587
618
|
className: {},
|
|
@@ -594,14 +625,7 @@ const fo = /* @__PURE__ */ J(co, [["render", uo], ["__file", "Cascader.vue"]]),
|
|
|
594
625
|
},
|
|
595
626
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
596
627
|
setup(t, { expose: o, emit: n }) {
|
|
597
|
-
const e = t, r = n, a = m({});
|
|
598
|
-
fe(async () => {
|
|
599
|
-
const A = await tt();
|
|
600
|
-
a.value = {
|
|
601
|
-
Authorization: `Bearer ${A}`
|
|
602
|
-
};
|
|
603
|
-
});
|
|
604
|
-
const i = (A) => ye(e.validations, A), l = je(), c = l.apiBase, s = m(null), d = m("");
|
|
628
|
+
const e = t, r = n, a = m({}), i = (A) => he(e.validations, A), l = Me(), c = l.apiBase, s = m(null), d = m("");
|
|
605
629
|
function g(A, k, C) {
|
|
606
630
|
return A.replace(/{WorkflowId}/g, k).replace(/{ClassName}/g, C);
|
|
607
631
|
}
|
|
@@ -616,8 +640,8 @@ const fo = /* @__PURE__ */ J(co, [["render", uo], ["__file", "Cascader.vue"]]),
|
|
|
616
640
|
};
|
|
617
641
|
function f(A) {
|
|
618
642
|
const { file: k, name: C } = A, T = C ?? k.name;
|
|
619
|
-
return new Promise((S,
|
|
620
|
-
|
|
643
|
+
return new Promise((S, I) => {
|
|
644
|
+
kt.confirm({
|
|
621
645
|
title: "Confirm Delete",
|
|
622
646
|
content: `Are you sure you want to delete ${T}?`,
|
|
623
647
|
async onOk() {
|
|
@@ -625,22 +649,26 @@ const fo = /* @__PURE__ */ J(co, [["render", uo], ["__file", "Cascader.vue"]]),
|
|
|
625
649
|
return await e.config.removeFile(A.uid), S(!0);
|
|
626
650
|
S(!0);
|
|
627
651
|
},
|
|
628
|
-
onCancel: () =>
|
|
652
|
+
onCancel: () => I("cancel")
|
|
629
653
|
});
|
|
630
654
|
});
|
|
631
655
|
}
|
|
632
|
-
const p = m(null),
|
|
633
|
-
p.value && (p.value(A), p.value = null,
|
|
656
|
+
const p = m(null), w = m(null), Z = (A) => {
|
|
657
|
+
p.value && (p.value(A), p.value = null, w.value = null);
|
|
634
658
|
}, oe = (A) => {
|
|
635
|
-
|
|
659
|
+
w.value && (w.value(A), p.value = null, w.value = null);
|
|
636
660
|
}, E = m([]), ee = (A) => {
|
|
637
661
|
E.value = A.filter((k) => k.status === "init");
|
|
638
662
|
};
|
|
639
663
|
o({
|
|
640
664
|
submit(A) {
|
|
641
665
|
return new Promise((k, C) => {
|
|
642
|
-
s.value ? (e.config.uploadURL && (d.value = A), p.value = k,
|
|
643
|
-
|
|
666
|
+
s.value ? (e.config.uploadURL && (d.value = A), p.value = k, w.value = C, E.value.length ? rt().then((T) => {
|
|
667
|
+
a.value = {
|
|
668
|
+
Authorization: `Bearer ${T}`
|
|
669
|
+
}, _t(() => {
|
|
670
|
+
s.value?.submit();
|
|
671
|
+
});
|
|
644
672
|
}) : k(A)) : k(A);
|
|
645
673
|
});
|
|
646
674
|
},
|
|
@@ -649,11 +677,11 @@ const fo = /* @__PURE__ */ J(co, [["render", uo], ["__file", "Cascader.vue"]]),
|
|
|
649
677
|
return r("error", C.res ? "" : C.errorMessages), C.res;
|
|
650
678
|
}
|
|
651
679
|
});
|
|
652
|
-
const ne = { props: e, emits: r, headers: a, validate: i, config: l, ApiBase: c, uploadRef: s, id: d, replaceIdAndClassName: g, action: v, submit: b, onBeforeRemove: f, uploadPromiseResolve: p, uploadPromiseReject:
|
|
680
|
+
const ne = { props: e, emits: r, headers: a, validate: i, config: l, ApiBase: c, uploadRef: s, id: d, replaceIdAndClassName: g, action: v, submit: b, onBeforeRemove: f, uploadPromiseResolve: p, uploadPromiseReject: w, handleUploadSuccess: Z, handleUploadError: oe, readyFiles: E, onChange: ee };
|
|
653
681
|
return Object.defineProperty(ne, "__isScriptSetup", { enumerable: !1, value: !0 }), ne;
|
|
654
682
|
}
|
|
655
683
|
});
|
|
656
|
-
function
|
|
684
|
+
function vo(t, o, n, e, r, a) {
|
|
657
685
|
const i = V("a-button"), l = V("a-upload");
|
|
658
686
|
return u(), D(l, {
|
|
659
687
|
ref: "uploadRef",
|
|
@@ -670,7 +698,7 @@ function mo(t, o, n, e, r, a) {
|
|
|
670
698
|
}, {
|
|
671
699
|
"start-icon": x(() => o[0] || (o[0] = [])),
|
|
672
700
|
"upload-button": x(() => [
|
|
673
|
-
|
|
701
|
+
R(i, { type: "primary" }, {
|
|
674
702
|
default: x(() => o[1] || (o[1] = [
|
|
675
703
|
ae("Select File", -1)
|
|
676
704
|
])),
|
|
@@ -681,7 +709,7 @@ function mo(t, o, n, e, r, a) {
|
|
|
681
709
|
_: 1
|
|
682
710
|
}, 8, ["default-file-list", "action", "limit", "headers"]);
|
|
683
711
|
}
|
|
684
|
-
const
|
|
712
|
+
const bo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "FileUpload.vue"]]), yo = /* @__PURE__ */ z({
|
|
685
713
|
__name: "TextArea",
|
|
686
714
|
props: {
|
|
687
715
|
fieldKey: {},
|
|
@@ -693,7 +721,7 @@ const go = /* @__PURE__ */ J(po, [["render", mo], ["__file", "FileUpload.vue"]])
|
|
|
693
721
|
},
|
|
694
722
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
695
723
|
setup(t, { expose: o, emit: n }) {
|
|
696
|
-
const e = t, r = n, a = (s) =>
|
|
724
|
+
const e = t, r = n, a = (s) => he(e.validations, s), i = (s) => {
|
|
697
725
|
r("update:modelValue", s), r("input", s);
|
|
698
726
|
}, l = (s) => {
|
|
699
727
|
r("update:modelValue", s);
|
|
@@ -712,7 +740,7 @@ const go = /* @__PURE__ */ J(po, [["render", mo], ["__file", "FileUpload.vue"]])
|
|
|
712
740
|
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
713
741
|
}
|
|
714
742
|
});
|
|
715
|
-
function
|
|
743
|
+
function ho(t, o, n, e, r, a) {
|
|
716
744
|
const i = V("ATextarea");
|
|
717
745
|
return u(), D(i, {
|
|
718
746
|
"model-value": e.props.modelValue,
|
|
@@ -723,7 +751,7 @@ function vo(t, o, n, e, r, a) {
|
|
|
723
751
|
onChange: e.changeHandler
|
|
724
752
|
}, null, 8, ["model-value", "disabled"]);
|
|
725
753
|
}
|
|
726
|
-
const
|
|
754
|
+
const wo = /* @__PURE__ */ J(yo, [["render", ho], ["__file", "TextArea.vue"]]), ko = /* @__PURE__ */ z({
|
|
727
755
|
__name: "CheckBox",
|
|
728
756
|
props: /* @__PURE__ */ ce({
|
|
729
757
|
fieldKey: {},
|
|
@@ -738,7 +766,7 @@ const bo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "TextArea.vue"]]),
|
|
|
738
766
|
}),
|
|
739
767
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
740
768
|
setup(t, { expose: o, emit: n }) {
|
|
741
|
-
const e = t, r = n, a =
|
|
769
|
+
const e = t, r = n, a = Ce(t, "modelValue"), i = (s) => he(e.validations, s), l = (s) => {
|
|
742
770
|
const d = i(s);
|
|
743
771
|
r("error", d.res ? "" : d.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((g) => {
|
|
744
772
|
g.event === "change" && r(g.event, g.handlerName, s);
|
|
@@ -754,7 +782,7 @@ const bo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "TextArea.vue"]]),
|
|
|
754
782
|
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
755
783
|
}
|
|
756
784
|
});
|
|
757
|
-
function
|
|
785
|
+
function Co(t, o, n, e, r, a) {
|
|
758
786
|
const i = V("ACheckbox");
|
|
759
787
|
return u(), D(i, {
|
|
760
788
|
modelValue: e.model,
|
|
@@ -770,20 +798,20 @@ function wo(t, o, n, e, r, a) {
|
|
|
770
798
|
__: [1]
|
|
771
799
|
}, 8, ["modelValue", "disabled"]);
|
|
772
800
|
}
|
|
773
|
-
const
|
|
801
|
+
const So = /* @__PURE__ */ J(ko, [["render", Co], ["__file", "CheckBox.vue"]]), xo = Symbol("ArcoConfigProvider"), Vo = "arco", To = "$arco", it = (t) => {
|
|
774
802
|
var o, n, e;
|
|
775
|
-
const r =
|
|
776
|
-
return `${(e = (n = a?.prefixCls) != null ? n : (o = r?.appContext.config.globalProperties[
|
|
777
|
-
},
|
|
778
|
-
function
|
|
779
|
-
return
|
|
803
|
+
const r = me(), a = ye(xo, void 0);
|
|
804
|
+
return `${(e = (n = a?.prefixCls) != null ? n : (o = r?.appContext.config.globalProperties[To]) == null ? void 0 : o.classPrefix) != null ? e : Vo}-${t}`;
|
|
805
|
+
}, Ao = Object.prototype.toString;
|
|
806
|
+
function lt(t) {
|
|
807
|
+
return Ao.call(t) === "[object Number]" && t === t;
|
|
780
808
|
}
|
|
781
|
-
var
|
|
809
|
+
var ct = (t, o) => {
|
|
782
810
|
for (const [n, e] of o)
|
|
783
811
|
t[n] = e;
|
|
784
812
|
return t;
|
|
785
813
|
};
|
|
786
|
-
const
|
|
814
|
+
const Io = z({
|
|
787
815
|
name: "IconQuestionCircle",
|
|
788
816
|
props: {
|
|
789
817
|
size: {
|
|
@@ -810,9 +838,9 @@ const Vo = z({
|
|
|
810
838
|
click: (t) => !0
|
|
811
839
|
},
|
|
812
840
|
setup(t, { emit: o }) {
|
|
813
|
-
const n =
|
|
841
|
+
const n = it("icon"), e = K(() => [n, `${n}-question-circle`, { [`${n}-spin`]: t.spin }]), r = K(() => {
|
|
814
842
|
const i = {};
|
|
815
|
-
return t.size && (i.fontSize =
|
|
843
|
+
return t.size && (i.fontSize = lt(t.size) ? `${t.size}px` : t.size), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), i;
|
|
816
844
|
});
|
|
817
845
|
return {
|
|
818
846
|
cls: e,
|
|
@@ -822,15 +850,15 @@ const Vo = z({
|
|
|
822
850
|
}
|
|
823
851
|
};
|
|
824
852
|
}
|
|
825
|
-
}),
|
|
826
|
-
function
|
|
853
|
+
}), Po = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
854
|
+
function No(t, o, n, e, r, a) {
|
|
827
855
|
return u(), _("svg", {
|
|
828
856
|
viewBox: "0 0 48 48",
|
|
829
857
|
fill: "none",
|
|
830
858
|
xmlns: "http://www.w3.org/2000/svg",
|
|
831
859
|
stroke: "currentColor",
|
|
832
|
-
class:
|
|
833
|
-
style:
|
|
860
|
+
class: Ze(t.cls),
|
|
861
|
+
style: Xe(t.innerStyle),
|
|
834
862
|
"stroke-width": t.strokeWidth,
|
|
835
863
|
"stroke-linecap": t.strokeLinecap,
|
|
836
864
|
"stroke-linejoin": t.strokeLinejoin,
|
|
@@ -838,16 +866,16 @@ function To(t, o, n, e, r, a) {
|
|
|
838
866
|
}, o[1] || (o[1] = [
|
|
839
867
|
y("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6s18 8.059 18 18Z" }, null, -1),
|
|
840
868
|
y("path", { d: "M24.006 31v4.008m0-6.008L24 28c0-3 3-4 4.78-6.402C30.558 19.195 28.288 15 23.987 15c-4.014 0-5.382 2.548-5.388 4.514v.465" }, null, -1)
|
|
841
|
-
]), 14,
|
|
869
|
+
]), 14, Po);
|
|
842
870
|
}
|
|
843
|
-
var
|
|
844
|
-
const
|
|
871
|
+
var Le = /* @__PURE__ */ ct(Io, [["render", No]]);
|
|
872
|
+
const Fo = Object.assign(Le, {
|
|
845
873
|
install: (t, o) => {
|
|
846
874
|
var n;
|
|
847
875
|
const e = (n = o?.iconPrefix) != null ? n : "";
|
|
848
|
-
t.component(e +
|
|
876
|
+
t.component(e + Le.name, Le);
|
|
849
877
|
}
|
|
850
|
-
}),
|
|
878
|
+
}), Ro = z({
|
|
851
879
|
name: "IconDownload",
|
|
852
880
|
props: {
|
|
853
881
|
size: {
|
|
@@ -874,9 +902,9 @@ const Io = Object.assign(He, {
|
|
|
874
902
|
click: (t) => !0
|
|
875
903
|
},
|
|
876
904
|
setup(t, { emit: o }) {
|
|
877
|
-
const n =
|
|
905
|
+
const n = it("icon"), e = K(() => [n, `${n}-download`, { [`${n}-spin`]: t.spin }]), r = K(() => {
|
|
878
906
|
const i = {};
|
|
879
|
-
return t.size && (i.fontSize =
|
|
907
|
+
return t.size && (i.fontSize = lt(t.size) ? `${t.size}px` : t.size), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), i;
|
|
880
908
|
});
|
|
881
909
|
return {
|
|
882
910
|
cls: e,
|
|
@@ -886,31 +914,31 @@ const Io = Object.assign(He, {
|
|
|
886
914
|
}
|
|
887
915
|
};
|
|
888
916
|
}
|
|
889
|
-
}),
|
|
890
|
-
function
|
|
917
|
+
}), Uo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
918
|
+
function Do(t, o, n, e, r, a) {
|
|
891
919
|
return u(), _("svg", {
|
|
892
920
|
viewBox: "0 0 48 48",
|
|
893
921
|
fill: "none",
|
|
894
922
|
xmlns: "http://www.w3.org/2000/svg",
|
|
895
923
|
stroke: "currentColor",
|
|
896
|
-
class:
|
|
897
|
-
style:
|
|
924
|
+
class: Ze(t.cls),
|
|
925
|
+
style: Xe(t.innerStyle),
|
|
898
926
|
"stroke-width": t.strokeWidth,
|
|
899
927
|
"stroke-linecap": t.strokeLinecap,
|
|
900
928
|
"stroke-linejoin": t.strokeLinejoin,
|
|
901
929
|
onClick: o[0] || (o[0] = (...i) => t.onClick && t.onClick(...i))
|
|
902
930
|
}, o[1] || (o[1] = [
|
|
903
931
|
y("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
904
|
-
]), 14,
|
|
932
|
+
]), 14, Uo);
|
|
905
933
|
}
|
|
906
|
-
var
|
|
907
|
-
const
|
|
934
|
+
var He = /* @__PURE__ */ ct(Ro, [["render", Do]]);
|
|
935
|
+
const Bo = Object.assign(He, {
|
|
908
936
|
install: (t, o) => {
|
|
909
937
|
var n;
|
|
910
938
|
const e = (n = o?.iconPrefix) != null ? n : "";
|
|
911
|
-
t.component(e +
|
|
939
|
+
t.component(e + He.name, He);
|
|
912
940
|
}
|
|
913
|
-
}),
|
|
941
|
+
}), Lo = /* @__PURE__ */ z({
|
|
914
942
|
__name: "ToolTip",
|
|
915
943
|
props: {
|
|
916
944
|
isVisible: { type: Boolean },
|
|
@@ -919,31 +947,31 @@ const Uo = Object.assign(Le, {
|
|
|
919
947
|
setup(t, { expose: o }) {
|
|
920
948
|
o();
|
|
921
949
|
const n = t, e = (l) => l.length > 0 && typeof l[0] != "string", r = K(() => e(n.outputText) ? [] : n.outputText), a = K(() => e(n.outputText) ? n.outputText : []), i = { props: n, isTreeArray: e, stringOutput: r, treeOutput: a, get IconQuestionCircle() {
|
|
922
|
-
return
|
|
950
|
+
return Fo;
|
|
923
951
|
} };
|
|
924
952
|
return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
|
|
925
953
|
}
|
|
926
|
-
}),
|
|
927
|
-
function
|
|
954
|
+
}), Ho = { class: "list-unstyled" }, Oo = { class: "list-style-square" };
|
|
955
|
+
function $o(t, o, n, e, r, a) {
|
|
928
956
|
const i = V("a-tooltip");
|
|
929
957
|
return e.props.isVisible ? (u(), D(i, {
|
|
930
958
|
key: 0,
|
|
931
959
|
"background-color": "#7A00E6"
|
|
932
960
|
}, {
|
|
933
961
|
content: x(() => [
|
|
934
|
-
e.stringOutput.length ? (u(!0), _(
|
|
962
|
+
e.stringOutput.length ? (u(!0), _($, { key: 0 }, M(e.stringOutput, (l) => (u(), _("p", { key: l }, Q(l), 1))), 128)) : (u(!0), _($, { key: 1 }, M(e.treeOutput, (l) => (u(), _("ul", {
|
|
935
963
|
key: l.title,
|
|
936
964
|
class: "list-unstyled"
|
|
937
965
|
}, [
|
|
938
966
|
y("li", null, [
|
|
939
967
|
y("b", null, Q(l.title), 1),
|
|
940
|
-
y("ul",
|
|
941
|
-
(u(!0), _(
|
|
968
|
+
y("ul", Ho, [
|
|
969
|
+
(u(!0), _($, null, M(l.items, (c) => (u(), _("li", {
|
|
942
970
|
key: c.title
|
|
943
971
|
}, [
|
|
944
972
|
y("u", null, Q(c.title), 1),
|
|
945
|
-
y("ul",
|
|
946
|
-
(u(!0), _(
|
|
973
|
+
y("ul", Oo, [
|
|
974
|
+
(u(!0), _($, null, M(c.items, (s) => (u(), _("li", null, Q(s), 1))), 256))
|
|
947
975
|
])
|
|
948
976
|
]))), 128))
|
|
949
977
|
])
|
|
@@ -951,12 +979,12 @@ function Ho(t, o, n, e, r, a) {
|
|
|
951
979
|
]))), 128))
|
|
952
980
|
]),
|
|
953
981
|
default: x(() => [
|
|
954
|
-
|
|
982
|
+
R(e.IconQuestionCircle, { class: "icon" })
|
|
955
983
|
]),
|
|
956
984
|
_: 1
|
|
957
985
|
})) : re("", !0);
|
|
958
986
|
}
|
|
959
|
-
const
|
|
987
|
+
const dt = /* @__PURE__ */ J(Lo, [["render", $o], ["__scopeId", "data-v-1d3893b1"], ["__file", "ToolTip.vue"]]), jo = /* @__PURE__ */ z({
|
|
960
988
|
__name: "index",
|
|
961
989
|
props: /* @__PURE__ */ ce({
|
|
962
990
|
config: {},
|
|
@@ -973,26 +1001,26 @@ const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1
|
|
|
973
1001
|
}),
|
|
974
1002
|
emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
975
1003
|
setup(t, { expose: o, emit: n }) {
|
|
976
|
-
const e = t, r = n, a =
|
|
1004
|
+
const e = t, r = n, a = Ce(t, "modelValue"), i = Ae("widgetRef"), l = K(() => {
|
|
977
1005
|
switch (e.config?.widget?.widget) {
|
|
978
1006
|
case "TextBox":
|
|
979
|
-
return
|
|
1007
|
+
return Ye;
|
|
980
1008
|
case "Number":
|
|
981
|
-
return
|
|
1009
|
+
return co;
|
|
982
1010
|
case "SelectList":
|
|
983
|
-
return
|
|
1011
|
+
return Qe;
|
|
984
1012
|
case "Cascade":
|
|
985
|
-
return fo;
|
|
986
|
-
case "File":
|
|
987
1013
|
return go;
|
|
988
|
-
case "
|
|
1014
|
+
case "File":
|
|
989
1015
|
return bo;
|
|
1016
|
+
case "TextArea":
|
|
1017
|
+
return wo;
|
|
990
1018
|
case "DropDown":
|
|
991
|
-
return
|
|
1019
|
+
return Qe;
|
|
992
1020
|
case "CheckBox":
|
|
993
|
-
return
|
|
1021
|
+
return So;
|
|
994
1022
|
default:
|
|
995
|
-
return
|
|
1023
|
+
return Ye;
|
|
996
1024
|
}
|
|
997
1025
|
}), c = m(""), s = (f) => {
|
|
998
1026
|
c.value = f;
|
|
@@ -1019,28 +1047,28 @@ const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1
|
|
|
1019
1047
|
return e?.config?.widget?.title;
|
|
1020
1048
|
}
|
|
1021
1049
|
});
|
|
1022
|
-
const b = { props: e, emits: r, model: a, widgetRef: i, curComp: l, errMsg: c, errHandler: s, changeHandler: d, isFileUpload: g, formatTitle: v, ToolTip:
|
|
1050
|
+
const b = { props: e, emits: r, model: a, widgetRef: i, curComp: l, errMsg: c, errHandler: s, changeHandler: d, isFileUpload: g, formatTitle: v, ToolTip: dt };
|
|
1023
1051
|
return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
|
|
1024
1052
|
}
|
|
1025
|
-
}),
|
|
1053
|
+
}), Mo = { class: "title" }, Eo = {
|
|
1026
1054
|
key: 0,
|
|
1027
1055
|
class: "required"
|
|
1028
|
-
},
|
|
1056
|
+
}, Ko = {
|
|
1029
1057
|
key: 0,
|
|
1030
1058
|
class: "err-msg"
|
|
1031
1059
|
};
|
|
1032
|
-
function
|
|
1060
|
+
function zo(t, o, n, e, r, a) {
|
|
1033
1061
|
return u(), _("div", null, [
|
|
1034
|
-
y("div",
|
|
1062
|
+
y("div", Mo, [
|
|
1035
1063
|
ae(Q(e.formatTitle(e.props?.config?.widget?.title)) + " ", 1),
|
|
1036
|
-
e.props.required || e.props.config.validations.some((i) => i.ruleName === "Required") ? (u(), _("span",
|
|
1037
|
-
|
|
1064
|
+
e.props.required || e.props.config.validations.some((i) => i.ruleName === "Required") ? (u(), _("span", Eo, " * ")) : re("", !0),
|
|
1065
|
+
R(e.ToolTip, {
|
|
1038
1066
|
"is-visible": e.props.config.widget?.isVisible ?? !1,
|
|
1039
1067
|
"output-text": e.props.config.widget?.outputText ?? []
|
|
1040
1068
|
}, null, 8, ["is-visible", "output-text"])
|
|
1041
1069
|
]),
|
|
1042
1070
|
y("div", null, [
|
|
1043
|
-
(u(), D(
|
|
1071
|
+
(u(), D(je(e.curComp), {
|
|
1044
1072
|
ref: "widgetRef",
|
|
1045
1073
|
modelValue: e.model,
|
|
1046
1074
|
"onUpdate:modelValue": o[0] || (o[0] = (i) => e.model = i),
|
|
@@ -1052,11 +1080,11 @@ function Mo(t, o, n, e, r, a) {
|
|
|
1052
1080
|
onError: e.errHandler,
|
|
1053
1081
|
onChange: e.changeHandler
|
|
1054
1082
|
}, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
|
|
1055
|
-
e.errMsg.length > 0 ? (u(), _("div",
|
|
1083
|
+
e.errMsg.length > 0 ? (u(), _("div", Ko, Q(e.errMsg), 1)) : re("", !0)
|
|
1056
1084
|
])
|
|
1057
1085
|
]);
|
|
1058
1086
|
}
|
|
1059
|
-
const
|
|
1087
|
+
const Ie = /* @__PURE__ */ J(jo, [["render", zo], ["__scopeId", "data-v-67595df1"], ["__file", "index.vue"]]), Wo = /* @__PURE__ */ z({
|
|
1060
1088
|
__name: "SubmitButton",
|
|
1061
1089
|
props: {
|
|
1062
1090
|
url: {},
|
|
@@ -1074,7 +1102,7 @@ const Te = /* @__PURE__ */ J(Lo, [["render", Mo], ["__scopeId", "data-v-67595df1
|
|
|
1074
1102
|
return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
|
|
1075
1103
|
}
|
|
1076
1104
|
});
|
|
1077
|
-
function
|
|
1105
|
+
function Go(t, o, n, e, r, a) {
|
|
1078
1106
|
const i = V("AButton");
|
|
1079
1107
|
return u(), D(i, {
|
|
1080
1108
|
loading: n.loading,
|
|
@@ -1087,7 +1115,7 @@ function Ko(t, o, n, e, r, a) {
|
|
|
1087
1115
|
_: 3
|
|
1088
1116
|
}, 8, ["loading"]);
|
|
1089
1117
|
}
|
|
1090
|
-
const
|
|
1118
|
+
const Je = /* @__PURE__ */ J(Wo, [["render", Go], ["__file", "SubmitButton.vue"]]), qo = /* @__PURE__ */ z({
|
|
1091
1119
|
__name: "DetailLink",
|
|
1092
1120
|
props: {
|
|
1093
1121
|
url: {},
|
|
@@ -1105,7 +1133,7 @@ const Qe = /* @__PURE__ */ J(Eo, [["render", Ko], ["__file", "SubmitButton.vue"]
|
|
|
1105
1133
|
return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
|
|
1106
1134
|
}
|
|
1107
1135
|
});
|
|
1108
|
-
function
|
|
1136
|
+
function Yo(t, o, n, e, r, a) {
|
|
1109
1137
|
const i = V("ALink");
|
|
1110
1138
|
return u(), D(i, { onClick: e.clickHandler }, {
|
|
1111
1139
|
default: x(() => [
|
|
@@ -1114,7 +1142,7 @@ function Wo(t, o, n, e, r, a) {
|
|
|
1114
1142
|
_: 3
|
|
1115
1143
|
});
|
|
1116
1144
|
}
|
|
1117
|
-
const
|
|
1145
|
+
const Qo = /* @__PURE__ */ J(qo, [["render", Yo], ["__file", "DetailLink.vue"]]), Jo = /* @__PURE__ */ z({
|
|
1118
1146
|
__name: "index",
|
|
1119
1147
|
props: {
|
|
1120
1148
|
config: {},
|
|
@@ -1130,18 +1158,18 @@ const Go = /* @__PURE__ */ J(zo, [["render", Wo], ["__file", "DetailLink.vue"]])
|
|
|
1130
1158
|
const i = K(() => {
|
|
1131
1159
|
switch (e.config.location) {
|
|
1132
1160
|
case "InOperation":
|
|
1133
|
-
return
|
|
1161
|
+
return Je;
|
|
1134
1162
|
case "InTable":
|
|
1135
|
-
return
|
|
1163
|
+
return Qo;
|
|
1136
1164
|
default:
|
|
1137
|
-
return
|
|
1165
|
+
return Je;
|
|
1138
1166
|
}
|
|
1139
1167
|
}), l = K(() => e.config.widget === X.Submit ? e.config.requestUrl ?? "" : e.config.widget === X.Link ? e.config.redirectUrl ?? "" : ""), c = K(() => e.config.redirectType ?? "Details"), s = { props: e, emits: r, clickHandler: a, curComp: i, curUrl: l, redirectType: c };
|
|
1140
1168
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1141
1169
|
}
|
|
1142
1170
|
});
|
|
1143
|
-
function
|
|
1144
|
-
return u(), D(
|
|
1171
|
+
function Xo(t, o, n, e, r, a) {
|
|
1172
|
+
return u(), D(je(e.curComp), {
|
|
1145
1173
|
url: e.curUrl,
|
|
1146
1174
|
"redirect-type": e.redirectType,
|
|
1147
1175
|
loading: n.loading,
|
|
@@ -1153,24 +1181,19 @@ function Yo(t, o, n, e, r, a) {
|
|
|
1153
1181
|
_: 1
|
|
1154
1182
|
}, 8, ["url", "redirect-type", "loading"]);
|
|
1155
1183
|
}
|
|
1156
|
-
const
|
|
1157
|
-
function
|
|
1158
|
-
const t =
|
|
1159
|
-
return t || yt();
|
|
1160
|
-
}
|
|
1161
|
-
const lt = Symbol("library-triggers");
|
|
1162
|
-
function Ee() {
|
|
1163
|
-
const t = be(lt, null);
|
|
1184
|
+
const Pe = /* @__PURE__ */ J(Jo, [["render", Xo], ["__file", "index.vue"]]), ut = Symbol("library-triggers");
|
|
1185
|
+
function Ke() {
|
|
1186
|
+
const t = ye(ut, null);
|
|
1164
1187
|
return t || {};
|
|
1165
1188
|
}
|
|
1166
|
-
const
|
|
1189
|
+
const Zo = Symbol("library-pinia"), ft = Symbol("library-bpmStore"), pt = Symbol("library-svrStore");
|
|
1167
1190
|
function Ne() {
|
|
1168
|
-
return
|
|
1191
|
+
return ye(ft, null);
|
|
1169
1192
|
}
|
|
1170
1193
|
function Fe() {
|
|
1171
|
-
return
|
|
1194
|
+
return ye(pt, null);
|
|
1172
1195
|
}
|
|
1173
|
-
const
|
|
1196
|
+
const en = /* @__PURE__ */ z({
|
|
1174
1197
|
__name: "TopBar",
|
|
1175
1198
|
props: {
|
|
1176
1199
|
title: {},
|
|
@@ -1182,21 +1205,21 @@ const Jo = /* @__PURE__ */ z({
|
|
|
1182
1205
|
const n = {};
|
|
1183
1206
|
return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
|
|
1184
1207
|
}
|
|
1185
|
-
}),
|
|
1186
|
-
function
|
|
1208
|
+
}), tn = { class: "top-bar" }, on = { class: "banner-info" }, nn = { class: "page-title" }, an = { class: "page-subtitle" }, rn = { class: "avatar-wrapper" }, sn = { class: "user-email" };
|
|
1209
|
+
function ln(t, o, n, e, r, a) {
|
|
1187
1210
|
const i = V("a-avatar"), l = V("a-popover");
|
|
1188
|
-
return u(), _("div",
|
|
1189
|
-
y("div", Zo, [
|
|
1190
|
-
y("div", en, Q(n.title), 1),
|
|
1191
|
-
y("div", tn, Q(n.subTitle), 1)
|
|
1192
|
-
]),
|
|
1211
|
+
return u(), _("div", tn, [
|
|
1193
1212
|
y("div", on, [
|
|
1194
|
-
|
|
1213
|
+
y("div", nn, Q(n.title), 1),
|
|
1214
|
+
y("div", an, Q(n.subTitle), 1)
|
|
1215
|
+
]),
|
|
1216
|
+
y("div", rn, [
|
|
1217
|
+
R(l, { trigger: "click" }, {
|
|
1195
1218
|
content: x(() => [
|
|
1196
|
-
y("div",
|
|
1219
|
+
y("div", sn, Q(n.email), 1)
|
|
1197
1220
|
]),
|
|
1198
1221
|
default: x(() => [
|
|
1199
|
-
|
|
1222
|
+
R(i, {
|
|
1200
1223
|
size: 48,
|
|
1201
1224
|
autoFixFontSize: "",
|
|
1202
1225
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
@@ -1212,9 +1235,9 @@ function an(t, o, n, e, r, a) {
|
|
|
1212
1235
|
])
|
|
1213
1236
|
]);
|
|
1214
1237
|
}
|
|
1215
|
-
const
|
|
1216
|
-
function
|
|
1217
|
-
const o =
|
|
1238
|
+
const Re = /* @__PURE__ */ J(en, [["render", ln], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
|
|
1239
|
+
function ze(t) {
|
|
1240
|
+
const o = Me(), n = [];
|
|
1218
1241
|
if (o.fieldsGroup) {
|
|
1219
1242
|
o.fieldsGroup.forEach((a) => {
|
|
1220
1243
|
const i = a.keys.map((l) => t.find((c) => c.fieldKey === l)).filter(Boolean);
|
|
@@ -1224,7 +1247,7 @@ function Ke(t) {
|
|
|
1224
1247
|
return r.length && n.push({ name: "Grading Review History (For example: re-submit the grading request)", fields: r }), n;
|
|
1225
1248
|
}
|
|
1226
1249
|
}
|
|
1227
|
-
class
|
|
1250
|
+
class Ue {
|
|
1228
1251
|
pageActionType;
|
|
1229
1252
|
className = "";
|
|
1230
1253
|
store = { svrStore: {}, bpmStore: {} };
|
|
@@ -1245,10 +1268,10 @@ class Re {
|
|
|
1245
1268
|
return this.opt = o, this;
|
|
1246
1269
|
}
|
|
1247
1270
|
build() {
|
|
1248
|
-
return this.pageActionType ? this.opt.workflowId ? new
|
|
1271
|
+
return this.pageActionType ? this.opt.workflowId ? new Te(this.pageActionType, this.className, this.store, this.opt) : new Te(this.pageActionType, this.className, this.store) : this.opt.workflowId ? new Te(be.ReCreate, this.className, this.store, this.opt) : new Te(be.Create, this.className, this.store);
|
|
1249
1272
|
}
|
|
1250
1273
|
}
|
|
1251
|
-
class
|
|
1274
|
+
class Te {
|
|
1252
1275
|
pageActionType;
|
|
1253
1276
|
className;
|
|
1254
1277
|
store;
|
|
@@ -1263,40 +1286,40 @@ class Ve {
|
|
|
1263
1286
|
this.pageActionType = o, this.className = n, this.store = e, r && (this.opt = r);
|
|
1264
1287
|
}
|
|
1265
1288
|
getPageData() {
|
|
1266
|
-
return this.opt ?
|
|
1289
|
+
return this.opt ? qe(this.pageActionType, this.className, this.store, this.opt) : qe(this.pageActionType, this.className, this.store);
|
|
1267
1290
|
}
|
|
1268
1291
|
getBtnList() {
|
|
1269
|
-
return
|
|
1292
|
+
return Dt(this.pageActionType, this.className, { workflowId: this.getWorkflowId(), email: this.getApproverEmail() });
|
|
1270
1293
|
}
|
|
1271
1294
|
getFiles() {
|
|
1272
|
-
return this.getWorkflowId() ?
|
|
1295
|
+
return this.getWorkflowId() ? qt(this.className, this.getWorkflowId()) : Promise.resolve({});
|
|
1273
1296
|
}
|
|
1274
1297
|
removeFile(o) {
|
|
1275
|
-
return
|
|
1298
|
+
return Yt(this.className, o);
|
|
1276
1299
|
}
|
|
1277
1300
|
getProcess() {
|
|
1278
|
-
return
|
|
1301
|
+
return Wt(this.className, this.getWorkflowId());
|
|
1279
1302
|
}
|
|
1280
1303
|
getCommentsHistory() {
|
|
1281
|
-
return
|
|
1304
|
+
return Zt(this.getWorkflowId());
|
|
1282
1305
|
}
|
|
1283
1306
|
getAssociator() {
|
|
1284
|
-
return
|
|
1307
|
+
return eo(this.getWorkflowId());
|
|
1285
1308
|
}
|
|
1286
1309
|
getApprovers() {
|
|
1287
|
-
return
|
|
1310
|
+
return Qt();
|
|
1288
1311
|
}
|
|
1289
1312
|
assignApprover(o) {
|
|
1290
|
-
return
|
|
1313
|
+
return Jt(this.getWorkflowId(), o);
|
|
1291
1314
|
}
|
|
1292
1315
|
addComments(o) {
|
|
1293
|
-
return
|
|
1316
|
+
return Xt(this.getWorkflowId(), this.getApproverEmail(), o);
|
|
1294
1317
|
}
|
|
1295
1318
|
deleteAssociator(o) {
|
|
1296
|
-
return
|
|
1319
|
+
return to(o);
|
|
1297
1320
|
}
|
|
1298
1321
|
}
|
|
1299
|
-
const
|
|
1322
|
+
const cn = /* @__PURE__ */ z({
|
|
1300
1323
|
__name: "CreateView",
|
|
1301
1324
|
props: {
|
|
1302
1325
|
className: {},
|
|
@@ -1304,7 +1327,7 @@ const rn = /* @__PURE__ */ z({
|
|
|
1304
1327
|
},
|
|
1305
1328
|
setup(t, { expose: o }) {
|
|
1306
1329
|
o();
|
|
1307
|
-
const n = Ne(), e = Fe(), r =
|
|
1330
|
+
const n = Ne(), e = Fe(), r = ve(), a = Ke(), i = Ae("dataWidgets"), l = me(), c = t, s = m({
|
|
1308
1331
|
pageType: "",
|
|
1309
1332
|
fields: {},
|
|
1310
1333
|
globalValidations: [],
|
|
@@ -1321,81 +1344,83 @@ const rn = /* @__PURE__ */ z({
|
|
|
1321
1344
|
}
|
|
1322
1345
|
}), d = m([]), g = m({});
|
|
1323
1346
|
function v(C) {
|
|
1324
|
-
return C ? Object.entries(C).map(([S,
|
|
1347
|
+
return C ? Object.entries(C).map(([S, I]) => ({
|
|
1325
1348
|
fieldKey: S,
|
|
1326
|
-
...
|
|
1349
|
+
...I
|
|
1327
1350
|
})).filter((S) => S.widget && S.widget.widget !== "Hidden").filter((S) => !ee.value.includes(S.fieldKey)) : [];
|
|
1328
1351
|
}
|
|
1329
1352
|
function b(C) {
|
|
1330
|
-
return C ? Object.entries(C).filter(([S,
|
|
1331
|
-
(S, [
|
|
1353
|
+
return C ? Object.entries(C).filter(([S, I]) => I.dependent).reduce(
|
|
1354
|
+
(S, [I, O]) => (S[I] = O.dependent, S),
|
|
1332
1355
|
{}
|
|
1333
1356
|
) : [];
|
|
1334
1357
|
}
|
|
1335
|
-
const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}),
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
const C = new
|
|
1339
|
-
s.value = await C.getPageData()
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1358
|
+
const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}), w = m(!1);
|
|
1359
|
+
ge(async () => {
|
|
1360
|
+
w.value = !0;
|
|
1361
|
+
const C = new Ue().setWorkflowId(c.workflowId).setClassName(c.className).setStore({ svrStore: e, bpmStore: n }).build();
|
|
1362
|
+
s.value = await C.getPageData();
|
|
1363
|
+
const T = s.value.fields.requestType.modelValue;
|
|
1364
|
+
a.Test?.({ fieldValue: T, hiddenFields: ee, formData: p }), d.value = v(s.value.fields), g.value = b(s.value.fields);
|
|
1365
|
+
for (const S in s.value.fields) {
|
|
1366
|
+
if (s.value.fields[S].widget?.widget === "File") {
|
|
1367
|
+
const I = d.value.find((O) => O.fieldKey === S);
|
|
1368
|
+
I && I.widget && (I.widget.files = []);
|
|
1344
1369
|
}
|
|
1345
|
-
p.value[
|
|
1370
|
+
p.value[S] = s.value.fields[S].modelValue;
|
|
1346
1371
|
}
|
|
1347
|
-
|
|
1372
|
+
w.value = !1;
|
|
1348
1373
|
});
|
|
1349
1374
|
function Z() {
|
|
1350
1375
|
return e()?.userInfo?.email_address ?? "";
|
|
1351
1376
|
}
|
|
1352
|
-
async function oe(C, T, S,
|
|
1377
|
+
async function oe(C, T, S, I, O) {
|
|
1353
1378
|
switch (T) {
|
|
1354
1379
|
case X.Submit:
|
|
1355
|
-
let
|
|
1380
|
+
let L = !0;
|
|
1356
1381
|
if (i.value?.forEach((W) => {
|
|
1357
|
-
W?.validate && (W.validate() || (
|
|
1358
|
-
}), !
|
|
1382
|
+
W?.validate && (W.validate() || (L = !1));
|
|
1383
|
+
}), !L) {
|
|
1359
1384
|
l?.appContext.config.globalProperties.$message.error(
|
|
1360
1385
|
"form validation failed, please check the input fields"
|
|
1361
1386
|
);
|
|
1362
1387
|
return;
|
|
1363
1388
|
}
|
|
1364
|
-
|
|
1389
|
+
w.value = !0;
|
|
1365
1390
|
try {
|
|
1366
|
-
a[
|
|
1391
|
+
a[O]?.({ message: `${O} action triggered` });
|
|
1367
1392
|
const W = {
|
|
1368
1393
|
...p.value,
|
|
1369
1394
|
...g.value
|
|
1370
1395
|
};
|
|
1371
1396
|
a.createPageBeforeSubmit?.(W);
|
|
1372
|
-
const ie = await
|
|
1397
|
+
const ie = await Lt(
|
|
1373
1398
|
c.className,
|
|
1374
1399
|
W,
|
|
1375
1400
|
S
|
|
1376
1401
|
);
|
|
1377
|
-
a[`${
|
|
1402
|
+
a[`${O}Success` || ""]?.({
|
|
1378
1403
|
message: "Workflow created successfully",
|
|
1379
1404
|
workflowId: c.workflowId,
|
|
1380
1405
|
res: ie
|
|
1381
1406
|
});
|
|
1382
1407
|
const le = i.value?.map((se) => se?.submit ? se.submit(ie.toString()) : Promise.resolve()) || [];
|
|
1383
|
-
await Promise.all(le),
|
|
1408
|
+
await Promise.all(le), w.value = !1, l?.appContext.config.globalProperties.$notification.success(
|
|
1384
1409
|
`Your grading request has been submitted, ID is ${ie.toString()}.`
|
|
1385
1410
|
), r.push({ name: "Details", params: { workflowId: ie.toString() } });
|
|
1386
1411
|
} catch {
|
|
1387
1412
|
l?.appContext.config.globalProperties.$notification.error(
|
|
1388
1413
|
"Failed to submit your grading request"
|
|
1389
|
-
),
|
|
1414
|
+
), w.value = !1;
|
|
1390
1415
|
}
|
|
1391
1416
|
break;
|
|
1392
1417
|
case X.Link:
|
|
1393
1418
|
try {
|
|
1394
1419
|
await a[C.eventName || ""]?.(p.value, ee), r.push({
|
|
1395
|
-
name:
|
|
1420
|
+
name: I,
|
|
1396
1421
|
params: { className: c.className }
|
|
1397
1422
|
}), await a[`${C.eventName || ""}Success`]?.({
|
|
1398
|
-
message: `Router to ${
|
|
1423
|
+
message: `Router to ${I} pushed`
|
|
1399
1424
|
});
|
|
1400
1425
|
} catch (W) {
|
|
1401
1426
|
console.error("Error in link action trigger:", W);
|
|
@@ -1416,37 +1441,37 @@ const rn = /* @__PURE__ */ z({
|
|
|
1416
1441
|
function ne(C, T) {
|
|
1417
1442
|
a[C]?.({ fieldValue: T, hiddenFields: ee, formData: p }), s.value && (d.value = v(s.value.fields));
|
|
1418
1443
|
}
|
|
1419
|
-
const A = K(() =>
|
|
1444
|
+
const A = K(() => ze(d.value)), k = { bpmStore: n, svrStore: e, router: r, triggers: a, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: g, genField: v, genDependentField: b, reversedActions: f, _data: p, loading: w, getApproverEmail: Z, clickHandler: oe, newHiddenFields: E, hiddenFields: ee, changeHandler: ne, groupedFields: A, DataWidgets: Ie, ActionButton: Pe, TopBar: Re };
|
|
1420
1445
|
return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
|
|
1421
1446
|
}
|
|
1422
|
-
}),
|
|
1447
|
+
}), dn = { class: "page-container" }, un = { class: "page-body" }, fn = { class: "form-card" }, pn = { class: "form-fields-vertical" }, mn = { class: "form-fields" }, gn = {
|
|
1423
1448
|
key: 0,
|
|
1424
1449
|
class: "form-content"
|
|
1425
|
-
},
|
|
1426
|
-
function
|
|
1450
|
+
}, _n = { class: "page-footer" }, vn = { class: "action-container" }, bn = { class: "action-buttons" };
|
|
1451
|
+
function yn(t, o, n, e, r, a) {
|
|
1427
1452
|
const i = V("a-card"), l = V("a-spin");
|
|
1428
|
-
return u(), _("div",
|
|
1429
|
-
|
|
1453
|
+
return u(), _("div", dn, [
|
|
1454
|
+
R(e.TopBar, {
|
|
1430
1455
|
title: e.pageData.banner.title,
|
|
1431
1456
|
subTitle: e.pageData.banner.subTitle,
|
|
1432
1457
|
email: e.getApproverEmail()
|
|
1433
1458
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1434
|
-
y("div",
|
|
1435
|
-
|
|
1459
|
+
y("div", un, [
|
|
1460
|
+
R(l, {
|
|
1436
1461
|
loading: e.loading,
|
|
1437
1462
|
class: "form-container"
|
|
1438
1463
|
}, {
|
|
1439
1464
|
default: x(() => [
|
|
1440
|
-
y("div",
|
|
1441
|
-
y("div",
|
|
1442
|
-
(u(!0), _(
|
|
1465
|
+
y("div", fn, [
|
|
1466
|
+
y("div", pn, [
|
|
1467
|
+
(u(!0), _($, null, M(e.groupedFields, (c) => (u(), D(i, {
|
|
1443
1468
|
key: c.name,
|
|
1444
1469
|
title: c.name,
|
|
1445
1470
|
style: { "margin-bottom": "24px" }
|
|
1446
1471
|
}, {
|
|
1447
1472
|
default: x(() => [
|
|
1448
|
-
y("div",
|
|
1449
|
-
(u(!0), _(
|
|
1473
|
+
y("div", mn, [
|
|
1474
|
+
(u(!0), _($, null, M(c.fields, (s) => (u(), D(e.DataWidgets, {
|
|
1450
1475
|
key: s.fieldKey,
|
|
1451
1476
|
ref_for: !0,
|
|
1452
1477
|
ref: "dataWidgets",
|
|
@@ -1463,7 +1488,7 @@ function _n(t, o, n, e, r, a) {
|
|
|
1463
1488
|
_: 2
|
|
1464
1489
|
}, 1032, ["title"]))), 128))
|
|
1465
1490
|
]),
|
|
1466
|
-
t.$slots.content ? (u(), _("div",
|
|
1491
|
+
t.$slots.content ? (u(), _("div", gn, [
|
|
1467
1492
|
ue(t.$slots, "content", {}, void 0, !0)
|
|
1468
1493
|
])) : re("", !0)
|
|
1469
1494
|
])
|
|
@@ -1471,11 +1496,11 @@ function _n(t, o, n, e, r, a) {
|
|
|
1471
1496
|
_: 3
|
|
1472
1497
|
}, 8, ["loading"])
|
|
1473
1498
|
]),
|
|
1474
|
-
y("div",
|
|
1475
|
-
y("div",
|
|
1499
|
+
y("div", _n, [
|
|
1500
|
+
y("div", vn, [
|
|
1476
1501
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
1477
|
-
y("div",
|
|
1478
|
-
(u(!0), _(
|
|
1502
|
+
y("div", bn, [
|
|
1503
|
+
(u(!0), _($, null, M(e.reversedActions, (c) => (u(), D(e.ActionButton, {
|
|
1479
1504
|
key: c.title,
|
|
1480
1505
|
loading: e.loading,
|
|
1481
1506
|
config: c,
|
|
@@ -1487,7 +1512,7 @@ function _n(t, o, n, e, r, a) {
|
|
|
1487
1512
|
])
|
|
1488
1513
|
]);
|
|
1489
1514
|
}
|
|
1490
|
-
const
|
|
1515
|
+
const hn = /* @__PURE__ */ J(cn, [["render", yn], ["__scopeId", "data-v-31413447"], ["__file", "CreateView.vue"]]), wn = /* @__PURE__ */ z({
|
|
1491
1516
|
__name: "UpdateView",
|
|
1492
1517
|
props: {
|
|
1493
1518
|
className: {},
|
|
@@ -1495,7 +1520,7 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-7ac0ce3d
|
|
|
1495
1520
|
},
|
|
1496
1521
|
setup(t, { expose: o }) {
|
|
1497
1522
|
o();
|
|
1498
|
-
const n =
|
|
1523
|
+
const n = ve(), e = Ke(), r = Fe(), a = Ne(), i = Ae("dataWidgets"), l = me(), c = t, s = m({
|
|
1499
1524
|
pageType: "",
|
|
1500
1525
|
fields: {},
|
|
1501
1526
|
globalValidations: [],
|
|
@@ -1518,50 +1543,50 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-7ac0ce3d
|
|
|
1518
1543
|
})).filter((T) => T.widget && T.widget.widget !== "Hidden").filter((T) => !E.value.includes(T.fieldKey)) : [];
|
|
1519
1544
|
}
|
|
1520
1545
|
function b(k) {
|
|
1521
|
-
return k ? Object.entries(k).filter(([T, S]) => S.dependent).reduce((T, [S,
|
|
1546
|
+
return k ? Object.entries(k).filter(([T, S]) => S.dependent).reduce((T, [S, I]) => (T[S] = I.dependent, T), {}) : [];
|
|
1522
1547
|
}
|
|
1523
|
-
const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}),
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
const k = new
|
|
1548
|
+
const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}), w = m(!1);
|
|
1549
|
+
ge(async () => {
|
|
1550
|
+
w.value = !0;
|
|
1551
|
+
const k = new Ue().setPageActionType(be.Update).setClassName(c.className).setStore({ svrStore: r, bpmStore: a }).setWorkflowId(c.workflowId).build();
|
|
1527
1552
|
s.value = await k.getPageData();
|
|
1528
1553
|
const C = await k.getBtnList(), T = await k.getFiles();
|
|
1529
|
-
s.value.actions = s.value.actions?.filter((
|
|
1530
|
-
const
|
|
1531
|
-
return
|
|
1554
|
+
s.value.actions = s.value.actions?.filter((I) => {
|
|
1555
|
+
const O = C.find((L) => L.button === I.title);
|
|
1556
|
+
return O ? O.isShow : !0;
|
|
1532
1557
|
});
|
|
1533
1558
|
const S = s.value.fields.requestType.modelValue;
|
|
1534
1559
|
e.Test?.({ fieldValue: S, hiddenFields: E, formData: p }), d.value = v(s.value.fields), g.value = b(s.value.fields);
|
|
1535
|
-
for (const
|
|
1536
|
-
if (s.value.fields[
|
|
1537
|
-
const
|
|
1538
|
-
|
|
1560
|
+
for (const I in s.value.fields) {
|
|
1561
|
+
if (s.value.fields[I].widget?.widget === "File") {
|
|
1562
|
+
const O = d.value.find((L) => L.fieldKey === I);
|
|
1563
|
+
O && O.widget && (O.widget.files = T[I] ?? [], O.widget.removeFile = (L) => k.removeFile(L));
|
|
1539
1564
|
}
|
|
1540
|
-
p.value[
|
|
1565
|
+
p.value[I] = s.value.fields[I].modelValue;
|
|
1541
1566
|
}
|
|
1542
|
-
|
|
1567
|
+
w.value = !1;
|
|
1543
1568
|
});
|
|
1544
1569
|
function Z() {
|
|
1545
1570
|
return r()?.userInfo?.email_address ?? "";
|
|
1546
1571
|
}
|
|
1547
|
-
async function oe(k, C, T, S,
|
|
1572
|
+
async function oe(k, C, T, S, I) {
|
|
1548
1573
|
switch (C) {
|
|
1549
1574
|
case X.Submit:
|
|
1550
|
-
let
|
|
1551
|
-
if (i.value?.forEach((
|
|
1552
|
-
|
|
1553
|
-
}),
|
|
1575
|
+
let O = !0;
|
|
1576
|
+
if (i.value?.forEach((L) => {
|
|
1577
|
+
L?.validate && (L.validate() || (O = !1));
|
|
1578
|
+
}), !O) {
|
|
1554
1579
|
l?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1555
1580
|
return;
|
|
1556
1581
|
}
|
|
1557
|
-
|
|
1582
|
+
w.value = !0;
|
|
1558
1583
|
try {
|
|
1559
|
-
const
|
|
1560
|
-
e.updatePageBeforeSubmit?.(
|
|
1561
|
-
const W = await
|
|
1562
|
-
await Promise.all(ie),
|
|
1584
|
+
const L = { ...p.value, ...g.value };
|
|
1585
|
+
e.updatePageBeforeSubmit?.(L, a().employeeInfo);
|
|
1586
|
+
const W = await Ht(c.className, c.workflowId, L, T), ie = i.value?.map((le) => le?.submit ? le.submit(W.toString()) : Promise.resolve()) || [];
|
|
1587
|
+
await Promise.all(ie), w.value = !1, l?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${W.toString()}.`);
|
|
1563
1588
|
} catch {
|
|
1564
|
-
l?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"),
|
|
1589
|
+
l?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), w.value = !1;
|
|
1565
1590
|
}
|
|
1566
1591
|
break;
|
|
1567
1592
|
case X.Link:
|
|
@@ -1578,37 +1603,37 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-7ac0ce3d
|
|
|
1578
1603
|
function ee(k, C) {
|
|
1579
1604
|
e[k]?.({ fieldValue: C, hiddenFields: E, formData: p }), s.value && (d.value = v(s.value.fields));
|
|
1580
1605
|
}
|
|
1581
|
-
const ne = K(() =>
|
|
1606
|
+
const ne = K(() => ze(d.value)), A = { router: n, triggers: e, svrStore: r, bpmStore: a, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: g, genField: v, genDependentField: b, reversedActions: f, _data: p, loading: w, getApproverEmail: Z, clickHandler: oe, hiddenFields: E, changeHandler: ee, groupedFields: ne, DataWidgets: Ie, ActionButton: Pe, TopBar: Re };
|
|
1582
1607
|
return Object.defineProperty(A, "__isScriptSetup", { enumerable: !1, value: !0 }), A;
|
|
1583
1608
|
}
|
|
1584
|
-
}),
|
|
1609
|
+
}), kn = { class: "page-container" }, Cn = { class: "page-body" }, Sn = { class: "form-card" }, xn = { class: "form-fields-vertical" }, Vn = { class: "form-fields" }, Tn = {
|
|
1585
1610
|
key: 0,
|
|
1586
1611
|
class: "form-content"
|
|
1587
|
-
},
|
|
1588
|
-
function
|
|
1612
|
+
}, An = { class: "page-footer" }, In = { class: "action-container" }, Pn = { class: "action-buttons" };
|
|
1613
|
+
function Nn(t, o, n, e, r, a) {
|
|
1589
1614
|
const i = V("a-card"), l = V("a-spin");
|
|
1590
|
-
return u(), _("div",
|
|
1591
|
-
|
|
1615
|
+
return u(), _("div", kn, [
|
|
1616
|
+
R(e.TopBar, {
|
|
1592
1617
|
title: e.pageData.banner.title,
|
|
1593
1618
|
subTitle: e.pageData.banner.subTitle,
|
|
1594
1619
|
email: e.getApproverEmail()
|
|
1595
1620
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1596
|
-
y("div",
|
|
1597
|
-
|
|
1621
|
+
y("div", Cn, [
|
|
1622
|
+
R(l, {
|
|
1598
1623
|
loading: e.loading,
|
|
1599
1624
|
class: "form-container"
|
|
1600
1625
|
}, {
|
|
1601
1626
|
default: x(() => [
|
|
1602
|
-
y("div",
|
|
1603
|
-
y("div",
|
|
1604
|
-
(u(!0), _(
|
|
1627
|
+
y("div", Sn, [
|
|
1628
|
+
y("div", xn, [
|
|
1629
|
+
(u(!0), _($, null, M(e.groupedFields, (c) => (u(), D(i, {
|
|
1605
1630
|
key: c.name,
|
|
1606
1631
|
title: c.name,
|
|
1607
1632
|
style: { "margin-bottom": "24px" }
|
|
1608
1633
|
}, {
|
|
1609
1634
|
default: x(() => [
|
|
1610
|
-
y("div",
|
|
1611
|
-
(u(!0), _(
|
|
1635
|
+
y("div", Vn, [
|
|
1636
|
+
(u(!0), _($, null, M(c.fields, (s) => (u(), D(e.DataWidgets, {
|
|
1612
1637
|
key: s.fieldKey,
|
|
1613
1638
|
ref_for: !0,
|
|
1614
1639
|
ref: "dataWidgets",
|
|
@@ -1625,7 +1650,7 @@ function Tn(t, o, n, e, r, a) {
|
|
|
1625
1650
|
_: 2
|
|
1626
1651
|
}, 1032, ["title"]))), 128))
|
|
1627
1652
|
]),
|
|
1628
|
-
t.$slots.content ? (u(), _("div",
|
|
1653
|
+
t.$slots.content ? (u(), _("div", Tn, [
|
|
1629
1654
|
ue(t.$slots, "content", {}, void 0, !0)
|
|
1630
1655
|
])) : re("", !0)
|
|
1631
1656
|
])
|
|
@@ -1633,11 +1658,11 @@ function Tn(t, o, n, e, r, a) {
|
|
|
1633
1658
|
_: 3
|
|
1634
1659
|
}, 8, ["loading"])
|
|
1635
1660
|
]),
|
|
1636
|
-
y("div",
|
|
1637
|
-
y("div",
|
|
1661
|
+
y("div", An, [
|
|
1662
|
+
y("div", In, [
|
|
1638
1663
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
1639
|
-
y("div",
|
|
1640
|
-
(u(!0), _(
|
|
1664
|
+
y("div", Pn, [
|
|
1665
|
+
(u(!0), _($, null, M(e.reversedActions, (c) => (u(), D(e.ActionButton, {
|
|
1641
1666
|
key: c.title,
|
|
1642
1667
|
loading: e.loading,
|
|
1643
1668
|
config: c,
|
|
@@ -1649,11 +1674,11 @@ function Tn(t, o, n, e, r, a) {
|
|
|
1649
1674
|
])
|
|
1650
1675
|
]);
|
|
1651
1676
|
}
|
|
1652
|
-
const
|
|
1653
|
-
function
|
|
1654
|
-
return
|
|
1677
|
+
const Fn = /* @__PURE__ */ J(wn, [["render", Nn], ["__scopeId", "data-v-605f261e"], ["__file", "UpdateView.vue"]]), mt = Symbol("library-custom-comp");
|
|
1678
|
+
function Rn() {
|
|
1679
|
+
return ye(mt, null);
|
|
1655
1680
|
}
|
|
1656
|
-
const
|
|
1681
|
+
const Un = /* @__PURE__ */ z({
|
|
1657
1682
|
__name: "DetailView",
|
|
1658
1683
|
props: {
|
|
1659
1684
|
className: {},
|
|
@@ -1661,7 +1686,7 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1661
1686
|
},
|
|
1662
1687
|
setup(t, { expose: o }) {
|
|
1663
1688
|
o();
|
|
1664
|
-
const n = Fe(), e = Ne(), r =
|
|
1689
|
+
const n = Fe(), e = Ne(), r = Ke(), a = ve(), i = Rn(), l = me(), c = t;
|
|
1665
1690
|
let s;
|
|
1666
1691
|
const d = m({
|
|
1667
1692
|
pageType: "",
|
|
@@ -1679,15 +1704,15 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1679
1704
|
workflowId: ""
|
|
1680
1705
|
}
|
|
1681
1706
|
}), g = m([]), v = Ae("dataWidgets");
|
|
1682
|
-
function b(
|
|
1683
|
-
return
|
|
1684
|
-
typeof
|
|
1707
|
+
function b(N) {
|
|
1708
|
+
return N ? Object.entries(N).map(([G, F]) => {
|
|
1709
|
+
typeof F.modelValue == "boolean" ? F.fieldValue = F.modelValue ? "Yes" : "No" : F.fieldValue = F.modelValue;
|
|
1685
1710
|
const j = {
|
|
1686
1711
|
fieldKey: G,
|
|
1687
|
-
...
|
|
1712
|
+
...F
|
|
1688
1713
|
};
|
|
1689
1714
|
return j.widget?.readonly || j.validations?.some(
|
|
1690
|
-
(
|
|
1715
|
+
(pe) => pe.ruleName === "Required"
|
|
1691
1716
|
) ? j : {
|
|
1692
1717
|
...j,
|
|
1693
1718
|
validations: [
|
|
@@ -1695,17 +1720,17 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1695
1720
|
{
|
|
1696
1721
|
ruleName: "Required",
|
|
1697
1722
|
ruleParameter: "",
|
|
1698
|
-
errorMessage: `${
|
|
1723
|
+
errorMessage: `${fe(j.widget?.title) || j.fieldKey} is required`
|
|
1699
1724
|
}
|
|
1700
1725
|
]
|
|
1701
1726
|
};
|
|
1702
1727
|
}).filter((G) => G.widget && G.widget.widget !== "Hidden").filter((G) => !C.value.includes(G.fieldKey)) : [];
|
|
1703
1728
|
}
|
|
1704
|
-
const f = K(() =>
|
|
1705
|
-
const G =
|
|
1706
|
-
return
|
|
1707
|
-
const
|
|
1708
|
-
id:
|
|
1729
|
+
const f = K(() => ze(g.value)), p = K(() => d.value?.actions ? [...d.value.actions].reverse() : []), w = m(!0), Z = (N, H) => {
|
|
1730
|
+
const G = N.findIndex((F) => F.isCurrent);
|
|
1731
|
+
return N.map((F, j) => {
|
|
1732
|
+
const U = {
|
|
1733
|
+
id: F.id,
|
|
1709
1734
|
title: "",
|
|
1710
1735
|
proxy: "",
|
|
1711
1736
|
sub: "",
|
|
@@ -1713,140 +1738,140 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1713
1738
|
status: 1,
|
|
1714
1739
|
time: ""
|
|
1715
1740
|
};
|
|
1716
|
-
|
|
1717
|
-
const
|
|
1718
|
-
if (
|
|
1719
|
-
|
|
1741
|
+
U.title = F.workflowProcessApprovers[0]?.name;
|
|
1742
|
+
const pe = F.workflowProcessApprovers[F.workflowProcessApprovers.length - 1], Se = F.workflowHistorys[F.workflowHistorys.length - 1], we = Se?.workflowHistoryApprovers[Se?.workflowHistoryApprovers?.length - 1];
|
|
1743
|
+
if (pe && we && pe?.email?.toLowerCase() !== we?.approverEmail?.toLowerCase() && (U.title = `${we.name}`, U.proxy = `Proxy: ${pe.name}`), F.sort > 1 ? U.sub = "Approver Role: " + F.nodeName.replace("Submit", "").replace("Approve", "") : U.sub = "Submit Application", F.isCurrent && H !== -1)
|
|
1744
|
+
U.desc = "In Approval", U.status = 1;
|
|
1720
1745
|
else {
|
|
1721
|
-
const te =
|
|
1746
|
+
const te = F.workflowHistorys[F.workflowHistorys.length - 1];
|
|
1722
1747
|
if (te && te.status === 100)
|
|
1723
|
-
|
|
1748
|
+
U.time = Ve(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), U.status = 2, U.desc = "approve success!";
|
|
1724
1749
|
else if (te && te.status === 999)
|
|
1725
|
-
|
|
1750
|
+
U.time = Ve(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), U.status = 0, U.desc = "approve reject!";
|
|
1726
1751
|
else if (te)
|
|
1727
|
-
if (
|
|
1728
|
-
|
|
1752
|
+
if (U.time = Ve(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), F.sort === 1)
|
|
1753
|
+
U.status = 2, U.desc = "";
|
|
1729
1754
|
else {
|
|
1730
|
-
const
|
|
1731
|
-
|
|
1755
|
+
const xe = te.workflowHistoryApprovers[0];
|
|
1756
|
+
U.status = 3, U.desc = xe?.reason ? `Rejected reason: ${xe.reason}` : "Rejected";
|
|
1732
1757
|
}
|
|
1733
|
-
else j < G || G === -1 ? (
|
|
1758
|
+
else j < G || G === -1 ? (U.status = 0, U.desc = "Skipped") : (U.status = 0, U.desc = "Pending Approval");
|
|
1734
1759
|
te && te.status;
|
|
1735
1760
|
}
|
|
1736
|
-
return
|
|
1761
|
+
return U;
|
|
1737
1762
|
});
|
|
1738
1763
|
}, oe = m([]), E = m(!1), ee = m(!1), ne = m(!1), A = m(!1);
|
|
1739
1764
|
async function k() {
|
|
1740
|
-
const
|
|
1741
|
-
d.value.actions = d.value.actions?.filter((
|
|
1742
|
-
const G =
|
|
1765
|
+
const N = await s.getBtnList();
|
|
1766
|
+
d.value.actions = d.value.actions?.filter((H) => {
|
|
1767
|
+
const G = N.find((F) => F.button === H.title);
|
|
1743
1768
|
return G ? G.isShow : !0;
|
|
1744
|
-
}), E.value =
|
|
1769
|
+
}), E.value = N.find((H) => H.button === "IsGlobal")?.isShow ?? !1, ee.value = N.find((H) => H.button === "AssignButton")?.isShow ?? !1, ne.value = N.find((H) => H.button === "AssignList")?.isShow ?? !1, A.value = N.find((H) => H.button === "AddCommentsButton")?.isShow ?? !1;
|
|
1745
1770
|
}
|
|
1746
1771
|
const C = m([]);
|
|
1747
1772
|
async function T() {
|
|
1748
|
-
|
|
1749
|
-
const
|
|
1773
|
+
w.value = !0, s = new Ue().setPageActionType(be.Details).setClassName(c.className).setStore({ svrStore: n, bpmStore: e }).setWorkflowId(c.workflowId).build(), d.value = await s.getPageData();
|
|
1774
|
+
const N = await s.getFiles();
|
|
1750
1775
|
le.value = await s.getApprovers(), W.value = await s.getCommentsHistory(), se.value = await s.getAssociator(), await k(), r.detailPageLoaded?.(d, e().employeeInfo);
|
|
1751
|
-
const
|
|
1752
|
-
r.Test?.({ fieldValue:
|
|
1753
|
-
for (const
|
|
1754
|
-
if (d.value.fields[
|
|
1755
|
-
const j = g.value.find((
|
|
1756
|
-
j && j.widget && (j.widget.files =
|
|
1776
|
+
const H = d.value.fields.requestType.modelValue;
|
|
1777
|
+
r.Test?.({ fieldValue: H, hiddenFields: C }), g.value = b(d.value.fields);
|
|
1778
|
+
for (const F in d.value.fields)
|
|
1779
|
+
if (d.value.fields[F].widget?.widget === "File") {
|
|
1780
|
+
const j = g.value.find((U) => U.fieldKey === F);
|
|
1781
|
+
j && j.widget && (j.widget.files = N[F] ?? []);
|
|
1757
1782
|
}
|
|
1758
1783
|
const G = await s.getProcess();
|
|
1759
|
-
oe.value = Z(G, 0),
|
|
1784
|
+
oe.value = Z(G, 0), w.value = !1;
|
|
1760
1785
|
}
|
|
1761
|
-
|
|
1762
|
-
async function S(
|
|
1763
|
-
return r[
|
|
1786
|
+
ge(T);
|
|
1787
|
+
async function S(N, H) {
|
|
1788
|
+
return r[N]?.(H);
|
|
1764
1789
|
}
|
|
1765
|
-
function
|
|
1790
|
+
function I() {
|
|
1766
1791
|
return n()?.userInfo?.email_address ?? "";
|
|
1767
1792
|
}
|
|
1768
|
-
async function
|
|
1793
|
+
async function O(N, H, G, F, j) {
|
|
1769
1794
|
try {
|
|
1770
|
-
switch (
|
|
1795
|
+
switch (H) {
|
|
1771
1796
|
case X.Submit:
|
|
1772
|
-
let
|
|
1773
|
-
if (v.value?.forEach((
|
|
1774
|
-
|
|
1775
|
-
}), !
|
|
1797
|
+
let U = !0;
|
|
1798
|
+
if (v.value?.forEach((_e) => {
|
|
1799
|
+
_e?.validate && !_e.validate() && (U = !1);
|
|
1800
|
+
}), !U) {
|
|
1776
1801
|
l?.appContext.config.globalProperties.$message.error(
|
|
1777
1802
|
"Please complete all required fields before submit."
|
|
1778
1803
|
);
|
|
1779
1804
|
return;
|
|
1780
1805
|
}
|
|
1781
|
-
const { reason:
|
|
1806
|
+
const { reason: pe, ifGlobal: Se } = await S(j, {
|
|
1782
1807
|
isGlobal: E.value
|
|
1783
1808
|
});
|
|
1784
|
-
|
|
1785
|
-
const we = g.value.find((
|
|
1809
|
+
w.value = !0;
|
|
1810
|
+
const we = g.value.find((_e) => _e.fieldKey === "approvedGrade")?.modelValue, te = j === "Approve" ? "100" : "-1", xe = await Kt(
|
|
1786
1811
|
c.className,
|
|
1787
1812
|
c.workflowId,
|
|
1788
|
-
|
|
1789
|
-
|
|
1813
|
+
I(),
|
|
1814
|
+
pe,
|
|
1790
1815
|
G,
|
|
1791
1816
|
te,
|
|
1792
|
-
|
|
1817
|
+
Se,
|
|
1793
1818
|
{
|
|
1794
1819
|
approvedGrade: we
|
|
1795
1820
|
}
|
|
1796
1821
|
);
|
|
1797
1822
|
await S(`${j}Success`, {
|
|
1798
1823
|
workflowId: c.workflowId,
|
|
1799
|
-
res:
|
|
1800
|
-
}),
|
|
1801
|
-
const
|
|
1824
|
+
res: xe
|
|
1825
|
+
}), w.value = !1;
|
|
1826
|
+
const gt = j === "Approve" ? `Request ID ${c.workflowId} has been approved.` : `Request ID ${c.workflowId} has been rejected.`;
|
|
1802
1827
|
l?.appContext.config.globalProperties.$notification.success(
|
|
1803
|
-
|
|
1828
|
+
gt
|
|
1804
1829
|
), T();
|
|
1805
1830
|
break;
|
|
1806
1831
|
case X.Link:
|
|
1807
1832
|
try {
|
|
1808
|
-
await r[
|
|
1809
|
-
name:
|
|
1833
|
+
await r[N.eventName || ""]?.(), a.push({
|
|
1834
|
+
name: F,
|
|
1810
1835
|
params: { className: c.className, workflowId: c.workflowId }
|
|
1811
1836
|
});
|
|
1812
|
-
} catch (
|
|
1813
|
-
console.error("Error in link action trigger:",
|
|
1837
|
+
} catch (_e) {
|
|
1838
|
+
console.error("Error in link action trigger:", _e);
|
|
1814
1839
|
}
|
|
1815
1840
|
break;
|
|
1816
1841
|
case X.Button:
|
|
1817
|
-
await r[
|
|
1842
|
+
await r[N.eventName || ""]?.({
|
|
1818
1843
|
approvers: le,
|
|
1819
1844
|
associators: se,
|
|
1820
1845
|
isShowAssignSelect: ee,
|
|
1821
1846
|
isShowAssignList: ne,
|
|
1822
|
-
assignCallback:
|
|
1847
|
+
assignCallback: h,
|
|
1823
1848
|
deleteAssociatorCallback: B
|
|
1824
1849
|
});
|
|
1825
1850
|
break;
|
|
1826
1851
|
default:
|
|
1827
|
-
console.warn("Unknown action type:",
|
|
1852
|
+
console.warn("Unknown action type:", H);
|
|
1828
1853
|
}
|
|
1829
1854
|
} catch {
|
|
1830
1855
|
}
|
|
1831
1856
|
}
|
|
1832
|
-
const
|
|
1833
|
-
async function
|
|
1834
|
-
if (!
|
|
1857
|
+
const L = m(""), W = m([]), ie = m(""), le = m([]), se = m([]);
|
|
1858
|
+
async function h(N) {
|
|
1859
|
+
if (!N) {
|
|
1835
1860
|
l?.appContext.config.globalProperties.$message.error(
|
|
1836
1861
|
"Please select an approver"
|
|
1837
1862
|
);
|
|
1838
1863
|
return;
|
|
1839
1864
|
}
|
|
1840
|
-
await
|
|
1865
|
+
await P(
|
|
1841
1866
|
"Confirm Assign Approver",
|
|
1842
1867
|
"Do you want to assign the selected approver?"
|
|
1843
1868
|
);
|
|
1844
1869
|
try {
|
|
1845
|
-
await s.assignApprover(
|
|
1870
|
+
await s.assignApprover(N), se.value = await s.getAssociator(), k(), l?.appContext.config.globalProperties.$notification.success(
|
|
1846
1871
|
"Assign Approver clicked!"
|
|
1847
1872
|
);
|
|
1848
|
-
} catch (
|
|
1849
|
-
if (
|
|
1873
|
+
} catch (H) {
|
|
1874
|
+
if (H.status === 409) {
|
|
1850
1875
|
l?.appContext.config.globalProperties.$notification.error(
|
|
1851
1876
|
"This user is already an associator"
|
|
1852
1877
|
);
|
|
@@ -1857,22 +1882,22 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1857
1882
|
);
|
|
1858
1883
|
}
|
|
1859
1884
|
}
|
|
1860
|
-
async function
|
|
1885
|
+
async function P(N, H) {
|
|
1861
1886
|
const { Modal: G } = await import("@arco-design/web-vue");
|
|
1862
|
-
return new Promise((
|
|
1887
|
+
return new Promise((F, j) => {
|
|
1863
1888
|
G.confirm({
|
|
1864
|
-
title:
|
|
1865
|
-
content:
|
|
1889
|
+
title: N,
|
|
1890
|
+
content: H,
|
|
1866
1891
|
okText: "OK",
|
|
1867
1892
|
cancelText: "Cancel",
|
|
1868
|
-
onOk: () =>
|
|
1893
|
+
onOk: () => F(!0),
|
|
1869
1894
|
onCancel: () => j()
|
|
1870
1895
|
});
|
|
1871
1896
|
});
|
|
1872
1897
|
}
|
|
1873
|
-
async function B(
|
|
1898
|
+
async function B(N) {
|
|
1874
1899
|
try {
|
|
1875
|
-
await
|
|
1900
|
+
await P(
|
|
1876
1901
|
"Confirm Delete Associator",
|
|
1877
1902
|
"Do you want to delete this associator?"
|
|
1878
1903
|
);
|
|
@@ -1880,7 +1905,7 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1880
1905
|
return;
|
|
1881
1906
|
}
|
|
1882
1907
|
try {
|
|
1883
|
-
await s.deleteAssociator(
|
|
1908
|
+
await s.deleteAssociator(N.toString()), se.value = await s.getAssociator(), l?.appContext.config.globalProperties.$notification.success(
|
|
1884
1909
|
"Associator deleted successfully!"
|
|
1885
1910
|
);
|
|
1886
1911
|
} catch {
|
|
@@ -1890,104 +1915,104 @@ const Nn = /* @__PURE__ */ z({
|
|
|
1890
1915
|
}
|
|
1891
1916
|
}
|
|
1892
1917
|
async function de() {
|
|
1893
|
-
if (!
|
|
1918
|
+
if (!L.value.trim()) {
|
|
1894
1919
|
l?.appContext.config.globalProperties.$message.error(
|
|
1895
1920
|
"Comment cannot be empty"
|
|
1896
1921
|
);
|
|
1897
1922
|
return;
|
|
1898
1923
|
}
|
|
1899
|
-
await s.addComments(
|
|
1924
|
+
await s.addComments(L.value.trim()), L.value = "", W.value = await s.getCommentsHistory(), l?.appContext.config.globalProperties.$notification.success(
|
|
1900
1925
|
"Add Comment clicked!"
|
|
1901
1926
|
);
|
|
1902
1927
|
}
|
|
1903
|
-
function
|
|
1904
|
-
return
|
|
1928
|
+
function fe(N) {
|
|
1929
|
+
return N ? N === "OtherInformationText" ? "Other Information" : N : "";
|
|
1905
1930
|
}
|
|
1906
|
-
const
|
|
1931
|
+
const We = { svrStore: n, bpmStore: e, triggers: r, router: a, customComps: i, instance: l, props: c, get page() {
|
|
1907
1932
|
return s;
|
|
1908
|
-
}, set page(
|
|
1909
|
-
s =
|
|
1910
|
-
}, pageData: d, _fields: g, dataWidgetsRefs: v, genField: b, groupedFields: f, reversedActions: p, loading:
|
|
1911
|
-
return
|
|
1912
|
-
}, TopBar:
|
|
1913
|
-
return
|
|
1914
|
-
}, ToolTip:
|
|
1915
|
-
return Object.defineProperty(
|
|
1933
|
+
}, set page(N) {
|
|
1934
|
+
s = N;
|
|
1935
|
+
}, pageData: d, _fields: g, dataWidgetsRefs: v, genField: b, groupedFields: f, reversedActions: p, loading: w, mapWorkflowSteps: Z, steps: oe, isGlobal: E, isShowAssignSelect: ee, isShowAssignList: ne, isShowCommentTextArea: A, reloadButtonList: k, hiddenFields: C, load: T, triggerFn: S, getApproverEmail: I, clickHandler: O, comment: L, commentsHistory: W, selectedApprover: ie, approvers: le, associators: se, onAssignApprover: h, confirmDialog: P, onDeleteAssociator: B, onAddComment: de, formatTitle: fe, ActionButton: Pe, get IconDownload() {
|
|
1936
|
+
return Bo;
|
|
1937
|
+
}, TopBar: Re, get formatDate() {
|
|
1938
|
+
return Ve;
|
|
1939
|
+
}, ToolTip: dt, DataWidgets: Ie };
|
|
1940
|
+
return Object.defineProperty(We, "__isScriptSetup", { enumerable: !1, value: !0 }), We;
|
|
1916
1941
|
}
|
|
1917
|
-
}),
|
|
1942
|
+
}), Dn = { class: "page-container" }, Bn = { class: "page-body" }, Ln = { class: "detail-card" }, Hn = { class: "form-fields-vertical" }, On = { class: "detail-fields" }, $n = { class: "detail-field" }, jn = {
|
|
1918
1943
|
key: 0,
|
|
1919
1944
|
class: "detail-field"
|
|
1920
|
-
},
|
|
1945
|
+
}, Mn = { class: "field-label" }, En = {
|
|
1921
1946
|
key: 1,
|
|
1922
1947
|
class: "field-value"
|
|
1923
|
-
},
|
|
1948
|
+
}, Kn = {
|
|
1924
1949
|
key: 2,
|
|
1925
1950
|
class: "detail-field-wrapper"
|
|
1926
|
-
},
|
|
1951
|
+
}, zn = { class: "detail-field" }, Wn = {
|
|
1927
1952
|
key: 0,
|
|
1928
1953
|
class: "detail-content"
|
|
1929
|
-
},
|
|
1930
|
-
function
|
|
1954
|
+
}, Gn = { class: "page-footer" }, qn = { class: "action-container" }, Yn = { class: "action-buttons" };
|
|
1955
|
+
function Qn(t, o, n, e, r, a) {
|
|
1931
1956
|
const i = V("a-link"), l = V("a-space"), c = V("a-card");
|
|
1932
1957
|
V("a-option"), V("a-select");
|
|
1933
1958
|
const s = V("a-button"), d = V("a-list-item"), g = V("a-list"), v = V("a-textarea"), b = V("a-spin");
|
|
1934
|
-
return u(), _("div",
|
|
1935
|
-
|
|
1959
|
+
return u(), _("div", Dn, [
|
|
1960
|
+
R(e.TopBar, {
|
|
1936
1961
|
title: e.pageData.banner.title,
|
|
1937
1962
|
subTitle: e.pageData.banner.subTitle,
|
|
1938
1963
|
email: e.getApproverEmail()
|
|
1939
1964
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1940
|
-
y("div",
|
|
1941
|
-
|
|
1965
|
+
y("div", Bn, [
|
|
1966
|
+
R(b, {
|
|
1942
1967
|
loading: e.loading,
|
|
1943
1968
|
class: "detail-container"
|
|
1944
1969
|
}, {
|
|
1945
1970
|
default: x(() => [
|
|
1946
|
-
y("div",
|
|
1947
|
-
(u(), D(
|
|
1948
|
-
y("div",
|
|
1949
|
-
(u(!0), _(
|
|
1971
|
+
y("div", Ln, [
|
|
1972
|
+
(u(), D(je(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
|
|
1973
|
+
y("div", Hn, [
|
|
1974
|
+
(u(!0), _($, null, M(e.groupedFields, (f) => (u(), D(c, {
|
|
1950
1975
|
key: f.name,
|
|
1951
1976
|
title: f.name,
|
|
1952
1977
|
style: { "margin-bottom": "24px" }
|
|
1953
1978
|
}, {
|
|
1954
1979
|
default: x(() => [
|
|
1955
|
-
y("div",
|
|
1956
|
-
(u(!0), _(
|
|
1980
|
+
y("div", On, [
|
|
1981
|
+
(u(!0), _($, null, M(f.fields, (p) => (u(), _("div", {
|
|
1957
1982
|
key: p.fieldKey,
|
|
1958
1983
|
class: "detail-field-wrapper"
|
|
1959
1984
|
}, [
|
|
1960
|
-
y("div",
|
|
1961
|
-
p.widget?.readonly ? (u(), _(
|
|
1962
|
-
y("div",
|
|
1985
|
+
y("div", $n, [
|
|
1986
|
+
p.widget?.readonly ? (u(), _($, { key: 1 }, [
|
|
1987
|
+
y("div", Mn, [
|
|
1963
1988
|
ae(Q(e.formatTitle(p.widget?.title)) + " ", 1),
|
|
1964
|
-
|
|
1989
|
+
R(e.ToolTip, {
|
|
1965
1990
|
"is-visible": p.widget?.isVisible ?? !1,
|
|
1966
1991
|
"output-text": p.widget?.outputText ?? []
|
|
1967
1992
|
}, null, 8, ["is-visible", "output-text"])
|
|
1968
1993
|
]),
|
|
1969
|
-
p.widget?.widget === "File" ? (u(!0), _(
|
|
1994
|
+
p.widget?.widget === "File" ? (u(!0), _($, { key: 0 }, M(p.widget.files, (w) => (u(), _("div", {
|
|
1970
1995
|
class: "field-value",
|
|
1971
|
-
key:
|
|
1996
|
+
key: w.id
|
|
1972
1997
|
}, [
|
|
1973
|
-
|
|
1998
|
+
R(l, null, {
|
|
1974
1999
|
default: x(() => [
|
|
1975
|
-
ae(Q(
|
|
1976
|
-
|
|
1977
|
-
href:
|
|
2000
|
+
ae(Q(w.name) + " ", 1),
|
|
2001
|
+
R(i, {
|
|
2002
|
+
href: w.url,
|
|
1978
2003
|
target: "_blank"
|
|
1979
2004
|
}, {
|
|
1980
2005
|
default: x(() => [
|
|
1981
|
-
|
|
2006
|
+
R(e.IconDownload, { style: { color: "#7A00E6" } })
|
|
1982
2007
|
]),
|
|
1983
2008
|
_: 2
|
|
1984
2009
|
}, 1032, ["href"])
|
|
1985
2010
|
]),
|
|
1986
2011
|
_: 2
|
|
1987
2012
|
}, 1024)
|
|
1988
|
-
]))), 128)) : (u(), _("div",
|
|
1989
|
-
], 64)) : (u(), _("div",
|
|
1990
|
-
|
|
2013
|
+
]))), 128)) : (u(), _("div", En, Q(p.fieldValue), 1))
|
|
2014
|
+
], 64)) : (u(), _("div", jn, [
|
|
2015
|
+
R(e.DataWidgets, {
|
|
1991
2016
|
ref_for: !0,
|
|
1992
2017
|
ref: "dataWidgets",
|
|
1993
2018
|
"field-key": p.fieldKey,
|
|
@@ -1995,7 +2020,7 @@ function Gn(t, o, n, e, r, a) {
|
|
|
1995
2020
|
config: p,
|
|
1996
2021
|
"class-name": n.className,
|
|
1997
2022
|
modelValue: p.modelValue,
|
|
1998
|
-
"onUpdate:modelValue": (
|
|
2023
|
+
"onUpdate:modelValue": (w) => p.modelValue = w,
|
|
1999
2024
|
class: "form-field"
|
|
2000
2025
|
}, null, 8, ["field-key", "name", "config", "class-name", "modelValue", "onUpdate:modelValue"])
|
|
2001
2026
|
]))
|
|
@@ -2007,14 +2032,14 @@ function Gn(t, o, n, e, r, a) {
|
|
|
2007
2032
|
}, 1032, ["title"]))), 128)),
|
|
2008
2033
|
re("", !0),
|
|
2009
2034
|
re("", !0),
|
|
2010
|
-
e.isShowCommentTextArea ? (u(), _("div",
|
|
2011
|
-
y("div",
|
|
2035
|
+
e.isShowCommentTextArea ? (u(), _("div", Kn, [
|
|
2036
|
+
y("div", zn, [
|
|
2012
2037
|
o[6] || (o[6] = y("div", { class: "field-label" }, "Comment", -1)),
|
|
2013
|
-
|
|
2038
|
+
R(v, {
|
|
2014
2039
|
modelValue: e.comment,
|
|
2015
2040
|
"onUpdate:modelValue": o[1] || (o[1] = (f) => e.comment = f)
|
|
2016
2041
|
}, null, 8, ["modelValue"]),
|
|
2017
|
-
|
|
2042
|
+
R(s, {
|
|
2018
2043
|
type: "primary",
|
|
2019
2044
|
onClick: e.onAddComment
|
|
2020
2045
|
}, {
|
|
@@ -2031,7 +2056,7 @@ function Gn(t, o, n, e, r, a) {
|
|
|
2031
2056
|
ae(" Comments History ", -1)
|
|
2032
2057
|
])),
|
|
2033
2058
|
default: x(() => [
|
|
2034
|
-
(u(!0), _(
|
|
2059
|
+
(u(!0), _($, null, M(e.commentsHistory, (f) => (u(), D(d, {
|
|
2035
2060
|
key: f.associator
|
|
2036
2061
|
}, {
|
|
2037
2062
|
default: x(() => [
|
|
@@ -2043,7 +2068,7 @@ function Gn(t, o, n, e, r, a) {
|
|
|
2043
2068
|
_: 1
|
|
2044
2069
|
})) : re("", !0)
|
|
2045
2070
|
]),
|
|
2046
|
-
t.$slots.content ? (u(), _("div",
|
|
2071
|
+
t.$slots.content ? (u(), _("div", Wn, [
|
|
2047
2072
|
ue(t.$slots, "content", {}, void 0, !0)
|
|
2048
2073
|
])) : re("", !0)
|
|
2049
2074
|
])
|
|
@@ -2051,11 +2076,11 @@ function Gn(t, o, n, e, r, a) {
|
|
|
2051
2076
|
_: 3
|
|
2052
2077
|
}, 8, ["loading"])
|
|
2053
2078
|
]),
|
|
2054
|
-
y("div",
|
|
2055
|
-
y("div",
|
|
2079
|
+
y("div", Gn, [
|
|
2080
|
+
y("div", qn, [
|
|
2056
2081
|
ue(t.$slots, "action", {}, void 0, !0),
|
|
2057
|
-
y("div",
|
|
2058
|
-
(u(!0), _(
|
|
2082
|
+
y("div", Yn, [
|
|
2083
|
+
(u(!0), _($, null, M(e.reversedActions, (f) => (u(), D(e.ActionButton, {
|
|
2059
2084
|
key: f.title,
|
|
2060
2085
|
loading: e.loading,
|
|
2061
2086
|
config: f,
|
|
@@ -2067,7 +2092,7 @@ function Gn(t, o, n, e, r, a) {
|
|
|
2067
2092
|
])
|
|
2068
2093
|
]);
|
|
2069
2094
|
}
|
|
2070
|
-
const
|
|
2095
|
+
const Jn = /* @__PURE__ */ J(Un, [["render", Qn], ["__scopeId", "data-v-117ace1a"], ["__file", "DetailView.vue"]]), Xn = /* @__PURE__ */ z({
|
|
2071
2096
|
name: "ListView",
|
|
2072
2097
|
__name: "ListView",
|
|
2073
2098
|
props: {
|
|
@@ -2075,7 +2100,7 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2075
2100
|
},
|
|
2076
2101
|
setup(t, { expose: o }) {
|
|
2077
2102
|
o();
|
|
2078
|
-
const n = Fe(), e = Ne(), r =
|
|
2103
|
+
const n = Fe(), e = Ne(), r = ve(), a = me(), i = t, l = m(), c = vt({
|
|
2079
2104
|
current: 1,
|
|
2080
2105
|
total: 0,
|
|
2081
2106
|
pageSize: 10,
|
|
@@ -2085,11 +2110,11 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2085
2110
|
filters: []
|
|
2086
2111
|
});
|
|
2087
2112
|
function s() {
|
|
2088
|
-
const
|
|
2089
|
-
const
|
|
2113
|
+
const h = Object.entries(S.value).filter(([, { value: P }]) => P && P !== "").map(([P, { value: B, operator: de }]) => {
|
|
2114
|
+
const fe = typeof B == "string" ? B.trim() : B;
|
|
2090
2115
|
return {
|
|
2091
|
-
key:
|
|
2092
|
-
value:
|
|
2116
|
+
key: P,
|
|
2117
|
+
value: fe,
|
|
2093
2118
|
operator: de
|
|
2094
2119
|
// 根据实际需要调整操作符
|
|
2095
2120
|
};
|
|
@@ -2097,7 +2122,7 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2097
2122
|
return {
|
|
2098
2123
|
pageNumber: c.current,
|
|
2099
2124
|
pageSize: c.pageSize,
|
|
2100
|
-
filters: [...c.filters, ...
|
|
2125
|
+
filters: [...c.filters, ...h],
|
|
2101
2126
|
sorts: [{
|
|
2102
2127
|
key: "workflowId",
|
|
2103
2128
|
type: 1
|
|
@@ -2108,8 +2133,8 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2108
2133
|
x: b.value.length * 150 + 250
|
|
2109
2134
|
// 只设置横向滚动
|
|
2110
2135
|
// 移除 y 属性,让表格高度自适应
|
|
2111
|
-
})), g = (
|
|
2112
|
-
const
|
|
2136
|
+
})), g = (h) => {
|
|
2137
|
+
const P = Object.entries(h).filter(([, B]) => B.widget?.column).map(([B, de], fe) => ({
|
|
2113
2138
|
title: de.widget.title,
|
|
2114
2139
|
dataIndex: B.charAt(0).toLowerCase() + B.slice(1),
|
|
2115
2140
|
order: de.order,
|
|
@@ -2121,7 +2146,7 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2121
2146
|
resizable: !0
|
|
2122
2147
|
// 启用列宽调整
|
|
2123
2148
|
})).sort((B, de) => B.order - de.order);
|
|
2124
|
-
|
|
2149
|
+
P.push({
|
|
2125
2150
|
title: "Actions",
|
|
2126
2151
|
slotName: "optional",
|
|
2127
2152
|
align: "center",
|
|
@@ -2129,95 +2154,95 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
|
|
|
2129
2154
|
minWidth: 200,
|
|
2130
2155
|
fixed: "right",
|
|
2131
2156
|
resizable: !1
|
|
2132
|
-
}), b.value =
|
|
2133
|
-
}, v = m([]), b = m([]), f = m(!0), p = m(!0),
|
|
2157
|
+
}), b.value = P;
|
|
2158
|
+
}, v = m([]), b = m([]), f = m(!0), p = m(!0), w = m(), Z = async () => {
|
|
2134
2159
|
p.value = !0;
|
|
2135
|
-
const
|
|
2136
|
-
v.value =
|
|
2160
|
+
const h = await Bt(i.className, s());
|
|
2161
|
+
v.value = h.data, c.total = h.totalCount, p.value = !1;
|
|
2137
2162
|
}, oe = m(!1);
|
|
2138
|
-
|
|
2163
|
+
ge(async () => {
|
|
2139
2164
|
f.value = !0;
|
|
2140
|
-
const
|
|
2141
|
-
l.value = await
|
|
2142
|
-
}),
|
|
2165
|
+
const h = new Ue().setPageActionType(be.List).setClassName(i.className).setStore({ svrStore: n, bpmStore: e }).build();
|
|
2166
|
+
l.value = await h.getPageData(), g(l.value.fields), O(l.value.fields), L(), T(l.value?.tabs?.[0]?.key || ""), w.value = l.value.actions, f.value = !1, oe.value = !0;
|
|
2167
|
+
}), bt(() => {
|
|
2143
2168
|
oe.value && Z();
|
|
2144
2169
|
});
|
|
2145
|
-
const E = (
|
|
2146
|
-
c.current =
|
|
2147
|
-
}, ee = (
|
|
2148
|
-
c.pageSize =
|
|
2170
|
+
const E = (h) => {
|
|
2171
|
+
c.current = h, Z();
|
|
2172
|
+
}, ee = (h) => {
|
|
2173
|
+
c.pageSize = h, Z();
|
|
2149
2174
|
};
|
|
2150
|
-
function ne(
|
|
2151
|
-
switch (
|
|
2175
|
+
function ne(h, P, B, de, fe) {
|
|
2176
|
+
switch (h) {
|
|
2152
2177
|
case X.Link:
|
|
2153
|
-
r.push({ name: B, params: { workflowId:
|
|
2178
|
+
r.push({ name: B, params: { workflowId: fe } });
|
|
2154
2179
|
break;
|
|
2155
2180
|
default:
|
|
2156
|
-
console.warn("Unknown action type:",
|
|
2181
|
+
console.warn("Unknown action type:", h);
|
|
2157
2182
|
}
|
|
2158
2183
|
}
|
|
2159
|
-
function A(
|
|
2160
|
-
switch (
|
|
2184
|
+
function A(h, P, B) {
|
|
2185
|
+
switch (h) {
|
|
2161
2186
|
case X.Submit:
|
|
2162
|
-
|
|
2187
|
+
oo(P, { filters: [{ key: "approverList", value: k(), operator: 2 }] }), a?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
2163
2188
|
break;
|
|
2164
2189
|
case X.Link:
|
|
2165
2190
|
r.push({ name: B });
|
|
2166
2191
|
break;
|
|
2167
2192
|
default:
|
|
2168
|
-
console.warn("Unknown action type:",
|
|
2193
|
+
console.warn("Unknown action type:", h);
|
|
2169
2194
|
}
|
|
2170
2195
|
}
|
|
2171
2196
|
function k() {
|
|
2172
2197
|
return n()?.userInfo?.email_address ?? "";
|
|
2173
2198
|
}
|
|
2174
|
-
function C(
|
|
2175
|
-
return typeof
|
|
2199
|
+
function C(h, P) {
|
|
2200
|
+
return typeof h != "string" || h.indexOf("{currentUserEmail}") === -1 ? h : h.replace(/{currentUserEmail}/g, P);
|
|
2176
2201
|
}
|
|
2177
|
-
function T(
|
|
2178
|
-
const
|
|
2179
|
-
c.filters =
|
|
2202
|
+
function T(h) {
|
|
2203
|
+
const P = l.value?.tabs?.find((B) => B.key === h)?.filters;
|
|
2204
|
+
c.filters = P?.map((B) => ({
|
|
2180
2205
|
...B,
|
|
2181
2206
|
value: C(B.value, k())
|
|
2182
2207
|
})) || [], c.current = 1, Z();
|
|
2183
2208
|
}
|
|
2184
|
-
const S = m({}),
|
|
2185
|
-
function
|
|
2186
|
-
if (!
|
|
2187
|
-
|
|
2209
|
+
const S = m({}), I = m([]);
|
|
2210
|
+
function O(h) {
|
|
2211
|
+
if (!h) return [];
|
|
2212
|
+
I.value = Object.entries(h).filter(([, P]) => P.isFiltered).map(([P, B]) => ({ fieldKey: P, fieldConfig: B }));
|
|
2188
2213
|
}
|
|
2189
|
-
const
|
|
2190
|
-
const
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
}), S.value =
|
|
2214
|
+
const L = () => {
|
|
2215
|
+
const h = {};
|
|
2216
|
+
I.value.forEach(({ fieldKey: P, fieldConfig: B }) => {
|
|
2217
|
+
h[P] = {}, h[P].value = B.modelValue, h[P].operator = B.operator;
|
|
2218
|
+
}), S.value = h;
|
|
2194
2219
|
}, W = () => {
|
|
2195
2220
|
c.current = 1, Z();
|
|
2196
2221
|
}, ie = () => {
|
|
2197
|
-
l.value &&
|
|
2222
|
+
l.value && L(), W();
|
|
2198
2223
|
};
|
|
2199
|
-
function le(
|
|
2200
|
-
return !(
|
|
2224
|
+
function le(h, P) {
|
|
2225
|
+
return !(h.location !== "InTable" || h.title === "Update" && (P.sort === 3 || P.status === 100 || P.status === -1));
|
|
2201
2226
|
}
|
|
2202
|
-
const se = { svrStore: n, bpmStore: e, router: r, instance: a, props: i, pageData: l, paging: c, createListParams: s, scroll: d, mapColumns: g, _data: v, _columns: b, loadingPage: f, loadingTable: p, actions:
|
|
2227
|
+
const se = { svrStore: n, bpmStore: e, router: r, instance: a, props: i, pageData: l, paging: c, createListParams: s, scroll: d, mapColumns: g, _data: v, _columns: b, loadingPage: f, loadingTable: p, actions: w, loadData: Z, mounted: oe, pageChangeHandler: E, pageSizeChangeHandler: ee, clickHandler: ne, createHandler: A, getApproverEmail: k, replaceEmail: C, tabHandler: T, searchForm: S, searchableFields: I, mapSearchableFields: O, initSearchForm: L, handleSearch: W, handleReset: ie, judgeHiddenActions: le, ActionButton: Pe, DataWidgets: Ie, TopBar: Re };
|
|
2203
2228
|
return Object.defineProperty(se, "__isScriptSetup", { enumerable: !1, value: !0 }), se;
|
|
2204
2229
|
}
|
|
2205
|
-
}),
|
|
2206
|
-
function
|
|
2230
|
+
}), Zn = { class: "list-container" }, ea = { class: "query-title" };
|
|
2231
|
+
function ta(t, o, n, e, r, a) {
|
|
2207
2232
|
const i = V("a-space"), l = V("a-col"), c = V("a-button"), s = V("a-row"), d = V("a-card"), g = V("a-tab-pane"), v = V("a-tabs"), b = V("a-table");
|
|
2208
|
-
return u(), _("div",
|
|
2209
|
-
|
|
2233
|
+
return u(), _("div", Zn, [
|
|
2234
|
+
R(e.TopBar, {
|
|
2210
2235
|
title: e.pageData?.banner.title ?? "",
|
|
2211
2236
|
subTitle: e.pageData?.banner.subTitle ?? "",
|
|
2212
2237
|
email: e.getApproverEmail()
|
|
2213
2238
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
2214
|
-
|
|
2239
|
+
R(d, null, {
|
|
2215
2240
|
default: x(() => [
|
|
2216
|
-
y("div",
|
|
2241
|
+
y("div", ea, [
|
|
2217
2242
|
o[0] || (o[0] = y("h3", null, "Search Conditions", -1)),
|
|
2218
|
-
|
|
2243
|
+
R(i, { size: "medium" }, {
|
|
2219
2244
|
default: x(() => [
|
|
2220
|
-
(u(!0), _(
|
|
2245
|
+
(u(!0), _($, null, M(e.actions, (f) => (u(), _($, {
|
|
2221
2246
|
key: f.title
|
|
2222
2247
|
}, [
|
|
2223
2248
|
f.location === "InOperation" ? (u(), D(e.ActionButton, {
|
|
@@ -2230,15 +2255,15 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2230
2255
|
_: 1
|
|
2231
2256
|
})
|
|
2232
2257
|
]),
|
|
2233
|
-
|
|
2258
|
+
R(s, { gutter: [24, 20] }, {
|
|
2234
2259
|
default: x(() => [
|
|
2235
|
-
(u(!0), _(
|
|
2260
|
+
(u(!0), _($, null, M(e.searchableFields, (f) => (u(), D(l, {
|
|
2236
2261
|
key: f.fieldKey,
|
|
2237
2262
|
span: 6,
|
|
2238
2263
|
class: "search-col"
|
|
2239
2264
|
}, {
|
|
2240
2265
|
default: x(() => [
|
|
2241
|
-
|
|
2266
|
+
R(e.DataWidgets, {
|
|
2242
2267
|
name: f.fieldKey,
|
|
2243
2268
|
config: f.fieldConfig,
|
|
2244
2269
|
modelValue: e.searchForm[f.fieldKey].value,
|
|
@@ -2248,14 +2273,14 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2248
2273
|
]),
|
|
2249
2274
|
_: 2
|
|
2250
2275
|
}, 1024))), 128)),
|
|
2251
|
-
|
|
2276
|
+
R(l, {
|
|
2252
2277
|
span: 6,
|
|
2253
2278
|
class: "search-col form-buttons"
|
|
2254
2279
|
}, {
|
|
2255
2280
|
default: x(() => [
|
|
2256
|
-
|
|
2281
|
+
R(i, { size: "medium" }, {
|
|
2257
2282
|
default: x(() => [
|
|
2258
|
-
|
|
2283
|
+
R(c, {
|
|
2259
2284
|
type: "primary",
|
|
2260
2285
|
size: "medium",
|
|
2261
2286
|
onClick: e.handleSearch
|
|
@@ -2266,7 +2291,7 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2266
2291
|
_: 1,
|
|
2267
2292
|
__: [1]
|
|
2268
2293
|
}),
|
|
2269
|
-
|
|
2294
|
+
R(c, {
|
|
2270
2295
|
size: "medium",
|
|
2271
2296
|
onClick: e.handleReset
|
|
2272
2297
|
}, {
|
|
@@ -2288,19 +2313,19 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2288
2313
|
]),
|
|
2289
2314
|
_: 1
|
|
2290
2315
|
}),
|
|
2291
|
-
|
|
2316
|
+
R(v, {
|
|
2292
2317
|
size: "large",
|
|
2293
2318
|
onTabClick: e.tabHandler
|
|
2294
2319
|
}, {
|
|
2295
2320
|
default: x(() => [
|
|
2296
|
-
(u(!0), _(
|
|
2321
|
+
(u(!0), _($, null, M(e.pageData?.tabs, (f) => (u(), D(g, {
|
|
2297
2322
|
key: f.key,
|
|
2298
2323
|
title: f.title
|
|
2299
2324
|
}, null, 8, ["title"]))), 128))
|
|
2300
2325
|
]),
|
|
2301
2326
|
_: 1
|
|
2302
2327
|
}),
|
|
2303
|
-
|
|
2328
|
+
R(b, {
|
|
2304
2329
|
columns: e._columns,
|
|
2305
2330
|
data: e._data,
|
|
2306
2331
|
stripe: "",
|
|
@@ -2320,16 +2345,16 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2320
2345
|
onPageSizeChange: e.pageSizeChangeHandler
|
|
2321
2346
|
}, {
|
|
2322
2347
|
optional: x(({ record: f }) => [
|
|
2323
|
-
|
|
2348
|
+
R(i, { size: "small" }, {
|
|
2324
2349
|
default: x(() => [
|
|
2325
|
-
(u(!0), _(
|
|
2350
|
+
(u(!0), _($, null, M(e.actions, (p) => (u(), _($, {
|
|
2326
2351
|
key: p.title
|
|
2327
2352
|
}, [
|
|
2328
2353
|
e.judgeHiddenActions(p, f) ? (u(), D(e.ActionButton, {
|
|
2329
2354
|
key: 0,
|
|
2330
2355
|
config: p,
|
|
2331
2356
|
size: "small",
|
|
2332
|
-
onClick: (...
|
|
2357
|
+
onClick: (...w) => e.clickHandler(...w, f.workflowId)
|
|
2333
2358
|
}, null, 8, ["config", "onClick"])) : re("", !0)
|
|
2334
2359
|
], 64))), 128))
|
|
2335
2360
|
]),
|
|
@@ -2340,12 +2365,12 @@ function Xn(t, o, n, e, r, a) {
|
|
|
2340
2365
|
}, 8, ["columns", "data", "pagination", "loading", "scroll"])
|
|
2341
2366
|
]);
|
|
2342
2367
|
}
|
|
2343
|
-
const
|
|
2368
|
+
const oa = /* @__PURE__ */ J(Xn, [["render", ta], ["__scopeId", "data-v-a24e1b40"], ["__file", "ListView.vue"]]), la = {
|
|
2344
2369
|
install(t, o = {}) {
|
|
2345
|
-
o.config &&
|
|
2370
|
+
o.config && Vt(o.config), o.router && (Tt(o.router), t.provide(tt, o.router)), o.pinia && t.provide(Zo, o.pinia), o.useBpmStore && t.provide(ft, o.useBpmStore), o.useSvrStore && t.provide(pt, o.useSvrStore), o.triggers && t.provide(ut, o.triggers), o.customComps && t.provide(mt, o.customComps), t.component("CreateView", hn), t.component("UpdateView", Fn), t.component("DetailView", Jn), t.component("ListView", oa);
|
|
2346
2371
|
}
|
|
2347
2372
|
};
|
|
2348
2373
|
export {
|
|
2349
|
-
|
|
2374
|
+
la as default
|
|
2350
2375
|
};
|
|
2351
2376
|
//# sourceMappingURL=index.es.js.map
|