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