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