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