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