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