@chase-shao/vue-component-lib 1.2.63 → 1.2.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/js/util.d.ts +1 -0
- package/dist/components/data-gen/views/CreateView.vue.d.ts +12 -12
- package/dist/components/data-gen/views/UpdateView.vue.d.ts +12 -12
- package/dist/components/data-gen/widgets/CheckBox.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/FileUpload.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/InputNumber.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/InputText.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/TextArea.vue.d.ts +2 -2
- package/dist/components/data-gen/widgets/index.vue.d.ts +5 -5
- 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 +892 -887
- 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 +2 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,65 +1,70 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import { defineStore as
|
|
4
|
-
import { Modal as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
const
|
|
7
|
-
token:
|
|
8
|
-
})),
|
|
1
|
+
import { ref as g, defineComponent as G, mergeModels as re, useModel as we, resolveComponent as S, createBlock as L, openBlock as u, onMounted as de, computed as X, withCtx as p, createElementBlock as V, Fragment as K, renderList as E, createVNode as F, nextTick as rt, createTextVNode as q, useTemplateRef as De, createElementVNode as I, createCommentVNode as se, toDisplayString as J, resolveDynamicComponent as Pe, renderSlot as ue, inject as me, getCurrentInstance as be, reactive as Me, normalizeStyle as it, normalizeClass as lt, unref as Te, onActivated as ct } from "vue";
|
|
2
|
+
import ut from "axios";
|
|
3
|
+
import { defineStore as dt } from "pinia";
|
|
4
|
+
import { Modal as ft } from "@arco-design/web-vue";
|
|
5
|
+
import { useRouter as pt } from "vue-router";
|
|
6
|
+
const mt = dt("main", () => ({
|
|
7
|
+
token: g(void 0)
|
|
8
|
+
})), gt = async (e) => new Promise((t) => setTimeout(t, e)), vt = async (e, t, a, o = void 0) => {
|
|
9
9
|
if (e[t] === void 0)
|
|
10
10
|
try {
|
|
11
|
-
e[t] = null, e[t] = await a() ||
|
|
12
|
-
} catch (
|
|
13
|
-
console.error(
|
|
11
|
+
e[t] = null, e[t] = await a() || o;
|
|
12
|
+
} catch (n) {
|
|
13
|
+
console.error(n), e[t] = void 0;
|
|
14
14
|
}
|
|
15
15
|
for (; e[t] === null; )
|
|
16
|
-
await
|
|
16
|
+
await gt(100);
|
|
17
17
|
return e[t];
|
|
18
|
-
},
|
|
18
|
+
}, _e = (e) => {
|
|
19
19
|
const t = `0${e}`;
|
|
20
20
|
return t.substring(t.length - 2);
|
|
21
|
-
},
|
|
21
|
+
}, ke = (e, t = "yyyy-MM-dd hh:mm:ss") => {
|
|
22
22
|
if (!e || typeof e == "string" && e.length === 0)
|
|
23
23
|
return "";
|
|
24
24
|
try {
|
|
25
|
-
const a = new Date(e),
|
|
25
|
+
const a = new Date(e), o = [
|
|
26
26
|
["yyyy", a.getFullYear()],
|
|
27
27
|
["yy", a.getFullYear().toString().substring(2)],
|
|
28
|
-
["MM",
|
|
28
|
+
["MM", _e(a.getMonth() + 1)],
|
|
29
29
|
["M", a.getMonth() + 1],
|
|
30
|
-
["dd",
|
|
30
|
+
["dd", _e(a.getDate())],
|
|
31
31
|
["d", a.getDate()],
|
|
32
|
-
["hh",
|
|
32
|
+
["hh", _e(a.getHours())],
|
|
33
33
|
["h", a.getHours()],
|
|
34
|
-
["mm",
|
|
34
|
+
["mm", _e(a.getMinutes())],
|
|
35
35
|
["m", a.getMinutes()],
|
|
36
|
-
["ss",
|
|
36
|
+
["ss", _e(a.getSeconds())],
|
|
37
37
|
["s", a.getSeconds()]
|
|
38
38
|
];
|
|
39
|
-
for (const [
|
|
40
|
-
t = t.replace(
|
|
39
|
+
for (const [n, c] of o)
|
|
40
|
+
t = t.replace(n, c);
|
|
41
41
|
return t;
|
|
42
42
|
} catch {
|
|
43
43
|
return e.toLocaleString();
|
|
44
44
|
}
|
|
45
|
+
}, _t = (e, t) => {
|
|
46
|
+
let a;
|
|
47
|
+
e instanceof Blob ? a = e : a = new Blob([e]);
|
|
48
|
+
const o = document.createElement("a"), n = window.URL.createObjectURL(a);
|
|
49
|
+
o.href = n, o.download = t, o.click(), window.URL.revokeObjectURL(n);
|
|
45
50
|
};
|
|
46
|
-
let
|
|
47
|
-
function
|
|
48
|
-
|
|
51
|
+
let Re = {};
|
|
52
|
+
function yt(e) {
|
|
53
|
+
Re = { ...Re, ...e };
|
|
49
54
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
55
|
+
function Be() {
|
|
56
|
+
return Re;
|
|
52
57
|
}
|
|
53
|
-
function
|
|
54
|
-
const e =
|
|
58
|
+
function qe() {
|
|
59
|
+
const e = Be();
|
|
55
60
|
return {
|
|
56
61
|
apiBase: e.apiBase || void 0 || "",
|
|
57
62
|
appSecret: e.appSecret || void 0 || ""
|
|
58
63
|
};
|
|
59
64
|
}
|
|
60
|
-
function
|
|
61
|
-
const { apiBase: e } =
|
|
62
|
-
return
|
|
65
|
+
function Ye() {
|
|
66
|
+
const { apiBase: e } = qe();
|
|
67
|
+
return ut.create({
|
|
63
68
|
baseURL: e,
|
|
64
69
|
timeout: 1e4,
|
|
65
70
|
// 10s
|
|
@@ -67,23 +72,23 @@ function qe() {
|
|
|
67
72
|
withCredentials: !0
|
|
68
73
|
});
|
|
69
74
|
}
|
|
70
|
-
const
|
|
71
|
-
const { apiBase: e, appSecret: t } =
|
|
72
|
-
return await
|
|
73
|
-
const
|
|
75
|
+
const Je = async () => {
|
|
76
|
+
const { apiBase: e, appSecret: t } = qe(), a = Ye(), o = mt();
|
|
77
|
+
return await vt(o, "token", async () => {
|
|
78
|
+
const n = await a.get(`${e}/GenerateToken`, {
|
|
74
79
|
params: {
|
|
75
80
|
appid: "bpm",
|
|
76
81
|
appsecret: t
|
|
77
82
|
}
|
|
78
83
|
});
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
}, (
|
|
84
|
+
return n?.data?.token && setTimeout(() => {
|
|
85
|
+
o.token = void 0;
|
|
86
|
+
}, (n.data?.expireSeconds ?? 3600) * 1e3), n?.data?.token;
|
|
82
87
|
});
|
|
83
|
-
},
|
|
84
|
-
const e = await
|
|
88
|
+
}, j = async () => {
|
|
89
|
+
const e = await Je(), t = Ye();
|
|
85
90
|
return t.defaults.headers.common.Authorization = `Bearer ${e}`, t;
|
|
86
|
-
},
|
|
91
|
+
}, Ue = {
|
|
87
92
|
CurrentUserEmail: (e) => e.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
|
|
88
93
|
CurrentUserPositionCode: (e) => e.bpmStore()?.positionCode ?? 888,
|
|
89
94
|
CurrentDatetime: () => (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -93,32 +98,32 @@ const Ye = async () => {
|
|
|
93
98
|
}, O = [];
|
|
94
99
|
for (let e = 0; e < 256; ++e)
|
|
95
100
|
O.push((e + 256).toString(16).slice(1));
|
|
96
|
-
function
|
|
101
|
+
function wt(e, t = 0) {
|
|
97
102
|
return (O[e[t + 0]] + O[e[t + 1]] + O[e[t + 2]] + O[e[t + 3]] + "-" + O[e[t + 4]] + O[e[t + 5]] + "-" + O[e[t + 6]] + O[e[t + 7]] + "-" + O[e[t + 8]] + O[e[t + 9]] + "-" + O[e[t + 10]] + O[e[t + 11]] + O[e[t + 12]] + O[e[t + 13]] + O[e[t + 14]] + O[e[t + 15]]).toLowerCase();
|
|
98
103
|
}
|
|
99
|
-
let
|
|
100
|
-
const
|
|
101
|
-
function
|
|
102
|
-
if (!
|
|
104
|
+
let Ne;
|
|
105
|
+
const bt = new Uint8Array(16);
|
|
106
|
+
function ht() {
|
|
107
|
+
if (!Ne) {
|
|
103
108
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
104
109
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
105
|
-
|
|
110
|
+
Ne = crypto.getRandomValues.bind(crypto);
|
|
106
111
|
}
|
|
107
|
-
return
|
|
112
|
+
return Ne(bt);
|
|
108
113
|
}
|
|
109
|
-
const
|
|
110
|
-
function
|
|
114
|
+
const kt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), je = { randomUUID: kt };
|
|
115
|
+
function Xe(e, t, a) {
|
|
111
116
|
if (je.randomUUID && !e)
|
|
112
117
|
return je.randomUUID();
|
|
113
118
|
e = e || {};
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
119
|
+
const o = e.random ?? e.rng?.() ?? ht();
|
|
120
|
+
if (o.length < 16)
|
|
116
121
|
throw new Error("Random bytes length must be >= 16");
|
|
117
|
-
return
|
|
122
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, wt(o);
|
|
118
123
|
}
|
|
119
|
-
var
|
|
120
|
-
function
|
|
121
|
-
const
|
|
124
|
+
var Z = /* @__PURE__ */ ((e) => (e[e.Submit = 0] = "Submit", e[e.Link = 1] = "Link", e))(Z || {}), pe = /* @__PURE__ */ ((e) => (e[e.Create = 0] = "Create", e[e.Update = 1] = "Update", e[e.Details = 2] = "Details", e[e.List = 3] = "List", e))(pe || {});
|
|
125
|
+
function Ct(e, t, a) {
|
|
126
|
+
const o = {
|
|
122
127
|
pageType: "",
|
|
123
128
|
fields: {},
|
|
124
129
|
globalValidations: [],
|
|
@@ -127,40 +132,40 @@ function ht(e, t, a) {
|
|
|
127
132
|
subTitle: ""
|
|
128
133
|
}
|
|
129
134
|
};
|
|
130
|
-
return e.__ClassAttributes?.forEach((
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
else if (
|
|
134
|
-
|
|
135
|
-
rule:
|
|
136
|
-
errorMessage:
|
|
137
|
-
param:
|
|
138
|
-
appliesTo:
|
|
135
|
+
return e.__ClassAttributes?.forEach((n) => {
|
|
136
|
+
if (n.attributeType === "UIPageType")
|
|
137
|
+
o.pageType = n.Type;
|
|
138
|
+
else if (n.attributeType === "UIValidationControl")
|
|
139
|
+
o.globalValidations.push({
|
|
140
|
+
rule: n.ruleName,
|
|
141
|
+
errorMessage: n.errorMessage,
|
|
142
|
+
param: n.ruleParameter,
|
|
143
|
+
appliesTo: n.propertyNames || ["*"]
|
|
139
144
|
});
|
|
140
|
-
else if (
|
|
141
|
-
if (
|
|
142
|
-
|
|
143
|
-
key:
|
|
144
|
-
title:
|
|
145
|
-
filters:
|
|
146
|
-
order:
|
|
145
|
+
else if (n.attributeType === "UIControl") {
|
|
146
|
+
if (n.widget === "Tab") {
|
|
147
|
+
o.tabs || (o.tabs = []), o.tabs.push({
|
|
148
|
+
key: Xe(),
|
|
149
|
+
title: n.title,
|
|
150
|
+
filters: n.filters ? JSON.parse(n.filters) : [],
|
|
151
|
+
order: n.order
|
|
147
152
|
});
|
|
148
153
|
return;
|
|
149
154
|
}
|
|
150
|
-
|
|
151
|
-
isSubmit:
|
|
152
|
-
requestUrl:
|
|
153
|
-
redirectUrl:
|
|
154
|
-
redirectType:
|
|
155
|
-
title:
|
|
156
|
-
widget:
|
|
157
|
-
location:
|
|
158
|
-
attributeType:
|
|
159
|
-
readonly:
|
|
155
|
+
o.actions || (o.actions = []), o.actions.push({
|
|
156
|
+
isSubmit: n.isSubmit,
|
|
157
|
+
requestUrl: n.requestUrl,
|
|
158
|
+
redirectUrl: n.redirectUrl,
|
|
159
|
+
redirectType: n.redirectType,
|
|
160
|
+
title: n.title,
|
|
161
|
+
widget: n.widget === "Link" ? Z.Link : Z.Submit,
|
|
162
|
+
location: n.location,
|
|
163
|
+
attributeType: n.attributeType,
|
|
164
|
+
readonly: n.readonly
|
|
160
165
|
});
|
|
161
|
-
} else
|
|
162
|
-
}),
|
|
163
|
-
if (
|
|
166
|
+
} else n.attributeType === "Banner" && (o.banner.title = n.title, o.banner.subTitle = t === 0 ? n.subTitle : He(n.subTitle, e.workflowId.propertyValue));
|
|
167
|
+
}), o.tabs && (o.tabs = o.tabs.sort((n, c) => n.order - c.order)), Object.entries(e).forEach(([n, c]) => {
|
|
168
|
+
if (n === "__ClassAttributes" || n === "className" || n === "id" || n === "deleteFlag" || n === "status" || n === "workFlowReason" || t !== 3 && n === "workflowId")
|
|
164
169
|
return;
|
|
165
170
|
const r = {
|
|
166
171
|
validations: [],
|
|
@@ -180,29 +185,29 @@ function ht(e, t, a) {
|
|
|
180
185
|
r.modelValue = s;
|
|
181
186
|
break;
|
|
182
187
|
}
|
|
183
|
-
|
|
188
|
+
n === "onBehalf" && t === 0 && (r.modelValue = Ue.CurrentUserEmail(a)), t === 1 && (n === "directReports" || n === "employeesInTheTeam") && r.modelValue && (r.modelValue = Number(r.modelValue)), l?.forEach((i) => {
|
|
184
189
|
i.order || i.Order ? r.order = i.order ?? i.Order : i.attributeType === "UIControl" ? r.widget = {
|
|
185
190
|
...i,
|
|
186
191
|
column: !0
|
|
187
192
|
} : i.attributeType === "UIValidationControl" && t !== 3 ? r.widget?.widget !== "CheckBox" && r.validations.push(i) : i.attributeType === "UIListed" ? r.widget = {
|
|
188
193
|
...i,
|
|
189
194
|
column: !0
|
|
190
|
-
} : i.attributeType === "UIFiltered" ? (r.isFiltered = !0, r.operator = i.operatorType) : i.dependentType ? r.dependent =
|
|
195
|
+
} : i.attributeType === "UIFiltered" ? (r.isFiltered = !0, r.operator = i.operatorType) : i.dependentType ? r.dependent = Ue[i.dependentType] ? Ue[i.dependentType](a) : "" : i.eventType === "Change" && r.triggers?.push({
|
|
191
196
|
event: "change",
|
|
192
197
|
handlerName: i.eventName
|
|
193
198
|
});
|
|
194
|
-
}),
|
|
195
|
-
}),
|
|
199
|
+
}), o.fields[n] = r;
|
|
200
|
+
}), o;
|
|
196
201
|
}
|
|
197
|
-
const
|
|
198
|
-
const c = await (await
|
|
199
|
-
return
|
|
200
|
-
},
|
|
201
|
-
async function
|
|
202
|
-
const
|
|
202
|
+
const Ce = async (e, t, a, o) => {
|
|
203
|
+
const c = await (await j()).get(`/General/${t}/${e}/page`, { params: o });
|
|
204
|
+
return Ct(c?.data, e, a);
|
|
205
|
+
}, Qe = async (e, t, a) => (await (await j()).post(`/${t}/${e}/button/List`, null, { params: a }))?.data;
|
|
206
|
+
async function Vt(e, t) {
|
|
207
|
+
const o = await (await j()).post(`/General/${e}/list`, t);
|
|
203
208
|
return {
|
|
204
|
-
data:
|
|
205
|
-
totalCount:
|
|
209
|
+
data: o.data.data,
|
|
210
|
+
totalCount: o.data.totalCount
|
|
206
211
|
// actions: res.data.__ClassAttributes.filter(item=> item.attributeType === 'UIControl').map((attr) => {
|
|
207
212
|
// return {
|
|
208
213
|
// redirectUrl: attr.redirectUrl,
|
|
@@ -218,109 +223,109 @@ async function kt(e, t) {
|
|
|
218
223
|
// ),
|
|
219
224
|
};
|
|
220
225
|
}
|
|
221
|
-
async function
|
|
222
|
-
|
|
226
|
+
async function St(e, t, a) {
|
|
227
|
+
return (await (await j()).post(a, t, {
|
|
223
228
|
params: {
|
|
224
229
|
className: e
|
|
225
230
|
}
|
|
226
|
-
});
|
|
227
|
-
return o.data.length > 0 ? o.data[0] : 0;
|
|
231
|
+
})).data;
|
|
228
232
|
}
|
|
229
|
-
async function
|
|
230
|
-
const
|
|
231
|
-
return (await
|
|
233
|
+
async function xt(e, t, a, o) {
|
|
234
|
+
const n = await j(), c = He(o, t);
|
|
235
|
+
return (await n.put(c, a))?.data;
|
|
232
236
|
}
|
|
233
237
|
function He(e, t) {
|
|
234
238
|
return e.replace(/{WorkflowId}/g, t);
|
|
235
239
|
}
|
|
236
|
-
function
|
|
240
|
+
function $t(e, t) {
|
|
237
241
|
return e.replace(/{ApproverEmail}/g, encodeURIComponent(t));
|
|
238
242
|
}
|
|
239
|
-
function
|
|
243
|
+
function At(e, t) {
|
|
240
244
|
return e.replace(/{WorkFlowReason}/g, encodeURIComponent(t));
|
|
241
245
|
}
|
|
242
|
-
function
|
|
246
|
+
function It(e, t) {
|
|
243
247
|
return e.replace(/{Status}/g, t);
|
|
244
248
|
}
|
|
245
|
-
function
|
|
249
|
+
function Tt(e, t) {
|
|
246
250
|
return e.replace(/{IfTriggerGlobal_RandP_Approval}/g, t);
|
|
247
251
|
}
|
|
248
|
-
function
|
|
252
|
+
function Ut(e, t) {
|
|
249
253
|
return e.replace(/{ClassName}/g, encodeURIComponent(t));
|
|
250
254
|
}
|
|
251
|
-
async function
|
|
252
|
-
const s = await
|
|
255
|
+
async function Nt(e, t, a, o, n, c, r, l) {
|
|
256
|
+
const s = await j();
|
|
253
257
|
let i = He(c, t);
|
|
254
|
-
return i =
|
|
258
|
+
return i = $t(i, a), i = At(i, o), i = It(i, r), i = Tt(i, l), i = Ut(i, e), (await s.put(i, n))?.data;
|
|
255
259
|
}
|
|
256
|
-
async function
|
|
257
|
-
const
|
|
258
|
-
return Object.entries(
|
|
260
|
+
async function Lt(e, t) {
|
|
261
|
+
const n = (await (await j()).get(e, { params: { value: t } }))?.data;
|
|
262
|
+
return Object.entries(n).map(([c, r]) => ({
|
|
259
263
|
value: c,
|
|
260
264
|
label: r
|
|
261
265
|
}));
|
|
262
266
|
}
|
|
263
|
-
async function
|
|
264
|
-
return (await (await
|
|
267
|
+
async function Ft(e, t) {
|
|
268
|
+
return (await (await j()).get(`/General/${e}/${t}/process`))?.data;
|
|
265
269
|
}
|
|
266
|
-
|
|
267
|
-
return (await (await E()).get(`/General/${e}/${t}/process`))?.data;
|
|
268
|
-
}
|
|
269
|
-
function Ft(e) {
|
|
270
|
+
function Rt(e) {
|
|
270
271
|
return {
|
|
271
|
-
uid: e.id ??
|
|
272
|
+
uid: e.id ?? Xe(),
|
|
272
273
|
name: e.attachmentName ?? "unknown",
|
|
273
274
|
url: e.attachmentKey ?? ""
|
|
274
275
|
};
|
|
275
276
|
}
|
|
276
|
-
async function
|
|
277
|
-
return (await (await
|
|
277
|
+
async function Ze(e, t) {
|
|
278
|
+
return (await (await j()).get(`/General/${e}/${t}/upload/get`))?.data.reduce((c, r) => {
|
|
278
279
|
const { category: l } = r;
|
|
279
|
-
return c[l] || (c[l] = []), c[l].push(
|
|
280
|
+
return c[l] || (c[l] = []), c[l].push(Rt(r)), c;
|
|
280
281
|
}, {});
|
|
281
282
|
}
|
|
282
|
-
async function
|
|
283
|
-
return (await
|
|
283
|
+
async function Dt(e, t) {
|
|
284
|
+
return (await j()).post(`/General/${e}/${t}/delete/attachment`);
|
|
284
285
|
}
|
|
285
|
-
async function
|
|
286
|
-
const t = await (await
|
|
287
|
-
return Object.entries(t?.data).map(([a,
|
|
286
|
+
async function Pt() {
|
|
287
|
+
const t = await (await j()).get("/Grading/dropdown/approvers");
|
|
288
|
+
return Object.entries(t?.data).map(([a, o]) => ({
|
|
288
289
|
label: a,
|
|
289
|
-
value:
|
|
290
|
+
value: o
|
|
290
291
|
}));
|
|
291
292
|
}
|
|
292
|
-
async function
|
|
293
|
-
return await (await
|
|
293
|
+
async function Mt(e, t) {
|
|
294
|
+
return await (await j()).post(`Grading/AssignComments/${e}/${encodeURIComponent(t)}`);
|
|
294
295
|
}
|
|
295
|
-
async function
|
|
296
|
-
return await (await
|
|
296
|
+
async function Bt(e, t, a) {
|
|
297
|
+
return await (await j()).post(`Grading/AddComments/${e}/${encodeURIComponent(t)}`, a, {
|
|
297
298
|
headers: { "Content-Type": "application/json;charset=UTF-8" }
|
|
298
299
|
});
|
|
299
300
|
}
|
|
300
|
-
async function
|
|
301
|
-
return (await (await
|
|
301
|
+
async function Oe(e) {
|
|
302
|
+
return (await (await j()).get(`Grading/GetComments/${e}`))?.data;
|
|
302
303
|
}
|
|
303
|
-
async function
|
|
304
|
-
return (await (await
|
|
304
|
+
async function Le(e) {
|
|
305
|
+
return (await (await j()).get(`Grading/GetAssociator/${e}`))?.data;
|
|
305
306
|
}
|
|
306
307
|
async function Ht(e) {
|
|
307
|
-
return await (await
|
|
308
|
+
return await (await j()).delete(`Grading/DeleteAssociator/${e}`);
|
|
309
|
+
}
|
|
310
|
+
async function Kt(e, t = null) {
|
|
311
|
+
const o = await (await j()).post(e, t);
|
|
312
|
+
_t(o?.data, "WorkflowData.xlsx");
|
|
308
313
|
}
|
|
309
|
-
const
|
|
314
|
+
const ge = (e, t) => {
|
|
310
315
|
let a = "";
|
|
311
|
-
return { res: e.every((
|
|
312
|
-
const c =
|
|
313
|
-
return c || (a =
|
|
316
|
+
return { res: e.every((n) => {
|
|
317
|
+
const c = zt(n, t);
|
|
318
|
+
return c || (a = n.errorMessage), c;
|
|
314
319
|
}), errorMessages: a };
|
|
315
|
-
},
|
|
316
|
-
const { ruleName: a, ruleParameter:
|
|
317
|
-
return
|
|
318
|
-
},
|
|
320
|
+
}, zt = (e, t) => {
|
|
321
|
+
const { ruleName: a, ruleParameter: o } = e;
|
|
322
|
+
return Et[a](o, t);
|
|
323
|
+
}, Et = {
|
|
319
324
|
Regex: (e, t) => new RegExp(e).test(t),
|
|
320
325
|
Required: (e, t) => !!t
|
|
321
|
-
},
|
|
326
|
+
}, Ge = /* @__PURE__ */ G({
|
|
322
327
|
__name: "InputText",
|
|
323
|
-
props: /* @__PURE__ */
|
|
328
|
+
props: /* @__PURE__ */ re({
|
|
324
329
|
fieldKey: {},
|
|
325
330
|
modelValue: {},
|
|
326
331
|
config: {},
|
|
@@ -331,36 +336,36 @@ const me = (e, t) => {
|
|
|
331
336
|
modelValue: {},
|
|
332
337
|
modelModifiers: {}
|
|
333
338
|
}),
|
|
334
|
-
emits: /* @__PURE__ */
|
|
339
|
+
emits: /* @__PURE__ */ re(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
335
340
|
setup(e, { expose: t, emit: a }) {
|
|
336
|
-
const
|
|
337
|
-
|
|
341
|
+
const o = e, n = a, c = we(e, "modelValue"), r = (i) => ge(o.validations, i), l = (i) => {
|
|
342
|
+
n("input", i);
|
|
338
343
|
}, s = (i) => {
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
d.event === "change" &&
|
|
344
|
+
const _ = r(i);
|
|
345
|
+
n("error", _.res ? "" : _.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((d) => {
|
|
346
|
+
d.event === "change" && n(d.event, d.handlerName, i);
|
|
342
347
|
});
|
|
343
348
|
};
|
|
344
349
|
return t({
|
|
345
350
|
validate() {
|
|
346
|
-
const i = r(
|
|
347
|
-
return
|
|
351
|
+
const i = r(o.modelValue);
|
|
352
|
+
return n("error", i.res ? "" : i.errorMessages), i.res;
|
|
348
353
|
}
|
|
349
|
-
}), (i,
|
|
350
|
-
const d =
|
|
351
|
-
return u(),
|
|
354
|
+
}), (i, _) => {
|
|
355
|
+
const d = S("AInput");
|
|
356
|
+
return u(), L(d, {
|
|
352
357
|
modelValue: c.value,
|
|
353
|
-
"onUpdate:modelValue":
|
|
358
|
+
"onUpdate:modelValue": _[0] || (_[0] = (w) => c.value = w),
|
|
354
359
|
"allow-clear": "",
|
|
355
|
-
disabled:
|
|
360
|
+
disabled: o.readonly || o.config.Readonly,
|
|
356
361
|
onInput: l,
|
|
357
362
|
onChange: s
|
|
358
363
|
}, null, 8, ["modelValue", "disabled"]);
|
|
359
364
|
};
|
|
360
365
|
}
|
|
361
|
-
}),
|
|
366
|
+
}), jt = /* @__PURE__ */ G({
|
|
362
367
|
__name: "InputNumber",
|
|
363
|
-
props: /* @__PURE__ */
|
|
368
|
+
props: /* @__PURE__ */ re({
|
|
364
369
|
fieldKey: {},
|
|
365
370
|
modelValue: {},
|
|
366
371
|
config: {},
|
|
@@ -371,42 +376,43 @@ const me = (e, t) => {
|
|
|
371
376
|
modelValue: {},
|
|
372
377
|
modelModifiers: {}
|
|
373
378
|
}),
|
|
374
|
-
emits: /* @__PURE__ */
|
|
379
|
+
emits: /* @__PURE__ */ re(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
375
380
|
setup(e, { expose: t, emit: a }) {
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
381
|
+
const o = e, n = a, c = we(e, "modelValue"), r = g(100), l = g(0);
|
|
382
|
+
de(() => {
|
|
383
|
+
o.validations && o.validations.forEach((d) => {
|
|
379
384
|
d.ruleName === "Max" && (r.value = d.ruleParameter), d.ruleName === "Min" && (l.value = d.ruleParameter);
|
|
380
385
|
});
|
|
381
386
|
});
|
|
382
|
-
const s = (d) =>
|
|
383
|
-
|
|
384
|
-
},
|
|
385
|
-
const
|
|
386
|
-
|
|
387
|
-
|
|
387
|
+
const s = (d) => ge(o.validations, d), i = (d) => {
|
|
388
|
+
n("input", d);
|
|
389
|
+
}, _ = (d) => {
|
|
390
|
+
const w = s(d);
|
|
391
|
+
n("error", w.res ? "" : w.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((x) => {
|
|
392
|
+
x.event === "change" && n(x.event, x.handlerName, d);
|
|
388
393
|
});
|
|
389
394
|
};
|
|
390
395
|
return t({
|
|
391
396
|
validate() {
|
|
392
|
-
const d = s(
|
|
393
|
-
return
|
|
397
|
+
const d = s(o.modelValue);
|
|
398
|
+
return n("error", d.res ? "" : d.errorMessages), d.res;
|
|
394
399
|
}
|
|
395
|
-
}), (d,
|
|
396
|
-
const
|
|
397
|
-
return u(),
|
|
400
|
+
}), (d, w) => {
|
|
401
|
+
const x = S("AInputNumber");
|
|
402
|
+
return u(), L(x, {
|
|
398
403
|
modelValue: c.value,
|
|
399
|
-
"onUpdate:modelValue":
|
|
404
|
+
"onUpdate:modelValue": w[0] || (w[0] = (m) => c.value = m),
|
|
400
405
|
clearable: "",
|
|
401
|
-
disabled:
|
|
406
|
+
disabled: o.readonly,
|
|
407
|
+
min: l.value,
|
|
402
408
|
onInput: i,
|
|
403
|
-
onChange:
|
|
404
|
-
}, null, 8, ["modelValue", "disabled"]);
|
|
409
|
+
onChange: _
|
|
410
|
+
}, null, 8, ["modelValue", "disabled", "min"]);
|
|
405
411
|
};
|
|
406
412
|
}
|
|
407
|
-
}),
|
|
413
|
+
}), We = /* @__PURE__ */ G({
|
|
408
414
|
__name: "SelectList",
|
|
409
|
-
props: /* @__PURE__ */
|
|
415
|
+
props: /* @__PURE__ */ re({
|
|
410
416
|
fieldKey: {},
|
|
411
417
|
modelValue: {},
|
|
412
418
|
config: {},
|
|
@@ -417,56 +423,57 @@ const me = (e, t) => {
|
|
|
417
423
|
modelValue: {},
|
|
418
424
|
modelModifiers: {}
|
|
419
425
|
}),
|
|
420
|
-
emits: /* @__PURE__ */
|
|
426
|
+
emits: /* @__PURE__ */ re(["update:modelValue", "change"], ["update:modelValue"]),
|
|
421
427
|
setup(e, { expose: t, emit: a }) {
|
|
422
|
-
const
|
|
423
|
-
|
|
428
|
+
const o = e, n = a, c = g(!1), r = g(o.config.options ?? []), l = we(e, "modelValue"), s = (d) => ge(o.validations, d);
|
|
429
|
+
X(() => {
|
|
424
430
|
const d = {};
|
|
425
|
-
return
|
|
426
|
-
d[
|
|
427
|
-
|
|
428
|
-
const
|
|
429
|
-
|
|
431
|
+
return o.triggers && o.triggers.length > 0 && o.triggers.forEach((w) => {
|
|
432
|
+
d[w.event] = (x) => {
|
|
433
|
+
n(w.event, w.handlerName, x);
|
|
434
|
+
const m = s(x);
|
|
435
|
+
n("error", m.res ? "" : m.errorMessages);
|
|
430
436
|
};
|
|
431
437
|
}), d;
|
|
432
|
-
}),
|
|
433
|
-
|
|
438
|
+
}), de(async () => {
|
|
439
|
+
o.config.dataSourceProvider && (r.value = await Lt(o.config.dataSourceProvider));
|
|
434
440
|
});
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
|
|
441
|
+
const _ = (d) => {
|
|
442
|
+
n("update:modelValue", d);
|
|
443
|
+
const w = s(d);
|
|
444
|
+
n("error", w.res ? "" : w.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((x) => {
|
|
445
|
+
x.event === "change" && n(x.event, x.handlerName, d);
|
|
440
446
|
});
|
|
441
447
|
};
|
|
442
448
|
return t({
|
|
443
449
|
validate() {
|
|
444
|
-
const d = s(
|
|
445
|
-
return
|
|
450
|
+
const d = s(o.modelValue);
|
|
451
|
+
return n("error", d.res ? "" : d.errorMessages), d.res;
|
|
446
452
|
}
|
|
447
|
-
}), (d,
|
|
448
|
-
const
|
|
449
|
-
return u(),
|
|
453
|
+
}), (d, w) => {
|
|
454
|
+
const x = S("AOption"), m = S("ASelect");
|
|
455
|
+
return u(), L(m, {
|
|
450
456
|
"allow-clear": "",
|
|
451
457
|
modelValue: l.value,
|
|
452
|
-
"onUpdate:modelValue":
|
|
458
|
+
"onUpdate:modelValue": w[0] || (w[0] = (k) => l.value = k),
|
|
453
459
|
loading: c.value,
|
|
454
460
|
"filter-option": !0,
|
|
455
461
|
"allow-search": !0,
|
|
456
|
-
|
|
462
|
+
disabled: d.config.readonly,
|
|
463
|
+
onChange: _
|
|
457
464
|
}, {
|
|
458
|
-
default:
|
|
459
|
-
(u(!0),
|
|
460
|
-
key:
|
|
461
|
-
value:
|
|
462
|
-
label:
|
|
465
|
+
default: p(() => [
|
|
466
|
+
(u(!0), V(K, null, E(r.value, (k) => (u(), L(x, {
|
|
467
|
+
key: k.value,
|
|
468
|
+
value: k.value,
|
|
469
|
+
label: k.label
|
|
463
470
|
}, null, 8, ["value", "label"]))), 128))
|
|
464
471
|
]),
|
|
465
472
|
_: 1
|
|
466
|
-
}, 8, ["modelValue", "loading"]);
|
|
473
|
+
}, 8, ["modelValue", "loading", "disabled"]);
|
|
467
474
|
};
|
|
468
475
|
}
|
|
469
|
-
}),
|
|
476
|
+
}), Ot = /* @__PURE__ */ G({
|
|
470
477
|
__name: "Cascader",
|
|
471
478
|
props: {
|
|
472
479
|
modelValue: {},
|
|
@@ -474,15 +481,15 @@ const me = (e, t) => {
|
|
|
474
481
|
},
|
|
475
482
|
emits: ["update:modelValue", "change"],
|
|
476
483
|
setup(e, { expose: t, emit: a }) {
|
|
477
|
-
const
|
|
478
|
-
|
|
484
|
+
const o = e, n = a, c = g(o.config.options ?? []), r = (s) => {
|
|
485
|
+
n("update:modelValue", s), n("change", s);
|
|
479
486
|
};
|
|
480
|
-
|
|
481
|
-
if (
|
|
482
|
-
const s =
|
|
487
|
+
de(async () => {
|
|
488
|
+
if (o.config) {
|
|
489
|
+
const s = o.config.dataSourceProvider;
|
|
483
490
|
if (s) {
|
|
484
|
-
const
|
|
485
|
-
c.value =
|
|
491
|
+
const _ = await (await j()).get(s);
|
|
492
|
+
c.value = _.data;
|
|
486
493
|
}
|
|
487
494
|
}
|
|
488
495
|
});
|
|
@@ -492,13 +499,13 @@ const me = (e, t) => {
|
|
|
492
499
|
return !0;
|
|
493
500
|
}
|
|
494
501
|
}), (s, i) => {
|
|
495
|
-
const
|
|
496
|
-
return u(),
|
|
502
|
+
const _ = S("ACascader"), d = S("ASpace");
|
|
503
|
+
return u(), L(d, {
|
|
497
504
|
direction: "vertical",
|
|
498
505
|
size: "large"
|
|
499
506
|
}, {
|
|
500
|
-
default:
|
|
501
|
-
|
|
507
|
+
default: p(() => [
|
|
508
|
+
F(_, {
|
|
502
509
|
"field-names": l,
|
|
503
510
|
"model-value": s.modelValue,
|
|
504
511
|
options: c.value,
|
|
@@ -511,7 +518,7 @@ const me = (e, t) => {
|
|
|
511
518
|
});
|
|
512
519
|
};
|
|
513
520
|
}
|
|
514
|
-
}),
|
|
521
|
+
}), Gt = /* @__PURE__ */ G({
|
|
515
522
|
__name: "FileUpload",
|
|
516
523
|
props: {
|
|
517
524
|
className: {},
|
|
@@ -524,67 +531,67 @@ const me = (e, t) => {
|
|
|
524
531
|
},
|
|
525
532
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
526
533
|
setup(e, { expose: t, emit: a }) {
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
const
|
|
534
|
+
const o = e, n = a, c = g({});
|
|
535
|
+
de(async () => {
|
|
536
|
+
const m = await Je();
|
|
530
537
|
c.value = {
|
|
531
|
-
Authorization: `Bearer ${
|
|
538
|
+
Authorization: `Bearer ${m}`
|
|
532
539
|
};
|
|
533
540
|
});
|
|
534
|
-
const r = (
|
|
535
|
-
function d(
|
|
536
|
-
return
|
|
541
|
+
const r = (m) => ge(o.validations, m), s = Be().apiBase, i = g(null), _ = g("");
|
|
542
|
+
function d(m, k, z) {
|
|
543
|
+
return m.replace(/{WorkflowId}/g, k).replace(/{ClassName}/g, z);
|
|
537
544
|
}
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
540
|
-
const
|
|
541
|
-
return d(
|
|
545
|
+
const w = X(() => {
|
|
546
|
+
if (o.config.uploadURL) {
|
|
547
|
+
const m = s + o.config.uploadURL;
|
|
548
|
+
return d(m, _.value, o.className);
|
|
542
549
|
}
|
|
543
550
|
return "";
|
|
544
551
|
});
|
|
545
|
-
function
|
|
546
|
-
const { file:
|
|
547
|
-
return new Promise((
|
|
548
|
-
|
|
552
|
+
function x(m) {
|
|
553
|
+
const { file: k, name: z } = m, ee = z ?? k.name;
|
|
554
|
+
return new Promise((oe, ne) => {
|
|
555
|
+
ft.confirm({
|
|
549
556
|
title: "Confirm Delete",
|
|
550
|
-
content: `Are you sure you want to delete ${
|
|
557
|
+
content: `Are you sure you want to delete ${ee}?`,
|
|
551
558
|
async onOk() {
|
|
552
|
-
if (
|
|
553
|
-
return await
|
|
554
|
-
|
|
559
|
+
if (m.status !== "init" && o.config.removeFile)
|
|
560
|
+
return await o.config.removeFile(m.uid), oe(!0);
|
|
561
|
+
oe(!0);
|
|
555
562
|
},
|
|
556
|
-
onCancel: () =>
|
|
563
|
+
onCancel: () => ne("cancel")
|
|
557
564
|
});
|
|
558
565
|
});
|
|
559
566
|
}
|
|
560
567
|
return t({
|
|
561
|
-
submit(
|
|
562
|
-
i.value && (
|
|
568
|
+
submit(m) {
|
|
569
|
+
i.value && (o.config.uploadURL && (_.value = m), rt(() => {
|
|
563
570
|
i.value.submit();
|
|
564
571
|
}));
|
|
565
572
|
},
|
|
566
573
|
validate() {
|
|
567
|
-
const
|
|
568
|
-
return
|
|
574
|
+
const m = r(o.modelValue);
|
|
575
|
+
return n("error", m.res ? "" : m.errorMessages), m.res;
|
|
569
576
|
}
|
|
570
|
-
}), (
|
|
571
|
-
const
|
|
572
|
-
return u(),
|
|
577
|
+
}), (m, k) => {
|
|
578
|
+
const z = S("a-button"), ee = S("a-upload");
|
|
579
|
+
return u(), L(ee, {
|
|
573
580
|
ref_key: "uploadRef",
|
|
574
581
|
ref: i,
|
|
575
|
-
"default-file-list":
|
|
576
|
-
action:
|
|
577
|
-
limit:
|
|
582
|
+
"default-file-list": o.config.files,
|
|
583
|
+
action: w.value,
|
|
584
|
+
limit: o.config.allowedNumber,
|
|
578
585
|
"auto-upload": !1,
|
|
579
586
|
name: "files",
|
|
580
587
|
headers: c.value,
|
|
581
|
-
onBeforeRemove:
|
|
588
|
+
onBeforeRemove: x
|
|
582
589
|
}, {
|
|
583
|
-
"start-icon":
|
|
584
|
-
"upload-button":
|
|
585
|
-
|
|
586
|
-
default:
|
|
587
|
-
|
|
590
|
+
"start-icon": p(() => k[0] || (k[0] = [])),
|
|
591
|
+
"upload-button": p(() => [
|
|
592
|
+
F(z, { type: "primary" }, {
|
|
593
|
+
default: p(() => k[1] || (k[1] = [
|
|
594
|
+
q("Select File", -1)
|
|
588
595
|
])),
|
|
589
596
|
_: 1,
|
|
590
597
|
__: [1]
|
|
@@ -594,7 +601,7 @@ const me = (e, t) => {
|
|
|
594
601
|
}, 8, ["default-file-list", "action", "limit", "headers"]);
|
|
595
602
|
};
|
|
596
603
|
}
|
|
597
|
-
}),
|
|
604
|
+
}), Wt = /* @__PURE__ */ G({
|
|
598
605
|
__name: "TextArea",
|
|
599
606
|
props: {
|
|
600
607
|
fieldKey: {},
|
|
@@ -606,35 +613,35 @@ const me = (e, t) => {
|
|
|
606
613
|
},
|
|
607
614
|
emits: ["update:modelValue", "change", "error", "input"],
|
|
608
615
|
setup(e, { expose: t, emit: a }) {
|
|
609
|
-
const
|
|
610
|
-
|
|
616
|
+
const o = e, n = a, c = (s) => ge(o.validations, s), r = (s) => {
|
|
617
|
+
n("update:modelValue", s), n("input", s);
|
|
611
618
|
}, l = (s) => {
|
|
612
|
-
|
|
619
|
+
n("update:modelValue", s);
|
|
613
620
|
const i = c(s);
|
|
614
|
-
|
|
615
|
-
|
|
621
|
+
n("error", i.res ? "" : i.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((_) => {
|
|
622
|
+
_.event === "change" && n(_.event, _.handlerName, s);
|
|
616
623
|
});
|
|
617
624
|
};
|
|
618
625
|
return t({
|
|
619
626
|
validate() {
|
|
620
|
-
const s = c(
|
|
621
|
-
return
|
|
627
|
+
const s = c(o.modelValue);
|
|
628
|
+
return n("error", s.res ? "" : s.errorMessages), s.res;
|
|
622
629
|
}
|
|
623
630
|
}), (s, i) => {
|
|
624
|
-
const
|
|
625
|
-
return u(),
|
|
626
|
-
"model-value":
|
|
631
|
+
const _ = S("ATextarea");
|
|
632
|
+
return u(), L(_, {
|
|
633
|
+
"model-value": o.modelValue,
|
|
627
634
|
placeholder: "Please enter something",
|
|
628
635
|
"allow-clear": "",
|
|
629
|
-
disabled:
|
|
636
|
+
disabled: o.readonly,
|
|
630
637
|
onInput: r,
|
|
631
638
|
onChange: l
|
|
632
639
|
}, null, 8, ["model-value", "disabled"]);
|
|
633
640
|
};
|
|
634
641
|
}
|
|
635
|
-
}),
|
|
642
|
+
}), qt = /* @__PURE__ */ G({
|
|
636
643
|
__name: "CheckBox",
|
|
637
|
-
props: /* @__PURE__ */
|
|
644
|
+
props: /* @__PURE__ */ re({
|
|
638
645
|
fieldKey: {},
|
|
639
646
|
modelValue: {},
|
|
640
647
|
config: {},
|
|
@@ -645,45 +652,45 @@ const me = (e, t) => {
|
|
|
645
652
|
modelValue: {},
|
|
646
653
|
modelModifiers: {}
|
|
647
654
|
}),
|
|
648
|
-
emits: /* @__PURE__ */
|
|
655
|
+
emits: /* @__PURE__ */ re(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
|
|
649
656
|
setup(e, { expose: t, emit: a }) {
|
|
650
|
-
const
|
|
657
|
+
const o = e, n = a, c = we(e, "modelValue"), r = (s) => ge(o.validations, s), l = (s) => {
|
|
651
658
|
const i = r(s);
|
|
652
|
-
|
|
653
|
-
|
|
659
|
+
n("error", i.res ? "" : i.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((_) => {
|
|
660
|
+
_.event === "change" && n(_.event, _.handlerName, s);
|
|
654
661
|
});
|
|
655
662
|
};
|
|
656
663
|
return t({
|
|
657
664
|
validate() {
|
|
658
|
-
const s = r(
|
|
659
|
-
return
|
|
665
|
+
const s = r(o.modelValue);
|
|
666
|
+
return n("error", s.res ? "" : s.errorMessages), s.res;
|
|
660
667
|
}
|
|
661
668
|
}), (s, i) => {
|
|
662
|
-
const
|
|
663
|
-
return u(),
|
|
669
|
+
const _ = S("ACheckbox");
|
|
670
|
+
return u(), L(_, {
|
|
664
671
|
modelValue: c.value,
|
|
665
672
|
"onUpdate:modelValue": i[0] || (i[0] = (d) => c.value = d),
|
|
666
673
|
clearable: "",
|
|
667
|
-
disabled:
|
|
674
|
+
disabled: o.readonly || o.config.Readonly,
|
|
668
675
|
onChange: l
|
|
669
676
|
}, {
|
|
670
|
-
default:
|
|
671
|
-
|
|
677
|
+
default: p(() => i[1] || (i[1] = [
|
|
678
|
+
q("Yes", -1)
|
|
672
679
|
])),
|
|
673
680
|
_: 1,
|
|
674
681
|
__: [1]
|
|
675
682
|
}, 8, ["modelValue", "disabled"]);
|
|
676
683
|
};
|
|
677
684
|
}
|
|
678
|
-
}),
|
|
685
|
+
}), Yt = { class: "title" }, Jt = {
|
|
679
686
|
key: 0,
|
|
680
687
|
class: "required"
|
|
681
|
-
},
|
|
688
|
+
}, Xt = {
|
|
682
689
|
key: 0,
|
|
683
690
|
class: "err-msg"
|
|
684
|
-
},
|
|
691
|
+
}, Qt = /* @__PURE__ */ G({
|
|
685
692
|
__name: "index",
|
|
686
|
-
props: /* @__PURE__ */
|
|
693
|
+
props: /* @__PURE__ */ re({
|
|
687
694
|
config: {},
|
|
688
695
|
className: {},
|
|
689
696
|
fieldKey: {},
|
|
@@ -695,79 +702,79 @@ const me = (e, t) => {
|
|
|
695
702
|
modelValue: {},
|
|
696
703
|
modelModifiers: {}
|
|
697
704
|
}),
|
|
698
|
-
emits: /* @__PURE__ */
|
|
705
|
+
emits: /* @__PURE__ */ re(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
699
706
|
setup(e, { expose: t, emit: a }) {
|
|
700
|
-
const
|
|
701
|
-
switch (
|
|
707
|
+
const o = e, n = a, c = we(e, "modelValue"), r = De("widgetRef"), l = X(() => {
|
|
708
|
+
switch (o.config?.widget?.widget) {
|
|
702
709
|
case "TextBox":
|
|
703
|
-
return
|
|
710
|
+
return Ge;
|
|
704
711
|
case "Number":
|
|
705
|
-
return
|
|
712
|
+
return jt;
|
|
706
713
|
case "SelectList":
|
|
707
|
-
return
|
|
714
|
+
return We;
|
|
708
715
|
case "Cascade":
|
|
709
|
-
return
|
|
716
|
+
return Ot;
|
|
710
717
|
case "File":
|
|
711
|
-
return
|
|
718
|
+
return Gt;
|
|
712
719
|
case "TextArea":
|
|
713
|
-
return
|
|
720
|
+
return Wt;
|
|
714
721
|
case "DropDown":
|
|
715
|
-
return
|
|
722
|
+
return We;
|
|
716
723
|
case "CheckBox":
|
|
717
|
-
return
|
|
724
|
+
return qt;
|
|
718
725
|
default:
|
|
719
|
-
return
|
|
726
|
+
return Ge;
|
|
720
727
|
}
|
|
721
|
-
}), s =
|
|
722
|
-
s.value =
|
|
723
|
-
},
|
|
724
|
-
|
|
728
|
+
}), s = g(""), i = (w) => {
|
|
729
|
+
s.value = w;
|
|
730
|
+
}, _ = (w, x) => {
|
|
731
|
+
n("change", w, x);
|
|
725
732
|
};
|
|
726
733
|
function d() {
|
|
727
|
-
return
|
|
734
|
+
return o.config?.widget?.widget === "File";
|
|
728
735
|
}
|
|
729
736
|
return t({
|
|
730
737
|
isFileUpload() {
|
|
731
|
-
return
|
|
738
|
+
return o.config?.widget?.widget === "File";
|
|
732
739
|
},
|
|
733
|
-
submit(
|
|
734
|
-
d() && r.value.submit(
|
|
740
|
+
submit(w) {
|
|
741
|
+
d() && r.value.submit(w);
|
|
735
742
|
},
|
|
736
743
|
validate() {
|
|
737
744
|
return r.value?.validate();
|
|
738
745
|
},
|
|
739
746
|
getCompName() {
|
|
740
|
-
return
|
|
747
|
+
return o?.config?.widget?.title;
|
|
741
748
|
}
|
|
742
|
-
}), (
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
749
|
+
}), (w, x) => (u(), V("div", null, [
|
|
750
|
+
I("div", Yt, [
|
|
751
|
+
q(J(o?.config?.widget?.title) + " ", 1),
|
|
752
|
+
o.config.validations.length ? (u(), V("span", Jt, "*")) : se("", !0)
|
|
746
753
|
]),
|
|
747
|
-
|
|
748
|
-
(u(),
|
|
754
|
+
I("div", null, [
|
|
755
|
+
(u(), L(Pe(l.value), {
|
|
749
756
|
ref_key: "widgetRef",
|
|
750
757
|
ref: r,
|
|
751
758
|
modelValue: c.value,
|
|
752
|
-
"onUpdate:modelValue":
|
|
753
|
-
"field-key":
|
|
754
|
-
config:
|
|
755
|
-
validations:
|
|
756
|
-
triggers:
|
|
757
|
-
"class-name":
|
|
759
|
+
"onUpdate:modelValue": x[0] || (x[0] = (m) => c.value = m),
|
|
760
|
+
"field-key": o.fieldKey,
|
|
761
|
+
config: o.config.widget,
|
|
762
|
+
validations: o.config.validations,
|
|
763
|
+
triggers: o.config.triggers,
|
|
764
|
+
"class-name": o.className,
|
|
758
765
|
onError: i,
|
|
759
|
-
onChange:
|
|
766
|
+
onChange: _
|
|
760
767
|
}, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
|
|
761
|
-
s.value.length > 0 ? (u(),
|
|
768
|
+
s.value.length > 0 ? (u(), V("div", Xt, J(s.value), 1)) : se("", !0)
|
|
762
769
|
])
|
|
763
770
|
]));
|
|
764
771
|
}
|
|
765
|
-
}),
|
|
772
|
+
}), ve = (e, t) => {
|
|
766
773
|
const a = e.__vccOpts || e;
|
|
767
|
-
for (const [
|
|
768
|
-
a[
|
|
774
|
+
for (const [o, n] of t)
|
|
775
|
+
a[o] = n;
|
|
769
776
|
return a;
|
|
770
|
-
},
|
|
777
|
+
}, Ke = /* @__PURE__ */ ve(Qt, [["__scopeId", "data-v-1022c8cb"]]), Zt = /* @__PURE__ */ G({
|
|
771
778
|
__name: "SubmitButton",
|
|
772
779
|
props: {
|
|
773
780
|
url: {},
|
|
@@ -776,25 +783,25 @@ const me = (e, t) => {
|
|
|
776
783
|
},
|
|
777
784
|
emits: ["click"],
|
|
778
785
|
setup(e, { emit: t }) {
|
|
779
|
-
const a = e,
|
|
780
|
-
function
|
|
781
|
-
|
|
786
|
+
const a = e, o = t;
|
|
787
|
+
function n() {
|
|
788
|
+
o("click", a.url, a.redirectType);
|
|
782
789
|
}
|
|
783
790
|
return (c, r) => {
|
|
784
|
-
const l =
|
|
785
|
-
return u(),
|
|
791
|
+
const l = S("AButton");
|
|
792
|
+
return u(), L(l, {
|
|
786
793
|
loading: c.loading,
|
|
787
794
|
type: "primary",
|
|
788
|
-
onClick:
|
|
795
|
+
onClick: n
|
|
789
796
|
}, {
|
|
790
|
-
default:
|
|
791
|
-
|
|
797
|
+
default: p(() => [
|
|
798
|
+
ue(c.$slots, "default")
|
|
792
799
|
]),
|
|
793
800
|
_: 3
|
|
794
801
|
}, 8, ["loading"]);
|
|
795
802
|
};
|
|
796
803
|
}
|
|
797
|
-
}),
|
|
804
|
+
}), eo = /* @__PURE__ */ G({
|
|
798
805
|
__name: "DetailLink",
|
|
799
806
|
props: {
|
|
800
807
|
url: {},
|
|
@@ -803,21 +810,21 @@ const me = (e, t) => {
|
|
|
803
810
|
},
|
|
804
811
|
emits: ["click"],
|
|
805
812
|
setup(e, { emit: t }) {
|
|
806
|
-
const a = e,
|
|
807
|
-
function
|
|
808
|
-
|
|
813
|
+
const a = e, o = t;
|
|
814
|
+
function n() {
|
|
815
|
+
o("click", a.url, a.redirectType);
|
|
809
816
|
}
|
|
810
817
|
return (c, r) => {
|
|
811
|
-
const l =
|
|
812
|
-
return u(),
|
|
813
|
-
default:
|
|
814
|
-
|
|
818
|
+
const l = S("ALink");
|
|
819
|
+
return u(), L(l, { onClick: n }, {
|
|
820
|
+
default: p(() => [
|
|
821
|
+
ue(c.$slots, "default")
|
|
815
822
|
]),
|
|
816
823
|
_: 3
|
|
817
824
|
});
|
|
818
825
|
};
|
|
819
826
|
}
|
|
820
|
-
}),
|
|
827
|
+
}), ye = /* @__PURE__ */ G({
|
|
821
828
|
__name: "index",
|
|
822
829
|
props: {
|
|
823
830
|
config: {},
|
|
@@ -825,49 +832,49 @@ const me = (e, t) => {
|
|
|
825
832
|
},
|
|
826
833
|
emits: ["click"],
|
|
827
834
|
setup(e, { emit: t }) {
|
|
828
|
-
const a = e,
|
|
829
|
-
function
|
|
830
|
-
|
|
835
|
+
const a = e, o = t;
|
|
836
|
+
function n(s, i) {
|
|
837
|
+
o("click", a.config.widget, s, i, a.config.title);
|
|
831
838
|
}
|
|
832
|
-
const c =
|
|
839
|
+
const c = X(() => {
|
|
833
840
|
switch (a.config.location) {
|
|
834
841
|
case "InOperation":
|
|
835
|
-
return
|
|
842
|
+
return Zt;
|
|
836
843
|
case "InTable":
|
|
837
844
|
default:
|
|
838
|
-
return
|
|
845
|
+
return eo;
|
|
839
846
|
}
|
|
840
|
-
}), r =
|
|
841
|
-
return (s, i) => (u(),
|
|
847
|
+
}), r = X(() => a.config.widget === Z.Submit ? a.config.requestUrl ?? "" : a.config.widget === Z.Link ? a.config.redirectUrl ?? "" : ""), l = X(() => a.config.redirectType ?? "Details");
|
|
848
|
+
return (s, i) => (u(), L(Pe(c.value), {
|
|
842
849
|
url: r.value,
|
|
843
850
|
"redirect-type": l.value,
|
|
844
851
|
loading: s.loading,
|
|
845
|
-
onClick:
|
|
852
|
+
onClick: n
|
|
846
853
|
}, {
|
|
847
|
-
default:
|
|
848
|
-
|
|
854
|
+
default: p(() => [
|
|
855
|
+
q(J(a.config.title), 1)
|
|
849
856
|
]),
|
|
850
857
|
_: 1
|
|
851
858
|
}, 8, ["url", "redirect-type", "loading"]));
|
|
852
859
|
}
|
|
853
|
-
}),
|
|
854
|
-
function
|
|
855
|
-
const e =
|
|
856
|
-
return e ||
|
|
860
|
+
}), et = Symbol("library-router");
|
|
861
|
+
function Ve() {
|
|
862
|
+
const e = me(et, null);
|
|
863
|
+
return e || pt();
|
|
857
864
|
}
|
|
858
|
-
const
|
|
859
|
-
function
|
|
860
|
-
const e =
|
|
865
|
+
const tt = Symbol("library-triggers");
|
|
866
|
+
function ze() {
|
|
867
|
+
const e = me(tt, null);
|
|
861
868
|
return e || {};
|
|
862
869
|
}
|
|
863
|
-
const
|
|
870
|
+
const to = Symbol("library-pinia"), ot = Symbol("library-bpmStore"), nt = Symbol("library-svrStore");
|
|
864
871
|
function Se() {
|
|
865
|
-
return
|
|
872
|
+
return me(ot, null);
|
|
866
873
|
}
|
|
867
|
-
function
|
|
868
|
-
return
|
|
874
|
+
function xe() {
|
|
875
|
+
return me(nt, null);
|
|
869
876
|
}
|
|
870
|
-
const
|
|
877
|
+
const oo = { class: "top-bar" }, no = { class: "banner-info" }, ao = { class: "page-title" }, so = { class: "page-subtitle" }, ro = { class: "avatar-wrapper" }, io = { class: "user-email" }, lo = /* @__PURE__ */ G({
|
|
871
878
|
__name: "TopBar",
|
|
872
879
|
props: {
|
|
873
880
|
title: {},
|
|
@@ -876,25 +883,25 @@ const en = { class: "top-bar" }, tn = { class: "banner-info" }, nn = { class: "p
|
|
|
876
883
|
},
|
|
877
884
|
setup(e) {
|
|
878
885
|
return (t, a) => {
|
|
879
|
-
const
|
|
880
|
-
return u(),
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
886
|
+
const o = S("a-avatar"), n = S("a-popover");
|
|
887
|
+
return u(), V("div", oo, [
|
|
888
|
+
I("div", no, [
|
|
889
|
+
I("div", ao, J(t.title), 1),
|
|
890
|
+
I("div", so, J(t.subTitle), 1)
|
|
884
891
|
]),
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
content:
|
|
888
|
-
|
|
892
|
+
I("div", ro, [
|
|
893
|
+
F(n, { trigger: "click" }, {
|
|
894
|
+
content: p(() => [
|
|
895
|
+
I("div", io, J(t.email), 1)
|
|
889
896
|
]),
|
|
890
|
-
default:
|
|
891
|
-
|
|
897
|
+
default: p(() => [
|
|
898
|
+
F(o, {
|
|
892
899
|
size: 48,
|
|
893
900
|
autoFixFontSize: "",
|
|
894
901
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
895
902
|
}, {
|
|
896
|
-
default:
|
|
897
|
-
|
|
903
|
+
default: p(() => [
|
|
904
|
+
q(J(t.email.charAt(0).toUpperCase()), 1)
|
|
898
905
|
]),
|
|
899
906
|
_: 1
|
|
900
907
|
})
|
|
@@ -905,28 +912,28 @@ const en = { class: "top-bar" }, tn = { class: "banner-info" }, nn = { class: "p
|
|
|
905
912
|
]);
|
|
906
913
|
};
|
|
907
914
|
}
|
|
908
|
-
}),
|
|
909
|
-
function
|
|
910
|
-
const t =
|
|
915
|
+
}), $e = /* @__PURE__ */ ve(lo, [["__scopeId", "data-v-c0457235"]]);
|
|
916
|
+
function Ee(e) {
|
|
917
|
+
const t = Be(), a = [];
|
|
911
918
|
if (t.fieldsGroup) {
|
|
912
919
|
t.fieldsGroup.forEach((c) => {
|
|
913
920
|
const r = c.keys.map((l) => e.find((s) => s.fieldKey === l)).filter(Boolean);
|
|
914
921
|
r.length && a.push({ name: c.name, fields: r });
|
|
915
922
|
});
|
|
916
|
-
const
|
|
917
|
-
return
|
|
923
|
+
const o = t.fieldsGroup.flatMap((c) => c.keys), n = e.filter((c) => !o.includes(c.fieldKey));
|
|
924
|
+
return n.length && a.push({ name: "未分组字段", fields: n }), console.log("🚀 ~ genFieldsGroup ~ groups:", a), a;
|
|
918
925
|
}
|
|
919
926
|
}
|
|
920
|
-
const
|
|
927
|
+
const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { class: "form-card" }, po = { class: "form-fields-vertical" }, mo = { class: "form-fields" }, go = {
|
|
921
928
|
key: 0,
|
|
922
929
|
class: "form-content"
|
|
923
|
-
},
|
|
930
|
+
}, vo = { class: "page-footer" }, _o = { class: "action-container" }, yo = { class: "action-buttons" }, wo = /* @__PURE__ */ G({
|
|
924
931
|
__name: "CreateView",
|
|
925
932
|
props: {
|
|
926
933
|
className: {}
|
|
927
934
|
},
|
|
928
935
|
setup(e) {
|
|
929
|
-
const t = Se(), a =
|
|
936
|
+
const t = Se(), a = xe(), o = Ve(), n = ze(), c = De("dataWidgets"), r = be(), l = e, s = g({
|
|
930
937
|
pageType: "",
|
|
931
938
|
fields: {},
|
|
932
939
|
globalValidations: [],
|
|
@@ -934,58 +941,58 @@ const ln = { class: "page-container" }, cn = { class: "page-body" }, un = { clas
|
|
|
934
941
|
title: "",
|
|
935
942
|
subTitle: ""
|
|
936
943
|
}
|
|
937
|
-
}), i =
|
|
938
|
-
function d(
|
|
939
|
-
return
|
|
940
|
-
fieldKey:
|
|
941
|
-
|
|
942
|
-
})).filter((
|
|
944
|
+
}), i = g([]), _ = g({});
|
|
945
|
+
function d(T) {
|
|
946
|
+
return T ? Object.entries(T).map(([v, $]) => ({
|
|
947
|
+
fieldKey: v,
|
|
948
|
+
...$
|
|
949
|
+
})).filter((v) => v.widget && v.widget.widget !== "Hidden").filter((v) => !ne.value.includes(v.fieldKey)) : [];
|
|
943
950
|
}
|
|
944
|
-
function
|
|
945
|
-
return
|
|
951
|
+
function w(T) {
|
|
952
|
+
return T ? Object.entries(T).filter(([v, $]) => $.dependent).reduce((v, [$, b]) => (v[$] = b.dependent, v), {}) : [];
|
|
946
953
|
}
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
-
|
|
954
|
+
const x = X(() => s.value?.actions ? [...s.value.actions].reverse() : []), m = Me({}), k = g(!1);
|
|
955
|
+
de(async () => {
|
|
956
|
+
k.value = !0, s.value = await Ce(pe.Create, l.className, {
|
|
950
957
|
svrStore: a,
|
|
951
958
|
bpmStore: t
|
|
952
|
-
}), i.value = d(s.value.fields),
|
|
953
|
-
for (const
|
|
954
|
-
if (s.value.fields[
|
|
955
|
-
const
|
|
956
|
-
|
|
959
|
+
}), i.value = d(s.value.fields), _.value = w(s.value.fields);
|
|
960
|
+
for (const T in s.value.fields) {
|
|
961
|
+
if (s.value.fields[T].widget?.widget === "File") {
|
|
962
|
+
const U = i.value.find((v) => v.fieldKey === T);
|
|
963
|
+
U && U.widget && (U.widget.files = []);
|
|
957
964
|
}
|
|
958
|
-
|
|
965
|
+
m[T] = s.value.fields[T].modelValue;
|
|
959
966
|
}
|
|
960
|
-
|
|
967
|
+
k.value = !1;
|
|
961
968
|
});
|
|
962
|
-
function
|
|
969
|
+
function z() {
|
|
963
970
|
return a()?.userInfo?.email_address ?? "";
|
|
964
971
|
}
|
|
965
|
-
async function
|
|
966
|
-
switch (
|
|
967
|
-
case
|
|
968
|
-
let
|
|
969
|
-
if (c.value?.forEach((
|
|
970
|
-
|
|
971
|
-
}), !
|
|
972
|
+
async function ee(T, U, v, $, b) {
|
|
973
|
+
switch (U) {
|
|
974
|
+
case Z.Submit:
|
|
975
|
+
let D = !0;
|
|
976
|
+
if (c.value?.forEach((ae) => {
|
|
977
|
+
ae?.validate && (ae.validate() || (D = !1));
|
|
978
|
+
}), !D) {
|
|
972
979
|
r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
973
980
|
return;
|
|
974
981
|
}
|
|
975
|
-
|
|
976
|
-
const
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
}), r?.appContext.config.globalProperties.$notification.success("create success!"),
|
|
982
|
+
k.value = !0;
|
|
983
|
+
const te = await St(l.className, { ...m, ..._.value }, v);
|
|
984
|
+
k.value = !1, c.value?.forEach((ae) => {
|
|
985
|
+
ae?.submit && ae.submit(te.toString());
|
|
986
|
+
}), console.log("🚀 ~ clickHandler ~ res.toString():", te.toString()), r?.appContext.config.globalProperties.$notification.success("create success!"), o.push({ name: "Details", params: { workflowId: te.toString() } });
|
|
980
987
|
break;
|
|
981
|
-
case
|
|
982
|
-
|
|
988
|
+
case Z.Link:
|
|
989
|
+
$ === "List" && o.push({ name: "List", params: { className: l.className } });
|
|
983
990
|
break;
|
|
984
991
|
default:
|
|
985
|
-
console.warn("Unknown action type:",
|
|
992
|
+
console.warn("Unknown action type:", U);
|
|
986
993
|
}
|
|
987
994
|
}
|
|
988
|
-
const
|
|
995
|
+
const ne = g([
|
|
989
996
|
"jobScpope",
|
|
990
997
|
"currentWorkdayId",
|
|
991
998
|
"originalGrade",
|
|
@@ -993,68 +1000,68 @@ const ln = { class: "page-container" }, cn = { class: "page-body" }, un = { clas
|
|
|
993
1000
|
"jobAttachmentPrevious",
|
|
994
1001
|
"positionId"
|
|
995
1002
|
]);
|
|
996
|
-
function
|
|
997
|
-
|
|
1003
|
+
function le(T, U) {
|
|
1004
|
+
n[T]?.(U, ne), s.value && (i.value = d(s.value.fields));
|
|
998
1005
|
}
|
|
999
|
-
const
|
|
1000
|
-
return (
|
|
1001
|
-
const
|
|
1002
|
-
return u(),
|
|
1003
|
-
|
|
1006
|
+
const B = X(() => Ee(i.value));
|
|
1007
|
+
return (T, U) => {
|
|
1008
|
+
const v = S("a-card"), $ = S("a-spin");
|
|
1009
|
+
return u(), V("div", co, [
|
|
1010
|
+
F($e, {
|
|
1004
1011
|
title: s.value.banner.title,
|
|
1005
1012
|
subTitle: s.value.banner.subTitle,
|
|
1006
|
-
email:
|
|
1013
|
+
email: z()
|
|
1007
1014
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
loading:
|
|
1015
|
+
I("div", uo, [
|
|
1016
|
+
F($, {
|
|
1017
|
+
loading: k.value,
|
|
1011
1018
|
class: "form-container"
|
|
1012
1019
|
}, {
|
|
1013
|
-
default:
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
(u(!0),
|
|
1017
|
-
key:
|
|
1018
|
-
title:
|
|
1020
|
+
default: p(() => [
|
|
1021
|
+
I("div", fo, [
|
|
1022
|
+
I("div", po, [
|
|
1023
|
+
(u(!0), V(K, null, E(B.value, (b) => (u(), L(v, {
|
|
1024
|
+
key: b.name,
|
|
1025
|
+
title: b.name,
|
|
1019
1026
|
style: { "margin-bottom": "24px" }
|
|
1020
1027
|
}, {
|
|
1021
|
-
default:
|
|
1022
|
-
|
|
1023
|
-
(u(!0),
|
|
1024
|
-
key:
|
|
1028
|
+
default: p(() => [
|
|
1029
|
+
I("div", mo, [
|
|
1030
|
+
(u(!0), V(K, null, E(b.fields, (D) => (u(), L(Ke, {
|
|
1031
|
+
key: D.fieldKey,
|
|
1025
1032
|
ref_for: !0,
|
|
1026
1033
|
ref: "dataWidgets",
|
|
1027
|
-
"field-key":
|
|
1028
|
-
config:
|
|
1029
|
-
"class-name":
|
|
1030
|
-
modelValue:
|
|
1031
|
-
"onUpdate:modelValue": (
|
|
1034
|
+
"field-key": D.fieldKey,
|
|
1035
|
+
config: D,
|
|
1036
|
+
"class-name": T.className,
|
|
1037
|
+
modelValue: m[D.fieldKey],
|
|
1038
|
+
"onUpdate:modelValue": (te) => m[D.fieldKey] = te,
|
|
1032
1039
|
class: "form-field",
|
|
1033
|
-
onChange:
|
|
1040
|
+
onChange: le
|
|
1034
1041
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
1035
1042
|
])
|
|
1036
1043
|
]),
|
|
1037
1044
|
_: 2
|
|
1038
1045
|
}, 1032, ["title"]))), 128))
|
|
1039
1046
|
]),
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
])) :
|
|
1047
|
+
T.$slots.content ? (u(), V("div", go, [
|
|
1048
|
+
ue(T.$slots, "content", {}, void 0, !0)
|
|
1049
|
+
])) : se("", !0)
|
|
1043
1050
|
])
|
|
1044
1051
|
]),
|
|
1045
1052
|
_: 3
|
|
1046
1053
|
}, 8, ["loading"])
|
|
1047
1054
|
]),
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
(u(!0),
|
|
1053
|
-
key:
|
|
1054
|
-
loading:
|
|
1055
|
-
config:
|
|
1055
|
+
I("div", vo, [
|
|
1056
|
+
I("div", _o, [
|
|
1057
|
+
ue(T.$slots, "action", {}, void 0, !0),
|
|
1058
|
+
I("div", yo, [
|
|
1059
|
+
(u(!0), V(K, null, E(x.value, (b) => (u(), L(ye, {
|
|
1060
|
+
key: b.Title,
|
|
1061
|
+
loading: k.value,
|
|
1062
|
+
config: b,
|
|
1056
1063
|
class: "action-button",
|
|
1057
|
-
onClick: (...
|
|
1064
|
+
onClick: (...D) => ee(b, ...D)
|
|
1058
1065
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1059
1066
|
])
|
|
1060
1067
|
])
|
|
@@ -1062,17 +1069,17 @@ const ln = { class: "page-container" }, cn = { class: "page-body" }, un = { clas
|
|
|
1062
1069
|
]);
|
|
1063
1070
|
};
|
|
1064
1071
|
}
|
|
1065
|
-
}),
|
|
1072
|
+
}), bo = /* @__PURE__ */ ve(wo, [["__scopeId", "data-v-cc26a7e0"]]), ho = { class: "page-container" }, ko = { class: "page-body" }, Co = { class: "form-card" }, Vo = { class: "form-fields-vertical" }, So = { class: "form-fields" }, xo = {
|
|
1066
1073
|
key: 0,
|
|
1067
1074
|
class: "form-content"
|
|
1068
|
-
},
|
|
1075
|
+
}, $o = { class: "page-footer" }, Ao = { class: "action-container" }, Io = { class: "action-buttons" }, To = /* @__PURE__ */ G({
|
|
1069
1076
|
__name: "UpdateView",
|
|
1070
1077
|
props: {
|
|
1071
1078
|
className: {},
|
|
1072
1079
|
workflowId: {}
|
|
1073
1080
|
},
|
|
1074
1081
|
setup(e) {
|
|
1075
|
-
const t =
|
|
1082
|
+
const t = Ve(), a = ze(), o = xe(), n = Se(), c = De("dataWidgets"), r = be(), l = e, s = g({
|
|
1076
1083
|
pageType: "",
|
|
1077
1084
|
fields: {},
|
|
1078
1085
|
globalValidations: [],
|
|
@@ -1080,132 +1087,127 @@ const ln = { class: "page-container" }, cn = { class: "page-body" }, un = { clas
|
|
|
1080
1087
|
title: "",
|
|
1081
1088
|
subTitle: ""
|
|
1082
1089
|
}
|
|
1083
|
-
}), i =
|
|
1084
|
-
function d(
|
|
1085
|
-
return
|
|
1086
|
-
fieldKey:
|
|
1087
|
-
...
|
|
1088
|
-
})).filter((
|
|
1090
|
+
}), i = g([]), _ = g({});
|
|
1091
|
+
function d(B) {
|
|
1092
|
+
return B ? Object.entries(B).map(([U, v]) => ({
|
|
1093
|
+
fieldKey: U,
|
|
1094
|
+
...v
|
|
1095
|
+
})).filter((U) => U.widget && U.widget.widget !== "Hidden").filter((U) => !oe.value.includes(U.fieldKey)) : [];
|
|
1089
1096
|
}
|
|
1090
|
-
function
|
|
1091
|
-
return
|
|
1097
|
+
function w(B) {
|
|
1098
|
+
return B ? Object.entries(B).filter(([U, v]) => v.dependent).reduce((U, [v, $]) => (U[v] = $.dependent, U), {}) : [];
|
|
1092
1099
|
}
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
svrStore:
|
|
1097
|
-
bpmStore:
|
|
1100
|
+
const x = X(() => s.value?.actions ? [...s.value.actions].reverse() : []), m = Me({}), k = g(!1);
|
|
1101
|
+
de(async () => {
|
|
1102
|
+
k.value = !0, s.value = await Ce(pe.Update, l.className, {
|
|
1103
|
+
svrStore: o,
|
|
1104
|
+
bpmStore: n
|
|
1098
1105
|
}, {
|
|
1099
1106
|
workflowId: l.workflowId
|
|
1100
1107
|
});
|
|
1101
|
-
const
|
|
1102
|
-
s.value.actions = s.value.actions?.filter((
|
|
1103
|
-
const
|
|
1104
|
-
return
|
|
1105
|
-
})
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1108
|
+
const B = await Qe(pe.Update, l.className, { workflowId: l.workflowId, email: z() }), T = await Ze(l.className, l.workflowId);
|
|
1109
|
+
s.value.actions = s.value.actions?.filter((v) => {
|
|
1110
|
+
const $ = B.find((b) => b.button === v.title);
|
|
1111
|
+
return $ ? $.isShow : !0;
|
|
1112
|
+
});
|
|
1113
|
+
const U = s.value.fields.requestType.modelValue;
|
|
1114
|
+
a.Test?.(U, oe), i.value = d(s.value.fields), _.value = w(s.value.fields);
|
|
1115
|
+
for (const v in s.value.fields) {
|
|
1116
|
+
if (s.value.fields[v].widget?.widget === "File") {
|
|
1117
|
+
const $ = i.value.find((b) => b.fieldKey === v);
|
|
1118
|
+
$ && $.widget && ($.widget.files = T[v] ?? [], $.widget.removeFile = (b) => Dt(l.className, b));
|
|
1110
1119
|
}
|
|
1111
|
-
v
|
|
1120
|
+
m[v] = s.value.fields[v].modelValue;
|
|
1112
1121
|
}
|
|
1113
|
-
|
|
1122
|
+
k.value = !1;
|
|
1114
1123
|
});
|
|
1115
|
-
function
|
|
1116
|
-
return
|
|
1124
|
+
function z() {
|
|
1125
|
+
return o()?.userInfo?.email_address ?? "";
|
|
1117
1126
|
}
|
|
1118
|
-
async function
|
|
1119
|
-
switch (
|
|
1120
|
-
case
|
|
1121
|
-
let
|
|
1122
|
-
if (c.value?.forEach((
|
|
1123
|
-
|
|
1124
|
-
}), !
|
|
1127
|
+
async function ee(B, T, U, v, $) {
|
|
1128
|
+
switch (T) {
|
|
1129
|
+
case Z.Submit:
|
|
1130
|
+
let b = !0;
|
|
1131
|
+
if (c.value?.forEach((D) => {
|
|
1132
|
+
D?.validate && (D.validate() || (b = !1));
|
|
1133
|
+
}), !b) {
|
|
1125
1134
|
r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1126
1135
|
return;
|
|
1127
1136
|
}
|
|
1128
|
-
|
|
1129
|
-
|
|
1137
|
+
k.value = !0, await xt(l.className, l.workflowId, { ...m, ..._.value }, U), k.value = !1, c.value?.forEach((D) => {
|
|
1138
|
+
D?.submit && D.submit(l.workflowId);
|
|
1130
1139
|
}), r?.appContext.config.globalProperties.$notification.success("update success!");
|
|
1131
1140
|
break;
|
|
1132
|
-
case
|
|
1133
|
-
t.push({ name:
|
|
1141
|
+
case Z.Link:
|
|
1142
|
+
t.push({ name: v, params: { className: l.className } });
|
|
1134
1143
|
break;
|
|
1135
1144
|
default:
|
|
1136
|
-
console.warn("Unknown action type:",
|
|
1145
|
+
console.warn("Unknown action type:", T);
|
|
1137
1146
|
}
|
|
1138
1147
|
}
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
"originalGrade",
|
|
1143
|
-
"jobTitlePrevious",
|
|
1144
|
-
"jobAttachmentPrevious",
|
|
1145
|
-
"positionId"
|
|
1146
|
-
]);
|
|
1147
|
-
function re(w, F) {
|
|
1148
|
-
a[w]?.(F, ee), s.value && (i.value = d(s.value.fields));
|
|
1148
|
+
const oe = g([]);
|
|
1149
|
+
function ne(B, T) {
|
|
1150
|
+
a[B]?.(T, oe), s.value && (i.value = d(s.value.fields));
|
|
1149
1151
|
}
|
|
1150
|
-
const
|
|
1151
|
-
return (
|
|
1152
|
-
const
|
|
1153
|
-
return u(),
|
|
1154
|
-
|
|
1152
|
+
const le = X(() => Ee(i.value));
|
|
1153
|
+
return (B, T) => {
|
|
1154
|
+
const U = S("a-card"), v = S("a-spin");
|
|
1155
|
+
return u(), V("div", ho, [
|
|
1156
|
+
F($e, {
|
|
1155
1157
|
title: s.value.banner.title,
|
|
1156
1158
|
subTitle: s.value.banner.subTitle,
|
|
1157
|
-
email:
|
|
1159
|
+
email: z()
|
|
1158
1160
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
loading:
|
|
1161
|
+
I("div", ko, [
|
|
1162
|
+
F(v, {
|
|
1163
|
+
loading: k.value,
|
|
1162
1164
|
class: "form-container"
|
|
1163
1165
|
}, {
|
|
1164
|
-
default:
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
(u(!0),
|
|
1168
|
-
key:
|
|
1169
|
-
title:
|
|
1166
|
+
default: p(() => [
|
|
1167
|
+
I("div", Co, [
|
|
1168
|
+
I("div", Vo, [
|
|
1169
|
+
(u(!0), V(K, null, E(le.value, ($) => (u(), L(U, {
|
|
1170
|
+
key: $.name,
|
|
1171
|
+
title: $.name,
|
|
1170
1172
|
style: { "margin-bottom": "24px" }
|
|
1171
1173
|
}, {
|
|
1172
|
-
default:
|
|
1173
|
-
|
|
1174
|
-
(u(!0),
|
|
1175
|
-
key:
|
|
1174
|
+
default: p(() => [
|
|
1175
|
+
I("div", So, [
|
|
1176
|
+
(u(!0), V(K, null, E($.fields, (b) => (u(), L(Ke, {
|
|
1177
|
+
key: b.fieldKey,
|
|
1176
1178
|
ref_for: !0,
|
|
1177
1179
|
ref: "dataWidgets",
|
|
1178
|
-
"field-key":
|
|
1179
|
-
config:
|
|
1180
|
-
"class-name":
|
|
1181
|
-
modelValue:
|
|
1182
|
-
"onUpdate:modelValue": (
|
|
1180
|
+
"field-key": b.fieldKey,
|
|
1181
|
+
config: b,
|
|
1182
|
+
"class-name": B.className,
|
|
1183
|
+
modelValue: m[b.fieldKey],
|
|
1184
|
+
"onUpdate:modelValue": (D) => m[b.fieldKey] = D,
|
|
1183
1185
|
class: "form-field",
|
|
1184
|
-
onChange:
|
|
1186
|
+
onChange: ne
|
|
1185
1187
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
1186
1188
|
])
|
|
1187
1189
|
]),
|
|
1188
1190
|
_: 2
|
|
1189
1191
|
}, 1032, ["title"]))), 128))
|
|
1190
1192
|
]),
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
])) :
|
|
1193
|
+
B.$slots.content ? (u(), V("div", xo, [
|
|
1194
|
+
ue(B.$slots, "content", {}, void 0, !0)
|
|
1195
|
+
])) : se("", !0)
|
|
1194
1196
|
])
|
|
1195
1197
|
]),
|
|
1196
1198
|
_: 3
|
|
1197
1199
|
}, 8, ["loading"])
|
|
1198
1200
|
]),
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
(u(!0),
|
|
1204
|
-
key:
|
|
1205
|
-
loading:
|
|
1206
|
-
config:
|
|
1201
|
+
I("div", $o, [
|
|
1202
|
+
I("div", Ao, [
|
|
1203
|
+
ue(B.$slots, "action", {}, void 0, !0),
|
|
1204
|
+
I("div", Io, [
|
|
1205
|
+
(u(!0), V(K, null, E(x.value, ($) => (u(), L(ye, {
|
|
1206
|
+
key: $.Title,
|
|
1207
|
+
loading: k.value,
|
|
1208
|
+
config: $,
|
|
1207
1209
|
class: "action-button",
|
|
1208
|
-
onClick: (...
|
|
1210
|
+
onClick: (...b) => ee($, ...b)
|
|
1209
1211
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1210
1212
|
])
|
|
1211
1213
|
])
|
|
@@ -1213,24 +1215,24 @@ const ln = { class: "page-container" }, cn = { class: "page-body" }, un = { clas
|
|
|
1213
1215
|
]);
|
|
1214
1216
|
};
|
|
1215
1217
|
}
|
|
1216
|
-
}),
|
|
1217
|
-
function
|
|
1218
|
-
return
|
|
1218
|
+
}), Uo = /* @__PURE__ */ ve(To, [["__scopeId", "data-v-1621b609"]]), at = Symbol("library-custom-comp");
|
|
1219
|
+
function No() {
|
|
1220
|
+
return me(at, null);
|
|
1219
1221
|
}
|
|
1220
|
-
const
|
|
1221
|
-
var t, a,
|
|
1222
|
-
const
|
|
1223
|
-
return `${(
|
|
1224
|
-
},
|
|
1225
|
-
function
|
|
1226
|
-
return
|
|
1222
|
+
const Lo = Symbol("ArcoConfigProvider"), Fo = "arco", Ro = "$arco", Do = (e) => {
|
|
1223
|
+
var t, a, o;
|
|
1224
|
+
const n = be(), c = me(Lo, void 0);
|
|
1225
|
+
return `${(o = (a = c?.prefixCls) != null ? a : (t = n?.appContext.config.globalProperties[Ro]) == null ? void 0 : t.classPrefix) != null ? o : Fo}-${e}`;
|
|
1226
|
+
}, Po = Object.prototype.toString;
|
|
1227
|
+
function Mo(e) {
|
|
1228
|
+
return Po.call(e) === "[object Number]" && e === e;
|
|
1227
1229
|
}
|
|
1228
|
-
var
|
|
1229
|
-
for (const [a,
|
|
1230
|
-
e[a] =
|
|
1230
|
+
var Bo = (e, t) => {
|
|
1231
|
+
for (const [a, o] of t)
|
|
1232
|
+
e[a] = o;
|
|
1231
1233
|
return e;
|
|
1232
1234
|
};
|
|
1233
|
-
const
|
|
1235
|
+
const Ho = G({
|
|
1234
1236
|
name: "IconDownload",
|
|
1235
1237
|
props: {
|
|
1236
1238
|
size: {
|
|
@@ -1257,59 +1259,59 @@ const Mn = G({
|
|
|
1257
1259
|
click: (e) => !0
|
|
1258
1260
|
},
|
|
1259
1261
|
setup(e, { emit: t }) {
|
|
1260
|
-
const a =
|
|
1262
|
+
const a = Do("icon"), o = X(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), n = X(() => {
|
|
1261
1263
|
const r = {};
|
|
1262
|
-
return e.size && (r.fontSize =
|
|
1264
|
+
return e.size && (r.fontSize = Mo(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
|
|
1263
1265
|
});
|
|
1264
1266
|
return {
|
|
1265
|
-
cls:
|
|
1266
|
-
innerStyle:
|
|
1267
|
+
cls: o,
|
|
1268
|
+
innerStyle: n,
|
|
1267
1269
|
onClick: (r) => {
|
|
1268
1270
|
t("click", r);
|
|
1269
1271
|
}
|
|
1270
1272
|
};
|
|
1271
1273
|
}
|
|
1272
|
-
}),
|
|
1273
|
-
function
|
|
1274
|
-
return u(),
|
|
1274
|
+
}), Ko = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
1275
|
+
function zo(e, t, a, o, n, c) {
|
|
1276
|
+
return u(), V("svg", {
|
|
1275
1277
|
viewBox: "0 0 48 48",
|
|
1276
1278
|
fill: "none",
|
|
1277
1279
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1278
1280
|
stroke: "currentColor",
|
|
1279
|
-
class:
|
|
1280
|
-
style:
|
|
1281
|
+
class: lt(e.cls),
|
|
1282
|
+
style: it(e.innerStyle),
|
|
1281
1283
|
"stroke-width": e.strokeWidth,
|
|
1282
1284
|
"stroke-linecap": e.strokeLinecap,
|
|
1283
1285
|
"stroke-linejoin": e.strokeLinejoin,
|
|
1284
1286
|
onClick: t[0] || (t[0] = (...r) => e.onClick && e.onClick(...r))
|
|
1285
1287
|
}, t[1] || (t[1] = [
|
|
1286
|
-
|
|
1287
|
-
]), 14,
|
|
1288
|
+
I("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
1289
|
+
]), 14, Ko);
|
|
1288
1290
|
}
|
|
1289
|
-
var
|
|
1290
|
-
const
|
|
1291
|
+
var Fe = /* @__PURE__ */ Bo(Ho, [["render", zo]]);
|
|
1292
|
+
const Eo = Object.assign(Fe, {
|
|
1291
1293
|
install: (e, t) => {
|
|
1292
1294
|
var a;
|
|
1293
|
-
const
|
|
1294
|
-
e.component(
|
|
1295
|
+
const o = (a = t?.iconPrefix) != null ? a : "";
|
|
1296
|
+
e.component(o + Fe.name, Fe);
|
|
1295
1297
|
}
|
|
1296
|
-
}),
|
|
1298
|
+
}), jo = { class: "page-container" }, Oo = { class: "page-body" }, Go = { class: "detail-card" }, Wo = { class: "form-fields-vertical" }, qo = { class: "detail-fields" }, Yo = { class: "detail-field" }, Jo = { class: "field-label" }, Xo = {
|
|
1297
1299
|
key: 1,
|
|
1298
1300
|
class: "field-value"
|
|
1299
|
-
},
|
|
1301
|
+
}, Qo = {
|
|
1300
1302
|
key: 2,
|
|
1301
1303
|
class: "detail-field-wrapper"
|
|
1302
|
-
},
|
|
1304
|
+
}, Zo = { class: "detail-field" }, en = {
|
|
1303
1305
|
key: 0,
|
|
1304
1306
|
class: "detail-content"
|
|
1305
|
-
},
|
|
1307
|
+
}, tn = { class: "page-footer" }, on = { class: "action-container" }, nn = { class: "action-buttons" }, an = /* @__PURE__ */ G({
|
|
1306
1308
|
__name: "DetailView",
|
|
1307
1309
|
props: {
|
|
1308
1310
|
className: {},
|
|
1309
1311
|
workflowId: {}
|
|
1310
1312
|
},
|
|
1311
1313
|
setup(e) {
|
|
1312
|
-
const t =
|
|
1314
|
+
const t = xe(), a = Se(), o = ze(), n = Ve(), c = No(), r = be(), l = e, s = g({
|
|
1313
1315
|
pageType: "",
|
|
1314
1316
|
fields: {},
|
|
1315
1317
|
globalValidations: [],
|
|
@@ -1317,18 +1319,18 @@ const Kn = Object.assign(Le, {
|
|
|
1317
1319
|
title: "",
|
|
1318
1320
|
subTitle: ""
|
|
1319
1321
|
}
|
|
1320
|
-
}), i =
|
|
1321
|
-
function
|
|
1322
|
-
return
|
|
1323
|
-
fieldKey:
|
|
1324
|
-
...
|
|
1325
|
-
})).filter((
|
|
1322
|
+
}), i = g([]);
|
|
1323
|
+
function _(h) {
|
|
1324
|
+
return h ? Object.entries(h).map(([H, C]) => (typeof C.modelValue == "boolean" ? C.fieldValue = C.modelValue ? "Yes" : "No" : C.fieldValue = C.modelValue, {
|
|
1325
|
+
fieldKey: H,
|
|
1326
|
+
...C
|
|
1327
|
+
})).filter((H) => H.widget && H.widget.widget !== "Hidden").filter((H) => !B.value.includes(H.fieldKey)) : [];
|
|
1326
1328
|
}
|
|
1327
|
-
const d =
|
|
1328
|
-
const
|
|
1329
|
-
return
|
|
1329
|
+
const d = X(() => Ee(i.value)), w = X(() => s.value?.actions ? [...s.value.actions].reverse() : []), x = g(!0), m = (h, f) => {
|
|
1330
|
+
const H = h.findIndex((C) => C.isCurrent);
|
|
1331
|
+
return h.map((C, Y) => {
|
|
1330
1332
|
const N = {
|
|
1331
|
-
id:
|
|
1333
|
+
id: C.id,
|
|
1332
1334
|
title: "",
|
|
1333
1335
|
proxy: "",
|
|
1334
1336
|
sub: "",
|
|
@@ -1336,300 +1338,303 @@ const Kn = Object.assign(Le, {
|
|
|
1336
1338
|
status: 1,
|
|
1337
1339
|
time: ""
|
|
1338
1340
|
};
|
|
1339
|
-
N.title =
|
|
1340
|
-
const
|
|
1341
|
-
if (
|
|
1341
|
+
N.title = C.workflowProcessApprovers[0]?.name;
|
|
1342
|
+
const ie = C.workflowProcessApprovers[C.workflowProcessApprovers.length - 1], P = C.workflowHistorys[C.workflowHistorys.length - 1], Q = P?.workflowHistoryApprovers[P?.workflowHistoryApprovers?.length - 1];
|
|
1343
|
+
if (ie && Q && ie?.email?.toLowerCase() !== Q?.approverEmail?.toLowerCase() && (N.title = `${Q.name}`, N.proxy = `Proxy: ${ie.name}`), C.sort > 1 ? N.sub = "Approver Role: " + C.nodeName.replace("Submit", "").replace("Approve", "") : N.sub = "Submit Application", C.isCurrent && f !== -1)
|
|
1342
1344
|
N.desc = "In Approval", N.status = 1;
|
|
1343
1345
|
else {
|
|
1344
|
-
const
|
|
1345
|
-
if (
|
|
1346
|
-
N.time =
|
|
1347
|
-
else if (
|
|
1348
|
-
N.time =
|
|
1349
|
-
else if (
|
|
1350
|
-
if (N.time =
|
|
1346
|
+
const W = C.workflowHistorys[C.workflowHistorys.length - 1];
|
|
1347
|
+
if (W && W.status === 100)
|
|
1348
|
+
N.time = ke(W.takeActionAt, "yyyy-MM-dd hh:mm:ss"), N.status = 2, N.desc = "approve success!";
|
|
1349
|
+
else if (W && W.status === 999)
|
|
1350
|
+
N.time = ke(W.takeActionAt, "yyyy-MM-dd hh:mm:ss"), N.status = 0, N.desc = "approve reject!";
|
|
1351
|
+
else if (W)
|
|
1352
|
+
if (N.time = ke(W.takeActionAt, "yyyy-MM-dd hh:mm:ss"), C.sort === 1)
|
|
1351
1353
|
N.status = 2, N.desc = "";
|
|
1352
1354
|
else {
|
|
1353
|
-
const
|
|
1354
|
-
N.status = 3, N.desc =
|
|
1355
|
+
const he = W.workflowHistoryApprovers[0];
|
|
1356
|
+
N.status = 3, N.desc = he?.reason ? `Rejected reason: ${he.reason}` : "Rejected";
|
|
1355
1357
|
}
|
|
1356
|
-
else
|
|
1357
|
-
|
|
1358
|
+
else Y < H || H === -1 ? (N.status = 0, N.desc = "Skipped") : (N.status = 0, N.desc = "Pending Approval");
|
|
1359
|
+
W && W.status;
|
|
1358
1360
|
}
|
|
1359
1361
|
return N;
|
|
1360
1362
|
});
|
|
1361
|
-
},
|
|
1362
|
-
async function
|
|
1363
|
-
const
|
|
1364
|
-
s.value.actions = s.value.actions?.filter((
|
|
1365
|
-
const
|
|
1366
|
-
return
|
|
1367
|
-
}),
|
|
1363
|
+
}, k = g([]), z = g(!1), ee = g(!1), oe = g(!1), ne = g(!1);
|
|
1364
|
+
async function le() {
|
|
1365
|
+
const h = await Qe(pe.Details, l.className, { workflowId: l.workflowId, email: v() });
|
|
1366
|
+
s.value.actions = s.value.actions?.filter((f) => {
|
|
1367
|
+
const H = h.find((C) => C.button === f.title);
|
|
1368
|
+
return H ? H.isShow : !0;
|
|
1369
|
+
}), z.value = h.find((f) => f.button === "IsGlobal")?.isShow ?? !1, ee.value = h.find((f) => f.button === "AssignButton")?.isShow ?? !1, oe.value = h.find((f) => f.button === "AssignList")?.isShow ?? !1, ne.value = h.find((f) => f.button === "AddCommentsButton")?.isShow ?? !1;
|
|
1368
1370
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
+
const B = g([]);
|
|
1372
|
+
async function T() {
|
|
1373
|
+
x.value = !0, s.value = await Ce(pe.Details, l.className, {
|
|
1371
1374
|
svrStore: t,
|
|
1372
1375
|
bpmStore: a
|
|
1373
1376
|
}, {
|
|
1374
1377
|
workflowId: l.workflowId
|
|
1375
1378
|
});
|
|
1376
|
-
const
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1379
|
+
const h = await Ze(l.className, l.workflowId);
|
|
1380
|
+
ae.value = await Pt(), D.value = await Oe(l.workflowId), fe.value = await Le(l.workflowId), le();
|
|
1381
|
+
const f = s.value.fields.requestType.modelValue;
|
|
1382
|
+
o.Test?.(f, B), i.value = _(s.value.fields);
|
|
1383
|
+
for (const C in s.value.fields)
|
|
1384
|
+
if (s.value.fields[C].widget?.widget === "File") {
|
|
1385
|
+
const Y = i.value.find((N) => N.fieldKey === C);
|
|
1386
|
+
Y && Y.widget && (Y.widget.files = h[C] ?? []);
|
|
1382
1387
|
}
|
|
1383
|
-
const
|
|
1384
|
-
|
|
1388
|
+
const H = await Ft(l.className, l.workflowId);
|
|
1389
|
+
k.value = m(H, 0), x.value = !1;
|
|
1385
1390
|
}
|
|
1386
|
-
|
|
1387
|
-
async function
|
|
1388
|
-
return
|
|
1391
|
+
de(T);
|
|
1392
|
+
async function U(h, f) {
|
|
1393
|
+
return o[h]?.(f);
|
|
1389
1394
|
}
|
|
1390
|
-
function
|
|
1395
|
+
function v() {
|
|
1391
1396
|
return t()?.userInfo?.email_address ?? "";
|
|
1392
1397
|
}
|
|
1393
|
-
async function
|
|
1398
|
+
async function $(h, f, H, C, Y) {
|
|
1394
1399
|
try {
|
|
1395
|
-
switch (
|
|
1396
|
-
case
|
|
1397
|
-
const { reason: N, ifGlobal:
|
|
1398
|
-
|
|
1399
|
-
const
|
|
1400
|
-
await
|
|
1401
|
-
const
|
|
1402
|
-
r?.appContext.config.globalProperties.$notification.success(
|
|
1400
|
+
switch (f) {
|
|
1401
|
+
case Z.Submit:
|
|
1402
|
+
const { reason: N, ifGlobal: ie } = await U(Y, { isGlobal: z.value });
|
|
1403
|
+
x.value = !0;
|
|
1404
|
+
const P = Y === "Approve" ? "100" : "-1";
|
|
1405
|
+
await Nt(l.className, l.workflowId, v(), N, [Number(l.workflowId)], H, P, ie), x.value = !1;
|
|
1406
|
+
const Q = Y === "Approve" ? "approve success!" : "approve reject!";
|
|
1407
|
+
r?.appContext.config.globalProperties.$notification.success(Q), T();
|
|
1403
1408
|
break;
|
|
1404
|
-
case
|
|
1405
|
-
|
|
1409
|
+
case Z.Link:
|
|
1410
|
+
C === "List" && n.push({ name: "List", params: { className: l.className } });
|
|
1406
1411
|
break;
|
|
1407
1412
|
default:
|
|
1408
|
-
console.warn("Unknown action type:",
|
|
1413
|
+
console.warn("Unknown action type:", f);
|
|
1409
1414
|
}
|
|
1410
1415
|
} catch {
|
|
1411
1416
|
}
|
|
1412
1417
|
}
|
|
1413
|
-
const
|
|
1414
|
-
async function
|
|
1415
|
-
if (!
|
|
1418
|
+
const b = g(""), D = g([]), te = g(""), ae = g([]), fe = g([]);
|
|
1419
|
+
async function Ae() {
|
|
1420
|
+
if (!te.value) {
|
|
1416
1421
|
r?.appContext.config.globalProperties.$message.error("Please select an approver");
|
|
1417
1422
|
return;
|
|
1418
1423
|
}
|
|
1419
|
-
await
|
|
1424
|
+
await y("Confirm Assign Approver", "Do you want to assign the selected approver?");
|
|
1420
1425
|
try {
|
|
1421
|
-
await
|
|
1422
|
-
} catch (
|
|
1423
|
-
if (
|
|
1426
|
+
await Mt(l.workflowId, te.value), fe.value = await Le(l.workflowId), le(), r?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
|
|
1427
|
+
} catch (h) {
|
|
1428
|
+
if (h.status === 409) {
|
|
1424
1429
|
r?.appContext.config.globalProperties.$notification.error("This user is already an associator");
|
|
1425
1430
|
return;
|
|
1426
1431
|
}
|
|
1427
1432
|
r?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
|
|
1428
1433
|
}
|
|
1429
1434
|
}
|
|
1430
|
-
async function
|
|
1431
|
-
const { Modal:
|
|
1432
|
-
return new Promise((
|
|
1433
|
-
|
|
1434
|
-
title:
|
|
1435
|
-
content:
|
|
1435
|
+
async function y(h, f) {
|
|
1436
|
+
const { Modal: H } = await import("@arco-design/web-vue");
|
|
1437
|
+
return new Promise((C, Y) => {
|
|
1438
|
+
H.confirm({
|
|
1439
|
+
title: h,
|
|
1440
|
+
content: f,
|
|
1436
1441
|
okText: "OK",
|
|
1437
1442
|
cancelText: "Cancel",
|
|
1438
|
-
onOk: () =>
|
|
1439
|
-
onCancel: () =>
|
|
1443
|
+
onOk: () => C(!0),
|
|
1444
|
+
onCancel: () => Y()
|
|
1440
1445
|
});
|
|
1441
1446
|
});
|
|
1442
1447
|
}
|
|
1443
|
-
async function
|
|
1448
|
+
async function A(h) {
|
|
1444
1449
|
try {
|
|
1445
|
-
await
|
|
1450
|
+
await y("Confirm Delete Associator", "Do you want to delete this associator?");
|
|
1446
1451
|
} catch {
|
|
1447
1452
|
return;
|
|
1448
1453
|
}
|
|
1449
1454
|
try {
|
|
1450
|
-
await Ht(String(
|
|
1455
|
+
await Ht(String(h)), fe.value = await Le(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
|
|
1451
1456
|
} catch {
|
|
1452
1457
|
r?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
|
|
1453
1458
|
}
|
|
1454
1459
|
}
|
|
1455
|
-
async function
|
|
1456
|
-
if (!
|
|
1460
|
+
async function R() {
|
|
1461
|
+
if (!b.value.trim()) {
|
|
1457
1462
|
r?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
|
|
1458
1463
|
return;
|
|
1459
1464
|
}
|
|
1460
|
-
await
|
|
1465
|
+
await Bt(l.workflowId, v(), b.value), b.value = "", D.value = await Oe(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
|
|
1461
1466
|
}
|
|
1462
|
-
return (
|
|
1463
|
-
const
|
|
1464
|
-
return u(),
|
|
1465
|
-
|
|
1467
|
+
return (h, f) => {
|
|
1468
|
+
const H = S("a-link"), C = S("a-space"), Y = S("a-card"), N = S("a-option"), ie = S("a-select"), P = S("a-button"), Q = S("a-list-item"), W = S("a-list"), he = S("a-textarea"), st = S("a-spin");
|
|
1469
|
+
return u(), V("div", jo, [
|
|
1470
|
+
F($e, {
|
|
1466
1471
|
title: s.value.banner.title,
|
|
1467
1472
|
subTitle: s.value.banner.subTitle,
|
|
1468
|
-
email:
|
|
1473
|
+
email: v()
|
|
1469
1474
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
loading:
|
|
1475
|
+
I("div", Oo, [
|
|
1476
|
+
F(st, {
|
|
1477
|
+
loading: x.value,
|
|
1473
1478
|
class: "detail-container"
|
|
1474
1479
|
}, {
|
|
1475
|
-
default:
|
|
1476
|
-
|
|
1477
|
-
(u(),
|
|
1478
|
-
|
|
1479
|
-
(u(!0),
|
|
1480
|
+
default: p(() => [
|
|
1481
|
+
I("div", Go, [
|
|
1482
|
+
(u(), L(Pe(Te(c).Steps), { steps: k.value }, null, 8, ["steps"])),
|
|
1483
|
+
I("div", Wo, [
|
|
1484
|
+
(u(!0), V(K, null, E(d.value, (M) => (u(), L(Y, {
|
|
1480
1485
|
key: M.name,
|
|
1481
1486
|
title: M.name,
|
|
1482
1487
|
style: { "margin-bottom": "24px" }
|
|
1483
1488
|
}, {
|
|
1484
|
-
default:
|
|
1485
|
-
|
|
1486
|
-
(u(!0),
|
|
1487
|
-
key:
|
|
1489
|
+
default: p(() => [
|
|
1490
|
+
I("div", qo, [
|
|
1491
|
+
(u(!0), V(K, null, E(M.fields, (ce) => (u(), V("div", {
|
|
1492
|
+
key: ce.fieldKey,
|
|
1488
1493
|
class: "detail-field-wrapper"
|
|
1489
1494
|
}, [
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1495
|
+
I("div", Yo, [
|
|
1496
|
+
I("div", Jo, J(ce.widget?.title), 1),
|
|
1497
|
+
ce.widget?.widget === "File" ? (u(!0), V(K, { key: 0 }, E(ce.widget.files, (Ie) => (u(), V("div", {
|
|
1493
1498
|
class: "field-value",
|
|
1494
|
-
key:
|
|
1499
|
+
key: Ie.id
|
|
1495
1500
|
}, [
|
|
1496
|
-
|
|
1497
|
-
default:
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
href:
|
|
1501
|
+
F(C, null, {
|
|
1502
|
+
default: p(() => [
|
|
1503
|
+
q(J(Ie.name) + " ", 1),
|
|
1504
|
+
F(H, {
|
|
1505
|
+
href: Ie.url,
|
|
1501
1506
|
target: "_blank"
|
|
1502
1507
|
}, {
|
|
1503
|
-
default:
|
|
1504
|
-
|
|
1508
|
+
default: p(() => [
|
|
1509
|
+
F(Te(Eo), { style: { color: "#7A00E6" } })
|
|
1505
1510
|
]),
|
|
1506
1511
|
_: 2
|
|
1507
1512
|
}, 1032, ["href"])
|
|
1508
1513
|
]),
|
|
1509
1514
|
_: 2
|
|
1510
1515
|
}, 1024)
|
|
1511
|
-
]))), 128)) : (u(),
|
|
1516
|
+
]))), 128)) : (u(), V("div", Xo, J(ce.fieldValue), 1))
|
|
1512
1517
|
])
|
|
1513
1518
|
]))), 128))
|
|
1514
1519
|
])
|
|
1515
1520
|
]),
|
|
1516
1521
|
_: 2
|
|
1517
1522
|
}, 1032, ["title"]))), 128)),
|
|
1518
|
-
|
|
1519
|
-
default:
|
|
1520
|
-
|
|
1521
|
-
modelValue:
|
|
1522
|
-
"onUpdate:modelValue":
|
|
1523
|
+
ee.value ? (u(), L(C, { key: 0 }, {
|
|
1524
|
+
default: p(() => [
|
|
1525
|
+
F(ie, {
|
|
1526
|
+
modelValue: te.value,
|
|
1527
|
+
"onUpdate:modelValue": f[0] || (f[0] = (M) => te.value = M)
|
|
1523
1528
|
}, {
|
|
1524
|
-
default:
|
|
1525
|
-
(u(!0),
|
|
1529
|
+
default: p(() => [
|
|
1530
|
+
(u(!0), V(K, null, E(ae.value, (M) => (u(), L(N, {
|
|
1526
1531
|
key: M.value,
|
|
1527
1532
|
value: M.value
|
|
1528
1533
|
}, {
|
|
1529
|
-
default:
|
|
1530
|
-
|
|
1534
|
+
default: p(() => [
|
|
1535
|
+
q(J(M.label), 1)
|
|
1531
1536
|
]),
|
|
1532
1537
|
_: 2
|
|
1533
1538
|
}, 1032, ["value"]))), 128))
|
|
1534
1539
|
]),
|
|
1535
1540
|
_: 1
|
|
1536
1541
|
}, 8, ["modelValue"]),
|
|
1537
|
-
|
|
1542
|
+
F(P, {
|
|
1538
1543
|
type: "primary",
|
|
1539
|
-
onClick:
|
|
1544
|
+
onClick: Ae
|
|
1540
1545
|
}, {
|
|
1541
|
-
default:
|
|
1542
|
-
|
|
1546
|
+
default: p(() => f[2] || (f[2] = [
|
|
1547
|
+
q("Assign for comment", -1)
|
|
1543
1548
|
])),
|
|
1544
1549
|
_: 1,
|
|
1545
1550
|
__: [2]
|
|
1546
1551
|
})
|
|
1547
1552
|
]),
|
|
1548
1553
|
_: 1
|
|
1549
|
-
})) :
|
|
1550
|
-
|
|
1551
|
-
header:
|
|
1552
|
-
|
|
1554
|
+
})) : se("", !0),
|
|
1555
|
+
oe.value ? (u(), L(W, { key: 1 }, {
|
|
1556
|
+
header: p(() => f[3] || (f[3] = [
|
|
1557
|
+
q(" Associators ", -1)
|
|
1553
1558
|
])),
|
|
1554
|
-
default:
|
|
1555
|
-
(u(!0),
|
|
1559
|
+
default: p(() => [
|
|
1560
|
+
(u(!0), V(K, null, E(fe.value, (M) => (u(), L(Q, {
|
|
1556
1561
|
key: M.id
|
|
1557
1562
|
}, {
|
|
1558
|
-
actions:
|
|
1559
|
-
|
|
1563
|
+
actions: p(() => [
|
|
1564
|
+
F(P, {
|
|
1560
1565
|
type: "text",
|
|
1561
1566
|
status: "danger",
|
|
1562
|
-
onClick: (
|
|
1567
|
+
onClick: (ce) => A(M.id)
|
|
1563
1568
|
}, {
|
|
1564
|
-
default:
|
|
1565
|
-
|
|
1569
|
+
default: p(() => f[4] || (f[4] = [
|
|
1570
|
+
q(" Delete ", -1)
|
|
1566
1571
|
])),
|
|
1567
1572
|
_: 2,
|
|
1568
1573
|
__: [4]
|
|
1569
1574
|
}, 1032, ["onClick"])
|
|
1570
1575
|
]),
|
|
1571
|
-
default:
|
|
1572
|
-
|
|
1576
|
+
default: p(() => [
|
|
1577
|
+
q(" " + J(M.associator), 1)
|
|
1573
1578
|
]),
|
|
1574
1579
|
_: 2
|
|
1575
1580
|
}, 1024))), 128))
|
|
1576
1581
|
]),
|
|
1577
1582
|
_: 1
|
|
1578
|
-
})) :
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
modelValue:
|
|
1584
|
-
"onUpdate:modelValue":
|
|
1583
|
+
})) : se("", !0),
|
|
1584
|
+
ne.value ? (u(), V("div", Qo, [
|
|
1585
|
+
I("div", Zo, [
|
|
1586
|
+
f[6] || (f[6] = I("div", { class: "field-label" }, "Comment", -1)),
|
|
1587
|
+
F(he, {
|
|
1588
|
+
modelValue: b.value,
|
|
1589
|
+
"onUpdate:modelValue": f[1] || (f[1] = (M) => b.value = M)
|
|
1585
1590
|
}, null, 8, ["modelValue"]),
|
|
1586
|
-
|
|
1591
|
+
F(P, {
|
|
1587
1592
|
type: "primary",
|
|
1588
|
-
onClick:
|
|
1593
|
+
onClick: R
|
|
1589
1594
|
}, {
|
|
1590
|
-
default:
|
|
1591
|
-
|
|
1595
|
+
default: p(() => f[5] || (f[5] = [
|
|
1596
|
+
q("Add Comment", -1)
|
|
1592
1597
|
])),
|
|
1593
1598
|
_: 1,
|
|
1594
1599
|
__: [5]
|
|
1595
1600
|
})
|
|
1596
1601
|
])
|
|
1597
|
-
])) :
|
|
1598
|
-
|
|
1599
|
-
header:
|
|
1600
|
-
|
|
1602
|
+
])) : se("", !0),
|
|
1603
|
+
D.value.length ? (u(), L(W, { key: 3 }, {
|
|
1604
|
+
header: p(() => f[7] || (f[7] = [
|
|
1605
|
+
q(" Comments History ", -1)
|
|
1601
1606
|
])),
|
|
1602
|
-
default:
|
|
1603
|
-
(u(!0),
|
|
1607
|
+
default: p(() => [
|
|
1608
|
+
(u(!0), V(K, null, E(D.value, (M) => (u(), L(Q, {
|
|
1604
1609
|
key: M.associator
|
|
1605
1610
|
}, {
|
|
1606
|
-
default:
|
|
1607
|
-
|
|
1611
|
+
default: p(() => [
|
|
1612
|
+
q(J(M.associator) + ": " + J(M.comments) + " (" + J(Te(ke)(M.createdAt)) + ") ", 1)
|
|
1608
1613
|
]),
|
|
1609
1614
|
_: 2
|
|
1610
1615
|
}, 1024))), 128))
|
|
1611
1616
|
]),
|
|
1612
1617
|
_: 1
|
|
1613
|
-
})) :
|
|
1618
|
+
})) : se("", !0)
|
|
1614
1619
|
]),
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
])) :
|
|
1620
|
+
h.$slots.content ? (u(), V("div", en, [
|
|
1621
|
+
ue(h.$slots, "content", {}, void 0, !0)
|
|
1622
|
+
])) : se("", !0)
|
|
1618
1623
|
])
|
|
1619
1624
|
]),
|
|
1620
1625
|
_: 3
|
|
1621
1626
|
}, 8, ["loading"])
|
|
1622
1627
|
]),
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
(u(!0),
|
|
1628
|
+
I("div", tn, [
|
|
1629
|
+
I("div", on, [
|
|
1630
|
+
ue(h.$slots, "action", {}, void 0, !0),
|
|
1631
|
+
I("div", nn, [
|
|
1632
|
+
(u(!0), V(K, null, E(w.value, (M) => (u(), L(ye, {
|
|
1628
1633
|
key: M.Title,
|
|
1629
|
-
loading:
|
|
1634
|
+
loading: x.value,
|
|
1630
1635
|
config: M,
|
|
1631
1636
|
class: "action-button",
|
|
1632
|
-
onClick: (...
|
|
1637
|
+
onClick: (...ce) => $(M, ...ce)
|
|
1633
1638
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1634
1639
|
])
|
|
1635
1640
|
])
|
|
@@ -1637,14 +1642,14 @@ const Kn = Object.assign(Le, {
|
|
|
1637
1642
|
]);
|
|
1638
1643
|
};
|
|
1639
1644
|
}
|
|
1640
|
-
}),
|
|
1645
|
+
}), sn = /* @__PURE__ */ ve(an, [["__scopeId", "data-v-50190ec4"]]), rn = { class: "list-container" }, ln = { class: "query-title" }, cn = /* @__PURE__ */ G({
|
|
1641
1646
|
name: "ListView",
|
|
1642
1647
|
__name: "ListView",
|
|
1643
1648
|
props: {
|
|
1644
1649
|
className: {}
|
|
1645
1650
|
},
|
|
1646
1651
|
setup(e) {
|
|
1647
|
-
const t =
|
|
1652
|
+
const t = xe(), a = Se(), o = Ve(), n = be(), c = e, r = g(), l = Me({
|
|
1648
1653
|
current: 1,
|
|
1649
1654
|
total: 0,
|
|
1650
1655
|
pageSize: 10,
|
|
@@ -1654,31 +1659,31 @@ const Kn = Object.assign(Le, {
|
|
|
1654
1659
|
filters: []
|
|
1655
1660
|
});
|
|
1656
1661
|
function s() {
|
|
1657
|
-
const
|
|
1658
|
-
key:
|
|
1659
|
-
value:
|
|
1660
|
-
operator:
|
|
1662
|
+
const y = Object.entries($.value).filter(([, { value: A }]) => A && A !== "").map(([A, { value: R, operator: h }]) => ({
|
|
1663
|
+
key: A,
|
|
1664
|
+
value: R,
|
|
1665
|
+
operator: h
|
|
1661
1666
|
// 根据实际需要调整操作符
|
|
1662
1667
|
}));
|
|
1663
1668
|
return {
|
|
1664
1669
|
pageNumber: l.current,
|
|
1665
1670
|
pageSize: l.pageSize,
|
|
1666
|
-
filters: [...l.filters, ...
|
|
1671
|
+
filters: [...l.filters, ...y],
|
|
1667
1672
|
sorts: [{
|
|
1668
1673
|
key: "status",
|
|
1669
1674
|
type: 0
|
|
1670
1675
|
}]
|
|
1671
1676
|
};
|
|
1672
1677
|
}
|
|
1673
|
-
const i =
|
|
1674
|
-
x:
|
|
1678
|
+
const i = X(() => ({
|
|
1679
|
+
x: w.value.length * 150 + 250
|
|
1675
1680
|
// 只设置横向滚动
|
|
1676
1681
|
// 移除 y 属性,让表格高度自适应
|
|
1677
|
-
})),
|
|
1678
|
-
const
|
|
1679
|
-
title:
|
|
1680
|
-
dataIndex:
|
|
1681
|
-
order:
|
|
1682
|
+
})), _ = (y) => {
|
|
1683
|
+
const A = Object.entries(y).filter(([, R]) => R.widget?.column).map(([R, h], f) => ({
|
|
1684
|
+
title: h.widget.title,
|
|
1685
|
+
dataIndex: R.charAt(0).toLowerCase() + R.slice(1),
|
|
1686
|
+
order: h.order,
|
|
1682
1687
|
ellipsis: !0,
|
|
1683
1688
|
tooltip: !0,
|
|
1684
1689
|
width: 150,
|
|
@@ -1686,8 +1691,8 @@ const Kn = Object.assign(Le, {
|
|
|
1686
1691
|
// 启用最小宽度
|
|
1687
1692
|
resizable: !0
|
|
1688
1693
|
// 启用列宽调整
|
|
1689
|
-
})).sort((
|
|
1690
|
-
|
|
1694
|
+
})).sort((R, h) => R.order - h.order);
|
|
1695
|
+
A.push({
|
|
1691
1696
|
title: "Actions",
|
|
1692
1697
|
slotName: "optional",
|
|
1693
1698
|
align: "center",
|
|
@@ -1695,146 +1700,146 @@ const Kn = Object.assign(Le, {
|
|
|
1695
1700
|
minWidth: 200,
|
|
1696
1701
|
fixed: "right",
|
|
1697
1702
|
resizable: !1
|
|
1698
|
-
}),
|
|
1699
|
-
}, d =
|
|
1700
|
-
|
|
1701
|
-
const
|
|
1702
|
-
d.value =
|
|
1703
|
-
},
|
|
1704
|
-
|
|
1705
|
-
|
|
1703
|
+
}), w.value = A, console.log("🚀 ~ mapColumns ~ _columns.value:", w.value);
|
|
1704
|
+
}, d = g([]), w = g([]), x = g(!0), m = g(!0), k = g(), z = async () => {
|
|
1705
|
+
m.value = !0;
|
|
1706
|
+
const y = await Vt(c.className, s());
|
|
1707
|
+
d.value = y.data, console.log("🚀 ~ loadData ~ _data.value:", d.value), l.total = y.totalCount, m.value = !1;
|
|
1708
|
+
}, ee = g(!1);
|
|
1709
|
+
de(async () => {
|
|
1710
|
+
x.value = !0, r.value = await Ce(3, c.className, {
|
|
1706
1711
|
svrStore: t,
|
|
1707
1712
|
bpmStore: a
|
|
1708
|
-
}),
|
|
1709
|
-
}),
|
|
1710
|
-
|
|
1713
|
+
}), _(r.value.fields), D(r.value.fields), te(), v(r.value?.tabs?.[0]?.key || ""), k.value = r.value.actions, x.value = !1, ee.value = !0;
|
|
1714
|
+
}), ct(() => {
|
|
1715
|
+
ee.value && z();
|
|
1711
1716
|
});
|
|
1712
|
-
const
|
|
1713
|
-
l.current =
|
|
1714
|
-
},
|
|
1715
|
-
l.pageSize =
|
|
1717
|
+
const oe = (y) => {
|
|
1718
|
+
l.current = y, z();
|
|
1719
|
+
}, ne = (y) => {
|
|
1720
|
+
l.pageSize = y, z();
|
|
1716
1721
|
};
|
|
1717
|
-
function
|
|
1718
|
-
switch (
|
|
1719
|
-
case
|
|
1720
|
-
|
|
1722
|
+
function le(y, A, R, h, f) {
|
|
1723
|
+
switch (y) {
|
|
1724
|
+
case Z.Link:
|
|
1725
|
+
o.push({ name: R, params: { workflowId: f } });
|
|
1721
1726
|
break;
|
|
1722
1727
|
default:
|
|
1723
|
-
console.warn("Unknown action type:",
|
|
1728
|
+
console.warn("Unknown action type:", y);
|
|
1724
1729
|
}
|
|
1725
1730
|
}
|
|
1726
|
-
function
|
|
1727
|
-
switch (
|
|
1728
|
-
case
|
|
1729
|
-
|
|
1731
|
+
function B(y, A, R) {
|
|
1732
|
+
switch (y) {
|
|
1733
|
+
case Z.Submit:
|
|
1734
|
+
Kt(A, { filters: [{ key: "approverList", value: "jessica.zhan@sanofi.com", operator: 2 }] }), n?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
1730
1735
|
break;
|
|
1731
|
-
case
|
|
1732
|
-
|
|
1736
|
+
case Z.Link:
|
|
1737
|
+
o.push({ name: R });
|
|
1733
1738
|
break;
|
|
1734
1739
|
default:
|
|
1735
|
-
console.warn("Unknown action type:",
|
|
1740
|
+
console.warn("Unknown action type:", y);
|
|
1736
1741
|
}
|
|
1737
1742
|
}
|
|
1738
|
-
function
|
|
1743
|
+
function T() {
|
|
1739
1744
|
return t()?.userInfo?.email_address ?? "";
|
|
1740
1745
|
}
|
|
1741
|
-
function
|
|
1742
|
-
return typeof
|
|
1746
|
+
function U(y, A) {
|
|
1747
|
+
return typeof y != "string" || y.indexOf("{currentUserEmail}") === -1 ? y : y.replace(/{currentUserEmail}/g, A);
|
|
1743
1748
|
}
|
|
1744
|
-
function
|
|
1745
|
-
const
|
|
1746
|
-
l.filters =
|
|
1747
|
-
...
|
|
1748
|
-
value:
|
|
1749
|
-
})) || [],
|
|
1749
|
+
function v(y) {
|
|
1750
|
+
const A = r.value?.tabs?.find((R) => R.key === y)?.filters;
|
|
1751
|
+
l.filters = A?.map((R) => ({
|
|
1752
|
+
...R,
|
|
1753
|
+
value: U(R.value, T())
|
|
1754
|
+
})) || [], z();
|
|
1750
1755
|
}
|
|
1751
|
-
const
|
|
1752
|
-
function
|
|
1753
|
-
if (!
|
|
1754
|
-
|
|
1756
|
+
const $ = g({}), b = g([]);
|
|
1757
|
+
function D(y) {
|
|
1758
|
+
if (!y) return [];
|
|
1759
|
+
b.value = Object.entries(y).filter(([, A]) => A.isFiltered).map(([A, R]) => ({ fieldKey: A, fieldConfig: R }));
|
|
1755
1760
|
}
|
|
1756
|
-
const
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
}),
|
|
1761
|
-
},
|
|
1762
|
-
l.current = 1,
|
|
1763
|
-
},
|
|
1764
|
-
r.value &&
|
|
1761
|
+
const te = () => {
|
|
1762
|
+
const y = {};
|
|
1763
|
+
b.value.forEach(({ fieldKey: A, fieldConfig: R }) => {
|
|
1764
|
+
y[A] = {}, y[A].value = R.modelValue, y[A].operator = R.operator;
|
|
1765
|
+
}), $.value = y;
|
|
1766
|
+
}, ae = () => {
|
|
1767
|
+
l.current = 1, z();
|
|
1768
|
+
}, fe = () => {
|
|
1769
|
+
r.value && te(), ae();
|
|
1765
1770
|
};
|
|
1766
|
-
function
|
|
1767
|
-
return !(
|
|
1771
|
+
function Ae(y, A) {
|
|
1772
|
+
return !(y.location !== "InTable" || y.title === "Update" && (A.status === 100 || A.status === -1));
|
|
1768
1773
|
}
|
|
1769
|
-
return (
|
|
1770
|
-
const
|
|
1771
|
-
return u(),
|
|
1772
|
-
|
|
1774
|
+
return (y, A) => {
|
|
1775
|
+
const R = S("a-space"), h = S("a-col"), f = S("a-button"), H = S("a-row"), C = S("a-card"), Y = S("a-tab-pane"), N = S("a-tabs"), ie = S("a-table");
|
|
1776
|
+
return u(), V("div", rn, [
|
|
1777
|
+
F($e, {
|
|
1773
1778
|
title: r.value?.banner.title ?? "",
|
|
1774
1779
|
subTitle: r.value?.banner.subTitle ?? "",
|
|
1775
|
-
email:
|
|
1780
|
+
email: T()
|
|
1776
1781
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1777
|
-
|
|
1778
|
-
default:
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
default:
|
|
1783
|
-
(u(!0),
|
|
1784
|
-
key:
|
|
1782
|
+
F(C, null, {
|
|
1783
|
+
default: p(() => [
|
|
1784
|
+
I("div", ln, [
|
|
1785
|
+
A[0] || (A[0] = I("h3", null, "Search Conditions", -1)),
|
|
1786
|
+
F(R, { size: "medium" }, {
|
|
1787
|
+
default: p(() => [
|
|
1788
|
+
(u(!0), V(K, null, E(k.value, (P) => (u(), V(K, {
|
|
1789
|
+
key: P.title
|
|
1785
1790
|
}, [
|
|
1786
|
-
|
|
1791
|
+
P.location === "InOperation" ? (u(), L(ye, {
|
|
1787
1792
|
key: 0,
|
|
1788
|
-
config:
|
|
1789
|
-
onClick:
|
|
1790
|
-
}, null, 8, ["config"])) :
|
|
1793
|
+
config: P,
|
|
1794
|
+
onClick: B
|
|
1795
|
+
}, null, 8, ["config"])) : se("", !0)
|
|
1791
1796
|
], 64))), 128))
|
|
1792
1797
|
]),
|
|
1793
1798
|
_: 1
|
|
1794
1799
|
})
|
|
1795
1800
|
]),
|
|
1796
|
-
|
|
1797
|
-
default:
|
|
1798
|
-
(u(!0),
|
|
1799
|
-
key:
|
|
1801
|
+
F(H, { gutter: [24, 20] }, {
|
|
1802
|
+
default: p(() => [
|
|
1803
|
+
(u(!0), V(K, null, E(b.value, (P) => (u(), L(h, {
|
|
1804
|
+
key: P.fieldKey,
|
|
1800
1805
|
span: 6,
|
|
1801
1806
|
class: "search-col"
|
|
1802
1807
|
}, {
|
|
1803
|
-
default:
|
|
1804
|
-
|
|
1805
|
-
name:
|
|
1806
|
-
config:
|
|
1807
|
-
modelValue:
|
|
1808
|
-
"onUpdate:modelValue": (
|
|
1808
|
+
default: p(() => [
|
|
1809
|
+
F(Ke, {
|
|
1810
|
+
name: P.fieldKey,
|
|
1811
|
+
config: P.fieldConfig,
|
|
1812
|
+
modelValue: $.value[P.fieldKey].value,
|
|
1813
|
+
"onUpdate:modelValue": (Q) => $.value[P.fieldKey].value = Q,
|
|
1809
1814
|
class: "form-field"
|
|
1810
1815
|
}, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
|
|
1811
1816
|
]),
|
|
1812
1817
|
_: 2
|
|
1813
1818
|
}, 1024))), 128)),
|
|
1814
|
-
|
|
1819
|
+
F(h, {
|
|
1815
1820
|
span: 6,
|
|
1816
1821
|
class: "search-col form-buttons"
|
|
1817
1822
|
}, {
|
|
1818
|
-
default:
|
|
1819
|
-
|
|
1820
|
-
default:
|
|
1821
|
-
|
|
1823
|
+
default: p(() => [
|
|
1824
|
+
F(R, { size: "medium" }, {
|
|
1825
|
+
default: p(() => [
|
|
1826
|
+
F(f, {
|
|
1822
1827
|
type: "primary",
|
|
1823
1828
|
size: "medium",
|
|
1824
|
-
onClick:
|
|
1829
|
+
onClick: ae
|
|
1825
1830
|
}, {
|
|
1826
|
-
default:
|
|
1827
|
-
|
|
1831
|
+
default: p(() => A[1] || (A[1] = [
|
|
1832
|
+
q(" Search ", -1)
|
|
1828
1833
|
])),
|
|
1829
1834
|
_: 1,
|
|
1830
1835
|
__: [1]
|
|
1831
1836
|
}),
|
|
1832
|
-
|
|
1837
|
+
F(f, {
|
|
1833
1838
|
size: "medium",
|
|
1834
|
-
onClick:
|
|
1839
|
+
onClick: fe
|
|
1835
1840
|
}, {
|
|
1836
|
-
default:
|
|
1837
|
-
|
|
1841
|
+
default: p(() => A[2] || (A[2] = [
|
|
1842
|
+
q(" Reset ", -1)
|
|
1838
1843
|
])),
|
|
1839
1844
|
_: 1,
|
|
1840
1845
|
__: [2]
|
|
@@ -1851,20 +1856,20 @@ const Kn = Object.assign(Le, {
|
|
|
1851
1856
|
]),
|
|
1852
1857
|
_: 1
|
|
1853
1858
|
}),
|
|
1854
|
-
|
|
1859
|
+
F(N, {
|
|
1855
1860
|
size: "large",
|
|
1856
|
-
onTabClick:
|
|
1861
|
+
onTabClick: v
|
|
1857
1862
|
}, {
|
|
1858
|
-
default:
|
|
1859
|
-
(u(!0),
|
|
1860
|
-
key:
|
|
1861
|
-
title:
|
|
1863
|
+
default: p(() => [
|
|
1864
|
+
(u(!0), V(K, null, E(r.value?.tabs, (P) => (u(), L(Y, {
|
|
1865
|
+
key: P.key,
|
|
1866
|
+
title: P.title
|
|
1862
1867
|
}, null, 8, ["title"]))), 128))
|
|
1863
1868
|
]),
|
|
1864
1869
|
_: 1
|
|
1865
1870
|
}),
|
|
1866
|
-
|
|
1867
|
-
columns:
|
|
1871
|
+
F(ie, {
|
|
1872
|
+
columns: w.value,
|
|
1868
1873
|
data: d.value,
|
|
1869
1874
|
stripe: "",
|
|
1870
1875
|
border: "",
|
|
@@ -1877,24 +1882,24 @@ const Kn = Object.assign(Le, {
|
|
|
1877
1882
|
showJumper: !0,
|
|
1878
1883
|
pageSizeOptions: [10, 20, 50, 100]
|
|
1879
1884
|
},
|
|
1880
|
-
loading:
|
|
1885
|
+
loading: m.value,
|
|
1881
1886
|
size: "medium",
|
|
1882
1887
|
scroll: i.value,
|
|
1883
|
-
onPageChange:
|
|
1884
|
-
onPageSizeChange:
|
|
1888
|
+
onPageChange: oe,
|
|
1889
|
+
onPageSizeChange: ne
|
|
1885
1890
|
}, {
|
|
1886
|
-
optional:
|
|
1887
|
-
|
|
1888
|
-
default:
|
|
1889
|
-
(u(!0),
|
|
1890
|
-
key:
|
|
1891
|
+
optional: p(({ record: P }) => [
|
|
1892
|
+
F(R, { size: "small" }, {
|
|
1893
|
+
default: p(() => [
|
|
1894
|
+
(u(!0), V(K, null, E(k.value, (Q) => (u(), V(K, {
|
|
1895
|
+
key: Q.title
|
|
1891
1896
|
}, [
|
|
1892
|
-
|
|
1897
|
+
Ae(Q, P) ? (u(), L(ye, {
|
|
1893
1898
|
key: 0,
|
|
1894
|
-
config:
|
|
1899
|
+
config: Q,
|
|
1895
1900
|
size: "small",
|
|
1896
|
-
onClick: (...
|
|
1897
|
-
}, null, 8, ["config", "onClick"])) :
|
|
1901
|
+
onClick: (...W) => le(...W, P.workflowId)
|
|
1902
|
+
}, null, 8, ["config", "onClick"])) : se("", !0)
|
|
1898
1903
|
], 64))), 128))
|
|
1899
1904
|
]),
|
|
1900
1905
|
_: 2
|
|
@@ -1905,18 +1910,18 @@ const Kn = Object.assign(Le, {
|
|
|
1905
1910
|
]);
|
|
1906
1911
|
};
|
|
1907
1912
|
}
|
|
1908
|
-
}),
|
|
1913
|
+
}), un = /* @__PURE__ */ ve(cn, [["__scopeId", "data-v-7ed94b4d"]]), vn = {
|
|
1909
1914
|
install(e, t = {}) {
|
|
1910
|
-
t.config &&
|
|
1915
|
+
t.config && yt(t.config), t.router && e.provide(et, t.router), t.pinia && e.provide(to, t.pinia), t.useBpmStore && e.provide(ot, t.useBpmStore), t.useSvrStore && e.provide(nt, t.useSvrStore), t.triggers && e.provide(tt, t.triggers), t.customComps && e.provide(at, t.customComps), e.component("CreateView", bo), e.component("UpdateView", Uo), e.component("DetailView", sn), e.component("ListView", un);
|
|
1911
1916
|
}
|
|
1912
1917
|
};
|
|
1913
1918
|
export {
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1919
|
+
bo as CreateView,
|
|
1920
|
+
sn as DetailView,
|
|
1921
|
+
un as ListView,
|
|
1922
|
+
to as PiniaKey,
|
|
1923
|
+
et as RouterKey,
|
|
1924
|
+
Uo as UpdateView,
|
|
1925
|
+
vn as default
|
|
1921
1926
|
};
|
|
1922
1927
|
//# sourceMappingURL=index.es.js.map
|