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