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