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