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