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