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