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