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