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