@chase-shao/vue-component-lib 1.2.45 → 1.2.46
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 +723 -680
- 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 V, defineComponent as R, mergeModels as q, useModel as ce, resolveComponent as I, createBlock as A, openBlock as f, onMounted as Q, computed as P, withCtx as N, createElementBlock as k, Fragment as M, renderList as B, createVNode as U, nextTick as Ye, createTextVNode as ee, useTemplateRef as he, createElementVNode as b, createCommentVNode as te, toDisplayString as W, resolveDynamicComponent as ke, renderSlot as X, 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: V(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 be = {};
|
|
20
|
+
function rt(e) {
|
|
21
|
+
be = { ...be, ...e };
|
|
22
|
+
}
|
|
23
|
+
function Ce() {
|
|
24
|
+
return be;
|
|
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
67
|
let we;
|
|
61
|
-
const
|
|
62
|
-
function
|
|
68
|
+
const lt = new Uint8Array(16);
|
|
69
|
+
function ct() {
|
|
63
70
|
if (!we) {
|
|
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
|
we = crypto.getRandomValues.bind(crypto);
|
|
67
74
|
}
|
|
68
|
-
return we(
|
|
75
|
+
return we(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 wt(e, t) {
|
|
206
213
|
return e.replace(/{IfTriggerGlobal_RandP_Approval}/g, t);
|
|
207
214
|
}
|
|
208
|
-
function
|
|
215
|
+
function yt(e, t) {
|
|
209
216
|
return e.replace(/{ClassName}/g, encodeURIComponent(t));
|
|
210
217
|
}
|
|
211
|
-
async function
|
|
218
|
+
async function bt(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 = wt(r, d), r = yt(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 w = c(r);
|
|
280
|
+
a("error", w.res ? "" : w.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,
|
|
289
|
+
}), (r, w) => {
|
|
283
290
|
const p = I("AInput");
|
|
284
|
-
return
|
|
285
|
-
modelValue:
|
|
286
|
-
"onUpdate:modelValue":
|
|
291
|
+
return f(), A(p, {
|
|
292
|
+
modelValue: l.value,
|
|
293
|
+
"onUpdate:modelValue": w[0] || (w[0] = (h) => l.value = h),
|
|
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 = V(100), d = V(0);
|
|
317
|
+
Q(() => {
|
|
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
|
+
}, w = (p) => {
|
|
325
|
+
const h = o(p);
|
|
326
|
+
a("error", h.res ? "" : h.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((S) => {
|
|
327
|
+
S.event === "change" && a(S.event, S.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, h) => {
|
|
336
|
+
const S = I("AInputNumber");
|
|
337
|
+
return f(), A(S, {
|
|
338
|
+
modelValue: l.value,
|
|
339
|
+
"onUpdate:modelValue": h[0] || (h[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: w
|
|
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 = V(!1), c = V(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((h) => {
|
|
368
|
+
p[h.event] = (S) => {
|
|
369
|
+
a(h.event, h.handlerName, S);
|
|
370
|
+
const _ = o(S);
|
|
371
|
+
a("error", _.res ? "" : _.errorMessages);
|
|
365
372
|
};
|
|
366
373
|
}), p;
|
|
367
|
-
}),
|
|
368
|
-
n.config.dataSourceProvider && (
|
|
374
|
+
}), Q(async () => {
|
|
375
|
+
n.config.dataSourceProvider && (c.value = await ht(n.config.dataSourceProvider));
|
|
369
376
|
});
|
|
370
|
-
const
|
|
377
|
+
const w = (p) => {
|
|
371
378
|
a("update:modelValue", p);
|
|
372
|
-
const
|
|
373
|
-
a("error",
|
|
374
|
-
|
|
379
|
+
const h = o(p);
|
|
380
|
+
a("error", h.res ? "" : h.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((S) => {
|
|
381
|
+
S.event === "change" && a(S.event, S.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, h) => {
|
|
390
|
+
const S = I("AOption"), _ = I("ASelect");
|
|
391
|
+
return f(), A(_, {
|
|
385
392
|
"allow-clear": "",
|
|
386
393
|
modelValue: d.value,
|
|
387
|
-
"onUpdate:modelValue":
|
|
388
|
-
loading:
|
|
394
|
+
"onUpdate:modelValue": h[0] || (h[0] = (x) => d.value = x),
|
|
395
|
+
loading: l.value,
|
|
389
396
|
"filter-option": !0,
|
|
390
397
|
"allow-search": !0,
|
|
391
|
-
onChange:
|
|
398
|
+
onChange: w
|
|
392
399
|
}, {
|
|
393
|
-
default:
|
|
394
|
-
(
|
|
395
|
-
key:
|
|
396
|
-
value:
|
|
397
|
-
label:
|
|
400
|
+
default: N(() => [
|
|
401
|
+
(f(!0), k(M, null, B(c.value, (x) => (f(), A(S, {
|
|
402
|
+
key: x.value,
|
|
403
|
+
value: x.value,
|
|
404
|
+
label: x.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 = V(n.config.options ?? []), c = (o) => {
|
|
413
420
|
a("update:modelValue", o), a("change", o);
|
|
414
421
|
};
|
|
415
|
-
|
|
422
|
+
Q(async () => {
|
|
416
423
|
if (n.config) {
|
|
417
424
|
const o = n.config.dataSourceProvider;
|
|
418
425
|
if (o) {
|
|
419
|
-
const
|
|
420
|
-
|
|
426
|
+
const w = await (await O()).get(o);
|
|
427
|
+
l.value = w.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 w = I("ACascader"), p = I("ASpace");
|
|
438
|
+
return f(), A(p, {
|
|
432
439
|
direction: "vertical",
|
|
433
440
|
size: "large"
|
|
434
441
|
}, {
|
|
435
|
-
default:
|
|
436
|
-
|
|
442
|
+
default: N(() => [
|
|
443
|
+
U(w, {
|
|
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,68 @@ 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 = V({});
|
|
470
|
+
Q(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 = V(null), w = V("");
|
|
477
|
+
function p(_, x, D) {
|
|
478
|
+
return _.replace(/{WorkflowId}/g, x).replace(/{ClassName}/g, D);
|
|
472
479
|
}
|
|
473
|
-
const
|
|
480
|
+
const h = P(() => {
|
|
474
481
|
if (n.config.uploadURL) {
|
|
475
|
-
const
|
|
476
|
-
return p(
|
|
482
|
+
const _ = o + n.config.uploadURL;
|
|
483
|
+
return p(_, w.value, n.className);
|
|
477
484
|
}
|
|
478
485
|
return "";
|
|
479
486
|
});
|
|
480
|
-
function
|
|
481
|
-
const { file:
|
|
482
|
-
return new Promise((
|
|
483
|
-
|
|
487
|
+
function S(_) {
|
|
488
|
+
const { file: x, name: D } = _, j = D ?? x.name;
|
|
489
|
+
return new Promise((J, z) => {
|
|
490
|
+
tt.confirm({
|
|
484
491
|
title: "确认删除",
|
|
485
|
-
content: `确认删除 ${
|
|
492
|
+
content: `确认删除 ${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 && (w.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
|
+
}), (_, x) => {
|
|
513
|
+
const D = I("a-upload");
|
|
514
|
+
return f(), A(D, {
|
|
508
515
|
ref_key: "uploadRef",
|
|
509
516
|
ref: r,
|
|
510
517
|
"default-file-list": n.config.files,
|
|
511
|
-
action:
|
|
518
|
+
action: h.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: S
|
|
517
524
|
}, {
|
|
518
|
-
"start-icon":
|
|
525
|
+
"start-icon": N(() => x[0] || (x[0] = [])),
|
|
519
526
|
_: 1
|
|
520
527
|
}, 8, ["default-file-list", "action", "limit", "headers"]);
|
|
521
528
|
};
|
|
522
529
|
}
|
|
523
|
-
}),
|
|
530
|
+
}), Tt = /* @__PURE__ */ R({
|
|
524
531
|
__name: "TextArea",
|
|
525
532
|
props: {
|
|
526
533
|
fieldKey: {},
|
|
@@ -532,33 +539,33 @@ const ae = (e, t) => {
|
|
|
532
539
|
},
|
|
533
540
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
534
541
|
setup(e, { expose: t, emit: s }) {
|
|
535
|
-
const n = e, a = s,
|
|
542
|
+
const n = e, a = s, l = (o) => oe(n.validations, o), c = (o) => {
|
|
536
543
|
a("update:modelValue", o), a("input", o);
|
|
537
544
|
}, d = (o) => {
|
|
538
545
|
a("update:modelValue", o);
|
|
539
|
-
const r =
|
|
540
|
-
a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((
|
|
541
|
-
|
|
546
|
+
const r = l(o);
|
|
547
|
+
a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((w) => {
|
|
548
|
+
w.event === "change" && a(w.event, w.handlerName, o);
|
|
542
549
|
});
|
|
543
550
|
};
|
|
544
551
|
return t({
|
|
545
552
|
validate() {
|
|
546
|
-
const o =
|
|
553
|
+
const o = l(n.modelValue);
|
|
547
554
|
return a("error", o.res ? "" : o.errorMessages), o.res;
|
|
548
555
|
}
|
|
549
556
|
}), (o, r) => {
|
|
550
|
-
const
|
|
551
|
-
return
|
|
557
|
+
const w = I("ATextarea");
|
|
558
|
+
return f(), A(w, {
|
|
552
559
|
"model-value": n.modelValue,
|
|
553
560
|
placeholder: "Please enter something",
|
|
554
561
|
"allow-clear": "",
|
|
555
562
|
disabled: n.readonly,
|
|
556
|
-
onInput:
|
|
563
|
+
onInput: c,
|
|
557
564
|
onChange: d
|
|
558
565
|
}, null, 8, ["model-value", "disabled"]);
|
|
559
566
|
};
|
|
560
567
|
}
|
|
561
|
-
}),
|
|
568
|
+
}), Ut = /* @__PURE__ */ R({
|
|
562
569
|
__name: "CheckBox",
|
|
563
570
|
props: /* @__PURE__ */ q({
|
|
564
571
|
fieldKey: {},
|
|
@@ -573,41 +580,41 @@ const ae = (e, t) => {
|
|
|
573
580
|
}),
|
|
574
581
|
emits: /* @__PURE__ */ q(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
575
582
|
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
|
-
|
|
583
|
+
const n = e, a = s, l = ce(e, "modelValue"), c = (o) => oe(n.validations, o), d = (o) => {
|
|
584
|
+
const r = c(o);
|
|
585
|
+
a("error", r.res ? "" : r.errorMessages), n.triggers && n.triggers.length > 0 && n.triggers.forEach((w) => {
|
|
586
|
+
w.event === "change" && a(w.event, w.handlerName, o);
|
|
580
587
|
});
|
|
581
588
|
};
|
|
582
589
|
return t({
|
|
583
590
|
validate() {
|
|
584
|
-
const o =
|
|
591
|
+
const o = c(n.modelValue);
|
|
585
592
|
return a("error", o.res ? "" : o.errorMessages), o.res;
|
|
586
593
|
}
|
|
587
594
|
}), (o, r) => {
|
|
588
|
-
const
|
|
589
|
-
return
|
|
590
|
-
modelValue:
|
|
591
|
-
"onUpdate:modelValue": r[0] || (r[0] = (p) =>
|
|
595
|
+
const w = I("ACheckbox");
|
|
596
|
+
return f(), A(w, {
|
|
597
|
+
modelValue: l.value,
|
|
598
|
+
"onUpdate:modelValue": r[0] || (r[0] = (p) => l.value = p),
|
|
592
599
|
clearable: "",
|
|
593
600
|
disabled: n.readonly || n.config.Readonly,
|
|
594
601
|
onChange: d
|
|
595
602
|
}, {
|
|
596
|
-
default:
|
|
597
|
-
|
|
603
|
+
default: N(() => r[1] || (r[1] = [
|
|
604
|
+
ee("Yes", -1)
|
|
598
605
|
])),
|
|
599
606
|
_: 1,
|
|
600
607
|
__: [1]
|
|
601
608
|
}, 8, ["modelValue", "disabled"]);
|
|
602
609
|
};
|
|
603
610
|
}
|
|
604
|
-
}),
|
|
611
|
+
}), At = { class: "widget-wrapper" }, Lt = { class: "title mb-1.5" }, Ft = {
|
|
605
612
|
key: 0,
|
|
606
613
|
class: "required"
|
|
607
|
-
},
|
|
614
|
+
}, Mt = { class: "form-widget" }, Rt = { class: "widget" }, Dt = {
|
|
608
615
|
key: 0,
|
|
609
616
|
class: "err-msg"
|
|
610
|
-
},
|
|
617
|
+
}, Ht = /* @__PURE__ */ R({
|
|
611
618
|
__name: "index",
|
|
612
619
|
props: /* @__PURE__ */ q({
|
|
613
620
|
config: {},
|
|
@@ -623,31 +630,31 @@ const ae = (e, t) => {
|
|
|
623
630
|
}),
|
|
624
631
|
emits: /* @__PURE__ */ q(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
625
632
|
setup(e, { expose: t, emit: s }) {
|
|
626
|
-
const n = e, a = s,
|
|
633
|
+
const n = e, a = s, l = ce(e, "modelValue"), c = he("widgetRef"), d = P(() => {
|
|
627
634
|
switch (n.config?.widget?.widget) {
|
|
628
635
|
case "TextBox":
|
|
629
|
-
return
|
|
636
|
+
return Ue;
|
|
630
637
|
case "Number":
|
|
631
|
-
return
|
|
638
|
+
return xt;
|
|
632
639
|
case "SelectList":
|
|
633
|
-
return
|
|
640
|
+
return Ae;
|
|
634
641
|
case "Cascade":
|
|
635
|
-
return
|
|
642
|
+
return It;
|
|
636
643
|
case "File":
|
|
637
|
-
return
|
|
644
|
+
return Nt;
|
|
638
645
|
case "TextArea":
|
|
639
|
-
return
|
|
646
|
+
return Tt;
|
|
640
647
|
case "DropDown":
|
|
641
|
-
return
|
|
648
|
+
return Ae;
|
|
642
649
|
case "CheckBox":
|
|
643
|
-
return
|
|
650
|
+
return Ut;
|
|
644
651
|
default:
|
|
645
|
-
return
|
|
652
|
+
return Ue;
|
|
646
653
|
}
|
|
647
|
-
}), o =
|
|
648
|
-
o.value =
|
|
649
|
-
},
|
|
650
|
-
a("change",
|
|
654
|
+
}), o = V(""), r = (h) => {
|
|
655
|
+
o.value = h;
|
|
656
|
+
}, w = (h, S) => {
|
|
657
|
+
a("change", h, S);
|
|
651
658
|
};
|
|
652
659
|
function p() {
|
|
653
660
|
return n.config?.widget?.widget === "File";
|
|
@@ -656,46 +663,46 @@ const ae = (e, t) => {
|
|
|
656
663
|
isFileUpload() {
|
|
657
664
|
return n.config?.widget?.widget === "File";
|
|
658
665
|
},
|
|
659
|
-
submit(
|
|
660
|
-
p() &&
|
|
666
|
+
submit(h) {
|
|
667
|
+
p() && c.value.submit(h);
|
|
661
668
|
},
|
|
662
669
|
validate() {
|
|
663
|
-
return
|
|
670
|
+
return c.value?.validate();
|
|
664
671
|
},
|
|
665
672
|
getCompName() {
|
|
666
673
|
return n?.config?.widget?.title;
|
|
667
674
|
}
|
|
668
|
-
}), (
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
n.config.validations.length ? (
|
|
675
|
+
}), (h, S) => (f(), k("div", At, [
|
|
676
|
+
b("div", Lt, [
|
|
677
|
+
ee(W(n?.config?.widget?.title), 1),
|
|
678
|
+
n.config.validations.length ? (f(), k("span", Ft, "*")) : te("", !0)
|
|
672
679
|
]),
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
(
|
|
680
|
+
b("div", Mt, [
|
|
681
|
+
b("div", Rt, [
|
|
682
|
+
(f(), A(ke(d.value), {
|
|
676
683
|
ref_key: "widgetRef",
|
|
677
|
-
ref:
|
|
678
|
-
modelValue:
|
|
679
|
-
"onUpdate:modelValue":
|
|
684
|
+
ref: c,
|
|
685
|
+
modelValue: l.value,
|
|
686
|
+
"onUpdate:modelValue": S[0] || (S[0] = (_) => l.value = _),
|
|
680
687
|
"field-key": n.fieldKey,
|
|
681
688
|
config: n.config.widget,
|
|
682
689
|
validations: n.config.validations,
|
|
683
690
|
triggers: n.config.triggers,
|
|
684
691
|
"class-name": n.className,
|
|
685
692
|
onError: r,
|
|
686
|
-
onChange:
|
|
693
|
+
onChange: w
|
|
687
694
|
}, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"]))
|
|
688
695
|
]),
|
|
689
|
-
o.value.length > 0 ? (
|
|
696
|
+
o.value.length > 0 ? (f(), k("div", Dt, W(o.value), 1)) : te("", !0)
|
|
690
697
|
])
|
|
691
698
|
]));
|
|
692
699
|
}
|
|
693
|
-
}),
|
|
700
|
+
}), se = (e, t) => {
|
|
694
701
|
const s = e.__vccOpts || e;
|
|
695
702
|
for (const [n, a] of t)
|
|
696
703
|
s[n] = a;
|
|
697
704
|
return s;
|
|
698
|
-
},
|
|
705
|
+
}, $e = /* @__PURE__ */ se(Ht, [["__scopeId", "data-v-9d7c1669"]]), Pt = /* @__PURE__ */ R({
|
|
699
706
|
__name: "SubmitButton",
|
|
700
707
|
props: {
|
|
701
708
|
url: {},
|
|
@@ -707,20 +714,20 @@ const ae = (e, t) => {
|
|
|
707
714
|
function a() {
|
|
708
715
|
n("click", s.url, s.redirectType);
|
|
709
716
|
}
|
|
710
|
-
return (
|
|
717
|
+
return (l, c) => {
|
|
711
718
|
const d = I("AButton");
|
|
712
|
-
return
|
|
719
|
+
return f(), A(d, {
|
|
713
720
|
type: "primary",
|
|
714
721
|
onClick: a
|
|
715
722
|
}, {
|
|
716
|
-
default:
|
|
717
|
-
|
|
723
|
+
default: N(() => [
|
|
724
|
+
X(l.$slots, "default")
|
|
718
725
|
]),
|
|
719
726
|
_: 3
|
|
720
727
|
});
|
|
721
728
|
};
|
|
722
729
|
}
|
|
723
|
-
}),
|
|
730
|
+
}), Bt = /* @__PURE__ */ R({
|
|
724
731
|
__name: "DetailLink",
|
|
725
732
|
props: {
|
|
726
733
|
url: {},
|
|
@@ -732,17 +739,17 @@ const ae = (e, t) => {
|
|
|
732
739
|
function a() {
|
|
733
740
|
n("click", s.url, s.redirectType);
|
|
734
741
|
}
|
|
735
|
-
return (
|
|
742
|
+
return (l, c) => {
|
|
736
743
|
const d = I("ALink");
|
|
737
|
-
return
|
|
738
|
-
default:
|
|
739
|
-
|
|
744
|
+
return f(), A(d, { onClick: a }, {
|
|
745
|
+
default: N(() => [
|
|
746
|
+
X(l.$slots, "default")
|
|
740
747
|
]),
|
|
741
748
|
_: 3
|
|
742
749
|
});
|
|
743
750
|
};
|
|
744
751
|
}
|
|
745
|
-
}), le = /* @__PURE__ */
|
|
752
|
+
}), le = /* @__PURE__ */ R({
|
|
746
753
|
__name: "index",
|
|
747
754
|
props: {
|
|
748
755
|
config: {}
|
|
@@ -753,44 +760,44 @@ const ae = (e, t) => {
|
|
|
753
760
|
function a(o, r) {
|
|
754
761
|
n("click", s.config.widget, o, r, s.config.title);
|
|
755
762
|
}
|
|
756
|
-
const
|
|
763
|
+
const l = P(() => {
|
|
757
764
|
switch (s.config.location) {
|
|
758
765
|
case "InOperation":
|
|
759
|
-
return
|
|
766
|
+
return Pt;
|
|
760
767
|
case "InTable":
|
|
761
768
|
default:
|
|
762
|
-
return
|
|
769
|
+
return Bt;
|
|
763
770
|
}
|
|
764
|
-
}),
|
|
765
|
-
return (o, r) => (
|
|
766
|
-
url:
|
|
771
|
+
}), c = P(() => s.config.widget === E.Submit ? s.config.requestUrl ?? "" : s.config.widget === E.Link ? s.config.redirectUrl ?? "" : ""), d = P(() => s.config.redirectType ?? "Details");
|
|
772
|
+
return (o, r) => (f(), A(ke(l.value), {
|
|
773
|
+
url: c.value,
|
|
767
774
|
"redirect-type": d.value,
|
|
768
775
|
onClick: a
|
|
769
776
|
}, {
|
|
770
|
-
default:
|
|
771
|
-
|
|
777
|
+
default: N(() => [
|
|
778
|
+
ee(W(s.config.title), 1)
|
|
772
779
|
]),
|
|
773
780
|
_: 1
|
|
774
781
|
}, 8, ["url", "redirect-type"]));
|
|
775
782
|
}
|
|
776
|
-
}),
|
|
783
|
+
}), Pe = Symbol("library-router");
|
|
777
784
|
function fe() {
|
|
778
|
-
const e =
|
|
779
|
-
return e ||
|
|
785
|
+
const e = ae(Pe, null);
|
|
786
|
+
return e || nt();
|
|
780
787
|
}
|
|
781
|
-
const
|
|
782
|
-
function
|
|
783
|
-
const e =
|
|
788
|
+
const Be = Symbol("library-triggers");
|
|
789
|
+
function xe() {
|
|
790
|
+
const e = ae(Be, null);
|
|
784
791
|
return e || {};
|
|
785
792
|
}
|
|
786
|
-
const
|
|
793
|
+
const Kt = Symbol("library-pinia"), Ke = Symbol("library-bpmStore"), ze = Symbol("library-svrStore");
|
|
787
794
|
function pe() {
|
|
788
|
-
return
|
|
795
|
+
return ae(Ke, null);
|
|
789
796
|
}
|
|
790
797
|
function me() {
|
|
791
|
-
return
|
|
798
|
+
return ae(ze, null);
|
|
792
799
|
}
|
|
793
|
-
const
|
|
800
|
+
const zt = { class: "top-bar" }, Et = { class: "banner-info" }, Ot = { class: "page-title" }, jt = { class: "page-subtitle" }, Gt = { class: "avatar-wrapper" }, Wt = { class: "user-email" }, qt = /* @__PURE__ */ R({
|
|
794
801
|
__name: "TopBar",
|
|
795
802
|
props: {
|
|
796
803
|
title: {},
|
|
@@ -800,24 +807,24 @@ const Bt = { class: "top-bar" }, zt = { class: "banner-info" }, Et = { class: "p
|
|
|
800
807
|
setup(e) {
|
|
801
808
|
return (t, s) => {
|
|
802
809
|
const n = I("a-avatar"), a = I("a-popover");
|
|
803
|
-
return
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
810
|
+
return f(), k("div", zt, [
|
|
811
|
+
b("div", Et, [
|
|
812
|
+
b("div", Ot, W(t.title), 1),
|
|
813
|
+
b("div", jt, W(t.subTitle), 1)
|
|
807
814
|
]),
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
content:
|
|
811
|
-
|
|
815
|
+
b("div", Gt, [
|
|
816
|
+
U(a, { trigger: "click" }, {
|
|
817
|
+
content: N(() => [
|
|
818
|
+
b("div", Wt, W(t.email), 1)
|
|
812
819
|
]),
|
|
813
|
-
default:
|
|
814
|
-
|
|
820
|
+
default: N(() => [
|
|
821
|
+
U(n, {
|
|
815
822
|
size: 48,
|
|
816
823
|
autoFixFontSize: "",
|
|
817
824
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
818
825
|
}, {
|
|
819
|
-
default:
|
|
820
|
-
|
|
826
|
+
default: N(() => [
|
|
827
|
+
ee(W(t.email.charAt(0).toUpperCase()), 1)
|
|
821
828
|
]),
|
|
822
829
|
_: 1
|
|
823
830
|
})
|
|
@@ -828,16 +835,28 @@ const Bt = { class: "top-bar" }, zt = { class: "banner-info" }, Et = { class: "p
|
|
|
828
835
|
]);
|
|
829
836
|
};
|
|
830
837
|
}
|
|
831
|
-
}), ge = /* @__PURE__ */
|
|
838
|
+
}), ge = /* @__PURE__ */ se(qt, [["__scopeId", "data-v-c0457235"]]);
|
|
839
|
+
function Ie(e) {
|
|
840
|
+
const t = Ce(), s = [];
|
|
841
|
+
if (t.fieldsGroup) {
|
|
842
|
+
t.fieldsGroup.forEach((l) => {
|
|
843
|
+
const c = l.keys.map((d) => e.find((o) => o.fieldKey === d)).filter(Boolean);
|
|
844
|
+
c.length && s.push({ name: l.name, fields: c });
|
|
845
|
+
});
|
|
846
|
+
const n = t.fieldsGroup.flatMap((l) => l.keys), a = e.filter((l) => !n.includes(l.fieldKey));
|
|
847
|
+
return a.length && s.push({ name: "未分组字段", fields: a }), s;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
const Yt = { class: "page-container" }, Jt = { class: "page-body" }, Xt = { class: "form-card" }, Qt = { class: "form-fields-vertical" }, Zt = { class: "form-fields" }, en = {
|
|
832
851
|
key: 0,
|
|
833
852
|
class: "form-content"
|
|
834
|
-
},
|
|
853
|
+
}, tn = { class: "page-footer" }, nn = { class: "action-container" }, an = { class: "action-buttons" }, on = /* @__PURE__ */ R({
|
|
835
854
|
__name: "CreateView",
|
|
836
855
|
props: {
|
|
837
856
|
className: {}
|
|
838
857
|
},
|
|
839
858
|
setup(e) {
|
|
840
|
-
const t = pe(), s = me(), n = fe(), a =
|
|
859
|
+
const t = pe(), s = me(), n = fe(), a = xe(), l = he("dataWidgets"), c = ue(), d = e, o = V({
|
|
841
860
|
pageType: "",
|
|
842
861
|
fields: {},
|
|
843
862
|
globalValidations: [],
|
|
@@ -845,116 +864,128 @@ const Bt = { class: "top-bar" }, zt = { class: "banner-info" }, Et = { class: "p
|
|
|
845
864
|
title: "",
|
|
846
865
|
subTitle: ""
|
|
847
866
|
}
|
|
848
|
-
}), r =
|
|
867
|
+
}), r = V([]), w = V({});
|
|
849
868
|
function p(m) {
|
|
850
|
-
return m ? Object.entries(m).map(([i,
|
|
869
|
+
return m ? Object.entries(m).map(([i, v]) => ({
|
|
851
870
|
fieldKey: i,
|
|
852
|
-
...
|
|
853
|
-
})).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !
|
|
871
|
+
...v
|
|
872
|
+
})).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !z.value.includes(i.fieldKey)) : [];
|
|
854
873
|
}
|
|
855
|
-
function
|
|
856
|
-
return m ? Object.entries(m).filter(([i,
|
|
874
|
+
function h(m) {
|
|
875
|
+
return m ? Object.entries(m).filter(([i, v]) => v.dependent).reduce((i, [v, u]) => (i[v] = u.dependent, i), {}) : [];
|
|
857
876
|
}
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
|
|
877
|
+
const S = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), _ = Se({}), x = V(!1);
|
|
878
|
+
Q(async () => {
|
|
879
|
+
x.value = !0, o.value = await de(ne.Create, d.className, {
|
|
861
880
|
svrStore: s,
|
|
862
881
|
bpmStore: t
|
|
863
|
-
}), r.value = p(o.value.fields),
|
|
882
|
+
}), r.value = p(o.value.fields), w.value = h(o.value.fields), console.log("🚀 ~ _dependent.value:", w.value);
|
|
864
883
|
for (const m in o.value.fields) {
|
|
865
884
|
if (o.value.fields[m].widget?.widget === "File") {
|
|
866
885
|
const g = r.value.find((i) => i.fieldKey === m);
|
|
867
886
|
g && g.widget && (g.widget.files = []);
|
|
868
887
|
}
|
|
869
|
-
|
|
888
|
+
_[m] = o.value.fields[m].modelValue;
|
|
870
889
|
}
|
|
871
|
-
|
|
890
|
+
x.value = !1;
|
|
872
891
|
});
|
|
873
|
-
function
|
|
892
|
+
function D() {
|
|
874
893
|
return s()?.userInfo?.email_address ?? "";
|
|
875
894
|
}
|
|
876
|
-
async function
|
|
895
|
+
async function j(m, g, i) {
|
|
877
896
|
switch (m) {
|
|
878
|
-
case
|
|
879
|
-
let
|
|
880
|
-
if (
|
|
881
|
-
|
|
882
|
-
}), !
|
|
883
|
-
|
|
897
|
+
case E.Submit:
|
|
898
|
+
let v = !0;
|
|
899
|
+
if (l.value?.forEach((C) => {
|
|
900
|
+
C?.validate && (C.validate() || (v = !1));
|
|
901
|
+
}), !v) {
|
|
902
|
+
c?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
|
|
884
903
|
return;
|
|
885
904
|
}
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
}),
|
|
905
|
+
const u = await pt(d.className, { ..._, ...w.value }, g);
|
|
906
|
+
l.value?.forEach((C) => {
|
|
907
|
+
C?.submit && C.submit(u.toString());
|
|
908
|
+
}), c?.appContext.config.globalProperties.$notification.success("创建成功!"), n.push({ name: "List", params: { className: d.className } });
|
|
890
909
|
break;
|
|
891
|
-
case
|
|
910
|
+
case E.Link:
|
|
892
911
|
i === "List" && n.push({ name: "List", params: { className: d.className } });
|
|
893
912
|
break;
|
|
894
913
|
default:
|
|
895
914
|
console.warn("Unknown action type:", m);
|
|
896
915
|
}
|
|
897
916
|
}
|
|
898
|
-
const
|
|
917
|
+
const z = V([
|
|
899
918
|
"jobScpope",
|
|
900
919
|
"currentWorkdayId",
|
|
901
920
|
"originalGrade",
|
|
902
921
|
"jobTitlePrevious",
|
|
903
922
|
"positionId"
|
|
904
923
|
]);
|
|
905
|
-
function
|
|
906
|
-
a[m]?.(g,
|
|
924
|
+
function Z(m, g) {
|
|
925
|
+
a[m]?.(g, z), o.value && (r.value = p(o.value.fields));
|
|
907
926
|
}
|
|
927
|
+
const T = P(() => (console.log("🚀 ~ _fields.value:", r.value), Ie(r.value)));
|
|
908
928
|
return (m, g) => {
|
|
909
|
-
const i = I("a-spin");
|
|
910
|
-
return
|
|
911
|
-
|
|
929
|
+
const i = I("a-card"), v = I("a-spin");
|
|
930
|
+
return f(), k("div", Yt, [
|
|
931
|
+
U(ge, {
|
|
912
932
|
title: o.value.banner.title,
|
|
913
933
|
subTitle: o.value.banner.subTitle,
|
|
914
|
-
email:
|
|
934
|
+
email: D()
|
|
915
935
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
loading:
|
|
936
|
+
b("div", Jt, [
|
|
937
|
+
U(v, {
|
|
938
|
+
loading: x.value,
|
|
919
939
|
class: "form-container"
|
|
920
940
|
}, {
|
|
921
|
-
default:
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
(
|
|
925
|
-
key: u.
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
941
|
+
default: N(() => [
|
|
942
|
+
b("div", Xt, [
|
|
943
|
+
b("div", Qt, [
|
|
944
|
+
(f(!0), k(M, null, B(T.value, (u) => (f(), A(i, {
|
|
945
|
+
key: u.name,
|
|
946
|
+
title: u.name,
|
|
947
|
+
style: { "margin-bottom": "24px" }
|
|
948
|
+
}, {
|
|
949
|
+
default: N(() => [
|
|
950
|
+
b("div", Zt, [
|
|
951
|
+
(f(!0), k(M, null, B(u.fields, (C) => (f(), k("div", {
|
|
952
|
+
key: C.fieldKey,
|
|
953
|
+
class: "form-field-wrapper"
|
|
954
|
+
}, [
|
|
955
|
+
U($e, {
|
|
956
|
+
ref_for: !0,
|
|
957
|
+
ref: "dataWidgets",
|
|
958
|
+
"field-key": C.fieldKey,
|
|
959
|
+
config: C,
|
|
960
|
+
"class-name": m.className,
|
|
961
|
+
modelValue: _[C.fieldKey],
|
|
962
|
+
"onUpdate:modelValue": (H) => _[C.fieldKey] = H,
|
|
963
|
+
class: "form-field",
|
|
964
|
+
onChange: Z
|
|
965
|
+
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"])
|
|
966
|
+
]))), 128))
|
|
967
|
+
])
|
|
968
|
+
]),
|
|
969
|
+
_: 2
|
|
970
|
+
}, 1032, ["title"]))), 128))
|
|
940
971
|
]),
|
|
941
|
-
m.$slots.content ? (
|
|
942
|
-
|
|
943
|
-
])) :
|
|
972
|
+
m.$slots.content ? (f(), k("div", en, [
|
|
973
|
+
X(m.$slots, "content", {}, void 0, !0)
|
|
974
|
+
])) : te("", !0)
|
|
944
975
|
])
|
|
945
976
|
]),
|
|
946
977
|
_: 3
|
|
947
978
|
}, 8, ["loading"])
|
|
948
979
|
]),
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
(
|
|
980
|
+
b("div", tn, [
|
|
981
|
+
b("div", nn, [
|
|
982
|
+
X(m.$slots, "action", {}, void 0, !0),
|
|
983
|
+
b("div", an, [
|
|
984
|
+
(f(!0), k(M, null, B(S.value, (u) => (f(), A(le, {
|
|
954
985
|
key: u.Title,
|
|
955
986
|
config: u,
|
|
956
987
|
class: "action-button",
|
|
957
|
-
onClick:
|
|
988
|
+
onClick: j
|
|
958
989
|
}, null, 8, ["config"]))), 128))
|
|
959
990
|
])
|
|
960
991
|
])
|
|
@@ -962,17 +993,17 @@ const Bt = { class: "top-bar" }, zt = { class: "banner-info" }, Et = { class: "p
|
|
|
962
993
|
]);
|
|
963
994
|
};
|
|
964
995
|
}
|
|
965
|
-
}),
|
|
996
|
+
}), sn = /* @__PURE__ */ se(on, [["__scopeId", "data-v-d779a8dd"]]), rn = { class: "page-container" }, ln = { class: "page-body" }, cn = { class: "form-card" }, un = { class: "form-fields-vertical" }, dn = { class: "form-fields" }, fn = {
|
|
966
997
|
key: 0,
|
|
967
998
|
class: "form-content"
|
|
968
|
-
},
|
|
999
|
+
}, pn = { class: "page-footer" }, mn = { class: "action-container" }, gn = { class: "action-buttons" }, vn = /* @__PURE__ */ R({
|
|
969
1000
|
__name: "UpdateView",
|
|
970
1001
|
props: {
|
|
971
1002
|
className: {},
|
|
972
1003
|
workflowId: {}
|
|
973
1004
|
},
|
|
974
1005
|
setup(e) {
|
|
975
|
-
const t = fe(), s =
|
|
1006
|
+
const t = fe(), s = xe(), n = me(), a = pe(), l = he("dataWidgets"), c = ue(), d = e, o = V({
|
|
976
1007
|
pageType: "",
|
|
977
1008
|
fields: {},
|
|
978
1009
|
globalValidations: [],
|
|
@@ -980,123 +1011,134 @@ const Bt = { class: "top-bar" }, zt = { class: "banner-info" }, Et = { class: "p
|
|
|
980
1011
|
title: "",
|
|
981
1012
|
subTitle: ""
|
|
982
1013
|
}
|
|
983
|
-
}), r =
|
|
1014
|
+
}), r = V([]), w = V({});
|
|
984
1015
|
function p(m) {
|
|
985
|
-
return m ? Object.entries(m).map(([i,
|
|
1016
|
+
return m ? Object.entries(m).map(([i, v]) => ({
|
|
986
1017
|
fieldKey: i,
|
|
987
|
-
...
|
|
988
|
-
})).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !
|
|
1018
|
+
...v
|
|
1019
|
+
})).filter((i) => i.widget && i.widget.widget !== "Hidden").filter((i) => !z.value.includes(i.fieldKey)) : [];
|
|
989
1020
|
}
|
|
990
|
-
function
|
|
991
|
-
return m ? Object.entries(m).filter(([i,
|
|
1021
|
+
function h(m) {
|
|
1022
|
+
return m ? Object.entries(m).filter(([i, v]) => v.dependent).reduce((i, [v, u]) => (i[v] = u.dependent, i), {}) : [];
|
|
992
1023
|
}
|
|
993
|
-
const
|
|
994
|
-
|
|
995
|
-
|
|
1024
|
+
const S = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), _ = Se({}), x = V(!1);
|
|
1025
|
+
Q(async () => {
|
|
1026
|
+
x.value = !0, o.value = await de(ne.Update, d.className, {
|
|
996
1027
|
svrStore: n,
|
|
997
1028
|
bpmStore: a
|
|
998
1029
|
}, {
|
|
999
1030
|
workflowId: d.workflowId
|
|
1000
1031
|
});
|
|
1001
|
-
const m = await
|
|
1032
|
+
const m = await De(ne.Update, d.className, { workflowId: d.workflowId, email: D() }), g = await He(d.className, d.workflowId);
|
|
1002
1033
|
o.value.actions = o.value.actions?.filter((i) => {
|
|
1003
|
-
const
|
|
1004
|
-
return
|
|
1005
|
-
}), r.value = p(o.value.fields),
|
|
1034
|
+
const v = m.find((u) => u.button === i.title);
|
|
1035
|
+
return v ? v.isShow : !0;
|
|
1036
|
+
}), r.value = p(o.value.fields), w.value = h(o.value.fields);
|
|
1006
1037
|
for (const i in o.value.fields) {
|
|
1007
1038
|
if (o.value.fields[i].widget?.widget === "File") {
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1039
|
+
const v = r.value.find((u) => u.fieldKey === i);
|
|
1040
|
+
v && v.widget && (v.widget.files = g[i] ?? [], v.widget.removeFile = (u) => Ct(d.className, u));
|
|
1010
1041
|
}
|
|
1011
|
-
|
|
1042
|
+
_[i] = o.value.fields[i].modelValue;
|
|
1012
1043
|
}
|
|
1013
|
-
|
|
1044
|
+
x.value = !1;
|
|
1014
1045
|
});
|
|
1015
|
-
function
|
|
1046
|
+
function D() {
|
|
1016
1047
|
return n()?.userInfo?.email_address ?? "";
|
|
1017
1048
|
}
|
|
1018
|
-
async function
|
|
1049
|
+
async function j(m, g, i) {
|
|
1019
1050
|
switch (m) {
|
|
1020
|
-
case
|
|
1021
|
-
let
|
|
1022
|
-
if (
|
|
1023
|
-
|
|
1024
|
-
}), !
|
|
1025
|
-
|
|
1051
|
+
case E.Submit:
|
|
1052
|
+
let v = !0;
|
|
1053
|
+
if (l.value?.forEach((u) => {
|
|
1054
|
+
u?.validate && (u.validate() || (v = !1));
|
|
1055
|
+
}), !v) {
|
|
1056
|
+
c?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
|
|
1026
1057
|
return;
|
|
1027
1058
|
}
|
|
1028
|
-
await
|
|
1029
|
-
|
|
1030
|
-
}),
|
|
1059
|
+
await mt(d.className, d.workflowId, { ..._, ...w.value }, g), l.value?.forEach((u) => {
|
|
1060
|
+
u?.submit && u.submit(d.workflowId);
|
|
1061
|
+
}), c?.appContext.config.globalProperties.$notification.success("修改成功!"), t.push({ name: "List", params: { className: d.className } });
|
|
1031
1062
|
break;
|
|
1032
|
-
case
|
|
1063
|
+
case E.Link:
|
|
1033
1064
|
t.push({ name: i, params: { className: d.className } });
|
|
1034
1065
|
break;
|
|
1035
1066
|
default:
|
|
1036
1067
|
console.warn("Unknown action type:", m);
|
|
1037
1068
|
}
|
|
1038
1069
|
}
|
|
1039
|
-
const
|
|
1070
|
+
const z = V([
|
|
1040
1071
|
"jobScpope",
|
|
1041
1072
|
"currentWorkdayId",
|
|
1042
1073
|
"originalGrade",
|
|
1043
1074
|
"jobTitlePrevious",
|
|
1044
1075
|
"positionId"
|
|
1045
1076
|
]);
|
|
1046
|
-
function
|
|
1047
|
-
s[m]?.(g,
|
|
1077
|
+
function Z(m, g) {
|
|
1078
|
+
s[m]?.(g, z), o.value && (r.value = p(o.value.fields));
|
|
1048
1079
|
}
|
|
1080
|
+
const T = P(() => Ie(r.value));
|
|
1049
1081
|
return (m, g) => {
|
|
1050
|
-
const i = I("a-spin");
|
|
1051
|
-
return
|
|
1052
|
-
|
|
1082
|
+
const i = I("a-card"), v = I("a-spin");
|
|
1083
|
+
return f(), k("div", rn, [
|
|
1084
|
+
U(ge, {
|
|
1053
1085
|
title: o.value.banner.title,
|
|
1054
1086
|
subTitle: o.value.banner.subTitle,
|
|
1055
|
-
email:
|
|
1087
|
+
email: D()
|
|
1056
1088
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
loading:
|
|
1089
|
+
b("div", ln, [
|
|
1090
|
+
U(v, {
|
|
1091
|
+
loading: x.value,
|
|
1060
1092
|
class: "form-container"
|
|
1061
1093
|
}, {
|
|
1062
|
-
default:
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
(
|
|
1066
|
-
key: u.
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1094
|
+
default: N(() => [
|
|
1095
|
+
b("div", cn, [
|
|
1096
|
+
b("div", un, [
|
|
1097
|
+
(f(!0), k(M, null, B(T.value, (u) => (f(), A(i, {
|
|
1098
|
+
key: u.name,
|
|
1099
|
+
title: u.name,
|
|
1100
|
+
style: { "margin-bottom": "24px" }
|
|
1101
|
+
}, {
|
|
1102
|
+
default: N(() => [
|
|
1103
|
+
b("div", dn, [
|
|
1104
|
+
(f(!0), k(M, null, B(u.fields, (C) => (f(), k("div", {
|
|
1105
|
+
key: C.fieldKey,
|
|
1106
|
+
class: "form-field-wrapper"
|
|
1107
|
+
}, [
|
|
1108
|
+
U($e, {
|
|
1109
|
+
ref_for: !0,
|
|
1110
|
+
ref: "dataWidgets",
|
|
1111
|
+
"field-key": C.fieldKey,
|
|
1112
|
+
config: C,
|
|
1113
|
+
"class-name": m.className,
|
|
1114
|
+
modelValue: _[C.fieldKey],
|
|
1115
|
+
"onUpdate:modelValue": (H) => _[C.fieldKey] = H,
|
|
1116
|
+
class: "form-field",
|
|
1117
|
+
onChange: Z
|
|
1118
|
+
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"])
|
|
1119
|
+
]))), 128))
|
|
1120
|
+
])
|
|
1121
|
+
]),
|
|
1122
|
+
_: 2
|
|
1123
|
+
}, 1032, ["title"]))), 128))
|
|
1082
1124
|
]),
|
|
1083
|
-
m.$slots.content ? (
|
|
1084
|
-
|
|
1085
|
-
])) :
|
|
1125
|
+
m.$slots.content ? (f(), k("div", fn, [
|
|
1126
|
+
X(m.$slots, "content", {}, void 0, !0)
|
|
1127
|
+
])) : te("", !0)
|
|
1086
1128
|
])
|
|
1087
1129
|
]),
|
|
1088
1130
|
_: 3
|
|
1089
1131
|
}, 8, ["loading"])
|
|
1090
1132
|
]),
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
(
|
|
1133
|
+
b("div", pn, [
|
|
1134
|
+
b("div", mn, [
|
|
1135
|
+
X(m.$slots, "action", {}, void 0, !0),
|
|
1136
|
+
b("div", gn, [
|
|
1137
|
+
(f(!0), k(M, null, B(S.value, (u) => (f(), A(le, {
|
|
1096
1138
|
key: u.Title,
|
|
1097
1139
|
config: u,
|
|
1098
1140
|
class: "action-button",
|
|
1099
|
-
onClick:
|
|
1141
|
+
onClick: j
|
|
1100
1142
|
}, null, 8, ["config"]))), 128))
|
|
1101
1143
|
])
|
|
1102
1144
|
])
|
|
@@ -1104,24 +1146,24 @@ const Bt = { class: "top-bar" }, zt = { class: "banner-info" }, Et = { class: "p
|
|
|
1104
1146
|
]);
|
|
1105
1147
|
};
|
|
1106
1148
|
}
|
|
1107
|
-
}),
|
|
1108
|
-
function
|
|
1109
|
-
return
|
|
1149
|
+
}), _n = /* @__PURE__ */ se(vn, [["__scopeId", "data-v-9691be85"]]), Ee = Symbol("library-custom-comp");
|
|
1150
|
+
function wn() {
|
|
1151
|
+
return ae(Ee, null);
|
|
1110
1152
|
}
|
|
1111
|
-
const
|
|
1153
|
+
const yn = Symbol("ArcoConfigProvider"), bn = "arco", hn = "$arco", kn = (e) => {
|
|
1112
1154
|
var t, s, n;
|
|
1113
|
-
const a = ue(),
|
|
1114
|
-
return `${(n = (s =
|
|
1115
|
-
},
|
|
1116
|
-
function
|
|
1117
|
-
return
|
|
1155
|
+
const a = ue(), l = ae(yn, void 0);
|
|
1156
|
+
return `${(n = (s = l?.prefixCls) != null ? s : (t = a?.appContext.config.globalProperties[hn]) == null ? void 0 : t.classPrefix) != null ? n : bn}-${e}`;
|
|
1157
|
+
}, Sn = Object.prototype.toString;
|
|
1158
|
+
function Cn(e) {
|
|
1159
|
+
return Sn.call(e) === "[object Number]" && e === e;
|
|
1118
1160
|
}
|
|
1119
|
-
var
|
|
1161
|
+
var Vn = (e, t) => {
|
|
1120
1162
|
for (const [s, n] of t)
|
|
1121
1163
|
e[s] = n;
|
|
1122
1164
|
return e;
|
|
1123
1165
|
};
|
|
1124
|
-
const
|
|
1166
|
+
const $n = R({
|
|
1125
1167
|
name: "IconDownload",
|
|
1126
1168
|
props: {
|
|
1127
1169
|
size: {
|
|
@@ -1148,56 +1190,56 @@ const kn = F({
|
|
|
1148
1190
|
click: (e) => !0
|
|
1149
1191
|
},
|
|
1150
1192
|
setup(e, { emit: t }) {
|
|
1151
|
-
const s =
|
|
1152
|
-
const
|
|
1153
|
-
return e.size && (
|
|
1193
|
+
const s = kn("icon"), n = P(() => [s, `${s}-download`, { [`${s}-spin`]: e.spin }]), a = P(() => {
|
|
1194
|
+
const c = {};
|
|
1195
|
+
return e.size && (c.fontSize = Cn(e.size) ? `${e.size}px` : e.size), e.rotate && (c.transform = `rotate(${e.rotate}deg)`), c;
|
|
1154
1196
|
});
|
|
1155
1197
|
return {
|
|
1156
1198
|
cls: n,
|
|
1157
1199
|
innerStyle: a,
|
|
1158
|
-
onClick: (
|
|
1159
|
-
t("click",
|
|
1200
|
+
onClick: (c) => {
|
|
1201
|
+
t("click", c);
|
|
1160
1202
|
}
|
|
1161
1203
|
};
|
|
1162
1204
|
}
|
|
1163
|
-
}),
|
|
1164
|
-
function
|
|
1165
|
-
return
|
|
1205
|
+
}), xn = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
1206
|
+
function In(e, t, s, n, a, l) {
|
|
1207
|
+
return f(), k("svg", {
|
|
1166
1208
|
viewBox: "0 0 48 48",
|
|
1167
1209
|
fill: "none",
|
|
1168
1210
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1169
1211
|
stroke: "currentColor",
|
|
1170
|
-
class:
|
|
1171
|
-
style:
|
|
1212
|
+
class: Xe(e.cls),
|
|
1213
|
+
style: Je(e.innerStyle),
|
|
1172
1214
|
"stroke-width": e.strokeWidth,
|
|
1173
1215
|
"stroke-linecap": e.strokeLinecap,
|
|
1174
1216
|
"stroke-linejoin": e.strokeLinejoin,
|
|
1175
|
-
onClick: t[0] || (t[0] = (...
|
|
1217
|
+
onClick: t[0] || (t[0] = (...c) => e.onClick && e.onClick(...c))
|
|
1176
1218
|
}, t[1] || (t[1] = [
|
|
1177
|
-
|
|
1178
|
-
]), 14,
|
|
1219
|
+
b("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
1220
|
+
]), 14, xn);
|
|
1179
1221
|
}
|
|
1180
|
-
var
|
|
1181
|
-
const
|
|
1222
|
+
var ye = /* @__PURE__ */ Vn($n, [["render", In]]);
|
|
1223
|
+
const Nn = Object.assign(ye, {
|
|
1182
1224
|
install: (e, t) => {
|
|
1183
1225
|
var s;
|
|
1184
1226
|
const n = (s = t?.iconPrefix) != null ? s : "";
|
|
1185
|
-
e.component(n +
|
|
1227
|
+
e.component(n + ye.name, ye);
|
|
1186
1228
|
}
|
|
1187
|
-
}),
|
|
1229
|
+
}), Tn = { class: "page-container" }, Un = { class: "page-body" }, An = { class: "detail-card" }, Ln = { class: "form-fields-vertical" }, Fn = { class: "detail-fields" }, Mn = { class: "detail-field" }, Rn = { class: "field-label" }, Dn = {
|
|
1188
1230
|
key: 1,
|
|
1189
1231
|
class: "field-value"
|
|
1190
|
-
},
|
|
1232
|
+
}, Hn = {
|
|
1191
1233
|
key: 0,
|
|
1192
1234
|
class: "detail-content"
|
|
1193
|
-
},
|
|
1235
|
+
}, Pn = { class: "page-footer" }, Bn = { class: "action-container" }, Kn = { class: "action-buttons" }, zn = /* @__PURE__ */ R({
|
|
1194
1236
|
__name: "DetailView",
|
|
1195
1237
|
props: {
|
|
1196
1238
|
className: {},
|
|
1197
1239
|
workflowId: {}
|
|
1198
1240
|
},
|
|
1199
1241
|
setup(e) {
|
|
1200
|
-
const t = me(), s = pe(), n =
|
|
1242
|
+
const t = me(), s = pe(), n = xe(), a = fe(), l = wn(), c = ue(), d = e, o = V({
|
|
1201
1243
|
pageType: "",
|
|
1202
1244
|
fields: {},
|
|
1203
1245
|
globalValidations: [],
|
|
@@ -1205,17 +1247,17 @@ const Vn = Object.assign(be, {
|
|
|
1205
1247
|
title: "",
|
|
1206
1248
|
subTitle: ""
|
|
1207
1249
|
}
|
|
1208
|
-
}), r =
|
|
1209
|
-
function
|
|
1210
|
-
return
|
|
1250
|
+
}), r = V([]);
|
|
1251
|
+
function w(T) {
|
|
1252
|
+
return T ? Object.entries(T).map(([g, i]) => (typeof i.modelValue == "boolean" ? i.fieldValue = i.modelValue ? "Yes" : "No" : i.fieldValue = i.modelValue, {
|
|
1211
1253
|
fieldKey: g,
|
|
1212
1254
|
...i
|
|
1213
1255
|
})).filter((g) => g.widget && g.widget.widget !== "Hidden") : [];
|
|
1214
1256
|
}
|
|
1215
|
-
const p =
|
|
1216
|
-
const g = new Date(
|
|
1257
|
+
const p = P(() => Ie(r.value)), h = P(() => o.value?.actions ? [...o.value.actions].reverse() : []), S = V(!0), _ = (T, m = "yyyy-MM-dd hh:mm:ss.fff") => {
|
|
1258
|
+
const g = new Date(T);
|
|
1217
1259
|
if (isNaN(g.getTime()))
|
|
1218
|
-
return
|
|
1260
|
+
return T;
|
|
1219
1261
|
const i = {
|
|
1220
1262
|
yyyy: g.getFullYear(),
|
|
1221
1263
|
yy: g.getFullYear().toString().substring(2),
|
|
@@ -1232,14 +1274,14 @@ const Vn = Object.assign(be, {
|
|
|
1232
1274
|
fff: g.getMilliseconds().toString().padStart(3, "0"),
|
|
1233
1275
|
f: g.getMilliseconds()
|
|
1234
1276
|
};
|
|
1235
|
-
let
|
|
1236
|
-
for (const
|
|
1237
|
-
|
|
1238
|
-
return
|
|
1239
|
-
},
|
|
1240
|
-
const g =
|
|
1241
|
-
return
|
|
1242
|
-
const
|
|
1277
|
+
let v = m;
|
|
1278
|
+
for (const u of Object.keys(i))
|
|
1279
|
+
v = v.replace(u, i[u]);
|
|
1280
|
+
return v;
|
|
1281
|
+
}, x = (T, m) => {
|
|
1282
|
+
const g = T.findIndex((i) => i.isCurrent);
|
|
1283
|
+
return T.map((i, v) => {
|
|
1284
|
+
const u = {
|
|
1243
1285
|
id: i.id,
|
|
1244
1286
|
title: "",
|
|
1245
1287
|
proxy: "",
|
|
@@ -1248,136 +1290,147 @@ const Vn = Object.assign(be, {
|
|
|
1248
1290
|
status: 1,
|
|
1249
1291
|
time: ""
|
|
1250
1292
|
};
|
|
1251
|
-
|
|
1252
|
-
const
|
|
1253
|
-
if (
|
|
1254
|
-
|
|
1293
|
+
u.title = i.workflowProcessApprovers[0]?.name;
|
|
1294
|
+
const C = i.workflowProcessApprovers[i.workflowProcessApprovers.length - 1], H = i.workflowHistorys[i.workflowHistorys.length - 1], Y = H?.workflowHistoryApprovers[H?.workflowHistoryApprovers?.length - 1];
|
|
1295
|
+
if (C && Y && C?.email?.toLowerCase() !== Y?.approverEmail?.toLowerCase() && (u.title = `${Y.name}`, u.proxy = `代理: ${C.name}`), i.sort > 1 ? u.sub = "审批角色:" + i.nodeName.replace("Submit", "").replace("Approve", "") : u.sub = "提交申请", i.isCurrent && m !== -1)
|
|
1296
|
+
u.desc = "审批中", u.status = 1;
|
|
1255
1297
|
else {
|
|
1256
|
-
const
|
|
1257
|
-
if (
|
|
1258
|
-
|
|
1259
|
-
else if (
|
|
1260
|
-
|
|
1261
|
-
else if (
|
|
1262
|
-
if (
|
|
1263
|
-
|
|
1298
|
+
const y = i.workflowHistorys[i.workflowHistorys.length - 1];
|
|
1299
|
+
if (y && y.status === 100)
|
|
1300
|
+
u.time = _(y.takeActionAt, "yyyy-MM-dd hh:mm:ss"), u.status = 2, u.desc = "已审批";
|
|
1301
|
+
else if (y && y.status === 999)
|
|
1302
|
+
u.time = _(y.takeActionAt, "yyyy-MM-dd hh:mm:ss"), u.status = 0, u.desc = "已跳过";
|
|
1303
|
+
else if (y)
|
|
1304
|
+
if (u.time = _(y.takeActionAt, "yyyy-MM-dd hh:mm:ss"), i.sort === 1)
|
|
1305
|
+
u.status = 2, u.desc = "";
|
|
1264
1306
|
else {
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1307
|
+
const $ = y.workflowHistoryApprovers[0];
|
|
1308
|
+
u.status = 3, u.desc = $?.reason ? `拒绝原因:${$.reason}` : "已拒绝";
|
|
1267
1309
|
}
|
|
1268
|
-
else
|
|
1269
|
-
|
|
1310
|
+
else v < g || g === -1 ? (u.status = 0, u.desc = "已跳过") : (u.status = 0, u.desc = "待审批");
|
|
1311
|
+
y && y.status;
|
|
1270
1312
|
}
|
|
1271
|
-
return
|
|
1313
|
+
return u;
|
|
1272
1314
|
});
|
|
1273
|
-
},
|
|
1274
|
-
|
|
1275
|
-
|
|
1315
|
+
}, D = V([]), j = V(!1);
|
|
1316
|
+
Q(async () => {
|
|
1317
|
+
S.value = !0, o.value = await de(ne.Details, d.className, {
|
|
1276
1318
|
svrStore: t,
|
|
1277
1319
|
bpmStore: s
|
|
1278
1320
|
}, {
|
|
1279
1321
|
workflowId: d.workflowId
|
|
1280
1322
|
});
|
|
1281
|
-
const
|
|
1323
|
+
const T = await De(ne.Details, d.className, { workflowId: d.workflowId, email: z() }), m = await He(d.className, d.workflowId);
|
|
1282
1324
|
o.value.actions = o.value.actions?.filter((i) => {
|
|
1283
|
-
const
|
|
1284
|
-
return
|
|
1285
|
-
}),
|
|
1325
|
+
const v = T.find((u) => u.button === i.title);
|
|
1326
|
+
return v ? v.isShow : !0;
|
|
1327
|
+
}), j.value = T.find((i) => i.button === "IsGlobal")?.isShow ?? !1, r.value = w(o.value.fields);
|
|
1286
1328
|
for (const i in o.value.fields)
|
|
1287
1329
|
if (o.value.fields[i].widget?.widget === "File") {
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1330
|
+
const v = r.value.find((u) => u.fieldKey === i);
|
|
1331
|
+
v && v.widget && (v.widget.files = m[i] ?? []);
|
|
1290
1332
|
}
|
|
1291
|
-
const g = await
|
|
1292
|
-
|
|
1333
|
+
const g = await kt(d.className, d.workflowId);
|
|
1334
|
+
D.value = x(g, 0), S.value = !1;
|
|
1293
1335
|
});
|
|
1294
|
-
async function
|
|
1295
|
-
return n[
|
|
1336
|
+
async function J(T, m) {
|
|
1337
|
+
return n[T]?.(m);
|
|
1296
1338
|
}
|
|
1297
|
-
function
|
|
1339
|
+
function z() {
|
|
1298
1340
|
return t()?.userInfo?.email_address ?? "";
|
|
1299
1341
|
}
|
|
1300
|
-
async function
|
|
1342
|
+
async function Z(T, m, g, i) {
|
|
1301
1343
|
try {
|
|
1302
|
-
switch (
|
|
1303
|
-
case
|
|
1304
|
-
const { reason:
|
|
1305
|
-
await
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1344
|
+
switch (T) {
|
|
1345
|
+
case E.Submit:
|
|
1346
|
+
const { reason: v, ifGlobal: u } = await J(i, { isGlobal: j.value }), C = i === "Approve" ? "100" : "-1";
|
|
1347
|
+
await bt(d.className, d.workflowId, z(), v, [Number(d.workflowId)], m, C, u);
|
|
1348
|
+
const H = i === "Approve" ? "审批已通过!" : "审批已拒绝!";
|
|
1349
|
+
c?.appContext.config.globalProperties.$notification.success(H), a.push({ name: "List", params: { className: d.className } });
|
|
1308
1350
|
break;
|
|
1309
|
-
case
|
|
1351
|
+
case E.Link:
|
|
1310
1352
|
g === "List" && a.push({ name: "List", params: { className: d.className } });
|
|
1311
1353
|
break;
|
|
1312
1354
|
default:
|
|
1313
|
-
console.warn("Unknown action type:",
|
|
1355
|
+
console.warn("Unknown action type:", T);
|
|
1314
1356
|
}
|
|
1315
1357
|
} catch {
|
|
1316
1358
|
}
|
|
1317
1359
|
}
|
|
1318
|
-
return (
|
|
1319
|
-
const g = I("a-link"), i = I("a-space"), u = I("a-spin");
|
|
1320
|
-
return
|
|
1321
|
-
|
|
1360
|
+
return (T, m) => {
|
|
1361
|
+
const g = I("a-link"), i = I("a-space"), v = I("a-card"), u = I("a-spin");
|
|
1362
|
+
return f(), k("div", Tn, [
|
|
1363
|
+
U(ge, {
|
|
1322
1364
|
title: o.value.banner.title,
|
|
1323
1365
|
subTitle: o.value.banner.subTitle,
|
|
1324
|
-
email:
|
|
1366
|
+
email: z()
|
|
1325
1367
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
loading:
|
|
1368
|
+
b("div", Un, [
|
|
1369
|
+
U(u, {
|
|
1370
|
+
loading: S.value,
|
|
1329
1371
|
class: "detail-container"
|
|
1330
1372
|
}, {
|
|
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
|
-
N(
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1373
|
+
default: N(() => [
|
|
1374
|
+
b("div", An, [
|
|
1375
|
+
(f(), A(ke(Ne(l).Steps), { steps: D.value }, null, 8, ["steps"])),
|
|
1376
|
+
b("div", Ln, [
|
|
1377
|
+
(f(!0), k(M, null, B(p.value, (C) => (f(), A(v, {
|
|
1378
|
+
key: C.name,
|
|
1379
|
+
title: C.name,
|
|
1380
|
+
style: { "margin-bottom": "24px" }
|
|
1381
|
+
}, {
|
|
1382
|
+
default: N(() => [
|
|
1383
|
+
b("div", Fn, [
|
|
1384
|
+
(f(!0), k(M, null, B(C.fields, (H) => (f(), k("div", {
|
|
1385
|
+
key: H.fieldKey,
|
|
1386
|
+
class: "detail-field-wrapper"
|
|
1387
|
+
}, [
|
|
1388
|
+
b("div", Mn, [
|
|
1389
|
+
b("div", Rn, W(H.widget?.title), 1),
|
|
1390
|
+
H.widget?.widget === "File" ? (f(!0), k(M, { key: 0 }, B(H.widget.files, (Y) => (f(), k("div", {
|
|
1391
|
+
class: "field-value",
|
|
1392
|
+
key: Y.id
|
|
1393
|
+
}, [
|
|
1394
|
+
U(i, null, {
|
|
1395
|
+
default: N(() => [
|
|
1396
|
+
ee(W(Y.name) + " ", 1),
|
|
1397
|
+
U(g, {
|
|
1398
|
+
href: Y.url,
|
|
1399
|
+
target: "_blank"
|
|
1400
|
+
}, {
|
|
1401
|
+
default: N(() => [
|
|
1402
|
+
U(Ne(Nn), { style: { color: "#7A00E6" } })
|
|
1403
|
+
]),
|
|
1404
|
+
_: 2
|
|
1405
|
+
}, 1032, ["href"])
|
|
1406
|
+
]),
|
|
1407
|
+
_: 2
|
|
1408
|
+
}, 1024)
|
|
1409
|
+
]))), 128)) : (f(), k("div", Dn, W(H.fieldValue), 1))
|
|
1410
|
+
])
|
|
1411
|
+
]))), 128))
|
|
1412
|
+
])
|
|
1413
|
+
]),
|
|
1414
|
+
_: 2
|
|
1415
|
+
}, 1032, ["title"]))), 128))
|
|
1363
1416
|
]),
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
])) :
|
|
1417
|
+
T.$slots.content ? (f(), k("div", Hn, [
|
|
1418
|
+
X(T.$slots, "content", {}, void 0, !0)
|
|
1419
|
+
])) : te("", !0)
|
|
1367
1420
|
])
|
|
1368
1421
|
]),
|
|
1369
1422
|
_: 3
|
|
1370
1423
|
}, 8, ["loading"])
|
|
1371
1424
|
]),
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
(
|
|
1377
|
-
key:
|
|
1378
|
-
config:
|
|
1425
|
+
b("div", Pn, [
|
|
1426
|
+
b("div", Bn, [
|
|
1427
|
+
X(T.$slots, "action", {}, void 0, !0),
|
|
1428
|
+
b("div", Kn, [
|
|
1429
|
+
(f(!0), k(M, null, B(h.value, (C) => (f(), A(le, {
|
|
1430
|
+
key: C.Title,
|
|
1431
|
+
config: C,
|
|
1379
1432
|
class: "action-button",
|
|
1380
|
-
onClick:
|
|
1433
|
+
onClick: Z
|
|
1381
1434
|
}, null, 8, ["config"]))), 128))
|
|
1382
1435
|
])
|
|
1383
1436
|
])
|
|
@@ -1385,14 +1438,14 @@ const Vn = Object.assign(be, {
|
|
|
1385
1438
|
]);
|
|
1386
1439
|
};
|
|
1387
1440
|
}
|
|
1388
|
-
}),
|
|
1441
|
+
}), En = /* @__PURE__ */ se(zn, [["__scopeId", "data-v-5a5b22de"]]), On = { class: "list-container" }, jn = { class: "query-title" }, Gn = { class: "field-wrapper" }, Wn = /* @__PURE__ */ R({
|
|
1389
1442
|
name: "ListView",
|
|
1390
1443
|
__name: "ListView",
|
|
1391
1444
|
props: {
|
|
1392
1445
|
className: {}
|
|
1393
1446
|
},
|
|
1394
1447
|
setup(e) {
|
|
1395
|
-
const t = me(), s = pe(), n = fe(), a = e,
|
|
1448
|
+
const t = me(), s = pe(), n = fe(), a = e, l = V(), c = Se({
|
|
1396
1449
|
current: 1,
|
|
1397
1450
|
total: 0,
|
|
1398
1451
|
pageSize: 10,
|
|
@@ -1402,29 +1455,29 @@ const Vn = Object.assign(be, {
|
|
|
1402
1455
|
filters: []
|
|
1403
1456
|
});
|
|
1404
1457
|
function d() {
|
|
1405
|
-
const
|
|
1458
|
+
const y = Object.entries(i.value).filter(([, $]) => $ && $ !== "").map(([$, L]) => ({
|
|
1406
1459
|
key: $,
|
|
1407
|
-
value:
|
|
1460
|
+
value: L
|
|
1408
1461
|
// operator: 'like' // 根据实际需要调整操作符
|
|
1409
1462
|
}));
|
|
1410
1463
|
return {
|
|
1411
|
-
pageNumber:
|
|
1412
|
-
pageSize:
|
|
1413
|
-
filters: [...
|
|
1464
|
+
pageNumber: c.current,
|
|
1465
|
+
pageSize: c.pageSize,
|
|
1466
|
+
filters: [...c.filters, ...y],
|
|
1414
1467
|
sorts: [{
|
|
1415
1468
|
key: "status",
|
|
1416
1469
|
type: 0
|
|
1417
1470
|
}]
|
|
1418
1471
|
};
|
|
1419
1472
|
}
|
|
1420
|
-
const o =
|
|
1473
|
+
const o = P(() => ({
|
|
1421
1474
|
x: p.value.length * 150 + 250
|
|
1422
1475
|
// 只设置横向滚动
|
|
1423
1476
|
// 移除 y 属性,让表格高度自适应
|
|
1424
|
-
})), r = (
|
|
1425
|
-
const $ = Object.entries(
|
|
1477
|
+
})), r = (y) => {
|
|
1478
|
+
const $ = Object.entries(y).filter(([, L]) => L.widget?.column).map(([L, G], re) => ({
|
|
1426
1479
|
title: G.widget.title,
|
|
1427
|
-
dataIndex:
|
|
1480
|
+
dataIndex: L.charAt(0).toLowerCase() + L.slice(1),
|
|
1428
1481
|
order: G.order,
|
|
1429
1482
|
ellipsis: !0,
|
|
1430
1483
|
tooltip: !0,
|
|
@@ -1433,7 +1486,7 @@ const Vn = Object.assign(be, {
|
|
|
1433
1486
|
// 启用最小宽度
|
|
1434
1487
|
resizable: !0
|
|
1435
1488
|
// 启用列宽调整
|
|
1436
|
-
})).sort((
|
|
1489
|
+
})).sort((L, G) => L.order - G.order);
|
|
1437
1490
|
$.push({
|
|
1438
1491
|
title: "Actions",
|
|
1439
1492
|
slotName: "optional",
|
|
@@ -1443,138 +1496,138 @@ const Vn = Object.assign(be, {
|
|
|
1443
1496
|
fixed: "right",
|
|
1444
1497
|
resizable: !1
|
|
1445
1498
|
}), p.value = $;
|
|
1446
|
-
},
|
|
1447
|
-
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1450
|
-
},
|
|
1451
|
-
|
|
1452
|
-
|
|
1499
|
+
}, w = V([]), p = V([]), h = V(!0), S = V(!0), _ = V(), x = async () => {
|
|
1500
|
+
S.value = !0;
|
|
1501
|
+
const y = await ft(a.className, d());
|
|
1502
|
+
w.value = y.data, c.total = y.totalCount, S.value = !1;
|
|
1503
|
+
}, D = V(!1);
|
|
1504
|
+
Q(async () => {
|
|
1505
|
+
h.value = !0, l.value = await de(3, a.className, {
|
|
1453
1506
|
svrStore: t,
|
|
1454
1507
|
bpmStore: s
|
|
1455
|
-
}), r(
|
|
1456
|
-
}),
|
|
1457
|
-
|
|
1508
|
+
}), r(l.value.fields), u(l.value.fields), g(l.value?.tabs?.[0]?.key || ""), _.value = l.value.actions, h.value = !1, D.value = !0;
|
|
1509
|
+
}), Qe(() => {
|
|
1510
|
+
D.value && x();
|
|
1458
1511
|
});
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1461
|
-
},
|
|
1462
|
-
|
|
1512
|
+
const j = (y) => {
|
|
1513
|
+
c.current = y, x();
|
|
1514
|
+
}, J = (y) => {
|
|
1515
|
+
c.pageSize = y, x();
|
|
1463
1516
|
};
|
|
1464
|
-
function
|
|
1465
|
-
switch (
|
|
1466
|
-
case
|
|
1467
|
-
n.push({ name:
|
|
1517
|
+
function z(y, $, L, G, re) {
|
|
1518
|
+
switch (y) {
|
|
1519
|
+
case E.Link:
|
|
1520
|
+
n.push({ name: L, params: { workflowId: re } });
|
|
1468
1521
|
break;
|
|
1469
1522
|
default:
|
|
1470
|
-
console.warn("Unknown action type:",
|
|
1523
|
+
console.warn("Unknown action type:", y);
|
|
1471
1524
|
}
|
|
1472
1525
|
}
|
|
1473
|
-
function
|
|
1474
|
-
switch (
|
|
1475
|
-
case
|
|
1476
|
-
n.push({ name:
|
|
1526
|
+
function Z(y, $, L) {
|
|
1527
|
+
switch (y) {
|
|
1528
|
+
case E.Link:
|
|
1529
|
+
n.push({ name: L });
|
|
1477
1530
|
break;
|
|
1478
1531
|
default:
|
|
1479
|
-
console.warn("Unknown action type:",
|
|
1532
|
+
console.warn("Unknown action type:", y);
|
|
1480
1533
|
}
|
|
1481
1534
|
}
|
|
1482
|
-
function
|
|
1535
|
+
function T() {
|
|
1483
1536
|
return t()?.userInfo?.email_address ?? "";
|
|
1484
1537
|
}
|
|
1485
|
-
function
|
|
1486
|
-
return
|
|
1538
|
+
function m(y, $) {
|
|
1539
|
+
return y.replace(/{currentUserEmail}/g, $);
|
|
1487
1540
|
}
|
|
1488
|
-
function
|
|
1489
|
-
const $ =
|
|
1490
|
-
|
|
1491
|
-
...
|
|
1492
|
-
value:
|
|
1493
|
-
})) || [],
|
|
1541
|
+
function g(y) {
|
|
1542
|
+
const $ = l.value?.tabs?.find((L) => L.key === y)?.filters;
|
|
1543
|
+
c.filters = $?.map((L) => ({
|
|
1544
|
+
...L,
|
|
1545
|
+
value: m(L.value, T())
|
|
1546
|
+
})) || [], x();
|
|
1494
1547
|
}
|
|
1495
|
-
const
|
|
1548
|
+
const i = V({}), v = P(() => l.value?.fields ? Object.entries(l.value.fields).filter(([, y]) => y.isFiltered) : []), u = (y) => {
|
|
1496
1549
|
const $ = {};
|
|
1497
|
-
Object.entries(
|
|
1498
|
-
$[
|
|
1499
|
-
}),
|
|
1500
|
-
},
|
|
1501
|
-
|
|
1502
|
-
},
|
|
1503
|
-
|
|
1550
|
+
Object.entries(y).forEach(([L, G]) => {
|
|
1551
|
+
$[L] = G.modelValue;
|
|
1552
|
+
}), i.value = $;
|
|
1553
|
+
}, C = () => {
|
|
1554
|
+
c.current = 1, x();
|
|
1555
|
+
}, H = () => {
|
|
1556
|
+
l.value && u(l.value.fields), C();
|
|
1504
1557
|
};
|
|
1505
|
-
function
|
|
1506
|
-
return !(
|
|
1558
|
+
function Y(y, $) {
|
|
1559
|
+
return !(y.location !== "InTable" || y.title === "Update" && ($.status === 100 || $.status === -1));
|
|
1507
1560
|
}
|
|
1508
|
-
return (
|
|
1509
|
-
const
|
|
1510
|
-
return
|
|
1511
|
-
|
|
1512
|
-
title:
|
|
1513
|
-
subTitle:
|
|
1514
|
-
email:
|
|
1561
|
+
return (y, $) => {
|
|
1562
|
+
const L = I("a-col"), G = I("a-button"), re = I("a-space"), Oe = I("a-row"), je = I("a-card"), Ge = I("a-tab-pane"), We = I("a-tabs"), qe = I("a-table");
|
|
1563
|
+
return f(), k("div", On, [
|
|
1564
|
+
U(ge, {
|
|
1565
|
+
title: l.value?.banner.title ?? "",
|
|
1566
|
+
subTitle: l.value?.banner.subTitle ?? "",
|
|
1567
|
+
email: T()
|
|
1515
1568
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1516
|
-
|
|
1517
|
-
default:
|
|
1518
|
-
|
|
1519
|
-
$[0] || ($[0] =
|
|
1520
|
-
|
|
1521
|
-
(
|
|
1522
|
-
key:
|
|
1569
|
+
U(je, null, {
|
|
1570
|
+
default: N(() => [
|
|
1571
|
+
b("div", jn, [
|
|
1572
|
+
$[0] || ($[0] = b("h3", null, "查询条件", -1)),
|
|
1573
|
+
b("div", null, [
|
|
1574
|
+
(f(!0), k(M, null, B(_.value, (K) => (f(), k(M, {
|
|
1575
|
+
key: K.title
|
|
1523
1576
|
}, [
|
|
1524
|
-
|
|
1577
|
+
K.location === "InOperation" ? (f(), A(le, {
|
|
1525
1578
|
key: 0,
|
|
1526
|
-
config:
|
|
1527
|
-
onClick:
|
|
1528
|
-
}, null, 8, ["config"])) :
|
|
1579
|
+
config: K,
|
|
1580
|
+
onClick: Z
|
|
1581
|
+
}, null, 8, ["config"])) : te("", !0)
|
|
1529
1582
|
], 64))), 128))
|
|
1530
1583
|
])
|
|
1531
1584
|
]),
|
|
1532
|
-
|
|
1585
|
+
U(Oe, {
|
|
1533
1586
|
gutter: [24, 20],
|
|
1534
1587
|
class: "search-row"
|
|
1535
1588
|
}, {
|
|
1536
|
-
default:
|
|
1537
|
-
(
|
|
1538
|
-
key:
|
|
1589
|
+
default: N(() => [
|
|
1590
|
+
(f(!0), k(M, null, B(v.value, ([K, ie]) => (f(), A(L, {
|
|
1591
|
+
key: K,
|
|
1539
1592
|
span: 6,
|
|
1540
1593
|
class: "search-col"
|
|
1541
1594
|
}, {
|
|
1542
|
-
default:
|
|
1543
|
-
|
|
1544
|
-
name:
|
|
1595
|
+
default: N(() => [
|
|
1596
|
+
U($e, {
|
|
1597
|
+
name: K,
|
|
1545
1598
|
config: ie,
|
|
1546
|
-
modelValue:
|
|
1547
|
-
"onUpdate:modelValue": (ve) =>
|
|
1599
|
+
modelValue: i.value[K],
|
|
1600
|
+
"onUpdate:modelValue": (ve) => i.value[K] = ve,
|
|
1548
1601
|
class: "form-field"
|
|
1549
1602
|
}, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
|
|
1550
1603
|
]),
|
|
1551
1604
|
_: 2
|
|
1552
1605
|
}, 1024))), 128)),
|
|
1553
|
-
|
|
1606
|
+
U(L, {
|
|
1554
1607
|
span: 6,
|
|
1555
1608
|
class: "search-col"
|
|
1556
1609
|
}, {
|
|
1557
|
-
default:
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
default:
|
|
1561
|
-
|
|
1610
|
+
default: N(() => [
|
|
1611
|
+
b("div", Gn, [
|
|
1612
|
+
U(re, { size: "medium" }, {
|
|
1613
|
+
default: N(() => [
|
|
1614
|
+
U(G, {
|
|
1562
1615
|
type: "primary",
|
|
1563
1616
|
size: "medium",
|
|
1564
|
-
onClick:
|
|
1617
|
+
onClick: C
|
|
1565
1618
|
}, {
|
|
1566
|
-
default:
|
|
1567
|
-
|
|
1619
|
+
default: N(() => $[1] || ($[1] = [
|
|
1620
|
+
ee(" 查询 ", -1)
|
|
1568
1621
|
])),
|
|
1569
1622
|
_: 1,
|
|
1570
1623
|
__: [1]
|
|
1571
1624
|
}),
|
|
1572
|
-
|
|
1625
|
+
U(G, {
|
|
1573
1626
|
size: "medium",
|
|
1574
|
-
onClick:
|
|
1627
|
+
onClick: H
|
|
1575
1628
|
}, {
|
|
1576
|
-
default:
|
|
1577
|
-
|
|
1629
|
+
default: N(() => $[2] || ($[2] = [
|
|
1630
|
+
ee(" 重置 ", -1)
|
|
1578
1631
|
])),
|
|
1579
1632
|
_: 1,
|
|
1580
1633
|
__: [2]
|
|
@@ -1592,50 +1645,50 @@ const Vn = Object.assign(be, {
|
|
|
1592
1645
|
]),
|
|
1593
1646
|
_: 1
|
|
1594
1647
|
}),
|
|
1595
|
-
|
|
1648
|
+
U(We, {
|
|
1596
1649
|
size: "large",
|
|
1597
|
-
onTabClick:
|
|
1650
|
+
onTabClick: g
|
|
1598
1651
|
}, {
|
|
1599
|
-
default:
|
|
1600
|
-
(
|
|
1601
|
-
key:
|
|
1602
|
-
title:
|
|
1652
|
+
default: N(() => [
|
|
1653
|
+
(f(!0), k(M, null, B(l.value?.tabs, (K) => (f(), A(Ge, {
|
|
1654
|
+
key: K.key,
|
|
1655
|
+
title: K.title
|
|
1603
1656
|
}, null, 8, ["title"]))), 128))
|
|
1604
1657
|
]),
|
|
1605
1658
|
_: 1
|
|
1606
1659
|
}),
|
|
1607
|
-
|
|
1660
|
+
U(qe, {
|
|
1608
1661
|
columns: p.value,
|
|
1609
|
-
data:
|
|
1662
|
+
data: w.value,
|
|
1610
1663
|
stripe: "",
|
|
1611
1664
|
border: "",
|
|
1612
1665
|
pagination: {
|
|
1613
|
-
current:
|
|
1614
|
-
total:
|
|
1615
|
-
pageSize:
|
|
1616
|
-
showTotal:
|
|
1617
|
-
showPageSize:
|
|
1666
|
+
current: c.current,
|
|
1667
|
+
total: c.total,
|
|
1668
|
+
pageSize: c.pageSize,
|
|
1669
|
+
showTotal: c.showTotal,
|
|
1670
|
+
showPageSize: c.showPageSize,
|
|
1618
1671
|
showJumper: !0,
|
|
1619
1672
|
pageSizeOptions: [10, 20, 50, 100]
|
|
1620
1673
|
},
|
|
1621
|
-
loading:
|
|
1674
|
+
loading: S.value,
|
|
1622
1675
|
size: "medium",
|
|
1623
1676
|
scroll: o.value,
|
|
1624
|
-
onPageChange:
|
|
1625
|
-
onPageSizeChange:
|
|
1677
|
+
onPageChange: j,
|
|
1678
|
+
onPageSizeChange: J
|
|
1626
1679
|
}, {
|
|
1627
|
-
optional:
|
|
1628
|
-
|
|
1629
|
-
default:
|
|
1630
|
-
(
|
|
1680
|
+
optional: N(({ record: K }) => [
|
|
1681
|
+
U(re, { size: "small" }, {
|
|
1682
|
+
default: N(() => [
|
|
1683
|
+
(f(!0), k(M, null, B(_.value, (ie) => (f(), k(M, {
|
|
1631
1684
|
key: ie.title
|
|
1632
1685
|
}, [
|
|
1633
|
-
|
|
1686
|
+
Y(ie, K) ? (f(), A(le, {
|
|
1634
1687
|
key: 0,
|
|
1635
1688
|
config: ie,
|
|
1636
1689
|
size: "small",
|
|
1637
|
-
onClick: (...ve) =>
|
|
1638
|
-
}, null, 8, ["config", "onClick"])) :
|
|
1690
|
+
onClick: (...ve) => z(...ve, K.workflowId)
|
|
1691
|
+
}, null, 8, ["config", "onClick"])) : te("", !0)
|
|
1639
1692
|
], 64))), 128))
|
|
1640
1693
|
]),
|
|
1641
1694
|
_: 2
|
|
@@ -1646,28 +1699,18 @@ const Vn = Object.assign(be, {
|
|
|
1646
1699
|
]);
|
|
1647
1700
|
};
|
|
1648
1701
|
}
|
|
1649
|
-
}),
|
|
1650
|
-
let ye = {};
|
|
1651
|
-
function On(e) {
|
|
1652
|
-
ye = { ...ye, ...e };
|
|
1653
|
-
}
|
|
1654
|
-
function Ee() {
|
|
1655
|
-
return ye;
|
|
1656
|
-
}
|
|
1657
|
-
const Jn = {
|
|
1702
|
+
}), qn = /* @__PURE__ */ se(Wn, [["__scopeId", "data-v-477f539f"]]), ea = {
|
|
1658
1703
|
install(e, t = {}) {
|
|
1659
|
-
t.config &&
|
|
1704
|
+
t.config && rt(t.config), t.router && e.provide(Pe, t.router), t.pinia && e.provide(Kt, 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", sn), e.component("UpdateView", _n), e.component("DetailView", En), e.component("ListView", qn);
|
|
1660
1705
|
}
|
|
1661
1706
|
};
|
|
1662
1707
|
export {
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
Ee as getLibraryConfig,
|
|
1671
|
-
On as setLibraryConfig
|
|
1708
|
+
sn as CreateView,
|
|
1709
|
+
En as DetailView,
|
|
1710
|
+
qn as ListView,
|
|
1711
|
+
Kt as PiniaKey,
|
|
1712
|
+
Pe as RouterKey,
|
|
1713
|
+
_n as UpdateView,
|
|
1714
|
+
ea as default
|
|
1672
1715
|
};
|
|
1673
1716
|
//# sourceMappingURL=index.es.js.map
|