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