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