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