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