@chase-shao/vue-component-lib 1.2.50 → 1.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data-gen/actions/index.vue.d.ts +1 -0
- package/dist/components/data-gen/actions/types.d.ts +1 -0
- 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 +582 -569
- 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 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as k, defineComponent as
|
|
1
|
+
import { ref as k, defineComponent as K, mergeModels as ne, useModel as ge, resolveComponent as V, createBlock as F, openBlock as d, onMounted as re, computed as O, withCtx as b, createElementBlock as $, Fragment as D, renderList as B, createVNode as N, nextTick as Ze, createTextVNode as Y, useTemplateRef as Ae, createElementVNode as h, createCommentVNode as ae, toDisplayString as W, resolveDynamicComponent as Te, renderSlot as se, inject as ce, getCurrentInstance as _e, reactive as Ue, normalizeStyle as et, normalizeClass as tt, unref as Ve, onActivated as nt } from "vue";
|
|
2
2
|
import ot from "axios";
|
|
3
3
|
import { defineStore as at } from "pinia";
|
|
4
4
|
import { Modal as st } from "@arco-design/web-vue";
|
|
5
5
|
import { useRouter as rt } from "vue-router";
|
|
6
|
-
const
|
|
6
|
+
const lt = at("main", () => ({
|
|
7
7
|
token: k(void 0)
|
|
8
|
-
})),
|
|
8
|
+
})), it = async (e) => new Promise((t) => setTimeout(t, e)), ct = async (e, t, a, n = void 0) => {
|
|
9
9
|
if (e[t] === void 0)
|
|
10
10
|
try {
|
|
11
11
|
e[t] = null, e[t] = await a() || n;
|
|
@@ -13,9 +13,9 @@ const it = at("main", () => ({
|
|
|
13
13
|
console.error(o), e[t] = void 0;
|
|
14
14
|
}
|
|
15
15
|
for (; e[t] === null; )
|
|
16
|
-
await
|
|
16
|
+
await it(100);
|
|
17
17
|
return e[t];
|
|
18
|
-
},
|
|
18
|
+
}, pe = (e) => {
|
|
19
19
|
const t = `0${e}`;
|
|
20
20
|
return t.substring(t.length - 2);
|
|
21
21
|
}, ve = (e, t = "yyyy-MM-dd hh:mm:ss") => {
|
|
@@ -25,15 +25,15 @@ const it = at("main", () => ({
|
|
|
25
25
|
const a = new Date(e), n = [
|
|
26
26
|
["yyyy", a.getFullYear()],
|
|
27
27
|
["yy", a.getFullYear().toString().substring(2)],
|
|
28
|
-
["MM",
|
|
28
|
+
["MM", pe(a.getMonth() + 1)],
|
|
29
29
|
["M", a.getMonth() + 1],
|
|
30
|
-
["dd",
|
|
30
|
+
["dd", pe(a.getDate())],
|
|
31
31
|
["d", a.getDate()],
|
|
32
|
-
["hh",
|
|
32
|
+
["hh", pe(a.getHours())],
|
|
33
33
|
["h", a.getHours()],
|
|
34
|
-
["mm",
|
|
34
|
+
["mm", pe(a.getMinutes())],
|
|
35
35
|
["m", a.getMinutes()],
|
|
36
|
-
["ss",
|
|
36
|
+
["ss", pe(a.getSeconds())],
|
|
37
37
|
["s", a.getSeconds()]
|
|
38
38
|
];
|
|
39
39
|
for (const [o, l] of n)
|
|
@@ -47,18 +47,18 @@ let Ie = {};
|
|
|
47
47
|
function ut(e) {
|
|
48
48
|
Ie = { ...Ie, ...e };
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Ne() {
|
|
51
51
|
return Ie;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const e =
|
|
53
|
+
function Ke() {
|
|
54
|
+
const e = Ne();
|
|
55
55
|
return {
|
|
56
56
|
apiBase: e.apiBase || void 0 || "",
|
|
57
57
|
appSecret: e.appSecret || void 0 || ""
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
const { apiBase: e } =
|
|
60
|
+
function je() {
|
|
61
|
+
const { apiBase: e } = Ke();
|
|
62
62
|
return ot.create({
|
|
63
63
|
baseURL: e,
|
|
64
64
|
timeout: 1e4,
|
|
@@ -67,8 +67,8 @@ function ze() {
|
|
|
67
67
|
withCredentials: !0
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
const { apiBase: e, appSecret: t } =
|
|
70
|
+
const ze = async () => {
|
|
71
|
+
const { apiBase: e, appSecret: t } = Ke(), a = je(), n = lt();
|
|
72
72
|
return await ct(n, "token", async () => (await a.get(`${e}/GenerateToken`, {
|
|
73
73
|
params: {
|
|
74
74
|
appid: "bpm",
|
|
@@ -76,7 +76,7 @@ const je = async () => {
|
|
|
76
76
|
}
|
|
77
77
|
}))?.data?.token);
|
|
78
78
|
}, G = async () => {
|
|
79
|
-
const e = await
|
|
79
|
+
const e = await ze(), t = je();
|
|
80
80
|
return t.defaults.headers.common.Authorization = `Bearer ${e}`, t;
|
|
81
81
|
}, Se = {
|
|
82
82
|
CurrentUserEmail: (e) => e.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
|
|
@@ -85,33 +85,33 @@ const je = async () => {
|
|
|
85
85
|
ApproverEmail: (e) => e.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
|
|
86
86
|
ApproverPositionCode: (e) => e.bpmStore()?.positionCode ?? 999,
|
|
87
87
|
RejectReason: () => "Test Reject Reason"
|
|
88
|
-
},
|
|
88
|
+
}, H = [];
|
|
89
89
|
for (let e = 0; e < 256; ++e)
|
|
90
|
-
|
|
90
|
+
H.push((e + 256).toString(16).slice(1));
|
|
91
91
|
function dt(e, t = 0) {
|
|
92
|
-
return (
|
|
92
|
+
return (H[e[t + 0]] + H[e[t + 1]] + H[e[t + 2]] + H[e[t + 3]] + "-" + H[e[t + 4]] + H[e[t + 5]] + "-" + H[e[t + 6]] + H[e[t + 7]] + "-" + H[e[t + 8]] + H[e[t + 9]] + "-" + H[e[t + 10]] + H[e[t + 11]] + H[e[t + 12]] + H[e[t + 13]] + H[e[t + 14]] + H[e[t + 15]]).toLowerCase();
|
|
93
93
|
}
|
|
94
|
-
let
|
|
95
|
-
const
|
|
96
|
-
function
|
|
97
|
-
if (
|
|
94
|
+
let $e;
|
|
95
|
+
const ft = new Uint8Array(16);
|
|
96
|
+
function pt() {
|
|
97
|
+
if (!$e) {
|
|
98
98
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
99
99
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
100
|
-
|
|
100
|
+
$e = crypto.getRandomValues.bind(crypto);
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return $e(ft);
|
|
103
103
|
}
|
|
104
104
|
const mt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Me = { randomUUID: mt };
|
|
105
105
|
function Ee(e, t, a) {
|
|
106
106
|
if (Me.randomUUID && !e)
|
|
107
107
|
return Me.randomUUID();
|
|
108
108
|
e = e || {};
|
|
109
|
-
const n = e.random ?? e.rng?.() ??
|
|
109
|
+
const n = e.random ?? e.rng?.() ?? pt();
|
|
110
110
|
if (n.length < 16)
|
|
111
111
|
throw new Error("Random bytes length must be >= 16");
|
|
112
112
|
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, dt(n);
|
|
113
113
|
}
|
|
114
|
-
var
|
|
114
|
+
var J = /* @__PURE__ */ ((e) => (e[e.Submit = 0] = "Submit", e[e.Link = 1] = "Link", e))(J || {}), ie = /* @__PURE__ */ ((e) => (e[e.Create = 0] = "Create", e[e.Update = 1] = "Update", e[e.Details = 2] = "Details", e[e.List = 3] = "List", e))(ie || {});
|
|
115
115
|
function gt(e, t, a) {
|
|
116
116
|
const n = {
|
|
117
117
|
pageType: "",
|
|
@@ -148,12 +148,13 @@ function gt(e, t, a) {
|
|
|
148
148
|
redirectUrl: o.redirectUrl,
|
|
149
149
|
redirectType: o.redirectType,
|
|
150
150
|
title: o.title,
|
|
151
|
-
widget: o.widget === "Link" ?
|
|
151
|
+
widget: o.widget === "Link" ? J.Link : J.Submit,
|
|
152
152
|
location: o.location,
|
|
153
153
|
attributeType: o.attributeType,
|
|
154
|
-
readonly: o.readonly
|
|
154
|
+
readonly: o.readonly,
|
|
155
|
+
loading: !1
|
|
155
156
|
});
|
|
156
|
-
} else o.attributeType === "Banner" && (n.banner.title = o.title, n.banner.subTitle = t === 0 ? o.subTitle :
|
|
157
|
+
} else o.attributeType === "Banner" && (n.banner.title = o.title, n.banner.subTitle = t === 0 ? o.subTitle : Fe(o.subTitle, e.workflowId.propertyValue));
|
|
157
158
|
}), n.tabs && (n.tabs = n.tabs.sort((o, l) => o.order - l.order)), Object.entries(e).forEach(([o, l]) => {
|
|
158
159
|
if (o === "__ClassAttributes" || o === "className" || o === "id" || o === "deleteFlag" || o === "status" || o === "workFlowReason" || t !== 3 && o === "workflowId")
|
|
159
160
|
return;
|
|
@@ -191,7 +192,7 @@ function gt(e, t, a) {
|
|
|
191
192
|
const ye = async (e, t, a, n) => {
|
|
192
193
|
const l = await (await G()).get(`/General/${t}/${e}/page`, { params: n });
|
|
193
194
|
return gt(l?.data, e, a);
|
|
194
|
-
}, Oe = async (e, t, a) => (await (await G()).post(
|
|
195
|
+
}, Oe = async (e, t, a) => (await (await G()).post(`/${t}/${e}/button/List`, null, { params: a }))?.data;
|
|
195
196
|
async function vt(e, t) {
|
|
196
197
|
const n = await (await G()).post(`/General/${e}/list`, t);
|
|
197
198
|
return {
|
|
@@ -221,10 +222,10 @@ async function _t(e, t, a) {
|
|
|
221
222
|
return o.data.length > 0 ? o.data[0] : 0;
|
|
222
223
|
}
|
|
223
224
|
async function yt(e, t, a, n) {
|
|
224
|
-
const o = await G(), l =
|
|
225
|
+
const o = await G(), l = Fe(n, t);
|
|
225
226
|
return (await o.put(l, a))?.data;
|
|
226
227
|
}
|
|
227
|
-
function
|
|
228
|
+
function Fe(e, t) {
|
|
228
229
|
return e.replace(/{WorkflowId}/g, t);
|
|
229
230
|
}
|
|
230
231
|
function wt(e, t) {
|
|
@@ -244,7 +245,7 @@ function Ct(e, t) {
|
|
|
244
245
|
}
|
|
245
246
|
async function Vt(e, t, a, n, o, l, r, c) {
|
|
246
247
|
const s = await G();
|
|
247
|
-
let i =
|
|
248
|
+
let i = Fe(l, t);
|
|
248
249
|
return i = wt(i, a), i = bt(i, n), i = ht(i, r), i = kt(i, c), i = Ct(i, e), (await s.put(i, o))?.data;
|
|
249
250
|
}
|
|
250
251
|
async function St(e, t) {
|
|
@@ -254,10 +255,10 @@ async function St(e, t) {
|
|
|
254
255
|
label: r
|
|
255
256
|
}));
|
|
256
257
|
}
|
|
257
|
-
async function
|
|
258
|
+
async function $t(e, t) {
|
|
258
259
|
return (await (await G()).get(`/General/${e}/${t}/process`))?.data;
|
|
259
260
|
}
|
|
260
|
-
function
|
|
261
|
+
function xt(e) {
|
|
261
262
|
return {
|
|
262
263
|
uid: e.id ?? Ee(),
|
|
263
264
|
name: e.attachmentName ?? "unknown",
|
|
@@ -267,7 +268,7 @@ function $t(e) {
|
|
|
267
268
|
async function Ge(e, t) {
|
|
268
269
|
return (await (await G()).get(`/General/${e}/${t}/upload/get`))?.data.reduce((l, r) => {
|
|
269
270
|
const { category: c } = r;
|
|
270
|
-
return l[c] || (l[c] = []), l[c].push(
|
|
271
|
+
return l[c] || (l[c] = []), l[c].push(xt(r)), l;
|
|
271
272
|
}, {});
|
|
272
273
|
}
|
|
273
274
|
async function It(e, t) {
|
|
@@ -283,25 +284,27 @@ async function At() {
|
|
|
283
284
|
async function Tt(e, t) {
|
|
284
285
|
return await (await G()).post(`Grading/AssignComments/${e}/${encodeURIComponent(t)}`);
|
|
285
286
|
}
|
|
286
|
-
async function
|
|
287
|
-
return await (await G()).post(`Grading/AddComments/${e}/${encodeURIComponent(t)}`,
|
|
287
|
+
async function Ut(e, t, a) {
|
|
288
|
+
return await (await G()).post(`Grading/AddComments/${e}/${encodeURIComponent(t)}`, a, {
|
|
289
|
+
headers: { "Content-Type": "application/json;charset=UTF-8" }
|
|
290
|
+
});
|
|
288
291
|
}
|
|
289
|
-
async function
|
|
292
|
+
async function De(e) {
|
|
290
293
|
return (await (await G()).get(`Grading/GetComments/${e}`))?.data;
|
|
291
294
|
}
|
|
292
295
|
const ue = (e, t) => {
|
|
293
296
|
let a = "";
|
|
294
297
|
return { res: e.every((o) => {
|
|
295
|
-
const l =
|
|
298
|
+
const l = Nt(o, t);
|
|
296
299
|
return l || (a = o.errorMessage), l;
|
|
297
300
|
}), errorMessages: a };
|
|
298
|
-
},
|
|
301
|
+
}, Nt = (e, t) => {
|
|
299
302
|
const { ruleName: a, ruleParameter: n } = e;
|
|
300
|
-
return
|
|
301
|
-
},
|
|
303
|
+
return Ft[a](n, t);
|
|
304
|
+
}, Ft = {
|
|
302
305
|
Regex: (e, t) => new RegExp(e).test(t),
|
|
303
306
|
Required: (e, t) => !!t
|
|
304
|
-
},
|
|
307
|
+
}, He = /* @__PURE__ */ K({
|
|
305
308
|
__name: "InputText",
|
|
306
309
|
props: /* @__PURE__ */ ne({
|
|
307
310
|
fieldKey: {},
|
|
@@ -319,9 +322,9 @@ const ue = (e, t) => {
|
|
|
319
322
|
const n = e, o = a, l = ge(e, "modelValue"), r = (i) => ue(n.validations, i), c = (i) => {
|
|
320
323
|
o("input", i);
|
|
321
324
|
}, s = (i) => {
|
|
322
|
-
const
|
|
323
|
-
o("error",
|
|
324
|
-
|
|
325
|
+
const y = r(i);
|
|
326
|
+
o("error", y.res ? "" : y.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((f) => {
|
|
327
|
+
f.event === "change" && o(f.event, f.handlerName, i);
|
|
325
328
|
});
|
|
326
329
|
};
|
|
327
330
|
return t({
|
|
@@ -329,11 +332,11 @@ const ue = (e, t) => {
|
|
|
329
332
|
const i = r(n.modelValue);
|
|
330
333
|
return o("error", i.res ? "" : i.errorMessages), i.res;
|
|
331
334
|
}
|
|
332
|
-
}), (i,
|
|
333
|
-
const
|
|
334
|
-
return d(),
|
|
335
|
+
}), (i, y) => {
|
|
336
|
+
const f = V("AInput");
|
|
337
|
+
return d(), F(f, {
|
|
335
338
|
modelValue: l.value,
|
|
336
|
-
"onUpdate:modelValue":
|
|
339
|
+
"onUpdate:modelValue": y[0] || (y[0] = (S) => l.value = S),
|
|
337
340
|
"allow-clear": "",
|
|
338
341
|
disabled: n.readonly || n.config.Readonly,
|
|
339
342
|
onInput: c,
|
|
@@ -341,7 +344,7 @@ const ue = (e, t) => {
|
|
|
341
344
|
}, null, 8, ["modelValue", "disabled"]);
|
|
342
345
|
};
|
|
343
346
|
}
|
|
344
|
-
}),
|
|
347
|
+
}), Lt = /* @__PURE__ */ K({
|
|
345
348
|
__name: "InputNumber",
|
|
346
349
|
props: /* @__PURE__ */ ne({
|
|
347
350
|
fieldKey: {},
|
|
@@ -357,39 +360,39 @@ const ue = (e, t) => {
|
|
|
357
360
|
emits: /* @__PURE__ */ ne(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
358
361
|
setup(e, { expose: t, emit: a }) {
|
|
359
362
|
const n = e, o = a, l = ge(e, "modelValue"), r = k(100), c = k(0);
|
|
360
|
-
|
|
361
|
-
n.validations && n.validations.forEach((
|
|
362
|
-
|
|
363
|
+
re(() => {
|
|
364
|
+
n.validations && n.validations.forEach((f) => {
|
|
365
|
+
f.ruleName === "Max" && (r.value = f.ruleParameter), f.ruleName === "Min" && (c.value = f.ruleParameter);
|
|
363
366
|
});
|
|
364
367
|
});
|
|
365
|
-
const s = (
|
|
366
|
-
o("input",
|
|
367
|
-
},
|
|
368
|
-
const
|
|
369
|
-
o("error",
|
|
370
|
-
|
|
368
|
+
const s = (f) => ue(n.validations, f), i = (f) => {
|
|
369
|
+
o("input", f);
|
|
370
|
+
}, y = (f) => {
|
|
371
|
+
const S = s(f);
|
|
372
|
+
o("error", S.res ? "" : S.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((x) => {
|
|
373
|
+
x.event === "change" && o(x.event, x.handlerName, f);
|
|
371
374
|
});
|
|
372
375
|
};
|
|
373
376
|
return t({
|
|
374
377
|
validate() {
|
|
375
|
-
const
|
|
376
|
-
return o("error",
|
|
378
|
+
const f = s(n.modelValue);
|
|
379
|
+
return o("error", f.res ? "" : f.errorMessages), f.res;
|
|
377
380
|
}
|
|
378
|
-
}), (
|
|
379
|
-
const
|
|
380
|
-
return d(),
|
|
381
|
+
}), (f, S) => {
|
|
382
|
+
const x = V("AInputNumber");
|
|
383
|
+
return d(), F(x, {
|
|
381
384
|
modelValue: l.value,
|
|
382
|
-
"onUpdate:modelValue":
|
|
385
|
+
"onUpdate:modelValue": S[0] || (S[0] = (_) => l.value = _),
|
|
383
386
|
clearable: "",
|
|
384
387
|
disabled: n.readonly,
|
|
385
388
|
min: c.value,
|
|
386
389
|
max: r.value,
|
|
387
390
|
onInput: i,
|
|
388
|
-
onChange:
|
|
391
|
+
onChange: y
|
|
389
392
|
}, null, 8, ["modelValue", "disabled", "min", "max"]);
|
|
390
393
|
};
|
|
391
394
|
}
|
|
392
|
-
}),
|
|
395
|
+
}), Be = /* @__PURE__ */ K({
|
|
393
396
|
__name: "SelectList",
|
|
394
397
|
props: /* @__PURE__ */ ne({
|
|
395
398
|
fieldKey: {},
|
|
@@ -404,54 +407,54 @@ const ue = (e, t) => {
|
|
|
404
407
|
}),
|
|
405
408
|
emits: /* @__PURE__ */ ne(["update:modelValue", "change"], ["update:modelValue"]),
|
|
406
409
|
setup(e, { expose: t, emit: a }) {
|
|
407
|
-
const n = e, o = a, l = k(!1), r = k(n.config.options ?? []), c = ge(e, "modelValue"), s = (
|
|
410
|
+
const n = e, o = a, l = k(!1), r = k(n.config.options ?? []), c = ge(e, "modelValue"), s = (f) => ue(n.validations, f);
|
|
408
411
|
O(() => {
|
|
409
|
-
const
|
|
410
|
-
return n.triggers && n.triggers.length > 0 && n.triggers.forEach((
|
|
411
|
-
|
|
412
|
-
o(
|
|
413
|
-
const
|
|
414
|
-
o("error",
|
|
412
|
+
const f = {};
|
|
413
|
+
return n.triggers && n.triggers.length > 0 && n.triggers.forEach((S) => {
|
|
414
|
+
f[S.event] = (x) => {
|
|
415
|
+
o(S.event, S.handlerName, x);
|
|
416
|
+
const _ = s(x);
|
|
417
|
+
o("error", _.res ? "" : _.errorMessages);
|
|
415
418
|
};
|
|
416
|
-
}),
|
|
417
|
-
}),
|
|
419
|
+
}), f;
|
|
420
|
+
}), re(async () => {
|
|
418
421
|
n.config.dataSourceProvider && (r.value = await St(n.config.dataSourceProvider));
|
|
419
422
|
});
|
|
420
|
-
const
|
|
421
|
-
o("update:modelValue",
|
|
422
|
-
const
|
|
423
|
-
o("error",
|
|
424
|
-
|
|
423
|
+
const y = (f) => {
|
|
424
|
+
o("update:modelValue", f);
|
|
425
|
+
const S = s(f);
|
|
426
|
+
o("error", S.res ? "" : S.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((x) => {
|
|
427
|
+
x.event === "change" && o(x.event, x.handlerName, f);
|
|
425
428
|
});
|
|
426
429
|
};
|
|
427
430
|
return t({
|
|
428
431
|
validate() {
|
|
429
|
-
const
|
|
430
|
-
return o("error",
|
|
432
|
+
const f = s(n.modelValue);
|
|
433
|
+
return o("error", f.res ? "" : f.errorMessages), f.res;
|
|
431
434
|
}
|
|
432
|
-
}), (
|
|
433
|
-
const
|
|
434
|
-
return d(),
|
|
435
|
+
}), (f, S) => {
|
|
436
|
+
const x = V("AOption"), _ = V("ASelect");
|
|
437
|
+
return d(), F(_, {
|
|
435
438
|
"allow-clear": "",
|
|
436
439
|
modelValue: c.value,
|
|
437
|
-
"onUpdate:modelValue":
|
|
440
|
+
"onUpdate:modelValue": S[0] || (S[0] = (T) => c.value = T),
|
|
438
441
|
loading: l.value,
|
|
439
442
|
"filter-option": !0,
|
|
440
443
|
"allow-search": !0,
|
|
441
|
-
onChange:
|
|
444
|
+
onChange: y
|
|
442
445
|
}, {
|
|
443
446
|
default: b(() => [
|
|
444
|
-
(d(!0), $(
|
|
445
|
-
key:
|
|
446
|
-
value:
|
|
447
|
-
label:
|
|
447
|
+
(d(!0), $(D, null, B(r.value, (T) => (d(), F(x, {
|
|
448
|
+
key: T.value,
|
|
449
|
+
value: T.value,
|
|
450
|
+
label: T.label
|
|
448
451
|
}, null, 8, ["value", "label"]))), 128))
|
|
449
452
|
]),
|
|
450
453
|
_: 1
|
|
451
454
|
}, 8, ["modelValue", "loading"]);
|
|
452
455
|
};
|
|
453
456
|
}
|
|
454
|
-
}), Pt = /* @__PURE__ */
|
|
457
|
+
}), Pt = /* @__PURE__ */ K({
|
|
455
458
|
__name: "Cascader",
|
|
456
459
|
props: {
|
|
457
460
|
modelValue: {},
|
|
@@ -462,12 +465,12 @@ const ue = (e, t) => {
|
|
|
462
465
|
const n = e, o = a, l = k(n.config.options ?? []), r = (s) => {
|
|
463
466
|
o("update:modelValue", s), o("change", s);
|
|
464
467
|
};
|
|
465
|
-
|
|
468
|
+
re(async () => {
|
|
466
469
|
if (n.config) {
|
|
467
470
|
const s = n.config.dataSourceProvider;
|
|
468
471
|
if (s) {
|
|
469
|
-
const
|
|
470
|
-
l.value =
|
|
472
|
+
const y = await (await G()).get(s);
|
|
473
|
+
l.value = y.data;
|
|
471
474
|
}
|
|
472
475
|
}
|
|
473
476
|
});
|
|
@@ -477,13 +480,13 @@ const ue = (e, t) => {
|
|
|
477
480
|
return !0;
|
|
478
481
|
}
|
|
479
482
|
}), (s, i) => {
|
|
480
|
-
const
|
|
481
|
-
return d(),
|
|
483
|
+
const y = V("ACascader"), f = V("ASpace");
|
|
484
|
+
return d(), F(f, {
|
|
482
485
|
direction: "vertical",
|
|
483
486
|
size: "large"
|
|
484
487
|
}, {
|
|
485
488
|
default: b(() => [
|
|
486
|
-
|
|
489
|
+
N(y, {
|
|
487
490
|
"field-names": c,
|
|
488
491
|
"model-value": s.modelValue,
|
|
489
492
|
options: l.value,
|
|
@@ -496,7 +499,7 @@ const ue = (e, t) => {
|
|
|
496
499
|
});
|
|
497
500
|
};
|
|
498
501
|
}
|
|
499
|
-
}), Rt = /* @__PURE__ */
|
|
502
|
+
}), Rt = /* @__PURE__ */ K({
|
|
500
503
|
__name: "FileUpload",
|
|
501
504
|
props: {
|
|
502
505
|
className: {},
|
|
@@ -510,66 +513,66 @@ const ue = (e, t) => {
|
|
|
510
513
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
511
514
|
setup(e, { expose: t, emit: a }) {
|
|
512
515
|
const n = e, o = a, l = k({});
|
|
513
|
-
|
|
514
|
-
const
|
|
516
|
+
re(async () => {
|
|
517
|
+
const _ = await ze();
|
|
515
518
|
l.value = {
|
|
516
|
-
Authorization: `Bearer ${
|
|
519
|
+
Authorization: `Bearer ${_}`
|
|
517
520
|
};
|
|
518
521
|
});
|
|
519
|
-
const r = (
|
|
520
|
-
function
|
|
521
|
-
return
|
|
522
|
+
const r = (_) => ue(n.validations, _), s = Ne().apiBase, i = k(null), y = k("");
|
|
523
|
+
function f(_, T, j) {
|
|
524
|
+
return _.replace(/{WorkflowId}/g, T).replace(/{ClassName}/g, j);
|
|
522
525
|
}
|
|
523
|
-
const
|
|
526
|
+
const S = O(() => {
|
|
524
527
|
if (n.config.uploadURL) {
|
|
525
|
-
const
|
|
526
|
-
return
|
|
528
|
+
const _ = s + n.config.uploadURL;
|
|
529
|
+
return f(_, y.value, n.className);
|
|
527
530
|
}
|
|
528
531
|
return "";
|
|
529
532
|
});
|
|
530
|
-
function
|
|
531
|
-
const { file:
|
|
532
|
-
return new Promise((
|
|
533
|
+
function x(_) {
|
|
534
|
+
const { file: T, name: j } = _, X = j ?? T.name;
|
|
535
|
+
return new Promise((Q, Z) => {
|
|
533
536
|
st.confirm({
|
|
534
537
|
title: "Confirm Delete",
|
|
535
|
-
content: `Are you sure you want to delete ${
|
|
538
|
+
content: `Are you sure you want to delete ${X}?`,
|
|
536
539
|
async onOk() {
|
|
537
|
-
if (
|
|
538
|
-
return await n.config.removeFile(
|
|
539
|
-
|
|
540
|
+
if (_.status !== "init" && n.config.removeFile)
|
|
541
|
+
return await n.config.removeFile(_.uid), Q(!0);
|
|
542
|
+
Q(!0);
|
|
540
543
|
},
|
|
541
|
-
onCancel: () =>
|
|
544
|
+
onCancel: () => Z("cancel")
|
|
542
545
|
});
|
|
543
546
|
});
|
|
544
547
|
}
|
|
545
548
|
return t({
|
|
546
|
-
submit(
|
|
547
|
-
i.value && (n.config.uploadURL && (
|
|
549
|
+
submit(_) {
|
|
550
|
+
i.value && (n.config.uploadURL && (y.value = _), Ze(() => {
|
|
548
551
|
i.value.submit();
|
|
549
552
|
}));
|
|
550
553
|
},
|
|
551
554
|
validate() {
|
|
552
|
-
const
|
|
553
|
-
return o("error",
|
|
555
|
+
const _ = r(n.modelValue);
|
|
556
|
+
return o("error", _.res ? "" : _.errorMessages), _.res;
|
|
554
557
|
}
|
|
555
|
-
}), (
|
|
556
|
-
const
|
|
557
|
-
return d(),
|
|
558
|
+
}), (_, T) => {
|
|
559
|
+
const j = V("a-button"), X = V("a-upload");
|
|
560
|
+
return d(), F(X, {
|
|
558
561
|
ref_key: "uploadRef",
|
|
559
562
|
ref: i,
|
|
560
563
|
"default-file-list": n.config.files,
|
|
561
|
-
action:
|
|
564
|
+
action: S.value,
|
|
562
565
|
limit: n.config.allowedNumber,
|
|
563
566
|
"auto-upload": !1,
|
|
564
567
|
name: "files",
|
|
565
568
|
headers: l.value,
|
|
566
|
-
onBeforeRemove:
|
|
569
|
+
onBeforeRemove: x
|
|
567
570
|
}, {
|
|
568
|
-
"start-icon": b(() =>
|
|
571
|
+
"start-icon": b(() => T[0] || (T[0] = [])),
|
|
569
572
|
"upload-button": b(() => [
|
|
570
|
-
|
|
571
|
-
default: b(() =>
|
|
572
|
-
|
|
573
|
+
N(j, { type: "primary" }, {
|
|
574
|
+
default: b(() => T[1] || (T[1] = [
|
|
575
|
+
Y("Select File", -1)
|
|
573
576
|
])),
|
|
574
577
|
_: 1,
|
|
575
578
|
__: [1]
|
|
@@ -579,7 +582,7 @@ const ue = (e, t) => {
|
|
|
579
582
|
}, 8, ["default-file-list", "action", "limit", "headers"]);
|
|
580
583
|
};
|
|
581
584
|
}
|
|
582
|
-
}), Mt = /* @__PURE__ */
|
|
585
|
+
}), Mt = /* @__PURE__ */ K({
|
|
583
586
|
__name: "TextArea",
|
|
584
587
|
props: {
|
|
585
588
|
fieldKey: {},
|
|
@@ -596,8 +599,8 @@ const ue = (e, t) => {
|
|
|
596
599
|
}, c = (s) => {
|
|
597
600
|
o("update:modelValue", s);
|
|
598
601
|
const i = l(s);
|
|
599
|
-
o("error", i.res ? "" : i.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((
|
|
600
|
-
|
|
602
|
+
o("error", i.res ? "" : i.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((y) => {
|
|
603
|
+
y.event === "change" && o(y.event, y.handlerName, s);
|
|
601
604
|
});
|
|
602
605
|
};
|
|
603
606
|
return t({
|
|
@@ -606,8 +609,8 @@ const ue = (e, t) => {
|
|
|
606
609
|
return o("error", s.res ? "" : s.errorMessages), s.res;
|
|
607
610
|
}
|
|
608
611
|
}), (s, i) => {
|
|
609
|
-
const
|
|
610
|
-
return d(),
|
|
612
|
+
const y = V("ATextarea");
|
|
613
|
+
return d(), F(y, {
|
|
611
614
|
"model-value": n.modelValue,
|
|
612
615
|
placeholder: "Please enter something",
|
|
613
616
|
"allow-clear": "",
|
|
@@ -617,7 +620,7 @@ const ue = (e, t) => {
|
|
|
617
620
|
}, null, 8, ["model-value", "disabled"]);
|
|
618
621
|
};
|
|
619
622
|
}
|
|
620
|
-
}),
|
|
623
|
+
}), Dt = /* @__PURE__ */ K({
|
|
621
624
|
__name: "CheckBox",
|
|
622
625
|
props: /* @__PURE__ */ ne({
|
|
623
626
|
fieldKey: {},
|
|
@@ -634,8 +637,8 @@ const ue = (e, t) => {
|
|
|
634
637
|
setup(e, { expose: t, emit: a }) {
|
|
635
638
|
const n = e, o = a, l = ge(e, "modelValue"), r = (s) => ue(n.validations, s), c = (s) => {
|
|
636
639
|
const i = r(s);
|
|
637
|
-
o("error", i.res ? "" : i.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((
|
|
638
|
-
|
|
640
|
+
o("error", i.res ? "" : i.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((y) => {
|
|
641
|
+
y.event === "change" && o(y.event, y.handlerName, s);
|
|
639
642
|
});
|
|
640
643
|
};
|
|
641
644
|
return t({
|
|
@@ -644,29 +647,29 @@ const ue = (e, t) => {
|
|
|
644
647
|
return o("error", s.res ? "" : s.errorMessages), s.res;
|
|
645
648
|
}
|
|
646
649
|
}), (s, i) => {
|
|
647
|
-
const
|
|
648
|
-
return d(),
|
|
650
|
+
const y = V("ACheckbox");
|
|
651
|
+
return d(), F(y, {
|
|
649
652
|
modelValue: l.value,
|
|
650
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
653
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => l.value = f),
|
|
651
654
|
clearable: "",
|
|
652
655
|
disabled: n.readonly || n.config.Readonly,
|
|
653
656
|
onChange: c
|
|
654
657
|
}, {
|
|
655
658
|
default: b(() => i[1] || (i[1] = [
|
|
656
|
-
|
|
659
|
+
Y("Yes", -1)
|
|
657
660
|
])),
|
|
658
661
|
_: 1,
|
|
659
662
|
__: [1]
|
|
660
663
|
}, 8, ["modelValue", "disabled"]);
|
|
661
664
|
};
|
|
662
665
|
}
|
|
663
|
-
}),
|
|
666
|
+
}), Ht = { class: "title" }, Bt = {
|
|
664
667
|
key: 0,
|
|
665
668
|
class: "required"
|
|
666
|
-
},
|
|
669
|
+
}, Kt = {
|
|
667
670
|
key: 0,
|
|
668
671
|
class: "err-msg"
|
|
669
|
-
},
|
|
672
|
+
}, jt = /* @__PURE__ */ K({
|
|
670
673
|
__name: "index",
|
|
671
674
|
props: /* @__PURE__ */ ne({
|
|
672
675
|
config: {},
|
|
@@ -685,11 +688,11 @@ const ue = (e, t) => {
|
|
|
685
688
|
const n = e, o = a, l = ge(e, "modelValue"), r = Ae("widgetRef"), c = O(() => {
|
|
686
689
|
switch (n.config?.widget?.widget) {
|
|
687
690
|
case "TextBox":
|
|
688
|
-
return
|
|
691
|
+
return He;
|
|
689
692
|
case "Number":
|
|
690
|
-
return
|
|
693
|
+
return Lt;
|
|
691
694
|
case "SelectList":
|
|
692
|
-
return
|
|
695
|
+
return Be;
|
|
693
696
|
case "Cascade":
|
|
694
697
|
return Pt;
|
|
695
698
|
case "File":
|
|
@@ -697,26 +700,26 @@ const ue = (e, t) => {
|
|
|
697
700
|
case "TextArea":
|
|
698
701
|
return Mt;
|
|
699
702
|
case "DropDown":
|
|
700
|
-
return
|
|
703
|
+
return Be;
|
|
701
704
|
case "CheckBox":
|
|
702
|
-
return
|
|
705
|
+
return Dt;
|
|
703
706
|
default:
|
|
704
|
-
return
|
|
707
|
+
return He;
|
|
705
708
|
}
|
|
706
|
-
}), s = k(""), i = (
|
|
707
|
-
s.value =
|
|
708
|
-
},
|
|
709
|
-
o("change",
|
|
709
|
+
}), s = k(""), i = (S) => {
|
|
710
|
+
s.value = S;
|
|
711
|
+
}, y = (S, x) => {
|
|
712
|
+
o("change", S, x);
|
|
710
713
|
};
|
|
711
|
-
function
|
|
714
|
+
function f() {
|
|
712
715
|
return n.config?.widget?.widget === "File";
|
|
713
716
|
}
|
|
714
717
|
return t({
|
|
715
718
|
isFileUpload() {
|
|
716
719
|
return n.config?.widget?.widget === "File";
|
|
717
720
|
},
|
|
718
|
-
submit(
|
|
719
|
-
|
|
721
|
+
submit(S) {
|
|
722
|
+
f() && r.value.submit(S);
|
|
720
723
|
},
|
|
721
724
|
validate() {
|
|
722
725
|
return r.value?.validate();
|
|
@@ -724,26 +727,26 @@ const ue = (e, t) => {
|
|
|
724
727
|
getCompName() {
|
|
725
728
|
return n?.config?.widget?.title;
|
|
726
729
|
}
|
|
727
|
-
}), (
|
|
728
|
-
h("div",
|
|
729
|
-
|
|
730
|
-
n.config.validations.length ? (d(), $("span",
|
|
730
|
+
}), (S, x) => (d(), $("div", null, [
|
|
731
|
+
h("div", Ht, [
|
|
732
|
+
Y(W(n?.config?.widget?.title) + " ", 1),
|
|
733
|
+
n.config.validations.length ? (d(), $("span", Bt, "*")) : ae("", !0)
|
|
731
734
|
]),
|
|
732
735
|
h("div", null, [
|
|
733
|
-
(d(),
|
|
736
|
+
(d(), F(Te(c.value), {
|
|
734
737
|
ref_key: "widgetRef",
|
|
735
738
|
ref: r,
|
|
736
739
|
modelValue: l.value,
|
|
737
|
-
"onUpdate:modelValue":
|
|
740
|
+
"onUpdate:modelValue": x[0] || (x[0] = (_) => l.value = _),
|
|
738
741
|
"field-key": n.fieldKey,
|
|
739
742
|
config: n.config.widget,
|
|
740
743
|
validations: n.config.validations,
|
|
741
744
|
triggers: n.config.triggers,
|
|
742
745
|
"class-name": n.className,
|
|
743
746
|
onError: i,
|
|
744
|
-
onChange:
|
|
747
|
+
onChange: y
|
|
745
748
|
}, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
|
|
746
|
-
s.value.length > 0 ? (d(), $("div",
|
|
749
|
+
s.value.length > 0 ? (d(), $("div", Kt, W(s.value), 1)) : ae("", !0)
|
|
747
750
|
])
|
|
748
751
|
]));
|
|
749
752
|
}
|
|
@@ -752,11 +755,12 @@ const ue = (e, t) => {
|
|
|
752
755
|
for (const [n, o] of t)
|
|
753
756
|
a[n] = o;
|
|
754
757
|
return a;
|
|
755
|
-
},
|
|
758
|
+
}, Le = /* @__PURE__ */ de(jt, [["__scopeId", "data-v-1022c8cb"]]), zt = /* @__PURE__ */ K({
|
|
756
759
|
__name: "SubmitButton",
|
|
757
760
|
props: {
|
|
758
761
|
url: {},
|
|
759
|
-
redirectType: {}
|
|
762
|
+
redirectType: {},
|
|
763
|
+
loading: { type: Boolean }
|
|
760
764
|
},
|
|
761
765
|
emits: ["click"],
|
|
762
766
|
setup(e, { emit: t }) {
|
|
@@ -765,23 +769,25 @@ const ue = (e, t) => {
|
|
|
765
769
|
n("click", a.url, a.redirectType);
|
|
766
770
|
}
|
|
767
771
|
return (l, r) => {
|
|
768
|
-
const c =
|
|
769
|
-
return d(),
|
|
772
|
+
const c = V("AButton");
|
|
773
|
+
return d(), F(c, {
|
|
774
|
+
loading: l.loading,
|
|
770
775
|
type: "primary",
|
|
771
776
|
onClick: o
|
|
772
777
|
}, {
|
|
773
778
|
default: b(() => [
|
|
774
|
-
|
|
779
|
+
se(l.$slots, "default")
|
|
775
780
|
]),
|
|
776
781
|
_: 3
|
|
777
|
-
});
|
|
782
|
+
}, 8, ["loading"]);
|
|
778
783
|
};
|
|
779
784
|
}
|
|
780
|
-
}), Et = /* @__PURE__ */
|
|
785
|
+
}), Et = /* @__PURE__ */ K({
|
|
781
786
|
__name: "DetailLink",
|
|
782
787
|
props: {
|
|
783
788
|
url: {},
|
|
784
|
-
redirectType: {}
|
|
789
|
+
redirectType: {},
|
|
790
|
+
loading: { type: Boolean }
|
|
785
791
|
},
|
|
786
792
|
emits: ["click"],
|
|
787
793
|
setup(e, { emit: t }) {
|
|
@@ -790,19 +796,20 @@ const ue = (e, t) => {
|
|
|
790
796
|
n("click", a.url, a.redirectType);
|
|
791
797
|
}
|
|
792
798
|
return (l, r) => {
|
|
793
|
-
const c =
|
|
794
|
-
return d(),
|
|
799
|
+
const c = V("ALink");
|
|
800
|
+
return d(), F(c, { onClick: o }, {
|
|
795
801
|
default: b(() => [
|
|
796
|
-
|
|
802
|
+
se(l.$slots, "default")
|
|
797
803
|
]),
|
|
798
804
|
_: 3
|
|
799
805
|
});
|
|
800
806
|
};
|
|
801
807
|
}
|
|
802
|
-
}), me = /* @__PURE__ */
|
|
808
|
+
}), me = /* @__PURE__ */ K({
|
|
803
809
|
__name: "index",
|
|
804
810
|
props: {
|
|
805
|
-
config: {}
|
|
811
|
+
config: {},
|
|
812
|
+
loading: { type: Boolean }
|
|
806
813
|
},
|
|
807
814
|
emits: ["click"],
|
|
808
815
|
setup(e, { emit: t }) {
|
|
@@ -813,22 +820,23 @@ const ue = (e, t) => {
|
|
|
813
820
|
const l = O(() => {
|
|
814
821
|
switch (a.config.location) {
|
|
815
822
|
case "InOperation":
|
|
816
|
-
return
|
|
823
|
+
return zt;
|
|
817
824
|
case "InTable":
|
|
818
825
|
default:
|
|
819
826
|
return Et;
|
|
820
827
|
}
|
|
821
|
-
}), r = O(() => a.config.widget ===
|
|
822
|
-
return (s, i) => (d(),
|
|
828
|
+
}), r = O(() => a.config.widget === J.Submit ? a.config.requestUrl ?? "" : a.config.widget === J.Link ? a.config.redirectUrl ?? "" : ""), c = O(() => a.config.redirectType ?? "Details");
|
|
829
|
+
return (s, i) => (d(), F(Te(l.value), {
|
|
823
830
|
url: r.value,
|
|
824
831
|
"redirect-type": c.value,
|
|
832
|
+
loading: s.loading,
|
|
825
833
|
onClick: o
|
|
826
834
|
}, {
|
|
827
835
|
default: b(() => [
|
|
828
|
-
|
|
836
|
+
Y(W(a.config.title), 1)
|
|
829
837
|
]),
|
|
830
838
|
_: 1
|
|
831
|
-
}, 8, ["url", "redirect-type"]));
|
|
839
|
+
}, 8, ["url", "redirect-type", "loading"]));
|
|
832
840
|
}
|
|
833
841
|
}), We = Symbol("library-router");
|
|
834
842
|
function we() {
|
|
@@ -847,7 +855,7 @@ function be() {
|
|
|
847
855
|
function he() {
|
|
848
856
|
return ce(Je, null);
|
|
849
857
|
}
|
|
850
|
-
const Gt = { class: "top-bar" }, Wt = { class: "banner-info" }, qt = { class: "page-title" }, Yt = { class: "page-subtitle" }, Jt = { class: "avatar-wrapper" }, Xt = { class: "user-email" }, Qt = /* @__PURE__ */
|
|
858
|
+
const Gt = { class: "top-bar" }, Wt = { class: "banner-info" }, qt = { class: "page-title" }, Yt = { class: "page-subtitle" }, Jt = { class: "avatar-wrapper" }, Xt = { class: "user-email" }, Qt = /* @__PURE__ */ K({
|
|
851
859
|
__name: "TopBar",
|
|
852
860
|
props: {
|
|
853
861
|
title: {},
|
|
@@ -856,25 +864,25 @@ const Gt = { class: "top-bar" }, Wt = { class: "banner-info" }, qt = { class: "p
|
|
|
856
864
|
},
|
|
857
865
|
setup(e) {
|
|
858
866
|
return (t, a) => {
|
|
859
|
-
const n =
|
|
867
|
+
const n = V("a-avatar"), o = V("a-popover");
|
|
860
868
|
return d(), $("div", Gt, [
|
|
861
869
|
h("div", Wt, [
|
|
862
870
|
h("div", qt, W(t.title), 1),
|
|
863
871
|
h("div", Yt, W(t.subTitle), 1)
|
|
864
872
|
]),
|
|
865
873
|
h("div", Jt, [
|
|
866
|
-
|
|
874
|
+
N(o, { trigger: "click" }, {
|
|
867
875
|
content: b(() => [
|
|
868
876
|
h("div", Xt, W(t.email), 1)
|
|
869
877
|
]),
|
|
870
878
|
default: b(() => [
|
|
871
|
-
|
|
879
|
+
N(n, {
|
|
872
880
|
size: 48,
|
|
873
881
|
autoFixFontSize: "",
|
|
874
882
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
875
883
|
}, {
|
|
876
884
|
default: b(() => [
|
|
877
|
-
|
|
885
|
+
Y(W(t.email.charAt(0).toUpperCase()), 1)
|
|
878
886
|
]),
|
|
879
887
|
_: 1
|
|
880
888
|
})
|
|
@@ -887,7 +895,7 @@ const Gt = { class: "top-bar" }, Wt = { class: "banner-info" }, qt = { class: "p
|
|
|
887
895
|
}
|
|
888
896
|
}), ke = /* @__PURE__ */ de(Qt, [["__scopeId", "data-v-c0457235"]]);
|
|
889
897
|
function Re(e) {
|
|
890
|
-
const t =
|
|
898
|
+
const t = Ne(), a = [];
|
|
891
899
|
if (t.fieldsGroup) {
|
|
892
900
|
t.fieldsGroup.forEach((l) => {
|
|
893
901
|
const r = l.keys.map((c) => e.find((s) => s.fieldKey === c)).filter(Boolean);
|
|
@@ -900,7 +908,7 @@ function Re(e) {
|
|
|
900
908
|
const Zt = { class: "page-container" }, en = { class: "page-body" }, tn = { class: "form-card" }, nn = { class: "form-fields-vertical" }, on = { class: "form-fields" }, an = {
|
|
901
909
|
key: 0,
|
|
902
910
|
class: "form-content"
|
|
903
|
-
}, sn = { class: "page-footer" }, rn = { class: "action-container" }, ln = { class: "action-buttons" }, cn = /* @__PURE__ */
|
|
911
|
+
}, sn = { class: "page-footer" }, rn = { class: "action-container" }, ln = { class: "action-buttons" }, cn = /* @__PURE__ */ K({
|
|
904
912
|
__name: "CreateView",
|
|
905
913
|
props: {
|
|
906
914
|
className: {}
|
|
@@ -914,57 +922,58 @@ const Zt = { class: "page-container" }, en = { class: "page-body" }, tn = { clas
|
|
|
914
922
|
title: "",
|
|
915
923
|
subTitle: ""
|
|
916
924
|
}
|
|
917
|
-
}), i = k([]),
|
|
918
|
-
function
|
|
919
|
-
return
|
|
920
|
-
fieldKey:
|
|
921
|
-
...
|
|
922
|
-
})).filter((
|
|
925
|
+
}), i = k([]), y = k({});
|
|
926
|
+
function f(g) {
|
|
927
|
+
return g ? Object.entries(g).map(([p, I]) => ({
|
|
928
|
+
fieldKey: p,
|
|
929
|
+
...I
|
|
930
|
+
})).filter((p) => p.widget && p.widget.widget !== "Hidden").filter((p) => !Z.value.includes(p.fieldKey)) : [];
|
|
923
931
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
932
|
+
function S(g) {
|
|
933
|
+
return g ? Object.entries(g).filter(([p, I]) => I.dependent).reduce((p, [I, A]) => (p[I] = A.dependent, p), {}) : [];
|
|
926
934
|
}
|
|
927
|
-
const
|
|
928
|
-
|
|
929
|
-
|
|
935
|
+
const x = O(() => s.value?.actions ? [...s.value.actions].reverse() : []), _ = Ue({}), T = k(!1);
|
|
936
|
+
re(async () => {
|
|
937
|
+
T.value = !0, s.value = await ye(ie.Create, c.className, {
|
|
930
938
|
svrStore: a,
|
|
931
939
|
bpmStore: t
|
|
932
|
-
}), i.value =
|
|
933
|
-
for (const
|
|
934
|
-
if (s.value.fields[
|
|
935
|
-
const
|
|
936
|
-
|
|
940
|
+
}), i.value = f(s.value.fields), y.value = S(s.value.fields);
|
|
941
|
+
for (const g in s.value.fields) {
|
|
942
|
+
if (s.value.fields[g].widget?.widget === "File") {
|
|
943
|
+
const L = i.value.find((p) => p.fieldKey === g);
|
|
944
|
+
L && L.widget && (L.widget.files = []);
|
|
937
945
|
}
|
|
938
|
-
|
|
946
|
+
_[g] = s.value.fields[g].modelValue;
|
|
939
947
|
}
|
|
940
|
-
|
|
948
|
+
T.value = !1;
|
|
941
949
|
});
|
|
942
|
-
function
|
|
950
|
+
function j() {
|
|
943
951
|
return a()?.userInfo?.email_address ?? "";
|
|
944
952
|
}
|
|
945
|
-
async function
|
|
946
|
-
switch (
|
|
947
|
-
case
|
|
948
|
-
let
|
|
949
|
-
if (l.value?.forEach((
|
|
950
|
-
|
|
951
|
-
}), !
|
|
953
|
+
async function X(g, L, p, I, A) {
|
|
954
|
+
switch (L) {
|
|
955
|
+
case J.Submit:
|
|
956
|
+
let v = !0;
|
|
957
|
+
if (l.value?.forEach((P) => {
|
|
958
|
+
P?.validate && (P.validate() || (v = !1));
|
|
959
|
+
}), !v) {
|
|
952
960
|
r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
953
961
|
return;
|
|
954
962
|
}
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
963
|
+
g.loading = !0;
|
|
964
|
+
const w = await _t(c.className, { ..._, ...y.value }, p);
|
|
965
|
+
g.loading = !1, l.value?.forEach((P) => {
|
|
966
|
+
P?.submit && P.submit(w.toString());
|
|
967
|
+
}), r?.appContext.config.globalProperties.$notification.success("create success!"), n.push({ name: "Details", params: { workflowId: w.toString() } });
|
|
959
968
|
break;
|
|
960
|
-
case
|
|
961
|
-
|
|
969
|
+
case J.Link:
|
|
970
|
+
I === "List" && n.push({ name: "List", params: { className: c.className } });
|
|
962
971
|
break;
|
|
963
972
|
default:
|
|
964
|
-
console.warn("Unknown action type:",
|
|
973
|
+
console.warn("Unknown action type:", L);
|
|
965
974
|
}
|
|
966
975
|
}
|
|
967
|
-
const
|
|
976
|
+
const Z = k([
|
|
968
977
|
"jobScpope",
|
|
969
978
|
"currentWorkdayId",
|
|
970
979
|
"originalGrade",
|
|
@@ -972,53 +981,53 @@ const Zt = { class: "page-container" }, en = { class: "page-body" }, tn = { clas
|
|
|
972
981
|
"jobAttachmentPrevious",
|
|
973
982
|
"positionId"
|
|
974
983
|
]);
|
|
975
|
-
function
|
|
976
|
-
o[
|
|
984
|
+
function ee(g, L) {
|
|
985
|
+
o[g]?.(L, Z), s.value && (i.value = f(s.value.fields));
|
|
977
986
|
}
|
|
978
|
-
const
|
|
979
|
-
return (
|
|
980
|
-
const
|
|
987
|
+
const te = O(() => Re(i.value));
|
|
988
|
+
return (g, L) => {
|
|
989
|
+
const p = V("a-card"), I = V("a-spin");
|
|
981
990
|
return d(), $("div", Zt, [
|
|
982
|
-
|
|
991
|
+
N(ke, {
|
|
983
992
|
title: s.value.banner.title,
|
|
984
993
|
subTitle: s.value.banner.subTitle,
|
|
985
|
-
email:
|
|
994
|
+
email: j()
|
|
986
995
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
987
996
|
h("div", en, [
|
|
988
|
-
|
|
989
|
-
loading:
|
|
997
|
+
N(I, {
|
|
998
|
+
loading: T.value,
|
|
990
999
|
class: "form-container"
|
|
991
1000
|
}, {
|
|
992
1001
|
default: b(() => [
|
|
993
1002
|
h("div", tn, [
|
|
994
1003
|
h("div", nn, [
|
|
995
|
-
(d(!0), $(
|
|
996
|
-
key:
|
|
997
|
-
title:
|
|
1004
|
+
(d(!0), $(D, null, B(te.value, (A) => (d(), F(p, {
|
|
1005
|
+
key: A.name,
|
|
1006
|
+
title: A.name,
|
|
998
1007
|
style: { "margin-bottom": "24px" }
|
|
999
1008
|
}, {
|
|
1000
1009
|
default: b(() => [
|
|
1001
1010
|
h("div", on, [
|
|
1002
|
-
(d(!0), $(
|
|
1003
|
-
key:
|
|
1011
|
+
(d(!0), $(D, null, B(A.fields, (v) => (d(), F(Le, {
|
|
1012
|
+
key: v.fieldKey,
|
|
1004
1013
|
ref_for: !0,
|
|
1005
1014
|
ref: "dataWidgets",
|
|
1006
|
-
"field-key":
|
|
1007
|
-
config:
|
|
1008
|
-
"class-name":
|
|
1009
|
-
modelValue: v
|
|
1010
|
-
"onUpdate:modelValue": (
|
|
1015
|
+
"field-key": v.fieldKey,
|
|
1016
|
+
config: v,
|
|
1017
|
+
"class-name": g.className,
|
|
1018
|
+
modelValue: _[v.fieldKey],
|
|
1019
|
+
"onUpdate:modelValue": (w) => _[v.fieldKey] = w,
|
|
1011
1020
|
class: "form-field",
|
|
1012
|
-
onChange:
|
|
1021
|
+
onChange: ee
|
|
1013
1022
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
1014
1023
|
])
|
|
1015
1024
|
]),
|
|
1016
1025
|
_: 2
|
|
1017
1026
|
}, 1032, ["title"]))), 128))
|
|
1018
1027
|
]),
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
])) :
|
|
1028
|
+
g.$slots.content ? (d(), $("div", an, [
|
|
1029
|
+
se(g.$slots, "content", {}, void 0, !0)
|
|
1030
|
+
])) : ae("", !0)
|
|
1022
1031
|
])
|
|
1023
1032
|
]),
|
|
1024
1033
|
_: 3
|
|
@@ -1026,24 +1035,25 @@ const Zt = { class: "page-container" }, en = { class: "page-body" }, tn = { clas
|
|
|
1026
1035
|
]),
|
|
1027
1036
|
h("div", sn, [
|
|
1028
1037
|
h("div", rn, [
|
|
1029
|
-
|
|
1038
|
+
se(g.$slots, "action", {}, void 0, !0),
|
|
1030
1039
|
h("div", ln, [
|
|
1031
|
-
(d(!0), $(
|
|
1032
|
-
key:
|
|
1033
|
-
|
|
1040
|
+
(d(!0), $(D, null, B(x.value, (A) => (d(), F(me, {
|
|
1041
|
+
key: A.Title,
|
|
1042
|
+
loading: A.loading,
|
|
1043
|
+
config: A,
|
|
1034
1044
|
class: "action-button",
|
|
1035
|
-
onClick:
|
|
1036
|
-
}, null, 8, ["config"]))), 128))
|
|
1045
|
+
onClick: (...v) => X(A, ...v)
|
|
1046
|
+
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1037
1047
|
])
|
|
1038
1048
|
])
|
|
1039
1049
|
])
|
|
1040
1050
|
]);
|
|
1041
1051
|
};
|
|
1042
1052
|
}
|
|
1043
|
-
}), un = /* @__PURE__ */ de(cn, [["__scopeId", "data-v-
|
|
1053
|
+
}), un = /* @__PURE__ */ de(cn, [["__scopeId", "data-v-ca3b2cdb"]]), dn = { class: "page-container" }, fn = { class: "page-body" }, pn = { class: "form-card" }, mn = { class: "form-fields-vertical" }, gn = { class: "form-fields" }, vn = {
|
|
1044
1054
|
key: 0,
|
|
1045
1055
|
class: "form-content"
|
|
1046
|
-
}, _n = { class: "page-footer" }, yn = { class: "action-container" }, wn = { class: "action-buttons" }, bn = /* @__PURE__ */
|
|
1056
|
+
}, _n = { class: "page-footer" }, yn = { class: "action-container" }, wn = { class: "action-buttons" }, bn = /* @__PURE__ */ K({
|
|
1047
1057
|
__name: "UpdateView",
|
|
1048
1058
|
props: {
|
|
1049
1059
|
className: {},
|
|
@@ -1058,63 +1068,63 @@ const Zt = { class: "page-container" }, en = { class: "page-body" }, tn = { clas
|
|
|
1058
1068
|
title: "",
|
|
1059
1069
|
subTitle: ""
|
|
1060
1070
|
}
|
|
1061
|
-
}), i = k([]),
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
1064
|
-
fieldKey:
|
|
1065
|
-
...
|
|
1066
|
-
})).filter((
|
|
1071
|
+
}), i = k([]), y = k({});
|
|
1072
|
+
function f(g) {
|
|
1073
|
+
return g ? Object.entries(g).map(([p, I]) => ({
|
|
1074
|
+
fieldKey: p,
|
|
1075
|
+
...I
|
|
1076
|
+
})).filter((p) => p.widget && p.widget.widget !== "Hidden").filter((p) => !Z.value.includes(p.fieldKey)) : [];
|
|
1067
1077
|
}
|
|
1068
|
-
function
|
|
1069
|
-
return
|
|
1078
|
+
function S(g) {
|
|
1079
|
+
return g ? Object.entries(g).filter(([p, I]) => I.dependent).reduce((p, [I, A]) => (p[I] = A.dependent, p), {}) : [];
|
|
1070
1080
|
}
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1073
|
-
|
|
1081
|
+
const x = O(() => s.value?.actions ? [...s.value.actions].reverse() : []), _ = Ue({}), T = k(!1);
|
|
1082
|
+
re(async () => {
|
|
1083
|
+
T.value = !0, s.value = await ye(ie.Update, c.className, {
|
|
1074
1084
|
svrStore: n,
|
|
1075
1085
|
bpmStore: o
|
|
1076
1086
|
}, {
|
|
1077
1087
|
workflowId: c.workflowId
|
|
1078
1088
|
});
|
|
1079
|
-
const
|
|
1080
|
-
s.value.actions = s.value.actions?.filter((
|
|
1081
|
-
const
|
|
1082
|
-
return
|
|
1083
|
-
}), i.value =
|
|
1084
|
-
for (const
|
|
1085
|
-
if (s.value.fields[
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1089
|
+
const g = await Oe(ie.Update, c.className, { workflowId: c.workflowId, email: j() }), L = await Ge(c.className, c.workflowId);
|
|
1090
|
+
s.value.actions = s.value.actions?.filter((p) => {
|
|
1091
|
+
const I = g.find((A) => A.button === p.title);
|
|
1092
|
+
return I ? I.isShow : !0;
|
|
1093
|
+
}), i.value = f(s.value.fields), y.value = S(s.value.fields);
|
|
1094
|
+
for (const p in s.value.fields) {
|
|
1095
|
+
if (s.value.fields[p].widget?.widget === "File") {
|
|
1096
|
+
const I = i.value.find((A) => A.fieldKey === p);
|
|
1097
|
+
I && I.widget && (I.widget.files = L[p] ?? [], I.widget.removeFile = (A) => It(c.className, A));
|
|
1088
1098
|
}
|
|
1089
|
-
|
|
1099
|
+
_[p] = s.value.fields[p].modelValue;
|
|
1090
1100
|
}
|
|
1091
|
-
|
|
1101
|
+
T.value = !1;
|
|
1092
1102
|
});
|
|
1093
|
-
function
|
|
1103
|
+
function j() {
|
|
1094
1104
|
return n()?.userInfo?.email_address ?? "";
|
|
1095
1105
|
}
|
|
1096
|
-
async function
|
|
1097
|
-
switch (
|
|
1098
|
-
case
|
|
1099
|
-
let
|
|
1100
|
-
if (l.value?.forEach((
|
|
1101
|
-
|
|
1102
|
-
}), !
|
|
1106
|
+
async function X(g, L, p, I, A) {
|
|
1107
|
+
switch (L) {
|
|
1108
|
+
case J.Submit:
|
|
1109
|
+
let v = !0;
|
|
1110
|
+
if (l.value?.forEach((w) => {
|
|
1111
|
+
w?.validate && (w.validate() || (v = !1));
|
|
1112
|
+
}), !v) {
|
|
1103
1113
|
r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1104
1114
|
return;
|
|
1105
1115
|
}
|
|
1106
|
-
await yt(c.className, c.workflowId, { ...
|
|
1107
|
-
|
|
1108
|
-
}), r?.appContext.config.globalProperties.$notification.success("update success!")
|
|
1116
|
+
g.loading = !0, await yt(c.className, c.workflowId, { ..._, ...y.value }, p), g.loading = !1, l.value?.forEach((w) => {
|
|
1117
|
+
w?.submit && w.submit(c.workflowId);
|
|
1118
|
+
}), r?.appContext.config.globalProperties.$notification.success("update success!");
|
|
1109
1119
|
break;
|
|
1110
|
-
case
|
|
1111
|
-
t.push({ name:
|
|
1120
|
+
case J.Link:
|
|
1121
|
+
t.push({ name: I, params: { className: c.className } });
|
|
1112
1122
|
break;
|
|
1113
1123
|
default:
|
|
1114
|
-
console.warn("Unknown action type:",
|
|
1124
|
+
console.warn("Unknown action type:", L);
|
|
1115
1125
|
}
|
|
1116
1126
|
}
|
|
1117
|
-
const
|
|
1127
|
+
const Z = k([
|
|
1118
1128
|
"jobScpope",
|
|
1119
1129
|
"currentWorkdayId",
|
|
1120
1130
|
"originalGrade",
|
|
@@ -1122,53 +1132,53 @@ const Zt = { class: "page-container" }, en = { class: "page-body" }, tn = { clas
|
|
|
1122
1132
|
"jobAttachmentPrevious",
|
|
1123
1133
|
"positionId"
|
|
1124
1134
|
]);
|
|
1125
|
-
function
|
|
1126
|
-
a[
|
|
1135
|
+
function ee(g, L) {
|
|
1136
|
+
a[g]?.(L, Z), s.value && (i.value = f(s.value.fields));
|
|
1127
1137
|
}
|
|
1128
|
-
const
|
|
1129
|
-
return (
|
|
1130
|
-
const
|
|
1138
|
+
const te = O(() => Re(i.value));
|
|
1139
|
+
return (g, L) => {
|
|
1140
|
+
const p = V("a-card"), I = V("a-spin");
|
|
1131
1141
|
return d(), $("div", dn, [
|
|
1132
|
-
|
|
1142
|
+
N(ke, {
|
|
1133
1143
|
title: s.value.banner.title,
|
|
1134
1144
|
subTitle: s.value.banner.subTitle,
|
|
1135
|
-
email:
|
|
1145
|
+
email: j()
|
|
1136
1146
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1137
|
-
h("div",
|
|
1138
|
-
|
|
1139
|
-
loading:
|
|
1147
|
+
h("div", fn, [
|
|
1148
|
+
N(I, {
|
|
1149
|
+
loading: T.value,
|
|
1140
1150
|
class: "form-container"
|
|
1141
1151
|
}, {
|
|
1142
1152
|
default: b(() => [
|
|
1143
|
-
h("div",
|
|
1153
|
+
h("div", pn, [
|
|
1144
1154
|
h("div", mn, [
|
|
1145
|
-
(d(!0), $(
|
|
1146
|
-
key:
|
|
1147
|
-
title:
|
|
1155
|
+
(d(!0), $(D, null, B(te.value, (A) => (d(), F(p, {
|
|
1156
|
+
key: A.name,
|
|
1157
|
+
title: A.name,
|
|
1148
1158
|
style: { "margin-bottom": "24px" }
|
|
1149
1159
|
}, {
|
|
1150
1160
|
default: b(() => [
|
|
1151
1161
|
h("div", gn, [
|
|
1152
|
-
(d(!0), $(
|
|
1153
|
-
key:
|
|
1162
|
+
(d(!0), $(D, null, B(A.fields, (v) => (d(), F(Le, {
|
|
1163
|
+
key: v.fieldKey,
|
|
1154
1164
|
ref_for: !0,
|
|
1155
1165
|
ref: "dataWidgets",
|
|
1156
|
-
"field-key":
|
|
1157
|
-
config:
|
|
1158
|
-
"class-name":
|
|
1159
|
-
modelValue: v
|
|
1160
|
-
"onUpdate:modelValue": (
|
|
1166
|
+
"field-key": v.fieldKey,
|
|
1167
|
+
config: v,
|
|
1168
|
+
"class-name": g.className,
|
|
1169
|
+
modelValue: _[v.fieldKey],
|
|
1170
|
+
"onUpdate:modelValue": (w) => _[v.fieldKey] = w,
|
|
1161
1171
|
class: "form-field",
|
|
1162
|
-
onChange:
|
|
1172
|
+
onChange: ee
|
|
1163
1173
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
1164
1174
|
])
|
|
1165
1175
|
]),
|
|
1166
1176
|
_: 2
|
|
1167
1177
|
}, 1032, ["title"]))), 128))
|
|
1168
1178
|
]),
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
])) :
|
|
1179
|
+
g.$slots.content ? (d(), $("div", vn, [
|
|
1180
|
+
se(g.$slots, "content", {}, void 0, !0)
|
|
1181
|
+
])) : ae("", !0)
|
|
1172
1182
|
])
|
|
1173
1183
|
]),
|
|
1174
1184
|
_: 3
|
|
@@ -1176,38 +1186,39 @@ const Zt = { class: "page-container" }, en = { class: "page-body" }, tn = { clas
|
|
|
1176
1186
|
]),
|
|
1177
1187
|
h("div", _n, [
|
|
1178
1188
|
h("div", yn, [
|
|
1179
|
-
|
|
1189
|
+
se(g.$slots, "action", {}, void 0, !0),
|
|
1180
1190
|
h("div", wn, [
|
|
1181
|
-
(d(!0), $(
|
|
1182
|
-
key:
|
|
1183
|
-
|
|
1191
|
+
(d(!0), $(D, null, B(x.value, (A) => (d(), F(me, {
|
|
1192
|
+
key: A.Title,
|
|
1193
|
+
loading: A.loading,
|
|
1194
|
+
config: A,
|
|
1184
1195
|
class: "action-button",
|
|
1185
|
-
onClick:
|
|
1186
|
-
}, null, 8, ["config"]))), 128))
|
|
1196
|
+
onClick: (...v) => X(A, ...v)
|
|
1197
|
+
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1187
1198
|
])
|
|
1188
1199
|
])
|
|
1189
1200
|
])
|
|
1190
1201
|
]);
|
|
1191
1202
|
};
|
|
1192
1203
|
}
|
|
1193
|
-
}), hn = /* @__PURE__ */ de(bn, [["__scopeId", "data-v-
|
|
1204
|
+
}), hn = /* @__PURE__ */ de(bn, [["__scopeId", "data-v-9e5cdbac"]]), Xe = Symbol("library-custom-comp");
|
|
1194
1205
|
function kn() {
|
|
1195
1206
|
return ce(Xe, null);
|
|
1196
1207
|
}
|
|
1197
|
-
const Cn = Symbol("ArcoConfigProvider"), Vn = "arco", Sn = "$arco",
|
|
1208
|
+
const Cn = Symbol("ArcoConfigProvider"), Vn = "arco", Sn = "$arco", $n = (e) => {
|
|
1198
1209
|
var t, a, n;
|
|
1199
1210
|
const o = _e(), l = ce(Cn, void 0);
|
|
1200
1211
|
return `${(n = (a = l?.prefixCls) != null ? a : (t = o?.appContext.config.globalProperties[Sn]) == null ? void 0 : t.classPrefix) != null ? n : Vn}-${e}`;
|
|
1201
|
-
},
|
|
1212
|
+
}, xn = Object.prototype.toString;
|
|
1202
1213
|
function In(e) {
|
|
1203
|
-
return
|
|
1214
|
+
return xn.call(e) === "[object Number]" && e === e;
|
|
1204
1215
|
}
|
|
1205
1216
|
var An = (e, t) => {
|
|
1206
1217
|
for (const [a, n] of t)
|
|
1207
1218
|
e[a] = n;
|
|
1208
1219
|
return e;
|
|
1209
1220
|
};
|
|
1210
|
-
const Tn =
|
|
1221
|
+
const Tn = K({
|
|
1211
1222
|
name: "IconDownload",
|
|
1212
1223
|
props: {
|
|
1213
1224
|
size: {
|
|
@@ -1234,7 +1245,7 @@ const Tn = B({
|
|
|
1234
1245
|
click: (e) => !0
|
|
1235
1246
|
},
|
|
1236
1247
|
setup(e, { emit: t }) {
|
|
1237
|
-
const a =
|
|
1248
|
+
const a = $n("icon"), n = O(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), o = O(() => {
|
|
1238
1249
|
const r = {};
|
|
1239
1250
|
return e.size && (r.fontSize = In(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
|
|
1240
1251
|
});
|
|
@@ -1246,8 +1257,8 @@ const Tn = B({
|
|
|
1246
1257
|
}
|
|
1247
1258
|
};
|
|
1248
1259
|
}
|
|
1249
|
-
}),
|
|
1250
|
-
function
|
|
1260
|
+
}), Un = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
1261
|
+
function Nn(e, t, a, n, o, l) {
|
|
1251
1262
|
return d(), $("svg", {
|
|
1252
1263
|
viewBox: "0 0 48 48",
|
|
1253
1264
|
fill: "none",
|
|
@@ -1261,22 +1272,22 @@ function Un(e, t, a, n, o, l) {
|
|
|
1261
1272
|
onClick: t[0] || (t[0] = (...r) => e.onClick && e.onClick(...r))
|
|
1262
1273
|
}, t[1] || (t[1] = [
|
|
1263
1274
|
h("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
1264
|
-
]), 14,
|
|
1275
|
+
]), 14, Un);
|
|
1265
1276
|
}
|
|
1266
|
-
var
|
|
1267
|
-
const
|
|
1277
|
+
var xe = /* @__PURE__ */ An(Tn, [["render", Nn]]);
|
|
1278
|
+
const Fn = Object.assign(xe, {
|
|
1268
1279
|
install: (e, t) => {
|
|
1269
1280
|
var a;
|
|
1270
1281
|
const n = (a = t?.iconPrefix) != null ? a : "";
|
|
1271
|
-
e.component(n +
|
|
1282
|
+
e.component(n + xe.name, xe);
|
|
1272
1283
|
}
|
|
1273
|
-
}),
|
|
1284
|
+
}), Ln = { class: "page-container" }, Pn = { class: "page-body" }, Rn = { class: "detail-card" }, Mn = { class: "form-fields-vertical" }, Dn = { class: "detail-fields" }, Hn = { class: "detail-field" }, Bn = { class: "field-label" }, Kn = {
|
|
1274
1285
|
key: 1,
|
|
1275
1286
|
class: "field-value"
|
|
1276
|
-
},
|
|
1287
|
+
}, jn = { class: "detail-field-wrapper" }, zn = { class: "detail-field" }, En = {
|
|
1277
1288
|
key: 0,
|
|
1278
1289
|
class: "detail-content"
|
|
1279
|
-
}, On = { class: "page-footer" }, Gn = { class: "action-container" }, Wn = { class: "action-buttons" }, qn = /* @__PURE__ */
|
|
1290
|
+
}, On = { class: "page-footer" }, Gn = { class: "action-container" }, Wn = { class: "action-buttons" }, qn = /* @__PURE__ */ K({
|
|
1280
1291
|
__name: "DetailView",
|
|
1281
1292
|
props: {
|
|
1282
1293
|
className: {},
|
|
@@ -1292,17 +1303,17 @@ const Ln = Object.assign($e, {
|
|
|
1292
1303
|
subTitle: ""
|
|
1293
1304
|
}
|
|
1294
1305
|
}), i = k([]);
|
|
1295
|
-
function
|
|
1296
|
-
return
|
|
1297
|
-
fieldKey:
|
|
1298
|
-
...
|
|
1299
|
-
})).filter((
|
|
1306
|
+
function y(v) {
|
|
1307
|
+
return v ? Object.entries(v).map(([P, C]) => (typeof C.modelValue == "boolean" ? C.fieldValue = C.modelValue ? "Yes" : "No" : C.fieldValue = C.modelValue, {
|
|
1308
|
+
fieldKey: P,
|
|
1309
|
+
...C
|
|
1310
|
+
})).filter((P) => P.widget && P.widget.widget !== "Hidden") : [];
|
|
1300
1311
|
}
|
|
1301
|
-
const
|
|
1302
|
-
const
|
|
1303
|
-
return
|
|
1312
|
+
const f = O(() => Re(i.value)), S = O(() => s.value?.actions ? [...s.value.actions].reverse() : []), x = k(!0), _ = (v, w) => {
|
|
1313
|
+
const P = v.findIndex((C) => C.isCurrent);
|
|
1314
|
+
return v.map((C, m) => {
|
|
1304
1315
|
const u = {
|
|
1305
|
-
id:
|
|
1316
|
+
id: C.id,
|
|
1306
1317
|
title: "",
|
|
1307
1318
|
proxy: "",
|
|
1308
1319
|
sub: "",
|
|
@@ -1310,182 +1321,183 @@ const Ln = Object.assign($e, {
|
|
|
1310
1321
|
status: 1,
|
|
1311
1322
|
time: ""
|
|
1312
1323
|
};
|
|
1313
|
-
u.title =
|
|
1314
|
-
const
|
|
1315
|
-
if (
|
|
1324
|
+
u.title = C.workflowProcessApprovers[0]?.name;
|
|
1325
|
+
const U = C.workflowProcessApprovers[C.workflowProcessApprovers.length - 1], z = C.workflowHistorys[C.workflowHistorys.length - 1], q = z?.workflowHistoryApprovers[z?.workflowHistoryApprovers?.length - 1];
|
|
1326
|
+
if (U && q && U?.email?.toLowerCase() !== q?.approverEmail?.toLowerCase() && (u.title = `${q.name}`, u.proxy = `Proxy: ${U.name}`), C.sort > 1 ? u.sub = "Approver Role: " + C.nodeName.replace("Submit", "").replace("Approve", "") : u.sub = "Submit Application", C.isCurrent && w !== -1)
|
|
1316
1327
|
u.desc = "In Approval", u.status = 1;
|
|
1317
1328
|
else {
|
|
1318
|
-
const E =
|
|
1329
|
+
const E = C.workflowHistorys[C.workflowHistorys.length - 1];
|
|
1319
1330
|
if (E && E.status === 100)
|
|
1320
1331
|
u.time = ve(E.takeActionAt, "yyyy-MM-dd hh:mm:ss"), u.status = 2, u.desc = "approve success!";
|
|
1321
1332
|
else if (E && E.status === 999)
|
|
1322
1333
|
u.time = ve(E.takeActionAt, "yyyy-MM-dd hh:mm:ss"), u.status = 0, u.desc = "approve reject!";
|
|
1323
1334
|
else if (E)
|
|
1324
|
-
if (u.time = ve(E.takeActionAt, "yyyy-MM-dd hh:mm:ss"),
|
|
1335
|
+
if (u.time = ve(E.takeActionAt, "yyyy-MM-dd hh:mm:ss"), C.sort === 1)
|
|
1325
1336
|
u.status = 2, u.desc = "";
|
|
1326
1337
|
else {
|
|
1327
|
-
const
|
|
1328
|
-
u.status = 3, u.desc =
|
|
1338
|
+
const le = E.workflowHistoryApprovers[0];
|
|
1339
|
+
u.status = 3, u.desc = le?.reason ? `Rejected reason: ${le.reason}` : "Rejected";
|
|
1329
1340
|
}
|
|
1330
|
-
else
|
|
1341
|
+
else m < P || P === -1 ? (u.status = 0, u.desc = "Skipped") : (u.status = 0, u.desc = "Pending Approval");
|
|
1331
1342
|
E && E.status;
|
|
1332
1343
|
}
|
|
1333
1344
|
return u;
|
|
1334
1345
|
});
|
|
1335
|
-
},
|
|
1336
|
-
|
|
1337
|
-
|
|
1346
|
+
}, T = k([]), j = k(!1);
|
|
1347
|
+
re(async () => {
|
|
1348
|
+
x.value = !0, s.value = await ye(ie.Details, c.className, {
|
|
1338
1349
|
svrStore: t,
|
|
1339
1350
|
bpmStore: a
|
|
1340
1351
|
}, {
|
|
1341
1352
|
workflowId: c.workflowId
|
|
1342
1353
|
});
|
|
1343
|
-
const
|
|
1344
|
-
|
|
1345
|
-
const
|
|
1346
|
-
return
|
|
1347
|
-
}),
|
|
1348
|
-
for (const
|
|
1349
|
-
if (s.value.fields[
|
|
1350
|
-
const
|
|
1351
|
-
|
|
1354
|
+
const v = await Oe(ie.Details, c.className, { workflowId: c.workflowId, email: Q() }), w = await Ge(c.className, c.workflowId);
|
|
1355
|
+
L.value = await At(), te.value = await De(c.workflowId), s.value.actions = s.value.actions?.filter((C) => {
|
|
1356
|
+
const m = v.find((u) => u.button === C.title);
|
|
1357
|
+
return m ? m.isShow : !0;
|
|
1358
|
+
}), j.value = v.find((C) => C.button === "IsGlobal")?.isShow ?? !1, i.value = y(s.value.fields);
|
|
1359
|
+
for (const C in s.value.fields)
|
|
1360
|
+
if (s.value.fields[C].widget?.widget === "File") {
|
|
1361
|
+
const m = i.value.find((u) => u.fieldKey === C);
|
|
1362
|
+
m && m.widget && (m.widget.files = w[C] ?? []);
|
|
1352
1363
|
}
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1364
|
+
const P = await $t(c.className, c.workflowId);
|
|
1365
|
+
T.value = _(P, 0), x.value = !1;
|
|
1355
1366
|
});
|
|
1356
|
-
async function
|
|
1357
|
-
return n[
|
|
1367
|
+
async function X(v, w) {
|
|
1368
|
+
return n[v]?.(w);
|
|
1358
1369
|
}
|
|
1359
|
-
function
|
|
1370
|
+
function Q() {
|
|
1360
1371
|
return t()?.userInfo?.email_address ?? "";
|
|
1361
1372
|
}
|
|
1362
|
-
async function
|
|
1373
|
+
async function Z(v, w, P, C, m) {
|
|
1363
1374
|
try {
|
|
1364
|
-
switch (
|
|
1365
|
-
case
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1375
|
+
switch (w) {
|
|
1376
|
+
case J.Submit:
|
|
1377
|
+
v.loading = !0;
|
|
1378
|
+
const { reason: u, ifGlobal: U } = await X(m, { isGlobal: j.value }), z = m === "Approve" ? "100" : "-1";
|
|
1379
|
+
await Vt(c.className, c.workflowId, Q(), u, [Number(c.workflowId)], P, z, U), v.loading = !1;
|
|
1380
|
+
const q = m === "Approve" ? "approve success!" : "approve reject!";
|
|
1381
|
+
r?.appContext.config.globalProperties.$notification.success(q);
|
|
1370
1382
|
break;
|
|
1371
|
-
case
|
|
1372
|
-
|
|
1383
|
+
case J.Link:
|
|
1384
|
+
C === "List" && o.push({ name: "List", params: { className: c.className } });
|
|
1373
1385
|
break;
|
|
1374
1386
|
default:
|
|
1375
|
-
console.warn("Unknown action type:",
|
|
1387
|
+
console.warn("Unknown action type:", w);
|
|
1376
1388
|
}
|
|
1377
1389
|
} catch {
|
|
1378
1390
|
}
|
|
1379
1391
|
}
|
|
1380
|
-
const
|
|
1381
|
-
async function
|
|
1382
|
-
if (!
|
|
1392
|
+
const ee = k(""), te = k([]), g = k(""), L = k([]);
|
|
1393
|
+
async function p() {
|
|
1394
|
+
if (!g.value) {
|
|
1383
1395
|
r?.appContext.config.globalProperties.$message.error("Please select an approver");
|
|
1384
1396
|
return;
|
|
1385
1397
|
}
|
|
1386
|
-
await
|
|
1398
|
+
await I(), await Tt(c.workflowId, g.value), r?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
|
|
1387
1399
|
}
|
|
1388
|
-
async function
|
|
1389
|
-
const { Modal:
|
|
1390
|
-
return new Promise((
|
|
1391
|
-
|
|
1400
|
+
async function I() {
|
|
1401
|
+
const { Modal: v } = await import("@arco-design/web-vue");
|
|
1402
|
+
return new Promise((w, P) => {
|
|
1403
|
+
v.confirm({
|
|
1392
1404
|
title: "Confirm Assign Approver",
|
|
1393
1405
|
content: "Do you want to assign the selected approver?",
|
|
1394
1406
|
okText: "OK",
|
|
1395
1407
|
cancelText: "Cancel",
|
|
1396
|
-
onOk: () =>
|
|
1397
|
-
onCancel: () =>
|
|
1408
|
+
onOk: () => w(!0),
|
|
1409
|
+
onCancel: () => P()
|
|
1398
1410
|
});
|
|
1399
1411
|
});
|
|
1400
1412
|
}
|
|
1401
|
-
async function
|
|
1402
|
-
if (!
|
|
1413
|
+
async function A() {
|
|
1414
|
+
if (!ee.value.trim()) {
|
|
1403
1415
|
r?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
|
|
1404
1416
|
return;
|
|
1405
1417
|
}
|
|
1406
|
-
await
|
|
1418
|
+
await Ut(c.workflowId, Q(), ee.value), ee.value = "", te.value = await De(c.workflowId), r?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
|
|
1407
1419
|
}
|
|
1408
|
-
return (
|
|
1409
|
-
const
|
|
1410
|
-
return d(), $("div",
|
|
1411
|
-
|
|
1420
|
+
return (v, w) => {
|
|
1421
|
+
const P = V("a-link"), C = V("a-space"), m = V("a-card"), u = V("a-option"), U = V("a-select"), z = V("a-button"), q = V("a-textarea"), E = V("a-list-item"), le = V("a-list"), Ce = V("a-spin");
|
|
1422
|
+
return d(), $("div", Ln, [
|
|
1423
|
+
N(ke, {
|
|
1412
1424
|
title: s.value.banner.title,
|
|
1413
1425
|
subTitle: s.value.banner.subTitle,
|
|
1414
|
-
email:
|
|
1426
|
+
email: Q()
|
|
1415
1427
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1416
1428
|
h("div", Pn, [
|
|
1417
|
-
|
|
1418
|
-
loading:
|
|
1429
|
+
N(Ce, {
|
|
1430
|
+
loading: x.value,
|
|
1419
1431
|
class: "detail-container"
|
|
1420
1432
|
}, {
|
|
1421
1433
|
default: b(() => [
|
|
1422
1434
|
h("div", Rn, [
|
|
1423
|
-
(d(),
|
|
1435
|
+
(d(), F(Te(Ve(l).Steps), { steps: T.value }, null, 8, ["steps"])),
|
|
1424
1436
|
h("div", Mn, [
|
|
1425
|
-
(d(!0), $(
|
|
1426
|
-
key:
|
|
1427
|
-
title:
|
|
1437
|
+
(d(!0), $(D, null, B(f.value, (R) => (d(), F(m, {
|
|
1438
|
+
key: R.name,
|
|
1439
|
+
title: R.name,
|
|
1428
1440
|
style: { "margin-bottom": "24px" }
|
|
1429
1441
|
}, {
|
|
1430
1442
|
default: b(() => [
|
|
1431
|
-
h("div",
|
|
1432
|
-
(d(!0), $(
|
|
1433
|
-
key:
|
|
1443
|
+
h("div", Dn, [
|
|
1444
|
+
(d(!0), $(D, null, B(R.fields, (oe) => (d(), $("div", {
|
|
1445
|
+
key: oe.fieldKey,
|
|
1434
1446
|
class: "detail-field-wrapper"
|
|
1435
1447
|
}, [
|
|
1436
|
-
h("div",
|
|
1437
|
-
h("div",
|
|
1438
|
-
|
|
1448
|
+
h("div", Hn, [
|
|
1449
|
+
h("div", Bn, W(oe.widget?.title), 1),
|
|
1450
|
+
oe.widget?.widget === "File" ? (d(!0), $(D, { key: 0 }, B(oe.widget.files, (M) => (d(), $("div", {
|
|
1439
1451
|
class: "field-value",
|
|
1440
|
-
key:
|
|
1452
|
+
key: M.id
|
|
1441
1453
|
}, [
|
|
1442
|
-
|
|
1454
|
+
N(C, null, {
|
|
1443
1455
|
default: b(() => [
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
href:
|
|
1456
|
+
Y(W(M.name) + " ", 1),
|
|
1457
|
+
N(P, {
|
|
1458
|
+
href: M.url,
|
|
1447
1459
|
target: "_blank"
|
|
1448
1460
|
}, {
|
|
1449
1461
|
default: b(() => [
|
|
1450
|
-
|
|
1462
|
+
N(Ve(Fn), { style: { color: "#7A00E6" } })
|
|
1451
1463
|
]),
|
|
1452
1464
|
_: 2
|
|
1453
1465
|
}, 1032, ["href"])
|
|
1454
1466
|
]),
|
|
1455
1467
|
_: 2
|
|
1456
1468
|
}, 1024)
|
|
1457
|
-
]))), 128)) : (d(), $("div",
|
|
1469
|
+
]))), 128)) : (d(), $("div", Kn, W(oe.fieldValue), 1))
|
|
1458
1470
|
])
|
|
1459
1471
|
]))), 128))
|
|
1460
1472
|
])
|
|
1461
1473
|
]),
|
|
1462
1474
|
_: 2
|
|
1463
1475
|
}, 1032, ["title"]))), 128)),
|
|
1464
|
-
|
|
1476
|
+
N(C, null, {
|
|
1465
1477
|
default: b(() => [
|
|
1466
|
-
U
|
|
1467
|
-
modelValue:
|
|
1468
|
-
"onUpdate:modelValue":
|
|
1478
|
+
N(U, {
|
|
1479
|
+
modelValue: g.value,
|
|
1480
|
+
"onUpdate:modelValue": w[0] || (w[0] = (R) => g.value = R)
|
|
1469
1481
|
}, {
|
|
1470
1482
|
default: b(() => [
|
|
1471
|
-
(d(!0), $(
|
|
1472
|
-
key:
|
|
1473
|
-
value:
|
|
1483
|
+
(d(!0), $(D, null, B(L.value, (R) => (d(), F(u, {
|
|
1484
|
+
key: R.value,
|
|
1485
|
+
value: R.value
|
|
1474
1486
|
}, {
|
|
1475
1487
|
default: b(() => [
|
|
1476
|
-
|
|
1488
|
+
Y(W(R.label), 1)
|
|
1477
1489
|
]),
|
|
1478
1490
|
_: 2
|
|
1479
1491
|
}, 1032, ["value"]))), 128))
|
|
1480
1492
|
]),
|
|
1481
1493
|
_: 1
|
|
1482
1494
|
}, 8, ["modelValue"]),
|
|
1483
|
-
|
|
1495
|
+
N(z, {
|
|
1484
1496
|
type: "primary",
|
|
1485
|
-
onClick:
|
|
1497
|
+
onClick: p
|
|
1486
1498
|
}, {
|
|
1487
|
-
default: b(() =>
|
|
1488
|
-
|
|
1499
|
+
default: b(() => w[2] || (w[2] = [
|
|
1500
|
+
Y("Assign Approver", -1)
|
|
1489
1501
|
])),
|
|
1490
1502
|
_: 1,
|
|
1491
1503
|
__: [2]
|
|
@@ -1493,45 +1505,45 @@ const Ln = Object.assign($e, {
|
|
|
1493
1505
|
]),
|
|
1494
1506
|
_: 1
|
|
1495
1507
|
}),
|
|
1496
|
-
h("div",
|
|
1497
|
-
h("div",
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
modelValue:
|
|
1501
|
-
"onUpdate:modelValue":
|
|
1508
|
+
h("div", jn, [
|
|
1509
|
+
h("div", zn, [
|
|
1510
|
+
w[4] || (w[4] = h("div", { class: "field-label" }, "Comment", -1)),
|
|
1511
|
+
N(q, {
|
|
1512
|
+
modelValue: ee.value,
|
|
1513
|
+
"onUpdate:modelValue": w[1] || (w[1] = (R) => ee.value = R)
|
|
1502
1514
|
}, null, 8, ["modelValue"]),
|
|
1503
|
-
|
|
1515
|
+
N(z, {
|
|
1504
1516
|
type: "primary",
|
|
1505
|
-
onClick:
|
|
1517
|
+
onClick: A
|
|
1506
1518
|
}, {
|
|
1507
|
-
default: b(() =>
|
|
1508
|
-
|
|
1519
|
+
default: b(() => w[3] || (w[3] = [
|
|
1520
|
+
Y("Add Comment", -1)
|
|
1509
1521
|
])),
|
|
1510
1522
|
_: 1,
|
|
1511
1523
|
__: [3]
|
|
1512
1524
|
})
|
|
1513
1525
|
])
|
|
1514
1526
|
]),
|
|
1515
|
-
|
|
1516
|
-
header: b(() =>
|
|
1517
|
-
|
|
1527
|
+
te.value.length ? (d(), F(le, { key: 0 }, {
|
|
1528
|
+
header: b(() => w[5] || (w[5] = [
|
|
1529
|
+
Y(" Comments History ", -1)
|
|
1518
1530
|
])),
|
|
1519
1531
|
default: b(() => [
|
|
1520
|
-
(d(!0), $(
|
|
1521
|
-
key:
|
|
1532
|
+
(d(!0), $(D, null, B(te.value, (R) => (d(), F(E, {
|
|
1533
|
+
key: R.associator
|
|
1522
1534
|
}, {
|
|
1523
1535
|
default: b(() => [
|
|
1524
|
-
|
|
1536
|
+
Y(W(R.associator) + ": " + W(R.comments) + " (" + W(Ve(ve)(R.createdAt)) + ") ", 1)
|
|
1525
1537
|
]),
|
|
1526
1538
|
_: 2
|
|
1527
1539
|
}, 1024))), 128))
|
|
1528
1540
|
]),
|
|
1529
1541
|
_: 1
|
|
1530
|
-
})) :
|
|
1542
|
+
})) : ae("", !0)
|
|
1531
1543
|
]),
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
])) :
|
|
1544
|
+
v.$slots.content ? (d(), $("div", En, [
|
|
1545
|
+
se(v.$slots, "content", {}, void 0, !0)
|
|
1546
|
+
])) : ae("", !0)
|
|
1535
1547
|
])
|
|
1536
1548
|
]),
|
|
1537
1549
|
_: 3
|
|
@@ -1539,28 +1551,29 @@ const Ln = Object.assign($e, {
|
|
|
1539
1551
|
]),
|
|
1540
1552
|
h("div", On, [
|
|
1541
1553
|
h("div", Gn, [
|
|
1542
|
-
|
|
1554
|
+
se(v.$slots, "action", {}, void 0, !0),
|
|
1543
1555
|
h("div", Wn, [
|
|
1544
|
-
(d(!0), $(
|
|
1545
|
-
key:
|
|
1546
|
-
|
|
1556
|
+
(d(!0), $(D, null, B(S.value, (R) => (d(), F(me, {
|
|
1557
|
+
key: R.Title,
|
|
1558
|
+
loading: R.loading,
|
|
1559
|
+
config: R,
|
|
1547
1560
|
class: "action-button",
|
|
1548
|
-
onClick:
|
|
1549
|
-
}, null, 8, ["config"]))), 128))
|
|
1561
|
+
onClick: (...oe) => Z(R, ...oe)
|
|
1562
|
+
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1550
1563
|
])
|
|
1551
1564
|
])
|
|
1552
1565
|
])
|
|
1553
1566
|
]);
|
|
1554
1567
|
};
|
|
1555
1568
|
}
|
|
1556
|
-
}), Yn = /* @__PURE__ */ de(qn, [["__scopeId", "data-v-
|
|
1569
|
+
}), Yn = /* @__PURE__ */ de(qn, [["__scopeId", "data-v-9d23c75b"]]), Jn = { class: "list-container" }, Xn = { class: "query-title" }, Qn = { class: "field-wrapper" }, Zn = /* @__PURE__ */ K({
|
|
1557
1570
|
name: "ListView",
|
|
1558
1571
|
__name: "ListView",
|
|
1559
1572
|
props: {
|
|
1560
1573
|
className: {}
|
|
1561
1574
|
},
|
|
1562
1575
|
setup(e) {
|
|
1563
|
-
const t = he(), a = be(), n = we(), o = e, l = k(), r =
|
|
1576
|
+
const t = he(), a = be(), n = we(), o = e, l = k(), r = Ue({
|
|
1564
1577
|
current: 1,
|
|
1565
1578
|
total: 0,
|
|
1566
1579
|
pageSize: 10,
|
|
@@ -1570,15 +1583,15 @@ const Ln = Object.assign($e, {
|
|
|
1570
1583
|
filters: []
|
|
1571
1584
|
});
|
|
1572
1585
|
function c() {
|
|
1573
|
-
const
|
|
1586
|
+
const m = Object.entries(p.value).filter(([, u]) => u && u !== "").map(([u, U]) => ({
|
|
1574
1587
|
key: u,
|
|
1575
|
-
value:
|
|
1588
|
+
value: U
|
|
1576
1589
|
// operator: 'like' // 根据实际需要调整操作符
|
|
1577
1590
|
}));
|
|
1578
1591
|
return {
|
|
1579
1592
|
pageNumber: r.current,
|
|
1580
1593
|
pageSize: r.pageSize,
|
|
1581
|
-
filters: [...r.filters, ...
|
|
1594
|
+
filters: [...r.filters, ...m],
|
|
1582
1595
|
sorts: [{
|
|
1583
1596
|
key: "status",
|
|
1584
1597
|
type: 0
|
|
@@ -1586,14 +1599,14 @@ const Ln = Object.assign($e, {
|
|
|
1586
1599
|
};
|
|
1587
1600
|
}
|
|
1588
1601
|
const s = O(() => ({
|
|
1589
|
-
x:
|
|
1602
|
+
x: f.value.length * 150 + 250
|
|
1590
1603
|
// 只设置横向滚动
|
|
1591
1604
|
// 移除 y 属性,让表格高度自适应
|
|
1592
|
-
})), i = (
|
|
1593
|
-
const u = Object.entries(
|
|
1594
|
-
title:
|
|
1595
|
-
dataIndex:
|
|
1596
|
-
order:
|
|
1605
|
+
})), i = (m) => {
|
|
1606
|
+
const u = Object.entries(m).filter(([, U]) => U.widget?.column).map(([U, z], q) => ({
|
|
1607
|
+
title: z.widget.title,
|
|
1608
|
+
dataIndex: U.charAt(0).toLowerCase() + U.slice(1),
|
|
1609
|
+
order: z.order,
|
|
1597
1610
|
ellipsis: !0,
|
|
1598
1611
|
tooltip: !0,
|
|
1599
1612
|
width: 150,
|
|
@@ -1601,7 +1614,7 @@ const Ln = Object.assign($e, {
|
|
|
1601
1614
|
// 启用最小宽度
|
|
1602
1615
|
resizable: !0
|
|
1603
1616
|
// 启用列宽调整
|
|
1604
|
-
})).sort((
|
|
1617
|
+
})).sort((U, z) => U.order - z.order);
|
|
1605
1618
|
u.push({
|
|
1606
1619
|
title: "Actions",
|
|
1607
1620
|
slotName: "optional",
|
|
@@ -1610,144 +1623,144 @@ const Ln = Object.assign($e, {
|
|
|
1610
1623
|
minWidth: 200,
|
|
1611
1624
|
fixed: "right",
|
|
1612
1625
|
resizable: !1
|
|
1613
|
-
}),
|
|
1614
|
-
},
|
|
1615
|
-
|
|
1616
|
-
const
|
|
1617
|
-
|
|
1618
|
-
},
|
|
1619
|
-
|
|
1620
|
-
|
|
1626
|
+
}), f.value = u;
|
|
1627
|
+
}, y = k([]), f = k([]), S = k(!0), x = k(!0), _ = k(), T = async () => {
|
|
1628
|
+
x.value = !0;
|
|
1629
|
+
const m = await vt(o.className, c());
|
|
1630
|
+
y.value = m.data, r.total = m.totalCount, x.value = !1;
|
|
1631
|
+
}, j = k(!1);
|
|
1632
|
+
re(async () => {
|
|
1633
|
+
S.value = !0, l.value = await ye(3, o.className, {
|
|
1621
1634
|
svrStore: t,
|
|
1622
1635
|
bpmStore: a
|
|
1623
|
-
}), i(l.value.fields),
|
|
1636
|
+
}), i(l.value.fields), A(l.value.fields), v(), L(l.value?.tabs?.[0]?.key || ""), _.value = l.value.actions, S.value = !1, j.value = !0;
|
|
1624
1637
|
}), nt(() => {
|
|
1625
|
-
|
|
1638
|
+
j.value && T();
|
|
1626
1639
|
});
|
|
1627
|
-
const
|
|
1628
|
-
r.current =
|
|
1629
|
-
},
|
|
1630
|
-
r.pageSize =
|
|
1640
|
+
const X = (m) => {
|
|
1641
|
+
r.current = m, T();
|
|
1642
|
+
}, Q = (m) => {
|
|
1643
|
+
r.pageSize = m, T();
|
|
1631
1644
|
};
|
|
1632
|
-
function
|
|
1633
|
-
switch (
|
|
1634
|
-
case
|
|
1635
|
-
n.push({ name:
|
|
1645
|
+
function Z(m, u, U, z, q) {
|
|
1646
|
+
switch (m) {
|
|
1647
|
+
case J.Link:
|
|
1648
|
+
n.push({ name: U, params: { workflowId: q } });
|
|
1636
1649
|
break;
|
|
1637
1650
|
default:
|
|
1638
|
-
console.warn("Unknown action type:",
|
|
1651
|
+
console.warn("Unknown action type:", m);
|
|
1639
1652
|
}
|
|
1640
1653
|
}
|
|
1641
|
-
function
|
|
1642
|
-
switch (
|
|
1643
|
-
case
|
|
1644
|
-
n.push({ name:
|
|
1654
|
+
function ee(m, u, U) {
|
|
1655
|
+
switch (m) {
|
|
1656
|
+
case J.Link:
|
|
1657
|
+
n.push({ name: U });
|
|
1645
1658
|
break;
|
|
1646
1659
|
default:
|
|
1647
|
-
console.warn("Unknown action type:",
|
|
1660
|
+
console.warn("Unknown action type:", m);
|
|
1648
1661
|
}
|
|
1649
1662
|
}
|
|
1650
|
-
function
|
|
1663
|
+
function te() {
|
|
1651
1664
|
return t()?.userInfo?.email_address ?? "";
|
|
1652
1665
|
}
|
|
1653
|
-
function m
|
|
1654
|
-
return
|
|
1666
|
+
function g(m, u) {
|
|
1667
|
+
return m.replace(/{currentUserEmail}/g, u);
|
|
1655
1668
|
}
|
|
1656
|
-
function
|
|
1657
|
-
const u = l.value?.tabs?.find((
|
|
1658
|
-
r.filters = u?.map((
|
|
1659
|
-
...
|
|
1660
|
-
value:
|
|
1661
|
-
})) || [],
|
|
1669
|
+
function L(m) {
|
|
1670
|
+
const u = l.value?.tabs?.find((U) => U.key === m)?.filters;
|
|
1671
|
+
r.filters = u?.map((U) => ({
|
|
1672
|
+
...U,
|
|
1673
|
+
value: g(U.value, te())
|
|
1674
|
+
})) || [], T();
|
|
1662
1675
|
}
|
|
1663
|
-
const
|
|
1664
|
-
function
|
|
1665
|
-
if (!
|
|
1666
|
-
|
|
1676
|
+
const p = k({}), I = k([]);
|
|
1677
|
+
function A(m) {
|
|
1678
|
+
if (!m) return [];
|
|
1679
|
+
I.value = Object.entries(m).filter(([, u]) => u.isFiltered).map(([u, U]) => ({ fieldKey: u, fieldConfig: U }));
|
|
1667
1680
|
}
|
|
1668
|
-
const
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
}),
|
|
1673
|
-
},
|
|
1674
|
-
r.current = 1,
|
|
1675
|
-
},
|
|
1676
|
-
l.value &&
|
|
1681
|
+
const v = () => {
|
|
1682
|
+
const m = {};
|
|
1683
|
+
I.value.forEach(({ fieldKey: u, fieldConfig: U }) => {
|
|
1684
|
+
m[u] = U.modelValue;
|
|
1685
|
+
}), p.value = m;
|
|
1686
|
+
}, w = () => {
|
|
1687
|
+
r.current = 1, T();
|
|
1688
|
+
}, P = () => {
|
|
1689
|
+
l.value && v(), w();
|
|
1677
1690
|
};
|
|
1678
|
-
function
|
|
1679
|
-
return !(
|
|
1691
|
+
function C(m, u) {
|
|
1692
|
+
return !(m.location !== "InTable" || m.title === "Update" && (u.status === 100 || u.status === -1));
|
|
1680
1693
|
}
|
|
1681
|
-
return (
|
|
1682
|
-
const
|
|
1694
|
+
return (m, u) => {
|
|
1695
|
+
const U = V("a-col"), z = V("a-button"), q = V("a-space"), E = V("a-row"), le = V("a-card"), Ce = V("a-tab-pane"), R = V("a-tabs"), oe = V("a-table");
|
|
1683
1696
|
return d(), $("div", Jn, [
|
|
1684
|
-
|
|
1697
|
+
N(ke, {
|
|
1685
1698
|
title: l.value?.banner.title ?? "",
|
|
1686
1699
|
subTitle: l.value?.banner.subTitle ?? "",
|
|
1687
|
-
email:
|
|
1700
|
+
email: te()
|
|
1688
1701
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1689
|
-
|
|
1702
|
+
N(le, null, {
|
|
1690
1703
|
default: b(() => [
|
|
1691
1704
|
h("div", Xn, [
|
|
1692
1705
|
u[0] || (u[0] = h("h3", null, "Search Conditions", -1)),
|
|
1693
1706
|
h("div", null, [
|
|
1694
|
-
(d(!0), $(
|
|
1695
|
-
key:
|
|
1707
|
+
(d(!0), $(D, null, B(_.value, (M) => (d(), $(D, {
|
|
1708
|
+
key: M.title
|
|
1696
1709
|
}, [
|
|
1697
|
-
|
|
1710
|
+
M.location === "InOperation" ? (d(), F(me, {
|
|
1698
1711
|
key: 0,
|
|
1699
|
-
config:
|
|
1700
|
-
onClick:
|
|
1701
|
-
}, null, 8, ["config"])) :
|
|
1712
|
+
config: M,
|
|
1713
|
+
onClick: ee
|
|
1714
|
+
}, null, 8, ["config"])) : ae("", !0)
|
|
1702
1715
|
], 64))), 128))
|
|
1703
1716
|
])
|
|
1704
1717
|
]),
|
|
1705
|
-
|
|
1718
|
+
N(E, {
|
|
1706
1719
|
gutter: [24, 20],
|
|
1707
1720
|
class: "search-row"
|
|
1708
1721
|
}, {
|
|
1709
1722
|
default: b(() => [
|
|
1710
|
-
(d(!0), $(
|
|
1711
|
-
key:
|
|
1723
|
+
(d(!0), $(D, null, B(I.value, (M) => (d(), F(U, {
|
|
1724
|
+
key: M.fieldKey,
|
|
1712
1725
|
span: 6,
|
|
1713
1726
|
class: "search-col"
|
|
1714
1727
|
}, {
|
|
1715
1728
|
default: b(() => [
|
|
1716
|
-
|
|
1717
|
-
name:
|
|
1718
|
-
config:
|
|
1719
|
-
modelValue:
|
|
1720
|
-
"onUpdate:modelValue": (
|
|
1729
|
+
N(Le, {
|
|
1730
|
+
name: M.fieldKey,
|
|
1731
|
+
config: M.fieldConfig,
|
|
1732
|
+
modelValue: p.value[M.fieldKey],
|
|
1733
|
+
"onUpdate:modelValue": (fe) => p.value[M.fieldKey] = fe,
|
|
1721
1734
|
class: "form-field"
|
|
1722
1735
|
}, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
|
|
1723
1736
|
]),
|
|
1724
1737
|
_: 2
|
|
1725
1738
|
}, 1024))), 128)),
|
|
1726
|
-
U
|
|
1739
|
+
N(U, {
|
|
1727
1740
|
span: 6,
|
|
1728
1741
|
class: "search-col"
|
|
1729
1742
|
}, {
|
|
1730
1743
|
default: b(() => [
|
|
1731
1744
|
h("div", Qn, [
|
|
1732
|
-
|
|
1745
|
+
N(q, { size: "medium" }, {
|
|
1733
1746
|
default: b(() => [
|
|
1734
|
-
|
|
1747
|
+
N(z, {
|
|
1735
1748
|
type: "primary",
|
|
1736
1749
|
size: "medium",
|
|
1737
|
-
onClick:
|
|
1750
|
+
onClick: w
|
|
1738
1751
|
}, {
|
|
1739
1752
|
default: b(() => u[1] || (u[1] = [
|
|
1740
|
-
|
|
1753
|
+
Y(" Search ", -1)
|
|
1741
1754
|
])),
|
|
1742
1755
|
_: 1,
|
|
1743
1756
|
__: [1]
|
|
1744
1757
|
}),
|
|
1745
|
-
|
|
1758
|
+
N(z, {
|
|
1746
1759
|
size: "medium",
|
|
1747
|
-
onClick:
|
|
1760
|
+
onClick: P
|
|
1748
1761
|
}, {
|
|
1749
1762
|
default: b(() => u[2] || (u[2] = [
|
|
1750
|
-
|
|
1763
|
+
Y(" Reset ", -1)
|
|
1751
1764
|
])),
|
|
1752
1765
|
_: 1,
|
|
1753
1766
|
__: [2]
|
|
@@ -1765,21 +1778,21 @@ const Ln = Object.assign($e, {
|
|
|
1765
1778
|
]),
|
|
1766
1779
|
_: 1
|
|
1767
1780
|
}),
|
|
1768
|
-
|
|
1781
|
+
N(R, {
|
|
1769
1782
|
size: "large",
|
|
1770
|
-
onTabClick:
|
|
1783
|
+
onTabClick: L
|
|
1771
1784
|
}, {
|
|
1772
1785
|
default: b(() => [
|
|
1773
|
-
(d(!0), $(
|
|
1774
|
-
key:
|
|
1775
|
-
title:
|
|
1786
|
+
(d(!0), $(D, null, B(l.value?.tabs, (M) => (d(), F(Ce, {
|
|
1787
|
+
key: M.key,
|
|
1788
|
+
title: M.title
|
|
1776
1789
|
}, null, 8, ["title"]))), 128))
|
|
1777
1790
|
]),
|
|
1778
1791
|
_: 1
|
|
1779
1792
|
}),
|
|
1780
|
-
|
|
1781
|
-
columns:
|
|
1782
|
-
data:
|
|
1793
|
+
N(oe, {
|
|
1794
|
+
columns: f.value,
|
|
1795
|
+
data: y.value,
|
|
1783
1796
|
stripe: "",
|
|
1784
1797
|
border: "",
|
|
1785
1798
|
pagination: {
|
|
@@ -1791,24 +1804,24 @@ const Ln = Object.assign($e, {
|
|
|
1791
1804
|
showJumper: !0,
|
|
1792
1805
|
pageSizeOptions: [10, 20, 50, 100]
|
|
1793
1806
|
},
|
|
1794
|
-
loading:
|
|
1807
|
+
loading: x.value,
|
|
1795
1808
|
size: "medium",
|
|
1796
1809
|
scroll: s.value,
|
|
1797
|
-
onPageChange:
|
|
1798
|
-
onPageSizeChange:
|
|
1810
|
+
onPageChange: X,
|
|
1811
|
+
onPageSizeChange: Q
|
|
1799
1812
|
}, {
|
|
1800
|
-
optional: b(({ record:
|
|
1801
|
-
|
|
1813
|
+
optional: b(({ record: M }) => [
|
|
1814
|
+
N(q, { size: "small" }, {
|
|
1802
1815
|
default: b(() => [
|
|
1803
|
-
(d(!0), $(
|
|
1804
|
-
key:
|
|
1816
|
+
(d(!0), $(D, null, B(_.value, (fe) => (d(), $(D, {
|
|
1817
|
+
key: fe.title
|
|
1805
1818
|
}, [
|
|
1806
|
-
|
|
1819
|
+
C(fe, M) ? (d(), F(me, {
|
|
1807
1820
|
key: 0,
|
|
1808
|
-
config:
|
|
1821
|
+
config: fe,
|
|
1809
1822
|
size: "small",
|
|
1810
|
-
onClick: (...Qe) =>
|
|
1811
|
-
}, null, 8, ["config", "onClick"])) :
|
|
1823
|
+
onClick: (...Qe) => Z(...Qe, M.workflowId)
|
|
1824
|
+
}, null, 8, ["config", "onClick"])) : ae("", !0)
|
|
1812
1825
|
], 64))), 128))
|
|
1813
1826
|
]),
|
|
1814
1827
|
_: 2
|