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