@chase-shao/vue-component-lib 1.2.70 → 1.2.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.es.js +97 -103
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/main.d.ts +0 -7
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as g, defineComponent as G, mergeModels as re, useModel as ye, 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 z, createVNode as
|
|
1
|
+
import { ref as g, defineComponent as G, mergeModels as re, useModel as ye, 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 z, createVNode as R, nextTick as rt, createTextVNode as q, useTemplateRef as De, createElementVNode as T, 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
2
|
import ut from "axios";
|
|
3
3
|
import { defineStore as dt } from "pinia";
|
|
4
4
|
import { Modal as ft } from "@arco-design/web-vue";
|
|
@@ -48,12 +48,12 @@ const mt = dt("main", () => ({
|
|
|
48
48
|
const o = document.createElement("a"), n = window.URL.createObjectURL(a);
|
|
49
49
|
o.href = n, o.download = t, o.click(), window.URL.revokeObjectURL(n);
|
|
50
50
|
};
|
|
51
|
-
let
|
|
51
|
+
let Fe = {};
|
|
52
52
|
function wt(e) {
|
|
53
|
-
|
|
53
|
+
Fe = { ...Fe, ...e };
|
|
54
54
|
}
|
|
55
55
|
function Be() {
|
|
56
|
-
return
|
|
56
|
+
return Fe;
|
|
57
57
|
}
|
|
58
58
|
function qe() {
|
|
59
59
|
const e = Be();
|
|
@@ -66,8 +66,8 @@ function Ye() {
|
|
|
66
66
|
const { apiBase: e } = qe();
|
|
67
67
|
return ut.create({
|
|
68
68
|
baseURL: e,
|
|
69
|
-
timeout:
|
|
70
|
-
//
|
|
69
|
+
timeout: 20 * 1e3,
|
|
70
|
+
// 20s
|
|
71
71
|
// headers: { 'Content-Type': 'application/json' },
|
|
72
72
|
withCredentials: !0
|
|
73
73
|
});
|
|
@@ -143,8 +143,9 @@ function Ct(e, t, a) {
|
|
|
143
143
|
appliesTo: n.propertyNames || ["*"]
|
|
144
144
|
});
|
|
145
145
|
else if (n.attributeType === "UIControl") {
|
|
146
|
+
const c = n.showToRoles.split(",").map((i) => i.trim()), r = a.bpmStore().employeeInfo.roleList.some((i) => c.includes(i.Name)) || n.showToRoles === "";
|
|
146
147
|
if (n.widget === "Tab") {
|
|
147
|
-
o.tabs || (o.tabs = []), o.tabs.push({
|
|
148
|
+
o.tabs || (o.tabs = []), r && o.tabs.push({
|
|
148
149
|
key: Xe(),
|
|
149
150
|
title: n.title,
|
|
150
151
|
filters: n.filters ? JSON.parse(n.filters) : [],
|
|
@@ -152,7 +153,7 @@ function Ct(e, t, a) {
|
|
|
152
153
|
});
|
|
153
154
|
return;
|
|
154
155
|
}
|
|
155
|
-
o.actions || (o.actions = []), o.actions.push({
|
|
156
|
+
o.actions || (o.actions = []), r && o.actions.push({
|
|
156
157
|
isSubmit: n.isSubmit,
|
|
157
158
|
requestUrl: n.requestUrl,
|
|
158
159
|
redirectUrl: n.redirectUrl,
|
|
@@ -264,10 +265,10 @@ async function Lt(e, t) {
|
|
|
264
265
|
label: r
|
|
265
266
|
}));
|
|
266
267
|
}
|
|
267
|
-
async function
|
|
268
|
+
async function Rt(e, t) {
|
|
268
269
|
return (await (await j()).get(`/General/${e}/${t}/process`))?.data;
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
+
function Ft(e) {
|
|
271
272
|
return {
|
|
272
273
|
uid: e.id ?? Xe(),
|
|
273
274
|
name: e.attachmentName ?? "unknown",
|
|
@@ -277,10 +278,10 @@ function Dt(e) {
|
|
|
277
278
|
async function Ze(e, t) {
|
|
278
279
|
return (await (await j()).get(`/General/${e}/${t}/upload/get`))?.data.reduce((c, r) => {
|
|
279
280
|
const { category: i } = r;
|
|
280
|
-
return c[i] || (c[i] = []), c[i].push(
|
|
281
|
+
return c[i] || (c[i] = []), c[i].push(Ft(r)), c;
|
|
281
282
|
}, {});
|
|
282
283
|
}
|
|
283
|
-
async function
|
|
284
|
+
async function Dt(e, t) {
|
|
284
285
|
return (await j()).post(`/General/${e}/${t}/delete/attachment`);
|
|
285
286
|
}
|
|
286
287
|
async function Pt() {
|
|
@@ -507,7 +508,7 @@ const ge = (e, t) => {
|
|
|
507
508
|
size: "large"
|
|
508
509
|
}, {
|
|
509
510
|
default: p(() => [
|
|
510
|
-
|
|
511
|
+
R(_, {
|
|
511
512
|
"field-names": i,
|
|
512
513
|
"model-value": s.modelValue,
|
|
513
514
|
options: c.value,
|
|
@@ -591,7 +592,7 @@ const ge = (e, t) => {
|
|
|
591
592
|
}, {
|
|
592
593
|
"start-icon": p(() => k[0] || (k[0] = [])),
|
|
593
594
|
"upload-button": p(() => [
|
|
594
|
-
|
|
595
|
+
R(E, { type: "primary" }, {
|
|
595
596
|
default: p(() => k[1] || (k[1] = [
|
|
596
597
|
q("Select File", -1)
|
|
597
598
|
])),
|
|
@@ -706,7 +707,7 @@ const ge = (e, t) => {
|
|
|
706
707
|
}),
|
|
707
708
|
emits: /* @__PURE__ */ re(["update:modelValue", "change", "error"], ["update:modelValue"]),
|
|
708
709
|
setup(e, { expose: t, emit: a }) {
|
|
709
|
-
const o = e, n = a, c = ye(e, "modelValue"), r =
|
|
710
|
+
const o = e, n = a, c = ye(e, "modelValue"), r = De("widgetRef"), i = X(() => {
|
|
710
711
|
switch (o.config?.widget?.widget) {
|
|
711
712
|
case "TextBox":
|
|
712
713
|
return Ge;
|
|
@@ -892,12 +893,12 @@ const oo = { class: "top-bar" }, no = { class: "banner-info" }, ao = { class: "p
|
|
|
892
893
|
T("div", so, J(t.subTitle), 1)
|
|
893
894
|
]),
|
|
894
895
|
T("div", ro, [
|
|
895
|
-
|
|
896
|
+
R(n, { trigger: "click" }, {
|
|
896
897
|
content: p(() => [
|
|
897
898
|
T("div", io, J(t.email), 1)
|
|
898
899
|
]),
|
|
899
900
|
default: p(() => [
|
|
900
|
-
|
|
901
|
+
R(o, {
|
|
901
902
|
size: 48,
|
|
902
903
|
autoFixFontSize: "",
|
|
903
904
|
style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
|
|
@@ -935,7 +936,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
935
936
|
className: {}
|
|
936
937
|
},
|
|
937
938
|
setup(e) {
|
|
938
|
-
const t = Se(), a = xe(), o = Ve(), n = Ee(), c =
|
|
939
|
+
const t = Se(), a = xe(), o = Ve(), n = Ee(), c = De("dataWidgets"), r = be(), i = e, s = g({
|
|
939
940
|
pageType: "",
|
|
940
941
|
fields: {},
|
|
941
942
|
globalValidations: [],
|
|
@@ -974,10 +975,10 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
974
975
|
async function ee($, U, v, A, y) {
|
|
975
976
|
switch (U) {
|
|
976
977
|
case Z.Submit:
|
|
977
|
-
let
|
|
978
|
+
let D = !0;
|
|
978
979
|
if (c.value?.forEach((ae) => {
|
|
979
|
-
ae?.validate && (ae.validate() || (
|
|
980
|
-
}), !
|
|
980
|
+
ae?.validate && (ae.validate() || (D = !1));
|
|
981
|
+
}), !D) {
|
|
981
982
|
r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
982
983
|
return;
|
|
983
984
|
}
|
|
@@ -1009,13 +1010,13 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1009
1010
|
return ($, U) => {
|
|
1010
1011
|
const v = S("a-card"), A = S("a-spin");
|
|
1011
1012
|
return u(), V("div", co, [
|
|
1012
|
-
|
|
1013
|
+
R($e, {
|
|
1013
1014
|
title: s.value.banner.title,
|
|
1014
1015
|
subTitle: s.value.banner.subTitle,
|
|
1015
1016
|
email: E()
|
|
1016
1017
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1017
1018
|
T("div", uo, [
|
|
1018
|
-
|
|
1019
|
+
R(A, {
|
|
1019
1020
|
loading: k.value,
|
|
1020
1021
|
class: "form-container"
|
|
1021
1022
|
}, {
|
|
@@ -1029,15 +1030,15 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1029
1030
|
}, {
|
|
1030
1031
|
default: p(() => [
|
|
1031
1032
|
T("div", mo, [
|
|
1032
|
-
(u(!0), V(K, null, z(y.fields, (
|
|
1033
|
-
key:
|
|
1033
|
+
(u(!0), V(K, null, z(y.fields, (D) => (u(), L(Ke, {
|
|
1034
|
+
key: D.fieldKey,
|
|
1034
1035
|
ref_for: !0,
|
|
1035
1036
|
ref: "dataWidgets",
|
|
1036
|
-
"field-key":
|
|
1037
|
-
config:
|
|
1037
|
+
"field-key": D.fieldKey,
|
|
1038
|
+
config: D,
|
|
1038
1039
|
"class-name": $.className,
|
|
1039
|
-
modelValue: m[
|
|
1040
|
-
"onUpdate:modelValue": (te) => m[
|
|
1040
|
+
modelValue: m[D.fieldKey],
|
|
1041
|
+
"onUpdate:modelValue": (te) => m[D.fieldKey] = te,
|
|
1041
1042
|
class: "form-field",
|
|
1042
1043
|
onChange: le
|
|
1043
1044
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
@@ -1063,7 +1064,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1063
1064
|
loading: k.value,
|
|
1064
1065
|
config: y,
|
|
1065
1066
|
class: "action-button",
|
|
1066
|
-
onClick: (...
|
|
1067
|
+
onClick: (...D) => ee(y, ...D)
|
|
1067
1068
|
}, null, 8, ["loading", "config", "onClick"]))), 128))
|
|
1068
1069
|
])
|
|
1069
1070
|
])
|
|
@@ -1081,7 +1082,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1081
1082
|
workflowId: {}
|
|
1082
1083
|
},
|
|
1083
1084
|
setup(e) {
|
|
1084
|
-
const t = Ve(), a = Ee(), o = xe(), n = Se(), c =
|
|
1085
|
+
const t = Ve(), a = Ee(), o = xe(), n = Se(), c = De("dataWidgets"), r = be(), i = e, s = g({
|
|
1085
1086
|
pageType: "",
|
|
1086
1087
|
fields: {},
|
|
1087
1088
|
globalValidations: [],
|
|
@@ -1117,7 +1118,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1117
1118
|
for (const v in s.value.fields) {
|
|
1118
1119
|
if (s.value.fields[v].widget?.widget === "File") {
|
|
1119
1120
|
const A = l.value.find((y) => y.fieldKey === v);
|
|
1120
|
-
A && A.widget && (A.widget.files = $[v] ?? [], A.widget.removeFile = (y) =>
|
|
1121
|
+
A && A.widget && (A.widget.files = $[v] ?? [], A.widget.removeFile = (y) => Dt(i.className, y));
|
|
1121
1122
|
}
|
|
1122
1123
|
m[v] = s.value.fields[v].modelValue;
|
|
1123
1124
|
}
|
|
@@ -1130,14 +1131,14 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1130
1131
|
switch ($) {
|
|
1131
1132
|
case Z.Submit:
|
|
1132
1133
|
let y = !0;
|
|
1133
|
-
if (c.value?.forEach((
|
|
1134
|
-
|
|
1134
|
+
if (c.value?.forEach((D) => {
|
|
1135
|
+
D?.validate && (D.validate() || (y = !1));
|
|
1135
1136
|
}), !y) {
|
|
1136
1137
|
r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
|
|
1137
1138
|
return;
|
|
1138
1139
|
}
|
|
1139
|
-
k.value = !0, await xt(i.className, i.workflowId, { ...m, ..._.value }, U), k.value = !1, c.value?.forEach((
|
|
1140
|
-
|
|
1140
|
+
k.value = !0, await xt(i.className, i.workflowId, { ...m, ..._.value }, U), k.value = !1, c.value?.forEach((D) => {
|
|
1141
|
+
D?.submit && D.submit(i.workflowId);
|
|
1141
1142
|
}), r?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${i.workflowId}.`);
|
|
1142
1143
|
break;
|
|
1143
1144
|
case Z.Link:
|
|
@@ -1155,13 +1156,13 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1155
1156
|
return (B, $) => {
|
|
1156
1157
|
const U = S("a-card"), v = S("a-spin");
|
|
1157
1158
|
return u(), V("div", ho, [
|
|
1158
|
-
|
|
1159
|
+
R($e, {
|
|
1159
1160
|
title: s.value.banner.title,
|
|
1160
1161
|
subTitle: s.value.banner.subTitle,
|
|
1161
1162
|
email: E()
|
|
1162
1163
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1163
1164
|
T("div", ko, [
|
|
1164
|
-
|
|
1165
|
+
R(v, {
|
|
1165
1166
|
loading: k.value,
|
|
1166
1167
|
class: "form-container"
|
|
1167
1168
|
}, {
|
|
@@ -1183,7 +1184,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1183
1184
|
config: y,
|
|
1184
1185
|
"class-name": B.className,
|
|
1185
1186
|
modelValue: m[y.fieldKey],
|
|
1186
|
-
"onUpdate:modelValue": (
|
|
1187
|
+
"onUpdate:modelValue": (D) => m[y.fieldKey] = D,
|
|
1187
1188
|
class: "form-field",
|
|
1188
1189
|
onChange: ne
|
|
1189
1190
|
}, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
@@ -1221,10 +1222,10 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
|
|
|
1221
1222
|
function No() {
|
|
1222
1223
|
return me(at, null);
|
|
1223
1224
|
}
|
|
1224
|
-
const Lo = Symbol("ArcoConfigProvider"),
|
|
1225
|
+
const Lo = Symbol("ArcoConfigProvider"), Ro = "arco", Fo = "$arco", Do = (e) => {
|
|
1225
1226
|
var t, a, o;
|
|
1226
1227
|
const n = be(), c = me(Lo, void 0);
|
|
1227
|
-
return `${(o = (a = c?.prefixCls) != null ? a : (t = n?.appContext.config.globalProperties[
|
|
1228
|
+
return `${(o = (a = c?.prefixCls) != null ? a : (t = n?.appContext.config.globalProperties[Fo]) == null ? void 0 : t.classPrefix) != null ? o : Ro}-${e}`;
|
|
1228
1229
|
}, Po = Object.prototype.toString;
|
|
1229
1230
|
function Mo(e) {
|
|
1230
1231
|
return Po.call(e) === "[object Number]" && e === e;
|
|
@@ -1261,7 +1262,7 @@ const Ho = G({
|
|
|
1261
1262
|
click: (e) => !0
|
|
1262
1263
|
},
|
|
1263
1264
|
setup(e, { emit: t }) {
|
|
1264
|
-
const a =
|
|
1265
|
+
const a = Do("icon"), o = X(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), n = X(() => {
|
|
1265
1266
|
const r = {};
|
|
1266
1267
|
return e.size && (r.fontSize = Mo(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
|
|
1267
1268
|
});
|
|
@@ -1290,12 +1291,12 @@ function Eo(e, t, a, o, n, c) {
|
|
|
1290
1291
|
T("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
|
|
1291
1292
|
]), 14, Ko);
|
|
1292
1293
|
}
|
|
1293
|
-
var
|
|
1294
|
-
const zo = Object.assign(
|
|
1294
|
+
var Re = /* @__PURE__ */ Bo(Ho, [["render", Eo]]);
|
|
1295
|
+
const zo = Object.assign(Re, {
|
|
1295
1296
|
install: (e, t) => {
|
|
1296
1297
|
var a;
|
|
1297
1298
|
const o = (a = t?.iconPrefix) != null ? a : "";
|
|
1298
|
-
e.component(o +
|
|
1299
|
+
e.component(o + Re.name, Re);
|
|
1299
1300
|
}
|
|
1300
1301
|
}), 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 = {
|
|
1301
1302
|
key: 1,
|
|
@@ -1379,7 +1380,7 @@ const zo = Object.assign(Fe, {
|
|
|
1379
1380
|
workflowId: i.workflowId
|
|
1380
1381
|
});
|
|
1381
1382
|
const b = await Ze(i.className, i.workflowId);
|
|
1382
|
-
ae.value = await Pt(),
|
|
1383
|
+
ae.value = await Pt(), D.value = await Oe(i.workflowId), fe.value = await Le(i.workflowId), le();
|
|
1383
1384
|
const f = s.value.fields.requestType.modelValue;
|
|
1384
1385
|
o.Test?.(f, B), l.value = _(s.value.fields);
|
|
1385
1386
|
for (const C in s.value.fields)
|
|
@@ -1387,7 +1388,7 @@ const zo = Object.assign(Fe, {
|
|
|
1387
1388
|
const Y = l.value.find((N) => N.fieldKey === C);
|
|
1388
1389
|
Y && Y.widget && (Y.widget.files = b[C] ?? []);
|
|
1389
1390
|
}
|
|
1390
|
-
const H = await
|
|
1391
|
+
const H = await Rt(i.className, i.workflowId);
|
|
1391
1392
|
k.value = m(H, 0), x.value = !1;
|
|
1392
1393
|
}
|
|
1393
1394
|
de($);
|
|
@@ -1417,7 +1418,7 @@ const zo = Object.assign(Fe, {
|
|
|
1417
1418
|
} catch {
|
|
1418
1419
|
}
|
|
1419
1420
|
}
|
|
1420
|
-
const y = g(""),
|
|
1421
|
+
const y = g(""), D = g([]), te = g(""), ae = g([]), fe = g([]);
|
|
1421
1422
|
async function Ae() {
|
|
1422
1423
|
if (!te.value) {
|
|
1423
1424
|
r?.appContext.config.globalProperties.$message.error("Please select an approver");
|
|
@@ -1459,23 +1460,23 @@ const zo = Object.assign(Fe, {
|
|
|
1459
1460
|
r?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
|
|
1460
1461
|
}
|
|
1461
1462
|
}
|
|
1462
|
-
async function
|
|
1463
|
+
async function F() {
|
|
1463
1464
|
if (!y.value.trim()) {
|
|
1464
1465
|
r?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
|
|
1465
1466
|
return;
|
|
1466
1467
|
}
|
|
1467
|
-
await Bt(i.workflowId, v(), y.value), y.value = "",
|
|
1468
|
+
await Bt(i.workflowId, v(), y.value), y.value = "", D.value = await Oe(i.workflowId), r?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
|
|
1468
1469
|
}
|
|
1469
1470
|
return (b, f) => {
|
|
1470
1471
|
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");
|
|
1471
1472
|
return u(), V("div", jo, [
|
|
1472
|
-
|
|
1473
|
+
R($e, {
|
|
1473
1474
|
title: s.value.banner.title,
|
|
1474
1475
|
subTitle: s.value.banner.subTitle,
|
|
1475
1476
|
email: v()
|
|
1476
1477
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1477
1478
|
T("div", Oo, [
|
|
1478
|
-
|
|
1479
|
+
R(st, {
|
|
1479
1480
|
loading: x.value,
|
|
1480
1481
|
class: "detail-container"
|
|
1481
1482
|
}, {
|
|
@@ -1500,15 +1501,15 @@ const zo = Object.assign(Fe, {
|
|
|
1500
1501
|
class: "field-value",
|
|
1501
1502
|
key: Ie.id
|
|
1502
1503
|
}, [
|
|
1503
|
-
|
|
1504
|
+
R(C, null, {
|
|
1504
1505
|
default: p(() => [
|
|
1505
1506
|
q(J(Ie.name) + " ", 1),
|
|
1506
|
-
|
|
1507
|
+
R(H, {
|
|
1507
1508
|
href: Ie.url,
|
|
1508
1509
|
target: "_blank"
|
|
1509
1510
|
}, {
|
|
1510
1511
|
default: p(() => [
|
|
1511
|
-
|
|
1512
|
+
R(Te(zo), { style: { color: "#7A00E6" } })
|
|
1512
1513
|
]),
|
|
1513
1514
|
_: 2
|
|
1514
1515
|
}, 1032, ["href"])
|
|
@@ -1524,7 +1525,7 @@ const zo = Object.assign(Fe, {
|
|
|
1524
1525
|
}, 1032, ["title"]))), 128)),
|
|
1525
1526
|
ee.value ? (u(), L(C, { key: 0 }, {
|
|
1526
1527
|
default: p(() => [
|
|
1527
|
-
|
|
1528
|
+
R(ie, {
|
|
1528
1529
|
modelValue: te.value,
|
|
1529
1530
|
"onUpdate:modelValue": f[0] || (f[0] = (M) => te.value = M)
|
|
1530
1531
|
}, {
|
|
@@ -1541,7 +1542,7 @@ const zo = Object.assign(Fe, {
|
|
|
1541
1542
|
]),
|
|
1542
1543
|
_: 1
|
|
1543
1544
|
}, 8, ["modelValue"]),
|
|
1544
|
-
|
|
1545
|
+
R(P, {
|
|
1545
1546
|
type: "primary",
|
|
1546
1547
|
onClick: Ae
|
|
1547
1548
|
}, {
|
|
@@ -1563,7 +1564,7 @@ const zo = Object.assign(Fe, {
|
|
|
1563
1564
|
key: M.id
|
|
1564
1565
|
}, {
|
|
1565
1566
|
actions: p(() => [
|
|
1566
|
-
|
|
1567
|
+
R(P, {
|
|
1567
1568
|
type: "text",
|
|
1568
1569
|
status: "danger",
|
|
1569
1570
|
onClick: (ce) => I(M.id)
|
|
@@ -1586,13 +1587,13 @@ const zo = Object.assign(Fe, {
|
|
|
1586
1587
|
ne.value ? (u(), V("div", Qo, [
|
|
1587
1588
|
T("div", Zo, [
|
|
1588
1589
|
f[6] || (f[6] = T("div", { class: "field-label" }, "Comment", -1)),
|
|
1589
|
-
|
|
1590
|
+
R(he, {
|
|
1590
1591
|
modelValue: y.value,
|
|
1591
1592
|
"onUpdate:modelValue": f[1] || (f[1] = (M) => y.value = M)
|
|
1592
1593
|
}, null, 8, ["modelValue"]),
|
|
1593
|
-
|
|
1594
|
+
R(P, {
|
|
1594
1595
|
type: "primary",
|
|
1595
|
-
onClick:
|
|
1596
|
+
onClick: F
|
|
1596
1597
|
}, {
|
|
1597
1598
|
default: p(() => f[5] || (f[5] = [
|
|
1598
1599
|
q("Add Comment", -1)
|
|
@@ -1602,12 +1603,12 @@ const zo = Object.assign(Fe, {
|
|
|
1602
1603
|
})
|
|
1603
1604
|
])
|
|
1604
1605
|
])) : se("", !0),
|
|
1605
|
-
|
|
1606
|
+
D.value.length ? (u(), L(W, { key: 3 }, {
|
|
1606
1607
|
header: p(() => f[7] || (f[7] = [
|
|
1607
1608
|
q(" Comments History ", -1)
|
|
1608
1609
|
])),
|
|
1609
1610
|
default: p(() => [
|
|
1610
|
-
(u(!0), V(K, null, z(
|
|
1611
|
+
(u(!0), V(K, null, z(D.value, (M) => (u(), L(Q, {
|
|
1611
1612
|
key: M.associator
|
|
1612
1613
|
}, {
|
|
1613
1614
|
default: p(() => [
|
|
@@ -1661,9 +1662,9 @@ const zo = Object.assign(Fe, {
|
|
|
1661
1662
|
filters: []
|
|
1662
1663
|
});
|
|
1663
1664
|
function s() {
|
|
1664
|
-
const w = Object.entries(A.value).filter(([, { value: I }]) => I && I !== "").map(([I, { value:
|
|
1665
|
+
const w = Object.entries(A.value).filter(([, { value: I }]) => I && I !== "").map(([I, { value: F, operator: b }]) => ({
|
|
1665
1666
|
key: I,
|
|
1666
|
-
value:
|
|
1667
|
+
value: F,
|
|
1667
1668
|
operator: b
|
|
1668
1669
|
// 根据实际需要调整操作符
|
|
1669
1670
|
}));
|
|
@@ -1682,9 +1683,9 @@ const zo = Object.assign(Fe, {
|
|
|
1682
1683
|
// 只设置横向滚动
|
|
1683
1684
|
// 移除 y 属性,让表格高度自适应
|
|
1684
1685
|
})), _ = (w) => {
|
|
1685
|
-
const I = Object.entries(w).filter(([,
|
|
1686
|
+
const I = Object.entries(w).filter(([, F]) => F.widget?.column).map(([F, b], f) => ({
|
|
1686
1687
|
title: b.widget.title,
|
|
1687
|
-
dataIndex:
|
|
1688
|
+
dataIndex: F.charAt(0).toLowerCase() + F.slice(1),
|
|
1688
1689
|
order: b.order,
|
|
1689
1690
|
ellipsis: !0,
|
|
1690
1691
|
tooltip: !0,
|
|
@@ -1693,7 +1694,7 @@ const zo = Object.assign(Fe, {
|
|
|
1693
1694
|
// 启用最小宽度
|
|
1694
1695
|
resizable: !0
|
|
1695
1696
|
// 启用列宽调整
|
|
1696
|
-
})).sort((
|
|
1697
|
+
})).sort((F, b) => F.order - b.order);
|
|
1697
1698
|
I.push({
|
|
1698
1699
|
title: "Actions",
|
|
1699
1700
|
slotName: "optional",
|
|
@@ -1706,13 +1707,13 @@ const zo = Object.assign(Fe, {
|
|
|
1706
1707
|
}, d = g([]), h = g([]), x = g(!0), m = g(!0), k = g(), E = async () => {
|
|
1707
1708
|
m.value = !0;
|
|
1708
1709
|
const w = await Vt(c.className, s());
|
|
1709
|
-
d.value = w.data,
|
|
1710
|
+
d.value = w.data, i.total = w.totalCount, m.value = !1;
|
|
1710
1711
|
}, ee = g(!1);
|
|
1711
1712
|
de(async () => {
|
|
1712
1713
|
x.value = !0, r.value = await Ce(3, c.className, {
|
|
1713
1714
|
svrStore: t,
|
|
1714
1715
|
bpmStore: a
|
|
1715
|
-
}), _(r.value.fields),
|
|
1716
|
+
}), _(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;
|
|
1716
1717
|
}), ct(() => {
|
|
1717
1718
|
ee.value && E();
|
|
1718
1719
|
});
|
|
@@ -1721,22 +1722,22 @@ const zo = Object.assign(Fe, {
|
|
|
1721
1722
|
}, ne = (w) => {
|
|
1722
1723
|
i.pageSize = w, E();
|
|
1723
1724
|
};
|
|
1724
|
-
function le(w, I,
|
|
1725
|
+
function le(w, I, F, b, f) {
|
|
1725
1726
|
switch (w) {
|
|
1726
1727
|
case Z.Link:
|
|
1727
|
-
o.push({ name:
|
|
1728
|
+
o.push({ name: F, params: { workflowId: f } });
|
|
1728
1729
|
break;
|
|
1729
1730
|
default:
|
|
1730
1731
|
console.warn("Unknown action type:", w);
|
|
1731
1732
|
}
|
|
1732
1733
|
}
|
|
1733
|
-
function B(w, I,
|
|
1734
|
+
function B(w, I, F) {
|
|
1734
1735
|
switch (w) {
|
|
1735
1736
|
case Z.Submit:
|
|
1736
1737
|
Kt(I, { filters: [{ key: "approverList", value: $(), operator: 2 }] }), n?.appContext.config.globalProperties.$notification.success("submit success!");
|
|
1737
1738
|
break;
|
|
1738
1739
|
case Z.Link:
|
|
1739
|
-
o.push({ name:
|
|
1740
|
+
o.push({ name: F });
|
|
1740
1741
|
break;
|
|
1741
1742
|
default:
|
|
1742
1743
|
console.warn("Unknown action type:", w);
|
|
@@ -1749,21 +1750,21 @@ const zo = Object.assign(Fe, {
|
|
|
1749
1750
|
return typeof w != "string" || w.indexOf("{currentUserEmail}") === -1 ? w : w.replace(/{currentUserEmail}/g, I);
|
|
1750
1751
|
}
|
|
1751
1752
|
function v(w) {
|
|
1752
|
-
const I = r.value?.tabs?.find((
|
|
1753
|
-
i.filters = I?.map((
|
|
1754
|
-
...
|
|
1755
|
-
value: U(
|
|
1753
|
+
const I = r.value?.tabs?.find((F) => F.key === w)?.filters;
|
|
1754
|
+
i.filters = I?.map((F) => ({
|
|
1755
|
+
...F,
|
|
1756
|
+
value: U(F.value, $())
|
|
1756
1757
|
})) || [], E();
|
|
1757
1758
|
}
|
|
1758
1759
|
const A = g({}), y = g([]);
|
|
1759
|
-
function
|
|
1760
|
+
function D(w) {
|
|
1760
1761
|
if (!w) return [];
|
|
1761
|
-
y.value = Object.entries(w).filter(([, I]) => I.isFiltered).map(([I,
|
|
1762
|
+
y.value = Object.entries(w).filter(([, I]) => I.isFiltered).map(([I, F]) => ({ fieldKey: I, fieldConfig: F }));
|
|
1762
1763
|
}
|
|
1763
1764
|
const te = () => {
|
|
1764
1765
|
const w = {};
|
|
1765
|
-
y.value.forEach(({ fieldKey: I, fieldConfig:
|
|
1766
|
-
w[I] = {}, w[I].value =
|
|
1766
|
+
y.value.forEach(({ fieldKey: I, fieldConfig: F }) => {
|
|
1767
|
+
w[I] = {}, w[I].value = F.modelValue, w[I].operator = F.operator;
|
|
1767
1768
|
}), A.value = w;
|
|
1768
1769
|
}, ae = () => {
|
|
1769
1770
|
i.current = 1, E();
|
|
@@ -1774,18 +1775,18 @@ const zo = Object.assign(Fe, {
|
|
|
1774
1775
|
return !(w.location !== "InTable" || w.title === "Update" && (I.status === 100 || I.status === -1));
|
|
1775
1776
|
}
|
|
1776
1777
|
return (w, I) => {
|
|
1777
|
-
const
|
|
1778
|
+
const F = S("a-space"), b = 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");
|
|
1778
1779
|
return u(), V("div", rn, [
|
|
1779
|
-
|
|
1780
|
+
R($e, {
|
|
1780
1781
|
title: r.value?.banner.title ?? "",
|
|
1781
1782
|
subTitle: r.value?.banner.subTitle ?? "",
|
|
1782
1783
|
email: $()
|
|
1783
1784
|
}, null, 8, ["title", "subTitle", "email"]),
|
|
1784
|
-
|
|
1785
|
+
R(C, null, {
|
|
1785
1786
|
default: p(() => [
|
|
1786
1787
|
T("div", ln, [
|
|
1787
1788
|
I[0] || (I[0] = T("h3", null, "Search Conditions", -1)),
|
|
1788
|
-
F
|
|
1789
|
+
R(F, { size: "medium" }, {
|
|
1789
1790
|
default: p(() => [
|
|
1790
1791
|
(u(!0), V(K, null, z(k.value, (P) => (u(), V(K, {
|
|
1791
1792
|
key: P.title
|
|
@@ -1800,7 +1801,7 @@ const zo = Object.assign(Fe, {
|
|
|
1800
1801
|
_: 1
|
|
1801
1802
|
})
|
|
1802
1803
|
]),
|
|
1803
|
-
|
|
1804
|
+
R(H, { gutter: [24, 20] }, {
|
|
1804
1805
|
default: p(() => [
|
|
1805
1806
|
(u(!0), V(K, null, z(y.value, (P) => (u(), L(b, {
|
|
1806
1807
|
key: P.fieldKey,
|
|
@@ -1808,7 +1809,7 @@ const zo = Object.assign(Fe, {
|
|
|
1808
1809
|
class: "search-col"
|
|
1809
1810
|
}, {
|
|
1810
1811
|
default: p(() => [
|
|
1811
|
-
|
|
1812
|
+
R(Ke, {
|
|
1812
1813
|
name: P.fieldKey,
|
|
1813
1814
|
config: P.fieldConfig,
|
|
1814
1815
|
modelValue: A.value[P.fieldKey].value,
|
|
@@ -1818,14 +1819,14 @@ const zo = Object.assign(Fe, {
|
|
|
1818
1819
|
]),
|
|
1819
1820
|
_: 2
|
|
1820
1821
|
}, 1024))), 128)),
|
|
1821
|
-
|
|
1822
|
+
R(b, {
|
|
1822
1823
|
span: 6,
|
|
1823
1824
|
class: "search-col form-buttons"
|
|
1824
1825
|
}, {
|
|
1825
1826
|
default: p(() => [
|
|
1826
|
-
F
|
|
1827
|
+
R(F, { size: "medium" }, {
|
|
1827
1828
|
default: p(() => [
|
|
1828
|
-
|
|
1829
|
+
R(f, {
|
|
1829
1830
|
type: "primary",
|
|
1830
1831
|
size: "medium",
|
|
1831
1832
|
onClick: ae
|
|
@@ -1836,7 +1837,7 @@ const zo = Object.assign(Fe, {
|
|
|
1836
1837
|
_: 1,
|
|
1837
1838
|
__: [1]
|
|
1838
1839
|
}),
|
|
1839
|
-
|
|
1840
|
+
R(f, {
|
|
1840
1841
|
size: "medium",
|
|
1841
1842
|
onClick: fe
|
|
1842
1843
|
}, {
|
|
@@ -1858,7 +1859,7 @@ const zo = Object.assign(Fe, {
|
|
|
1858
1859
|
]),
|
|
1859
1860
|
_: 1
|
|
1860
1861
|
}),
|
|
1861
|
-
|
|
1862
|
+
R(N, {
|
|
1862
1863
|
size: "large",
|
|
1863
1864
|
onTabClick: v
|
|
1864
1865
|
}, {
|
|
@@ -1870,7 +1871,7 @@ const zo = Object.assign(Fe, {
|
|
|
1870
1871
|
]),
|
|
1871
1872
|
_: 1
|
|
1872
1873
|
}),
|
|
1873
|
-
|
|
1874
|
+
R(ie, {
|
|
1874
1875
|
columns: h.value,
|
|
1875
1876
|
data: d.value,
|
|
1876
1877
|
stripe: "",
|
|
@@ -1881,7 +1882,6 @@ const zo = Object.assign(Fe, {
|
|
|
1881
1882
|
pageSize: i.pageSize,
|
|
1882
1883
|
showTotal: i.showTotal,
|
|
1883
1884
|
showPageSize: i.showPageSize,
|
|
1884
|
-
showJumper: !0,
|
|
1885
1885
|
pageSizeOptions: [10, 20, 50, 100]
|
|
1886
1886
|
},
|
|
1887
1887
|
loading: m.value,
|
|
@@ -1891,7 +1891,7 @@ const zo = Object.assign(Fe, {
|
|
|
1891
1891
|
onPageSizeChange: ne
|
|
1892
1892
|
}, {
|
|
1893
1893
|
optional: p(({ record: P }) => [
|
|
1894
|
-
F
|
|
1894
|
+
R(F, { size: "small" }, {
|
|
1895
1895
|
default: p(() => [
|
|
1896
1896
|
(u(!0), V(K, null, z(k.value, (Q) => (u(), V(K, {
|
|
1897
1897
|
key: Q.title
|
|
@@ -1912,18 +1912,12 @@ const zo = Object.assign(Fe, {
|
|
|
1912
1912
|
]);
|
|
1913
1913
|
};
|
|
1914
1914
|
}
|
|
1915
|
-
}), un = /* @__PURE__ */ ve(cn, [["__scopeId", "data-v-
|
|
1915
|
+
}), un = /* @__PURE__ */ ve(cn, [["__scopeId", "data-v-32799bcf"]]), vn = {
|
|
1916
1916
|
install(e, t = {}) {
|
|
1917
1917
|
t.config && wt(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);
|
|
1918
1918
|
}
|
|
1919
1919
|
};
|
|
1920
1920
|
export {
|
|
1921
|
-
bo as CreateView,
|
|
1922
|
-
sn as DetailView,
|
|
1923
|
-
un as ListView,
|
|
1924
|
-
to as PiniaKey,
|
|
1925
|
-
et as RouterKey,
|
|
1926
|
-
Uo as UpdateView,
|
|
1927
1921
|
vn as default
|
|
1928
1922
|
};
|
|
1929
1923
|
//# sourceMappingURL=index.es.js.map
|